:root {
  color-scheme: light;
  --ink: #24211d;
  --muted: #6c6458;
  --paper: #f7f2e9;
  --card: #fff;
  --line: #e3d8c4;
  --dark: #0e0e0e;
  --accent: #c89b4a;
  --gold: #795e2f;
  --pale: #f4ebd9;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1eee5;
  --muted: #b6bfce;
  --paper: #111827;
  --card: #172136;
  --line: #46506a;
  --accent: #e0b863;
  --gold: #e0b863;
  --pale: #202a40;
}

:root[data-theme="dark"] .hero {
  background: linear-gradient(127deg, #111827, #202a40);
  border: 1px solid #836c40;
}

:root[data-theme="dark"] .quiet,
:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .profile-initial,
:root[data-theme="dark"] .support-button,
:root[data-theme="dark"] .notice,
:root[data-theme="dark"] .route-guidance {
  color: var(--ink);
}

:root[data-theme="dark"] .action {
  background: var(--accent);
  color: #151b28;
}

:root[data-theme="dark"] .field input:not([type=checkbox]),
:root[data-theme="dark"] .field select {
  background: var(--paper);
  border-color: #919cb2;
}

:root[data-theme="dark"] .check input { accent-color: var(--accent); }
:root[data-theme="dark"] .error { color: #ffc1ae; }
button[aria-pressed="true"] { border-color: var(--accent); background: var(--pale); }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.preview-bar {
  padding: .55rem 1rem;
  background: var(--pale);
  color: var(--ink);
  text-align: center;
  font-size: .85rem;
}

button,input,select {
  font: inherit;
}

button,a,input,select {
  touch-action: manipulation;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline: 3px solid #976b31;
  outline-offset: 4px;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none!important;
}

a {
  color: inherit;
}

p {
  line-height: 1.6;
  margin: 0 0 1rem;
}

h1,h2,h3 {
  margin: 0;
  color: inherit;
}

h1,h2 {
  font-family: Georgia,"Times New Roman",serif;
  font-weight: 500;
  letter-spacing: -.035em;
}

h1 {
  font-size: clamp(2.3rem,5vw,4.7rem);
  line-height: 1.05;
  margin-bottom: 1.05rem;
}

h2 {
  font-size: clamp(1.55rem,3vw,2.25rem);
  margin-bottom: .65rem;
}

h3 {
  font-size: 1.04rem;
  line-height: 1.4;
}

small {
  font-size: .8rem;
  color: var(--muted);
}

.masthead {
  max-width: 1250px;
  margin: auto;
  padding: clamp(1rem,3.3vw,2.2rem) clamp(1rem,5vw,4.8rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-align: left;
  gap: .75rem;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0;
}

.brand strong {
  font: 500 1.65rem Georgia,serif;
  display: block;
  line-height: 1.05;
}

.brand small {
  white-space: nowrap;
}

.brand-symbol {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--dark);
  border-radius: 50%;
}

nav {
  display: flex;
  gap: .36rem;
  flex-wrap: wrap;
}

nav button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: .6rem .8rem;
  border-radius: 50px;
  font-size: .87rem;
}

nav button[aria-current="page"] {
  background: var(--pale);
  color: var(--ink);
}

#app {
  max-width: 1250px;
  padding: 0 clamp(1rem,5vw,4.8rem) 2rem;
  margin: auto;
  min-height: 62vh;
  outline: none;
}

.loading {
  color: var(--muted);
  padding: 2rem 0;
}

.hero,.panel {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: clamp(1.25rem,4vw,3.6rem);
}

.hero {
  background: linear-gradient(126deg, var(--dark) 0%, #1c1b19 62%, #392b1a 120%);
  color: #f7f0e2;
  overflow: hidden;
  position: relative;
  margin: 0 0 2rem;
  box-shadow: 0 20px 55px #0e0e0e20;
}

.hero p {
  color: #f7f0e2;
  max-width: 43ch;
}

.hero .eyebrow {
  color: #e9d5a8;
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(10rem,32%);
  align-items: center;
  gap: 1.5rem;
}

.hero-home .progress-figure {
  justify-self: center;
  width: min(100%,11rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #e4c99085;
  background: repeating-radial-gradient(circle,#e4c99000 0 16px,#e4c99038 17px,#e4c99000 18px 29px);
  color: #fff2d6;
}

.progress-figure span {
  padding: .6rem;
  border-radius: .45rem;
  background: #1c1b19;
  font: 1.8rem Georgia,serif;
}

.eyebrow {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.panel {
  background: var(--card);
  margin-bottom: 1rem;
  box-shadow: 0 7px 28px #0e0e0e08;
}

.panel p:last-child {
  margin-bottom: 0;
}

.panel-intro {
  margin-bottom: 1.5rem;
}

.lead {
  max-width: 56ch;
  color: var(--muted);
}

.measure {
  max-width: 46rem;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(16rem,1fr);
  gap: 1.2rem;
  align-items: start;
}

.grid .panel {
  padding: clamp(1rem,2.4vw,1.75rem);
}

.route {
  list-style: none;
  display: grid;
  gap: .62rem;
  margin: 1.15rem 0 0;
  padding: 0;
}

.route li,.offer {
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.route li[aria-current="step"] {
  border-color: var(--accent);
  background: var(--pale);
}

.route li button,.quiet {
  border: 0;
  background: none;
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: .22em;
  padding: .35rem .15rem;
  text-align: left;
}

.route li small {
  display: block;
}

.route .status {
  flex: none;
  max-width: 40%;
  text-align: right;
  color: var(--muted);
  font-size: .76rem;
}

.action,.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: .75rem;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 2.75rem;
  padding: .6rem 1rem;
  font-weight: 650;
  font-size: .91rem;
}

.action {
  background: var(--dark);
  color: #fffaf0;
}

.hero .action {
  background: var(--accent);
  color: #17130e;
}

.secondary {
  color: var(--dark);
  background: none;
  border-color: #938772;
}

.hero .secondary {
  color: #fbf5e7;
  border-color: #e4c99085;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin: .95rem 0 0;
}

.action:disabled,.secondary:disabled {
  opacity: .58;
  cursor: wait;
}

.field {
  display: grid;
  gap: .5rem;
  margin: 1rem 0;
}

.field input:not([type=checkbox]),.field select {
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid #958973;
  border-radius: .55rem;
  padding: .62rem .75rem;
  min-height: 2.6rem;
  width: min(100%,30rem);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  line-height: 1.55;
}

.check input {
  margin-top: .35rem;
  accent-color: var(--dark);
}

.error {
  color: #972d24;
}

.notice {
  border-left: 3px solid #947243;
  padding: .5rem .8rem;
  background: var(--pale);
  color: #4d4438;
}

.route-guidance {
  border-left: 3px solid var(--accent);
  border-radius: .6rem;
  padding: .8rem 1rem;
  margin: 0 0 1rem;
  background: var(--pale);
  color: #4d4438;
  font-size: .94rem;
}

.route-guidance p {
  margin: .55rem 0;
}

.route-guidance summary {
  cursor: pointer;
  font-weight: 650;
}

.offers {
  display: grid;
  gap: .6rem;
}

.offer small,.offer strong {
  display: block;
}

.offer button {
  flex-shrink: 0;
}

.price {
  font-variant-numeric: tabular-nums;
}

.back {
  margin-bottom: .8rem;
}

.card {
  border-top: 1px solid var(--line);
  padding: .85rem 0;
}

.card summary {
  cursor: pointer;
  font-weight: 650;
}

.card p:first-of-type {
  margin-top: .65rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.reading-section {
  margin: 1rem 0;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.profile-heading, .profile-identity, .family-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.profile-heading {
  margin-bottom: 1.2rem;
}

.profile-heading h1, .profile-identity h2, .profile-identity p, .family-child h3, .family-child p {
  margin: 0;
}

.profile-identity {
  justify-content: flex-start;
  margin-bottom: 1.4rem;
}

.profile-initial {
  display: grid;
  place-items: center;
  flex: 0 0 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  background: var(--pale);
  color: var(--dark);
  font: 650 1.85rem Georgia, serif;
  overflow: hidden;
}

.profile-initial img { width: 100%; height: 100%; object-fit: cover; }
.birth-calendar { margin: .45rem 0 1rem; }
.birth-calendar summary { cursor: pointer; }
.birth-calendar input { margin-top: .55rem; }
.offer small + small { display: block; }

.support-button {
  display: grid;
  place-items: center;
  flex: 0 0 2.8rem;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--pale);
  color: var(--dark);
  text-decoration: none;
}

.support-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.26rem;
  height: .95rem;
  border: 1.5px solid currentColor;
  border-radius: .29rem;
  font: 700 .83rem/1 sans-serif;
}

.support-icon::after {
  content: '';
  position: absolute;
  bottom: -.21rem;
  left: .22rem;
  width: .28rem;
  height: .28rem;
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  background: var(--pale);
}

.profile-fields {
  margin: 0 0 1rem;
  padding: .1rem .95rem;
  border-radius: .8rem;
  background: var(--pale);
}

.profile-fields div {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: .7rem;
  padding: .75rem 0;
}

.profile-fields div + div, .family-child + .family-child {
  border-top: 1px solid var(--line);
}

.profile-fields dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.profile-edit .quiet, .family-child + button {
  margin-top: .75rem;
}

.profile-reminders summary {
  cursor: pointer;
  font-weight: 650;
}

.family-child {
  flex-wrap: wrap;
  padding: .8rem 0;
}

.family-status {
  color: var(--muted);
  font-size: .88rem;
}

.family-select {
  margin: 1rem 0 .8rem;
  padding: .2rem 0;
  border: 0;
}

.childhood-leading {
  margin: .5rem 0 1.25rem;
}

.childhood-leading h4, .reading-section h4 {
  margin: .9rem 0 .3rem;
  font-size: 1rem;
}

.childhood-list {
  padding-left: 1.25rem;
}

.leading-practice {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  border-radius: .6rem;
  background: var(--pale);
}

.leading-practice p, .leading-practice ol {
  margin: .5rem 0 0;
}

.leading-practice li + li {
  margin-top: .4rem;
}

.forecast-themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.9rem;
}

.forecast-intro h1 {
  max-width: 19ch;
}

.forecast-intro p:not(.eyebrow) {
  max-width: 61ch;
}

.forecast-options, .forecast-reading {
  scroll-margin-top: 1.5rem;
}

.forecast-options > .notice {
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.forecast-options > .notice p {
  margin-bottom: .75rem;
}

.forecast-option {
  margin-bottom: 1.5rem;
}

.forecast-feature {
  border-color: var(--accent);
}

.forecast-benefits {
  max-width: 65ch;
}

.forecast-benefits ul {
  margin: 1rem 0 1.35rem;
  padding-left: 1.3rem;
  line-height: 1.55;
}

.forecast-benefits li + li {
  margin-top: .45rem;
}

.forecast-option .offer {
  margin-top: 1.25rem;
  gap: 1rem;
  align-items: center;
}

.forecast-option .offer .price {
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
}

.forecast-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-bottom: 1.25rem;
}

.forecast-period p {
  margin: 0;
}

.forecast-period span {
  color: var(--muted);
  font-size: .85rem;
}

.forecast-order-period {
  padding: .9rem 1rem;
  margin: 1.2rem 0;
}

.forecast-order-period p {
  margin: .4rem 0 0;
}

.forecast-picker {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.forecast-reading > .actions {
  margin-bottom: 1.5rem;
}

.forecast-reading .panel {
  scroll-margin-top: 1.5rem;
}

.forecast-summary {
  max-width: 64ch;
}

.forecast-theme {
  display: grid;
  gap: 0.32rem;
  align-content: start;
  padding: 1.1rem 1.25rem;
  border-radius: 0.65rem;
  background: var(--pale);
  color: var(--ink);
  border: 1px solid var(--line);
}

.forecast-theme .eyebrow, .forecast-theme span {
  color: var(--gold);
}

.forecast-theme span {
  font: 2.3rem/1.2 Georgia, serif;
}

.forecast-list {
  padding-left: 1.4rem;
}

.forecast-list li + li {
  margin-top: 0.55rem;
}

.forecast-checklist {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.forecast-checklist li + li {
  border-top: 1px solid var(--line);
}

.forecast-checklist label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  padding: .65rem 0;
  line-height: 1.55;
  cursor: pointer;
}

.forecast-checklist input {
  accent-color: var(--gold);
  margin-top: .3em;
}

.checklist-progress {
  color: var(--gold);
  font-weight: 600;
}

.forecast-practice-result {
  margin-top: 1rem;
}

.forecast-phrase {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: var(--pale);
  border-left: 3px solid var(--accent);
  font: 1.15rem/1.5 Georgia, serif;
}

.protected, .reading-screen {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.reading-screen :is(input, textarea, select, [contenteditable="true"]) {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

@media print {
  .reading-screen, .protected { display: none !important; }
}

.method-exercise summary + p {
  margin-top: .75rem;
}

.method-balance {
  border: 1px solid var(--line);
  border-radius: .7rem;
  padding: .85rem 1rem 1rem;
  margin: 1.25rem 0;
  min-inline-size: 0;
}

.method-balance legend {
  padding: 0 .4rem;
  font-weight: 650;
}

.method-balance input {
  user-select: text;
  -webkit-user-select: text;
}

.method-balance-result {
  display: block;
  color: var(--gold);
  font-weight: 650;
}

.protected.hidden-content {
  visibility: hidden;
}

#status {
  position: fixed;
  z-index: 2;
  bottom: max(1rem,env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .7rem 1rem;
  background: var(--dark);
  color: white;
  border-radius: .6rem;
  box-shadow: 0 .3rem 1rem #34352424;
}

footer {
  max-width: 1250px;
  margin: auto;
  padding: 0 clamp(1rem,5vw,4.8rem) max(1.8rem,env(safe-area-inset-bottom));
  font-size: .8rem;
  color: var(--muted);
}

@media(max-width:720px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .hero-home {
    grid-template-columns: 1fr;
  }
  .hero-home .progress-figure {
    display: none;
  }
  .masthead {
    flex-wrap: wrap;
  }
  .masthead nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .masthead nav button {
    white-space: nowrap;
  }
  .panel,.hero {
    border-radius: .9rem;
  }
  .offer {
    align-items: flex-start;
  }
  .route li {
    gap: .55rem;
  }
}

@media(max-width:480px) {
  .reading-section .offer, .forecast-option .offer {
    flex-direction: column;
    align-items: stretch;
  }
  .forecast-option .offer button {
    white-space: normal;
  }
}

@media print {
  .protected {
    display: none!important;
  }
}

.triangle {
  position: relative;
  width: 12rem;
  height: 10rem;
  margin: .25rem auto 1.2rem;
}

.triangle-lines {
  position: absolute;
  inset: 0;
}

.triangle-lines i {
  position: absolute;
  height: 1px;
  width: 9.33rem;
  transform-origin: 0 50%;
  background: #a68b60;
}

.triangle-lines i:nth-child(1) {
  left: 50%;
  top: 10%;
  transform: rotate(121deg);
}

.triangle-lines i:nth-child(2) {
  left: 50%;
  top: 10%;
  transform: rotate(59deg);
}

.triangle-lines i:nth-child(3) {
  left: 10%;
  top: 90%;
  width: 9.6rem;
}

.triangle-lines i:nth-child(4) {
  left: 30%;
  top: 50%;
  width: 4.8rem;
}

.triangle-lines i:nth-child(5) {
  left: 30%;
  top: 50%;
  width: 4.67rem;
  transform: rotate(59deg);
}

.triangle-lines i:nth-child(6) {
  left: 70%;
  top: 50%;
  width: 4.67rem;
  transform: rotate(121deg);
}

.triangle-point {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #a68b60;
  background: var(--paper);
  color: var(--muted);
}

.triangle-point[data-open="true"] {
  color: #fff9e9;
  background: var(--dark);
}

.point-1 {
  left: 50%;
  top: 10%;
}

.point-2 {
  left: 10%;
  top: 90%;
}

.point-3 {
  left: 90%;
  top: 90%;
}

.point-4 {
  left: 30%;
  top: 50%;
}

.point-5 {
  left: 70%;
  top: 50%;
}

.point-6 {
  left: 50%;
  top: 90%;
}
