:root {
  --bg: #f6f1e5;
  --paper: rgba(255, 252, 246, 0.88);
  --paper-strong: rgba(255, 255, 255, 0.92);
  --ink: #14120f;
  --muted: #5f574d;
  --line: rgba(20, 18, 15, 0.1);
  --accent: #0c7c59;
  --accent-2: #ff6b35;
  --accent-3: #0f52ba;
  --accent-4: #ffd166;
  --shadow: 0 24px 60px rgba(22, 22, 22, 0.12);
  --shadow-soft: 0 16px 40px rgba(22, 22, 22, 0.08);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.2, 0.9, 0.25, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 107, 53, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(12, 124, 89, 0.2), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(15, 82, 186, 0.12), transparent 30%),
    linear-gradient(180deg, #faf4e8 0%, #f1eadb 100%);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Aptos', 'Segoe UI', 'Trebuchet MS', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
  caret-color: transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(22, 22, 22, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(22, 22, 22, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 85%);
}

button,
input {
  font: inherit;
}

input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  caret-color: auto;
}

button {
  cursor: pointer;
  border: none;
}

#app {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.page {
  display: grid;
  gap: 28px;
}

.auth-page {
  min-height: calc(100vh - 72px);
  place-items: center;
}

.hero-panel,
.panel,
.hero-strip {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: surface-enter 520ms var(--ease-standard) both;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  padding: 42px;
  min-height: 76vh;
  align-items: center;
}

.hero-panel::after,
.panel::after,
.hero-strip::after {
  content: '';
  position: absolute;
  inset: auto -12% -50% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 82, 186, 0.12), transparent 70%);
}

.hero-copy h1,
.panel h2,
.panel h3,
.hero-strip h2 {
  margin: 0;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 10ch;
  font-size: clamp(3.4rem, 8vw, 6rem);
  line-height: 0.95;
}

.hero-subtitle,
.support-copy,
.panel p,
li,
label {
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 10px;
}

.hero-subtitle {
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.68;
  margin: 18px 0 24px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.primary-button,
.ghost-button,
.choice {
  border-radius: 999px;
  transition:
    transform 180ms var(--ease-snappy),
    box-shadow 180ms var(--ease-snappy),
    background 180ms var(--ease-snappy),
    border-color 180ms var(--ease-snappy),
    color 180ms var(--ease-snappy);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #17a673 60%, #36b37e);
  color: #fff;
  padding: 14px 22px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(12, 124, 89, 0.24);
}

.primary-button:hover {
  box-shadow: 0 18px 34px rgba(12, 124, 89, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.choice:hover {
  transform: translateY(-2px) scale(1.01);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.ghost-button {
  background: rgba(15, 82, 186, 0.08);
  color: var(--accent-3);
  padding: 12px 16px;
  font-weight: 700;
  border: 1px solid rgba(15, 82, 186, 0.12);
}

.ghost-button:hover {
  background: rgba(15, 82, 186, 0.12);
  box-shadow: 0 12px 22px rgba(15, 82, 186, 0.08);
}

.primary-button:active,
.ghost-button:active,
.choice:active,
.step-tile-button:active {
  transform: translateY(0) scale(0.985);
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.choice:focus-visible,
.goal-form input:focus-visible,
.blueprint-slider-field input[type="range"]:focus-visible {
  outline: 3px solid rgba(15, 82, 186, 0.24);
  outline-offset: 3px;
}

.card-grid,
.dashboard-grid,
.results-layout,
.split-panel {
  display: grid;
  gap: 20px;
}

.card-grid,
.dashboard-grid,
.results-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.step-tile,
.panel {
  padding: 28px;
}

.info-card,
.step-tile {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.accent-card,
.accent-panel {
  background: linear-gradient(160deg, rgba(12, 124, 89, 0.12), rgba(15, 82, 186, 0.06) 58%, rgba(255, 107, 53, 0.1));
}

.steps-grid {
  display: grid;
  gap: 14px;
}

.info-card {
  padding: 22px;
}

.step-tile {
  padding: 20px;
}

.step-tile-button {
  display: grid;
  gap: 10px;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition:
    transform 220ms var(--ease-snappy),
    box-shadow 220ms var(--ease-snappy),
    border-color 220ms var(--ease-snappy),
    background 220ms var(--ease-snappy);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.92)),
    linear-gradient(135deg, rgba(15, 82, 186, 0.06), rgba(255, 107, 53, 0.035));
  border-color: rgba(15, 82, 186, 0.14);
  box-shadow:
    0 16px 28px rgba(22, 22, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.step-tile-button::before {
  content: '';
  position: absolute;
  top: -45%;
  left: -180%;
  width: 95%;
  height: 190%;
  background: linear-gradient(
    105deg,
    rgba(125, 170, 255, 0) 0%,
    rgba(125, 170, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(125, 170, 255, 0.18) 70%,
    rgba(125, 170, 255, 0) 100%
  );
  box-shadow: 0 0 30px rgba(125, 170, 255, 0.22);
  transform: rotate(16deg) translate3d(0, 0, 0);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.step-tile-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 20px 34px rgba(22, 22, 22, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 82, 186, 0.22);
}

.step-tile-button:hover::before {
  animation: glare-sweep 1100ms var(--ease-standard) 1;
}

.action-card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.step-tile-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 18, 15, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.step-tile-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 82, 186, 0.14);
  background: rgba(15, 82, 186, 0.08);
  color: var(--accent-3);
  font-size: 1rem;
  font-weight: 800;
  transition:
    transform 220ms var(--ease-snappy),
    background 220ms var(--ease-snappy),
    color 220ms var(--ease-snappy);
}

.step-tile-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-tile-button h3,
.step-tile-button p {
  transition:
    transform 220ms var(--ease-snappy),
    color 220ms var(--ease-snappy),
    opacity 220ms var(--ease-snappy);
}

.step-tile-button > .eyebrow,
.step-tile-button > h3,
.step-tile-button > p {
  position: relative;
  z-index: 1;
}

.step-tile-button:hover h3 {
  transform: translateX(2px);
}

.step-tile-button:hover .step-tile-arrow {
  transform: translateX(2px);
  background: rgba(15, 82, 186, 0.14);
  border-color: rgba(15, 82, 186, 0.2);
}

.info-card .eyebrow,
.panel .eyebrow {
  opacity: 0.95;
}

.info-card,
.audience-card,
.challenge-metric,
.workspace-actions,
.preview-legend {
  background: rgba(255, 255, 255, 0.72);
}

.trust-list,
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.trust-list li,
.task-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(22, 22, 22, 0.04);
}

.panel {
  padding: 30px;
}

.panel h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 10px;
}

.panel h3,
.hero-strip h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero-strip {
  display: grid;
  gap: 10px;
  padding: 22px 30px;
}

.hero-strip-copy {
  max-width: 46rem;
  margin: 0;
}

.choices-grid {
  display: grid;
  gap: 12px;
}

.choices-grid-inline {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid rgba(15, 82, 186, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(22, 22, 22, 0.05);
  border-radius: 24px;
}

.choice:hover {
  border-color: rgba(15, 82, 186, 0.22);
  box-shadow: 0 16px 28px rgba(22, 22, 22, 0.08);
}

.choice span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(15, 82, 186, 0.12));
  color: var(--ink);
  font-weight: 800;
  transition: transform 180ms var(--ease-snappy), background 180ms var(--ease-snappy);
}

.choice:hover span {
  transform: scale(1.06);
}

.choice:disabled {
  cursor: default;
}

.choice:disabled:hover {
  transform: none;
}

.choice.is-correct-answer {
  border-color: rgba(12, 124, 89, 0.45);
  background: rgba(12, 124, 89, 0.14);
  color: var(--ink);
}

.choice.is-correct-answer span {
  background: rgba(12, 124, 89, 0.2);
  color: var(--accent);
}

.choice.is-selected-wrong {
  border-color: rgba(255, 107, 53, 0.45);
  background: rgba(255, 107, 53, 0.14);
  color: var(--ink);
}

.choice.is-selected-wrong span {
  background: rgba(255, 107, 53, 0.2);
  color: var(--accent-2);
}

.goal-form {
  display: grid;
  gap: 16px;
}

.goal-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.goal-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  transition:
    border-color 180ms var(--ease-snappy),
    box-shadow 180ms var(--ease-snappy),
    background 180ms var(--ease-snappy);
}

.goal-form input:hover {
  border-color: rgba(15, 82, 186, 0.14);
}

.goal-form input:focus {
  border-color: rgba(15, 82, 186, 0.28);
  box-shadow: 0 0 0 6px rgba(15, 82, 186, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.auth-shell {
  display: grid;
  width: 100%;
  place-items: center;
}

.auth-card {
  display: grid;
  gap: 22px;
  width: min(560px, 100%);
  padding: 28px;
}

.auth-orbit {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.55;
}

.auth-orbit-a {
  inset: auto -40px -24px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.22), transparent 70%);
}

.auth-orbit-b {
  inset: -40px auto auto -32px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(15, 82, 186, 0.16), transparent 70%);
}

.auth-copy {
  display: grid;
  gap: 10px;
}

.auth-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

.auth-card .hero-subtitle {
  max-width: 34ch;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.auth-form {
  gap: 14px;
}

.auth-submit {
  justify-self: start;
  min-width: 128px;
}

.blueprint-grid {
  display: grid;
  gap: 10px;
}

.blueprint-grid-head,
.blueprint-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(96px, 1fr) minmax(96px, 1fr);
  gap: 12px;
  align-items: center;
}

.blueprint-grid-head p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.blueprint-row {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(22, 22, 22, 0.06);
}

.blueprint-row p {
  margin: 0;
}

.blueprint-slider-field {
  display: grid;
  gap: 8px;
}

.blueprint-slider-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.blueprint-slider-field input[type="range"] {
  width: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.blueprint-slider-field input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--range-progress, 0%),
    rgba(15, 82, 186, 0.14) var(--range-progress, 0%),
    rgba(15, 82, 186, 0.14) 100%
  );
}

.blueprint-slider-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 82, 186, 0.18);
  transition: transform 160ms var(--ease-snappy), box-shadow 160ms var(--ease-snappy);
}

.blueprint-slider-field input[type="range"]::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 82, 186, 0.14);
}

.blueprint-slider-field input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.blueprint-slider-field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 82, 186, 0.18);
}

.blueprint-slider-field input[type="range"]:hover::-webkit-slider-thumb,
.blueprint-slider-field input[type="range"]:focus::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 8px 16px rgba(15, 82, 186, 0.22);
}

.plan-page .dashboard-grid {
  grid-template-columns: 1fr;
}

.blueprint-topic {
  font-weight: 700;
}

.blueprint-suggestion {
  margin-top: 4px;
}

.question-image-wrap {
  overflow: hidden;
  border: 1px solid rgba(22, 22, 22, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.question-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.panel p.difficulty-tag {
  margin: 0 0 14px;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hint-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent-2);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 107, 53, 0.1);
  color: var(--ink);
  animation: message-slide-in 300ms var(--ease-standard) both;
}

.answer-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 700;
  animation: message-slide-in 260ms var(--ease-standard) both;
}

.answer-feedback-correct {
  border: 1px solid rgba(12, 124, 89, 0.35);
  background: rgba(12, 124, 89, 0.12);
  color: var(--accent);
}

.answer-feedback-wrong {
  border: 1px solid rgba(255, 107, 53, 0.35);
  background: rgba(255, 107, 53, 0.12);
  color: var(--accent-2);
}

.upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.answer-feedback {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 4px solid #0f52ba;
  border-radius: 0 16px 16px 0;
  background: rgba(15, 82, 186, 0.08);
  color: #161616;
  font-weight: 700;
}

.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.next-action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-bar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diagnostic-breakdown-grid {
  align-items: start;
}

.results-page .diagnostic-breakdown-grid {
  grid-template-columns: 1fr;
}

.diagnostic-review-list,
.topic-accuracy-list {
  display: grid;
  gap: 14px;
}

.results-page .topic-accuracy-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagnostic-review-item,
.topic-accuracy-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.diagnostic-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.diagnostic-review-item.is-correct {
  border-color: rgba(12, 124, 89, 0.24);
}

.diagnostic-review-item.is-wrong {
  border-color: rgba(255, 107, 53, 0.28);
}

.diagnostic-review-meta {
  text-align: right;
}

.diagnostic-review-meta p {
  margin: 8px 0 0;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.review-badge.is-correct {
  background: rgba(12, 124, 89, 0.12);
  color: var(--accent);
}

.review-badge.is-wrong {
  background: rgba(255, 107, 53, 0.12);
  color: var(--accent-2);
}

.topic-accuracy-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.topic-accuracy-head span {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.results-page .topic-accuracy-head h3 {
  font-size: 1rem;
}

.results-page .diagnostic-chart-panel > h3 {
  margin-bottom: 18px;
}

.topic-accuracy-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.08);
}

.topic-accuracy-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
}

.hero-noise,
.hero-glow {
  position: absolute;
  pointer-events: none;
}

.hero-noise {
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 40%);
  background-size: 20px 20px, 24px 24px, auto;
}

.hero-glow {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.6;
}

.hero-glow-left {
  top: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.2), transparent 70%);
  animation: ambient-float-left 12s ease-in-out infinite alternate;
}

.hero-glow-right {
  right: -100px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(15, 82, 186, 0.18), transparent 70%);
  animation: ambient-float-right 14s ease-in-out infinite alternate;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.hero-message,
.hero-rail {
  display: grid;
  gap: 20px;
}

.home-hero-actions {
  margin-bottom: 0;
}

.trust-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-pill,
.workspace-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 18, 15, 0.08);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-weight: 700;
  transition:
    transform 180ms var(--ease-snappy),
    background 180ms var(--ease-snappy),
    border-color 180ms var(--ease-snappy);
}

.trust-pill:hover,
.workspace-topic-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.8);
}

.challenge-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 100%;
}

.challenge-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.challenge-metric {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 18, 15, 0.06);
}

.challenge-metric-value {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.challenge-metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.audience-panel,
.pathway-panel,
.workspace-panel,
.results-hero-panel,
.review-summary-panel {
  display: grid;
  gap: 22px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.audience-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(20, 18, 15, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.home-steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.review-topic-card h3 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.workspace-badge-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.workspace-body {
  align-items: start;
}

.workspace-question,
.workspace-actions {
  display: grid;
  gap: 14px;
}

.workspace-actions {
  align-content: start;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(20, 18, 15, 0.06);
}

.practice-workspace-panel .workspace-actions {
  position: sticky;
  top: 24px;
}

.results-hero-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.results-hero-copy {
  display: grid;
  gap: 10px;
}

.panel:nth-of-type(2),
.page > .panel:nth-child(2),
.page > .hero-strip:nth-child(2) {
  animation-delay: 40ms;
}

.page > .panel:nth-child(3),
.page > .hero-strip:nth-child(3) {
  animation-delay: 90ms;
}

.page > .panel:nth-child(4) {
  animation-delay: 140ms;
}

.topic-accuracy-fill {
  transition:
    width 280ms var(--ease-standard);
}

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

@keyframes action-panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glare-sweep {
  0% {
    left: -180%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    left: 185%;
    opacity: 0;
  }
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambient-float-left {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 10px, 0) scale(1.05);
  }
}

@keyframes ambient-float-right {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-16px, -12px, 0) scale(1.04);
  }
}

@media (max-width: 900px) {
  #app {
    width: min(100% - 20px, 1000px);
    padding-top: 12px;
  }

  .hero-panel,
  .card-grid,
  .dashboard-grid,
  .results-layout,
  .split-panel,
  .diagnostic-review-item,
  .hero-layout,
  .audience-grid,
  .home-steps-grid,
  .results-hero-panel,
  .challenge-metrics {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 24px;
    min-height: auto;
  }

  .panel,
  .info-card,
  .action-card,
  .hero-strip {
    padding: 20px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .results-page .topic-accuracy-list {
    grid-template-columns: 1fr;
  }

  .diagnostic-review-meta {
    text-align: left;
  }

  .workspace-header,
  .home-page-topbar,
  .home-page-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-badge-group {
    justify-content: flex-start;
  }

  .practice-workspace-panel .workspace-actions {
    position: static;
    top: auto;
  }

  .workspace-actions {
    padding: 16px;
  }
}

.preview-summary-grid,
.preview-detail-grid {
  align-items: start;
}

.preview-detail-grid {
  grid-template-columns: 0.9fr 0.9fr 1.2fr;
}

.preview-metric-panel,
.preview-balance-panel {
  display: grid;
  gap: 14px;
}

.compact-actions {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .preview-detail-grid {
    grid-template-columns: 1fr;
  }
}

.action-stack {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.action-group {
  display: grid;
  gap: 8px;
}

.action-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.action-group-primary .hero-actions,
.action-group-secondary .hero-actions,
.action-group-utility .hero-actions {
  margin-bottom: 0;
}

.preview-legend {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(22, 22, 22, 0.08);
}

.home-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.home-nav-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.home-nav .ghost-button {
  background: transparent;
  border: 1px solid transparent;
}

.home-nav .ghost-button:hover {
  background: rgba(15, 82, 186, 0.06);
}

@media (max-width: 900px) {
  .home-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .home-nav-group {
    justify-content: flex-start;
  }
}

.home-hero-panel {
  display: block;
  min-height: auto;
}

.home-hero-copy {
  display: grid;
  gap: 28px;
}

.home-page-topbar {
  display: flex;
  justify-content: flex-end;
}

.home-page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-hero-copy h1 {
  max-width: none;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
}

.home-hero-copy .hero-subtitle {
  max-width: none;
}

.home-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .home-page-topbar,
  .home-page-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .auth-page {
    min-height: auto;
  }

  .auth-card {
    width: 100%;
    padding: 22px;
  }

  .auth-submit {
    width: 100%;
    justify-self: stretch;
  }
}


.practice-page .panel h2.practice-question {
  font-size: clamp(1.65rem, 3.2vw, 2.65rem);
  line-height: 1.08;
  max-width: 18ch;
}

@media (max-width: 640px) {
  #app {
    width: min(100% - 16px, 1000px);
    padding-bottom: 40px;
  }

  .page {
    gap: 18px;
  }

  .hero-panel,
  .panel,
  .info-card,
  .action-card,
  .hero-strip {
    border-radius: 24px;
  }

  .hero-panel,
  .panel {
    padding: 18px;
  }

  .hero-copy h1,
  .panel h2,
  .hero-strip h2 {
    letter-spacing: -0.03em;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 14vw, 3.8rem);
    line-height: 0.96;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 14px 0 18px;
  }

  .hero-actions,
  .compact-actions,
  .next-action {
    display: grid;
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .choices-grid-inline {
    grid-template-columns: 1fr;
  }

  .choice {
    min-height: 60px;
  }

  .blueprint-grid-head {
    display: none;
  }

  .blueprint-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .workspace-topic-pill,
  .trust-pill {
    width: 100%;
    justify-content: center;
  }

  .audience-card,
  .challenge-metric {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
