/* ---------- story overview ---------- */
.st-ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .st-ov-grid { grid-template-columns: 1fr; } }
.st-ov-h { font-size: var(--step-1); margin-bottom: 8px; }
.st-ov-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.st-ov-list a { display: grid; grid-template-columns: 2.6em 1fr; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.st-ov-list a:hover { background: var(--hi-soft); }
.st-ov-list b { font-size: 1.1rem; display: block; }
.st-ov-n { font-weight: 850; font-size: 1.5rem; line-height: 1; color: var(--olive); font-variant-numeric: tabular-nums; }
.st-ov-sn { display: block; color: var(--ink-2); font-family: var(--f-read); font-size: 0.95rem; margin-top: 3px; }
.st-ov-side { position: sticky; top: 84px; }
.st-ov-side h3 { font-size: 1.05rem; margin-bottom: 6px; }
.st-key { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 7px; font-size: 0.9rem; }
.st-key li { display: grid; grid-template-columns: 3.2em 1fr; align-items: baseline; gap: 6px; }
.st-key .src { justify-self: start; font-size: 0.72rem; }

/* ---------- story reader ---------- */
.st-layout { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
@media (max-width: 960px) { .st-layout { grid-template-columns: 1fr; } .st-toc { display: none; } }
.st-toc-inner { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 20px; }
.st-toc-home { display: block; font-weight: 800; color: var(--ink); text-decoration: none; margin-bottom: 10px; }
.st-toc ol { list-style: none; margin: 0 0 16px; padding: 0; border-left: 1px solid var(--line); }
.st-toc li a { display: flex; gap: 10px; padding: 6px 10px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.st-toc li a span { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-3); min-width: 1.4em; padding-top: 1px; }
.st-toc li a:hover { color: var(--ink); }
.st-toc li a[aria-current] { color: var(--ink); border-left-color: var(--olive-2); background: var(--hi-soft); }
.st-switch { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.st-switch input { accent-color: var(--olive); width: 16px; height: 16px; }
.no-tags .st-prose .src { display: none; }

.st-body { min-width: 0; max-width: 760px; }
.st-head { display: flex; align-items: flex-end; gap: 18px; margin: 6px 0 28px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.st-num { font-size: clamp(3.4rem, 2.4rem + 4vw, 5.6rem); font-weight: 900; line-height: 0.8; color: var(--hi); -webkit-text-stroke: 1.5px var(--olive); letter-spacing: -0.04em; }
.st-head h1 { font-size: var(--step-3); padding-bottom: 4px; }
.st-prose { max-width: var(--read); }
.st-h { font-family: var(--f-ui); font-size: var(--step-1); margin: 1.8em 0 0.5em; }
.st-list { padding-left: 1.3em; margin: 0 0 1.1em; }
.st-list li { margin-bottom: 0.45em; padding-left: 0.2em; }
.st-list li::marker { color: var(--olive); font-family: var(--f-ui); font-weight: 800; }

.st-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.4em 0; font-family: var(--f-ui); }
@media (max-width: 640px) { .st-cmp { grid-template-columns: 1fr; } }
.st-cmp-side { border-radius: var(--r); padding: 14px 16px; border: 1px solid var(--line); }
.st-cmp-side h4 { font-size: 0.95rem; margin-bottom: 6px; }
.st-cmp-side p { font-size: 0.96rem; line-height: 1.55; margin: 0; }
.st-cmp-side.pl { background: var(--pl-soft); border-color: var(--pl-line); } .st-cmp-side.pl h4 { color: var(--pl); }
.st-cmp-side.df { background: var(--df-soft); border-color: var(--df-line); } .st-cmp-side.df h4 { color: var(--df); }
.st-cmp-side.ex { background: var(--surface); }

.st-table table.t th[scope="row"] { font-weight: 750; text-transform: none; letter-spacing: 0; font-size: 0.92rem; color: var(--ink); background: var(--bg); white-space: normal; min-width: 8em; }
@media (max-width: 640px) {
  .st-table { border: 0; overflow: visible; }
  .st-table table.t, .st-table tbody, .st-table tr, .st-table th, .st-table td { display: block; }
  .st-table thead { display: none; }
  .st-table tr { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
  .st-table th[scope="row"] { background: var(--surface) !important; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .st-table td { border-bottom: 1px dashed var(--line); }
  .st-table td::before { content: attr(data-col); display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
  .st-table caption { display: block; border: 0; padding: 0 2px 6px; }
}

.st-people { list-style: none; padding: 0; margin: 1.2em 0; display: grid; gap: 10px; font-family: var(--f-ui); }
.st-people li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.st-people li.pl { background: var(--pl-soft); border-color: var(--pl-line); } .st-people li.df { background: var(--df-soft); border-color: var(--df-line); }
.st-pname { font-weight: 800; }
.st-people p { grid-column: 1 / -1; margin: 0; font-size: 0.95rem; color: var(--ink-2); }

.st-tl { list-style: none; padding: 0; margin: 1em 0; font-family: var(--f-ui); font-size: 0.95rem; }
.st-tl li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.st-tl time { font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .st-tl li { grid-template-columns: 1fr; gap: 2px; } }

.st-related { margin: 40px 0 0; padding: 18px; border-radius: var(--r-lg); background: var(--olive-soft); }
.st-related h2 { font-size: 1rem; margin-bottom: 10px; }
.st-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.st-pager a { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color 200ms, transform 200ms var(--ease); }
.st-pager a:hover { border-color: var(--olive-2); transform: translateY(-2px); color: var(--ink); }
.st-pager a span { font-size: 0.82rem; color: var(--ink-3); font-weight: 700; }
.st-next { text-align: right; }
@media (max-width: 520px) { .st-pager { grid-template-columns: 1fr; } .st-next { text-align: left; } }
