/* Ridotto guides: calm reference pages in the house colours.
   Navy room, cream type, brass trim, Playfair for headings, the coach on his
   leather rail band. No scroll staging: every page reads the same without JS. */

@font-face { font-family: "Playfair"; src: url(/fonts/playfair-latin.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Playfair Fallback"; src: local("Georgia"); size-adjust: 106%; ascent-override: 98%; descent-override: 24%; }

:root {
  --navy: #0a1028; --navy-2: #0e1636; --navy-3: #16214a; --canal: #13244f;
  --felt: #0b3b2e; --felt-hi: #17694f; --ox: #6e1f2a;
  --cream: #f4efe6; --paper: #f1e8d6; --brass: #c9a25e; --brass-lt: #e2c387; --ink: #15110b;
  --soft: rgba(244, 239, 230, .86); --muted: rgba(244, 239, 230, .66); --hair: rgba(244, 239, 230, .12);
  --serif: "Playfair", "Playfair Fallback", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gut: 16px; --read: 44rem; --wide: 72rem;
  color-scheme: dark;
}
@media (min-width: 700px) { :root { --gut: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--navy); scroll-padding-top: 84px; }
body { margin: 0; color: var(--soft); background: var(--navy) radial-gradient(120% 60rem at 50% 6rem, var(--canal), transparent 70%) no-repeat;
  font: 400 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brass-lt); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(226, 195, 135, .45); }
a:hover { color: var(--cream); text-decoration-color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass-lt); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); color: var(--cream); line-height: 1.12; margin: 0; text-wrap: balance; }
p, ul, ol { margin: 0; }
b, strong { color: var(--cream); font-weight: 650; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[data-store="beta"] .live-only, html[data-store="live"] .beta-only { display: none !important; }
/* the App Store button: the site's own pill until Apple's badge is in /assets/img/app-store.svg and <html> says
   data-badge="art" (?badge=art previews the slot). The founders' line shows only before founders.json's cutoff. */
html:not([data-badge="art"]) .badge-art, html[data-badge="art"] .badge-text { display: none !important; }
[data-founders][hidden] { display: none !important; }
.founders { margin: 14px auto 0; max-width: 32em; font: 400 16px/1.45 var(--serif); color: var(--brass-lt); text-wrap: balance; }
.founders .nb { display: block; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--cream); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 12px; }

/* ---------------------------------------------------------------- the bar */
.bar { position: sticky; top: 0; z-index: 50; padding: 10px var(--gut) 8px; background: rgba(10, 16, 40, .9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.bar-in { max-width: var(--wide); margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 999px;
  background: rgba(10, 16, 40, .97); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(201, 162, 94, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .35); }
.home { display: flex; align-items: center; gap: 9px; text-decoration: none; padding-right: 8px; border-radius: 999px; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-word { width: auto; height: 19px; flex: none; }
.bar nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.bar nav a { font: 600 14px/1 var(--sans); color: var(--muted); text-decoration: none; padding: 11px 12px; border-radius: 999px; white-space: nowrap; }
.bar nav a:hover { color: var(--cream); background: rgba(255, 255, 255, .06); }
.bar nav a[aria-current] { color: var(--cream); background: rgba(201, 162, 94, .16); }
@media (max-width: 640px) { .brand-word { display: none; } .bar nav a { padding-inline: 9px; font-size: 13.5px; } }
@media (max-width: 350px) { .bar nav a { padding-inline: 6px; font-size: 12.5px; } }

/* ---------------------------------------------------------------- page */
main { display: block; }
.wrap { max-width: calc(var(--wide) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.head { padding-top: clamp(36px, 7vw, 72px); }
.head > * { max-width: var(--read); }
.head .answer { max-width: 42rem; }
/* the reading column, with the contents beside it on wide screens */
.page { margin-top: 8px; }
.col { min-width: 0; max-width: var(--read); }
@media (min-width: 1100px) {
  .page { display: grid; grid-template-columns: minmax(0, var(--read)) minmax(12rem, 15rem); column-gap: clamp(48px, 6vw, 96px); align-items: start; }
  .page > .col { grid-column: 1; grid-row: 1; }
  .page > .toc { grid-column: 2; grid-row: 1; position: sticky; top: 96px; margin-top: 72px; }
  .page .toc ul { flex-direction: column; gap: 2px; }
  .page .toc a { border: 0; background: none; padding: 8px 0; font-size: 14px; color: var(--muted); border-radius: 0; }
  .page .toc a:hover { color: var(--cream); }
  .page .toc .toc-h { display: block; }
}
.crumbs { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--muted); }
.crumbs a { color: var(--brass); text-decoration: none; }
.crumbs a:hover { color: var(--brass-lt); }
h1 { font-size: clamp(38px, 7.2vw, 64px); font-weight: 800; letter-spacing: -.01em; margin-top: 14px; }
.answer { margin-top: 18px; font-size: clamp(18px, 2.1vw, 20px); line-height: 1.55; color: var(--cream); max-width: 40em; }
.meta { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.meta span + span::before { content: "·"; margin: 0 8px; }

.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: clamp(26px, 3.4vw, 32px); font-weight: 700; margin-top: clamp(52px, 8vw, 72px); scroll-margin-top: 90px; }
.prose h2 + * { margin-top: 14px; }
.prose h3 { font-size: 20px; font-weight: 700; margin-top: 30px; }
.prose h3 + * { margin-top: 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--brass); }
.note { font-size: 14.5px; color: var(--muted); }
.callout { border-left: 2px solid var(--brass); padding: 4px 0 4px 16px; color: var(--cream); }

/* the contents: a chip row on phones, a quiet list beside the column on wide screens */
.toc { margin-top: 26px; }
.toc-h { display: none; font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.toc a { display: inline-block; font: 600 13.5px/1 var(--sans); color: var(--soft); text-decoration: none; padding: 10px 13px; border-radius: 999px;
  border: 1px solid var(--hair); background: rgba(255, 255, 255, .03); }
.toc a:hover { color: var(--cream); border-color: rgba(201, 162, 94, .5); }

/* ---------------------------------------------------------------- the coach's rail */
.rail { --tab: 54px; position: relative; display: flex; align-items: center; margin-top: 26px; padding-left: calc(var(--tab) * .6); max-width: 40rem; }
.rail .lamp { position: absolute; z-index: 2; left: 0; top: 50%; width: calc(var(--tab) * .95); height: calc(var(--tab) * .95 * 194 / 144); translate: 0 -54%;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.rail .band { position: relative; flex: 1; min-height: var(--tab); border-radius: calc(var(--tab) / 2); display: flex; align-items: center;
  padding: 10px calc(var(--tab) * .42) 10px calc(var(--tab) * .62);
  background: radial-gradient(70% 140% at 0% 50%, rgba(255, 186, 104, .26), rgba(255, 170, 80, .08) 45%, transparent 75%),
    linear-gradient(180deg, #3a2e25 0%, #241c16 10%, #16110d 45%, #0d0a08 85%, #050403 100%);
  box-shadow: inset 0 -3px 3px rgba(0, 0, 0, .5), 0 4px 9px rgba(0, 0, 0, .55); }
.rail .band::before { content: ""; position: absolute; inset: 4.5px; border-radius: calc(var(--tab) / 2 - 4.5px); border: .9px dashed rgba(216, 190, 140, .5); pointer-events: none; }
.rail p { position: relative; font: 400 17px/1.45 var(--sans); letter-spacing: -.01em; color: var(--cream); text-wrap: pretty; }
.rail p b { font-weight: 650; }
@media (min-width: 700px) { .rail { --tab: 60px; } .rail p { font-size: 18px; } }

/* ---------------------------------------------------------------- tables, general */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); }
caption { text-align: left; caption-side: top; padding-bottom: 10px; color: var(--cream); font: 700 18px/1.3 var(--serif); }
caption span { display: block; font: 400 13.5px/1.45 var(--sans); color: var(--muted); margin-top: 2px; }
table.plain { width: 100%; border-collapse: collapse; font-size: 15.5px; }
table.plain th, table.plain td { text-align: left; vertical-align: top; padding: 11px 10px 11px 0; border-top: 1px solid var(--hair); }
table.plain thead th { font: 600 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brass); border-top: 0; padding-top: 0; }
table.plain tbody th { color: var(--cream); font-weight: 650; width: 32%; }

/* ---------------------------------------------------------------- close + footer */
.close { margin-top: clamp(64px, 10vw, 96px); padding-top: clamp(40px, 7vw, 64px); padding-bottom: 8px; border-top: 1px solid rgba(201, 162, 94, .25);
  text-align: center; }
.close .rail { margin: 0 auto; text-align: left; width: fit-content; max-width: 40rem; }
.close .cta { margin-top: 26px; display: flex; justify-content: center; }
.close .blurb { margin: 18px auto 0; max-width: 32em; font-size: 15px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; font: 600 16px/1 var(--serif);
  text-decoration: none; color: var(--ink); background: var(--brass); border: 1.5px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--cream); white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.pill:hover { color: var(--ink); background: var(--brass-lt); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--cream); }
.pill:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--cream); }
.badge img { width: 156px; height: 52px; }
@media (prefers-reduced-motion: reduce) { .pill { transition: none; } }

.fine { margin-top: 40px; padding-top: 26px; padding-bottom: max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); text-align: center; font-size: 12.5px; line-height: 1.5; color: rgba(244, 239, 230, .62); }
.fine p + p { margin-top: 10px; }
.fine .honest em { font-style: normal; color: var(--cream); }
.fine nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 13px; }
.fine nav a { color: rgba(244, 239, 230, .8); padding: 6px 0; }
.fine .legal { color: rgba(244, 239, 230, .48); font-size: 12px; }
.fine .legal a { color: rgba(244, 239, 230, .7); }

/* related guides */
.related { margin-top: 40px; display: grid; gap: 10px; }
@media (min-width: 640px) { .related { grid-template-columns: 1fr 1fr; } }
.related a { display: block; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .03); text-decoration: none; color: var(--soft); }
.related a:hover { border-color: rgba(201, 162, 94, .55); color: var(--soft); }
.related b { display: block; font: 700 18px/1.25 var(--serif); color: var(--cream); }
.related span { font-size: 14.5px; }

@media print {
  .bar, .close, .fine, .toc, .rules, .coachbox, .related, .rail { display: none !important; }
  body { background: #fff; color: #000; }
}
