:root {
  --ink: #080808;
  --surface: #11110f;
  --surface-high: #191814;
  --bone: #f0ede7;
  --muted: #99958c;
  --dim: #5f5b53;
  --line: #2a2822;
  --gold: #c8b8a2;
  --gold-dim: #7a6e63;
  --display: "Playfair Display", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--bone);
  background:
    radial-gradient(circle at 82% 18%, rgba(200, 184, 162, 0.08), transparent 24rem),
    radial-gradient(circle at 12% 92%, rgba(200, 184, 162, 0.04), transparent 32rem),
    var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.24;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--bone);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.site-header p,
.site-footer,
.eyebrow,
.progress-header,
.card-label,
.week-heading,
.result-level {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-header > p { color: var(--dim); }

.brand {
  display: inline-flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-decoration: none;
}

.brand img { border-radius: 9px; opacity: 0.9; }

.score-shell {
  position: relative;
  display: grid;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 190px);
  margin-inline: auto;
  overflow: hidden;
  border-inline: 1px solid rgba(42, 40, 34, 0.65);
}

.score-shell::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(24px, 7vw, 92px);
  z-index: 0;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, var(--gold-dim) 12%, var(--gold-dim) 88%, transparent);
  opacity: 0.5;
}

.orbit {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(200, 184, 162, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.orbit::after {
  position: absolute;
  top: 50%;
  left: -3px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(200, 184, 162, 0.75);
}

.orbit-one {
  top: -12rem;
  right: -17rem;
  width: 42rem;
  height: 42rem;
  animation: orbit-drift 22s ease-in-out infinite alternate;
}

.orbit-two {
  right: 5rem;
  bottom: -12rem;
  width: 23rem;
  height: 23rem;
  opacity: 0.45;
  animation: orbit-drift 28s ease-in-out 1.4s infinite alternate-reverse;
}

@keyframes orbit-drift {
  from { transform: rotate(-5deg) translate3d(0, 0, 0); }
  to { transform: rotate(8deg) translate3d(-12px, 8px, 0); }
}

.panel {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 96px));
  margin: auto;
  padding-block: clamp(4rem, 9vh, 7.5rem);
}

.panel[hidden] { display: none; }

.panel.is-active {
  animation: panel-enter 520ms cubic-bezier(0.22, 0.75, 0.28, 1) both;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0;
  color: var(--gold);
}

.landing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.65fr);
  gap: 3rem 5rem;
  align-items: end;
}

.landing-panel > .eyebrow {
  grid-column: 1 / -1;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

h1, h2, h3, p { text-wrap: pretty; }

h1,
.question-copy h2,
.result-heading h2,
.plan-dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.6rem, 8.5vw, 7rem);
  line-height: 0.94;
}

h1 em {
  color: var(--gold);
  font-weight: 400;
}

.lede {
  max-width: 34rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.landing-action { padding-bottom: 0.5rem; }
.landing-action > p {
  margin: 1rem 0 0;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  color: #211c12;
  background: var(--bone);
}

.primary-button:hover { background: var(--gold); }

.secondary-button {
  justify-content: center;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  text-align: center;
}

.secondary-button:hover { color: var(--bone); border-color: var(--gold-dim); }

.promise-note {
  display: flex;
  grid-column: 1 / -1;
  gap: 1rem;
  align-items: center;
  max-width: 34rem;
  padding-top: 2rem;
  color: var(--dim);
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  line-height: 1.6;
}

.promise-note p { margin: 0; }
.promise-mark { color: var(--gold-dim); }

/* Questions */

.question-panel { width: min(760px, calc(100% - 96px)); }

.progress-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
  color: var(--dim);
}

.progress-header p { margin: 0; }

.progress-track {
  grid-column: 1 / -1;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 16.666%;
  height: 100%;
  background: var(--gold);
  transition: width 320ms ease;
}

.text-button {
  width: fit-content;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.35rem;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.text-button:hover { color: var(--bone); text-decoration-color: var(--gold-dim); }

.question-copy { margin: clamp(4rem, 9vh, 7rem) 0 2.75rem; }
.question-copy .eyebrow { margin-bottom: 1.25rem; }

.question-copy h2 {
  max-width: 730px;
  font-size: clamp(2.5rem, 5.4vw, 4.35rem);
  line-height: 1.06;
}

.question-help {
  max-width: 36rem;
  min-height: 1.5rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.answer-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.answer-button {
  position: relative;
  min-height: 78px;
  padding: 1.15rem 3.25rem 1.15rem 1.25rem;
  color: var(--bone);
  background: rgba(17, 17, 15, 0.82);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.45;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease;
}

.answer-button::after {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  width: 8px;
  height: 8px;
  content: "";
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.answer-button:hover,
.answer-button.is-selected {
  background: var(--surface-high);
  border-color: var(--gold-dim);
}

.answer-button:hover::after,
.answer-button.is-selected::after {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(200, 184, 162, 0.5);
}

/* Result */

.result-panel { width: min(800px, calc(100% - 96px)); }
.result-heading { max-width: 690px; }

.result-level {
  width: fit-content;
  margin: 1.25rem 0 2.2rem;
  padding: 0.55rem 0.75rem;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

.result-heading h2 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.02;
}

.result-reason {
  max-width: 40rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.tomorrow-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: linear-gradient(130deg, rgba(200, 184, 162, 0.08), transparent 55%), var(--surface);
  border: 1px solid var(--gold-dim);
}

.card-index {
  color: var(--gold-dim);
  font-family: var(--display);
  font-size: 3.5rem;
  line-height: 0.92;
}

.card-label { margin: 0 0 0.8rem; color: var(--gold); }
.tomorrow-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.2vw, 2.2rem);
  font-weight: 400;
  line-height: 1.3;
}

.tomorrow-card p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.week-preview { margin-top: 3.5rem; }

.week-heading {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1rem;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}

.week-heading .eyebrow { color: var(--muted); }
.week-list { margin: 0; padding: 0; list-style: none; }

.week-list li {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 62px;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}

.week-list li:first-child { color: var(--bone); }
.week-list .day-number { color: var(--gold-dim); font-size: 0.7rem; letter-spacing: 0.16em; }
.week-list .day-status { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }

.result-actions {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 560px);
  margin: 3.5rem auto 0;
}

.purchase-note {
  margin: 0.1rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-align: center;
}

.plan-link { margin: 0.8rem auto 0; font-size: 0.78rem; }
.result-disclaimer {
  margin: 2.5rem 0 0;
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
}

/* Dialog */

.plan-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  color: var(--bone);
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  box-shadow: 0 30px 120px #000;
}

.plan-dialog::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(8px); }

.dialog-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.75rem;
  background: rgba(17, 17, 15, 0.96);
  border-bottom: 1px solid var(--line);
}

.dialog-header .eyebrow { margin-bottom: 0.6rem; }
.plan-dialog h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); }

.dialog-close {
  width: 42px;
  height: 42px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 300;
}

.dialog-close:hover { color: var(--bone); border-color: var(--gold-dim); }

.full-plan-list { margin: 0; padding: 0 1.75rem; list-style: none; }

.full-plan-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.full-plan-list .day-number { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.14em; }
.full-plan-list h3 { margin: 0 0 0.4rem; font-family: var(--display); font-size: 1.1rem; font-weight: 400; }
.full-plan-list p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.dialog-note { margin: 0; padding: 1.5rem 1.75rem 2rem; color: var(--gold); font-family: var(--display); font-style: italic; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 98px;
  color: var(--dim);
  line-height: 1.5;
}

.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--muted); }

.noscript-note {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 30;
  padding: 1rem;
  color: var(--ink);
  background: var(--bone);
  font-size: 0.85rem;
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  .score-shell { width: calc(100% - 28px); }

  .site-header { min-height: 78px; }
  .site-header > p { display: none; }
  .score-shell { min-height: calc(100vh - 160px); border-inline: 0; }
  .score-shell::before { left: 8px; }
  .panel,
  .question-panel,
  .result-panel { width: calc(100% - 36px); padding-block: 3.5rem; }

  .landing-panel { grid-template-columns: 1fr; gap: 2.75rem; align-items: start; }
  .landing-panel > .eyebrow { margin-left: 0; }
  h1 { font-size: clamp(3.1rem, 15vw, 5rem); }
  .promise-note { grid-column: 1; }
  .answer-list { grid-template-columns: 1fr; }
  .question-copy { margin-block: 3.5rem 2rem; }
  .question-copy h2 { font-size: clamp(2.35rem, 11vw, 3.6rem); }
  .primary-button { justify-content: center; text-align: center; }
  .primary-button > span[aria-hidden="true"] { display: none; }
  .tomorrow-card { grid-template-columns: 1fr; }
  .card-index { font-size: 2.7rem; }
  .week-list li { grid-template-columns: 44px 1fr auto; font-size: 0.83rem; }
  .site-footer { flex-direction: column; gap: 1rem; justify-content: center; padding-block: 2rem; text-align: center; }
}

@media (max-width: 410px) {
  .brand { letter-spacing: 0.22em; }
  .landing-panel > .eyebrow { display: none; }
  h1 { font-size: clamp(2.85rem, 13vw, 3.5rem); }
  .week-list .day-status { display: none; }
  .week-list li { grid-template-columns: 42px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
