/* ============================================================
   Component styles
   ============================================================ */

/* ---- top bar (name + menu) ---- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: clamp(16px, 3vw, 30px) clamp(18px, 4vw, 56px) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { font-family: var(--font-display); font-weight: 800; line-height: .96; letter-spacing: -.02em; }
.brand .b1 { font-size: clamp(20px, 2.4vw, 30px); display: block; }
.brand .b2 { font-size: clamp(20px, 2.4vw, 30px); display: block; color: var(--accent); }
.brand .dot { color: var(--accent); }
.topbar.on-dark .brand .b1 { color: var(--paper); }
.brand-wrap { display: flex; align-items: flex-start; gap: 9px; }

/* ===== brand → QR flip (pivot on click; QR sized to the "Cannelle Richter" text) ===== */
.brandflip { position: relative; display: inline-block; cursor: pointer; perspective: 700px; -webkit-tap-highlight-color: transparent; outline: none; }
.brandflip .bf-inner { position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.74,.2,1); }
.brandflip.flipped .bf-inner { transform: rotateY(180deg); }
.bf-front, .bf-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bf-front { display: inline-block; }
.bf-back { position: absolute; inset: 0; transform: rotateY(180deg); display: flex; align-items: center; justify-content: flex-start; }
.bf-back img { height: 100%; width: auto; aspect-ratio: 1 / 1; display: block; border-radius: 6px; box-shadow: 0 0 0 1.5px var(--line); background: #fff; }
.bf-cap { position: absolute; top: calc(100% + 3px); left: 2px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.topbar.on-dark .bf-cap { color: rgba(250,247,241,.7); }
@media (prefers-reduced-motion: reduce) { .brandflip .bf-inner { transition: opacity .3s; } }
.tempadmin { position: relative; }
.ta-btn { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--muted); opacity: .6; margin-top: 3px; }
.ta-btn:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
.ta-pop { position: absolute; top: 34px; left: 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 13px; z-index: 70; width: max-content; }

.topright { display: flex; align-items: center; gap: 10px; }
.topleft { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-back { white-space: nowrap; flex: none; }
/* orange, edit-mode-only Edit/Done toggle — lives in the header so it never shifts content */
.btn.edit-toggle { border-color: var(--c-amber); color: var(--c-amber); background: var(--card); white-space: nowrap; flex: none; }
.btn.edit-toggle:hover { background: rgba(217,119,40,.09); }
.btn.edit-toggle.on { background: var(--c-amber); color: #fff; border-color: var(--c-amber); }
.lang { display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; font-family: var(--font-mono); font-size: 12px; }
.lang button { border: none; background: var(--card); padding: 6px 11px; color: var(--ink); }
.lang button.on { background: var(--ink); color: var(--paper); }
.menubtn { width: 52px; height: 44px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--card); display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.menubtn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }

/* ---- menu slide-out ---- */
.menu-scrim { position: fixed; inset: 0; background: rgba(33,30,26,.32); backdrop-filter: blur(2px); z-index: 90; opacity: 0; transition: opacity .25s; }
.menu-scrim.show { opacity: 1; }
.menu-panel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 88vw);
  background: var(--card); z-index: 100; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; padding: 24px;
  border-left: 3px solid var(--accent);
}
.menu-panel.show { transform: none; }
.menu-link { display: flex; align-items: center; gap: 14px; padding: 14px 8px; border-bottom: 1px dashed var(--line); font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); transition: padding .15s, color .15s; cursor: pointer; }
.menu-link:hover { padding-left: 18px; color: var(--accent); }
.menu-link .mi { color: var(--accent); display: flex; }
.menu-link .tag { margin-left: 0; font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.menu-link .ml-go { display: flex; color: var(--accent); opacity: .35; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.menu-link:hover .ml-go { opacity: 1; transform: translateX(0); }

/* ---- domain switcher under title ---- */
.dom-switch { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-family: var(--font-mono); font-size: clamp(13px,1.4vw,16px); }
.dom-switch .ds { color: var(--muted); border-bottom: 2px solid transparent; padding-bottom: 1px; transition: color .15s, border-color .15s; cursor: pointer; white-space: nowrap; }
.dom-switch .ds:hover { color: var(--ink); }
.dom-switch .ds.cur { color: var(--ink); border-color: var(--accent); }

/* ---- hero ---- */
.hero-title { font-size: clamp(40px, 8.5vw, 116px); line-height: .9; letter-spacing: -.03em; }
.hero-title .lead { display: block; font-size: clamp(15px, 1.8vw, 22px); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; font-family: var(--font-mono); }
.hero-title .accent { color: var(--accent); }

.hero-stage { position: relative; flex: 1; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; min-height: 0; }
.hero-rail { display: flex; flex-direction: column; gap: 12px; align-items: center; padding-top: 8px; }
.hero-rail .rail-label { writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .12em; margin-top: 6px; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; }
.hero-artframe { position: relative; height: min(44vh, 440px); width: auto; aspect-ratio: 5/4; max-width: 100%; }
.secret-row { display: flex; justify-content: center; margin: 2px 0 12px; }
.hero-secret { position: static; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: var(--card); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 5px 13px; cursor: default; }

/* link bubbles */
.bubbles { display: flex; flex-wrap: wrap; gap: clamp(14px, 3vw, 34px); justify-content: center; padding: 6px 0 4px; }
.bubble { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.bubble .ring { width: clamp(46px,6vw,62px); height: clamp(46px,6vw,62px); border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; background: var(--card); color: var(--ink); transition: transform .15s, background .15s, color .15s; box-shadow: 2px 3px 0 var(--ink); }
.bubble:hover .ring { transform: translateY(-3px); background: var(--accent); color: #fff; }
.bubble .bl { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.bubble .bt { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.socialchip { display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 2px 2px 0 rgba(33,30,26,.35); transition: transform .14s; }
.socialchip:hover { transform: translateY(-2px) rotate(-4deg); }

/* ---- about (window 2) ---- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(70px,9vh,110px) 0 30px; }
.quote { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3vw, 40px); line-height: 1.12; letter-spacing: -.02em; position: relative; }
.quote::before { content: "\201C"; font-size: 2.4em; color: var(--accent); line-height: 0; position: relative; top: .35em; margin-right: 4px; }
.top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.about-pres { background: var(--accent-wash); border: 1.5px solid var(--accent); border-radius: var(--r-lg); padding: clamp(22px,3vw,34px); }
.about-pres h3 { font-size: clamp(24px,3vw,38px); }
.about-pres .nm { color: var(--accent); }

/* content card (top-N + section lists) */
.ccard { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; cursor: pointer; display: flex; flex-direction: column; }
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ccard .thumb { aspect-ratio: 16/10; position: relative; }
.ccard .cc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccard .cc-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.1; }
.ccard .cc-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.ccard .cc-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex-wrap: wrap; }

/* ---- footer (window 3) ---- */
.win3 { background: var(--ink); color: var(--paper); }
.win3 .win-inner { padding-top: clamp(50px,8vh,90px); padding-bottom: 28px; }
.win3 h2 { color: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; grid-template-rows: 1fr; gap: clamp(24px,4vw,56px); flex: 1; align-items: center; padding-top: 30px; }
.foot-col { align-self: center; }
.foot-col.nav-raise { align-self: center; text-align: center; }
.foot-col.nav-raise h4 { text-align: center; }
.foot-col.nav-raise .nav-plan { align-items: center; }
.foot-col.nav-raise .nav-plan a { justify-content: center; width: 100%; max-width: 220px; }
.foot-col.nav-raise .nav-plan .grp { text-align: center; width: 100%; }
.foot-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #b8b0a2; margin-bottom: 16px; font-weight: 500; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px,1fr)); gap: 14px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.app-tile .logo { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.app-tile:hover .logo { transform: translateY(-3px) rotate(-4deg); }
.app-tile .an { font-size: 12px; color: #d8d2c6; }
.nav-plan { display: flex; flex-direction: column; gap: 6px; }
.nav-plan a { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--paper); transition: padding .15s, color .15s; display: flex; align-items: center; gap: 10px; }
.nav-plan a:hover { padding-left: 12px; color: #fff; }
.nav-plan a.section-link { font-weight: 500; font-size: 16px; color: #cfc8ba; }
.nav-plan .grp { font-family: var(--font-mono); font-size: 11px; color: #8d8678; letter-spacing: .1em; text-transform: uppercase; margin: 14px 0 4px; }
.legal-bar { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 22px; margin-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-family: var(--font-mono); font-size: 12px; color: #9a9384; }
.legal-bar a:hover { color: #fff; }

/* ---- section / blog pages ---- */
.section-wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(20px,4vw,40px) clamp(18px,4vw,56px) 80px; }
/* ---- form pages (contact / feedback / cv) ---- */
.form-page { display: flex; align-items: flex-start; justify-content: center; padding: clamp(20px,4vh,48px) 24px 80px; }
.form-card { width: 100%; padding: clamp(26px,4vw,44px); }
.form-card form button[type="submit"] { margin-top: 4px; }

/* ---- content detail (article) ---- */
.article { max-width: 760px; margin: 0 auto; padding: clamp(8px,2vw,20px) clamp(18px,4vw,40px) 90px; }
.article-title { font-size: clamp(32px,5vw,56px); line-height: 1.02; margin-bottom: 14px; }
.article-sub { font-size: clamp(17px,2vw,21px); color: var(--ink-soft); line-height: 1.5; margin: 0 0 22px; font-weight: 500; }
.article-byline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); font-size: 14px; color: var(--ink-soft); margin-bottom: 28px; }
.article-byline .dot-sep { color: var(--muted); }
.article-byline > span:first-child { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.article-body { font-size: 17px; line-height: 1.7; color: var(--ink); text-align: justify; text-justify: inter-word; hyphens: auto; }
.article-body p { margin: 0 0 18px; }
.pullquote { margin: 28px 0; padding: 8px 0 4px; border: none; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px,2.4vw,28px); line-height: 1.35; color: var(--ink); }
.pullquote.has-bar { border-left: 4px solid var(--accent); padding-left: 22px; }
.article-block { margin-top: 34px; padding-top: 22px; border-top: 1.5px solid var(--line); }
.article-block h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.src-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.src-list a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-size: 15px; }
.src-list a:hover { text-decoration: underline; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, transform .15s; background: var(--card); }
.related-row:hover { border-color: var(--accent); transform: translateX(3px); }
.related-row .rl-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.readnext { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--accent-wash); border: 1.5px solid var(--accent); cursor: pointer; transition: transform .15s; }
.readnext:hover { transform: translateY(-2px); }
.readnext .rn-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px,2.4vw,28px); line-height: 1.1; margin-top: 4px; color: var(--ink); }
.readnext .rn-arrow { color: var(--accent-ink); flex: none; }
.comments-teaser { margin-top: 28px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--font-mono); font-size: 13px; justify-content: center; }
.rateblock { margin-top: 34px; padding: 28px 24px; border-radius: var(--r-lg); border: 1.5px solid var(--accent); background: var(--accent-wash); }
.ratestar { background: none; border: none; padding: 2px; color: inherit; cursor: pointer; transition: transform .12s; }
.ratestar:hover { transform: scale(1.15); }
.rate-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 15px; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: #fff; border: 1.5px solid var(--accent-ink); box-shadow: var(--shadow-md); }
.rate-fab:hover { transform: translateY(-2px); }
@media (max-width: 560px) { .rate-fab .rf-label { display: none; } .rate-fab { padding: 14px; } }

/* ---- about me ---- */
.aboutme-hero { display: grid; grid-template-columns: 1.4fr .8fr; gap: clamp(24px,4vw,48px); align-items: center; margin-top: 12px; }
@media (max-width: 700px) { .aboutme-hero { grid-template-columns: 1fr; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 18px 0 26px; }
.section-head h1 { font-size: clamp(36px,6vw,72px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 22px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px,1fr)); gap: 24px; }
.vid-embed { aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden; border: 1.5px solid var(--line); background: #000; }
.vid-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- admin / login ---- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 360px; max-width: 100%; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow-lg); }
.login-card h2 { text-align: center; margin-bottom: 4px; }

/* ---- board ---- */
.board-shell { min-height: 100vh; display: flex; flex-direction: column; }
.board-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; padding: 24px clamp(18px,3vw,40px) 0; }
.board-edit-cta { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); z-index: 5; }
@media (max-width: 700px) { .board-edit-cta { position: static; transform: none; order: 3; width: 100%; display: flex; justify-content: center; margin-top: 12px; } .board-top { flex-wrap: wrap; } }
.admin-pill { position: relative; }
.admin-menu { position: absolute; right: 0; top: 52px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); width: 200px; overflow: hidden; z-index: 30; }
.admin-menu button { width: 100%; text-align: left; padding: 12px 16px; background: var(--card); border: none; font-family: var(--font-body); font-size: 14px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.admin-menu button:hover { background: var(--paper-2); }
.board-body { max-width: 1240px; width: 100%; margin: 0 auto; padding: 18px clamp(18px,3vw,40px) 60px; }
.board-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1.5px solid var(--line); }
.panel-head h3 { font-size: 18px; }
.panel-body { padding: 18px 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; }
.tile { border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card); transition: box-shadow .15s, transform .15s; }
.tile.sel { box-shadow: 0 0 0 2.5px var(--accent); }
.tile-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 14px; cursor: pointer; }
.tile-links { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile-links a, .tile-links .lk { font-size: 13px; color: var(--ink-soft); padding: 4px 0; border-bottom: 1px dotted var(--line); display: flex; align-items: center; gap: 6px; }
.tile-links a:hover { color: var(--accent); }
.notif { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.notif .dotc { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.notif .nt { font-size: 11px; font-family: var(--font-mono); color: var(--muted); }
.analytics-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 30px; }
.stat .l { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; }
.spark span { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; opacity: .85; }

/* ---- edit mode — persistent banner (every page) ---- */
.edit-banner { position: relative; z-index: 86; min-height: var(--ebar-h); background: linear-gradient(180deg, rgba(224,138,30,.98), rgba(224,138,30,.93)); color: #2a1a02; border-bottom: 2px solid #b56b08; }
.edit-banner .eb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: var(--ebar-h); padding: 6px clamp(12px,3vw,26px); }
.eb-admin { position: relative; flex: none; }
.eb-admin-btn { display: inline-flex; align-items: center; gap: 7px; background: #2a1a02; color: #ffce85; border: 1.5px solid #2a1a02; border-radius: 999px; padding: 7px 15px; box-shadow: 1.5px 1.5px 0 rgba(42,26,2,.45); font-family: var(--font-display); font-weight: 700; font-size: 14px; cursor: pointer; }
.eb-admin-btn .lbl { font-weight: 700; }
.eb-admin-btn .b1, .eb-admin-btn .b2 { font-weight: 800; font-size: 16px; line-height: 1; }
.eb-admin-btn .b2 { color: var(--c-blue); }
.eb-admin-btn .dot { color: var(--c-blue); }
.eb-admin-btn:hover { transform: translate(-1px,-1px); box-shadow: 2.5px 2.5px 0 #b56b08; }
.eb-admin-tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10px; background: #2a1a02; color: #ffce85; padding: 2px 7px; border-radius: 999px; }
.edit-banner .warn-ico { background: #2a1a02; color: var(--c-amber); border-radius: 6px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; flex: none; }
.eb-mode { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.eb-ctx { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; font-size: 12px; padding: 4px 11px; border-radius: 999px; border: 1.5px solid; }
.eb-ctx em { font-style: normal; font-family: var(--font-mono); font-weight: 500; font-size: 11px; opacity: .85; margin-left: 3px; }
.eb-ctx.home { background: #f0eafd; color: #5d34bd; border-color: #7a4fe0; }
.eb-ctx.domain { background: #fff7ea; color: #8a5206; border-color: #b56b08; }
.eb-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 13px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid #b56b08; background: #fff7ea; color: #2a1a02; box-shadow: 1.5px 1.5px 0 #b56b08; flex: none; }
.eb-btn:hover { transform: translate(-1px,-1px); box-shadow: 2.5px 2.5px 0 #b56b08; }
.eb-btn.primary { background: #2a1a02; color: #ffce85; border-color: #2a1a02; }
.edit-banner .admin-menu { top: calc(100% + 4px); right: 0; left: auto; }

/* centered drop-down settings panel */
.ep-scrim { position: fixed; inset: 0; background: rgba(33,30,26,.08); z-index: 84; }
.edit-panel-v2 { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(1120px, 95vw); height: calc(100vh - var(--ebar-h) - 28px); max-height: calc(100vh - var(--ebar-h) - 28px); background: rgba(252,243,224,.40); backdrop-filter: blur(9px) saturate(1.05); -webkit-backdrop-filter: blur(9px) saturate(1.05); border: 1.5px solid rgba(217,162,62,.85); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 85; display: flex; flex-direction: column; overflow: hidden; animation: epDrop .26s cubic-bezier(.2,.8,.2,1); }
@keyframes epDrop { from { transform: translate(-50%, -14px); } to { transform: translate(-50%, 0); } }
.ep2-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 22px; border-bottom: 1.5px solid rgba(217,162,62,.5); background: rgba(252,243,224,.45); }
.ep2-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: #8a5206; }
.ep2-title { font-size: 19px; }
.ep2-body { padding: 18px 22px; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 0; }
.ep2-cols > *, .gs-win1 > *, .win2-layout > * { min-width: 0; }
.ep2-body input, .ep2-body textarea, .ep2-body select { max-width: 100%; }
.ep2-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 13px 22px; border-top: 1.5px solid rgba(217,162,62,.5); background: rgba(255,255,255,.34); }
.ep2-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; align-items: start; }
.ep2-cols .edit-section { margin-bottom: 0; }
@media (max-width: 760px) { .edit-panel-v2 { top: calc(100% + 6px); width: 96vw; } }

/* domain pages: trim the scroll windows to leave room for the banner */
.edit-mode .window { min-height: calc(100vh - var(--ebar-h)); }

/* content-linked feedback overlay (transparent — article shows through) */
.fb-scrim { position: fixed; inset: 0; background: rgba(33,30,26,.34); backdrop-filter: blur(3px); z-index: 210; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeUp .25s ease; }
.fb-pop { position: relative; width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto; background: rgba(255,255,255,.97); border: 1.5px solid var(--accent); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 26px 26px 22px; }
.fb-close { position: absolute; top: 14px; right: 14px; }
.fb-subject { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); background: var(--accent-wash); border: 1px solid var(--accent); border-radius: 999px; padding: 5px 12px; align-self: flex-start; }
.edit-section { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 16px; }
.edit-section > .es-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.es-num { background: var(--accent); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.draglist { display: flex; flex-direction: column; gap: 8px; }
.dragrow { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); cursor: grab; }
.dragrow.dragging { opacity: .4; }
.dragrow.over { border-color: var(--accent); border-style: dashed; }
.dragrow .grip { color: var(--muted); }
.dragrow .nm { font-weight: 700; font-family: var(--font-display); font-size: 14px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-row-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.iconbtn { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.iconbtn.danger:hover { border-color: var(--c-coral); color: var(--c-coral); }

/* edit highlight overlay on the live page */
.editable { position: relative; }
.edit-mode .editable { outline: 2px dashed rgba(224,138,30,.55); outline-offset: 4px; border-radius: 4px; }
.edit-mode .editable::after { content: attr(data-edit-label); position: absolute; top: -10px; left: 8px; background: var(--c-amber); color: #2a1a02; font-family: var(--font-mono); font-size: 10px; padding: 1px 7px; border-radius: 999px; font-weight: 700; }

/* modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(33,30,26,.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 460px; max-width: 100%; max-height: 88vh; overflow-y: auto; }
/* wide settings-style modals (Manage roles & shared pages, Manage access) — same generous
   footprint as the global / domain settings panel so nothing is clipped */
.modal.lg { width: min(880px, 96vw); max-height: 90vh; }
.modal.xl { width: min(1080px, 96vw); max-height: 90vh; }
.modal.lg .modal-head, .modal.xl .modal-head { padding: 18px 26px; }
.modal.lg .modal-body, .modal.xl .modal-body { padding: 22px 26px; }
.modal.lg .role-pick, .modal.xl .role-pick { grid-template-columns: repeat(2, 1fr); }
.modal.lg .grant-pick, .modal.xl .grant-pick { max-height: 360px; }
.modal.xl .grant-pick { display: grid; grid-template-columns: repeat(2, 1fr); align-content: start; }
@media (max-width: 720px) { .modal.xl .grant-pick { grid-template-columns: 1fr; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1.5px solid var(--line); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 16px 22px; border-top: 1.5px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }

/* multi-select chips */
.multi { display: flex; flex-wrap: wrap; gap: 7px; }
.multi .opt { cursor: pointer; }

/* ---- persistent social rail (windows 1–2) — vertical, bottom-left ---- */
.social-rail { position: fixed; left: clamp(16px,3vw,46px); bottom: clamp(20px,6vh,52px); top: auto; z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform .6s cubic-bezier(.5,.05,.5,1), opacity .5s ease; }
.social-rail .rail-line { width: 1.5px; height: clamp(30px,7vh,58px); background: linear-gradient(to bottom, transparent, var(--line-strong) 30%, var(--line-strong)); border-radius: 2px; }
.social-rail .rail-chips { display: flex; flex-direction: column; gap: 12px; }
.social-rail .rc { display: block; transition: transform .45s cubic-bezier(.4,0,.2,1), opacity .4s; transition-delay: calc(var(--i) * 45ms); }
.social-rail .rail-label { writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .12em; margin-top: 2px; }
.social-rail.fly { transform: translate(58vw, -2vh) scale(.55); opacity: 0; pointer-events: none; }
.social-rail.fly .rc { transform: scale(.4) rotate(18deg); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .social-rail { transition: opacity .3s; } .social-rail.fly { transform: none; } }
@media (max-width: 1100px) { .social-rail { display: none; } }

/* footer networks pop-in (receives the rail) — one chip at a time */
.net-pop .np { display: block; opacity: 0; transform: translateY(26px) scale(.4) rotate(-12deg); transition: transform .5s cubic-bezier(.2,.9,.3,1.2), opacity .35s ease; transition-delay: calc(var(--i) * 150ms + .15s); }
.net-pop.in .np { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .net-pop .np { transition: opacity .3s; transform: none; } }
/* logo visibility on the dark footer */
.win3 .socialchip { box-shadow: 0 0 0 1.6px rgba(255,255,255,.5), 2px 2px 0 rgba(0,0,0,.45); }
.win3 .app-tile .logo { box-shadow: 0 0 0 1.5px rgba(255,255,255,.22), var(--shadow-sm); }
.win3 .app-tile .an { color: #e6e0d4; }

/* board socials — vertical, bottom-left, with a discreet line */
.board-socials { position: fixed; left: clamp(14px,2.5vw,28px); bottom: clamp(16px,3vh,30px); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.board-socials .rail-line { width: 1.5px; height: clamp(26px,5vh,46px); background: linear-gradient(to bottom, transparent, var(--line-strong) 35%, var(--line-strong)); border-radius: 2px; }
@media (max-width: 760px) { .board-socials { position: static; flex-direction: row; flex-wrap: wrap; padding: 4px clamp(18px,3vw,40px) 0; } .board-socials .rail-line { display: none; } }

/* hero single-column stage (socials now in the rail) */
.hero-stage.solo { grid-template-columns: 1fr; }
.inline-socials { display: none; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.inline-socials .is-wave { width: 26px; height: 12px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 12'%3E%3Cpath d='M1 6 C5 1 9 11 13 6 S21 1 25 6' fill='none' stroke='%238a8478' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); flex: none; }
@media (max-width: 1100px) { .inline-socials { display: flex; } }
.puzzle-hint { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); max-width: 92%; text-align: center; font-size: 11px; color: var(--muted); background: var(--card); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 5px 12px; }
.hero-secret.unlocked { color: #137a57; border-color: #1f9e72; border-style: solid; background: #e3f5ee; }
.hero-secret.unlocked:hover { background: #d3efe3; }

/* hero illustration frame */
.hero-embed { width: 100%; height: 100%; border: 0; display: block; background: transparent; border-radius: var(--r-md); }

/* clearer clickable breadcrumb on the article page */
.crumb { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.crumb a { display: inline-flex; align-items: center; color: var(--accent-ink); border-bottom: 1.5px solid transparent; padding-bottom: 1px; cursor: pointer; }
.crumb a:hover { border-color: var(--accent); }
.crumb .cur { color: var(--ink); font-weight: 500; }

/* interactive gradient-descent puzzle — multi-axis, bot-resistant */
.hero-artframe.has-puzzle { height: auto; aspect-ratio: auto; width: min(520px, 96%); }
.puzzle-wrap { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 12px 14px 14px; }
.puzzle-map { border-radius: var(--r-md); }
.puzzle-controls { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.pc-row { display: flex; align-items: center; gap: 10px; }
.pc-lbl { font-family: var(--font-display); font-weight: 800; font-size: 15px; width: 88px; flex: none; }
.pc-lbl .pc-sub { font-family: var(--font-mono); font-weight: 400; font-size: 10px; color: var(--muted); display: block; letter-spacing: .04em; }
.pc-row input[type="range"] { width: 100%; cursor: pointer; }
.pc-eta { position: relative; flex: 1; display: flex; align-items: center; }
.pc-eta input[type="range"] { width: 100%; position: relative; z-index: 1; }
.pc-band { position: absolute; top: 50%; transform: translateY(-50%); height: 8px; border-radius: 4px; background: rgba(31,158,114,.28); border: 1px solid rgba(31,158,114,.55); }
.pc-flag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-coral); width: 54px; flex: none; text-align: right; }
.pc-flag.ok { color: var(--c-green); }
.pc-status { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 2px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pc-status b { color: var(--ink); }
.pc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.pc-dot.ok { background: var(--c-green); }
.pc-ok { color: var(--c-green); font-weight: 600; }
.pc-hint { display: inline-flex; align-items: center; }

/* image upload control */
.img-upload { position: relative; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); background: repeating-linear-gradient(45deg, transparent 0 11px, rgba(33,30,26,.035) 11px 12px); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; width: 100%; color: var(--muted); }
.img-upload:hover { border-color: var(--accent); }
.img-upload.round { border-radius: 50%; }
.img-upload img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-upload .iu-label { font-family: var(--font-mono); font-size: 11px; text-align: center; padding: 8px; }
.img-upload .iu-clear { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(33,30,26,.7); color: #fff; display: flex; align-items: center; justify-content: center; }
.img-upload .ph-tag { position: absolute; bottom: 8px; right: 8px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 999px; }

/* rich-text link in presentation body */
.rt-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.rt-link:hover { color: var(--accent); }

/* secret page */
.secret-page { padding: clamp(28px,5vw,52px); margin-top: 26px; }

/* responsive */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .board-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .hero-stage { grid-template-columns: 1fr; }
  .hero-rail { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hero-rail .rail-label { writing-mode: horizontal-tb; }
}
@media (max-width: 560px) {
  .top-grid { grid-template-columns: 1fr; }
  .brand .b1, .brand .b2 { font-size: 20px; }
}

/* ============================================================
   Article environment (reader + editor)
   ============================================================ */
.article-layout { max-width: 1180px; margin: 0 auto; padding: clamp(8px,2vw,20px) clamp(18px,4vw,48px) 96px; display: grid; grid-template-columns: minmax(0,1fr) 312px; gap: clamp(28px,4vw,56px); align-items: start; }
.al-main { min-width: 0; }
.al-side { position: sticky; top: 18px; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } .al-side { position: static; } }

.article-title { font-size: clamp(32px,5vw,54px); line-height: 1.02; margin-bottom: 14px; }
.article-sub { font-size: clamp(17px,2vw,21px); color: var(--ink-soft); line-height: 1.5; margin: 0 0 8px; font-weight: 500; }

/* body blocks */
.article-body .ab-h { font-size: clamp(22px,2.6vw,28px); margin: 30px 0 12px; }
.ab-code { background: #1f1c18; color: #f3efe6; border-radius: var(--r-md); padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; margin: 18px 0; }
.ab-embed { margin: 18px 0; border-radius: var(--r-md); overflow: hidden; }
.ab-embed iframe { width: 100%; min-height: 240px; border: 0; }
.ab-fig { margin: 18px 0; }
.ab-fig img { width: 100%; border-radius: var(--r-md); border: 1.5px solid var(--line); display: block; }
.ab-fig figcaption { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

/* alternative-media panel */
.altmedia { margin: 18px 0 24px; padding: 16px 18px; border: 1.5px solid var(--accent); border-radius: var(--r-lg); background: var(--accent-wash); }
.am-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.am-kicker { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--accent-ink); }
.am-sub { font-size: 11px; }
.am-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.am-chip { display: inline-flex; align-items: center; gap: 9px; background: var(--card); border: 1.5px solid var(--accent); border-radius: 999px; padding: 8px 14px 8px 9px; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 14px; box-shadow: 2px 2px 0 var(--accent-ink); transition: transform .14s, box-shadow .14s; }
.am-chip:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--accent-ink); }
.am-chip.on { background: var(--accent); color: #fff; }
.am-chip .am-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.am-chip.on .am-ic { background: rgba(255,255,255,.25); color: #fff; }
.am-chip .am-state { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; opacity: .7; }

/* mini media player */
.mini-player { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); }
.mp-play { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; border: none; display: flex; align-items: center; justify-content: center; flex: none; }
.mp-main { flex: 1; min-width: 0; }
.mp-title { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.mp-time { font-size: 11px; color: var(--muted); }
.mp-wave { display: flex; align-items: center; gap: 2px; height: 30px; }
.mp-wave span { flex: 1; background: var(--accent); border-radius: 2px; min-height: 2px; transition: opacity .2s; }
.mp-demo { font-family: var(--font-mono); font-size: 10px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 2px 7px; flex: none; }

/* AI transparency badge */
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 12px; padding: 4px 11px; border-radius: 999px; background: #f0eafd; color: #5d34bd; border: 1.5px solid #c9b8f5; }
.ai-badge.compact { font-size: 11px; padding: 3px 9px; }
.ai-badge .ai-spark { color: #7a4fe0; font-size: 11px; }
.ai-badge.human { background: var(--paper-2); color: var(--ink-soft); border-color: var(--line-strong); }

/* side metadata card */
.meta-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px 18px 20px; }
.mc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mc-row:first-child { padding-top: 0; }
.mc-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mc-v { font-family: var(--font-display); font-weight: 700; }
.mc-block { padding: 14px 0 0; margin-top: 12px; border-top: 1.5px solid var(--line); }
.rate-mini { display: flex; flex-direction: column; gap: 10px; }
.rm-avg { display: flex; align-items: center; gap: 8px; }
.rm-avg .rm-num { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; }
.rm-vote { display: flex; flex-direction: column; gap: 3px; }
.rm-done { display: inline-flex; align-items: center; gap: 6px; color: var(--c-green); font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.rel-mini { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 0; }
.rel-mini .dotc { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rel-mini .rm-t { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.2; }
.rel-mini:hover { color: var(--accent); }

/* inline edit regions on the article page */
.edit-region { position: relative; border: 1.5px dashed #d9a23e; border-radius: var(--r-md); background: rgba(252,243,224,.5); padding: 28px 16px 16px; margin: 14px 0; }
.er-label { position: absolute; top: -11px; left: 12px; display: inline-flex; align-items: center; gap: 5px; background: var(--c-amber); color: #2a1a02; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }

/* block editor */
.block-editor { display: flex; flex-direction: column; gap: 12px; }
.be-block { border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); padding: 10px 12px 12px; }
.be-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.be-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); border-radius: 999px; padding: 2px 9px; }
.iconbtn.sm { width: 26px; height: 26px; }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.be-add { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); }
.be-add .chip { cursor: pointer; }
.alt-edit-row { display: flex; gap: 8px; align-items: center; }

/* tag-picker note in the content modal */
.src-note { border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: var(--paper-2); padding: 12px 14px; }

/* ============================================================
   Batch additions — cover hero, richer blocks, Other pages
   ============================================================ */

/* edit-mode "Other" entry in the slide-out menu (amber) */
.menu-link.other-edit { color: var(--c-amber); }
.menu-link.other-edit .mi { color: var(--c-amber); }
.menu-link.other-edit:hover { color: #b56b08; }
.ml-edit-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: #2a1a02; background: var(--c-amber); padding: 2px 8px; border-radius: 999px; margin-right: 8px; }

/* dynamic embed inside an Other page */
.other-embed { padding: 0; }
.other-embed iframe { width: 100%; min-height: 420px; border: 0; display: block; }

/* article cover hero — cover (or domain art) behind the title */
.article-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; margin: 4px 0 24px; min-height: 244px; display: flex; align-items: flex-end; border: 1.5px solid var(--line); }
.article-hero.compact { min-height: 150px; }
.ah-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ah-art { position: absolute; inset: 0; background: linear-gradient(135deg, var(--accent-wash), #ffffff 72%); display: flex; align-items: center; justify-content: center; }
.ah-art svg { max-height: 86%; opacity: .82; }
.ah-veil { position: absolute; inset: 0; }
.article-hero.has-cover .ah-veil { background: linear-gradient(to top, rgba(18,14,9,.86), rgba(18,14,9,.32) 52%, rgba(18,14,9,.05)); }
.article-hero.art-bg .ah-veil { background: linear-gradient(to top, rgba(255,255,255,.94), rgba(255,255,255,.42) 56%, transparent); }
.ah-inner { position: relative; padding: clamp(18px,3vw,32px); width: 100%; }
.ah-title { margin: 0 0 8px; }
.ah-sub { font-size: clamp(15px,1.8vw,19px); line-height: 1.42; margin: 0; font-weight: 500; max-width: 70ch; }
.article-hero.has-cover .ah-title { color: #fff; }
.article-hero.has-cover .ah-sub { color: rgba(255,255,255,.86); }
.article-hero.art-bg .ah-title { color: var(--ink); }
.article-hero.art-bg .ah-sub { color: var(--ink-soft); }
.ah-chip { font-family: var(--font-mono); }
.article-hero.has-cover .ah-chip { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.55); }
.article-hero.art-bg .ah-chip { border-color: var(--accent); color: var(--accent-ink); }

/* richer body blocks */
.ab-h1 { font-size: clamp(26px,3vw,34px); margin: 34px 0 14px; }
.ab-list { margin: 0 0 18px; padding-left: 22px; }
.ab-list li { margin: 0 0 7px; line-height: 1.6; text-align: left; }
.ab-sep { border: none; border-top: 2px solid var(--line-strong); width: 64px; margin: 28px auto; }
.pullquote .pq-text { display: block; }
.pullquote .pq-mark { font-family: Georgia, "Times New Roman", serif; font-size: 1.7em; line-height: 0; color: var(--accent); opacity: .42; vertical-align: -0.45em; }
.pullquote .pq-mark.open { margin-right: 3px; }
.pullquote .pq-mark.close { margin-left: 3px; }
.pq-author { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 13px; font-style: normal; font-weight: 500; color: var(--muted); }

/* block editor: type select, add-below, separator note */
.be-type-sel { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; padding: 4px 7px; width: auto; min-width: 96px; border-radius: 7px; background: var(--paper-2); border: 1.5px solid var(--line-strong); color: var(--ink-soft); }
.be-hr-note { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding: 10px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.be-addbelow { margin-top: 9px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink); background: none; border: none; padding: 2px 0; cursor: pointer; opacity: .65; transition: opacity .15s; }
.be-addbelow:hover { opacity: 1; }

/* ========================================================================
   Iteration — editor & content enhancements
   ======================================================================== */

/* sticky, vertically-centred Edit / Preview toggle on the article page */
.ep-sticky { position: fixed; left: clamp(8px, 2vw, 22px); top: 50%; transform: translateY(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.eps-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; padding: 12px 6px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); font-family: var(--font-display); font-weight: 700; font-size: 11px; cursor: pointer; transition: transform .12s; }
.eps-btn.on { background: var(--accent); color: #fff; border-color: var(--accent-ink); box-shadow: 2px 2px 0 var(--accent-ink); }
.eps-btn:hover { transform: translateX(2px); }
@media (max-width: 1180px) {
  .ep-sticky { position: static; transform: none; flex-direction: row; margin: 0 0 16px; }
  .eps-btn { flex-direction: row; width: auto; padding: 8px 16px; }
}

/* which-language-am-I-editing bar */
.lang-edit-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--r-md); background: var(--accent-wash); border: 1.5px solid var(--accent); margin: 0 0 18px; flex-wrap: wrap; }
/* two-row variant: status row on top, the missing-language cursor below — all in ONE block */
.lang-edit-bar.two-row { flex-direction: column; align-items: stretch; gap: 10px; }
.lang-edit-bar.two-row .leb-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-edit-bar.two-row .langfb.inline { border-top: 1.5px dashed rgba(47,107,219,.35); padding-top: 10px; }
.langfb.inline { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.langfb.inline .lfb-title { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--accent-ink); flex: none; }
.langfb.inline .lfb-switch { flex: 1 1 320px; }
.lang-edit-bar .leb-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.leb-tabs { display: inline-flex; border: 1.5px solid var(--accent); border-radius: 999px; overflow: hidden; }
.leb-tabs button { border: none; background: transparent; color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; font-size: 12px; padding: 4px 13px; cursor: pointer; }
.leb-tabs button.on { background: var(--accent); color: #fff; }
.leb-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--c-green); }
.leb-warn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #b56b08; }

/* automatic (read-only) dates block */
.auto-dates { display: flex; flex-direction: column; gap: 7px; padding: 11px 13px; background: var(--paper-2); border-radius: var(--r-sm); }
.auto-dates .mc-k { margin: 0; font-size: 12px; }
.auto-dates .mc-v { font-size: 13px; }

/* definition / reference bubble (inline) */
.defterm { position: relative; border-bottom: 2px dotted var(--accent); cursor: help; font-weight: 600; }
.defterm .def-bubble { position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%) translateY(4px); width: max-content; max-width: 250px; background: var(--ink); color: var(--paper); font-family: var(--font-body); font-weight: 400; font-size: 13px; line-height: 1.45; text-align: left; padding: 9px 12px; border-radius: var(--r-sm); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity .14s, transform .14s; z-index: 40; }
.defterm .def-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.defterm:hover .def-bubble, .defterm:focus .def-bubble { opacity: 1; transform: translateX(-50%) translateY(0); }

/* callout box */
.ab-callout { display: flex; gap: 13px; margin: 22px 0; padding: 16px 18px; border-radius: var(--r-md); border: 1.5px solid; background: var(--paper-2); text-align: left; }
.ab-callout .cal-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; }
.ab-callout .cal-body { line-height: 1.6; }
.ab-callout.tone-info { border-color: var(--c-blue); background: #eef3fd; }
.ab-callout.tone-info .cal-ic { background: var(--c-blue); }
.ab-callout.tone-tip { border-color: var(--c-green); background: #e8f6ef; }
.ab-callout.tone-tip .cal-ic { background: var(--c-green); }
.ab-callout.tone-warn { border-color: #c47d12; background: #fcf3e2; }
.ab-callout.tone-warn .cal-ic { background: #e08a1e; }

/* article tables */
.ab-table-wrap { margin: 22px 0; overflow-x: auto; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); }
.ab-table { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; }
.ab-table th, .ab-table td { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.ab-table th { background: var(--paper-2); font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.ab-table tr:last-child td { border-bottom: none; }
.ab-table tbody tr:nth-child(even) td { background: rgba(33,30,26,.018); }

/* pull-quote: optional left accent bar (off by default) */
.pullquote { position: relative; }

/* table editor */
.table-editor { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px; background: var(--card); }
.te-table { border-collapse: collapse; }
.te-table td { padding: 2px; }
.te-table td input { min-width: 108px; width: 100%; }
.te-table td.te-head input { font-weight: 700; background: var(--paper-2); }
.te-rowtool, .te-coltool { padding-left: 6px; vertical-align: middle; text-align: center; }

/* about portrait embed */
.about-embed { display: block; }

/* "not available in this language" card */
.notinlang { padding: 44px 30px; text-align: center; }
.notinlang .nil-ic { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; color: var(--accent); border: 1.5px solid var(--accent); margin-bottom: 14px; }

/* iconbtn small size used in the table editor */
.iconbtn.sm { width: 28px; height: 28px; }

/* ---- card thumbnail: domain-art fallback cover ---- */
.thumb-art { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 7% 9%; }
.thumb-art svg { width: 100%; max-height: 100%; }

/* ---- publication badge (edit mode only) — top-left ---- */
.thumb-pub { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; gap: 5px; }
.pub-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #fff; box-shadow: 1px 1px 0 rgba(0,0,0,.18); }
.pub-badge.live { background: var(--c-green); }
.pub-badge.draft { background: var(--c-amber); }

/* ---- thumbnail language badges (edit mode only) — discreet, bottom-left ---- */
.thumb-langs { position: absolute; bottom: 8px; left: 8px; z-index: 3; display: flex; gap: 4px; }
.tl-badge { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: rgba(33,30,26,.5); color: #fff; backdrop-filter: blur(3px); }

/* ---- legal-pages editor (settings panel, window 3) ---- */
.legal-edit { padding: 12px 14px; background: var(--paper-2); border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.legal-edit textarea { font-size: 13px; line-height: 1.5; }

/* ---- "showing EN fallback" translation notice ---- */
.trans-notice { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 11px 15px; border-radius: var(--r-md); background: #fcf1de; border: 1.5px solid var(--c-amber); color: #8a5206; font-size: 14px; font-weight: 500; }

/* ---- segmented missing-language fallback toggle ---- */
.seg-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .seg-toggle { grid-template-columns: 1fr; } }
.seg-toggle button { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--card); cursor: pointer; transition: border-color .12s, background .12s; }
.seg-toggle button b { font-family: var(--font-display); font-size: 14px; }
.seg-toggle button span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.seg-toggle button.on { border-color: var(--accent); background: var(--accent-wash); }
.seg-toggle button.on b { color: var(--accent-ink); }

/* ---- related-items editor row ---- */
.rel-edit-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.rel-edit-row .dotc { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rel-edit-row .re-t { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 700; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- alternative-media editor (with thumbnail) ---- */
.alt-edit-row, .alt-edit-row2 { display: flex; gap: 10px; align-items: flex-start; }
.alt-edit-row2 .aer-thumb { flex: none; width: 46px; height: 46px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--accent-wash); display: flex; align-items: center; justify-content: center; color: var(--accent); overflow: hidden; }
.alt-edit-row2 .aer-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- edit-panel tab row + inline language switch ---- */
.ep2-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lang-inline { display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: 999px; background: var(--accent-wash); border: 1.5px solid var(--accent); flex: none; }
.lang-inline .leb-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }

/* ---- Global settings · Window 1 layout (1 centered, then 2/3/4 in a row) ---- */
.gs-win1 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.gs-win1 > .edit-section:nth-child(1) { grid-column: 1 / -1; width: 100%; max-width: 460px; margin: 0 auto; }
@media (max-width: 860px) { .gs-win1 { grid-template-columns: 1fr; } .gs-win1 > .edit-section:nth-child(1) { max-width: none; } }

/* ---- Page panel · Window 2 layout (1+2 left stacked, 3 right) ---- */
.win2-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.win2-layout > .edit-section:nth-child(1) { grid-column: 1; grid-row: 1; }
.win2-layout > .edit-section:nth-child(2) { grid-column: 1; grid-row: 2; }
.win2-layout > .edit-section:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 860px) { .win2-layout { grid-template-columns: 1fr; } .win2-layout > .edit-section { grid-column: 1 !important; grid-row: auto !important; } }

/* ---- inline FR translation input on section rows ---- */
.fr-inline { flex: none; width: 150px; max-width: 38%; font-size: 12.5px; padding: 5px 9px; }

/* ---- symmetric EN/FR status summary ---- */
.bl-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.bl-badges { display: inline-flex; gap: 6px; }
.bl-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; border: 1.5px solid; }
.bl-badge.on { color: var(--c-green); border-color: var(--c-green); background: rgba(31,158,114,.08); }
.bl-badge.off { color: #b56b08; border-color: var(--c-amber); background: rgba(224,138,30,.08); }
.bl-summary { font-size: 11.5px; color: var(--muted); font-weight: 500; max-width: 320px; text-align: right; line-height: 1.3; }

/* ---- required-field 'missing content' note ---- */
.miss-note { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; font-weight: 600; color: #b56b08; }
/* ---- greyed phantom placeholder (other-language preview) ---- */
.phantom-ph::placeholder { color: var(--muted); opacity: .6; font-style: italic; }

/* ======================================================
   Additions — multi-domain art, language ball switch,
   centered page tools, clean section rows
   ====================================================== */

/* superposed multi-domain thumbnail artwork */
.multi-art { position: relative; width: 100%; height: 100%; }
.multi-art .ma-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; mix-blend-mode: multiply; }
@supports not (mix-blend-mode: multiply) { .multi-art .ma-layer { opacity: .6; } }

/* language fallback "ball" switch */
.langfb { display: flex; flex-direction: column; gap: 8px; }
.langfb .lfb-title { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.lfb-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0; padding: 4px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--accent-wash); cursor: pointer; overflow: hidden; }
.lfb-ball { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .26s cubic-bezier(.2,.8,.2,1); z-index: 0; }
.lfb-switch.right .lfb-ball { transform: translateX(100%); }
.lfb-opt { position: relative; z-index: 1; text-align: center; padding: 7px 10px; font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--accent-ink); transition: color .2s; line-height: 1.2; }
.lfb-opt.on { color: #fff; }
.lfb-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.langfb.done { flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-md); background: rgba(31,158,114,.08); border: 1.5px solid var(--c-green); }
.langfb.done .lfb-ic { color: var(--c-green); display: inline-flex; }
.langfb.done .lfb-msg { font-size: 13px; color: var(--ink); }
.langfb.done.warn { background: rgba(217,119,40,.08); border-color: var(--c-amber); }
.langfb.done.warn .lfb-ic { color: var(--c-amber); }

/* centered page-tools bar (Other / CV / static pages in edit mode) */
.page-tools-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 4px; }

/* clean section rows in the settings panel */
.sec-row-logo { width: 28px; height: 28px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; }
.sec-row-langs { display: inline-flex; gap: 5px; }
.sec-lang-pill { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 2px 7px; }
.frozen-id { border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); padding: 11px 13px; background: var(--paper); }

/* ============================================================
   AUTH / ROLES — identity control, login popover, feedback dock,
   board users panel.
   ============================================================ */
/* role badge */
.rolebadge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, #fff); border: 1.5px solid color-mix(in srgb, var(--rc) 45%, #fff); border-radius: 999px; padding: 2px 9px; white-space: nowrap; flex: none; }
.rolebadge .rb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rc); }
.rolebadge.lg { font-size: 12px; padding: 4px 11px; }

/* coloured initial avatar */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-family: var(--font-display); font-weight: 800; flex: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }

/* ---- identity control (top bar) ---- */
.id-wrap { position: relative; flex: none; }
.id-signin { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 15px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.id-signin:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.id-signin.on-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 2px 2px 0 rgba(255,255,255,.4); }
.id-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 7px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.id-chip:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.id-chip.on-dark { background: rgba(255,255,255,.1); border-color: var(--paper); color: var(--paper); box-shadow: 2px 2px 0 rgba(255,255,255,.35); }
.id-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.id-scrim { position: fixed; inset: 0; z-index: 110; }
.id-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 120; padding: 6px; overflow: hidden; }
.idm-head { display: flex; align-items: center; gap: 11px; padding: 10px 10px 8px; }
.idm-id { min-width: 0; }
.idm-name { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.15; margin-bottom: 4px; }
.idm-blurb { font-size: 12px; color: var(--muted); line-height: 1.45; padding: 0 10px 8px; margin: 0; border-bottom: 1px dashed var(--line); }
.idm-group { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.idm-cap { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 4px 12px; }
.idm-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: none; border: none; border-radius: var(--r-sm); font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.idm-item:hover { background: var(--paper-2); }
.idm-item.grant .idm-grant-l { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idm-item .idm-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--c-violet); border: 1.5px solid color-mix(in srgb, var(--c-violet) 40%, #fff); border-radius: 999px; padding: 1px 6px; }
.idm-item.logout { color: var(--c-coral); }
.idm-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; padding: 2px 12px 4px; }

/* ---- login popover + screen account rows ---- */
.login-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 330px; max-width: 92vw; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 120; padding: 16px; }
.lp-head { display: flex; align-items: flex-start; justify-content: space-between; }
.lp-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; color: var(--accent); }
.lp-title { font-size: 21px; margin-top: 2px; }
.lp-sub { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 8px 0 12px; }
.lp-list { display: flex; flex-direction: column; gap: 7px; }
.lp-acct { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 11px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color .12s, background .12s; }
.lp-acct:hover { border-color: var(--line-strong); background: var(--paper-2); }
.lp-acct.on { border-color: var(--accent); background: var(--accent-wash); box-shadow: 0 0 0 3px var(--accent-wash); }
.lp-acct-main { flex: 1; min-width: 0; }
.lp-acct-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; line-height: 1.1; }
.lp-acct-mail { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-auth { margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line); }
.lp-lbl { display: flex; align-items: center; justify-content: space-between; }
.lp-hint { font-weight: 400; font-size: 11px; color: var(--muted); }
.lp-err { color: var(--c-coral); font-size: 12px; margin-top: 6px; }
.lp-stay { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-top: 11px; cursor: pointer; }
.lp-stay input { width: auto; }
.login-card.wide { width: 420px; }

/* ---- menu "Other / shared with you" caption ---- */
.menu-cap { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 16px 0 2px; padding-top: 12px; border-top: 1px dashed var(--line); }
.menu-cap svg { color: var(--accent); }

/* ---- edit-banner role chip + menu identity ---- */
.eb-role .rolebadge { background: #2a1a02; border-color: #2a1a02; color: #ffce85; }
.eb-role .rolebadge .rb-dot { background: #ffce85; }
.am-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; font-family: var(--font-display); font-weight: 700; font-size: 13px; border-bottom: 1px dashed var(--line); }
.am-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; padding: 8px 14px; }
.eb-admin-btn .avatar { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }

/* ---- review / guest feedback dock ---- */
.rf-dock { position: fixed; right: 22px; bottom: 22px; z-index: 88; }
.rf-fab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 2px solid var(--ink); background: var(--rc); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.rf-fab:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.rf-card { width: 320px; max-width: calc(100vw - 32px); background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px; }
.rf-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.rf-title { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--rc); }
.rf-subj { font-size: 12.5px; color: var(--muted); margin-bottom: 9px; }
.rf-subj b { color: var(--ink); }
.rf-text { width: 100%; resize: vertical; min-height: 76px; }
.rf-send { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; padding: 11px; border-radius: var(--r-md); border: 2px solid var(--ink); background: var(--rc); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.rf-send:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.rf-send:disabled { opacity: .5; cursor: default; }
.rf-sent { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 22px 0; color: var(--c-green); font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.iconbtn.sm { width: 30px; height: 30px; }

/* ---- board users & access panel ---- */
.user-rows { display: flex; flex-direction: column; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.user-row:last-child { border-bottom: none; }
.ur-id { min-width: 130px; }
.ur-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.15; }
.ur-mail { font-size: 11px; color: var(--muted); }
.ur-grants { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.ur-grant { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.ur-all { font-size: 12px; font-weight: 600; color: var(--accent-ink); }
@media (max-width: 640px) { .user-row { flex-wrap: wrap; } .ur-grants { order: 5; flex-basis: 100%; } }

/* ---- role picker + grant picker (user modal) ---- */
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-opt { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; transition: border-color .12s, background .12s; }
.role-opt:hover { border-color: var(--line-strong); }
.role-opt.on { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 7%, #fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc) 22%, #fff); }
.role-opt .ro-top { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.role-opt .ro-top .rb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); }
.role-opt .ro-blurb { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 560px) { .role-pick { grid-template-columns: 1fr; } }
.grant-pick { display: flex; flex-direction: column; gap: 12px; max-height: 240px; overflow-y: auto; padding: 4px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); }
.grant-gname { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.grant-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grant-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: all .12s; }
.grant-chip:hover { border-color: var(--accent); }
.grant-chip.on { background: var(--accent); color: #fff; border-color: var(--accent-ink); }
.grant-chip.locked { opacity: .5; cursor: not-allowed; background: var(--paper-2); border-style: dashed; }
.grant-chip.locked:hover { border-color: var(--line-strong); }

/* ---- redesigned access panel (manage roles): role summary + grouped shares ---- */
.access-wrap { display: flex; flex-direction: column; gap: 14px; }
.access-role { border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper-2); padding: 11px 13px; }
.access-role .ar-head { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink); }
.access-role .ar-head svg { color: var(--accent); }
.access-role p { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.access-shared { display: flex; flex-direction: column; gap: 13px; }
.as-cap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.as-cap svg { color: var(--accent); }
.as-cap .as-sub { font-family: var(--font-body); font-weight: 400; font-size: 11.5px; color: var(--muted); }
.access-shared .grant-group { padding: 10px 11px; border: 1.5px solid var(--line); border-radius: var(--r-md); }
.access-shared .grant-group.hot { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, #fff); }
.access-shared .grant-group.muted { opacity: .75; }
.gg-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.gg-tag.violet { color: var(--c-violet); border-color: var(--c-violet); }
.gg-note { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 11px; color: var(--c-violet); }

/* ============================================================
   v5 — collaborator modes, workflow, fixed identity, dark lang
   ============================================================ */

/* ---- dark window-3 fix: EN/FR language toggle stays legible on the footer ---- */
.topbar.on-dark .lang { border-color: rgba(255,255,255,.65); }
.topbar.on-dark .lang button { background: rgba(255,255,255,.10); color: var(--paper); }
.topbar.on-dark .lang button.on { background: var(--paper); color: var(--ink); }

/* ---- identity control: constant size so EN/FR & long names never shift the bar ---- */
.id-signin { width: 132px; justify-content: center; }
.id-signin.on-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.id-chip { width: 104px; justify-content: space-between; }
.id-chip .id-name { font-family: var(--font-display); font-weight: 800; letter-spacing: .04em; max-width: none; overflow: visible; text-overflow: clip; flex: 1; text-align: center; }
/* signed in & inside a focused mode (edit / review): show the full name, tinted orange */
.id-chip.in-mode { width: auto; max-width: 220px; background: #fff7ea; border-color: #b56b08; color: #7a4a06; box-shadow: 2px 2px 0 #d99a3e; }
.id-chip.in-mode:hover { box-shadow: 3px 3px 0 #b56b08; }
.id-chip.in-mode .id-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
/* magic-link / turnstile scaffold (production sign-in) */
.ts-stub { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); color: var(--muted); font-size: 12px; background: var(--paper-2); }
.lp-sent { display: flex; align-items: center; gap: 8px; color: var(--c-green); font-weight: 700; font-family: var(--font-display); font-size: 14px; padding: 6px 0; }
.idm-item.danger-item { color: var(--c-coral); }
.idm-item.seeall { color: var(--accent-ink); font-weight: 700; }
.idm-item.seeall .idm-grant-l { flex: 1; }

/* ---- mode banner: exit button + reviewer accent ---- */
.eb-btn.exit { background: #2a1a02; color: #ffce85; border-color: #2a1a02; }
.edit-banner.is-review { background: linear-gradient(180deg, rgba(217,119,6,.98), rgba(217,119,6,.92)); }

/* ---- MODE HOME (editor / reviewer dashboard) ---- */
.mode-home { min-height: 100vh; }
.mh-wrap { max-width: 1040px; margin: 0 auto; padding: clamp(20px,4vw,40px) clamp(16px,4vw,32px) 64px; }
.mh-hero { margin: 8px 0 30px; }
.mh-kicker { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--mc); padding: 5px 12px; border-radius: 999px; }
.mh-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px,6vw,60px); line-height: 1.02; margin: 14px 0 0; }
.mh-title .mh-dot { color: var(--mc); }
.mh-sub { font-size: clamp(15px,2vw,18px); color: var(--ink-soft); max-width: 560px; margin: 12px 0 0; line-height: 1.5; }
.mh-caphead { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.mh-caphead .mono { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.mh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mh-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px; border: 1.5px solid var(--line-strong); border-radius: var(--r-lg); background: var(--card); cursor: pointer; box-shadow: 3px 3px 0 transparent; transition: transform .12s, box-shadow .12s, border-color .12s; }
.mh-card:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.mh-card.hot { border-color: var(--mc); }
.mh-card-ic { position: relative; width: 52px; height: 52px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--paper-2); color: var(--ink); }
.mh-card-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.mh-badge { position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--mc); color: #fff; border: 2px solid var(--card); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 12.5px; }
.mh-card-l { font-family: var(--font-display); font-weight: 800; font-size: 19px; flex: 1; }
.mh-card-c { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.mh-card.hot .mh-card-c { color: var(--mc); font-weight: 600; }
.mh-card-go { color: var(--muted); flex: none; }
.mh-shared { display: flex; flex-direction: column; gap: 6px; }
.mh-shared-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; font-family: var(--font-body); font-weight: 600; transition: border-color .12s, background .12s; }
.mh-shared-row:hover { border-color: var(--line-strong); background: var(--paper-2); }
.mh-shared-l { font-size: 14.5px; }
.mh-priv { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--c-violet); border: 1px solid var(--c-violet); border-radius: 999px; padding: 1px 7px; }
.shared-ic { width: 30px; height: 30px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--accent-wash); color: var(--accent-ink); }
/* shared-pages card logo — uses the editor's own logo / cover when present */
.shared-logo { width: 38px; height: 38px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--accent-wash); color: var(--accent-ink); overflow: hidden; }
.shared-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- menu: mode-restricted list, counts, separator, shared entry ---- */
.menu-sep { height: 0; border-top: 2px dashed var(--line-strong); margin: 14px 2px; position: relative; }
.menu-sep::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 2px dashed var(--line); }
.menu-cap.mode-cap { color: var(--c-amber); }
.menu-cap.mode-cap svg { color: var(--c-amber); }
.menu-link.mode-hot .mi { color: var(--accent); }
.ml-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--c-amber); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 12.5px; }
/* ---- menu "Shared pages" group: a sober titled separator; entries keep the
   same white tab design as the links above (just grouped under a heading) ---- */
.shared-cap { margin-top: 18px; padding-top: 14px; border-top: 1.5px solid var(--line); color: var(--accent-ink); font-size: 11px; }
.shared-cap::before { content: ""; }
.ml-count.soft { background: var(--accent-wash); color: var(--accent-ink); }
.menu-note { font-size: 12.5px; color: var(--muted); padding: 6px 12px; }

/* ---- editorial workflow rail ---- */
.wf { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.wf-cell { display: inline-flex; align-items: center; gap: 4px; }
.wf-step { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink-soft); font-family: var(--font-display); font-weight: 700; font-size: 12.5px; cursor: default; transition: all .12s; }
.wf-step .wf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.wf-step.can { cursor: pointer; border-color: var(--wf); color: var(--wf); }
.wf-step.can:hover { background: color-mix(in srgb, var(--wf) 10%, #fff); }
.wf-step.on { background: var(--wf); border-color: var(--wf); color: #fff; }
.wf-step.on .wf-dot { background: #fff; }
.wf-step:disabled { opacity: .5; }
.wf-arrow { color: var(--muted); display: inline-flex; }
.wf-note { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 8px; }
.wf-hist { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 4px 0; }
.wf-hist span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.wf-hist b { font-family: var(--font-display); }

/* reviewer action bar on a content page */
.review-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border: 1.5px solid var(--wf); border-radius: var(--r-md); background: color-mix(in srgb, var(--wf) 8%, #fff); }
.rb-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rb-kicker { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--wf); text-transform: uppercase; letter-spacing: .04em; }
.rb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* content-card workflow status badge */
.pub-badge.wf-draft { background: #8a8478; color: #fff; }
.pub-badge.wf-review { background: #d97706; color: #fff; }
.pub-badge.wf-published { background: #1f9e72; color: #fff; }

/* ===== language-availability chips (covers, every list, read-only) ===== */
.lang-chips { display: flex; gap: 4px; }
.lang-chips.on-thumb { position: absolute; bottom: 8px; left: 8px; z-index: 3; }
.lc-badge { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: rgba(33,30,26,.55); color: #fff; backdrop-filter: blur(3px); }

/* ===== centered kind icon overlay on cards (video / podcast / music / audio / document) ===== */
.thumb-kind { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); pointer-events: none; }
.thumb-kind.doc { color: var(--accent-ink); opacity: .85; }

/* ===== per-language workflow badges (review/edit cards + review bar + meta) ===== */
.lwf { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.thumb-pub .lwf { gap: 4px; }
.lwf-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--wf) 55%, #fff); box-shadow: 1px 1px 0 rgba(33,30,26,.06); }
.lwf-badge .lwf-l { font-family: var(--font-mono); font-size: 9.5px; font-weight: 800; letter-spacing: .05em; color: var(--ink); }
.lwf-badge .lwf-s { font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--wf); }
.lwf-badge.hot { background: color-mix(in srgb, var(--wf) 16%, #fff); border-color: var(--wf); }
.lwf-badge.none { opacity: .55; }
.lwf-badge.none .lwf-s { color: var(--muted); }

/* ===== playlist / audio / pdf players ===== */
.player-wrap { width: 100%; }
.playlist-embed { display: block; }
.audio-player { width: 100%; }
.player-wrap.kind-music .audio-player, .player-wrap.kind-podcast .audio-player, .player-wrap.kind-audio .audio-player { height: 52px; }
.pdf-wrap { width: 100%; }
.pdf-frame { display: block; }

/* ===== subscribe / follow block ===== */
.subscribe-panel { margin: 26px 0; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper-2); }
.sp-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sp-kicker { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.sp-sub { font-size: 12.5px; color: var(--muted); }
.sub-chip { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px 7px 7px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--sc) 45%, var(--line)); background: #fff; box-shadow: 2px 2px 0 color-mix(in srgb, var(--sc) 28%, #fff); font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.sub-chip:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 color-mix(in srgb, var(--sc) 40%, #fff); }
.sub-ic { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sub-l { line-height: 1; }
.sub-pick { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 6px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.sub-pick.on { border-color: var(--sc); box-shadow: 2px 2px 0 color-mix(in srgb, var(--sc) 30%, #fff); color: var(--sc); }
.sub-pick.on svg:last-child { color: var(--c-green); }

/* ===== subscribe panel — repositioned into the sidebar, above the metadata ===== */
.al-side .subscribe-panel { margin: 0 0 16px; background: var(--accent-wash); border: 1.5px solid var(--accent); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 16px 16px 18px; }
.al-side .subscribe-panel .sp-head { margin-bottom: 12px; }
.al-side .subscribe-panel .sp-kicker { color: var(--accent-ink); }
/* finer, white "like the metadata card", centred logos */
.al-side .subscribe-panel.fine { background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); border-radius: var(--r-lg); padding: 13px 14px 15px; text-align: center; }
.al-side .subscribe-panel.fine .sp-kicker { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.al-side .subscribe-panel.fine .sub-logos { justify-content: center; gap: 12px; }
.sub-logos { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-edit-card .sub-pick { font-size: 12.5px; }

/* ===== private content badge ===== */
.priv-chip { border-color: var(--c-violet) !important; color: var(--c-violet) !important; font-weight: 700; }
/* private indicator on a thumbnail cover — bottom-right, discreet black pill */
.thumb-priv { position: absolute; right: 8px; bottom: 8px; z-index: 3; display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(20,18,15,.86); padding: 3px 8px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }

/* ===== section-type picker (SectionModal) ===== */
.sectype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.sectype-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.sectype-card:hover { transform: translateY(-2px); }
.sectype-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash); }
.sectype-card .st-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-wash); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.sectype-card.on .st-ic { background: var(--accent); color: #fff; }
.sectype-card .st-l { font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.sectype-card .st-b { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 560px) { .sectype-grid { grid-template-columns: 1fr; } }

/* ===== media picker ===== */
.mp-tabs { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1.5px solid var(--line); }
.mp-filters { background: var(--paper-2); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; }
.mp-grid { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.mp-asset { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; transition: border-color .12s, transform .12s; }
.mp-asset:hover { border-color: var(--accent); transform: translateX(3px); }
.mp-asset-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-wash); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.mp-asset-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mp-asset-label { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.mp-asset-key { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-asset-loc { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent-ink); background: var(--accent-wash); border-radius: 999px; padding: 2px 7px; flex: none; }
.mp-asset-flag { font-family: var(--font-mono); font-size: 10px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 7px; flex: none; }
.mp-asset-flag.ok { color: var(--c-green); border-color: color-mix(in srgb, var(--c-green) 50%, var(--line)); }

/* ===== inline linked-asset reference ===== */
.asset-ref { display: inline-flex; align-items: center; gap: 8px; padding: 5px 7px 5px 8px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper-2); max-width: 100%; }
.asset-ref .ar-ic { color: var(--accent-ink); flex: none; }
.asset-ref .ar-body { display: flex; flex-direction: column; min-width: 0; }
.asset-ref .ar-label { font-size: 12.5px; font-weight: 700; font-family: var(--font-display); line-height: 1.1; }
.asset-ref .ar-key { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ===== image gallery (IMAGE_GALLERY) ===== */
.gallery-wrap { width: 100%; }
.gallery { border: 1.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.gallery-stage { position: relative; aspect-ratio: 16/10; background: var(--paper-2); }
.gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--ink); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .12s; }
.gallery-nav:hover { transform: translateY(-50%) scale(1.08); }
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
.gallery-auto { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: #fff; background: rgba(33,30,26,.62); border-radius: 999px; padding: 3px 9px; }
.gallery-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.gallery-cap { font-size: 13.5px; color: var(--ink-soft); }
.gallery-count { font-size: 12px; color: var(--muted); flex: none; }
.gallery-dots { display: flex; gap: 6px; justify-content: center; padding: 0 0 14px; }
.gdot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--line-strong); cursor: pointer; padding: 0; transition: transform .12s, background .12s; }
.gdot.on { background: var(--accent); transform: scale(1.25); }
.gallery-edit-row { display: flex; gap: 12px; flex: 1; min-width: 0; }
.about-gallery .gallery { max-width: 100%; }

/* ===== document library (DOCUMENT_LIBRARY) ===== */
.doclib { display: flex; flex-direction: column; gap: 10px; }
.doc-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .12s, transform .12s; }
.doc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.doc-card-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-wash); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.doc-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.doc-card-label { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.doc-card-meta { font-size: 11px; color: var(--muted); }
.doc-card-open { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent-ink); flex: none; }

/* ===== audio album (AUDIO_LIBRARY) ===== */
.audio-album { border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.aa-now { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--accent-wash); border-bottom: 1.5px solid var(--line); }
.aa-now-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.aa-now-body { flex: 1; min-width: 0; }
.aa-now-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.aa-loc { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent-ink); background: #fff; border: 1px solid var(--accent); border-radius: 999px; padding: 1px 7px; }
.aa-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.aa-track { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s; }
.aa-track:hover { background: var(--paper-2); }
.aa-track.on { background: var(--accent-wash); }
.aa-num { font-size: 12px; color: var(--muted); flex: none; }
.aa-t { flex: 1; font-weight: 600; font-size: 14.5px; }
.aa-track .aa-play { color: var(--accent-ink); flex: none; }

/* faux waveform (asset with no playable file in this demo) */
.faux-wave { display: flex; align-items: flex-end; gap: 2px; height: 46px; position: relative; padding-right: 110px; }
.faux-wave > span { flex: 1; background: color-mix(in srgb, var(--accent) 45%, #fff); border-radius: 2px 2px 0 0; min-width: 2px; }
.fw-demo { position: absolute; right: 0; bottom: 0; font-size: 10px; color: var(--muted); }

/* alt-media inline audio player (when a real asset file is linked) */
.am-audio { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); }
.am-audio .am-audio-l { font-family: var(--font-display); font-weight: 700; font-size: 13px; flex: none; }
.am-audio .audio-player { flex: 1; }

/* inline subscribe/follow reader-preview inside the editor sidebar */
.sub-preview { margin-top: 4px; padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: var(--paper-2); }
.sub-preview .sub-logos { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== v13 — validated status, publisher & tester modes, publish popup ===== */
/* mode banners */
.edit-banner.is-publish { background: linear-gradient(180deg, rgba(192,57,138,.98), rgba(192,57,138,.92)); border-bottom-color: #8c2566; color: #fff; }
.edit-banner.is-tester { background: linear-gradient(180deg, rgba(14,154,167,.98), rgba(14,154,167,.92)); border-bottom-color: #0a6f78; color: #06262a; }
.edit-banner.is-publish .warn-ico, .edit-banner.is-tester .warn-ico { background: rgba(0,0,0,.28); color: #fff; }
.edit-banner.is-publish .eb-btn, .edit-banner.is-tester .eb-btn { border-color: rgba(0,0,0,.4); }
.edit-banner.is-publish .eb-btn:hover, .edit-banner.is-tester .eb-btn:hover { box-shadow: 2.5px 2.5px 0 rgba(0,0,0,.4); }
.edit-banner.is-publish .eb-btn.exit, .edit-banner.is-tester .eb-btn.exit { background: rgba(0,0,0,.32); color: #fff; border-color: transparent; }
.edit-banner.is-publish .eb-role .rolebadge, .edit-banner.is-tester .eb-role .rolebadge { background: rgba(0,0,0,.3); border-color: transparent; color: #fff; }
.edit-banner.is-publish .eb-role .rolebadge .rb-dot, .edit-banner.is-tester .eb-role .rolebadge .rb-dot { background: #fff; }

/* validated workflow colour on the per-language + status badges (driven by --wf inline) */
.pub-badge.wf-validated { background: #2f6bdb; color: #fff; }

/* publish popup */
.pub-modal { display: flex; flex-direction: column; gap: 4px; }
.pub-piece { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0 14px; border-bottom: 1.5px dashed var(--line); margin-bottom: 14px; }
.pub-ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.pub-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.2; }
.pub-warn { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: var(--r-md); background: var(--c-violet-wash, #f0eafd); border: 1.5px solid var(--c-violet); color: var(--c-violet); font-size: 13.5px; font-weight: 600; }
.pub-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pub-opt { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--card); cursor: pointer; }
.pub-opt:hover { border-color: var(--ink); }
.pub-opt.on { border-color: var(--c-green); background: color-mix(in srgb, var(--c-green) 8%, #fff); box-shadow: 2px 2px 0 var(--c-green); }
.pub-opt .po-top { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.pub-opt .po-top .rb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pub-opt.on .po-top .rb-dot { background: var(--c-green); }
.pub-opt .po-sub { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

/* window-3 (dark footer): keep the Sign in button white (a solid white pill, dark text) */
.topbar.on-dark .id-signin { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 3px 3px 0 rgba(255,255,255,.35); }
.topbar.on-dark .id-signin:hover { box-shadow: 4px 4px 0 rgba(255,255,255,.5); }

/* ============================================================
   v6 — access picker (Manage roles · dynamic-tag selectors)
   ============================================================ */
.access-sys { display: flex; flex-direction: column; gap: 10px; }
.access-sys.edit-sys { padding: 13px; border: 1.5px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 3%, #fff); }
.as-blurb { margin: 0 0 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }

.ap { border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--card); position: relative; }
.ap.is-open { border-color: var(--accent); box-shadow: 0 8px 26px -14px rgba(0,0,0,.4); }
.ap-head { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 13px; background: none; border: none; cursor: pointer; text-align: left; color: var(--ink); border-radius: inherit; }
.ap-head:hover { background: var(--paper-2); }
.ap-ic { display: flex; color: var(--accent); flex: none; }
.ap-t { font-family: var(--font-display); font-weight: 700; font-size: 14px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.ap-hint { font-family: var(--font-body); font-weight: 400; font-size: 11.5px; color: var(--muted); }
.ap-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ap-chev { display: flex; color: var(--muted); flex: none; }

.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 11px; }
.ap-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent-wash); border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 999px; padding: 3px 5px 3px 11px; }
.ap-chip.whole { background: var(--accent); color: #fff; border-color: var(--accent-ink); }
.ap-chip button { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: none; background: rgba(0,0,0,.08); color: inherit; cursor: pointer; flex: none; }
.ap-chip button:hover { background: rgba(0,0,0,.22); }
.ap-chip.whole button { background: rgba(255,255,255,.25); }

.ap-pop { border-top: 1.5px solid var(--line); }
.ap-search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.ap-search input { flex: 1; border: none; background: none; font-size: 13.5px; padding: 2px 0; color: var(--ink); }
.ap-search input:focus { outline: none; }
.ap-list { max-height: 248px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.ap-grp { padding-bottom: 4px; margin-bottom: 2px; border-bottom: 1px dashed var(--line); }
.ap-grp:last-child { border-bottom: none; margin-bottom: 0; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.ap-row:hover { background: var(--paper-2); }
.ap-row.parent { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.ap-row.child { padding-left: 24px; }
.ap-row.child .ap-row-l, .ap-row.flat .ap-row-l { font-size: 13px; }
.ap-row-l { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.ap-row-l > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row-tag { font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 5px; flex: none; }
.ap-row-tag.violet { color: var(--c-violet); border-color: var(--c-violet); }
.ap-box { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--card); }
.ap-box.all { background: var(--accent); border-color: var(--accent-ink); }
.ap-box.some { background: var(--accent-wash); border-color: var(--accent); }
.ap-dash { width: 9px; height: 2.5px; border-radius: 2px; background: var(--accent-ink); }
.ap-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.ap-locked-note { display: flex; align-items: center; gap: 6px; padding: 0 13px 11px; font-size: 11.5px; color: var(--c-violet); }
.ap.locked { opacity: .72; background: var(--paper-2); }
.ap.locked .ap-head { cursor: not-allowed; }

.ap-status { display: inline-flex; gap: 4px; flex: none; }
.ap-pill { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .03em; padding: 1px 5px; border-radius: 5px; border: 1px solid; white-space: nowrap; }
.ap-pill.s-none { color: var(--muted); border-color: var(--line-strong); background: var(--paper-2); }
.ap-pill.s-draft { color: #5f5b51; border-color: #cfc8ba; background: #f1efe9; }
.ap-pill.s-review { color: #b56b08; border-color: #f0d49a; background: #fdf3e3; }
.ap-pill.s-validated { color: #1f4fb0; border-color: #b9cdf3; background: #eaf0fc; }
.ap-pill.s-published { color: #137a57; border-color: #a7e0cb; background: #e3f5ee; }

/* shared-content menu: group shared pieces under their origin section (Blog → piece) */
.menu-subcap { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 12px 8px 0; }
.menu-link.shared-sub { font-size: 18px; padding: 10px 8px 10px 16px; }
