.story-page {
  --story-ink: #191b17;
  --story-muted: #5f625a;
  --story-rule: #cecfc5;
  --story-orange: #fa663e;
  width: min(1192px, calc(100% - clamp(40px, 9.4vw, 140px)));
  margin-inline: auto;
  color: var(--story-ink);
}
.story-page [hidden] { display: none !important; }
.story-page :where(h1,h2,p,figure,dl,dd,ul) { margin: 0; }
.story-page a { color: inherit; }
.story-page :where(button,input) { font: inherit; }
.story-hero {
  display: grid;
  grid-template-columns: 1.23fr 1fr;
  align-items: center;
  gap: clamp(36px, 6.4vw, 96px);
  padding: clamp(42px, 5.7vw, 87px) 0 clamp(44px, 5.2vw, 78px);
}
.story-kicker, .story-small-heading, .story-sheet-marker, .story-context dt {
  font-family: var(--font-mono, ui-monospace, monospace);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .1em;
}
.story-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.story-kicker span { width: 23px; height: 2px; background: var(--story-orange); }
.story-intro h1 {
  max-width: 18ch; color: var(--story-ink); font-size: clamp(40px, 5.05vw, 77px);
  font-weight: 650; line-height: .99; letter-spacing: -.065em; text-wrap: balance;
}
.story-intro h1 > span, .story-library h2 > span, .story-dialog h2 > span { color: #df512c; }
.story-dek {
  max-width: 53ch; margin: 24px 0 28px;
  font-size: clamp(16px, 1.22vw, 19px); line-height: 1.65; color: var(--story-muted);
}
.story-tools { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.story-read, .story-share, .story-text-link { font-weight: 600; font-size: 14px; }
.story-read {
  display: inline-flex; align-items: center; gap: 18px; min-height: 46px;
  padding: 0 20px; background: var(--story-ink); color: #fff !important;
  border-radius: 99px; text-decoration: none; transition: background-color .18s;
}
.story-read:hover, .story-copy-button:hover { background: #394035; }
.story-read span { font-size: 18px; }
.story-share, .story-text-link {
  display: inline-flex; min-height: 44px; align-items: center; gap: 8px;
  text-decoration: none; background: none; border: 0; padding: 0; color: var(--story-ink); cursor: pointer;
}
.story-share:hover, .story-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.story-share svg { height: 16px; width: 16px; }
.story-art {
  width: 100%; aspect-ratio: 1.12; overflow: hidden; position: relative;
  display: grid; place-items: center; isolation: isolate;
  background-color: #ced9c6;
  background-image: radial-gradient(ellipse at 12% 0%, #fbfff44d, transparent 75%), repeating-linear-gradient(0deg,#40523c0d 0 1px,transparent 1px 20px), repeating-linear-gradient(90deg,#40523c0d 0 1px,transparent 1px 20px);
  border: 1px solid #354a2c1f; border-radius: 6px;
}
.story-art::before {
  content: ''; position: absolute; inset: 5% auto auto 5%; width: 10px; height: 10px;
  border-top: 1px solid #31393175; border-left: 1px solid #31393175;
}
.story-art::after {
  content: ''; position: absolute; inset: auto 5% 5% auto; width: 10px; height: 10px;
  border-bottom: 1px solid #31393175; border-right: 1px solid #31393175;
}
.story-sheet {
  width: 65%; padding: 5.5%; transform: rotate(-7deg);
  color: #1e3429; background: #f8f4e7;
  box-shadow: 1px 1px #fcfcf9, 2px 3px #b8b4a7, 4px 5px #f8f4e7, 5px 6px #b7baab, 8px 10px 15px -9px #1b2f2465, 8px 17px 26px -12px #1c2c2273;
}
.story-sheet-marker {
  display: flex; justify-content: space-between; font-size: clamp(7px,.64vw,10px); letter-spacing: .115em;
  padding-bottom: 6px; border-bottom: 1px solid currentColor;
}
.story-sheet-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px, 5.8vw, 86px); line-height: 1.26; letter-spacing: -.095em; }
.story-sheet-title span { color: #be603d; }
.story-ledger-row, .story-order-row { display: flex; gap: 8px; align-items: center; border-top: 1px solid #43564163; padding: 3.4% 0; font-size: clamp(9px,.96vw,14px); }
.story-ledger-row i { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; border: 1px solid #42553e; font-style: normal; }
.story-ledger-row svg { display: block; width: 80%; height: 80%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.story-ledger-row b, .story-order-row i { margin-left: auto; font-family: ui-monospace, monospace; }
.story-sheet-end { display: flex; gap: 3px; border-top: 1px solid #43564163; padding-top: 6%; }
.story-sheet-end span { display: block; height: 3px; width: 13px; background: #64745e; }
.story-sheet-end span:last-child { width: 4px; }
.story-art-order {
  background-color: #ecb899;
  background-image: radial-gradient(ellipse at 75% 0%, #ffecce60, transparent 70%), repeating-linear-gradient(0deg,#7b513c0a 0 1px,transparent 1px 19px), repeating-linear-gradient(90deg,#7b513c0a 0 1px,transparent 1px 19px);
}
.story-art-order .story-sheet { color: #462e28; transform: rotate(6deg); }
.story-order-row span { font-family: ui-monospace,monospace; font-size: .8em; color: #7c6557; }
.story-order-row b { font-weight: 500; }
.story-body-layout {
  scroll-margin-top: 92px;
  display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2.1fr);
  gap: clamp(24px, 6vw, 94px); padding: clamp(38px,5.1vw,76px) 0 clamp(44px, 6vw, 90px);
  border-top: 1px solid var(--story-rule);
}
.story-small-heading { margin-bottom: 26px; color: var(--story-ink); }
.story-context dt { font-size: 10px; color: var(--story-muted); letter-spacing: .085em; }
.story-context dd { margin: 3px 0 19px; font-size: 15px; line-height: 1.4; }
.story-copy { max-width: 68ch; }
.story-copy h2, .story-library h2, .story-dialog h2 {
  font-size: clamp(27px, 2.75vw, 39px); line-height: 1.1; font-weight: 620; letter-spacing: -.055em;
}
.story-copy p { margin: 14px 0; color: #4b5049; font-size: clamp(16px,1.28vw,19px); line-height: 1.73; }
.story-copy p + h2 { margin-top: 38px; }
.story-library { border-top: 1px solid var(--story-rule); padding: clamp(38px,5vw,70px) 0 clamp(56px,7vw,102px); }
.story-library h2 { margin-bottom: 20px; }
.story-library ul { list-style: none; padding: 0; }
.story-library li { border-bottom: 1px solid var(--story-rule); }
.story-library a { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 2px; font-size: clamp(16px,1.7vw,24px); line-height: 1.35; font-weight: 550; letter-spacing: -.025em; text-decoration: none; }
.story-library a::after { content: '↗'; font-size: 1.2em; }
.story-library a:hover, .story-library a:hover::after { color: #a93b20; }
.story-library a[aria-current]::after { content: 'Reading now'; flex-shrink: 0; font-family: var(--font-mono, ui-monospace, monospace); font-weight: 500; font-size: 10px; letter-spacing: .03em; color: var(--story-muted); }
.story-page .story-dialog { width: min(465px,calc(100% - 36px)); margin: auto; border: 1px solid var(--story-rule); border-radius: 8px; padding: 32px 24px 20px; background: #f8f7f3; color: var(--story-ink); box-shadow: 0 12px 60px #16191232; }
.story-dialog::backdrop { background: #1619127a; }
.story-close { position: absolute; right: 7px; top: 3px; width: 40px; height: 40px; font-size: 24px !important; background: none; border: 0; color: var(--story-ink); cursor: pointer; }
.story-dialog label { display: block; margin: 24px 0 5px; font-size: 13px; font-weight: 600; }
.story-dialog-fields { display: flex; gap: 6px; }
.story-dialog input { flex: 1; min-width: 0; border: 1px solid var(--story-rule); padding: 10px; background: white; color: var(--story-ink); border-radius: 4px; }
.story-copy-button { font-size: 13px !important; background: var(--story-ink); color: white; border: 0; border-radius: 4px; padding: 0 14px; cursor: pointer; }
.story-copy-status { min-height: 1.5em; margin-top: 9px !important; color: var(--story-muted); font-size: 13px; }
@media (max-width: 760px) {
  .story-page { width: calc(100% - 40px); }
  .story-hero { grid-template-columns: 1fr; gap: 30px; }
  .story-intro h1 { max-width: 18ch; font-size: clamp(43px, 8.2vw, 58px); }
  .story-kicker { margin-bottom: 15px; }
  .story-dek { margin: 17px 0 20px; }
  .story-art { aspect-ratio: 1.66; }
  .story-sheet { width: 49%; padding: 3.6%; }
  .story-sheet-title { font-size: clamp(35px, 7.8vw, 55px); }
  .story-sheet-marker { font-size: clamp(6px,1.2vw,9px); }
  .story-ledger-row, .story-order-row { font-size: clamp(8px,1.65vw,12px); }
  .story-body-layout { grid-template-columns: 1fr; gap: 32px; }
  .story-small-heading { margin-bottom: 12px; }
  .story-context dl { display: grid; grid-template-columns: 1fr 1.2fr 1.1fr; grid-template-rows: auto auto; grid-auto-flow: column; column-gap: 12px; }
  .story-context dd { margin-bottom: 0; font-size: 13px; }
}
@media (max-width: 390px) {
  .story-art { aspect-ratio: 1.4; }
  .story-sheet { width: 61%; }
  .story-intro h1 { font-size: 39px; }
}
