:root {
  color-scheme: dark;
  --bg: #14100e;
  --panel: #1c1714;
  --ink: #f3e9df;
  --muted: #a89888;
  --line: #342a24;
  --accent: #e8a060;
  --brachy: #e07a5f;
  --meso: #81b29a;
  --ok: #81b29a;
  --warn: #e9c46a;
  --danger: #e07a5f;
  --stop: #c1121f;
  --radius: 1rem;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 20rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(232, 160, 96, 0.08), transparent 45%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #1a1008;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  z-index: 50;
}

.skip:focus { top: 1rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 40% 60% 55% 45%;
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--accent);
}

.brand strong,
.brand small { display: block; }

.brand strong {
  font-family: Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-tag {
  margin: 0;
  max-width: 22rem;
  color: var(--muted);
  font-size: 0.88rem;
}

main { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0 2rem;
}

.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: currentColor;
}

h1 {
  margin: 0 0 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h1 em { color: var(--accent); font-style: italic; }

.lede {
  margin: 0 0 1rem;
  max-width: 36rem;
  color: #e2d6c8;
  font-size: 1.05rem;
}

.not-vet {
  margin: 0;
  max-width: 34rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--warn);
  background: rgba(233, 196, 106, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-photo { margin: 0; }

.photo-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--panel);
  aspect-ratio: 3 / 4;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-frame img[data-missing="true"] { display: none; }

.photo-fallback {
  display: none;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.photo-frame:has(img[data-missing="true"]) .photo-fallback,
.photo-frame.no-photo .photo-fallback {
  display: flex;
}

.css-banx {
  position: relative;
  width: 9rem;
  height: 8.5rem;
}

.css-banx .skull {
  position: absolute;
  inset: 1.2rem 0.8rem 0.5rem;
  border-radius: 48% 48% 40% 40%;
  background: linear-gradient(160deg, #3d342e, #2a231f);
  border: 1px solid #5a4a40;
}

.css-banx .ear {
  position: absolute;
  top: 0.4rem;
  width: 2.2rem;
  height: 2.8rem;
  border-radius: 50% 50% 40% 40%;
  background: #2f2722;
  border: 1px solid #5a4a40;
}

.css-banx .ear.left { left: 0.6rem; transform: rotate(-18deg); }
.css-banx .ear.right { right: 0.6rem; transform: rotate(18deg); }

.css-banx .muzzle {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  width: 3.4rem;
  height: 2.1rem;
  border-radius: 40% 40% 48% 48%;
  background: #4a3c34;
  transform: translateX(-50%);
}

.css-banx .nose {
  position: absolute;
  left: 50%;
  bottom: 2.3rem;
  width: 1.1rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #1a1410;
  transform: translateX(-50%);
}

.css-banx .eye {
  position: absolute;
  top: 3.4rem;
  width: 0.55rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #0d0a08;
}

.css-banx .eye.left { left: 2.7rem; }
.css-banx .eye.right { right: 2.7rem; }

.hero-photo figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.instrument {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
  background: rgba(28, 23, 20, 0.92);
}

.instrument-head h2 {
  margin: 0 0 0.35rem;
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.instrument-head p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

fieldset {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.or { color: var(--muted); font-size: 0.85rem; }

input[type="text"] {
  flex: 1 1 12rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #120e0c;
  color: var(--ink);
  font: inherit;
}

.btn {
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn:hover { border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1008;
}

.hint { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.85rem; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  max-width: 28rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.segmented button {
  min-height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.readout { margin-top: 1.5rem; }

.verdict-card {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #120e0c;
}

.verdict-card[data-level="go"] { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.verdict-card[data-level="caution"] { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.verdict-card[data-level="high"] { border-color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.verdict-card[data-level="stop"] { border-color: var(--stop); box-shadow: inset 3px 0 0 var(--stop); }

.verdict-kicker {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.verdict-card h3 {
  margin: 0 0 0.5rem;
  font-family: Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.verdict-card p { margin: 0; color: #e2d6c8; }

.verdict-duration {
  margin: 0 0 0.65rem !important;
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 0.95rem;
}

.profile-card {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #120e0c;
}

.profile-kicker {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #e2d6c8;
  font-size: 0.92rem;
}

.profile-card li { margin-bottom: 0.35rem; }

.profile-card .flag {
  color: var(--warn);
  font-weight: 700;
  font-size: 0.85em;
}

.profile-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hint-inline {
  color: var(--muted);
  font-size: 0.8rem;
}

fieldset .row label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

input[type="number"] {
  width: 5.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #120e0c;
  color: var(--ink);
  font: inherit;
}

.verdict-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.1rem 0;
}

.metric {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #120e0c;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.compare {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.compare h3 {
  margin: 0 0 0.4rem;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.compare-note {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 10rem 1fr 4.5rem;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.bar-label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.88rem;
}

.sil {
  display: inline-block;
  width: 1.4rem;
  height: 1.1rem;
  border-radius: 50% 50% 40% 40%;
  background: #3a302a;
  position: relative;
}

.sil-brachy::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  width: 0.7rem;
  height: 0.45rem;
  border-radius: 40%;
  background: #2a221c;
  transform: translateX(-50%);
}

.sil-meso {
  width: 1.7rem;
}

.sil-meso::after {
  content: "";
  position: absolute;
  left: 55%;
  bottom: 0.15rem;
  width: 1rem;
  height: 0.4rem;
  border-radius: 40% 60% 50% 40%;
  background: #2a221c;
  transform: translateX(-20%);
}

.bar-track {
  height: 0.85rem;
  overflow: hidden;
  border-radius: 999px;
  background: #2a221c;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 400ms ease;
}

.bar-fill.brachy { background: linear-gradient(90deg, #e9c46a, var(--brachy)); }
.bar-fill.meso { background: linear-gradient(90deg, #81b29a, #52796f); }

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.dial-wrap {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
}

.dial-face {
  position: relative;
  width: 10rem;
  height: 5.2rem;
  margin: 0 auto;
  overflow: hidden;
}

.dial-face::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10rem;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    var(--ok) 0deg 45deg,
    var(--warn) 45deg 90deg,
    var(--danger) 90deg 130deg,
    var(--stop) 130deg 180deg,
    transparent 180deg 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent 58%, #000 59%);
  mask: radial-gradient(farthest-side, transparent 58%, #000 59%);
}

.dial-needle {
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 2px;
  height: 4.2rem;
  background: var(--ink);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-90deg);
  transition: transform 450ms ease;
  border-radius: 2px;
}

.dial-hub {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, 40%);
}

.dial-caption {
  margin: 0.5rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.day-curve h4 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.curve-legend span {
  display: inline-block;
  width: 1.1rem;
  height: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
  border-radius: 2px;
}

.curve-legend .lg-brachy { background: var(--brachy); }
.curve-legend .lg-meso { background: var(--meso); }

#curve-svg {
  width: 100%;
  height: auto;
  background: #120e0c;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.curve-brachy {
  stroke: var(--brachy);
  stroke-width: 2.25;
}

.curve-meso {
  stroke: var(--meso);
  stroke-width: 2;
  stroke-dasharray: 4 3;
  opacity: 0.9;
}

#curve-now {
  stroke: rgba(243, 233, 223, 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(193, 18, 31, 0.15);
  color: #ffb4b4;
}

.why,
.method {
  margin-top: 2.5rem;
}

.why h2,
.method h2 {
  margin: 0 0 0.75rem;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
}

.why p,
.method li {
  color: #e2d6c8;
}

.thesis-note {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(232, 160, 96, 0.07);
  color: var(--ink) !important;
  font-family: Georgia, serif;
  font-style: italic;
}

.method ul { padding-left: 1.15rem; }

.limits {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.limits h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.banx-does {
  margin-top: 2.5rem;
}

.banx-does h2 {
  margin: 0 0 0.75rem;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
}

.banx-does > p {
  margin: 0 0 1rem;
  max-width: 36rem;
  color: #e2d6c8;
}

.diva-shot {
  margin: 0;
  max-width: 22rem;
}

.photo-frame-wide {
  aspect-ratio: 3 / 4;
}

.diva-shot figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.collage {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.collage h2 {
  margin: 0 0 0.35rem;
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.collage-lede {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.collage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.collage-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--panel);
  aspect-ratio: 1;
}

.collage-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collage-grid figure:nth-child(4),
.collage-grid figure:nth-child(5) {
  /* last row: two up, still even on tablet */
}

.site-footer {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .meta { margin-top: 0.25rem; }

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-photos { grid-template-columns: 1fr 1fr; max-width: 28rem; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .bar-value { text-align: left; }
  .dial-wrap { grid-template-columns: 1fr; }
  .collage-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 28rem) {
  .hero-photos { grid-template-columns: 1fr; max-width: 18rem; }
  .collage-grid { grid-template-columns: 1fr 1fr; }
  .diva-shot { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill,
  .dial-needle { transition: none; }
}
