/* ============================================================================
   base.css — app shell + shared components. Screens use ONLY these classes
   (plus tokens). If a screen needs something new, add the component HERE once.
   Sections: shell · nav · typography · cards · buttons · pills · forms ·
             tables · timeline · alerts · student(kid) · misc
   ========================================================================== */
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink);
       font-family:var(--font-sans); font-size:var(--fs-base); line-height:var(--lh); }
:focus-visible { outline:3px solid var(--focus); outline-offset:2px; border-radius:6px; }
@media (prefers-reduced-motion: reduce) { * { transition:none !important; animation:none !important; } }

/* ---- shell ---- */
.topbar { display:flex; align-items:center; gap:var(--sp-3); padding:12px 18px;
          background:var(--surface); border-bottom:1px solid var(--line);
          position:sticky; top:0; z-index:10; }
.logo { width:32px; height:32px; border-radius:9px; flex:none; overflow:hidden;
        display:grid; place-items:center; }
.logo img { display:block; width:100%; height:100%; }
.topbar .ttl { font-weight:680; }
.topbar .ttl small { display:block; color:var(--faint); font-weight:400; font-size:var(--fs-xs); }
.topbar .spacer { margin-left:auto; display:flex; gap:var(--sp-2); align-items:center; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--primary-soft);
          color:var(--primary-ink); display:grid; place-items:center; font-weight:700; font-size:var(--fs-sm); }
.rolepill { align-self:center; white-space:nowrap; }
/* This has to out-specify `.pill { display:inline-flex }` 57 lines below: same specificity,
   later in the file, so for as long as it read `.rolepill` the pill never went away and the
   topbar was 136px too wide -- every screen scrolled sideways at 390px. */
@media (max-width:560px) { .topbar .rolepill { display:none; } }  /* free up topbar room on phones */
.envtag { font-size:var(--fs-xs); color:var(--faint); border:1px dashed var(--line);
          border-radius:var(--r-pill); padding:2px 9px; }

.layout { display:flex; min-height:calc(100vh - 59px); }
.rail { width:210px; flex:none; border-right:1px solid var(--line); background:var(--raise); padding:12px 10px; }
.rail a { display:flex; align-items:center; gap:10px; padding:11px 12px; margin-bottom:2px;
          border-radius:var(--r-sm); color:var(--muted); text-decoration:none;
          min-height:var(--touch-min); }
.rail a.on { background:var(--primary-soft); color:var(--primary-ink); font-weight:640; }
.rail a:hover { background:var(--surface); }
main.view { flex:1; padding:22px 26px; min-width:0; }
@media (max-width: 760px) { .rail { display:none; } main.view { padding:16px; } }

/* ---- typography ---- */
h1.page { margin:0 0 4px; font-size:var(--fs-xl); letter-spacing:-.01em; }
p.lead { color:var(--muted); margin:0 0 18px; font-size:var(--fs-sm); }
.panel-h { display:flex; align-items:center; gap:8px; margin:0 0 10px;
           font-size:var(--fs-xs); text-transform:uppercase; letter-spacing:.06em;
           color:var(--faint); font-weight:600; }
.note { font-size:var(--fs-xs); color:var(--faint); font-style:italic; margin-top:14px; }

/* ---- layout helpers ---- */
.row { display:flex; gap:var(--sp-4); flex-wrap:wrap; }
.col { flex:1; min-width:0; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:var(--sp-3); }

/* ---- cards ---- */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
        padding:var(--sp-4); box-shadow:var(--shadow); }
.card.click { cursor:pointer; display:block; color:inherit; text-decoration:none;
              transition:border-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
/* hover-lift only on real pointers — touch fires a phantom hover on tap and the card sticks up */
@media (hover:hover) and (pointer:fine) {
  .card.click:hover { border-color:var(--primary); transform:translateY(-1px); }
}
.card.click:active { transform:scale(0.99); }   /* press feedback for the whole tap target */
.card .nm { font-weight:670; }
.card .mt { font-size:var(--fs-xs); color:var(--faint); margin-top:2px; }

/* ---- buttons ---- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px;
       border:1px solid var(--primary); background:var(--primary); color:var(--btn-fg);
       border-radius:var(--r-sm); padding:9px 16px; font-weight:600; font-size:var(--fs-sm);
       cursor:pointer; min-height:var(--touch-min); text-decoration:none; font-family:inherit;
       transition:transform var(--dur-press) var(--ease-out),
                  background-color var(--dur-fast) ease, border-color var(--dur-fast) ease; }
/* press feedback: the interface confirms it heard the tap. Subtle (0.97), instant, universal. */
.btn:active { transform:scale(0.97); }
.btn.ghost { background:var(--surface); color:var(--primary-ink); border-color:var(--line); }
.btn.good  { background:var(--success); border-color:var(--success); }
.btn.warn  { background:var(--attention); border-color:var(--attention); }
.btn.sm    { padding:6px 12px; min-height:36px; font-size:var(--fs-xs); }
.backlink  { background:none; border:0; color:var(--primary-ink); cursor:pointer;
             font-size:var(--fs-sm); padding:0; margin-bottom:10px; display:inline-block; text-decoration:none; }

/* ---- pills / status ---- */
.pill { display:inline-flex; align-items:center; gap:5px; font-size:var(--fs-xs);
        padding:3px 10px; border-radius:var(--r-pill); font-weight:600; }
.pill.ok   { background:var(--success-soft);   color:var(--success-ink); }
.pill.warn { background:var(--attention-soft); color:var(--attention-ink); }
.pill.info { background:var(--primary-soft);   color:var(--primary-ink); }
.pill.prov { background:var(--raise); color:var(--muted); border:1px dashed var(--line); }
.tag { display:inline-block; font-size:var(--fs-xs); padding:2px 9px; border-radius:var(--r-pill);
       background:var(--primary-soft); color:var(--primary-ink); font-weight:600; }

/* ---- forms ---- */
.field { display:block; margin-bottom:var(--sp-3); }
.field span { display:block; font-size:var(--fs-xs); color:var(--muted); margin-bottom:4px; }
input[type=text], input[type=search], textarea, select {
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r-sm);
  background:var(--surface); color:var(--ink); font:inherit; min-height:var(--touch-min); }
textarea { min-height:80px; resize:vertical; }
.check { display:flex; gap:8px; align-items:center; font-size:var(--fs-sm); color:var(--muted);
         min-height:var(--touch-min); }
.check input { width:20px; height:20px; accent-color:var(--success); }
/* roster / audit search bar — input grows, controls sit inline; wraps on narrow screens */
.searchbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:0 0 12px; }
.searchbar input[type=search] { flex:1 1 220px; width:auto; }
.searchbar select { flex:0 1 240px; width:auto; }
.mono { font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace; font-size:var(--fs-xs);
        color:var(--muted); word-break:break-word; }

/* ---- tables ---- */
.tblwrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-md); background:var(--surface); }
table.tbl { border-collapse:collapse; width:100%; font-size:var(--fs-sm); }
.tbl th, .tbl td { text-align:left; padding:11px 14px; border-bottom:1px solid var(--line); }
.tbl th { font-size:var(--fs-xs); text-transform:uppercase; letter-spacing:.05em;
          color:var(--faint); background:var(--raise); }
.tbl tr:last-child td { border-bottom:0; }

/* ---- portfolio timeline ---- */
.tl { border-left:2px solid var(--line); margin-left:8px; padding-left:18px; }
.ev { position:relative; margin-bottom:14px; }
.ev::before { content:""; position:absolute; left:-25px; top:5px; width:12px; height:12px;
              border-radius:50%; background:var(--primary); border:2px solid var(--surface); }
.ev.video::before { background:var(--attention); }
.ev.note::before, .ev.observation::before { background:var(--success); }
.ev .meta { font-size:var(--fs-xs); color:var(--faint); }
.ev .body { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-sm);
            padding:11px 14px; margin-top:4px; }

/* ---- alerts & AI suggestion ---- */
.alertbox { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; margin-bottom:10px;
            border:1px solid var(--line); border-left:4px solid var(--attention);
            border-radius:var(--r-sm); background:var(--attention-soft);
            color:inherit; text-decoration:none; }
.ai { border:1px solid var(--primary); border-radius:var(--r-md); background:var(--primary-soft);
      padding:var(--sp-4); }
.ai .lab { font-size:var(--fs-xs); text-transform:uppercase; letter-spacing:.06em;
           color:var(--primary-ink); font-weight:700; display:flex; gap:6px; align-items:center; }
.ai .txt { margin:8px 0; }
.ai .why { font-size:var(--fs-xs); color:var(--muted); border-top:1px dashed var(--line); padding-top:8px; }
.ai .acts { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

/* ---- student (kid) surface — bigger, warmer, zero clinical chrome ---- */
.kid { background:linear-gradient(160deg, var(--primary-soft), var(--raise));
       border-radius:var(--r-lg); padding:26px; }
.kid h1 { font-size:30px; margin:0 0 4px; }
.kidgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr));
           gap:var(--sp-4); margin-top:var(--sp-4); }
.kidcard { background:var(--surface); border-radius:var(--r-lg); padding:20px; text-align:center;
           box-shadow:var(--shadow); border:0; font-family:inherit; font-size:inherit; }
.kidcard .emoji { font-size:2.4rem; display:block; }
.kidcard .thumb { width:100%; max-height:150px; object-fit:cover; border-radius:var(--r-md); display:block; }
.kidcard .cap { font-weight:700; margin-top:6px; }
.stickers { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.sticker { width:54px; height:54px; border-radius:50%; background:var(--success-soft);
           display:grid; place-items:center; font-size:1.5rem; }
.kidcount { display:inline-flex; align-items:baseline; gap:12px; margin-top:14px;
            background:var(--surface); border-radius:var(--r-lg); padding:16px 24px; box-shadow:var(--shadow); }
.kidcount .big { font-size:3rem; font-weight:800; color:var(--primary); line-height:1;
                 font-variant-numeric:tabular-nums; }
.kidcount .cap { font-size:1.1rem; font-weight:700; }

/* ---- misc ---- */
.switchform { display:inline; }
.flagrow { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.flagrow:last-child { border-bottom:0; }
.flagrow .ds { font-size:var(--fs-xs); color:var(--muted); }
.thumb { height:110px; border-radius:var(--r-sm); background:linear-gradient(135deg, var(--primary-soft), var(--attention-soft));
         display:grid; place-items:center; color:var(--primary-ink); font-size:1.6rem; margin-bottom:8px; }

/* ---- language switcher + theme toggle (topbar) ---- */
.langs { display:flex; gap:2px; border:1px solid var(--line); border-radius:var(--r-pill);
         padding:2px; background:var(--raise); }
.langs button { border:0; background:none; color:var(--muted); font:inherit; font-size:var(--fs-xs);
                padding:5px 10px; border-radius:var(--r-pill); cursor:pointer; min-height:30px; }
.langs button.on { background:var(--surface); color:var(--primary-ink); font-weight:650;
                   box-shadow:var(--shadow); }
.themebtn { width:36px; height:36px; border-radius:50%; border:1px solid var(--line);
            background:var(--surface); cursor:pointer; font-size:15px; line-height:1; }

/* ---- mobile: bottom navigation (rail hides <760px) ---- */
.bottomnav { display:none; }
@media (max-width: 760px) {
  .bottomnav { display:flex; position:fixed; bottom:0; left:0; right:0; z-index:20;
               background:var(--surface); border-top:1px solid var(--line);
               padding:4px 8px calc(4px + env(safe-area-inset-bottom)); justify-content:space-around; }
  .bottomnav a { display:flex; flex-direction:column; align-items:center; gap:1px;
                 padding:6px 10px; min-height:var(--touch-min); min-width:64px;
                 color:var(--muted); text-decoration:none; font-size:var(--fs-xs); border-radius:var(--r-sm); }
  .bottomnav a.on { color:var(--primary-ink); background:var(--primary-soft); font-weight:650; }
  .bottomnav a .ic { font-size:20px; }
  main.view { padding-bottom:84px; }   /* keep content clear of the bar */
  .topbar .ttl small { display:none; } /* tighter topbar on phones */
  .topbar .ttl { font-size:var(--fs-sm); max-width:110px; white-space:nowrap;
                 overflow:hidden; text-overflow:ellipsis; } /* long trilingual titles stay one line */
  h1.page { font-size:22px; }
}

/* ---- evidence media (photos / clips) ---- */
.evmedia { display:block; max-width:100%; max-height:260px; border-radius:var(--r-sm);
           margin-bottom:8px; background:var(--raise); }
.recbox { border:1px dashed var(--line); border-radius:var(--r-sm); padding:12px; margin:0 0 var(--sp-3); }
.recbox #recpreview { max-height:180px; width:100%; min-height:60px; }

/* ---- consent select (admin) ---- */
.consentform { display:flex; gap:6px; align-items:center; }
.consentform select { min-height:36px; padding:4px 8px; width:auto; }

/* ---- report sheet + print (v0.7 presentation-grade) ---- */
.report-sheet { max-width:720px; }
.report-body { white-space:pre-wrap; line-height:1.7; }
.letterhead { display:flex; align-items:center; gap:12px; padding-bottom:12px;
              border-bottom:2px solid var(--primary); }
.letterhead .lh-mark { width:40px; height:40px; border-radius:9px; background:var(--primary);
              color:#fff; display:grid; place-items:center; font-size:1.4rem; font-weight:700; }
.letterhead .lh-name { font-weight:720; color:var(--primary-ink); }
.letterhead .lh-tag { font-size:var(--fs-xs); color:var(--muted); }
.report-meta { display:flex; flex-wrap:wrap; gap:6px 16px; margin:4px 0 14px;
               font-size:var(--fs-sm); color:var(--muted); }
.report-summary { font-size:var(--fs-lg); line-height:1.5; font-weight:600; color:var(--ink);
                  border-left:3px solid var(--primary); padding-left:12px; margin:0 0 14px; }
.report-evidence { margin-top:18px; padding-top:12px; border-top:1px solid var(--line); }
.cites { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.cites li { display:flex; flex-wrap:wrap; gap:8px; align-items:baseline; font-size:var(--fs-sm); }
.cites .cd { color:var(--faint); font-variant-numeric:tabular-nums; min-width:44px; }
.cites .ct { color:var(--ink); }
.prov-foot { margin-top:18px; padding-top:12px; border-top:1px solid var(--line); }
/* ---- the demo story: landing = Step 1 (choose the look) → login = Step 2 (choose the role) ---- */
.eyebrow { font-size:var(--fs-xs); font-weight:750; letter-spacing:.1em; text-transform:uppercase;
    color:var(--primary); margin:2px 0 6px; }
.verspicker { display:grid; grid-template-columns:repeat(auto-fit, minmax(215px, 1fr)); gap:14px;
    margin-top:18px; max-width:1220px; }
.verscard { --vh:216; display:flex; flex-direction:column; gap:8px; background:var(--surface);
    border:1px solid var(--line); border-radius:var(--r-lg); padding:18px; text-decoration:none;
    color:inherit; box-shadow:var(--shadow);
    transition:transform var(--dur-press) var(--ease-out), border-color var(--dur-fast) ease,
               box-shadow var(--dur-fast) ease; }
@media (hover:hover) and (pointer:fine) {
  .verscard:hover { transform:translateY(-2px); border-color:hsl(var(--vh),45%,62%);
      box-shadow:0 4px 10px rgba(60,50,30,.08), 0 14px 34px rgba(60,50,30,.10); }
}
.verscard:active { transform:scale(.985); }
.verscard.primary { border-color:hsl(var(--vh),45%,58%); border-width:2px; }
.vswatch { height:52px; border-radius:var(--r-md);
    background:linear-gradient(130deg, hsl(var(--vh),62%,88%), hsl(var(--vh),55%,64%)); }
.vname { font-weight:750; font-size:var(--fs-base); }
.vfeel { font-size:var(--fs-xs); color:var(--muted); line-height:1.4; min-height:2.6em; }
.vgo { font-size:var(--fs-sm); font-weight:700; color:var(--primary-ink); }

/* ---- the journal grammar (research: Seesaw/Tapestry/Storypark) ----
   Child avatars (deterministic pastel initials — privacy + warmth), the media-first evidence
   card as the hero component, status chips, and a welcoming capture affordance. ---- */
.stavatar { --av:210; width:44px; height:44px; flex:none; border-radius:50%;
    background:hsl(var(--av), 68%, 87%); color:hsl(var(--av), 45%, 28%);
    display:grid; place-items:center; font-weight:750; font-size:17px;
    border:2px solid #fff; box-shadow:0 1px 3px rgba(60,50,30,.12); }
.stavatar.lg { width:64px; height:64px; font-size:24px; }
.stavatar.sm { width:30px; height:30px; font-size:12px; border-width:1.5px; }
.stucard { display:flex; align-items:center; gap:14px; }
.stucard .who { display:flex; flex-direction:column; gap:3px; min-width:0; }
.stucard .nm { font-size:var(--fs-base); }

/* portfolio identity header — the child, front and centre */
.childhead { display:flex; align-items:center; gap:16px; background:var(--surface);
    border:1px solid var(--line); border-radius:var(--r-lg); padding:16px 20px; margin-bottom:14px;
    box-shadow:var(--shadow); }
.childhead .meta { display:flex; flex-direction:column; gap:6px; min-width:0; }
.childhead h1.page { margin:0; font-size:24px; }
.childhead .chips { display:flex; gap:6px; flex-wrap:wrap; }

/* the evidence card — media first, then words, then provenance/status chips */
.evcard { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
    box-shadow:var(--shadow); overflow:hidden; margin-bottom:14px; }
.evcard .evmedia { width:100%; max-height:340px; object-fit:cover; display:block; border-radius:0; margin:0; }
.evcard .evbody { padding:14px 18px 8px; font-size:var(--fs-base); line-height:1.55; }
.evcard .evfoot { display:flex; align-items:center; gap:8px; flex-wrap:wrap;
    padding:8px 18px 14px; }
.evcard .evwhen { font-size:var(--fs-xs); color:var(--faint); margin-right:auto;
    font-variant-numeric:tabular-nums; }
.statuschip { display:inline-flex; align-items:center; gap:5px; font-size:var(--fs-xs);
    font-weight:650; border-radius:var(--r-pill); padding:3px 10px; }
.statuschip.fam { background:var(--success-soft); color:var(--success-ink); }
.statuschip.child { background:var(--primary-soft); color:var(--primary-ink); }
.statuschip.priv { background:var(--raise); color:var(--faint); }

/* the capture affordance — a welcoming card, not a buried form */
.composer { border:2px dashed var(--line); background:var(--surface); border-radius:var(--r-lg);
    padding:18px 20px; margin-top:14px; transition:border-color var(--dur-fast) ease; }
.composer:focus-within { border-color:var(--primary); border-style:solid; }
.composer .panel-h { margin-top:0; }

/* ---- shell variants (Style Lab structural layouts, demo-switchable) ----
   canvas = the default rail layout below. console = enterprise sidebar + utility bar, denser.
   studio = horizontal top-nav + centred reading column. Same screens, different architecture. */
.shell-console .sidebar { width:248px; flex:none; background:var(--raise); border-right:1px solid var(--line);
    display:flex; flex-direction:column; padding:14px 10px; }
.sb-label { font-size:var(--fs-xs); color:var(--faint); text-transform:uppercase;
    letter-spacing:.08em; font-weight:700; padding:4px 10px 8px; }
.sb-nav a { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:var(--r-sm);
    color:var(--muted); text-decoration:none; font-weight:600; font-size:var(--fs-sm); margin-bottom:2px;
    transition:background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.sb-nav a:hover { background:var(--surface); color:var(--ink); }
.sb-nav a.on { background:var(--surface); color:var(--primary-ink);
    box-shadow:inset 3px 0 0 var(--primary), var(--shadow); }
.sb-user { margin-top:auto; display:flex; gap:10px; align-items:center; padding:10px;
    border-top:1px solid var(--line); }
.sb-who { display:flex; flex-direction:column; line-height:1.25; font-size:var(--fs-xs); }
.sb-who b { font-size:var(--fs-sm); color:var(--ink); }
.sb-who span { color:var(--faint); }
.console-main { flex:1; display:flex; flex-direction:column; min-width:0; }
.consolebar { display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:7px 22px; border-bottom:1px solid var(--line); background:var(--surface);
    font-size:var(--fs-xs); color:var(--muted); }
.buildbadge { font-variant-numeric:tabular-nums; border:1px solid var(--line);
    border-radius:var(--r-pill); padding:2px 10px; color:var(--faint); background:var(--raise); }
.shell-console .view { padding:20px 22px; }               /* denser working surface */
.shell-console .card, .shell-console .panel { border-radius:var(--r-sm); }
.shell-console h1.page { font-size:22px; }
@media (max-width:760px){ .shell-console .sidebar { display:none; } }

.topnav { display:flex; gap:4px; align-items:center; padding:0 22px; background:var(--surface);
    border-bottom:1px solid var(--line); overflow-x:auto; }
.topnav a { display:flex; align-items:center; gap:8px; padding:12px 14px; color:var(--muted);
    text-decoration:none; font-weight:600; font-size:var(--fs-sm); white-space:nowrap;
    border-bottom:2px solid transparent; }
.topnav a:hover { color:var(--ink); }
.topnav a.on { color:var(--primary-ink); border-bottom-color:var(--primary); }
.shell-studio { display:block; }
.view.studio { max-width:1080px; margin:0 auto; padding:30px 26px 60px; }
@media (max-width:760px){ .topnav { display:none; } }      /* mobile keeps the bottom nav */

/* ---- v0.7 layman front-door: demo banner · intro · guide steps · legends ---- */
.demobar { display:flex; gap:14px; align-items:center; justify-content:center; flex-wrap:wrap;
           background:var(--attention-soft); color:var(--attention-ink); font-size:var(--fs-xs);
           padding:5px 14px; border-bottom:1px solid var(--line); }
.demobar a { color:var(--primary-ink); font-weight:600; }
.intro .whatlist { list-style:none; margin:10px 0 14px; padding:0; display:grid;
                   grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:6px 18px; }
.intro .whatlist li { font-size:var(--fs-sm); }
.rolegroup { font-size:var(--fs-sm); color:var(--faint); text-transform:uppercase; letter-spacing:.04em;
             margin:16px 0 8px; font-weight:700; }
.rolelegend, .steps { list-style:none; margin:0; padding:0; }
.rolelegend li { padding:6px 0; border-bottom:1px solid var(--line); font-size:var(--fs-sm); line-height:1.5; }
.rolelegend li:last-child { border-bottom:0; }
.steps { counter-reset:step; display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.step { display:flex; gap:14px; align-items:flex-start; background:var(--surface); border:1px solid var(--line);
        border-radius:var(--r-md); padding:14px 16px; box-shadow:var(--shadow); }
.step-n { width:28px; height:28px; flex:0 0 28px; border-radius:50%; background:var(--primary); color:#fff;
          display:grid; place-items:center; font-weight:700; font-size:var(--fs-sm); }
.step-ic { font-size:1.5rem; line-height:1.4; }
.step-title { font-weight:680; }
.step-text { color:var(--muted); font-size:var(--fs-sm); margin-top:2px; }
/* collapsible "about this assistant" limits — CSP-safe native details/summary, no JS */
.help { margin-top:14px; }
.help > summary { cursor:pointer; font-size:var(--fs-sm); color:var(--primary-ink); font-weight:600; }
.help .limits { margin:8px 0 0; padding-left:18px; font-size:var(--fs-xs); color:var(--muted); line-height:1.7; }
@media print {
  .topbar, .rail, .bottomnav, .noprint, .backlink { display:none !important; }
  body { background:#fff; }
  .report-sheet { border:0; box-shadow:none; max-width:100%; padding:0; }
  main.view { padding:0; }
  @page { margin:16mm; }
  .report-evidence, .prov-foot, .report-summary { page-break-inside:avoid; }
  .letterhead .lh-mark { -webkit-print-color-adjust:exact; print-color-adjust:exact; }  /* keep the seal */
}

/* ---- review-fix utilities (2026-07-15 adversarial review) ---- */
.errcard { max-width:520px; margin:40px auto; text-align:center; }
.errcard .glyph { font-size:2.6rem; margin:0; }
.stat { font-size:2rem; font-weight:700; margin:0; }
.flagrow.bare { border:0; padding:0; }
.report-edit textarea { min-height:280px; }
.consentform select { min-height:var(--touch-min); }   /* WCAG 2.5.8 — overrides the 36px above */

/* ---- insight review (G2) ---- */
.sigrow { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.sigrow:last-child { border-bottom:0; }
.signame { flex:0 0 40%; font-size:var(--fs-sm); }
.sigbar { flex:1; height:10px; background:var(--raise); border:1px solid var(--line);
          border-radius:var(--r-pill); overflow:hidden; }
.sigfill { display:block; height:100%; background:var(--primary); border-radius:var(--r-pill); }
.sigval { flex:none; font-size:var(--fs-xs); color:var(--muted); min-width:36px; text-align:right; }

/* ============================================================================
   DATA VIZ + PROFESSIONAL POLISH (v0.6) — self-contained, themed, CSP-safe.
   The visual language for real information: stat cards · bars · donut · spark ·
   ring · section panels · progress notices. Muted + warm; taste over flash.
   ========================================================================== */

/* section header with a title + optional action, above a group of cards */
.sec { display:flex; align-items:baseline; justify-content:space-between; gap:12px;
       margin:22px 0 12px; }
.sec:first-of-type { margin-top:6px; }
.sec h2 { font-size:var(--fs-lg); font-weight:680; letter-spacing:-.01em; margin:0; }
.sec .hint { font-size:var(--fs-xs); color:var(--faint); }

/* stat cards */
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(158px,1fr)); gap:var(--sp-3);
         margin:0 0 6px; }
.statcard { position:relative; background:var(--surface); border:1px solid var(--line);
            border-radius:var(--r-md); padding:16px 18px; box-shadow:var(--shadow);
            display:flex; flex-direction:column; gap:1px; overflow:hidden; }
.statcard::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--line); }
.statcard.accent::before { background:var(--primary); }
.statcard.good::before   { background:var(--success); }
.statcard.warn::before   { background:var(--attention); }
.statcard .k { font-size:30px; font-weight:720; letter-spacing:-.025em; line-height:1.1;
               color:var(--ink); font-variant-numeric:tabular-nums; }
.statcard .l { font-size:var(--fs-xs); color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.statcard .sub { font-size:var(--fs-xs); color:var(--faint); margin-top:3px; }
.statcard .ic { position:absolute; top:13px; right:15px; font-size:1.15rem; opacity:.55; }

/* horizontal bar chart */
.bars { display:flex; flex-direction:column; gap:11px; }
.barrow { display:grid; grid-template-columns:minmax(72px,32%) 1fr auto; gap:12px; align-items:center; }
.barrow .bl { color:var(--muted); font-size:var(--fs-sm); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bartrack { background:var(--raise); border-radius:var(--r-pill); height:10px; overflow:hidden; }
.barfill { display:block; height:100%; border-radius:var(--r-pill); background:var(--primary);
           min-width:3px; transition:width var(--dur-base) var(--ease-out);
           transform-origin:left center; animation:growbar var(--dur-panel) var(--ease-out) both; }
/* the bar grows from the left on load — you SEE the magnitude fill (comprehension, not decoration).
   scaleX keeps the inline width intact and runs on the GPU; disabled by the reduced-motion reset. */
@keyframes growbar { from { transform:scaleX(0); } to { transform:scaleX(1); } }
.barfill.good { background:var(--success); }
.barfill.warn { background:var(--attention); }
.barfill.mut  { background:var(--faint); }
.barrow .bv { font-variant-numeric:tabular-nums; font-weight:640; font-size:var(--fs-sm); color:var(--ink); }

/* donut + legend */
.donutwrap { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.donut .ctr { fill:var(--ink); font-weight:720; }
.donut .ctrl { fill:var(--faint); text-transform:uppercase; letter-spacing:.05em; }
.legend { display:flex; flex-direction:column; gap:7px; font-size:var(--fs-sm); }
.legend .li { display:flex; align-items:center; gap:9px; color:var(--muted); }
.legend .li b { color:var(--ink); font-variant-numeric:tabular-nums; }
.legend .sw { width:12px; height:12px; border-radius:3px; flex:0 0 auto; }

/* sparkline */
.spark { display:block; width:100%; height:auto; }
.sparkfill { fill:var(--primary-soft); opacity:.7; }
.sparkline { stroke:var(--primary); stroke-width:2; fill:none; stroke-linejoin:round; stroke-linecap:round; }
.sparkdot { fill:var(--primary); }

/* progress ring */
.ringwrap { display:flex; flex-direction:column; align-items:center; gap:6px; }
.ring .track { stroke:var(--raise); }
.ring .val { stroke:var(--success); stroke-linecap:round; transition:stroke-dasharray var(--dur-panel) var(--ease-out); }
.ring .num { fill:var(--ink); font-weight:720; font-variant-numeric:tabular-nums; }
.rlabel { font-size:var(--fs-xs); color:var(--muted); }

/* professional progress notice — what's happening + why (calm, informative) */
.notice { display:flex; gap:11px; align-items:flex-start; background:var(--primary-soft);
          border:1px solid var(--line); border-left:3px solid var(--primary);
          border-radius:var(--r-sm); padding:11px 14px; margin:0 0 14px; font-size:var(--fs-sm); }
.notice .nt { font-weight:640; color:var(--ink); }
.notice .nd { color:var(--muted); font-size:var(--fs-xs); margin-top:2px; }
.notice .ni { font-size:1.1rem; line-height:1.3; }
.notice.live { border-left-color:var(--success); background:var(--success-soft); }
.notice.prov { border-left-color:var(--attention); background:var(--attention-soft); }
/* soft pulsing dot for "live/processing" */
.livedot { width:8px; height:8px; border-radius:50%; background:var(--success); display:inline-block;
           box-shadow:0 0 0 0 var(--success); animation:pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(63,125,92,.4)} 70%{box-shadow:0 0 0 6px rgba(63,125,92,0)} 100%{box-shadow:0 0 0 0 rgba(63,125,92,0)} }
@media (prefers-reduced-motion: reduce) { .livedot { animation:none; } .barfill,.ring .val { transition:none; } }

/* AI-assisted provenance chip — always say what the model did + that a human approved */
.prov-chip { display:inline-flex; align-items:center; gap:5px; font-size:var(--fs-xs);
             color:var(--muted); background:var(--raise); border:1px solid var(--line);
             border-radius:var(--r-pill); padding:3px 9px; }

/* transient save toast (shown by theme.js when ?saved= is present) */
.toast { position:fixed; left:50%; bottom:22px; transform:translateX(-50%) translateY(8px);
         background:var(--ink); color:var(--bg); padding:10px 18px; border-radius:var(--r-pill);
         box-shadow:var(--shadow); font-size:var(--fs-sm); opacity:0; pointer-events:none;
         transition:opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); z-index:50; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* mini progress meter used in roster rows (evidence coverage) */
.meter { display:inline-block; width:64px; height:6px; background:var(--raise);
         border-radius:var(--r-pill); overflow:hidden; vertical-align:middle; }
.meter > span { display:block; height:100%; background:var(--success); border-radius:var(--r-pill); }

@media (max-width: 560px) { .statcard .k { font-size:26px; } .donutwrap { gap:14px; } }

/* ============ v0.8 · the CARD GRAMMAR (audit: "identity without state") ============
   Every information group is a card that states its own contents:
   .card-h  title row  ·  .card-n  count badge  ·  .card-b  body  ·  .card-a  ONE action
   .card-empty names the MISSING thing + the same one action (never a bare "no data"). */
.card-h { display:flex; align-items:center; gap:8px; margin:0 0 10px; }
.card-h .panel-h { margin:0; flex:1; }
.card-n { min-width:26px; height:22px; padding:0 8px; display:inline-grid; place-items:center;
          border-radius:var(--r-pill); background:var(--raise); color:var(--muted);
          font-size:var(--fs-xs); font-weight:700; font-variant-numeric:tabular-nums; }
.card-n.hot { background:var(--attention-soft); color:var(--attention-ink); }
.card-b { min-width:0; }
.card-a { margin-top:10px; }
.card-empty { display:flex; flex-direction:column; gap:8px; align-items:flex-start;
              padding:14px; border:1.5px dashed var(--line); border-radius:var(--r-md);
              background:var(--raise); }
.card-empty .what { color:var(--ink); font-weight:600; }
.card-empty .why  { color:var(--muted); font-size:var(--fs-sm); }

/* coverage chip — always numerator/denominator or a real date, links to the gap */
.covrow { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.covrow .meter { width:110px; height:8px; }
.covchip { display:inline-flex; align-items:center; gap:5px; font-size:var(--fs-xs);
           color:var(--muted); font-variant-numeric:tabular-nums; }
.covchip b { color:var(--ink); font-weight:700; }
.covchip.gap { color:var(--attention-ink); }
.covchip.ok  { color:var(--success-ink); }

/* ==== v0.8 append · entry.css ==== */
/* ============ ENTRY SCREENS (landing + login) — the guided demo path ============
   Step 1 choose the look (landing.html) · Step 2 meet the people (login.html).
   Colours via tokens only; motion via the motion tokens; hover gated per house rules. */

/* shared centred columns: landing reads wide, the story column reads narrow */
.entry-wrap { max-width:1100px; margin:0 auto; }
.entry-col  { max-width:680px; margin:0 auto; }

/* --- landing hero: quiet wordmark + the one product-model sentence --- */
.entry-hero { padding:26px 0 4px; }
.entry-word { margin:0 0 10px; font-size:clamp(26px, 5.5vw, 40px);
              letter-spacing:-.02em; line-height:1.15; }
.entry-model { margin:0; max-width:640px; font-size:var(--fs-lg); line-height:1.55;
               color:var(--muted); }

/* --- the demo path strip: three numbered quiet steps --- */
.pathstrip { list-style:none; margin:26px 0 4px; padding:0; display:flex; gap:10px; flex-wrap:wrap; }
.pathstep { display:flex; align-items:center; gap:9px; padding:9px 15px 9px 10px;
            background:var(--surface); border:1px solid var(--line); border-radius:var(--r-pill);
            font-size:var(--fs-sm); color:var(--muted); min-height:var(--touch-min); }
.pathnum { width:24px; height:24px; flex:none; border-radius:50%; display:grid; place-items:center;
           background:var(--raise); color:var(--faint); font-weight:700; font-size:var(--fs-xs);
           font-variant-numeric:tabular-nums; }
.pathstep.now { border-color:var(--primary); color:var(--primary-ink); font-weight:640; }
.pathstep.now .pathnum { background:var(--primary); color:var(--btn-fg); }

.entry-sec { margin-top:28px; }
.entry-h2 { margin:0 0 6px; font-size:var(--fs-xl); letter-spacing:-.01em; }

.entry-foot { margin:22px 0 0; font-size:var(--fs-xs); color:var(--faint); }
.entry-foot a { color:var(--primary-ink); }
.entry-foot.quiet { margin-top:6px; font-style:italic; }

/* --- login: the vertical story column (Step 2 — meet the people) ---
   The WHOLE card is one <button type=submit>: reset button chrome, keep the shared
   card feel, and keep press/hover feedback consistent with .card.click. */
.storyform { display:block; margin:0 0 12px; }
.storycard { display:flex; align-items:center; gap:14px; width:100%; text-align:left;
             font:inherit; color:inherit; cursor:pointer;
             background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
             padding:16px 18px; box-shadow:var(--shadow); min-height:var(--touch-min);
             transition:border-color var(--dur-fast) ease,
                        transform var(--dur-press) var(--ease-out); }
@media (hover:hover) and (pointer:fine) {
  .storycard:hover { border-color:var(--primary); transform:translateY(-1px); }
  .storycard:hover .storygo { color:var(--primary-ink); transform:translateX(2px); }
}
.storycard:active { transform:scale(.99); }
.storybody { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
.storytop { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.storyname { font-weight:700; font-size:var(--fs-base); }
.storyrole { font-size:var(--fs-xs); font-weight:650; color:var(--primary-ink);
             background:var(--primary-soft); border-radius:var(--r-pill); padding:2px 9px; }
.storywhere { font-size:var(--fs-xs); color:var(--faint); }
.storyuse { font-size:var(--fs-sm); color:var(--muted); line-height:1.5; margin-top:2px; }
.storygo { flex:none; font-size:22px; color:var(--faint); line-height:1;
           transition:transform var(--dur-fast) var(--ease-out), color var(--dur-fast) ease; }
@media (max-width:560px) { .storycard { padding:14px; gap:12px; } }


/* ==== v0.8 append · teachercards.css ==== */
/* ============ v0.8 · teacher cards (appended) ============
   Consumes the shared card grammar (.card-h/.card-n/.card-b/.card-a/.card-empty/.covrow/
   .covchip/.meter in base.css) — nothing here redefines it. Tokens only, light-first. */

/* the coverage line that makes a student card read as a folder (teacher/home) */
.stucov { display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:7px; }

/* stacked coverage rows inside one card body (class-coverage card) */
.card-b .covrow + .covrow { margin-top:8px; }

/* linked coverage chips keep a 44px touch band without inflating the text */
a.covchip { min-height:44px; }

/* the 14-day sparkline, kept small INSIDE the class-coverage card */
.covspark { margin-top:12px; padding-top:10px; border-top:1px dashed var(--line); }
.covspark .spark { height:34px; }
.covspark .mt { display:block; margin:0 0 4px; font-size:var(--fs-xs); color:var(--faint); }

/* quiet context text in a card header (e.g. "This term" · "Term 2 · 2025/26") */
.card-h .hint { font-size:var(--fs-xs); color:var(--faint); }

/* month dividers inside the portfolio timeline */
.tl .sec.tlmonth { margin:16px 0 10px; }
.tl .sec.tlmonth h2 { font-size:var(--fs-sm); color:var(--muted); font-variant-numeric:tabular-nums; }


/* ==== v0.8 append · officecards.css ==== */
/* ============ v0.8 · office cards (appended) ============
   parent/home · admin/people · prog/schools — consumes the shared card grammar in base.css
   (.card-h/.card-n/.card-b/.card-a/.card-empty/.covrow/.covchip/.meter); nothing redefined.
   Tokens only, light-first, CSP-safe: the only interactivity is native details/summary. */

/* parent home — month dividers over the shared-highlights stream */
.sec.hlmonth { margin:16px 0 10px; }
.sec.hlmonth h2 { font-size:var(--fs-sm); color:var(--muted); font-variant-numeric:tabular-nums; }

/* school registry — table rows become a responsive card grid (one column at phone width) */
.schoolgrid { grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); align-items:start; }

/* per-school manage drawer — native details/summary keeps a 44px touch band, no JS */
details.manage > summary { display:flex; align-items:center; gap:6px; min-height:var(--touch-min);
  cursor:pointer; font-size:var(--fs-sm); font-weight:600; color:var(--primary-ink); }
details.manage[open] > summary { margin-bottom:8px; }
.managebody { display:flex; flex-direction:column; gap:12px; padding-top:10px;
  border-top:1px dashed var(--line); }
.managebody > div > .mt { display:block; font-size:var(--fs-xs); color:var(--muted); margin:0 0 4px; }

/* admin onboarding — the two intake forms sit side by side and wrap at phone width */
.onbrow { display:flex; gap:18px; flex-wrap:wrap; }
.onbrow > div { flex:1 1 220px; min-width:0; }

/* consent-pipeline rows — a fresh invite link drops to its own full-width line */
.flagrow.wrap { flex-wrap:wrap; }
.invitechip { flex-basis:100%; display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding:8px 10px; background:var(--raise); border-radius:var(--r-sm); }


/* ============ vizcore (M17) — chart classes; all colour via tokens ============ */
.vc { width:100%; height:auto; display:block; }
.vc-grid { stroke:var(--line); stroke-width:1; }
.vc-tick { fill:var(--faint); font-size:11px; font-family:inherit; }
.vc-val { fill:var(--muted); font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.vc-legend { fill:var(--muted); font-size:12px; }
.vc-big { fill:var(--ink); font-size:22px; font-weight:700; font-variant-numeric:tabular-nums; }
.vc-line { fill:none; stroke:var(--primary); stroke-width:2.25; stroke-linejoin:round; }
.vc-area { fill:color-mix(in srgb, var(--primary) 12%, transparent); stroke:none; }
.vc-dot { fill:var(--primary); }
.vc-marker { stroke:var(--attention); stroke-width:1.5; stroke-dasharray:4 3; }
.vc-marker-dot { fill:var(--attention); }
.vc-bar { stroke:none; }
.vc-slice { stroke:var(--surface); stroke-width:1.5; }
.vc-s0 { fill:var(--primary); stroke:var(--primary); }
.vc-s1 { fill:var(--success); stroke:var(--success); }
.vc-s2 { fill:var(--attention); stroke:var(--attention); }
.vc-s3 { fill:var(--primary-ink); stroke:var(--primary-ink); }
.vc-s4 { fill:var(--muted); stroke:var(--muted); }
.vc-s5 { fill:var(--danger); stroke:var(--danger); }
path.vc-line.vc-s0, path.vc-line.vc-s1, path.vc-line.vc-s2,
path.vc-line.vc-s3, path.vc-line.vc-s4, path.vc-line.vc-s5 { fill:none; }
.vc-legend-list { list-style:none; margin:10px 0 0; padding:0; font-size:var(--fs-sm); color:var(--muted); }
.vc-legend-list li { display:flex; align-items:center; gap:8px; padding:2px 0; }
.vc-swatch { width:12px; height:12px; border-radius:3px; display:inline-block; flex:none; }

/* ============================================================================
   SITE CHROME — brand lockup · public nav · footer · contact · public pages.
   Data: ui/site.json + ui/public/*.json; partials: templates/_chrome/*; doc: hkjc-plan
   docs/dev/ui/chrome/SITE-CHROME.md (breakpoints, device + browser matrix, sweep rules).
   Tokens only; breakpoints are the --bp-* tokens in tokens.css (760 · 1024 · 1400).
   ========================================================================== */
html { -webkit-text-size-adjust:100%; }
.skip { position:absolute; left:-9999px; top:8px; z-index:60; background:var(--surface); color:var(--primary-ink); padding:10px 14px; border-radius:var(--r-sm); border:1px solid var(--line); min-height:var(--touch-min); display:inline-flex; align-items:center; }
.skip:focus { left:8px; }
/* brand */
.brand { display:flex; align-items:center; gap:10px; min-height:var(--touch-min); text-decoration:none; color:inherit; min-width:0; flex:1 1 auto; }
.brand-mark { width:32px; height:32px; border-radius:9px; flex:none; }
.brand .ttl { font-weight:680; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.brand .ttl small { display:block; color:var(--faint); font-weight:400; font-size:var(--fs-xs); }
.topbar .spacer { flex:none; }
.topbar .themebtn, .topbar .menubtn, .topbar .avatar { flex:none; }
.themebtn { width:var(--touch-min); height:var(--touch-min); }
@media (max-width:430px) { .brand .ttl { max-width:40vw; } }
@media (min-width:1024px) { .brand { flex:0 1 auto; } .brand .ttl { max-width:260px; } }
@media (min-width:1400px) { .brand .ttl { max-width:none; } }
/* public nav: inline from 1024, a :target sheet below */
.menubtn { display:none; width:var(--touch-min); height:var(--touch-min); border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--ink); align-items:center; justify-content:center; text-decoration:none; font-size:18px; }
.pubnav { display:none; align-items:center; gap:2px; flex-wrap:nowrap; }
.pubnav a { display:inline-flex; align-items:center; min-height:var(--touch-min); min-width:var(--touch-min); padding:0 12px; border-radius:var(--r-sm); color:var(--muted); font-size:var(--fs-sm); font-weight:600; text-decoration:none; white-space:nowrap; }
.pubnav a.on { color:var(--primary-ink); background:var(--primary-soft); }
.pubnav a.btn { color:var(--btn-fg); background:var(--primary); }   /* the CTA keeps the button colours inside the nav */
.pubnav a:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.pubnav .pubsub, .pubnav .menuclose { display:none; }
.pubnav-tools { display:flex; align-items:center; gap:8px; margin-left:8px; }
.pubnav-tools .langs { display:none; }
.pubnav-cta { white-space:nowrap; }
@media (min-width:1024px) { .pubnav { display:flex; } }
@media (max-width:1023px) {
  .menubtn { display:inline-flex; }
  .pubnav:target { display:flex; flex-direction:column; align-items:stretch; position:fixed; inset:0; background:var(--surface); padding:10px 12px calc(12px + env(safe-area-inset-bottom)); overflow:auto; z-index:30; }
  .pubnav:target a { min-height:var(--touch-min); border-bottom:1px solid var(--line); border-radius:0; white-space:normal; }
  .pubnav:target .menuclose { display:inline-flex; align-self:flex-end; border-bottom:0; width:var(--touch-min); justify-content:center; }
  .pubnav:target .pubsub { display:flex; flex-direction:column; padding-left:14px; }
  .pubnav:target .pubsub a { color:var(--faint); font-weight:500; }
  .pubnav:target .pubnav-tools { flex-direction:column; align-items:stretch; gap:12px; margin:14px 0 0; }
  .pubnav:target .pubnav-tools .langs { display:flex; align-self:flex-start; }
}
/* the phone top bar: brand · theme · menu/avatar; language lives in the sheet / footer */
@media (max-width:760px) {
  .topbar { padding:8px 12px; min-height:var(--header-h-phone); }
  .topbar > .spacer > .langs, .topbar form[action="/logout"] { display:none; }
  .brand-mark { width:28px; height:28px; } .brand .ttl { max-width:140px; font-size:var(--fs-sm); }
}
/* footer */
.sitefoot { background:var(--footer-bg); border-top:3px solid var(--primary); margin-top:32px; padding:24px 26px calc(24px + env(safe-area-inset-bottom)); font-size:var(--fs-sm); color:var(--muted); }
.sf-orgs { display:flex; flex-wrap:wrap; gap:18px 36px; align-items:flex-end; margin-bottom:16px; }
.sf-org { display:inline-flex; flex-direction:column; gap:6px; text-decoration:none; color:inherit; min-height:var(--touch-min); max-width:100%; overflow:hidden; justify-content:center; }
.sf-role { font-size:var(--fs-xs); text-transform:uppercase; letter-spacing:.05em; color:var(--faint); }
.sf-org img { height:40px; width:auto; max-width:100%; }
.sf-orgname { font-weight:650; color:var(--ink); }
.sf-orgname.tbc { font-weight:500; color:var(--faint); font-style:italic; }
.sf-partners { display:flex; flex-wrap:wrap; gap:10px 22px; align-items:center; padding:12px 0 18px; border-top:1px dashed var(--line); }
.sf-partner { display:inline-flex; align-items:center; min-height:var(--touch-min); text-decoration:none; color:var(--muted); max-width:100%; overflow:hidden; }
.sf-partners img { height:28px; width:auto; max-width:100%; opacity:.85; }
.sf-map { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px 24px; padding:18px 0; border-top:1px solid var(--line); }
.sf-col { display:flex; flex-direction:column; gap:2px; }
.sf-h { font-size:var(--fs-xs); text-transform:uppercase; letter-spacing:.05em; color:var(--faint); margin:0 0 6px; font-weight:650; }
.sf-col a, .sf-legal a { color:var(--muted); text-decoration:none; min-height:var(--touch-min); min-width:var(--touch-min); display:inline-flex; align-items:center; }
.sf-col a:hover, .sf-legal a:hover { color:var(--ink); }
.sf-bottom { display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; justify-content:space-between; padding-top:14px; border-top:1px solid var(--line); }
.sf-legal { display:flex; flex-wrap:wrap; gap:6px 16px; align-items:center; }
.sf-copy { width:100%; margin:0; font-size:var(--fs-xs); color:var(--faint); display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; }
.sitefoot.compact { margin-top:0; }
@media (max-width:1023px) { .sf-map { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:760px) { .sitefoot { padding:20px 16px calc(20px + env(safe-area-inset-bottom)); } .sf-map { grid-template-columns:1fr; } .sf-bottom { flex-direction:column; align-items:flex-start; } }
@media (max-width:760px) and (min-width:375px) { .sf-map { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:760px) { .has-bottomnav .sitefoot { padding-bottom:calc(84px + env(safe-area-inset-bottom)); } }
/* contact */
.contact { font-style:normal; display:flex; flex-direction:column; gap:4px; }
.contact b { color:var(--ink); }
.contact a { color:var(--primary); text-decoration:none; min-height:var(--touch-min); display:inline-flex; align-items:center; }
/* public pages (the Document view) */
.pub { max-width:820px; }
.pub .lead { font-size:var(--fs-lg); color:var(--muted); margin:6px 0 14px; }
.pub-actions { gap:8px; margin:0 0 18px; }
.pub-section { margin:26px 0 0; }
.pub-section h2 { font-size:var(--fs-lg); margin:0 0 8px; }
.pub-body p { margin:0 0 10px; } .pub-body ul { margin:0 0 10px 20px; }
.pub-list { margin:0 0 0 20px; } .pub-list li { margin:4px 0; }
.pub-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:var(--sp-3); margin:14px 0 4px; }
.pub-cards.entry { margin-bottom:8px; }
.pub-cards .card { padding:14px 16px; }
.proof { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:var(--sp-3); }
.proof-i { background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--primary); border-radius:var(--r-md); padding:12px 14px; display:flex; flex-direction:column; gap:2px; }
.proof-i .k { font-size:var(--fs-xl); font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.proof-i .l { color:var(--muted); } .proof-i .as { font-size:var(--fs-xs); color:var(--faint); overflow-wrap:anywhere; }
.pub, .pub-body, .pub-list, .pub-cards .mt, .faq-a, .pub-table td { overflow-wrap:anywhere; }   /* long ids, URLs and CJK-free tokens never widen a phone */
.faq details { border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); margin:6px 0; }
.faq summary { padding:10px 14px; min-height:var(--touch-min); display:flex; align-items:center; cursor:pointer; font-weight:600; }
.faq-a { padding:0 14px 12px; color:var(--muted); }
.pub-table { border-collapse:collapse; width:100%; } .pub-table th, .pub-table td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; } .pub-table th { color:var(--ink); font-weight:650; width:38%; }
.draftnote { margin:0 0 12px; }
.pub-sib { display:flex; gap:14px; flex-wrap:wrap; margin-top:22px; } .pub-sib a { min-height:var(--touch-min); display:inline-flex; align-items:center; }
@media (max-width:760px) { .proof { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media print { .sitefoot { background:none; border:0; padding:8mm 0 0; } .sf-orgs, .sf-partners, .sf-map, .sf-legal, .pubnav, .menubtn, .skip { display:none !important; } .sf-copy { display:block; } }
