:root {
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --ease-theme: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="day"] {
  --bg-top: #fcfcfa;
  --bg-bottom: #efefeb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-alt: rgba(244, 244, 240, 0.92);
  --surface-glow: rgba(255, 255, 255, 0.78);
  --text: #111316;
  --text-soft: #4f5560;
  --text-muted: #7a8088;
  --border: rgba(17, 19, 22, 0.09);
  --border-strong: rgba(17, 19, 22, 0.18);
  --accent: #111316;
  --accent-fade: #8f96a0;
  --button-primary-text: #f7f7f5;
  --track: rgba(17, 19, 22, 0.08);
  --shadow: 0 22px 60px -42px rgba(17, 19, 22, 0.24);
  --shadow-soft: 0 14px 28px -22px rgba(17, 19, 22, 0.16);
}

html[data-theme="night"] {
  --bg-top: #050607;
  --bg-bottom: #111318;
  --surface: rgba(18, 20, 24, 0.92);
  --surface-alt: rgba(24, 27, 32, 0.9);
  --surface-glow: rgba(255, 255, 255, 0.05);
  --text: #f5f6f7;
  --text-soft: #c7ccd4;
  --text-muted: #959ca8;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #f5f6f7;
  --accent-fade: #727985;
  --button-primary-text: #090b0e;
  --track: rgba(255, 255, 255, 0.08);
  --shadow: 0 28px 76px -46px rgba(0, 0, 0, 0.68);
  --shadow-soft: 0 14px 28px -22px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Instrument Sans", sans-serif;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  transition: background var(--ease-theme), color var(--ease-theme);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 22%, var(--surface-glow), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.03), transparent 38%);
  transition: background var(--ease-theme);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

body,
body::before,
.surface,
.button,
.brand-mark,
.metric-card,
.option-button,
.progress-track,
.progress-bar,
.question-dimension,
.info-pill {
  transition:
    background var(--ease-theme),
    color var(--ease-theme),
    border-color var(--ease-theme),
    box-shadow var(--ease-theme),
    opacity var(--ease-theme),
    transform 180ms ease;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-family: "Instrument Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: normal;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.9rem);
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.08;
}

h3 {
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.62;
}

::selection {
  background: var(--accent);
  color: var(--button-primary-text);
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-bottom: 4rem;
}

.utility-row {
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
}

.shell,
.shell-compact {
  width: min(1120px, calc(100vw - 3rem));
  margin: 0 auto;
}

.shell-compact {
  width: min(900px, calc(100vw - 2rem));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.85rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
}

.utility-row .top-actions {
  width: auto;
  justify-content: flex-end;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  display: grid;
  gap: 0.04rem;
}

.brand-copy strong {
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy small,
.helper-note,
.microcopy {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.text-link {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.text-link:hover {
  color: var(--text);
}

.locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.locale-button {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-width: 3.1rem;
  min-height: 2rem;
  padding: 0.38rem 0.72rem;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.locale-button.active {
  background: var(--accent);
  color: var(--button-primary-text);
}

.button,
.button-reset {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.82rem 1.16rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.button-primary {
  background: var(--accent);
  color: var(--button-primary-text);
  box-shadow: var(--shadow-soft);
}

.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}

.button:hover:not(:disabled),
.option-button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 48rem;
  font-size: 1.05rem;
}

.lead-small {
  max-width: 40rem;
  font-size: 0.96rem;
}

.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card,
.inset-card {
  padding: 1.35rem;
}

.landing-page,
.assessment-page {
  display: grid;
  gap: 1rem;
}

.landing-page-centered {
  min-height: calc(100vh - 4rem);
  align-items: center;
}

.hero-block {
  display: grid;
  gap: 1rem;
  padding: clamp(3rem, 10vw, 6rem) 0 1rem;
  max-width: 760px;
}

.hero-block h1 {
  max-width: none;
}

.hero-centered {
  justify-items: center;
  text-align: center;
  margin: 0 auto;
  width: min(860px, 100%);
  padding: clamp(2.5rem, 9vw, 5.5rem) 0;
  gap: 1.1rem;
}

.hero-centered h1,
.hero-purpose {
  white-space: nowrap;
}

.hero-brand {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.hero-mark {
  display: inline-grid;
  place-items: center;
  width: clamp(4.4rem, 8vw, 5.4rem);
  height: clamp(4.4rem, 8vw, 5.4rem);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  color: var(--text);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-summary {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
}

.hero-purpose {
  max-width: none;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.85vw, 1.16rem);
  line-height: 1.45;
}

.hero-button {
  min-width: 12.5rem;
  margin-top: 0.2rem;
}

.hero-note {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.compact-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.mini-step {
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem 1.35rem;
}

.mini-step + .mini-step {
  border-left: 1px solid var(--border);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.mini-step strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
}

.mini-step p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.note-card {
  display: grid;
  gap: 0.45rem;
}

.single-note {
  color: var(--text);
  font-size: 1rem;
}

.task-header {
  display: grid;
  gap: 0.8rem;
  padding-top: 1rem;
}

.task-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.task-header-top h1 {
  margin-top: 0.45rem;
  max-width: none;
  font-size: clamp(2rem, 5vw, 3rem);
}

.progress-meta {
  display: grid;
  gap: 0.12rem;
  justify-items: end;
  text-align: right;
}

.progress-meta strong {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
}

.progress-meta span {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.progress-track,
.dimension-meter {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}

.progress-bar,
.dimension-meter span {
  width: 0%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-fade) 100%);
}

.question-card,
.result-card {
  display: grid;
  gap: 1.2rem;
  padding: 1.4rem;
  animation: fade-up 320ms ease both;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.question-meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.question-number {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.question-dimension {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.74rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-card h2,
.result-card h2 {
  max-width: none;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.1;
}

.option-list {
  display: grid;
  gap: 0.75rem;
}

.option-button {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}

.option-button.active {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.option-index {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.option-text {
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.55;
}

.actions-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.1rem;
}

.actions-row .button,
.actions-row a {
  min-width: 10rem;
}

.result-headline {
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-title-row,
.result-badges {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.result-subtitle {
  margin-top: 0.3rem;
  color: var(--text-muted);
}

.info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.52rem 0.82rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 500;
}

.metric-grid,
.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
}

.metric-card label {
  display: block;
  margin-bottom: 0.24rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
}

.result-copy {
  font-size: 0.98rem;
  line-height: 1.68;
}

.subtle-copy {
  color: var(--text-soft);
}

.inset-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  box-shadow: none;
}

.inset-card h3 {
  margin-bottom: 0.8rem;
}

.split-info-card {
  padding-top: 1.2rem;
}

.feature-list {
  margin: 0.75rem 0 0;
  padding-left: 1rem;
  color: var(--text-soft);
  display: grid;
  gap: 0.55rem;
}

.compact-list {
  gap: 0.45rem;
}

.dimension-list {
  display: grid;
  gap: 0.9rem;
}

.dimension-item {
  display: grid;
  gap: 0.4rem;
}

.dimension-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dimension-label strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.dimension-label span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.dimension-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.56;
}

.result-note {
  display: grid;
  gap: 0.32rem;
  padding-top: 0.1rem;
}

.hidden {
  display: none !important;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15.5px;
  }

  .site-shell {
    padding-bottom: 3rem;
  }

  .shell,
  .shell-compact {
    width: calc(100vw - 1.25rem);
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .utility-row .top-actions {
    width: auto;
    justify-content: flex-end;
  }

  .utility-row {
    top: 0.7rem;
  }

  .hero-block {
    padding-top: 2.75rem;
  }

  .hero-centered {
    min-height: auto;
    padding: 2rem 0 3rem;
  }

  .hero-summary,
  .hero-purpose,
  .hero-centered h1,
  .hero-note {
    white-space: normal;
  }

  .compact-steps,
  .metric-grid,
  .two-column-grid {
    grid-template-columns: 1fr;
  }

  .mini-step + .mini-step {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .task-header-top {
    align-items: flex-start;
  }

  .progress-meta {
    justify-items: start;
    text-align: left;
  }

  .actions-row {
    flex-direction: column-reverse;
  }

  .actions-row .button,
  .actions-row a {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.25rem, 10vw, 3.6rem);
  }

  h2 {
    font-size: clamp(1.45rem, 6.8vw, 2rem);
  }
}
