/* Janma Kundli — "pothi folio" theme: parchment, maroon and vermilion ink, turmeric gold. */

@font-face {
  font-family: "Rozha One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/rozha-one-devanagari.woff2) format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: "Rozha One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/rozha-one-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Rozha One draws Devanagari digits with Latin shapes, so true Devanagari numerals and
   dandas come from a 2 KB subset of Noto Serif Devanagari Bold. */
@font-face {
  font-family: "JK Devanagari Numerals"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/noto-serif-devanagari-numerals.woff2) format("woff2");
  unicode-range: U+0964-096F;
}
/* Devanagari in body text (a name or place in the report): the PDF's Noto Serif Devanagari Regular,
   subset to the Devanagari blocks with all shaping features (44 KB; fetched only when such text
   is on the page). Bold is synthesised. */
@font-face {
  font-family: "JK Devanagari Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/noto-serif-devanagari-400.woff2) format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+20B9, U+25CC, U+A8E0-A8FF;
}
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/spectral-400.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/spectral-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/spectral-500.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/spectral-600.woff2) format("woff2"); }

:root {
  --paper: #f4ead5;
  --paper-hi: #fbf6ea;
  --paper-lo: #e9dbbd;
  --ink: #2b1d16;
  --ink-soft: #5b4636;
  --maroon: #7a1f1f;
  --maroon-deep: #5c1515;
  --vermilion: #b83a14;
  --gold: #b7791f;
  --turmeric: #dfa53a;
  --leaf: #3f5f1b;
  --error: #a3221a;
  --field: #fffdf7;
  --field-line: #cbb68d;
  --night: #19152d;
  --night-2: #2a2046;
  --moon: #f6ebd5;
  --display: "JK Devanagari Numerals", "Rozha One", "Iowan Old Style", Georgia, serif;
  --text: "Spectral", "JK Devanagari Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(223, 165, 58, .22), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(184, 58, 20, .08), transparent 60%),
    linear-gradient(180deg, #f6eedb 0%, var(--paper) 40%, #f1e4c9 100%);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

a { color: var(--maroon); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vermilion); text-decoration-color: var(--turmeric); }
:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--maroon); color: var(--paper-hi);
  padding: 10px 16px; border-radius: 3px; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 16px; }

/* manuscript frame around the viewport */
.folio-frame {
  position: fixed; inset: 10px; pointer-events: none; z-index: 60;
  border: 1px solid rgba(122, 31, 31, .32);
  box-shadow: inset 0 0 0 3px rgba(251, 246, 234, .0), inset 0 0 0 4px rgba(183, 121, 31, .35);
}

.danda { font-family: var(--display); color: var(--gold); font-weight: 400; }
.eyebrow {
  margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .danda { letter-spacing: 0; font-size: 15px; }

/* ------------------------------------------------------------------ masthead */
.masthead {
  max-width: var(--wrap); margin: 0 auto; padding: 26px 36px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--maroon); }
.brand-mark { width: 38px; height: 38px; color: var(--maroon); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-deva { font-family: var(--display); font-size: 13px; color: #8a5a12; margin-bottom: 4px; } /* 5.4:1 */
.brand-name { font-family: var(--display); font-size: 25px; letter-spacing: .01em; }
.masthead-nav { display: flex; gap: 26px; }
.masthead-nav a { color: var(--ink-soft); text-decoration: none; font-size: 15.5px; border-bottom: 1px solid transparent; }
.masthead-nav a:hover { color: var(--maroon); border-bottom-color: var(--turmeric); }

/* ------------------------------------------------------------------ hero */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: 34px 36px 72px;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 60px; align-items: start;
}
.hero-mandala {
  position: absolute; width: 620px; height: 620px; left: -250px; top: -40px; z-index: 0; opacity: .5;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 72%);
          mask-image: radial-gradient(circle, #000 52%, transparent 72%);
}
.hero-mandala svg { width: 100%; height: 100%; animation: turn 300s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

.hero-copy { position: relative; z-index: 1; padding-top: 58px; }
.hero-copy h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(40px, 4.6vw, 62px); line-height: 1.04;
  color: var(--maroon); margin: 0 0 24px; letter-spacing: -.005em;
}
.hero-copy h1 em {
  display: block; font-style: normal; color: var(--ink); padding-bottom: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12'%3E%3Cpath d='M2 8 Q75 1 150 7 T298 5' fill='none' stroke='%23dfa53a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / min(100%, 420px) 12px no-repeat;
}
.lead { font-size: 19.5px; line-height: 1.62; color: var(--ink-soft); max-width: 33em; margin: 0 0 30px; }
.seals { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px 34px; }
.seals li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-soft); max-width: 13em; line-height: 1.3; }
.seal-num {
  font-family: var(--display); font-size: 27px; color: var(--vermilion); line-height: 1;
  min-width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(183, 121, 31, .55); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(183, 121, 31, .35);
  padding-top: 4px;
}

.preview-stack { position: relative; margin: 46px 0 0; height: 360px; max-width: 520px; }
.preview-stack img {
  position: absolute; width: 238px; height: auto; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 24px 40px -22px rgba(70, 30, 10, .55), 0 0 0 1px rgba(122, 31, 31, .15);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.preview-stack .p1 { left: 18px; top: 22px; transform: rotate(-5deg); z-index: 3; }
.preview-stack .p2 { left: 150px; top: 6px; transform: rotate(2deg); z-index: 2; }
.preview-stack .p3 { left: 272px; top: 30px; transform: rotate(7deg); z-index: 1; }
.preview-stack:hover .p1 { transform: rotate(-7deg) translate(-10px, -4px); }
.preview-stack:hover .p3 { transform: rotate(9deg) translate(12px, 2px); }
.preview-stack figcaption { position: absolute; left: 22px; bottom: -6px; font-size: 13.5px; font-style: italic; color: var(--ink-soft); }

/* ------------------------------------------------------------------ folio (form card) */
.folio {
  position: relative; z-index: 1;
  background: var(--paper-hi);
  border: 1px solid rgba(122, 31, 31, .4);
  box-shadow: 0 0 0 6px var(--paper-hi), 0 0 0 7px rgba(183, 121, 31, .55), 0 40px 70px -40px rgba(80, 35, 10, .55);
  padding: 34px 36px 30px; margin: 7px;
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both .1s;
}
.folio-corner { position: absolute; width: 11px; height: 11px; background: var(--paper-hi); border: 1px solid var(--gold); transform: rotate(45deg); }
.folio-corner.tl { left: -13px; top: -13px; } .folio-corner.tr { right: -13px; top: -13px; }
.folio-corner.bl { left: -13px; bottom: -13px; } .folio-corner.br { right: -13px; bottom: -13px; }
.folio-title { font-family: var(--display); font-weight: 400; font-size: 31px; color: var(--maroon); margin: 0; line-height: 1.15; }
.folio-sub { margin: 4px 0 22px; color: var(--ink-soft); font-size: 15px; font-style: italic; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .22s; }

/* ------------------------------------------------------------------ form */
.birth-form fieldset.step { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.birth-form legend {
  display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 12px; width: 100%;
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft);
}
.birth-form legend::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(183,121,31,.6), transparent); transform: translateY(-4px); }
.step-num { font-family: var(--display); font-size: 23px; letter-spacing: 0; color: var(--gold); text-transform: none; line-height: 1; }

.field { margin-bottom: 14px; min-width: 0; }
.field > label, .field > .label { display: block; font-weight: 500; font-size: 15.5px; margin-bottom: 6px; color: var(--ink); }
.hint-inline { font-weight: 400; color: var(--ink-soft); font-size: 13.5px; }
.row-2 > .field { display: flex; flex-direction: column; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

input[type="text"], input[type="date"], input[type="time"], input[type="number"], select {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--field); border: 1px solid var(--field-line); border-radius: 3px;
  padding: 10px 12px; min-height: 46px; transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237a1f1f' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 34px; }
input::placeholder { color: #a8957a; }
input:hover, select:hover { border-color: #b59b6a; }
input:focus, select:focus { outline: none; border-color: var(--vermilion); box-shadow: 0 0 0 3px rgba(184, 58, 20, .16); background: #fff; }
input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(163, 34, 26, .12); }
.field-error { color: var(--error); font-size: 14.5px; margin: 6px 0 0; display: flex; gap: 6px; align-items: baseline; }
.field-error::before { content: "◆"; font-size: 9px; transform: translateY(-2px); }
.field-error-top { margin: 0 0 6px; }
.form-alert { background: #fbe9e4; border: 1px solid #e3b4a8; color: var(--error); padding: 10px 14px; border-radius: 3px; margin: 0 0 16px; }

.segmented { display: inline-flex; border: 1px solid var(--field-line); border-radius: 3px; background: var(--field); overflow: hidden; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 20px; font-size: 16px; border-right: 1px solid var(--field-line); transition: background .15s, color .15s; }
.seg:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--maroon); color: var(--paper-hi); }
.seg input:focus-visible + span { outline: 2px solid var(--vermilion); outline-offset: -4px; }
.seg:hover input:not(:checked) + span { background: #f5ead2; }

.help { display: flex; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin: 2px 0 0; }
.help-plain { display: block; }
.help svg { flex: none; width: 16px; height: 16px; margin-top: 3px; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; }

/* place combobox */
.combo-wrap { position: relative; }
.combo-spinner { position: absolute; right: 12px; top: 16px; width: 14px; height: 14px; border: 2px solid rgba(183,121,31,.3); border-top-color: var(--gold); border-radius: 50%; opacity: 0; transition: opacity .15s; }
.combo.loading .combo-spinner { opacity: 1; animation: spin .8s linear infinite; }
/* In the page flow, not over it: while open it pushes the rest of the form down, so it can never
   cover the Cast button and catch a click meant for it. */
.combo-list {
  margin: 4px 0 0; padding: 4px 0; list-style: none;
  background: var(--paper-hi); border: 1px solid var(--field-line); border-radius: 3px; max-height: 330px; overflow-y: auto;
  box-shadow: 0 18px 40px -18px rgba(60, 25, 5, .45);
}
.combo-list li { padding: 8px 14px; cursor: pointer; line-height: 1.3; border-left: 3px solid transparent; }
.combo-list li .opt-label { display: block; font-size: 16.5px; color: var(--ink); }
.combo-list li .opt-label mark { background: none; color: var(--maroon); font-weight: 600; }
.combo-list li .opt-detail { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: #f3e5c6; border-left-color: var(--vermilion); }
.combo-list .combo-empty { color: var(--ink-soft); font-style: italic; cursor: default; }
.resolved { min-height: 0; margin: 6px 0 0; font-size: 14.5px; color: var(--leaf); }
.resolved:empty { display: none; }
.resolved .warn { color: var(--vermilion); display: block; }
.nojs-suggestions { font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 0; padding-left: 20px; }

/* advanced */
.advanced { border-top: 1px dashed rgba(122, 31, 31, .3); border-bottom: 1px dashed rgba(122, 31, 31, .3); margin: 4px 0 22px; }
.advanced summary { cursor: pointer; list-style: none; padding: 12px 0; font-size: 15.5px; color: var(--maroon); display: flex; align-items: center; gap: 10px; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.advanced[open] summary::before { transform: rotate(45deg); }
.advanced-body { padding: 0 0 8px; }
.advanced-body .help { margin-bottom: 12px; }

/* submit */
.submit-row { display: flex; flex-direction: column; gap: 10px; }
.btn-cast {
  position: relative; width: 100%; cursor: pointer; border: 0; border-radius: 3px; padding: 15px 22px 13px;
  font-family: var(--display); font-size: 23px; letter-spacing: .01em; color: #fff6e6;
  background: linear-gradient(180deg, #c8471a 0%, var(--vermilion) 50%, #9b2f10 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .35), inset 0 0 0 4px rgba(155, 47, 16, .0), 0 14px 26px -14px rgba(155, 47, 16, .9);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-cast::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(255, 223, 170, .45); border-radius: 2px; pointer-events: none; }
.btn-cast:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-cast:active { transform: translateY(1px); }
.btn-cast[disabled] { cursor: progress; filter: saturate(.75); }
.btn-spinner { display: none; }
.btn-cast.busy .btn-label { opacity: .85; }
.btn-cast.busy .btn-spinner {
  display: inline-block; width: 14px; height: 14px; margin-left: 12px; border: 1.5px solid #ffe2b0;
  transform: rotate(45deg); animation: spin-d 1.1s ease-in-out infinite; vertical-align: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-d { 0% { transform: rotate(45deg); } 50% { transform: rotate(225deg) scale(.7); } 100% { transform: rotate(405deg); } }
.status { min-height: 1.5em; margin: 0; font-style: italic; color: var(--ink-soft); text-align: center; font-size: 15.5px; }

/* ------------------------------------------------------------------ result: night sky */
.sky {
  max-width: calc(var(--wrap) - 72px); margin: -24px auto 80px; color: var(--moon); outline: none;
  background:
    url("/static/img/stars.svg") center / 600px auto repeat,
    radial-gradient(700px 400px at 85% 0%, rgba(223, 165, 58, .18), transparent 70%),
    radial-gradient(600px 500px at 0% 100%, rgba(184, 58, 20, .22), transparent 70%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 55%, #33193a 100%);
  border-radius: 4px; position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(217, 164, 65, .5), 0 0 0 6px var(--paper), 0 0 0 7px rgba(183, 121, 31, .5), 0 50px 80px -40px rgba(30, 10, 40, .6);
}
.sky[hidden] { display: none; }
.sky.revealed { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.sky-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; padding: 44px 48px; align-items: center; }
.chart-toggle { display: inline-flex; gap: 0; margin-bottom: 14px; border: 1px solid rgba(217, 164, 65, .55); border-radius: 999px; padding: 3px; }
.chart-toggle button {
  font: inherit; font-size: 14.5px; color: #e9d7b3; background: transparent; border: 0; border-radius: 999px; padding: 6px 16px; cursor: pointer;
}
.chart-toggle button[aria-pressed="true"] { background: #d9a441; color: #21160a; }
.chart-frame { margin: 0; }
.chart-frame svg { display: block; width: 100%; height: auto; }
.chart-frame .kundli-south { max-width: 470px; margin: 0 auto; }
.chart-frame figcaption { font-size: 13.5px; color: #bfae92; margin-top: 10px; font-style: italic; }
.kundli-lines { stroke-dasharray: 1; stroke-dashoffset: 0; }
.drawing .kundli-lines { stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.6, .1, .3, 1) forwards .15s; }
.drawing .kundli-text { opacity: 0; animation: fade .9s ease forwards 1.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.eyebrow-gold { color: #e3bd78; }
.sky-facts h1, .sky-facts h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; margin: 0 0 24px; color: #fff3dc; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 22px; border-top: 1px solid rgba(217, 164, 65, .35); }
.facts > div { padding: 14px 0 14px; border-bottom: 1px solid rgba(217, 164, 65, .35); }
.facts > div:nth-child(odd) { padding-right: 18px; border-right: 1px solid rgba(217, 164, 65, .35); }
.facts > div:nth-child(even) { padding-left: 20px; }
.facts dt { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: #e3bd78; font-weight: 600; }
.facts dt span { letter-spacing: .02em; text-transform: none; color: #a8987f; font-weight: 400; font-style: italic; margin-left: 4px; font-size: 13.5px; }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-size: 29px; line-height: 1.1; color: #fff6e6; }
.facts dd.sub { font-family: var(--text); font-size: 14.5px; color: #cbbb9f; margin-top: 3px; }
.birth-line { font-size: 15px; color: #cbbb9f; margin: 0 0 18px; line-height: 1.55; }
.warnings { list-style: none; padding: 10px 14px; margin: 0 0 18px; background: rgba(240, 138, 93, .12); border: 1px solid rgba(240, 138, 93, .45); border-radius: 3px; font-size: 14.5px; color: #ffd9c4; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-family: var(--display); font-size: 21px; color: #23160a; padding: 13px 24px 11px; border-radius: 3px;
  background: linear-gradient(180deg, #f0c870, #d9a441 55%, #bf8a2c);
  box-shadow: inset 0 0 0 1px rgba(255, 245, 220, .6), 0 12px 24px -12px rgba(0, 0, 0, .7);
  transition: transform .15s, filter .15s;
}
.btn-gold svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-gold:hover { color: #23160a; transform: translateY(-1px); filter: brightness(1.05); }
.btn-gold:focus-visible { outline-color: #f0c870; }
.btn-ghost { font: inherit; font-size: 15.5px; color: #e9d7b3; background: none; border: 1px solid rgba(217, 164, 65, .5); border-radius: 3px; padding: 11px 16px; cursor: pointer; }
.btn-ghost:hover { border-color: #e3bd78; color: #fff3dc; }
.pdf-meta { font-size: 13.5px; color: #a8987f; margin: 12px 0 0; }

/* ------------------------------------------------------------------ what's inside */
.inside { max-width: var(--wrap); margin: 0 auto; padding: 30px 36px 70px; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); color: var(--maroon); margin: 0; line-height: 1.12; }
.inside-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 30px; }
.inside-grid li { border-top: 1px solid rgba(122, 31, 31, .35); padding-top: 16px; position: relative; }
.inside-grid li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.inside-grid .num { font-family: var(--display); font-size: 34px; color: var(--vermilion); line-height: 1; display: block; margin-bottom: 8px; }
.inside-grid h3 { font-size: 19px; font-weight: 600; margin: 0 0 6px; line-height: 1.25; color: var(--ink); }
.inside-grid p { font-size: 15.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* ------------------------------------------------------------------ birth time note */
.time-note { max-width: var(--wrap); margin: 0 auto; padding: 0 36px 80px; }
.time-card {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 40px; align-items: center;
  background: var(--paper-hi); border: 1px solid rgba(122, 31, 31, .3); padding: 36px 44px;
  box-shadow: 0 0 0 5px var(--paper-hi), 0 0 0 6px rgba(183, 121, 31, .4);
  margin: 6px;
}
.time-card h2 { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--maroon); margin: 0 0 10px; line-height: 1.15; }
.time-card p { margin: 0 0 10px; color: var(--ink-soft); }
.time-card strong { color: var(--ink); font-weight: 600; }
.time-dial svg { width: 150px; height: 150px; }
.dial-ring { fill: none; stroke: var(--maroon); stroke-width: 1.2; }
.dial-tick { stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.dial-wedge { fill: rgba(184, 58, 20, .16); stroke: var(--vermilion); stroke-width: 1; transform-origin: 60px 60px; animation: turn 24s linear infinite; }
.dial-hub { fill: var(--maroon); }

/* ------------------------------------------------------------------ footer */
.colophon { max-width: var(--wrap); margin: 0 auto; padding: 10px 36px 56px; font-size: 14.5px; color: var(--ink-soft); }
.colophon-rule { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.colophon-rule::before, .colophon-rule::after { content: ""; flex: 1; height: 1px; background: rgba(122, 31, 31, .3); }
.colophon-rule span { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.colophon p { margin: 0 0 10px; line-height: 1.55; }
.colophon-brand { font-family: var(--display); font-size: 21px; color: var(--maroon); }
.colophon-small { font-size: 13px; }

/* ------------------------------------------------------------------ prose pages */
.prose { max-width: 780px; margin: 30px auto 70px; padding: 0 36px; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.1; color: var(--maroon); margin: 0 0 22px; }
.prose h2 { font-size: 22px; font-weight: 600; margin: 30px 0 8px; color: var(--ink); }
.prose p, .prose li { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.prose li { margin-bottom: 10px; }
.prose strong { color: var(--ink); }
.btn-ghost-dark { display: inline-block; margin-top: 18px; padding: 10px 16px; border: 1px solid rgba(122, 31, 31, .4); border-radius: 3px; text-decoration: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-bottom: 56px; }
  .hero-copy { padding-top: 26px; }
  .preview-stack { display: none; }
  .hero-mandala { width: 480px; height: 480px; left: auto; right: -170px; top: -60px; opacity: .38; }
  .sky-inner { grid-template-columns: 1fr; gap: 30px; padding: 34px 30px; }
  .inside-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .sky { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .folio-frame { inset: 5px; }
  .masthead { padding: 18px 20px 4px; }
  .masthead-nav { display: none; }
  .hero { padding: 10px 18px 40px; }
  .hero-copy h1 { font-size: 40px; }
  .lead { font-size: 17.5px; }
  .seals { gap: 12px 20px; }
  .folio { padding: 26px 20px 22px; }
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .segmented { display: flex; }
  .seg { flex: 1; text-align: center; }
  .seg span { padding: 10px 8px; }
  .sky { margin: -10px 12px 56px; }
  .sky-inner { padding: 26px 18px; }
  .facts dd { font-size: 23px; }
  .facts > div:nth-child(odd) { padding-right: 10px; }
  .facts > div:nth-child(even) { padding-left: 12px; }
  .inside, .time-note { padding-left: 18px; padding-right: 18px; }
  .inside-grid { grid-template-columns: 1fr; gap: 24px; }
  .time-card { grid-template-columns: 1fr; padding: 26px 22px; gap: 14px; }
  .time-dial svg { width: 90px; height: 90px; }
  .colophon { padding: 10px 20px 44px; }
  .colophon-grid { grid-template-columns: 1fr; gap: 6px; }
  .prose { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero-mandala svg, .dial-wedge { animation: none !important; }
}

@media print {
  .folio-frame, .hero-mandala, body::before { display: none; }
}

/* ------------------------------------------------------------------ error pages */
.error-page { max-width: 720px; margin: 40px auto 90px; padding: 0 36px; text-align: center; }
.error-page .error-code { font-family: var(--display); font-size: 88px; line-height: 1; color: var(--gold); margin: 0; }
.error-page h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 42px); color: var(--maroon); margin: 8px 0 14px; }
.error-page p { font-size: 18px; color: var(--ink-soft); }
