/* =========================================================================
   B737 Question Bank — design system
   Organized once, single source of truth. No duplicate :root blocks.
   ========================================================================= */

/* ---------- Tokens ---------- */

:root {
  /* Light companion to "Air" — the source system is dark-only, so this is a
     same-vocabulary derivation: light canvas, brighter Whiteout cards. */
  --bg: #f5f5f5;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-alt: #ececec;
  --line: rgba(27, 27, 27, 0.1);
  --line-strong: rgba(27, 27, 27, 0.18);
  --line-on-canvas: rgba(27, 27, 27, 0.14);
  --text: #1b1b1b;
  --text-on-canvas: #1b1b1b;
  --muted: color-mix(in srgb, var(--text) 55%, transparent);
  --muted-strong: color-mix(in srgb, var(--text) 70%, transparent);
  --canvas-muted: var(--muted-strong);

  --accent: #2b7fff;
  --accent-strong: #1a6ae8;
  --accent-soft: rgba(43, 127, 255, 0.12);
  --on-accent: #ffffff;

  --btn-primary-bg: #1b1b1b;
  --btn-primary-bg-hover: #333333;
  --btn-primary-text: #ffffff;

  --success: #1f8a4c;
  --success-soft: rgba(31, 138, 76, 0.12);
  --danger: #d33a2c;
  --danger-soft: rgba(211, 58, 44, 0.12);
  --warning: #b8860b;
  --warning-soft: rgba(184, 134, 11, 0.12);

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  --radius-input: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 11px;
  --radius-pill: 9999px;

  --max-width: 1150px;

  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, monospace;
  --font-heading-weight: 500;
  --font-display-huge: "Anton", system-ui, sans-serif;
  --font-cursive: "Caveat", cursive;

  --duration-fast: 140ms;
  --duration: 220ms;
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #ffffff;
  --surface: #f5f5f5;
  --surface-alt: #ececec;
  --line: rgba(27, 27, 27, 0.12);
  --line-strong: rgba(27, 27, 27, 0.22);
  --line-on-canvas: rgba(255, 255, 255, 0.18);
  --text: #1b1b1b;
  --text-on-canvas: #ffffff;
  --muted: color-mix(in srgb, var(--text) 55%, transparent);
  --muted-strong: color-mix(in srgb, var(--text) 70%, transparent);
  --canvas-muted: rgba(255, 255, 255, 0.62);

  --accent: #2b7fff;
  --accent-strong: #5c9dff;
  --accent-soft: rgba(43, 127, 255, 0.16);
  --on-accent: #ffffff;

  --btn-primary-bg: #1b1b1b;
  --btn-primary-bg-hover: #333333;
  --btn-primary-text: #ffffff;

  --success: #4ac47f;
  --success-soft: rgba(74, 196, 127, 0.16);
  --danger: #ff6b57;
  --danger-soft: rgba(255, 107, 87, 0.16);
  --warning: #e0ab3d;
  --warning-soft: rgba(224, 171, 61, 0.16);

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-elevated: #ffffff;
    --surface: #f5f5f5;
    --surface-alt: #ececec;
    --line: rgba(27, 27, 27, 0.12);
    --line-strong: rgba(27, 27, 27, 0.22);
    --line-on-canvas: rgba(255, 255, 255, 0.18);
    --text: #1b1b1b;
    --text-on-canvas: #ffffff;
    --muted: color-mix(in srgb, var(--text) 55%, transparent);
    --muted-strong: color-mix(in srgb, var(--text) 70%, transparent);
    --canvas-muted: rgba(255, 255, 255, 0.62);
    --accent: #2b7fff;
    --accent-strong: #5c9dff;
    --accent-soft: rgba(43, 127, 255, 0.16);
    --on-accent: #ffffff;
    --btn-primary-bg: #1b1b1b;
    --btn-primary-bg-hover: #333333;
    --btn-primary-text: #ffffff;
    --success: #4ac47f;
    --success-soft: rgba(74, 196, 127, 0.16);
    --danger: #ff6b57;
    --danger-soft: rgba(255, 107, 87, 0.16);
    --warning: #e0ab3d;
    --warning-soft: rgba(224, 171, 61, 0.16);
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    color-scheme: dark;
  }
}

/* ---------- Reset & base ---------- */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text-on-canvas);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

/* Page-level titles ("Instructor mode", "What you get"...) sit directly on
   the dark canvas, not inside a Haze card — they need the canvas text color,
   not the card-ink color the rest of the type system uses by default. */
.section > .section-header {
  color: var(--text-on-canvas);
}

.section > .section-header .meta {
  color: var(--canvas-muted);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--font-heading-weight);
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0 0 8px;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 3.4vw + 1rem, 3.4rem);
}

h2 {
  font-size: clamp(1.3rem, 1.1vw + 1rem, 1.65rem);
}

h3 {
  font-size: 1.05rem;
  font-weight: var(--font-heading-weight);
}

p {
  margin: 0 0 10px;
  color: var(--muted-strong);
  max-width: 62ch;
}

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

strong {
  font-weight: 500;
}

code {
  font-family: var(--font-mono);
  background: var(--surface-alt);
  border-radius: var(--radius-input);
  padding: 1px 5px;
  font-size: 0.9em;
}

pre {
  font-family: var(--font-mono);
  white-space: pre-wrap;
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-input);
}

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

html {
  scroll-behavior: smooth;
}

/* subtle fixed texture behind the whole app — restrained, not decorative noise */
.background-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text-on-canvas) 6%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent 70%);
}

:root[data-theme="dark"] .background-grid {
  opacity: 0.5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .background-grid {
    opacity: 0.5;
  }
}

#app {
  position: relative;
  z-index: 1;
}

/* one clean entrance, not a cascading stagger soup on every list item */
.shell,
.landing-shell,
.auth-shell {
  animation: fade-up var(--duration) var(--ease) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fullscreen-hover-zone {
  display: none;
}

/* ---------- Layout shells ---------- */

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 96px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shell-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.landing-shell,
.auth-shell {
  position: relative;
}

.landing-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header h2,
.section-header h3 {
  margin-bottom: 4px;
}

/* ---------- Typography helpers ---------- */

.eyebrow,
.small-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  font-size: 1.05rem;
  color: var(--muted-strong);
  max-width: 56ch;
  line-height: 1.6;
}

.meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.stat-value,
.dashboard-stat-value,
.chart-stat-value {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: var(--font-heading-weight);
  padding: 9px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
  white-space: nowrap;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

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

/* Air: no solid filled colored buttons. Primary is the "Solid Light Button"
   (bright, borderless-feeling fill) and secondary is the "Ghost Navigation
   Button" (transparent, border-only) — never the chromatic accent. */
.button-primary {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.button-primary:hover:not(:disabled) {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
}

.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted-strong);
  padding: 8px 10px;
}

.button-ghost:hover:not(:disabled) {
  background: var(--surface-alt);
  color: var(--text);
}

.button-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.button-danger:hover:not(:disabled) {
  background: var(--danger);
  color: var(--on-accent);
}

.button-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.button-icon:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.button-nav {
  background: transparent;
  border-color: transparent;
  color: var(--muted-strong);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  position: relative;
}

.button-nav:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-alt);
}

.button-nav.button-active {
  color: var(--text);
  background: var(--surface-alt);
}

.button-nav.button-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

/* small square icon toggle used on exam bookmark */
button.button-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Surfaces: cards & panels ---------- */

.panel,
.card,
.auth-card,
.question-card,
.setup-card,
.list-card,
.comparison-card,
.dashboard-stat-card,
.news-card,
.saved-test-card,
.stat-card,
.mode-card,
.test-card,
.memory-card,
.resource-card,
.instructor-card,
.summary-card,
.legal-card,
.legal-content-card,
.comment-card,
.pricing-card,
.instructor-question-item,
.account-card,
.topbar,
.account-menu,
.failed-card,
.landing-nav,
.landing-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  position: relative;
}

.panel,
.card,
.auth-card,
.question-card,
.setup-card,
.list-card,
.comparison-card,
.dashboard-stat-card,
.news-card,
.saved-test-card,
.mode-card,
.test-card,
.memory-card,
.resource-card,
.summary-card,
.legal-card,
.legal-content-card,
.comment-card,
.pricing-card,
.failed-card {
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.card:hover,
.mode-card:hover,
.news-card:hover,
.resource-card:hover,
.memory-card:hover,
.test-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.list-card,
.instructor-card {
  padding: 22px;
}

.instructor-question-item,
.account-card {
  padding: 16px;
}

.topbar {
  padding: 12px 16px;
  box-shadow: none;
}

.landing-nav {
  padding: 14px 18px;
  box-shadow: none;
}

.landing-hero {
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.hero-display {
  font-family: var(--font-display-huge);
  font-weight: 400;
  letter-spacing: 0;
}

.hero-cursive {
  font-family: var(--font-cursive);
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
}

.account-menu {
  padding: 8px;
  box-shadow: var(--shadow-lg);
}

/* ---------- Forms ---------- */

.field-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field-grid > label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-strong);
}

.field input,
.field textarea,
.field select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font-body);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted-strong);
  cursor: pointer;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* spam-protection honeypot: off-screen for real users, still reachable by
   naive bots that auto-fill every field */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inline-legal-link {
  color: var(--accent);
  font-weight: 500;
  padding: 0;
  display: inline;
}

/* custom select — setup-picker */

.setup-picker {
  position: relative;
}

.setup-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease);
}

.setup-picker-trigger:hover {
  border-color: var(--accent);
}

.setup-picker.is-open .setup-picker-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.setup-picker-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--duration) var(--ease);
}

.setup-picker.is-open .setup-picker-icon svg {
  transform: rotate(180deg);
}

.setup-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setup-picker-option {
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0px;
  padding: 8px 10px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.setup-picker-option:hover {
  background: var(--surface-alt);
}

.setup-picker-option.is-selected {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
}

/* range slider */

.slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-wrap output {
  font-size: 0.85rem;
  color: var(--muted-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[type="range"] {
  --slider-progress: 0%;
  --slider-fill-end: 0%;
  flex: 1;
  appearance: none;
  height: 4px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent) var(--slider-fill-end), var(--line-strong) var(--slider-fill-end));
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease);
}

input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}

/* ---------- Badges, segmented, tabs ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--muted-strong);
  border: 1px solid var(--line);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: transparent;
}

.badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.segmented,
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.segmented .button,
.tabs .button {
  padding: 7px 14px;
  font-size: 0.84rem;
}

.segmented .button-secondary,
.tabs .button-secondary {
  background: transparent;
  border-color: transparent;
  color: var(--muted-strong);
}

.segmented .button-secondary:hover,
.tabs .button-secondary:hover {
  color: var(--text);
}

.instructor-sections {
  margin-top: 4px;
}

.tab-panel {
  color: var(--muted-strong);
  line-height: 1.7;
  padding-top: 4px;
}

/* ---------- Notices ---------- */

.error,
.success {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 400;
  border: 1px solid transparent;
}

.error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

.success {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
}

.empty-state {
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
  font-size: 0.92rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.brand-mark {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
}

.brand-mark:hover {
  background: var(--surface-alt);
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

:root[data-theme="light"] .brand-logo,
:root[data-theme="light"] .auth-logo,
:root[data-theme="light"] .app-disclaimer-logo {
  filter: invert(1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand-logo,
  :root:not([data-theme="dark"]) .auth-logo,
  :root:not([data-theme="dark"]) .app-disclaimer-logo {
    filter: invert(1);
  }
}

.account-menu-wrap {
  position: relative;
}

.topbar-account-button {
  gap: 8px;
}

.topbar-subtitle {
  color: var(--muted);
  font-size: 0.84rem;
}

.topbar-subtitle strong {
  color: var(--text);
}

.topbar-account-caret {
  font-size: 0.7rem;
  color: var(--muted);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-menu-item {
  justify-content: flex-start;
  width: 100%;
}

.topbar-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
}

/* ---------- Landing page ---------- */

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--surface-alt);
}

.landing-brand-mark .brand-logo {
  height: 22px;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-hero-simple {
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 56px 30px;
}

.landing-hero-simple .landing-copy {
  max-width: 640px;
}

.landing-hero-simple .lead {
  max-width: none;
  margin: 0 auto;
}

.landing-copy h1 {
  margin-top: 6px;
}

.landing-hero-actions {
  margin-top: 24px;
  justify-content: center;
}

.landing-section {
  margin-top: 4px;
}

.mode-grid,
.dashboard-stats-grid,
.resource-grid,
.memory-grid,
.test-grid {
  display: grid;
  gap: 14px;
}

.mode-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.mode-grid > *:nth-child(2) {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-card .small-label {
  color: var(--muted);
}

.pricing-card h3 {
  font-size: 2rem;
  margin: 0;
  letter-spacing: -0.03em;
}

.pricing-card h3 span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.pricing-card p {
  color: var(--muted-strong);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pricing-feature {
  font-size: 0.87rem;
  padding: 9px 12px;
  border-radius: 0px;
  background: var(--surface-alt);
  color: var(--muted-strong);
}

.pricing-card-featured {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.pricing-card-featured .small-label,
.pricing-card-featured p,
.pricing-card-featured h3 span {
  color: color-mix(in srgb, var(--btn-primary-text) 70%, transparent);
}

.pricing-card-featured h3,
.pricing-card-featured p {
  color: var(--btn-primary-text);
}

.pricing-card-featured .pricing-feature {
  background: color-mix(in srgb, var(--btn-primary-text) 12%, transparent);
  color: var(--btn-primary-text);
}

/* ---------- Auth ---------- */

.auth-shell {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  grid-template-rows: minmax(0, 1fr) auto;
}

.auth-image-wrap {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  overflow: hidden;
  background: var(--surface-alt);
}

.auth-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-image-overlay {
  position: absolute;
  inset: 0;
  /* Always a dark vignette regardless of theme — using the theme's --bg
     washed the photo out to a hazy gray in light mode instead of adding
     the intended moody depth. */
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.08), rgba(10, 9, 8, 0.5));
}

.auth-card {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-y: auto;
  height: calc(100% - 32px);
  margin: 16px 16px 16px 0;
}

.auth-shell > .app-disclaimer {
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 0;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 16px;
}

.auth-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-return-row {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-return {
  padding-left: 0;
}

.auth-logo-wrap {
  margin: 0;
  display: flex;
  align-items: center;
}

.auth-logo {
  height: 30px;
}

.auth-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.auth-tabs .button {
  padding: 7px 16px;
}

.auth-form h2 {
  margin-top: 4px;
}

.auth-plan-note {
  color: var(--accent);
}

.auth-inline-link {
  padding: 0;
  justify-content: flex-start;
  font-size: 0.85rem;
}

.auth-secondary-actions {
  margin-top: -4px;
}

@media (max-width: 900px), (max-height: 820px) {
  .auth-shell {
    height: auto;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .auth-image-wrap {
    display: none;
  }

  /* Without the photo, the card would otherwise touch the viewport edges
     and hide the dark canvas entirely — every other page in the app shows
     a visible canvas margin around its cards, so this should too. */
  .auth-shell {
    padding: 16px;
    gap: 16px;
  }

  .auth-card {
    grid-column: 1;
    border: 1px solid var(--line);
    height: auto;
    overflow-y: visible;
    padding: 32px 20px;
  }

  .auth-shell > .app-disclaimer {
    grid-column: 1;
  }
}

/* The login card is the one surface in the app that goes dark in dark mode
   instead of staying a light Haze card — requested explicitly, as an
   exception to the rest of the app's card treatment. Inputs stay light for
   readability, so their text/border colors are pinned back explicitly. */
:root[data-theme="dark"] .auth-card {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --muted-strong: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.22);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-alt: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .auth-card .field input,
:root[data-theme="dark"] .auth-card .field select,
:root[data-theme="dark"] .auth-card .field textarea {
  color: #1b1b1b;
  border-color: rgba(27, 27, 27, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-card {
    background: #242424;
    border-color: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.55);
    --muted-strong: rgba(255, 255, 255, 0.7);
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.22);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-alt: rgba(255, 255, 255, 0.08);
  }

  :root:not([data-theme="light"]) .auth-card .field input,
  :root:not([data-theme="light"]) .auth-card .field select,
  :root:not([data-theme="light"]) .auth-card .field textarea {
    color: #1b1b1b;
    border-color: rgba(27, 27, 27, 0.18);
  }
}

/* ---------- Dashboard ---------- */

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dashboard-stat-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Air has no colored button/card fills, so the "featured" stat card uses
   the same high-contrast Ink/Whiteout pair as the primary button instead
   of the chromatic accent or a --text/--bg inversion (the two are no
   longer opposite ends of the scale now that cards are Haze in both themes). */
.dashboard-stat-card-primary {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.dashboard-stat-card-primary .dashboard-stat-label,
.dashboard-stat-card-primary .dashboard-stat-inline {
  color: color-mix(in srgb, var(--btn-primary-text) 65%, transparent);
}

.dashboard-stat-card-primary .dashboard-stat-value {
  color: var(--btn-primary-text);
}

.dashboard-stat-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.dashboard-stat-inline {
  font-size: 0.76rem;
  color: var(--muted);
}

.dashboard-stat-value {
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.saved-test-list,
.news-list,
.history-list,
.instructor-question-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.saved-test-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.saved-test-number {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.saved-test-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.news-card {
  padding: 14px 16px;
  background: var(--surface-alt);
  border-color: var(--line);
  box-shadow: none;
}

.news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.news-head h3 {
  margin: 0;
  font-size: 0.96rem;
}

.dashboard-bank-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- Test setup ---------- */

.setup-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.test-setup-heading h2 {
  margin: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.summary-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.summary-card .stat-value {
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 2px;
}

/* ---------- Exam / test run ---------- */

.exam-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.exam-shell {
  padding: 22px;
}

.exam-header {
  margin-bottom: 14px;
}

.exam-bank-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.exam-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.exam-status-left,
.exam-status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-arrow {
  width: 36px;
  padding: 0;
  font-size: 1.1rem;
}

.exam-progress-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-strong);
  background: var(--surface-alt);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.icon-flag svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exam-tabs {
  margin-bottom: 16px;
}

.question-header h3 {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.question-image-wrap {
  margin: 14px 0;
  display: flex;
  justify-content: center;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.question-image {
  max-width: 100%;
  max-height: 360px;
  width: auto;
  border-radius: var(--radius-lg);
  display: block;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.option-button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.94rem;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}

.option-button:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateX(2px);
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 0px;
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.option-button.correct,
.option-button.is-correct,
.history-option.is-correct,
.failed-option.correct {
  border-color: var(--success);
  background: var(--success-soft);
}

.option-button.correct .option-key,
.option-button.is-correct .option-key,
.history-option.is-correct .option-key,
.failed-option.correct .option-key {
  background: var(--success);
  color: #fff;
}

.option-button.incorrect,
.option-button.is-incorrect,
.history-option.is-incorrect,
.failed-option.incorrect {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.option-button.incorrect .option-key,
.option-button.is-incorrect .option-key,
.history-option.is-incorrect .option-key,
.failed-option.incorrect .option-key {
  background: var(--danger);
  color: #fff;
}

.option-button:disabled {
  opacity: 1;
  cursor: default;
}

.exam-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exam-side-panel {
  padding: 16px;
}

.exam-test-number {
  margin-bottom: 10px;
}

.exam-side-button {
  width: 100%;
}

.exam-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
}

.exam-nav-button {
  aspect-ratio: 1;
  border-radius: 0px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}

.exam-nav-button:hover {
  border-color: var(--accent);
}

.exam-nav-button.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.exam-nav-button.is-correct {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.exam-nav-button.is-incorrect {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

/* ---------- Comments ---------- */

.comments-panel {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-card {
  padding: 12px 14px;
  background: var(--surface-alt);
  border-color: var(--line);
  box-shadow: none;
}

.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.comment-card p {
  margin: 0;
  font-size: 0.9rem;
}

/* ---------- History & review ---------- */

.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.history-list-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.history-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: 0.9rem;
}

.history-review-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.history-review-card,
.failed-card {
  padding: 16px;
}

.history-review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.failed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.invite-code-value {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.failed-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.failed-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: 0.9rem;
}

/* score chart */

.chart-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

#result-chart {
  width: 190px;
  height: 190px;
  max-width: 100%;
  flex-shrink: 0;
}

.chart-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.chart-test-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.chart-stats {
  display: flex;
  gap: 10px;
}

.chart-stat {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 90px;
}

.chart-stat-correct {
  background: var(--success-soft);
  color: var(--success);
}

.chart-stat-incorrect {
  background: var(--danger-soft);
  color: var(--danger);
}

.chart-stat-value {
  font-size: 1.5rem;
  font-weight: var(--font-heading-weight);
}

.chart-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Memory items ---------- */

.memory-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.comparison-column {
  margin-top: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  max-height: 420px;
  overflow-y: auto;
}

.memory-line {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.memory-line:last-child {
  border-bottom: none;
}

.memory-answer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.memory-answer:last-child {
  border-bottom: none;
}

.memory-answer label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.memory-answer input {
  font-family: var(--font-mono);
}

/* ---------- Resources ---------- */

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}

.resource-card .button {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- Instructor ---------- */

.instructor-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
}

.instructor-full-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.instructor-question-filters {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.instructor-question-filters .field {
  flex: 1;
  min-width: 160px;
}

.instructor-question-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.instructor-question-item.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.instructor-question-copy strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.import-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

/* ---------- Account & legal ---------- */

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.account-main-column,
.account-side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-stack-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-subscription-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-legal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-legal-list .button {
  justify-content: flex-start;
}

.legal-back-toolbar {
  margin-bottom: 4px;
}

.legal-tabs {
  margin-bottom: 4px;
}

.legal-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-section h3 {
  margin-top: 18px;
}

.legal-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ---------- Cookie consent banner ---------- */

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fade-up var(--duration) var(--ease) both;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted-strong);
  max-width: none;
}

.cookie-banner-actions {
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-banner-actions {
    justify-content: stretch;
  }

  .cookie-banner-actions .button {
    flex: 1;
  }
}

/* ---------- Loader / transition overlay ---------- */

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
}

.transition-overlay-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.transition-overlay-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted-strong);
}

.turbine-loader {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  animation: spin 2.6s linear infinite;
}

.turbine-loader svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6px;
  stroke-linecap: round;
}

.test-loading-card {
  display: grid;
  justify-items: start;
  gap: 6px;
}

/* ---------- Footer / disclaimer ---------- */

.app-disclaimer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-on-canvas);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--canvas-muted);
  font-size: 0.78rem;
}

.app-disclaimer-logo {
  height: 16px;
  opacity: 0.7;
}

.app-disclaimer-links {
  display: flex;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}

.footer-link {
  padding: 0;
  color: var(--canvas-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

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

.footer-note {
  color: var(--canvas-muted);
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: 40px 20px;
  overflow-y: auto;
  background: rgba(10, 9, 8, 0.55);
}

.modal {
  width: min(640px, 100%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.modal-header h3 {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .dashboard-layout,
  .instructor-single-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .exam-workspace {
    grid-template-columns: 1fr;
  }

  .exam-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .exam-sidebar .exam-side-panel {
    flex: 1;
    min-width: 240px;
  }
}

@media (max-width: 720px) {
  .shell,
  .landing-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-nav {
    order: 3;
    justify-content: space-between;
  }

  .landing-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-nav-actions {
    justify-content: flex-end;
  }

  .app-disclaimer {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-disclaimer-links {
    margin-left: 0;
  }
}
