/* Dark-only monochrome design system. Color is reserved for marking
   semantics (earned / partial / missed) and error/success feedback. */

:root {
  --bg: #0a0a0c;
  --surface: #121215;
  --surface-2: #18181c;
  --border: #232329;
  --border-strong: #303038;
  --text: #f4f4f5;
  --muted: #9c9ca5;
  --faint: #6b6b74;

  --ok: #4cc38a;
  --warn: #d5a439;
  --miss: #e5686d;

  --radius: 10px;
  --radius-sm: 7px;
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 64px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.2rem; }
h2 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.8rem; }
p { margin: 0 0 0.7rem; }
a { color: var(--text); }
code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.1em 0.35em; border-radius: 5px; font-size: 0.88em;
}

::selection { background: rgba(255, 255, 255, 0.18); }

/* ---------------------------------------------------------------- shell */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  transition: width 180ms ease;
  overflow: hidden;
}

.sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0.75rem 0.9rem 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--text); white-space: nowrap;
}
.sidebar-nav { flex: 1; padding: 0.4rem 0.55rem; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.48rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; white-space: nowrap;
  border: none; background: none; width: 100%; text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.nav-item svg { width: 16px; height: 16px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }

.sidebar-foot {
  padding: 0.55rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.user-row {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.4rem 0.6rem; white-space: nowrap;
  font-size: 0.9rem; color: var(--text);
}
.avatar {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font-size: 0.68rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase;
}

.icon-button {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border: none; background: none; border-radius: 6px;
  color: var(--faint); cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.icon-button svg { width: 15px; height: 15px; }

/* collapsed state */
.app.collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.app.collapsed .sidebar .label,
.app.collapsed .brand-name { display: none; }
.app.collapsed .sidebar-top { justify-content: center; padding-left: 0.55rem; padding-right: 0.55rem; flex-direction: column; gap: 0.6rem; }
.app.collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
.app.collapsed .user-row { justify-content: center; padding-left: 0; padding-right: 0; }
.collapse-icon-expand { display: none; }
.app.collapsed .collapse-icon-collapse { display: none; }
.app.collapsed .collapse-icon-expand { display: block; }

.main-area { flex: 1; min-width: 0; }

.page { max-width: 980px; margin: 0 auto; padding: 2rem 2rem 3.5rem; }
.page-narrow { max-width: 420px; }

/* mobile top bar + slide-over sidebar */
.mobile-topbar {
  display: none;
  align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 15;
}
.scrim {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6); z-index: 25;
}

@media (max-width: 860px) {
  .mobile-topbar { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 30;
    width: var(--sidebar-w) !important;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    border-right: 1px solid var(--border-strong);
    background: var(--bg);
  }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .app.sidebar-open .scrim { display: block; }
  .app.collapsed .sidebar .label,
  .app.collapsed .brand-name { display: inline; }
  .app.collapsed .nav-item { justify-content: flex-start; padding: 0.48rem 0.6rem; }
  .app.collapsed .user-row { justify-content: flex-start; padding: 0.4rem 0.6rem; }
  .app.collapsed .sidebar-top { flex-direction: row; justify-content: space-between; padding: 0.9rem 0.75rem 0.9rem 1rem; }
  .collapse-btn { display: none; }
  .page { padding: 1.4rem 1.1rem 3rem; }
}

/* ---------------------------------------------------------------- layout */

.picker-controls { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
}
.page-foot { margin-top: 2.5rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.9rem;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem; margin-top: 4.5rem;
}

.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.border-top { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.3rem; }
.inline-form { margin: 0; }
.hidden { display: none !important; }
.block { display: block; }

/* ---------------------------------------------------------------- inputs */

label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); }
label.checkbox { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.8rem; }
legend { font-size: 0.85rem; font-weight: 500; padding: 0 0.35rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="file"],
select, textarea {
  width: 100%; margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  font: inherit; font-size: 0.92rem; font-weight: 400;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color 120ms ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--text);
}
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

button { font: inherit; cursor: pointer; border-radius: var(--radius-sm); }
.primary, .secondary, .button {
  display: inline-block; text-align: center; text-decoration: none;
  padding: 0.52rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; border: 1px solid transparent;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.primary { background: var(--text); color: var(--bg); }
.primary:hover { background: #d6d6da; }
.secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.secondary:hover { border-color: var(--faint); background: var(--surface-2); }
.link-button {
  background: none; border: none; color: var(--muted); padding: 0;
  font-size: inherit; text-decoration: none;
}
.link-button:hover { color: var(--text); }
.link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.link:hover { color: var(--text); }
button:disabled { opacity: 0.5; cursor: progress; }

.muted { color: var(--muted); }
.small { font-size: 0.83rem; }
.hint { color: var(--faint); font-size: 0.8rem; font-weight: 400; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.honeypot { display: none !important; }

/* --------------------------------------------------------------- banners */

.banner {
  padding: 0.65rem 0.9rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size: 0.9rem; border: 1px solid;
}
.banner-error { background: rgba(229, 104, 109, 0.08); color: var(--miss); border-color: rgba(229, 104, 109, 0.3); }
.banner-ok { background: rgba(76, 195, 138, 0.08); color: var(--ok); border-color: rgba(76, 195, 138, 0.3); }
.banner-warn { background: rgba(213, 164, 57, 0.08); color: var(--warn); border-color: rgba(213, 164, 57, 0.3); }
.banner-warn strong { color: var(--text); }

/* ----------------------------------------------------------------- stats */

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 0.9rem; }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.95rem 1.05rem;
  display: flex; flex-direction: column; gap: 0.1rem;
}
.stat-value {
  font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.25; font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.78rem; color: var(--muted); }
.stat-note { font-size: 0.75rem; color: var(--faint); }

.pill {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.78rem; font-weight: 500; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pill-warn { background: rgba(213, 164, 57, 0.1); border-color: rgba(213, 164, 57, 0.35); color: var(--warn); }

.score-ring {
  --pct: 0;
  width: 74px; height: 74px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: conic-gradient(var(--text) calc(var(--pct) * 1%), var(--border) 0);
}
.score-ring span {
  width: 60px; height: 60px; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center; font-weight: 600; font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- charts */

.chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-bottom: 0.6rem; }
.chart-bar {
  flex: 1; min-width: 4px; height: var(--value); min-height: 3px;
  background: var(--muted); border-radius: 2px 2px 0 0;
  transition: background 120ms ease;
}
.chart-bar:hover { background: var(--text); }

.bar-list, .weak-list, .attempt-list, .criteria-list { list-style: none; margin: 0; padding: 0; }
.bar-list li { margin-bottom: 0.85rem; }
.bar-label {
  display: flex; justify-content: space-between; font-size: 0.86rem; margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.bar { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--text); border-radius: 3px; }
.bar-fill.bar-weak { background: var(--warn); }

.weak-list li { padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.weak-list li:last-child { border-bottom: none; }
.weak-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.25rem; }
.weak-list p { margin: 0 0 0.15rem; font-size: 0.9rem; }

.attempt-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
}
.attempt-list li:last-child { border-bottom: none; }
.attempt-list a { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.attempt-list a:hover .attempt-topic { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.attempt-topic { font-size: 0.9rem; }

.empty-state { text-align: center; padding: 2.6rem 1.4rem; }
.empty-state .button { margin-top: 0.6rem; }

/* -------------------------------------------------------------- question */

.question-meta { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.question-text {
  white-space: pre-wrap; font-size: 0.98rem; line-height: 1.7;
  padding: 1rem 1.1rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.answer-text {
  white-space: pre-wrap; word-wrap: break-word; margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem; line-height: 1.65; color: var(--text);
}
.math-content mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }

.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); }
.tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.45rem 0.7rem; color: var(--muted); font-size: 0.88rem;
  font-weight: 500; border-radius: 0;
  transition: color 120ms ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }

.timer { text-align: right; }
.timer #timer-value {
  display: block; font-size: 1.45rem; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.timer.low #timer-value { color: var(--miss); }

.criteria-list li {
  padding: 0.65rem 0 0.65rem 0.9rem; border-left: 2px solid var(--border-strong);
  margin-bottom: 0.55rem;
}
.criteria-list li.earned { border-left-color: var(--ok); }
.criteria-list li.partial { border-left-color: var(--warn); }
.criteria-list li.missed { border-left-color: var(--miss); }
.criterion-head { display: flex; gap: 0.6rem; align-items: baseline; }
.criterion-head span:last-child { font-size: 0.92rem; }

.callout {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem; font-size: 0.9rem;
}

/* ---------------------------------------------------------------- tables */

.table-scroll { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.history-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); font-weight: 500;
  padding: 0.4rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--border);
}
.history-table td { padding: 0.6rem 0.6rem 0.6rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.history-table tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------- loading */

.spinner {
  width: 20px; height: 20px; margin-bottom: 0.7rem;
  border: 2px solid var(--border-strong); border-top-color: var(--text);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .sidebar, .chart-bar, .nav-item, .primary, .secondary { transition: none; }
}

.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7);
  display: grid; place-items: center; z-index: 40;
}
.overlay-inner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 2rem; text-align: center; display: grid; justify-items: center;
}

.modal-inner {
  max-width: 400px; width: calc(100% - 2rem);
  text-align: left; display: block;
}
.modal-inner h2 { font-size: 1.02rem; margin-bottom: 0.45rem; }
.modal-inner p { margin: 0; font-size: 0.92rem; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.2rem; }

/* ------------------------------------------------------------ handwriting */

.ink-toolbar { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.6rem; }
.ink-spacer { flex: 1; }
.ink-tool {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.ink-tool:hover { background: var(--surface-2); color: var(--text); }
.ink-tool.active { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.ink-tool svg { width: 17px; height: 17px; }

.page.ink-wide { max-width: none; }

.ink-scroll {
  height: 85vh; min-height: 600px;
  overflow-y: auto; overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
#ink-canvas {
  position: sticky; top: 0;
  display: block; width: 100%; height: 100%;
  /* None, not pan-y: some browsers pan with the pen too, which made the
     page scroll mid-stroke. Finger scrolling is reimplemented in JS. */
  touch-action: none;
}
.ink-scroll::-webkit-scrollbar-thumb { border-color: #fff; background: #c9c9cf; }
.ink-scroll::-webkit-scrollbar-thumb:hover { background: #a9a9b2; }

.slide-track {
  position: relative; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 26px;
  overflow: hidden; user-select: none;
  transition: border-color 120ms ease;
}
.slide-label { font-size: 0.9rem; color: var(--muted); pointer-events: none; }
.slide-handle {
  position: absolute; left: 4px; top: 3px;
  width: 44px; height: 44px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  cursor: grab; touch-action: none;
  transition: transform 180ms ease, background 120ms ease;
}
.slide-handle:active { cursor: grabbing; }
.slide-handle svg { width: 18px; height: 18px; }
.slide-track.armed { border-color: var(--ok); }
.slide-track.armed .slide-handle { background: var(--ok); }
@media (prefers-reduced-motion: reduce) {
  .slide-handle { transition: none; }
}

/* ------------------------------------------------------------- scrollbar */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------- admin */

.pill-danger { background: rgba(229, 104, 109, 0.1); border-color: rgba(229, 104, 109, 0.35); color: var(--miss); }

.admin-subnav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.admin-subnav a {
  padding: 0.4rem 0.8rem; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
}
.admin-subnav a:hover { color: var(--text); background: var(--surface-2); }
.admin-subnav a.active { color: var(--text); background: var(--surface-2); font-weight: 600; }

.admin-section-title { font-size: 0.95rem; color: var(--muted); margin: 1.1rem 0 0.6rem; }

.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.review-item { border: 1px solid var(--border-strong); border-radius: 10px; padding: 0.9rem 1rem; }
.review-item p { margin: 0.45rem 0; }
.review-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.review-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.review-item details { margin-top: 0.5rem; }
.review-item details h3 { margin: 0.6rem 0 0.2rem; }
.review-item summary { cursor: pointer; }

.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

.small-button { padding: 0.35rem 0.7rem; font-size: 0.83rem; }
.danger-button { color: var(--miss); border-color: rgba(229, 104, 109, 0.4); }

.suspend-form { display: flex; gap: 0.4rem; }
.suspend-form input { max-width: 10rem; font-size: 0.83rem; }

.question-cell { min-width: 22rem; max-width: 34rem; }
.question-cell summary { cursor: pointer; }
.question-cell .pre-wrap { margin-top: 0.5rem; }

.adjust-form { display: flex; align-items: center; gap: 0.4rem; }
.adjust-form input[type="number"] { width: 4.5rem; font-size: 0.9rem; }

.review-item.review-head { justify-content: space-between; padding: 0.6rem 1rem; }

/* ----------------------------------------------------------------- plans */
/* The daily-allowance notice above the question picker. */

.quota {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1rem; padding: 0.6rem 0.9rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem; color: var(--muted);
}
.quota strong { color: var(--text); }

/* Money that is or is not covering itself. Used on the costs page only. */
.good { color: var(--ok); }
.bad { color: var(--miss); }
.quota-out { border-color: var(--warn); color: var(--text); }

/* Plan cards, shared by the landing page and /pricing. */
.pricing-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; text-align: left;
}
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem 1.4rem 1.5rem;
  display: flex; flex-direction: column;
}
.price-card-lead { border-color: var(--border-strong); background: var(--surface-2); }
.price-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.price-head h3 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.price { margin: 0.7rem 0 0.2rem; display: flex; align-items: baseline; gap: 0.4rem; }
.price-amount { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.price-tagline { margin: 0 0 1rem; }
.price-features { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.price-features li {
  position: relative; padding-left: 1.2rem;
  font-size: 0.88rem; color: var(--muted);
}
.price-features li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--faint);
}
.price-card-lead .price-features li::before { background: var(--ok); }
.pricing-note { margin-top: 1.1rem; }

/* The pricing section on the landing page. */
.landing-pricing {
  width: 100%; max-width: 960px; margin-inline: auto;
  padding: 2.6rem 1.5rem 3.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.landing-pricing-title { font-size: 1.1rem; margin-bottom: 0.35rem; }
.landing-pricing-lede { max-width: 46ch; margin: 0 auto 1.8rem; }

/* /pricing as its own page, signed in or out. */
.pricing-page { width: 100%; max-width: 760px; margin-inline: auto; }
.page-landing .pricing-page { flex: 1; padding: 3rem 1.5rem 4rem; }
.pricing-page h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.pricing-page > .muted { margin-bottom: 1.6rem; }
.pricing-page .pricing-grid { margin-top: 1.2rem; }

/* --------------------------------------------------------------- landing */
/* The signed-out pages. They drop the .page frame and lay out their own
   full-height column: top bar, content, footer bar. */

.page-landing {
  max-width: none;
  min-height: 100vh;
  padding: 0;
  display: flex; flex-direction: column;
}

.landing-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.landing-bar-inner {
  max-width: 1000px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 60px; padding: 0 1.5rem;
}
.landing-login { padding: 0.42rem 1rem; font-size: 0.88rem; }

.landing-main { flex: 1; display: flex; flex-direction: column; }

.landing-hero {
  flex: 1;
  width: 100%; max-width: 720px; margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 4.5rem 1.5rem 4rem;
}
.landing-title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.3rem, 6vw, 3.5rem);
  line-height: 1.06; letter-spacing: -0.035em; font-weight: 600;
}
.landing-lede {
  max-width: 52ch; margin: 0 auto 2.4rem;
  color: var(--muted); font-size: 1.05rem;
}

.waitlist { display: flex; gap: 0.5rem; width: 100%; max-width: 440px; margin-inline: auto; }
.waitlist input[type="email"] { flex: 1; min-width: 0; margin-top: 0; padding: 0.62rem 0.8rem; }
.waitlist .primary { flex: none; padding: 0.62rem 1.15rem; white-space: nowrap; }

.waitlist-note { margin: 0.85rem 0 0; font-size: 0.85rem; }
.waitlist-note.is-ok { color: var(--ok); }
.waitlist-note.is-error { color: var(--miss); }

.landing-points {
  width: 100%; max-width: 960px; margin-inline: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  padding: 2.4rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.landing-points h2 { margin-bottom: 0.35rem; }
.landing-points p { margin: 0; }

.landing-foot {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.landing-foot-inner {
  max-width: 1000px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.5rem;
}
.landing-foot-links { display: flex; gap: 1.5rem; }

/* The footer info pages (about, privacy, terms). */
.landing-article {
  flex: 1;
  width: 100%; max-width: 620px; margin-inline: auto;
  padding: 3rem 1.5rem 4rem;
}
.landing-article h1 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.landing-article p { color: var(--muted); margin-bottom: 1rem; }

@media (max-width: 640px) {
  .landing-hero { padding: 2.8rem 1.1rem; }
  .waitlist { flex-direction: column; }
  .landing-points { grid-template-columns: 1fr; gap: 1.5rem; padding-inline: 1.1rem; }
  .landing-pricing { padding-inline: 1.1rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .landing-bar-inner, .landing-foot-inner { padding-inline: 1.1rem; }
  .landing-foot-inner { justify-content: center; }
}
