:root {
  color-scheme: dark;
  --ink: #0d0f16;
  --indigo: #171e3a;
  --panel: #1f2748;
  --gold: #c9a227;
  --light-gold: #f0d48a;
  --paper: #f4ecd9;
  --white: #f5f0e9;
  --muted: #c5c6d1;
  --line: #a797683e;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--white); font: 1rem/1.65 var(--sans); }
a { color: var(--light-gold); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .13em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #9dc4ff; outline-offset: 4px; }
.paper :focus-visible { outline-color: #394c89; }
.skip { position: absolute; left: 1rem; top: 1rem; z-index: 5; background: var(--ink); padding: .5rem 1rem; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: normal; line-height: 1.12; margin: 0 0 .55em; text-wrap: balance; }
h2 { font-size: clamp(2.15rem, 5.5vw, 3.7rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.65rem); }
h4 { font-size: 1.22rem; }
p { margin: 0 0 .9rem; }
p:last-child { margin-bottom: 0; }
small { font-size: .82rem; }
.masthead, .footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1.5rem; padding: .85rem max(1.15rem, calc((100% - 72rem)/2)); background: var(--ink); }
.masthead { border-bottom: 1px solid var(--line); }
.footer { border-top: 1px solid var(--line); }
.brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--light-gold); font: 1rem var(--serif); letter-spacing: .18em; text-decoration: none; }
.masthead nav { display: flex; flex-wrap: wrap; gap: .3rem 1.15rem; }
.masthead nav a, .footer > a:last-child { color: var(--muted); font-size: .86rem; }
.hero {
  position: relative;
  text-align: center;
  padding: clamp(3.25rem, 8vw, 6.8rem) 1rem;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, transparent 0 9px, #e2d0a307 10px 11px, transparent 12px 17px),
    radial-gradient(ellipse at 50% 16%, #303a66, var(--indigo) 52%, #12172c);
}
.hero-inner { max-width: 65rem; margin: 0 auto; }
.hero-seal { width: clamp(6.5rem, 15vw, 10.6rem); height: auto; fill: none; stroke: var(--light-gold); stroke-width: 1.65; margin-bottom: 1rem; }
.seal-ring { stroke: var(--gold); stroke-width: .65; opacity: .7; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; color: var(--light-gold); }
.hero .eyebrow span + span { margin-left: .5rem; }
.hero h1 { font-size: clamp(2.8rem, 8.3vw, 6.3rem); line-height: .97; letter-spacing: .035em; margin: .28em 0; }
.hero h1 em { display: block; color: var(--light-gold); font-size: .7em; letter-spacing: -.03em; margin-top: .15em; }
.hero-copy { color: #e2e0e7; margin: 1.5rem auto; font-size: clamp(.98rem, 2.4vw, 1.15rem); }
.date-line { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--light-gold); margin: 1.7rem 0 1.25rem; }
.date-line::before, .date-line::after { content: ''; display: inline-block; vertical-align: middle; width: clamp(.7rem, 4vw, 2.5rem); height: 1px; margin: 0 .55rem; background: var(--gold); }
.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 6.3rem); }
.section-head { margin: 0 auto clamp(1.4rem, 4vw, 2.35rem); text-align: center; }
.section-head h2 { margin-bottom: .24em; }
.section-head > p:last-child { color: var(--muted); }
.band { background: var(--indigo); border-block: 1px solid var(--line); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: clamp(1rem, 3.5vw, 2rem); min-width: 0; }
.grid-two, .grid-four { display: grid; gap: 1rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; color: #19150b; background: var(--light-gold); border: 1px solid transparent; border-radius: .3rem; padding: .65em 1.05em; min-height: 44px; line-height: 1.35; font-weight: 650; text-decoration: none; }
.button:hover { background: #ffe3a2; }
.button.secondary { background: transparent; border-color: currentColor; color: var(--light-gold); }
.button.secondary:hover { background: #c9a2271c; }
.draw-panel { text-align: center; background: radial-gradient(ellipse at top, #2f3967, var(--indigo) 70%); padding-block: 2.1rem; }
.draw-button { display: inline-grid; justify-items: center; gap: 1.35rem; border: 0; background: transparent; padding: .4rem; }
.tube { display: grid; place-items: center; width: 4.7rem; height: 8.1rem; color: var(--light-gold); border: 1px solid var(--gold); border-top: .32rem double var(--gold); border-bottom: .32rem double var(--gold); border-radius: 17% 17% 24% 24% / 8%; background: linear-gradient(90deg, #272b4a, #53483c 53%, #202742); box-shadow: 0 .65rem 1.4rem #08081170; transform: rotate(-10deg); transition: transform .25s; }
.tube span { font: 1.2rem/1.1 var(--serif); }
.draw-button:hover .tube, .draw-button:focus-visible .tube { transform: rotate(0); }
.paper { color-scheme: light; color: #242020; background: repeating-linear-gradient(0deg, transparent 0 4px, #80662408 5px 6px), var(--paper); border: 1px solid #c3a974; border-radius: .75rem; overflow: hidden; }
.paper .eyebrow, .paper a { color: #63480a; }
.paper .button { background: #263157; color: var(--white); }
.paper .button:hover { background: #354376; }
.paper .button.secondary { background: transparent; color: #263157; }
.paper .button.secondary:hover { background: #dcd8cf; }
.slip-heading { text-align: center; padding: clamp(1.7rem, 5vw, 3.5rem) 1rem; border-bottom: 1px solid #947b4d55; }
.slip-heading h3 { font-size: clamp(2rem, 7vw, 4.1rem); }
.verse { font: italic clamp(1.15rem, 3vw, 1.5rem)/1.65 var(--serif); }
.slip-body { max-width: 55rem; margin: auto; padding: clamp(1rem, 4.5vw, 3rem); }
.slip-pattern { padding-bottom: 1.25rem; border-bottom: 1px solid #947b4d55; }
.interpretation { font: 1.35rem/1.6 var(--serif); margin: 1.4rem 0; }
.pattern-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .7rem; font-size: .88rem; }
.pattern-label strong { font-size: 1rem; }
.gauge { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.1rem; font-size: .8rem; }
.gauge-track { display: flex; justify-content: space-between; align-items: center; flex: 1; height: .38rem; margin-inline: .3rem; background: linear-gradient(90deg,#7891bd,#d6bd7b,#b37d57); border-radius: 1rem; }
.gauge-track i { width: .59rem; height: .59rem; border-radius: 50%; background: var(--white); }
.gauge-track i.active { width: 1rem; height: 1rem; background: var(--light-gold); border: 2px solid #312a1f; }
.elements { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.elements li { display: grid; grid-template-rows: 2rem auto auto; gap: .1rem; text-align: center; font-family: var(--serif); align-items: end; }
.elements small { font: .71rem var(--sans); }
.element-bar { width: min(75%, 3rem); height: .55rem; background: #a8a6b6; border-radius: .2rem; margin: 0 auto; }
.elements .active { font-weight: bold; }
.elements .active small { font-weight: 750; }
.elements .active .element-bar { height: 1.65rem; background: var(--gold); }
.paper .element-bar { background: #897b67; }
.paper .elements .active .element-bar { background: #89691b; }
.item-readings { margin-block: 1rem 1.4rem; }
.item-readings > div { display: grid; gap: .15rem 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.paper .item-readings > div { border-color: #947b4d55; }
dt { font-weight: 700; }
dd { margin: 0; }
.day-context { border: 1px solid #947b4d74; border-radius: .5rem; background: #c8ad6e20; padding: 1rem; margin-bottom: 1.4rem; }
.bearings { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0 0 1rem; }
.bearings dt { font-size: .78rem; }
.bearings dd { font: 1.22rem var(--serif); }
.guardian { padding-top: .85rem; border-top: 1px solid var(--line); margin-bottom: .85rem; }
.guardian h4 { font-size: 1.13rem; }
.actions { margin: 0 0 1.25rem; padding-left: 1.35rem; }
.actions li { margin: .25rem 0; }
.slip-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .8rem; }
.reveal { animation: reveal .45s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(.65rem); } to { opacity: 1; transform: translateY(0); } }
.week { margin-top: 2rem; }
.week-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.2rem), 1fr)); gap: .45rem; }
.week-days button { display: grid; align-content: start; text-align: left; min-height: 7rem; padding: .65rem .65rem .45rem; background: var(--indigo); color: var(--white); border: 1px solid var(--line); border-radius: .4rem; }
.week-days button:hover, .week-days button[aria-pressed="true"] { background: #303a64; }
.week-days button[aria-current="date"] { border-color: var(--gold); }
.week-days time, .week-days small { color: var(--muted); font-size: .73rem; }
.week-days b { color: var(--light-gold); font-size: .72rem; }
.week-summary { margin: .85rem 0 0; color: var(--muted); min-height: 1.7em; }
.subtle, .panel small { color: var(--muted); }
h3 .subtle { display: block; margin-top: .35em; font: .8rem var(--sans); }
.almanac-value { color: var(--light-gold); font: 1.3rem/1.4 var(--serif); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .85rem; }
label { display: grid; gap: .25rem; align-content: end; font-weight: 650; }
label small { font-weight: normal; }
input, textarea { display: block; width: 100%; min-width: 0; min-height: 44px; padding: .45rem .65rem; color: var(--white); background: var(--ink); border: 1px solid #8b8caa; border-radius: .35rem; }
.fields, .checkout label { margin-bottom: 1rem; }
[role="status"]:empty { display: none; }
button + [role="status"], .slip-tools + [role="status"] { margin-top: .65rem; }
.result, .compat-teaser { margin-top: 1rem; }
.features { padding-left: 1.25rem; }
.features li::marker { color: var(--light-gold); }
.sample { margin: 1.25rem 0 0; padding-left: .9rem; border-left: 2px solid var(--gold); }
.sample figcaption { color: var(--light-gold); font-size: .82rem; }
blockquote { margin: .4rem 0 0; font: italic 1.15rem/1.55 var(--serif); }
.price { color: var(--light-gold); font: 2rem var(--serif); display: inline-block; margin-right: .3rem; }
.checkout .button { margin-bottom: .95rem; }
.faq { max-width: 51rem; margin: auto; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
summary { cursor: pointer; color: var(--light-gold); font-weight: 600; }
details p { margin-top: .55rem; }
dialog { width: min(calc(100% - 1.5rem), 34rem); max-height: 90dvh; color: var(--white); background: var(--panel); border: 1px solid var(--gold); border-radius: .75rem; padding: clamp(1rem, 4vw, 2rem); }
dialog::backdrop { background: #070912da; }
dialog h2 { font-size: 1.9rem; }
.ritual-choices { display: grid; gap: .5rem; margin-bottom: 1rem; }
.ritual-choices button { justify-content: start; text-align: left; }
.trace { display: block; width: min(100%, 10rem); margin: .65rem auto; fill: none; stroke: #b7a373; stroke-width: 1.2; touch-action: none; cursor: crosshair; }
.trace polyline { stroke: #fff0be; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trace-start { fill: var(--light-gold); }
dialog form { margin-top: 1rem; }
.return-title { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.save-page, .return-section { margin-top: 2rem; }
.save-page h2 { font-size: 1.7rem; }
@media (min-width: 38rem) {
  .grid-two, .grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-readings > div { grid-template-columns: 8rem 1fr; }
}
@media (min-width: 62rem) {
  .grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .week-days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 32rem) { .wide { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
