:root {
  --case-paper: #f1f0e9;
  --case-ink: #171714;
  --case-muted: #66665f;
  --case-line: #d6d4ca;
}

body { background: #000; }
.case-header { background: rgba(0, 0, 0, .92); border-color: var(--soft-line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.case-hero {
  position: relative;
  min-height: 660px;
  padding: 145px 3.1vw 65px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.case-hero::after {
  position: absolute;
  right: -14vw;
  bottom: -29vw;
  width: min(62vw, 820px);
  aspect-ratio: 1;
  border: 1px solid #252523;
  border-radius: 50%;
  box-shadow: 0 0 0 10vw #000, 0 0 0 calc(10vw + 1px) #171716;
  content: "";
}

.case-hero .eyebrow { color: var(--lime); }
.case-hero h1 { max-width: 1160px; margin: 70px 0 30px; font-size: clamp(58px, 8.3vw, 126px); line-height: .91; }
.case-deck { position: relative; z-index: 1; max-width: 610px; margin: 0 0 0 auto; color: #b7b7b2; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.58; }
.status-pill { display: inline-block; margin-left: 10px; border: 1px solid #596e28; border-radius: 999px; padding: 4px 8px; color: var(--lime); font-size: 10px; vertical-align: middle; }

.case-paper { background: var(--case-paper); color: var(--case-ink); }
.case-layout { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 760px) minmax(150px, 1fr); gap: 40px; padding: 110px 3.1vw 130px; }
.case-toc { position: sticky; top: 108px; align-self: start; margin: 0; padding: 0; list-style: none; }
.case-toc li { border-top: 1px solid var(--case-line); }
.case-toc li:last-child { border-bottom: 1px solid var(--case-line); }
.case-toc a { display: flex; justify-content: space-between; padding: 12px 0; color: var(--case-muted); font-size: 12px; }
.case-toc a:hover { color: var(--case-ink); }
.case-copy { grid-column: 2; min-width: 0; }
.case-copy section { margin-bottom: 100px; scroll-margin-top: 100px; }
.case-copy section:last-child { margin-bottom: 0; }
.section-kicker { margin-bottom: 19px; color: #77776e; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.case-copy h2 { margin-bottom: 30px; font-size: clamp(36px, 3.8vw, 55px); font-weight: 550; letter-spacing: -.065em; line-height: 1.04; }
.case-copy h3 { margin: 0 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -.035em; }
.case-copy p, .case-copy li { font-size: 17px; line-height: 1.78; }
.case-copy p { margin-bottom: 22px; }

.material, .output-card { margin-top: 30px; padding: 28px; border: 1px solid var(--case-line); background: #f9f8f3; }
.material p, .output-card p { font-size: 15px; }
.material ul { margin: 0; padding-left: 20px; }
.material li + li { margin-top: 9px; }
.bad-prompt, .final-prompt { position: relative; margin-top: 30px; padding: 30px; border: 1px solid #292925; background: var(--case-ink); color: #efeee7; }
.bad-prompt { border-top: 5px solid #595954; }
.final-prompt { border-top: 5px solid var(--lime); }
.prompt-label { display: block; margin-bottom: 24px; color: #8e8e87; font-size: 11px; letter-spacing: .08em; }
.prompt-text { margin: 0; overflow-wrap: anywhere; color: #ebeae3; font-size: 16px; line-height: 1.8; white-space: pre-wrap; }
.copy-button { cursor: pointer; margin-top: 22px; border: 0; padding: 10px 14px; background: var(--lime); color: #10100d; font-size: 12px; font-weight: 700; }
.copy-button:hover { background: #dcff86; }
.copy-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.reason-list { border-top: 1px solid var(--case-line); }
.reason { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 27px 0; border-bottom: 1px solid var(--case-line); }
.reason-number { padding-top: 4px; color: #7a7a72; font-size: 12px; }
.reason p { margin: 0; color: #4c4c46; font-size: 15px; }
.output-row { display: grid; grid-template-columns: 135px 1fr; gap: 18px; padding: 19px 0; border-top: 1px solid var(--case-line); }
.output-row:first-child { border-top: 0; padding-top: 0; }
.output-row:last-child { padding-bottom: 0; }
.output-key { color: #707068; font-size: 12px; }
.output-value { margin: 0 !important; font-size: 15px !important; }

.check-panel { padding: 28px; border-left: 5px solid var(--lime); background: #20201d; color: #ecece5; }
.check-panel h2 { margin-bottom: 20px; }
.check-panel > p { color: #c3c3bb; }
.check-list { display: grid; gap: 10px; margin-top: 24px; }
.check-item { display: flex; gap: 11px; align-items: flex-start; padding: 13px; border: 1px solid #3b3b37; color: #d0d0c9; font-size: 14px; line-height: 1.55; }
.check-item input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--lime); flex: 0 0 auto; }
.check-note { margin-top: 20px !important; color: #8f8f89 !important; font-size: 12px !important; }
.coming-card { padding: 36px; border: 1px solid var(--case-line); background: #e8e7de; }
.coming-card strong { display: block; margin-bottom: 14px; color: #648800; font-size: 12px; letter-spacing: .08em; }

.case-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: #000; }
.case-next { position: relative; min-height: 210px; padding: 40px 3.1vw; transition: background .2s ease; }
.case-next + .case-next { border-left: 1px solid var(--line); }
.case-next:hover { background: #0d0d0c; }
.case-next small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.case-next strong { display: block; max-width: 70%; margin-top: 50px; font-size: clamp(25px, 3vw, 42px); font-weight: 500; letter-spacing: -.055em; }
.case-next span { position: absolute; right: 3.1vw; bottom: 39px; color: var(--lime); font-size: 27px; }

@media (max-width: 940px) {
  .case-layout { grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .case-hero { min-height: 560px; padding: 116px 16px 45px; }
  .case-hero::after { right: -38vw; bottom: -34vw; width: 100vw; }
  .case-hero h1 { margin: 70px 0 27px; font-size: clamp(48px, 15vw, 74px); }
  .case-deck { max-width: 340px; margin-left: 0; font-size: 17px; }
  .case-layout { display: block; padding: 75px 16px 90px; }
  .case-toc { display: none; }
  .case-copy section { margin-bottom: 80px; }
  .case-copy h2 { font-size: clamp(35px, 10.5vw, 47px); }
  .case-copy p, .case-copy li { font-size: 16px; }
  .material, .output-card, .bad-prompt, .final-prompt { padding: 21px; }
  .reason { grid-template-columns: 38px 1fr; gap: 9px; }
  .output-row { grid-template-columns: 1fr; gap: 7px; }
  .check-panel, .coming-card { padding: 24px 20px; }
  .case-nav { grid-template-columns: 1fr; }
  .case-next { min-height: 170px; }
  .case-next + .case-next { border-top: 1px solid var(--line); border-left: 0; }
  .case-next strong { margin-top: 34px; }
}

@media (max-width: 390px) {
  .case-hero h1 { font-size: 14.2vw; }
  .material, .output-card, .bad-prompt, .final-prompt { padding: 18px; }
  .case-next strong { max-width: 82%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
