/* Sand Glass. Loaded last on every page.
   Dark slate ground, one fixed full-bleed art plate behind everything, soft washes instead of panels,
   open text with thin copper rules, masked fades for teased text. No opaque rectangles. */

:root {
  --sg-ground: #14161f;
  --sg-ink: #eef0fb;
  --sg-muted: #dde0f3;
  --sg-copper: #d79a5c;
  --sg-fade: 20, 22, 31;
  --sg-line: rgba(215, 154, 92, .4);
  --sg-soft: rgba(255, 255, 255, .06);
  --sg-soft-2: rgba(255, 255, 255, .1);
  --sg-btn-ink: #14161f;
}

html { background: var(--sg-ground); color-scheme: dark; }
body { color: var(--sg-ink); background: transparent; position: relative; }

/* ---------- the art: fixed behind every screen, with a wash that lets the page fade out of it ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 74% 90% at 14% 55%, rgba(var(--sg-fade), .92), rgba(var(--sg-fade), .7) 50%, rgba(var(--sg-fade), 0) 88%),
    linear-gradient(180deg, rgba(var(--sg-fade), .8) 0%, rgba(var(--sg-fade), .3) 9%, rgba(var(--sg-fade), 0) 20%, rgba(var(--sg-fade), 0) 55%, rgba(var(--sg-fade), .95) 100%),
    url(/art/sandglass-hero.jpg) 70% 40% / cover no-repeat;
  background-color: var(--sg-ground);
}
/* the landing art is the hero itself: it scrolls away and the page below fades into plain slate */
body:has(.hero-night)::before { position: absolute; height: 100vh; height: 100dvh; }
/* every screen except the landing page gets the stronger scrim so text always has a calm field */
body:not(:has(.hero-night))::before {
  background:
    radial-gradient(ellipse 95% 110% at 38% 55%, rgba(var(--sg-fade), .95), rgba(var(--sg-fade), .88) 55%, rgba(var(--sg-fade), .66) 100%),
    url(/art/sandglass-hero.jpg) 70% 40% / cover no-repeat;
  background-color: var(--sg-ground);
}
@media (max-width: 760px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(var(--sg-fade), .62) 0%, rgba(var(--sg-fade), .7) 42%, rgba(var(--sg-fade), .94) 66%, rgba(var(--sg-fade), 1) 100%),
      url(/art/sandglass-hero-1000.jpg) 78% 30% / cover no-repeat;
    background-color: var(--sg-ground);
  }
  body:not(:has(.hero-night))::before {
    background:
      linear-gradient(180deg, rgba(var(--sg-fade), .86) 0%, rgba(var(--sg-fade), .9) 42%, rgba(var(--sg-fade), .96) 66%, rgba(var(--sg-fade), 1) 100%),
      url(/art/sandglass-hero-1000.jpg) 78% 30% / cover no-repeat;
    background-color: var(--sg-ground);
  }
}
canvas.dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }

/* ---------- type ---------- */
body { font-family: var(--sans); font-weight: 400; }
h1, h2, h3, .wordmark { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; letter-spacing: 0; text-wrap: balance; }
h1 { line-height: 1.04; }
h2 { line-height: 1.1; }
h1 em, h2 em { font-style: italic; }
.wordmark { font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.3rem); letter-spacing: .02em; color: var(--sg-ink); }
::selection { background: var(--sg-copper); color: var(--sg-btn-ink); }
/* --serif is Alegreya Sans (running text); Cormorant is for headings, values and quoted lines */
.mrow-val, .rd-val, .sc-top b, .el-row b, .person b, .band b, .ritem b, .lever-title, .tease .el-name, .mini-el, .mini-lines li, .ifyou, .pole b, .birth .row b,
.sky-facts dd, .planet-list dd, .day-sections .day-value, .appr-n, .rd-n, .price, .alignment-value, .teaser, .ms-line, .free-locked-list .free-num, .letter-sample h3,
.interstitial .teaser, .day-prompt, .dim-q, .acard-tag, .rhero .tag, .steps li::before, .lede.quote, blockquote {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500;
}
.mrow-val, .rd-val, .sc-top b, .el-row b, .person b, .ritem b, .ms-line, .mini-lines li { font-weight: 600; }
.mini-lines li, .ms-line, .teaser { font-size: 1.4rem; }
.hero-sub, .lede, .band-head p, .step-form .lede, .reveal .lede { font-size: clamp(1.1rem, 1.7vw, 1.28rem); line-height: 1.55; color: var(--sg-muted); }
.sec p { font-size: 1.1rem; line-height: 1.62; }
.lead { font-size: 1.22rem !important; line-height: 1.58 !important; }
.eyebrow, .q-kicker, .kicker, .folio-label, .chapter-line {
  font-family: var(--sans); font-style: normal; font-weight: 500; font-size: .95rem; letter-spacing: .02em; color: var(--sg-copper);
}
.muted, .dim { color: var(--sg-muted); }
.dim { opacity: .9; }

/* ---------- shell ---------- */
.topbar { border-bottom: 0; background: none; padding-bottom: 10px; position: relative; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--sg-line), transparent 85%); }
.toplink { color: var(--sg-muted); }
.toplink:hover, .toplink[aria-current="page"] { color: var(--sg-ink); box-shadow: none; }
.toplink[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sg-copper); text-underline-offset: 8px; }
.foot { border-top: 0; position: relative; color: var(--sg-muted); }
.foot::before { content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: linear-gradient(90deg, transparent, var(--sg-line), transparent); }
.foot a { color: var(--sg-muted); }
.foot a:hover { color: var(--sg-ink); }
:focus-visible { outline: 2px solid var(--sg-copper); outline-offset: 4px; }

/* ---------- buttons, fields ---------- */
.btn { border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--sg-line); color: var(--sg-ink); font-family: var(--sans); font-weight: 500; border-radius: 999px; }
.btn:hover { background: var(--sg-soft); box-shadow: inset 0 0 0 1px var(--sg-copper); border-color: transparent; }
.btn-primary { background: var(--sg-copper); color: var(--sg-btn-ink); box-shadow: none; border-color: transparent; }
.btn-primary:hover { background: var(--gilt-bright, #e8b684); box-shadow: 0 0 22px rgba(215, 154, 92, .35); }
.text-link, .textlink, .report-index a { color: var(--sg-copper); }
.text-link:hover, .textlink:hover { color: var(--gilt-bright, #e8b684); }
.linkbtn, .more { color: var(--sg-muted); }
.input, select, textarea.input, .ask-input {
  background: var(--sg-soft); border: 0; box-shadow: inset 0 0 0 1px rgba(215, 154, 92, .4); border-radius: 12px; color: var(--sg-ink);
}
.input::placeholder, .ask-input::placeholder { color: var(--sg-muted); opacity: .75; }
.input:focus, select:focus, .ask-input:focus { box-shadow: inset 0 0 0 1px var(--sg-copper); outline: 2px solid var(--sg-copper); outline-offset: 2px; }
select option { background: #1b1e2b; color: var(--sg-ink); }
.field > span, .legend, .dob-fields label > span { color: var(--sg-muted); }
.back { background: var(--sg-soft); border: 0; box-shadow: inset 0 0 0 1px var(--sg-line); }
.back:hover:not(:disabled) { background: var(--sg-soft-2); }
.err { color: #ffb59a; }

/* ---------- surfaces: washes and rules, never boxes ---------- */
.card, .tease, .teaser, .flavour, .person, .soon-card, .rcard, .ritem, .subscription-callout, .band-in, .place-chosen, .ask-answer, .toc details, .tease, .secret, .optional-details {
  background: radial-gradient(ellipse 90% 66% at 28% 50%, rgba(var(--sg-fade), .5), rgba(var(--sg-fade), 0) 100%);
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  position: relative;
}
.card, .tease, .teaser, .flavour, .secret, .subscription-callout, .ask-answer { border-radius: 0; background: radial-gradient(ellipse 90% 66% at 22% 50%, rgba(var(--sg-fade), .5), rgba(var(--sg-fade), 0) 100%); }
.card::before, .tease::before, .teaser::before, .flavour::before, .secret::before, .subscription-callout::before, .ask-answer::before, .person::before, .soon-card::before, .rcard::before, .ritem::before {
  content: ""; position: absolute; left: 0; top: .5em; bottom: .5em; width: 1px; background: linear-gradient(var(--sg-copper), transparent);
}
.card, .tease, .teaser, .flavour, .secret, .subscription-callout, .ask-answer { padding-left: clamp(18px, 3vw, 28px); }
.secret { text-align: left; border: 0; }
.flavour { border-inline-start: 0; }
.teaser { border: 0; }
.band-in { background: var(--sg-soft); box-shadow: inset 0 0 0 1px var(--sg-line); border-radius: 16px; }
.band input:checked + .band-in { background: linear-gradient(135deg, rgba(215, 154, 92, .25), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px var(--sg-copper); border-color: transparent; }
.band input:checked + .band-in svg { stroke: var(--sg-copper); }
.ritem, .person, .soon-card, .rcard { background: radial-gradient(ellipse 90% 66% at 22% 50%, rgba(var(--sg-fade), .5), rgba(var(--sg-fade), 0) 100%); box-shadow: none; border-radius: 0; padding-left: clamp(18px, 3vw, 26px); }
.ritem:hover { background: radial-gradient(ellipse 90% 66% at 22% 50%, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 100%); }
.rcard-img { width: 6.4rem; height: 6.4rem; aspect-ratio: 1; align-self: center; flex: none; }
.rcard { grid-template-columns: 6.4rem minmax(0, 1fr); }
.sheet { color: var(--sg-ink); }
.tease .el-name { font-family: 'Cormorant Garamond', serif; font-weight: 500; }
.sec h2::after { background: linear-gradient(90deg, var(--sg-copper), transparent); width: 64px; }
.fine { border-top: 0; position: relative; color: var(--sg-muted); }
.fine::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, var(--sg-line), transparent 80%); }
.list li, .facts li, .mrow, .birth .row, .method-list li, .threads li, .rd, .day-sections section, .dim-row, .appr-row, .sc-row, .el-row, .acard,
.sky-facts div, .planet-list div, .day-list article, .family-list article, .trait-list article, .preference-bars article, .deck-note { border-color: rgba(215, 154, 92, .22); }
.facts, .mrows, .dims, .appr, .sc-rows, .rd-list, .elements, .report-index { border-color: rgba(215, 154, 92, .3); }
.twelve, .report-index { border-block-style: solid; }
.report-index { border-top: 1px solid rgba(215, 154, 92, .3); border-bottom: 0; }
.reading-shadow, .secret { border-block: 0; border-image: none; }
.reading-shadow { background: radial-gradient(ellipse 90% 66% at 22% 50%, rgba(var(--sg-fade), .45), rgba(var(--sg-fade), 0) 100%); }
.modal { border: 0; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px var(--sg-line); border-radius: 18px; background: rgba(27, 30, 43, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--sg-ink); }
.modal::backdrop { background: rgba(var(--sg-fade), .7); }
.toast { background: rgba(60, 28, 24, .92); color: #ffd9cc; border: 0; box-shadow: inset 0 0 0 1px rgba(255, 150, 120, .35); backdrop-filter: blur(8px); }
.toast.ok { background: rgba(20, 44, 40, .92); color: #cdeee4; box-shadow: inset 0 0 0 1px rgba(124, 201, 184, .4); }
.skel { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); border-radius: 12px; }
.sharebar { padding-top: 46px; background: linear-gradient(180deg, rgba(var(--sg-fade), 0), rgba(var(--sg-fade), .7) 42%, rgba(var(--sg-fade), .94)); border-top: 0; pointer-events: none; }
.sharebar .in { pointer-events: auto; }
body:has(.sharebar) { padding-bottom: 150px; }
.sharebar::before { display: none; }
.sharebar .btn:not(.btn-primary) { background: rgba(var(--sg-fade), .6); }
.nf h1 { color: var(--sg-muted); }

/* ---------- landing ---------- */
.hero-night {
  margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut);
  min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; overflow: visible; isolation: auto;
}
.hero-night picture, .hero-night .hero-art { display: none; }
.hero-night::before { display: none; }
.hero-copy { max-width: 640px; padding-bottom: 8vh; }
.hero-night h1 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: 1.04; max-width: 14ch; margin-bottom: 22px; }
.hero-night h1 em { color: var(--sg-copper); display: block; }
.hero-night .hero-sub { color: var(--sg-muted); max-width: 34em; }
.hero-actions { gap: 14px 22px; }
.band { margin-top: clamp(56px, 9vw, 120px); }
.band-head { max-width: 1100px; }
.band-head h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.deck-note b, .acard h3 a { font-family: 'Cormorant Garamond', serif; font-weight: 600; color: var(--sg-ink); }
.deck-note small, .acard-tag { color: var(--sg-copper); }
.acard-tag { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 500; }
.acard-el { font-weight: 500; }
.acard { border-top: 0; text-align: center; }
.acard-body { padding-top: 16px; }
.acard-sum { color: var(--sg-muted); margin-inline: auto; }
.closing h2 { max-width: 18ch; }
.letter-sample { transform: none; }
.method-list li { border-top: 1px solid rgba(215, 154, 92, .22); color: var(--sg-muted); }
.method-list b { color: var(--sg-ink); font-weight: 500; }
@media (max-width: 760px) {
  .hero-night { justify-content: flex-end; min-height: calc(100dvh - 130px); }
  .hero-copy { padding-bottom: 10vh; }
  .topnav { gap: 0 14px; }
}

/* ---------- portraits: round, thin copper rim, soft shadow ---------- */
.acard .tcard, .rhero .art, .rcard-img, .primary-portrait > img, .nearby-portraits img, .glimpse .tcard.square, .tcard.is-portrait, .start-intro img, .lead-plate.is-round {
  border-radius: 50%; aspect-ratio: 1; overflow: hidden; background: rgba(var(--sg-fade), .5);
  border: 0; outline: 0; padding: 0;
  box-shadow: 0 0 0 1px var(--sg-line), 0 30px 80px -30px rgba(0, 0, 0, .65);
}
.acard .tcard { width: min(100%, 220px); margin-inline: auto; }
.acard .tcard::after { display: none; }
.acard .tcard-title, .acard .tcard-num { display: none; }
.acard .tcard-plate, .rhero .art img, .rcard-img img { object-fit: cover; width: 100%; height: 100%; }
.rhero .art { width: min(60vw, 300px); }
.rcard-img { border-radius: 50%; background: rgba(var(--sg-fade), .5); }
.primary-portrait > img { border-radius: 50%; width: min(100%, 340px); height: auto; margin-inline: auto; border: 0; }
.nearby-portraits img { border-radius: 50%; }
/* each portrait already holds its own round glass; crop to it so there is one ring, not two */
.acard .tcard img, .acard .tcard-plate, .rhero .art img, .rcard-img img, .glimpse .tcard.square img, .tcard.is-portrait img { transform: scale(1.3); }
.primary-portrait > img, .nearby-portraits img { clip-path: circle(38.5% at 50% 50%); transform: scale(1.3); }
.rhero h1 { color: var(--sg-ink); font-weight: 500; }
.rhero .meta, .rhero .tag { font-family: var(--sans); }
.rhero .tag { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.5rem; color: var(--sg-muted); }
.alignment-value, .alignment-value small { color: var(--sg-copper); }
.alignment-track { background: rgba(255, 255, 255, .08); }
.alignment-track i, .trait-track i { background: linear-gradient(90deg, transparent, var(--sg-copper)); box-shadow: 0 0 10px rgba(215, 154, 92, .5); }
.trait-track { background: rgba(255, 255, 255, .06); border-radius: 3px; }

/* ---------- reading plates (the cards): no frames, edges dissolve into the wash ---------- */
.tcard { background: transparent; border: 0; box-shadow: none; border-radius: var(--card-radius, 14px); }
.tcard::after, .turn .tcard > .side::after { display: none; }
.tcard-plate {
  -webkit-mask-image: radial-gradient(ellipse 47% 46% at 50% 46%, #000 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 47% 46% at 50% 46%, #000 42%, transparent 100%);
}
.acard .tcard-plate, .rhero .art img, .rcard-img img { -webkit-mask-image: none; mask-image: none; }
.tcard-fallback { background: radial-gradient(circle at 50% 42%, rgba(215, 154, 92, .22), transparent 62%); color: var(--sg-copper); }
.tcard-fallback .tcard-big, .tcard-fallback svg { color: var(--sg-copper); }
.tcard-num { color: var(--sg-copper); text-shadow: none; font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.tcard-title { background: radial-gradient(ellipse 62% 100% at 50% 100%, rgba(var(--sg-fade), .85), rgba(var(--sg-fade), 0) 100%); color: var(--sg-ink); }
.tcard-title b { font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.tcard-title small { color: var(--sg-muted); }
.tcard-back { background: radial-gradient(circle at 50% 45%, rgba(215, 154, 92, .18), rgba(var(--sg-fade), .85) 70%); }
.tcard-back svg { color: var(--sg-copper); }
.turn .tcard > .side { border: 0; background: transparent; box-shadow: none; }
.spread-note b, .deck-note b { color: var(--sg-ink); }
.spread-note small { color: var(--sg-copper); }
.glimpse .ms-kicker { color: var(--sg-copper); font-family: var(--sans); font-style: normal; font-weight: 500; }
.glimpse .animal-cameo { background-color: transparent; }
.twelve-spread .tcard-title b { font-size: clamp(.8rem, 2.3vw, 1rem); }

/* ---------- the questions ---------- */
.opts { border-top: 0; gap: 10px; }
.opt, .pair-side, .choice-list .opt, .place-results button {
  border: 0; border-radius: 14px; background: var(--sg-soft); color: var(--sg-ink);
  box-shadow: none; transition: background .2s;
}
.pair-side { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.3rem; }
.pair-side small { color: var(--sg-copper); font-family: var(--sans); }
.opt:hover, .place-results button:hover { background: var(--sg-soft-2); border: 0; }
.opt:active { background: var(--sg-soft-2); transform: scale(.985); }
.opt .k { border: 0; box-shadow: inset 0 0 0 1px var(--sg-line); color: var(--sg-copper); font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.opt.sel, .opt[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(215, 154, 92, .3), rgba(255, 255, 255, .04)); color: var(--sg-ink); box-shadow: inset 0 0 0 1px var(--sg-copper);
}
.opt.sel .k, .opt[aria-pressed="true"] .k { background: var(--sg-copper); color: var(--sg-btn-ink); box-shadow: 0 0 10px var(--sg-copper); }
.choice-list .opt.sel small, .choice-list .opt[aria-pressed="true"] small { color: var(--sg-muted); }
.choice-list .opt b { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.3rem; }
.moon-disc { fill: #14161f; stroke: var(--gilt-dim); }
.moon-lit { fill: var(--sg-ink); }
.opt.moon.sel .moon-disc, .opt.moon[aria-pressed="true"] .moon-disc { fill: #14161f; stroke: var(--sg-copper); }
.opt.moon.sel .k, .opt.moon[aria-pressed="true"] .k { background: transparent; box-shadow: none; }
.pair-stops .opt { background: transparent; box-shadow: inset 0 0 0 1px var(--sg-line); }
.pair-stops .opt.sel, .pair-stops .opt[aria-pressed="true"] { background: var(--sg-copper); }
.prog-bar { height: 3px; background: var(--sg-soft); border-radius: 3px; overflow: visible; }
.prog-bar i { background: linear-gradient(90deg, transparent, var(--sg-copper)); box-shadow: 0 0 12px var(--sg-copper); border-radius: 3px; }
.prog-bar i::after { background: var(--sg-copper); box-shadow: 0 0 10px var(--sg-copper); }
.prog small { color: var(--sg-muted); }
.qprompt { font-weight: 500; }
.quiz-chapters { border-bottom: 0; position: relative; }
.quiz-chapters::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--sg-line), transparent); }
.quiz-chapters > span { color: var(--sg-muted); }
.quiz-chapters [aria-current] { color: var(--sg-copper); }
.quiz-chapters .chapter-done { color: var(--sg-ink); }
.qimg { border: 0; background: transparent; border-radius: 18px; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%); }
.dob-fields .input, .dob-fields select { font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.day-picker button { background: var(--sg-soft); border: 0; box-shadow: inset 0 0 0 1px rgba(215, 154, 92, .3); color: var(--sg-ink); }
.day-picker button:hover { background: var(--sg-soft-2); }
.day-picker button[aria-pressed="true"] { background: var(--sg-copper); color: var(--sg-btn-ink); }
.character-lenses button { background: transparent; color: var(--sg-ink); border: 0; box-shadow: inset 0 0 0 1px var(--sg-line); border-radius: 999px; }
.character-lenses button[aria-pressed=true] { background: var(--sg-copper); color: var(--sg-btn-ink); }
.priority-lead { background: linear-gradient(90deg, rgba(215, 154, 92, .16), transparent); border-left: 1px solid var(--sg-copper); }
.chips li, .tags li, .appr-src { border-color: rgba(215, 154, 92, .4); }
.map-paper { fill: rgba(255, 255, 255, .04); stroke: rgba(215, 154, 92, .4); }
.map-axis { stroke: rgba(215, 154, 92, .35); }
.map-point { fill: var(--sg-copper); stroke: #14161f; }
.portrait-map text { fill: var(--sg-muted); }

/* ---------- teased text: blurred, masked into the wash, with the unlock offer over it ---------- */
.free-locked { position: relative; }
.free-blur span { background: var(--sg-muted); }
.free-cut { background: linear-gradient(to bottom, transparent, rgba(var(--sg-fade), .95)); }
.free-locked-list li { position: relative; }
.free-locked-list .free-num { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--sg-copper); opacity: 1; }
.free-unlock { position: relative; }
.test-notice { border: 0; border-inline-start: 1px solid var(--sg-copper); box-shadow: none; border-radius: 0; background: radial-gradient(ellipse 90% 90% at 20% 50%, rgba(var(--sg-fade), .5), rgba(var(--sg-fade), 0) 100%); }
.compare-items li { border-bottom: 0; }
.order-item, .order-total { border-color: rgba(215, 154, 92, .25); }
.order .bullets li { display: block; }
.price { color: var(--sg-ink); }
.price small { color: var(--sg-muted); }
.bullets svg, .opt-radio svg { stroke: var(--sg-copper); }

/* ---------- pages that share the shell: method, policies, the twelve, ask ---------- */
.toc details { background: none; box-shadow: inset 0 0 0 1px var(--sg-line); border-radius: 14px; }
.toc summary { font-family: 'Cormorant Garamond', serif; font-weight: 600; color: var(--sg-ink); }
.toc a { color: var(--sg-muted); }
.toc a:hover { color: var(--sg-ink); }
.toc b { color: var(--sg-copper); font-family: 'Cormorant Garamond', serif; }
.chapter { font-family: var(--sans); }
.chapter h2 { color: var(--sg-ink); }
.chapter h3 { color: var(--sg-copper); font-family: var(--sans); }
.chapter p, .chapter li { color: var(--sg-muted); }
.chapter h2 .num { border-color: var(--sg-copper); color: var(--sg-copper); }
.lead h1 { color: var(--sg-ink); }
.ask-answer h2 { color: var(--sg-ink); font-family: 'Cormorant Garamond', serif; }
.ask-chip { background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--sg-line); color: var(--sg-ink); }
.ask-chip:hover, .ask-chip:focus-visible { box-shadow: inset 0 0 0 1px var(--sg-copper); color: var(--sg-ink); }
.ask-label, .ask-examples { color: var(--sg-muted); }
.ask-lead h1 { color: var(--sg-ink); font-weight: 500; font-family: 'Cormorant Garamond', serif; }
.ask-lead .lede { color: var(--sg-muted); }
.ask-answer { border: 0; }
.ask-answer-body p { color: var(--sg-ink); }

@media (prefers-reduced-motion: reduce) {
  .opt, .btn { transition: none; }
}

/* fieldsets and radios: no drawn boxes */
fieldset { border: 0; border-inline-start: 1px solid var(--sg-line); border-radius: 0; background: radial-gradient(ellipse 90% 66% at 22% 50%, rgba(var(--sg-fade), .5), rgba(var(--sg-fade), 0) 100%); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--sg-copper); }

/* old-palette leftovers: anything still drawing a vellum or leaf box becomes a wash or a rule */
.plate-frame { background: transparent; border: 0; outline: 0; padding: 0; }
.temper > div { background: linear-gradient(180deg, rgba(var(--sg-fade), .45), rgba(var(--sg-fade), 0)); border-top: 1px solid rgba(215, 154, 92, .3); }
.input[aria-invalid="true"], select[aria-invalid="true"] { box-shadow: inset 0 0 0 1px #ffb59a; }

/* the portraits are scaled 1.3x to crop to their own ring; keep that scale from widening the page */
.primary-portrait, .nearby-portraits { overflow-x: clip; }
.hero-night h1 em { color: var(--gilt-bright, #e8b684); }
.hero-actions .btn:not(.btn-primary) { background: rgba(var(--sg-fade), .6); }

/* ---------- atmosphere: drift, breathing glow, light sweep, constellations, dunes ---------- */
html, body { overflow-x: clip; }

/* very slow parallax drift on the fixed art (transform only) */
body::before { will-change: transform; animation: sg-drift 90s ease-in-out infinite alternate; transform-origin: 70% 40%; }
@keyframes sg-drift {
  from { transform: translate3d(-.9%, -.5%, 0) scale(1.045); }
  to { transform: translate3d(.9%, .6%, 0) scale(1.085); }
}

/* the light layers sit over the art and under the page: breathing glow, then a diagonal sweep every ~25 seconds */
.sg-fx { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; contain: paint; }
body:has(.hero-night) .sg-fx { position: absolute; height: 100vh; height: 100dvh; bottom: auto; }
.sg-fx i { position: absolute; display: block; }
.sg-breathe {
  left: 34%; top: 6%; width: 74%; height: 90%;
  background: radial-gradient(ellipse 50% 50% at 52% 52%, rgba(190, 165, 225, .11), rgba(111, 143, 214, .04) 48%, rgba(111, 143, 214, 0) 72%);
  animation: sg-breathe 16s ease-in-out infinite alternate; will-change: opacity, transform;
}
@keyframes sg-breathe { from { opacity: .35; transform: scale(.94); } to { opacity: 1; transform: scale(1.06); } }
.sg-sweep {
  top: -30%; bottom: -30%; left: -45%; width: 38%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(236, 226, 255, .075) 45%, rgba(255, 220, 190, .06) 55%, rgba(255, 255, 255, 0));
  transform: translate3d(0, 0, 0) rotate(20deg); opacity: 0;
  animation: sg-sweep 26s ease-in-out infinite; will-change: transform, opacity;
}
@keyframes sg-sweep {
  0%, 62% { transform: translate3d(0, 0, 0) rotate(20deg); opacity: 0; }
  68% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translate3d(380%, 0, 0) rotate(20deg); opacity: 0; }
}
.sg-paused body::before, .sg-paused .sg-breathe, .sg-paused .sg-sweep { animation-play-state: paused; }
@media (max-width: 760px) {
  .sg-sweep { display: none; }
  .sg-breathe { left: 10%; width: 100%; }
  body::before { animation-duration: 120s; }
}

/* constellation line work, drawn in as the section arrives */
.sg-con-host { position: relative; }
.sg-con { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: visible; }
.sg-con path { fill: none; stroke: var(--sg-copper); vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.sg-con-line { stroke-width: 1px; stroke-opacity: .3; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 4.2s cubic-bezier(.4, 0, .2, 1); }
.sg-con-spur { transition-duration: 2.6s; transition-delay: 1.8s; stroke-opacity: .22; }
.sg-con-star { stroke-width: 3.5px; stroke-opacity: 0; transition: stroke-opacity 1.6s ease; }
.is-drawn > .sg-con .sg-con-line { stroke-dashoffset: 0; }
.is-drawn > .sg-con .sg-con-star { stroke-opacity: .5; }
@media (max-width: 760px) { .sg-con { opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .sg-sweep { display: none; }
  .sg-breathe { animation: none; opacity: .6; }
  .sg-con-line, .sg-con-star { transition: none; }
}

/* dunes: a faded band low on the page, blended with masks so no edge shows */
body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 110px; height: min(62vw, 640px); z-index: -2; pointer-events: none;
  background: url(/art/sandglass-dunes.jpg) 50% 100% / cover no-repeat;
  opacity: .26;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 38%, #000 62%, transparent 100%), linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0, #000 38%, #000 62%, transparent 100%), linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
@media (max-width: 760px) {
  body::after { background-image: url(/art/sandglass-dunes-1000.jpg); height: 76vw; bottom: 150px; opacity: .24; }
}

/* off the landing page the scrim already carries the text, so the glow stays a whisper */
body:not(:has(.hero-night)) .sg-breathe { background: radial-gradient(ellipse 50% 50% at 52% 52%, rgba(190, 165, 225, .05), rgba(111, 143, 214, .02) 48%, rgba(111, 143, 214, 0) 72%); }

/* ---------- contrast: soft scrims where the dune band or portrait art sits under body text ---------- */
/* Each scrim is a slate wash that fades to nothing at its edges (no box), sitting behind the text inside its own stacking context. */
.character-card .card-copy,
.chapter-body details,
.chapter-body p.source { --scrim-x: 16px; --scrim-y: 14px; position: relative; isolation: isolate; text-shadow: 0 0 10px rgba(var(--sg-fade), .9), 0 0 3px rgba(var(--sg-fade), .8); }
.character-card .card-copy::before,
.chapter-body details::before,
.chapter-body p.source::before {
  content: ""; position: absolute; inset: calc(var(--scrim-y) * -1) calc(var(--scrim-x) * -1); z-index: -1; pointer-events: none;
  background: rgba(var(--sg-fade), .82);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--scrim-x), #000 calc(100% - var(--scrim-x)), transparent 100%), linear-gradient(180deg, transparent 0, #000 var(--scrim-y), #000 calc(100% - var(--scrim-y)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--scrim-x), #000 calc(100% - var(--scrim-x)), transparent 100%), linear-gradient(180deg, transparent 0, #000 var(--scrim-y), #000 calc(100% - var(--scrim-y)), transparent 100%);
  mask-composite: intersect;
}
@media (min-width: 761px) { .character-card .card-copy, .chapter-body details, .chapter-body p.source { --scrim-x: 34px; --scrim-y: 24px; } }
