/* Project dossiers. The shared site palette and technical archive stay intact. */
.case-page { max-width: 1340px; padding-top: 140px; }
.case-page :is(section, #overview) { scroll-margin-top: 155px; }
.case-hero { position: relative; }
.case-page .page-back { margin-bottom: 54px; }
.case-page .cs-kicker { font-size: .66rem; letter-spacing: .14em; }
.case-page .cs-title { max-width: 1060px; font-size: clamp(3rem, 7.8vw, 7rem); line-height: .96; }
.case-page .cs-title em { display: block; font-size: clamp(1.7rem, 3.5vw, 3.4rem); letter-spacing: -.025em; line-height: 1.2; margin: 15px 0 24px; }
.case-page .cs-sub { max-width: 760px; line-height: 1.7; }
.case-margin-note { position: absolute; right: 10px; bottom: 195px; font-family: var(--hand); font-size: 1.5rem; color: var(--moss); transform: rotate(-7deg); }
.case-page .cs-meta { border-radius: 0; margin: 44px 0 38px; }
.case-page .cs-meta div { padding: 22px; }
.case-index { position: sticky; top: 88px; z-index: 25; display: flex; gap: 24px; align-items: center; padding: 20px 0; margin-bottom: 30px; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.index-label { color: var(--moss); white-space: nowrap; margin-right: auto; font-size: .6rem; }
.case-index a { white-space: nowrap; font-family: var(--mono); font-size: .62rem; color: var(--muted); transition: color .2s; }
.case-index a:hover, .case-index a[aria-current="location"] { color: var(--ink); }
.case-index a[aria-current="location"]::before { content: '• '; color: var(--signal); }
.reading-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; pointer-events: none; }
.reading-progress > span { display: block; width: 100%; height: 100%; background: var(--moss); transform: scaleX(0); transform-origin: left; }
.case-page .cs-plate { border-radius: 0; margin-bottom: 0; background: var(--paper-2); }
.case-page .cs-plate img { width: 100%; }
.case-thesis { display: grid; grid-template-columns: 190px 1fr 60px; gap: 30px; align-items: start; padding: 45px 0 55px; }
.case-thesis > .mono { color: var(--moss); font-size: .62rem; padding-top: 13px; }
.case-thesis p { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.1; letter-spacing: -.035em; max-width: 760px; }
.thesis-mark { font-family: var(--serif); font-size: 3.5rem; color: var(--signal); line-height: 1; }
.case-page .cs-section { grid-template-columns: 190px 1fr; gap: 30px; padding: 48px 0; }
.case-page .cs-section > div { max-width: none; }
.case-page .cs-section h2 { color: var(--moss); line-height: 1.8; }
.chapter-number { display: block; font-family: var(--serif); font-size: 2.5rem; color: var(--muted); letter-spacing: -.05em; margin-bottom: 12px; line-height: 1; }
.case-brief > div { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.75; max-width: 850px !important; }
.case-lab { position: relative; margin: 40px 0 75px; }
.lab-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.lab-heading .mono { font-size: .62rem; color: var(--moss); margin-bottom: 12px; }
.lab-heading h2 { font-family: var(--display); font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.15; font-weight: 500; letter-spacing: -.035em; }
.lab-symbol { font-size: 4.5rem; color: var(--moss); line-height: 1; }
.system-console { background: var(--olive); color: var(--paper); padding: 26px 36px 20px; border: 1px solid var(--olive); background-image: radial-gradient(rgba(230,232,221,.08) 1px, transparent 1px); background-size: 20px 20px; }
.console-top, .console-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .58rem; color: var(--muted-d); }
.console-top { padding-bottom: 26px; }
.console-top i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #bed496; margin-right: 7px; }
.system-nodes { display: none; grid-template-columns: repeat(var(--stages), minmax(0, 1fr)); gap: 16px; }
.case-enhanced .system-nodes { display: grid; }
.console-top > span:last-child { display: none; }
.case-enhanced .console-top > span:last-child { display: inline; }
.system-node { position: relative; appearance: none; text-align: left; border: 1px solid #68745a; background: var(--olive); color: var(--paper); padding: 18px 20px; font: inherit; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.system-node:not(:last-child)::after { content: ''; position: absolute; width: 17px; height: 1px; top: 50%; right: -18px; background: #68745a; }
.system-node .mono { display: block; font-size: .6rem; color: var(--muted-d); margin-bottom: 10px; }
.system-node strong { font-family: var(--display); font-weight: 500; font-size: clamp(1rem, 2vw, 1.45rem); }
.node-arrow { position: absolute; right: 16px; top: 14px; color: var(--muted-d); }
.system-node[aria-pressed="true"], .system-node:hover { background: var(--paper-2); color: var(--ink); border-color: var(--paper-2); }
.system-node[aria-pressed="true"] :is(.mono,.node-arrow), .system-node:hover :is(.mono,.node-arrow) { color: var(--moss); }
.system-stage { position: relative; padding: 42px 0 36px; max-width: 820px; }
.system-stage[hidden] { display: none; }
.system-eyebrow { color: #bdc9a6; font-size: .62rem; margin-bottom: 14px; }
.system-stage h3 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; line-height: 1.15; letter-spacing: -.025em; margin-bottom: 20px; }
.system-stage > p:not(.system-eyebrow) { color: #c7ceba; max-width: 660px; line-height: 1.8; }
.system-route { border-top: 1px solid var(--line-d); margin-top: 30px; padding-top: 20px; font-size: .7rem; text-transform: none; color: #d6dfc7; letter-spacing: 0; }
.system-tag { display: inline-block; margin-top: 18px; padding: 5px 10px; border: 1px solid var(--line-d); font-family: var(--mono); font-size: .6rem; color: #bdc9a6; }
.console-bottom { border-top: 1px solid var(--line-d); padding-top: 18px; }
.lab-note { font-family: var(--hand); font-size: 1.6rem; color: var(--moss); text-align: right; padding: 15px 15px 0; transform: rotate(-2deg); }
.case-capabilities ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 30px; counter-reset: capability; }
.case-page .case-capabilities li { counter-increment: capability; border-top: 1px solid var(--line); padding: 22px 0 25px; font-size: .95rem; line-height: 1.75; }
.case-page .case-capabilities li::before { content: '0' counter(capability) ' /'; display: block; position: static; font-family: var(--mono); font-size: .62rem; color: var(--moss); margin-bottom: 13px; }
.case-capabilities b { font-weight: 600; }
.case-decision { border-bottom: 1px solid var(--line); }
.case-decision:first-child { border-top: 1px solid var(--line); }
.case-decision summary { display: flex; align-items: center; gap: 20px; padding: 24px 0; cursor: pointer; list-style: none; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 500; line-height: 1.4; }
.case-decision summary::-webkit-details-marker { display: none; }
.decision-number { color: var(--moss); font-family: var(--mono); font-size: .65rem; }
.decision-toggle { margin-left: auto; font-size: 1.5rem; color: var(--moss); }
.case-decision[open] .decision-toggle { transform: rotate(45deg); }
.decision-body { padding: 0 35px 28px 38px; max-width: 760px; }
.case-evidence { margin: 35px 0 0; background: var(--paper-2); padding: 38px !important; border-top: 0; }
.case-evidence > div { font-size: .95rem; line-height: 1.8; }
.case-contact { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 70px 0; }
.case-contact p { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.6rem); letter-spacing: -.03em; }
.case-contact p em { display: block; font-size: 1.25em; }
.case-contact a { padding: 14px 0; white-space: nowrap; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: .75rem; }
.case-contact a span { margin-left: 36px; color: var(--moss); }
.case-page :is(a,button,summary):focus-visible { outline: 2px solid var(--signal); outline-offset: 6px; }
@media (max-width: 1050px) {
  .case-index { gap: 17px; }
  .index-label { display: none; }
  .case-margin-note { display: none; }
}
@media (max-width: 760px) {
  .case-page { padding-top: 115px; }
  .case-page .page-back { margin-bottom: 35px; }
  .case-page .cs-title { font-size: clamp(2.5rem, 10vw, 4.5rem); overflow-wrap: anywhere; }
  .case-page .cs-title em { font-size: clamp(1.6rem, 5.5vw, 2.4rem); overflow-wrap: normal; }
  .case-page .cs-meta div { padding: 16px; }
  .case-index { top: 76px; overflow-x: auto; overflow-y: hidden; gap: 22px; padding: 16px 0; scrollbar-width: none; }
  .case-index a { font-size: .6rem; flex-shrink: 0; }
  .case-thesis { grid-template-columns: 1fr 35px; gap: 20px; padding: 30px 0 40px; }
  .case-thesis > .mono { grid-column: 1 / -1; padding-top: 0; }
  .case-thesis p { font-size: 2.2rem; }
  .thesis-mark { font-size: 2.5rem; }
  .case-page .cs-section { grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
  .chapter-number { display: inline; font-family: var(--mono); font-size: .72rem; letter-spacing: 0; margin-right: 15px; }
  .case-lab { margin: 30px 0 50px; }
  .lab-symbol { font-size: 3rem; margin-left: 16px; }
  .system-console { padding: 20px; }
  .console-top { flex-wrap: wrap; gap: 8px; padding-bottom: 20px; }
  .system-nodes { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .system-node { padding: 14px; min-height: 86px; }
  .system-node:not(:last-child)::after { display: none; }
  .system-stage { padding: 30px 0; }
  .system-route { line-height: 1.8; }
  .console-bottom { font-size: .5rem; }
  .lab-note { font-size: 1.3rem; }
  .case-capabilities ul { gap: 0 20px; }
  .case-evidence { padding: 24px !important; }
  .case-contact { margin: 45px 0; }
}
@media (max-width: 450px) {
  .case-capabilities ul { grid-template-columns: 1fr; }
  .case-contact { align-items: flex-start; flex-direction: column; }
  .decision-body { padding-left: 0; padding-right: 0; }
  .case-page .cs-meta .v { font-size: .85rem; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .case-enhanced .system-stage:not([hidden]) { animation: case-panel-in .3s ease both; }
  @keyframes case-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media print {
  .case-index, .case-contact, .system-nodes, .cursor, .grain { display: none; }
  .system-stage[hidden] { display: block; }
  .case-page { padding-top: 30px; }
  .system-console { background: white; color: black; }
  .system-stage :is(p, h3, span, div) { color: black !important; }
  .case-decision .decision-body { display: block !important; }
}

.case-index::-webkit-scrollbar { display: none; }
