/* Account and project screens follow the approved ink + copper reference. */
.auth-page{background:var(--canvas);min-height:100dvh}.auth-page>.app-header{display:none}.auth-page main.page{width:100%;max-width:none;padding:12px;display:flex}.auth-scene{position:relative;isolation:isolate;overflow:hidden;width:100%;min-height:calc(100dvh - 28px);background:var(--ink) url('/static/stemdust/auth-meteor-optimized.webp') center/cover;border-radius:14px;color:white;display:flex;flex-direction:column}.auth-scene:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#06101980,transparent 55%,#09131cb0);z-index:-1}.auth-top{display:flex;align-items:center;justify-content:space-between;padding:24px 40px;gap:24px}.auth-top a{color:white;text-decoration:none;font-size:13px}.auth-top .brand{font-size:34px;letter-spacing:-.055em;font-weight:750}.auth-top a:last-child{min-height:44px;display:flex;align-items:center;gap:8px}.auth-layout{width:min(1150px,100%);margin:auto;display:grid;grid-template-columns:1fr 490px;gap:64px;align-items:center;padding:20px 48px 64px;flex:1}.auth-story{align-self:end;padding:48px 0 20px;max-width:440px;text-shadow:0 2px 20px #0008}.auth-story h2{color:white;font-size:clamp(44px,4.2vw,44px);line-height:1.05;letter-spacing:-.045em;margin:0 0 24px;font-weight:650}.auth-story em{color:var(--accent-soft);font-style:normal}.auth-story p{font-size:17px;line-height:1.4;color:white}.auth-values{list-style:none;margin:32px 0 0;padding:0;display:grid;gap:16px;font-size:14px}.auth-values li{display:flex;align-items:center;gap:16px}.auth-values .icon{color:var(--accent-soft);width:23px;height:23px}.auth-card{background:var(--canvas-2);border:1px solid var(--surface);border-radius:14px;padding:16px 20px 20px;color:var(--ink);box-shadow:0 20px 60px #0004}.auth-tabs{display:flex;justify-content:center;gap:32px;margin:0 0 0px}.auth-tabs a{padding:12px 12px 16px;color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;font-size:14px;min-height:44px}.auth-tabs a[aria-current]{color:var(--primary-hover);border-color:var(--primary);font-weight:600}.auth-form{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:24px 24px 24px}.auth-form h1{text-align:center;font-size:var(--fs-h1);margin:0 0 var(--sp-1);color:var(--ink)}.auth-intro{text-align:center;color:var(--muted);margin:0 0 24px;font-size:14px}.auth-form .field{margin:0 0 16px;position:relative;display:flex;flex-direction:column}.auth-form .field label{font-size:13px;font-weight:500;margin:0 0 4px;color:var(--text)}.auth-form .field input{width:100%;height:46px;padding:8px 12px;border:1px solid var(--line-strong);border-radius:8px;background:var(--canvas-2);font-size:15px;margin:0}.auth-form .field input[type=password],.auth-form .field input[autocomplete*=password]{padding-right:64px}.auth-form .hint{font-size:11px;line-height:1.45;color:var(--muted);order:3;margin:4px 0 0}.auth-form .reveal{position:absolute;right:4px;top:25px;min-height:44px;padding:8px 12px;font-size:11px;border:0;background:transparent;color:var(--primary-hover);border-radius:8px}.auth-form .error-text{font-size:11px}.auth-form button[type=submit]{width:100%;border-radius:8px;min-height:48px;background:var(--primary);color:var(--surface);border-color:var(--primary)}.auth-form button[type=submit]:hover{background:var(--primary-hover)}.auth-forgot{text-align:right;font-size:11px;margin:0 0 20px}.auth-forgot a{display:inline-flex;align-items:center;min-height:32px}.auth-bottom{border-top:1px solid #e5e2e0;text-align:center;margin-top:32px;padding-top:24px;font-size:13px}.auth-bottom p{color:var(--muted)}.auth-bottom a{display:inline-block;padding:8px}.auth-private{font-size:11px;line-height:1.5;color:var(--muted);margin:20px 0 0}.auth-register .auth-scene{background-image:linear-gradient(90deg,transparent,#111b23 78%),url('/static/stemdust/curiosity-portrait-optimized.webp');background-position:center,left 28%;background-size:cover,65% auto;background-repeat:no-repeat}.auth-register .auth-scene:before{background:linear-gradient(0deg,#08121de8 0%,#08121d20 90%)}.auth-register .auth-story{padding-bottom:0}.auth-register .auth-story h2{font-size:clamp(44px,4vw,44px)}.auth-register .auth-layout{padding-top:0;gap:48px}.auth-register .auth-form{padding-top:20px}.auth-register .auth-intro{margin-bottom:20px}.auth-register .auth-form .field{margin-bottom:12px}
.project-page{background:#faf8f6}.project-page main.page{width:min(1370px,100% - 64px);padding:24px 0 48px}.project-breadcrumb{background:var(--ink);color:var(--on-ink-muted);padding:var(--sp-3) max(var(--sp-7),calc((100% - 1320px)/2));display:flex;gap:12px;align-items:center;font-size:13px}.project-breadcrumb a{color:var(--on-ink);text-decoration:none;white-space:nowrap}.project-breadcrumb span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:white}.project-overview{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}.project-page .research-heading{display:block;background:white;border:1px solid var(--line);border-radius:8px;padding:24px;margin:0}.project-page .research-heading h1{font-size:var(--fs-h1);line-height:1.12;margin:var(--sp-4) 0;color:var(--ink);max-width:22ch}.project-page .research-heading .lede{font-size:15px;line-height:1.5;color:var(--muted);max-width:780px;margin:0}.project-kind{display:inline-flex;align-items:center;background:var(--wash);border:1px solid var(--wash-line);color:var(--primary-ink);border-radius:var(--r-pill);padding:var(--sp-1) var(--sp-3);font-size:var(--fs-micro);letter-spacing:.04em;font-weight:600;text-transform:none}.project-meta{margin-top:20px;display:flex;gap:12px;align-items:center;font-size:14px}.project-meta .account-avatar{flex:none}.project-meta small{display:block;color:var(--faint);font-size:11px}.project-status{background:white;border:1px solid var(--line);border-radius:8px;padding:24px}.project-status h2{font-size:17px;margin:16px 0 8px;color:var(--ink)}.project-status p{font-size:13px;color:var(--muted)}.project-status .project-open{display:inline-flex;align-items:center;gap:8px;color:var(--primary-ink);background:var(--wash);border-radius:var(--r-pill);padding:4px 8px;font-size:11px;font-weight:650;letter-spacing:.08em}.project-open:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.project-status a{font-size:13px;display:block;border-top:1px solid #eee;padding:12px 0 0;margin-top:16px}.project-page .reading-controls{margin:16px 0 0;display:flex;flex-wrap:wrap;gap:8px;align-items:start}.project-page .reading-controls form{margin:0}.project-page .reading-controls>.help{flex-basis:100%;font-size:11px;margin:0}.project-page .reading-controls details{font-size:11px;max-width:300px}.project-page .reading-controls button{border-radius:8px;min-height:40px;padding:8px 12px;border-color:#e0dad6;color:var(--primary-hover)}.project-page .tab-nav{margin:24px 0 24px;gap:24px;border-color:#e6e2df}.project-page .tab-nav a{font-size:14px;padding:12px 8px}.project-page .tab-nav a[aria-current]{color:var(--primary-hover);border-color:var(--primary)}.project-page .research-columns{grid-template-columns:minmax(0,1fr) 300px;gap:32px}.project-page .research-body{background:var(--surface);padding:8px 20px 24px;border-radius:8px}.project-page .read-section{padding:20px 0 0;margin-top:20px;border-color:#eee}.project-page .read-section:first-child{margin-top:0}.project-page .research-body h2{font-size:21px;color:var(--ink)}.project-page .research-body p,.project-page .research-body li{font-size:15px;line-height:1.6;color:var(--muted)}.project-page .research-rail .community-card{border-radius:var(--r-md);padding:20px;box-shadow:none;border-color:var(--line)}.project-page .research-rail h2{font-size:17px;color:var(--ink)}.project-page .research-rail .button{border-radius:8px;display:flex;justify-content:center;margin:12px 0;min-height:46px}.project-page .research-rail .evidence-state{overflow-wrap:anywhere}.project-page .research-rail .badge{white-space:normal;font-size:11px}.project-history{margin-top:24px;border-top:1px solid var(--line);padding-top:16px;font-size:13px}.project-history summary{cursor:pointer;color:var(--muted);min-height:44px}.project-page .project-edit{font-size:13px;margin:8px 0}.project-page .project-activity{font-size:13px;color:var(--muted)}.project-activity strong{display:block;color:var(--ink);margin-bottom:4px}
@media(max-width:1000px){.auth-layout{grid-template-columns:1fr 440px;gap:24px;padding:20px 32px 40px}.auth-story h2{font-size:44px}.project-overview,.project-page .research-columns{grid-template-columns:minmax(0,1fr) 260px;gap:20px}.auth-card{padding:12px}.auth-form{padding:24px 20px}}
@media(max-width:760px){.auth-page main.page{padding:0}.auth-scene{border-radius:0;min-height:100dvh;background-position:28% center}.auth-top{padding:16px 20px}.auth-top .brand{font-size:27px}.auth-layout{display:flex;flex-direction:column;gap:24px;padding:12px 20px 32px}.auth-story{align-self:stretch;padding:0;max-width:none}.auth-story h2,.auth-register .auth-story h2{font-size:34px;margin-bottom:12px}.auth-login .auth-story h2 br{display:none}.auth-login .auth-story h2 br:after{content:" "}.auth-story p{font-size:15px;margin:0}.auth-story p br{display:none}.auth-values{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0 0;font-size:11px}.auth-values li{gap:4px}.auth-values .icon{width:17px;height:17px}.auth-card{width:100%;max-width:480px;padding:12px}.auth-tabs{gap:16px}.auth-tabs a{font-size:13px;padding:12px}.auth-form h1{font-size:var(--fs-xl)}.auth-register .auth-scene{background-size:cover,auto 900px;background-position:center,30% top}.auth-register .auth-layout{gap:24px}.auth-register .auth-story h2 br{display:none}.auth-bottom{margin-top:24px;padding-top:16px}.project-page main.page{width:calc(100% - 28px);padding-top:16px}.project-breadcrumb{padding:12px 16px}.project-breadcrumb span:last-child{display:none}.project-overview,.project-page .research-columns{display:flex;flex-direction:column}.project-page .research-heading{padding:20px}.project-page .research-heading h1{font-size:var(--fs-xl)}.project-status{padding:16px 20px}.project-status h2{margin:8px 0 4px}.project-status a{margin-top:12px}.project-page .research-body{padding:8px 12px 20px}.project-page .research-rail{display:block}.project-page .tab-nav{gap:16px}.project-page .reading-controls{gap:8px}.project-page .reading-controls .help{display:none}}
.auth-form .reveal{bottom:auto;height:44px}
.auth-register .auth-scene:before{background:linear-gradient(0deg,#08121de8 0%,#08121d20 90%),linear-gradient(180deg,#08121d70,transparent 22%)}

/* The post header uses only an author-written introduction, never the body. */
.project-page .project-overview.project-overview--text{grid-template-columns:minmax(0,1fr)}
.project-page .project-authorship{font-size:var(--fs-xs);margin-block:.5rem}
.project-page .project-authorship summary{cursor:pointer;min-height:2.75rem;display:flex;align-items:center}
.project-page .project-overview--text .lede{overflow-wrap:anywhere}
.research-tab-status{font-size:var(--fs-xs);color:var(--muted);margin-block:.5rem}
.research-tab-status button,.research-tab-status a{margin-inline:.5rem;min-height:2.75rem;display:inline-flex;align-items:center}
[data-research-panel][aria-busy="true"]{opacity:.65}
[data-research-tabs] a:focus-visible{outline:2px solid var(--primary);outline-offset:3px}

/* Compact post header: identity and disclosure stay together; actions wrap naturally. */
.project-page .research-heading .project-labels{padding-right:0;gap:.5rem}
.project-page .research-heading h1{line-height:1.22}
.project-page .research-heading .lede{color:#374151}
.project-page .research-heading .project-kind,
.project-page .research-heading .project-progress{color:#9a3412;font-weight:600}
.project-page .research-heading .project-header-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.25rem;margin-top:1.5rem}
.project-page .research-heading .project-meta{margin:0;align-items:flex-start;min-width:0;flex:1 1 24rem}
.project-page .research-heading .project-byline{min-width:0;flex:1}
.project-page .research-heading .project-author-line{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem;font-size:1rem}
.project-page .research-heading .project-meta small{color:#4b5563;font-size:.875rem;margin-top:.25rem}
.project-page .research-heading .project-authorship-label{color:#4b5563;background:#f3f4f6;border-radius:999px;padding:.2rem .6rem;font-size:.875rem;font-weight:600}
.project-page .research-heading .project-authorship{margin:0;font-size:.875rem}
.project-page .research-heading .project-authorship summary{color:#9a3412;font-weight:600;min-height:2.75rem;gap:.4rem}
.project-page .research-heading .project-authorship summary::after{content:"+"}
.project-page .research-heading .project-authorship[open] summary::after{content:"−"}
.project-page .research-heading .project-authorship-description{max-width:55ch;color:#374151;line-height:1.6;overflow-wrap:anywhere}
.project-page .research-heading .project-authorship-description p{margin:.25rem 0 .75rem}
.project-page .research-heading .project-header-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin:0}
/* Follow & save menu. The panel has to be positioned for ANY content it can
   hold: signed out the follow_controls macro emits a bare <p>, signed in a
   .reading-controls section. The old rule positioned only .reading-controls,
   so for a signed-out visitor the paragraph stayed in flow, inflated the
   details and pushed the title down the page. :not(summary) covers both. The
   details itself is stripped of the card styling it inherits from modern.css
   so only the floating panel reads as a card. */
/* Chromium still gives the open details 12px of in-flow height even with the
   panel absolutely positioned, which nudged the title down on every open.
   Pinning the details and its summary to the same explicit height removes
   the shift without relying on ::details-content, which is too new to lean on. */
.project-page .research-heading .project-reading-menu{position:relative;inset:auto;font-size:.875rem;width:auto;height:2.75rem;box-sizing:border-box;background:none;border:0;border-radius:0;padding:0;box-shadow:none}
.project-page .research-heading .project-reading-menu[open]{width:auto;padding:0;background:none;border-radius:0;box-shadow:none}
.project-page .research-heading .project-reading-menu>summary{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;height:2.75rem;padding:0 1.1rem;border:1px solid var(--line);border-radius:999px;background:light-dark(#ffffff,#2a2320);color:#9a3412;font-weight:600;white-space:nowrap;box-sizing:border-box;cursor:pointer;list-style:none}
.project-page .research-heading .project-reading-menu>summary::-webkit-details-marker{display:none}
.project-page .research-heading .project-reading-menu>summary:hover,.project-page .research-heading .project-reading-menu[open]>summary{border-color:var(--primary)}
.project-page .research-heading .project-reading-menu[open]>:not(summary){position:absolute;top:calc(100% + .5rem);right:0;z-index:8;width:max-content;min-width:15rem;max-width:min(24rem,88vw);max-height:60vh;overflow:auto;margin:0;padding:1rem 1.15rem;background:light-dark(#ffffff,#2a2320);border:1px solid var(--line);border-radius:12px;box-shadow:0 .5rem 2rem #14203622;text-align:left;color:light-dark(#1f2937,#e8e1da);font-family:Inter,"Helvetica Neue",-apple-system,BlinkMacSystemFont,Roboto,system-ui,sans-serif;font-size:.9375rem;line-height:1.55}
@media(max-width:30rem){.project-page .research-heading .project-reading-menu[open]>:not(summary){right:auto;left:0}}

/* Authorship note. The AI disclosure is reference detail, not something worth
   reflowing the page for, so it is a popover: shown on hover and on keyboard
   focus, absolutely positioned so it never moves the author row or the buttons,
   and gone the moment the pointer leaves. No JavaScript. It stays in the
   accessibility tree via aria-describedby because it is faded, not hidden, so a
   screen reader still reads it as the trigger's description. */
.project-page .research-heading .project-authorship{position:relative;display:inline-flex;margin:0;background:none;border:0;border-radius:0;padding:0;box-shadow:none}
.project-page .research-heading .project-authorship-trigger{display:inline-flex;align-items:center;gap:.4rem;height:2.75rem;padding:0 1.1rem;border:1px solid var(--line);border-radius:999px;background:none;color:#9a3412;font:inherit;font-size:.875rem;font-weight:600;white-space:nowrap;cursor:pointer}
.project-page .research-heading .project-authorship-trigger:hover{border-color:var(--primary)}
.project-page .research-heading .project-authorship-description{position:absolute;top:calc(100% + .5rem);right:0;z-index:7;width:min(30rem,85vw);max-height:60vh;overflow:auto;padding:1.15rem 1.25rem;background:light-dark(#ffffff,#2a2320);border:1px solid var(--line);border-left:3px solid var(--primary);border-radius:12px;box-shadow:0 .5rem 2rem #14203622;opacity:0;pointer-events:none;transition:opacity .12s ease;color:light-dark(#1f2937,#e8e1da);font-size:16px;font-weight:400;line-height:1.65;font-family:Inter,"Helvetica Neue",-apple-system,BlinkMacSystemFont,Roboto,system-ui,sans-serif;font-optical-sizing:auto;text-align:left}
.project-page .research-heading .project-authorship:hover .project-authorship-description,
.project-page .research-heading .project-authorship:focus-within .project-authorship-description{opacity:1;pointer-events:auto}
.project-page .research-heading .project-authorship-description p{margin:0 0 .75rem}
.project-page .research-heading .project-authorship-description p:last-child{margin:0}
@media (prefers-reduced-motion:reduce){.project-page .research-heading .project-authorship-description{transition:none}}
/* Anchoring the panel to the trigger pushes it off the left edge on a phone,
   so below 48rem it anchors to the header card and spans it instead. */
@media (max-width:48rem){
.project-page .research-heading{position:relative}
.project-page .research-heading .project-authorship{position:static}
.project-page .research-heading .project-authorship-description{left:.75rem;right:.75rem;width:auto;max-width:none}
}
/* The labels row carries Follow & save at the top right of the card. The menu
   panel is already absolutely positioned by .project-reading-menu[open], so it
   opens over the title rather than pushing it down. */
.project-page .research-heading .project-labels{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem}
.project-page .research-heading .project-labels .project-reading-menu{margin-left:auto;position:relative}
.project-page .research-heading .project-labels .project-reading-menu>summary{border:1px solid var(--line);border-radius:999px;white-space:nowrap}
.project-page .research-heading .project-labels .project-reading-menu>summary:hover{border-color:var(--primary)}
@media (max-width:30rem){.project-page .research-heading .project-labels .project-reading-menu{margin-left:0}}

/* ============ POST PAGE ============================================
   Two columns: one white article card, a rail of small cards beside it.
   Icons come from the inline sprite in base.html, so there is no external
   request and nothing to fail if a CDN is unreachable. */
.project-page .post-layout{display:grid;grid-template-columns:minmax(0,1fr) 352px;gap:24px;align-items:start}
.project-page .post-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:32px;min-width:0}

.project-page .post-topbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.project-page .post-labels{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:0}
.project-page .post-progress,.project-page .post-labels .project-progress{display:inline-flex;align-items:center;gap:7px;background:var(--wash);border:1px solid var(--wash-line);color:var(--primary-ink);border-radius:var(--r-pill);padding:var(--sp-1) var(--sp-3);font-size:var(--fs-micro);font-weight:600}
.project-page .post-labels .project-progress:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}

.project-page .post-tools{display:flex;align-items:center;gap:8px}
.project-page .post-tool{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:2.5rem;padding:0 .95rem;border:1px solid var(--line-strong);border-radius:var(--r-pill);background:var(--surface);color:var(--text);font:inherit;font-size:var(--fs-xs);font-weight:600;white-space:nowrap;cursor:pointer;list-style:none}
.project-page .post-tool--icon{width:2.5rem;padding:0}
.project-page .post-tool:hover{border-color:var(--primary);color:var(--primary-ink)}
.project-page .post-tool .icon{width:16px;height:16px}
.project-page .post-tool::-webkit-details-marker{display:none}
.project-page .post-tool-menu{position:relative;height:2.5rem;background:none;border:0;padding:0;box-shadow:none}
.project-page .post-tool-menu[open]>summary{border-color:var(--primary);color:var(--primary-ink)}
.project-page .post-tool-panel{position:absolute;top:calc(100% + .5rem);right:0;z-index:8;width:max-content;min-width:15rem;max-width:min(22rem,88vw);max-height:60vh;overflow:auto;padding:1rem;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 .5rem 2rem #14203622;text-align:left;font-size:var(--fs-sm)}
.project-page .post-tool-panel>a{display:block;padding:.4rem 0}
.project-page .post-tool-panel form{margin:.5rem 0 0}

.project-page .post-card h1{font-size:var(--fs-h1);line-height:1.14;margin:20px 0 0;color:var(--ink);max-width:24ch}
.project-page .post-card .lede{margin:16px 0 0;max-width:70ch;color:light-dark(#1f2937,#e8e1da);font-size:16px;line-height:1.65}

.project-page .post-byline{display:flex;align-items:center;gap:12px;margin-top:24px}
.project-page .post-byline__who{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0;font-size:var(--fs-sm)}
/* The pill was scoped to .research-heading, which the redesign replaced. */
.project-page .post-card .project-authorship-label,.project-page .post-rail .project-authorship-label{color:#4b5563;background:#f3f4f6;border-radius:999px;padding:.2rem .6rem;font-size:var(--fs-micro);font-weight:600;white-space:nowrap}

/* Key takeaway callout. Rendered only when the author supplied one, so it stays
   out of the way until the field exists rather than labelling an arbitrary
   paragraph as the takeaway. */
.project-page .post-callout{display:flex;gap:12px;margin:24px 0;padding:16px 18px;background:var(--wash);border-left:3px solid var(--primary);border-radius:0 10px 10px 0}
.project-page .post-callout .icon{width:19px;height:19px;color:var(--primary);flex:none;margin-top:2px}
.project-page .post-callout h3{margin:0 0 4px;font-size:var(--fs-sm);color:var(--primary-ink)}
.project-page .post-callout p{margin:0;color:light-dark(#1f2937,#e8e1da);font-size:var(--fs-sm);line-height:1.6}
.project-page .post-byline__meta{margin:2px 0 0;color:var(--muted);font-size:var(--fs-xs)}

.project-page .post-card .tab-nav{margin:24px 0 0;border-bottom:1px solid var(--line)}
.project-page .post-card .research-body{background:none;border:0;border-radius:0;padding:24px 0 0;min-width:0}

/* Rail */
.project-page .post-rail{display:grid;gap:16px;min-width:0;position:sticky;top:5.5rem;align-self:start;
  max-height:calc(100dvh - 7rem);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.project-page .post-rail::-webkit-scrollbar{width:6px}
.project-page .post-rail::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px}
.project-page .rail-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px}
.project-page .rail-card h2{font-size:var(--fs-md);color:var(--ink);margin:0 0 10px}
.project-page .rail-card p{font-size:var(--fs-xs);line-height:1.55;color:var(--muted);margin:0 0 12px}
.project-page .rail-card p:last-child{margin-bottom:0}
.project-page .rail-author{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.project-page .rail-author p{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;color:var(--text);font-size:var(--fs-sm)}
.project-page .rail-bio{margin-bottom:14px}
.project-page .rail-profile{width:100%;justify-content:center;gap:8px}
.project-page .rail-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:12px;margin:16px 0 0;padding-top:16px;border-top:1px solid var(--line)}
.project-page .rail-stats div{min-width:0}
.project-page .rail-stats dt{font-size:var(--fs-md);font-weight:650;color:var(--ink)}
.project-page .rail-stats dd{margin:0;font-size:var(--fs-micro);color:var(--muted)}

.project-page .rail-status{display:flex;gap:12px;align-items:flex-start}
.project-page .rail-badge{flex:none;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--wash);color:var(--primary-ink)}
.project-page .rail-badge .icon{width:19px;height:19px}

.project-page .rail-action{width:100%;justify-content:center;gap:9px;margin-bottom:10px;font-size:var(--fs-xs)}
.project-page .rail-action .icon{width:16px;height:16px}
.project-page .rail-note{margin:4px 0 0;text-align:center}

.project-page .rail-related__head{display:flex;align-items:center;justify-content:space-between;gap:10px;text-decoration:none;color:inherit}
.project-page .rail-related__head h2{margin:0}
.project-page .rail-related__head .icon{width:18px;height:18px;color:var(--muted);flex:none}

@media (max-width:62rem){
  .project-page .post-layout{grid-template-columns:minmax(0,1fr)}
  .project-page .post-card{padding:20px}
  .project-page .post-tools{width:100%;justify-content:flex-start}
  .project-page .post-rail{position:static;max-height:none;overflow:visible}
}

/* ---- progress stepper -------------------------------------------------
   Driven only by fields that exist: Testing from method/expected result,
   Evidence from evidence bindings or a source, Finding from
   record.scientific_status. Nothing here is guessed from the prose. */
.project-page .post-steps{display:flex;align-items:flex-start;gap:0;list-style:none;margin:20px 0 0;padding:0}
.project-page .post-steps li{flex:1;display:flex;flex-direction:column;align-items:center;gap:7px;position:relative;font-size:var(--fs-micro);color:var(--muted);text-align:center;min-width:0}
.project-page .post-steps li:before{content:"";position:absolute;top:7px;left:calc(-50% + 9px);width:calc(100% - 18px);height:2px;background:var(--line)}
.project-page .post-steps li:first-child:before{display:none}
.project-page .post-steps li.is-done:before{background:var(--primary)}
.project-page .post-steps__dot{width:15px;height:15px;border-radius:50%;border:2px solid var(--line);background:var(--surface);position:relative;z-index:1}
.project-page .post-steps li.is-done .post-steps__dot{border-color:var(--primary);background:var(--primary)}
.project-page .post-steps li[aria-current=step]{color:var(--primary-ink);font-weight:650}
.project-page .project-kind .icon{width:14px;height:14px;margin-right:6px;vertical-align:-2px}

/* collapsible rail cards: a disclosure on a phone, always open on desktop */
.project-page .rail-collapsible>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}
.project-page .rail-collapsible>summary::-webkit-details-marker{display:none}
.project-page .rail-collapsible>summary h2{margin:0}
.project-page .rail-section-title{display:none}

/* ============ POST PAGE MOBILE ====================================== */
.project-page .post-actionbar{display:none}
@media (max-width:62rem){
  /* one scrolling row of tabs instead of a ragged two-line wrap */
  .project-page .post-card .tab-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:20px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .project-page .post-card .tab-nav::-webkit-scrollbar{display:none}
  .project-page .post-card .tab-nav a{white-space:nowrap;flex:none}

  .project-page .post-card{padding:18px;border-radius:12px}
  .project-page .post-card h1{font-size:var(--fs-lg);line-height:1.2;max-width:none;margin-top:16px}
  .project-page .post-card .lede{font-size:var(--fs-sm);margin-top:12px}
  .project-page .post-topbar{gap:10px}
  /* Share / Follow / overflow are hidden on a phone for now: the row crowded the
     first screen. The bottom action bar carries the actions that matter there. */
  .project-page .post-tools{display:none}

  /* the rail becomes part of the page flow: the call to action first, then
     the reference cards collapsed under one heading */
  .project-page .post-rail{display:flex;flex-direction:column;gap:12px;margin-top:20px}
  .project-page .rail-section-title{display:block;order:1;margin:8px 0 0;font-size:var(--fs-md);color:var(--ink)}
  .project-page .post-rail>section:nth-of-type(2){order:0}      /* Help move this forward */
  .project-page .rail-collapsible{order:2}
  .project-page .rail-status{order:3}
  .project-page .rail-related{order:4}
  .project-page .rail-card{padding:16px;border-radius:12px}
  .project-page .rail-collapsible:not([open]){padding-bottom:16px}
  .project-page .rail-collapsible>summary:after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin-right:4px;flex:none}
  .project-page .rail-collapsible[open]>summary:after{transform:rotate(-135deg)}

  /* bottom action bar, clear of the home indicator */
  .project-page{padding-bottom:calc(5rem + env(safe-area-inset-bottom))}
  .project-page .post-actionbar{display:flex;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:30;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -4px 16px #14203611}
  .project-page .post-actionbar form{flex:1;margin:0;max-width:none}
  .project-page .post-actionbar__item{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;width:100%;
    min-height:2.75rem;padding:0 .7rem;border:1px solid var(--line-strong);border-radius:var(--r-pill);background:var(--surface);
    color:var(--text);font:inherit;font-size:var(--fs-xs);font-weight:600;text-decoration:none;white-space:nowrap;cursor:pointer}
  .project-page .post-actionbar__item--primary{flex:1.3;background:var(--primary);border-color:var(--primary);color:var(--primary-text)}
  .project-page .post-actionbar .icon{width:16px;height:16px}
  .project-page .post-steps li{font-size:11px}
}
@media (max-width:26rem){
  .project-page .post-card{padding:14px}
}
