:root {
  color-scheme: light;
  --paper: #f8f4eb;
  --white: #fffdf8;
  --ink: #202d34;
  --muted: #4e5c60;
  --copper: #815036;
  --line: #ded3c3;
  --dark: #1e2d37;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.65; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .25em; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
:focus-visible { outline: 3px solid #9c5535; outline-offset: 4px; }
.zodiac-band :focus-visible, .personal-map :focus-visible { outline-color: #f0c49a; }
.skip { position: absolute; inset-inline-start: 1rem; top: -10rem; z-index: 2; background: var(--white); padding: .65rem 1rem; }
.skip:focus { top: 1rem; }
.wrap { width: min(1100px, 100% - 3rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.bar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-size: 1.6rem; font-weight: 750; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.brand span { color: var(--copper); }
nav { display: flex; flex-wrap: wrap; gap: clamp(.65rem, 3vw, 2rem); }
nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
nav a:hover, .plain:hover { text-decoration: underline; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2rem, 5.5vw, 4.75rem); }
.eyebrow { color: var(--copper); font-size: .9rem; font-weight: 700; margin: 0 0 .7rem; }
h1, h2, h3, h4, h5, p { margin: 0; }
h1, h2 { line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.8rem, 6.5vw, 5.6rem); margin-bottom: 1.25rem; }
h1 em { font-style: normal; color: var(--copper); }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: .65rem; }
.intro { color: var(--muted); max-width: 40ch; font-size: 1.15rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; }
.button, .plain { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 48px; border-radius: .55rem; padding: .65rem 1.2rem; font-weight: 700; }
.button { background: var(--dark); color: #fff; text-decoration: none; border: 1px solid transparent; }
.button:hover { background: #344953; }
.plain { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.hero-art { overflow: hidden; border-radius: 49% 49% .85rem .85rem; box-shadow: 0 12px 38px #25343a22; max-width: 440px; }
.hero-art svg { display: block; width: 100%; height: auto; }
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section > p:not(.eyebrow) { max-width: 65ch; }
.band { background: #efe8db; border-block: 1px solid var(--line); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: .85rem; padding: clamp(1rem, 3vw, 1.65rem); }
.birth-form { margin-top: 1.25rem; display: grid; gap: .75rem; max-width: 33rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: .35rem; font-weight: 750; }
.date-fields { display: grid; grid-template-columns: .8fr .8fr 1.2fr; gap: .6rem; }
label { display: grid; gap: .3rem; font-weight: 600; min-width: 0; }
input, select { width: 100%; min-height: 48px; border: 1px solid #8a8278; border-radius: .45rem; padding: .5rem .65rem; background: #fff; color: var(--ink); }
input[type="number"] { direction: ltr; text-align: center; }
.error { color: #942c23; font-weight: 650; }
.year-options { border-top: 1px solid var(--line); }
.year-options summary { color: var(--muted); font-size: .9rem; }
.year-options label { max-width: 14rem; }
.year-options p { margin-top: .45rem; color: var(--muted); font-size: .9rem; }
#target-year { direction: ltr; text-align: center; }
.report-header { margin-bottom: 1rem; }
.report-header h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); scroll-margin-top: 1.5rem; }
.report-header p { max-width: 65ch; color: var(--muted); }
.personal-map { margin-block: 1.35rem; padding: clamp(1rem, 3vw, 2rem); border-radius: .85rem; background: var(--dark); color: #fffaf0; }
.personal-map > h3 { font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; margin-bottom: 1rem; }
.map-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.map-tile { display: flex; flex-direction: column; min-width: 0; padding: clamp(.75rem, 1.6vw, 1.15rem); border: 1px solid #53616a; border-radius: .55rem; background: #293943; }
.map-label { color: #e1c2a7; font-size: .9rem; font-weight: 650; }
.map-value { min-height: 3.5rem; margin-block: .5rem .35rem; color: #f5d4b2; font: 3rem/1.15 Georgia, serif; font-variant-numeric: lining-nums tabular-nums; }
.map-zodiac-value { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-height: 3.5rem; margin-block: .5rem .35rem; }
.map-zodiac-value .animal-illustration { width: 3.15rem; height: 3.15rem; flex-basis: 3.15rem; }
.map-animal-name { color: #f5d4b2; font-size: 1.45rem; line-height: 1.2; font-weight: 700; }
.map-tile > .map-animal-name { margin-block: .5rem .35rem; min-height: 3.5rem; }
.map-description { font-size: 1rem; line-height: 1.5; }
.map-meta { margin-top: .25rem; color: #dfc6b2; font-size: .875rem; }
.map-link { display: flex; align-items: center; min-height: 44px; width: fit-content; margin-top: auto; padding-top: .35rem; color: #f5d4b2; font-size: .9rem; font-weight: 650; }
#report-profile, #report-birthday, #report-years, .animal { scroll-margin-top: 1.25rem; }
.profile-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.profile-heading .eyebrow { margin-bottom: .15rem; }
.profile-heading h3, .year-section > h3 { font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.2; }
.path-badge { display: grid; place-items: center; flex: 0 0 3.85rem; height: 3.85rem; border-radius: 50%; background: var(--dark); color: #f5d4b2; font: 1.95rem Georgia, serif; }
.trait-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.trait { padding: .85rem; border-radius: .55rem; background: #f5eee3; }
.trait h4, .birthday-note h4 { margin-bottom: .3rem; }
.trait p, .birthday-note p { color: var(--muted); }
.trait p + p { margin-top: .55rem; }
.birthday-note { margin-block: 1rem .35rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.birthday-note .source { margin-top: .35rem; }
.year-section { margin-top: 2rem; }
.year-section > p { margin-top: .35rem; color: var(--muted); }
.year-timeline { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-block: 1rem .75rem; }
.year-timeline::before { content: ""; position: absolute; inset-inline: 16.667%; inset-block-start: 1.15rem; height: 1px; background: #a7836c; }
.year-tab { position: relative; display: grid; align-content: start; justify-items: center; gap: .2rem; min-width: 0; padding: .6rem .25rem; border: 1px solid transparent; border-radius: .65rem; background: transparent; color: var(--ink); text-align: center; }
.year-tab::before { content: ""; width: .85rem; height: .85rem; margin-block: .1rem .25rem; border: 2px solid var(--copper); border-radius: 50%; background: var(--paper); }
.year-tab:hover { border-color: #a7836c; }
.year-tab[aria-selected="true"] { border-color: var(--copper); background: var(--white); color: var(--copper); }
.year-tab[aria-selected="true"]::before { background: var(--copper); }
.year-tab-date { font: clamp(1.35rem, 3vw, 1.85rem)/1.15 Georgia, serif; }
.year-tab-label { font-size: .875rem; line-height: 1.3; }
.year-tab[aria-selected="true"] .year-tab-label { font-weight: 750; }
.year-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.year-label { font-size: .9rem; color: var(--copper); font-weight: 750; }
.year-date { font: 2.5rem/1.15 Georgia, serif; margin-block: .25rem; }
.year-number { padding: .3rem .7rem; border-radius: .4rem; background: #f5eee3; color: var(--copper); font-size: .94rem; font-weight: 750; }
.year-theme { font-size: 1.2rem; font-weight: 750; margin-block: .65rem .25rem; }
.year-activity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-block: .9rem .45rem; }
.year-activity > div { padding: .7rem .85rem; border-inline-start: 2px solid var(--copper); background: #f8f1e7; }
.year-activity h5 { font-size: .94rem; margin-bottom: .15rem; }
.year-activity p { color: var(--muted); }
.year-card .trace, .year-card .source { font-size: .9rem; }
.result-copy { color: var(--muted); margin-bottom: .65rem; }
summary { min-height: 44px; padding-block: .6rem; font-weight: 700; }
.trace { margin-bottom: .4rem; overflow-wrap: anywhere; }
.trace bdi { font-variant-numeric: tabular-nums; }
.source { font-size: .88rem; margin-top: .8rem; }
.zodiac-band { background: var(--dark); color: #fffaf0; }
.zodiac-band .eyebrow { color: #f0c49a; }
.zodiac-grid { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; gap: .75rem; margin-block: 1.35rem; }
.animal { border: 1px solid #758087; border-radius: .65rem; background: #2b3a43; }
.animal summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem; padding: .75rem; min-height: 88px; list-style: none; }
.animal summary::-webkit-details-marker { display: none; }
.animal summary::after { content: ""; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-inline-end: .15rem; }
.animal[open] summary::after { transform: rotate(225deg); }
.animal summary:hover { color: #ffd6af; }
.animal[open] { border-color: #e1b58f; }
.animal.is-personal { border-color: #f0c49a; box-shadow: inset 0 0 0 1px #f0c49a; }
.animal p { padding: 0 .85rem .85rem; color: #f4e5d6; }
.animal-label { display: flex; align-items: center; gap: .55rem; }
.animal-name { display: grid; gap: .15rem; }
.animal-match { color: #f0c49a; font-size: .8rem; font-weight: 750; line-height: 1.3; }
.animal .animal-personal-note { color: #f0c49a; font-size: .9rem; }
.animal-prompt strong { display: block; margin-bottom: .2rem; color: #f0c49a; }
.animal-illustration { width: 3.55rem; height: 3.55rem; flex: 0 0 3.55rem; padding: .25rem; border-radius: 50%; background: #223039; color: #f0c49a; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer { display: flex; gap: 1.25rem; align-items: center; justify-content: space-between; padding-block: 1.5rem; }
.footer p { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .trait-grid { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 2rem); }
  .bar { flex-wrap: wrap; gap: 0 .5rem; padding-block: .4rem; }
  nav { font-size: .88rem; }
  h1 { margin-bottom: .8rem; }
  .intro { font-size: 1.05rem; }
  .birth-form .actions > * { padding-inline: .75rem; }
  .year-activity { grid-template-columns: 1fr; }
  .personal-map { padding: .75rem; }
  .map-grid { gap: .45rem; }
  .map-tile { padding: .65rem; }
  .map-value { font-size: 2.55rem; min-height: 3rem; }
  .map-zodiac-value { min-height: 3rem; }
  .map-zodiac-value .animal-illustration { width: 2.45rem; height: 2.45rem; flex-basis: 2.45rem; }
  .map-animal-name { font-size: 1.3rem; }
  .zodiac-grid { grid-template-columns: repeat(2, 1fr); }
  .animal-label { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .footer { align-items: start; flex-direction: column; gap: .5rem; }
}
@media (max-width: 340px) {
  .map-grid { grid-template-columns: 1fr; }
}
