/* Nexora Notebook: the look of real index cards on a study desk.
   Owner: frontend look. One accent only (highlighter yellow); green only for
   "Know it" and mastered. No gradient fills, no glass, no all-caps labels. */

:root {
  --desk: #DDE5EA;
  --paper: #FFFFFF;
  --ink: #1C2A39;
  --ink-soft: #4A5A6B;
  --rule-blue: #C9DDF0;
  --margin-red: #E07A7A;
  --highlight: #FFE45C;
  --know-green: #2E8B57;
  --error: #A33A2A;
  --line: #B9C6D0;
  --focus: #1C2A39;

  --font-ui: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-card: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius: 4px;
  --paper-shadow: 0 1px 2px rgba(28, 42, 57, 0.18), 0 4px 10px rgba(28, 42, 57, 0.08);
  --rule-gap: 28px;
}

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

/* The hidden attribute always hides, even when a class sets display (flex, inline-block...). */
[hidden] { display: none !important; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }

a { color: var(--ink); text-underline-offset: 2px; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--paper);
  padding: 8px 12px;
}
.skip-link:focus { left: 16px; top: 8px; z-index: 10; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; font-size: 1.125rem; text-decoration: none; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.site-nav a { text-decoration: none; padding: 4px 0; }
.site-nav a:hover { text-decoration: underline; }

.inline-form { display: inline; margin: 0; }

.link-button {
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* ---------- Page ---------- */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.narrow { max-width: 440px; margin: 0 auto; }

.flash {
  padding: 10px 14px;
  margin: 0 0 16px;
  background: var(--paper);
  border-left: 4px solid var(--ink-soft);
  border-radius: var(--radius);
}
.flash-error { border-left-color: var(--error); }

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

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #F2F5F7; }

.button-primary { background: var(--ink); color: var(--paper); }
.button-primary:hover { background: #2C3E52; }

.button-know { border-color: var(--know-green); background: var(--know-green); color: var(--paper); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

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

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); margin: 4px 0 0; }

.field-check { display: flex; align-items: center; gap: 8px; }
.field-check label { display: inline; margin: 0; font-weight: 400; }

/* ---------- The index card ---------- */

/* A ruled index card: header strip, one red line, then light-blue rules.
   The rules are drawn with a repeating pattern, not a colour fade. */
.index-card {
  position: relative;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--rule-gap) - 1px),
    var(--rule-blue) calc(var(--rule-gap) - 1px),
    var(--rule-blue) var(--rule-gap)
  );
  background-position: 0 56px;
  background-size: 100% calc(100% - 56px);
  background-repeat: no-repeat;
  border-radius: 2px;
  box-shadow: var(--paper-shadow);
  padding: 0 24px 24px;
  font-family: var(--font-card);
}

.index-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 55px;
  border-top: 2px solid var(--margin-red);
}

.index-card .card-header {
  height: 56px;
  margin: 0;
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  color: var(--ink-soft);
}

.index-card .card-text {
  margin: 0;
  padding-top: 6px;
  font-size: 1.25rem;
  line-height: var(--rule-gap);
}

/* A highlighter mark for weak spots and misconceptions. */
.highlight { background: var(--highlight); padding: 0 3px; }

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


/* ---------- Home ---------- */

.home-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.stats { display: flex; gap: 16px; margin: 0; color: var(--ink-soft); }

.plan-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0 24px;
}

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

.choice {
  display: block;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
}
.choice:hover { background: #F2F5F7; }
.choice-title { display: block; font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.choice-text { color: var(--ink-soft); }

/* ---------- Shared bits for list pages ---------- */

.page-top, .section-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 16px;
}
.section-top h2 { margin: 0; }

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

.empty { color: var(--ink-soft); padding: 16px 0; }

.button-small { padding: 4px 12px; font-size: 0.9375rem; }
.button-danger { border-color: var(--error); color: var(--error); }
.button-danger:hover { background: #FBEDEA; }

.field-hint { margin: 0 0 6px; color: var(--ink-soft); font-size: 0.9375rem; }

fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
fieldset.field legend { font-weight: 700; margin-bottom: 4px; padding: 0; }

.options { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.options-stacked { flex-direction: column; gap: 6px; }
.option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.option input { width: 18px; height: 18px; margin: 0; }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 0.9375rem;
  white-space: nowrap;
}
.badge-exam { border: 2px solid var(--ink); font-weight: 700; }
.badge-passed { border-style: dashed; text-decoration: underline; }

/* ---------- Folders and deck lists ---------- */

.folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 16px 0 0;
  border-bottom: 2px solid var(--ink);
}

/* Folder tabs look like the tabs on a paper file folder. */
.folder-tab {
  padding: 10px 16px 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #EEF2F5;
  text-decoration: none;
  font-weight: 700;
}
.folder-tab .count { display: block; font-weight: 400; font-size: 0.875rem; color: var(--ink-soft); }
.folder-tab[aria-current="page"] { background: var(--paper); border-color: var(--ink); border-width: 2px; margin-bottom: -2px; }

.deck-list, .card-list { list-style: none; margin: 0; padding: 0; }

.deck-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
}
.page-top + .deck-list { border-top: 1px solid var(--line); }

.deck-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.deck-row:first-child { border-top: 0; }

.deck-info { display: flex; flex-direction: column; gap: 2px; }
.deck-title { font-size: 1.125rem; font-weight: 700; }
.deck-meta { color: var(--ink-soft); margin: 0; }
.deck-note { color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- Deck page ---------- */

.deck-section { margin: 32px 0 0; }

/* The card box: five slots side by side, like dividers in a real box. */
.shelf-box {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 2px solid var(--ink);
  background: var(--paper);
  max-width: 560px;
}
.shelf-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border-left: 1px solid var(--line);
}
.shelf-slot:first-child { border-left: 0; }
.shelf-count { font-size: 1.5rem; font-weight: 700; }
.shelf-name { font-size: 0.875rem; color: var(--ink-soft); }
/* Each slot gets a coloured stripe: the same blue steps as the My Progress chart,
   and green only for Mastered (green means "known" across the app). */
.shelf-slot { border-top: 6px solid var(--shelf-colour); }
.shelf-1 { --shelf-colour: #B9C6D0; }
.shelf-2 { --shelf-colour: #8EA2B3; }
.shelf-3 { --shelf-colour: #5F7A91; }
.shelf-4 { --shelf-colour: #34506A; }
.shelf-5 { --shelf-colour: var(--know-green); }
.shelf-5 .shelf-count { color: var(--know-green); }
.shelf-name { text-align: center; line-height: 1.2; }
.how-it-works { margin-top: 8px; max-width: 65ch; }
.how-it-works summary { cursor: pointer; color: var(--ink-soft); text-decoration: underline; }

.exam-form { max-width: 440px; }
.remove-form { margin-top: 16px; }
.remove-form .link-button { text-decoration: underline; }

.card-list { border-top: 1px solid var(--line); }

.card-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.card-sides { flex: 1 1 320px; min-width: 0; }
.card-front { margin: 0; font-family: var(--font-card); font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }
.card-back { margin: 4px 0 0; font-family: var(--font-card); overflow-wrap: anywhere; }
.card-meta { margin: 6px 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.card-actions { display: flex; gap: 8px; align-items: flex-start; }

.deck-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

.hidden-link { margin: 16px 0 0; }
.hidden-cards { margin-top: 24px; }
.hidden-cards h3 { margin-bottom: 4px; }
.card-row-hidden .card-front { color: var(--ink-soft); font-weight: 400; }

/* ---------- Card form ---------- */

.tip { margin: 0 0 16px; padding-left: 10px; border-left: 3px solid var(--rule-blue); }
.long-warning { margin: -8px 0 16px; padding: 6px 10px; background: var(--paper); border-left: 3px solid var(--ink-soft); }
.field textarea { min-height: 96px; resize: vertical; font-family: var(--font-card); }

/* ---------- Study ---------- */

.study { max-width: 640px; margin: 0 auto; }

.study-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.style-switch { display: flex; gap: 16px; margin-top: 4px; }
.style-switch a { text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.style-switch a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--ink); }

.session-progress { margin-bottom: 16px; }
.progress-track { height: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.progress-fill { height: 100%; background: var(--ink); transition: width 0.3s ease; }
.progress-text { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.9375rem; }

.coming-back { margin: 0 0 12px; color: var(--ink-soft); }

/* The flip: a real 3D turn. Both faces sit in the same grid cell,
   so the card is as tall as its longer side. */
.flip-card { perspective: 1400px; cursor: pointer; }
.flip-inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.card-face {
  grid-area: 1 / 1;
  min-height: 280px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-face-back { transform: rotateY(180deg); }
.card-face .card-text { font-size: 1.375rem; overflow-wrap: anywhere; }

.flip-row { display: flex; align-items: center; gap: 10px; margin: 16px 0; }

.key-hint {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 5px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-weight: 400;
  text-align: center;
  opacity: 0.75;
}

.answer-form { margin-top: 8px; }

.confidence { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.confidence legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid var(--ink-soft);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
}
.pill:has(input:checked) { border-color: var(--ink); background: #F2F5F7; font-weight: 700; }
.pill:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.answer-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.answer-buttons .button { min-width: 160px; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button-know:hover:not(:disabled) { background: #26754A; }

/* ---------- Session summary ---------- */

.summary { max-width: 640px; margin: 0 auto; }
.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 16px 0;
  background: var(--paper);
  border: 1px solid var(--line);
}
.summary-stats div { padding: 14px 16px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.summary-stats div:nth-child(-n+2) { border-top: 0; }
.summary-stats div:nth-child(odd) { border-left: 0; }
.summary-stats dt { color: var(--ink-soft); }
.summary-stats dd { margin: 0; font-size: 1.75rem; font-weight: 700; }
.stat-highlight dd { display: inline-block; background: var(--highlight); padding: 0 6px; }

.study-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- Home: today's plan ---------- */

.welcome-back {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--paper);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
}

.plan-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.plan-top h2 { margin: 0; }

.plan-length { display: flex; align-items: center; gap: 8px; margin: 0; }
.plan-length-label { color: var(--ink-soft); }

/* Session length picker: one row of joined buttons, the chosen one filled. */
.segmented { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.segmented button {
  padding: 6px 12px;
  border: 0;
  border-left: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  white-space: nowrap;
  cursor: pointer;
}
.segmented button:first-child { border-left: 0; }
@media (max-width: 600px) {
  .segmented button { padding: 6px 9px; }
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.segmented button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

.plan-meta { margin: 12px 0 4px; color: var(--ink-soft); }
.plan-list { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line); }
.plan-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.plan-count { color: var(--ink-soft); white-space: nowrap; }
.plan-moved { margin: 0 0 12px; }
.plan-done { margin: 12px 0 0; padding-left: 10px; border-left: 4px solid var(--know-green); font-weight: 700; }

/* ---------- Tracking ---------- */

.track-section { margin: 32px 0 0; }

mark { background: var(--highlight); color: var(--ink); padding: 0 3px; }

.weak-topic { font-weight: 700; }

.calendar { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0; }
.calendar-days, .calendar-week { display: grid; grid-template-rows: repeat(7, 16px); gap: 4px; }
.calendar-days span { font-size: 0.75rem; line-height: 16px; color: var(--ink-soft); padding-right: 4px; }
.calendar-day { width: 16px; height: 16px; border-radius: 2px; background: var(--paper); border: 1px solid var(--line); }
.calendar-day.level-1 { background: #8EA2B3; border-color: #8EA2B3; }
.calendar-day.level-2 { background: #34506A; border-color: #34506A; }
.calendar-day.level-3 { background: var(--ink); border-color: var(--ink); }
.calendar-day.is-future { background: transparent; border-style: dashed; }

.chart-box { position: relative; width: 100%; background: var(--paper); border: 1px solid var(--line); padding: 8px; }
.chart-box-small { height: 140px; }

.chart-table { margin-top: 8px; }
.chart-table summary { cursor: pointer; color: var(--ink-soft); }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 8px; background: var(--paper); font-size: 0.9375rem; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }

@media (max-width: 600px) {
  .choices { grid-template-columns: 1fr; }
  .card-face { min-height: 220px; }
  .card-face .card-text { font-size: 1.25rem; }
  .answer-buttons .button { flex: 1 1 140px; min-width: 0; }
  .folder-tab { padding: 8px 10px 6px; }
  .shelf-count { font-size: 1.25rem; }
  h1 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  }

/* ---------- Shared helpers ---------- */

/* Read by screen readers, hidden on screen. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--paper);
  border-left: 4px solid var(--ink-soft);
  border-radius: var(--radius);
}

/* ---------- AI Card Maker ---------- */

.maker { max-width: 720px; margin: 0 auto; }

.maker-step {
  margin: 0 0 16px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.maker-step h2 { font-size: 1.125rem; margin-bottom: 8px; }
.maker-step .field:last-child { margin-bottom: 0; }
.maker-step p:last-child { margin-bottom: 0; }

.field input[type="file"] { font: inherit; max-width: 100%; }
.file-list { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); }

.maker-actions { align-items: center; margin-top: 8px; }

.draft-count { color: var(--ink-soft); margin: 0 0 8px; }
.draft-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 16px; }

/* Each draft is a plain index card (no ruled lines behind form fields). */
.draft.index-card { background-image: none; padding: 0 20px 16px; }
.draft.index-card::before { top: 47px; }
.draft-top { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.draft-top .card-header { height: auto; }
.draft-field { display: block; font-family: var(--font-ui); font-weight: 700; margin-top: 10px; }
.draft-field textarea,
.draft-field input,
.draft-field select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.draft-field textarea { font-family: var(--font-card); resize: vertical; }
.draft-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.source-line { margin: 10px 0 0; font-family: var(--font-ui); font-size: 0.875rem; color: var(--ink-soft); font-style: italic; }
.remove-draft { color: var(--error); text-decoration: underline; font-family: var(--font-ui); }

.generate-more { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.generate-more select { padding: 9px 8px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); font: inherit; }

.wait-status { margin: 8px 0 0; color: var(--ink-soft); }
.wait-status:empty { display: none; }

/* ---------- Explain ---------- */

.explain { margin-top: 16px; }
.explanation:not(:empty) {
  margin: 12px 0 0;
  padding: 12px 16px;
  background: var(--paper);
  border-left: 4px solid var(--rule-blue);
  font-family: var(--font-card);
  font-size: 1.0625rem;
}

/* ---------- Weak spot box ---------- */

.weak-spot-box {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--highlight);
  border-radius: var(--radius);
}
.weak-spot-box h2 { margin-bottom: 2px; }
.weak-spot-box h3 { font-size: 1rem; margin: 16px 0 4px; }
.weak-spot-text { font-family: var(--font-card); font-size: 1.0625rem; }
.resource-links { margin: 0 0 12px; padding-left: 20px; }
.resource-links li { margin: 4px 0; }
.search-widget { margin: 8px 0 16px; overflow-x: auto; }

@media (max-width: 600px) {
  .draft-row { grid-template-columns: 1fr; gap: 0; }
  .maker-step { padding: 14px; }
}

/* ---------- Deck Library ---------- */

.library-search { display: flex; gap: 8px; flex: 1 1 280px; max-width: 420px; }
.library-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.search-result { margin: 12px 0 0; }

/* Decks laid out like index cards spread on a desk: plain cards (no ruled lines),
   the red header line, and a slight alternating tilt. */
.library-grid {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.library-deck.index-card { background-image: none; display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.library-deck:nth-child(odd) { transform: rotate(-0.4deg); }
.library-deck:nth-child(even) { transform: rotate(0.35deg); }
.library-title { font-family: var(--font-ui); font-size: 1.25rem; margin: 6px 0 0; }
.library-title a { text-decoration: none; }
.library-title a:hover { text-decoration: underline; }
.library-description { margin: 0; font-size: 1rem; }
.library-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-family: var(--font-ui); }
.library-topics .badge { font-size: 0.8125rem; }
.library-preview { font-family: var(--font-ui); font-size: 0.9375rem; }
.library-preview summary { cursor: pointer; text-decoration: underline; }
.library-preview ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.preview-q { display: block; font-weight: 700; }
.preview-a { display: block; color: var(--ink-soft); }
.library-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; font-family: var(--font-ui); }
.badge-added { border-color: var(--know-green); color: var(--know-green); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .library-deck:nth-child(odd), .library-deck:nth-child(even) { transform: none; }
}

/* ---------- Study, summary, plan and card maker additions ---------- */

.weak-spot-loading { margin: 24px 0; color: var(--ink-soft); }
.refresh-plan { margin: 12px 0 0; }
.refresh-plan .link-button { text-decoration: underline; color: var(--ink-soft); }
.plan-finished .actions-inline { margin-top: 10px; }

.skipped-lines {
  margin: 0 0 20px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-soft);
  border-radius: var(--radius);
}
.skipped-lines h2 { font-size: 1.0625rem; margin: 0 0 4px; }
.skipped-lines ul { margin: 6px 0 12px; padding-left: 20px; font-family: var(--font-card); }

/* ---------- My Progress: weak spots and misconceptions ---------- */


.misconception-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.misconception-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.misconception-card { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }

/* ---------- Study flow: confidence first, then flip, then right/missed ---------- */

.think-hint { margin: 0 0 10px; color: var(--ink-soft); }
.study-step { margin-top: 16px; }
.choice-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.choice-col .key-hint { opacity: 0.6; }
.answer-buttons .choice-col .button { min-width: 160px; }
.button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.flip-card[data-locked="true"] { cursor: default; }
.pick-first { margin: 10px 0 0; font-weight: 700; }

/* "Moved up" and the other notes shown for about a second after answering. */
.answer-tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.875rem;
  transition: opacity 0.4s ease;
}
.answer-tag.is-fading { opacity: 0; }

/* Create My Own: three ways to add cards. */
.add-options { display: grid; gap: 10px; margin-top: 8px; }
.add-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.add-option:hover { background: #F2F5F7; }
.back-row { margin: 0 0 8px; }
.back-link { text-decoration: none; font-weight: 700; }
.back-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .answer-buttons .choice-col { flex: 1 1 140px; }
  /* flex: none: the older phone rule's 140px basis would become a height in this column. */
  .answer-buttons .choice-col .button { width: 100%; min-width: 0; flex: none; }
}

/* ---------- Header: menu button, logo ---------- */

.header-start { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img { display: block; }

/* ---------- Icons in soft coloured circles ----------
   One line-icon set (_icons.html). The circle's tint says what the button does:
   red = delete, blue = exam, grey = remove/close, yellow = weak spot, navy = edit and the rest. */

.icon-button {
  --tint: #E3EAF0;
  --tint-ink: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--tint-ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.icon-button:hover { transform: translateY(-2px); box-shadow: 0 3px 6px rgba(28, 42, 57, 0.18); }
.icon-danger { --tint: #F6E1DD; --tint-ink: var(--error); }
.icon-exam { --tint: #DCE9F7; --tint-ink: #2A5D8F; }
.icon-muted { --tint: #E6E9EC; --tint-ink: var(--ink-soft); }
.icon-weak { --tint: var(--highlight); --tint-ink: var(--ink); }
.icon { display: block; }
.menu-button { --tint: transparent; }
.icon-actions { gap: 8px; align-items: center; }
.push-end { margin-left: auto; }
.card-actions { display: flex; gap: 8px; align-items: flex-start; }

/* A small icon circle in front of a heading or row (not a button). */
.icon-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--tint, #E3EAF0); color: var(--tint-ink, var(--ink));
  vertical-align: middle; margin-right: 8px;
}
.icon-dot .icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .icon-button { transition: none; }
  .icon-button:hover { transform: none; }
}

/* ---------- Flash messages ---------- */

.flash-list .flash { display: flex; align-items: flex-start; gap: 12px; transition: opacity 0.5s ease; }
.flash-list .flash span { flex: 1; }
.flash.is-fading { opacity: 0; }
.flash-close {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.flash-close .icon { width: 18px; height: 18px; }

/* ---------- Side menu and dialogs ---------- */

dialog::backdrop { background: rgba(28, 42, 57, 0.4); }

.drawer {
  margin: 0 auto 0 0;
  width: min(320px, 100vw);
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  padding: 0;
  border: 0;
  background: var(--desk);
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.drawer-inner { padding: 16px; }
.drawer-top { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.drawer-who { flex: 1; min-width: 0; }
.drawer-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.drawer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 1.25rem; font-weight: 700;
}
.drawer-rows { display: grid; gap: 4px; margin-top: 12px; }
.drawer-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 8px;
  border: 0; border-radius: var(--radius); background: none;
  font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
}
.drawer-row:hover { background: var(--paper); }
.drawer-row > .icon { margin-left: auto; color: var(--ink-soft); }
.row-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--paper);
}

/* Chips: small rounded labels (XP, streak, folder). */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  background: var(--paper); color: var(--ink-soft);
  font-family: var(--font-ui); font-size: 0.8125rem;
}
.chip .icon { width: 14px; height: 14px; }

/* Settings pages (Account, Card theme, Feedback). */
.settings h2 { margin-top: 28px; }
.settings-form { display: grid; gap: 6px; }
.settings-form .button { justify-self: start; margin-top: 6px; }
.account-facts { margin: 0 0 12px; display: grid; gap: 4px; }
.account-facts div { display: flex; gap: 8px; flex-wrap: wrap; }
.account-facts dt { color: var(--ink-soft); min-width: 120px; }
.account-facts dd { margin: 0; overflow-wrap: anywhere; }

.confirm-dialog {
  max-width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.confirm-dialog p { margin: 0 0 16px; }

/* ---------- Card themes: Index card (default), Clean and Night ---------- */

.theme-options { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.theme-options legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.preview-card { margin-top: 10px; min-height: 140px; }
.preview-card .card-text { font-size: 1.0625rem; }
.theme-status { min-height: 1.5em; margin: 6px 0 0; color: var(--ink-soft); font-size: 0.9375rem; }
.maker-theme { margin-top: 24px; max-width: 420px; }

.index-card.theme-clean { background-image: none; }
.index-card.theme-clean::before { border-top: 1px solid var(--line); }

.index-card.theme-night {
  background-color: #1F2A36;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--rule-gap) - 1px),
    rgba(201, 221, 240, 0.12) calc(var(--rule-gap) - 1px),
    rgba(201, 221, 240, 0.12) var(--rule-gap)
  );
  color: #E8EEF3;
}
.index-card.theme-night::before { border-top-color: rgba(224, 122, 122, 0.6); }
.index-card.theme-night .card-header { color: #A9B8C6; }

/* ---------- Study: answer notes, logo preview ---------- */

.answer-tag.is-misconception { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }
#next-card { margin-top: 10px; }

.logo-options { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.logo-option { padding-bottom: 16px; background-image: none; }
.logo-sizes { display: flex; align-items: flex-end; gap: 20px; padding-top: 16px; }
.logo-lockup { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-family: var(--font-ui); font-size: 1.375rem; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .flash-list .flash { transition: none; }
}
.answer-form .answer-tag { display: block; width: fit-content; margin: 12px 0 0; font-size: 1rem; }

/* ---------- Deck page: study view ---------- */

.deck-study .page-top { align-items: flex-start; }
.button-big { padding: 14px 28px; font-size: 1.125rem; }
.study-buttons-big { margin-top: 20px; gap: 12px; }
.shelf-bar-wrap { margin-top: 28px; max-width: 560px; }
.shelf-bar {
  display: flex; height: 14px; overflow: hidden;
  border-radius: 7px; background: var(--paper); border: 1px solid var(--line);
}
.shelf-part { display: block; min-width: 4px; background: var(--shelf-colour); }
.shelf-new { --shelf-colour: #EEF2F5; }
.shelf-bar-ends { display: flex; justify-content: space-between; margin: 4px 0 0; color: var(--ink-soft); font-size: 0.8125rem; }

/* ---------- Deck page: edit view ---------- */

.rename-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.rename-form input { flex: 1 1 220px; }
.section-title { display: flex; align-items: center; }

/* ---------- Deck cards (My decks and Deck Library) ---------- */

.deck-card-top { justify-content: space-between; gap: 8px; }
.mastery { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); }
.mastery-track { flex: 1; height: 8px; border-radius: 4px; background: #EEF2F5; overflow: hidden; }
.mastery-fill { height: 100%; background: var(--know-green); }
.mastery-text { font-size: 0.875rem; color: var(--ink-soft); white-space: nowrap; }
.library-actions { flex-wrap: wrap; }

/* The ⋯ menu on a deck card: a <details> that opens a small list under the button. */
.more-menu { position: relative; }
/* Each tilted card is its own layer, so lift the card whose menu is open above the next one. */
.library-deck:has(.more-menu[open]) { z-index: 10; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-list {
  position: absolute; right: 0; top: 46px; z-index: 5;
  min-width: 210px; padding: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--paper-shadow);
  display: grid;
}
.more-list a, .more-list button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius);
  background: none; font: inherit; font-family: var(--font-ui); font-size: 0.9375rem;
  color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
}
.more-list a:hover, .more-list button:hover { background: #EEF2F5; }
.more-list form { margin: 0; }
.more-list .more-danger { color: var(--error); }
.more-list .icon { width: 18px; height: 18px; }

/* Folder tabs with an icon. */
.folder-tab { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.folder-tab .icon { width: 18px; height: 18px; }
.folder-tab .count { flex-basis: 100%; }

/* Home: "+N more" plan groups. */
.plan-more summary { cursor: pointer; margin: 6px 0; color: var(--ink-soft); text-decoration: underline; }
.library-deck .chip { background: #EEF2F5; }
.weak-preview { margin-top: 24px; }

/* My decks: badge, Study, ⋯ and Open stay on one row at every width; a long badge is cut short. */
.library-actions { flex-wrap: nowrap; gap: 8px; }
.library-actions .badge { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-actions .button-small { flex: none; }

/* Deck page: "Edit cards" and "Settings", labelled buttons with an icon. */
.deck-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.labelled-icon { display: inline-flex; align-items: center; gap: 6px; }
.labelled-icon .icon, .button .icon { width: 18px; height: 18px; }
.button-danger, .deck-settings .button { display: inline-flex; align-items: center; gap: 6px; }

/* Edit cards: each card is a link to its own page. */
.card-links li { border-bottom: 1px solid var(--line); }
.card-link { display: grid; gap: 2px; padding: 12px 8px; text-decoration: none; color: var(--ink); }
.card-link:hover { background: var(--paper); }
.card-link .card-front { font-weight: 700; }
.card-link .card-back { color: var(--ink-soft); }
.card-link .card-meta { font-size: 0.875rem; color: var(--ink-soft); }
.generate-more label { font-family: var(--font-ui); }
.card-preview { margin: 12px 0; min-height: 0; }
.card-page-danger { margin-top: 24px; }

/* Today's plan: 10 / 20 / 30 / Custom. Custom opens a small number box under the buttons. */
.segmented { overflow: visible; }
.custom-size { position: relative; }
.custom-size summary {
  list-style: none; cursor: pointer;
  padding: 6px 12px; border-left: 1px solid var(--ink);
  background: var(--paper); font-size: 0.9375rem; white-space: nowrap;
}
.custom-size summary::-webkit-details-marker { display: none; }
.custom-size summary[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.custom-box {
  position: absolute; right: -2px; top: calc(100% + 6px); z-index: 5;
  display: flex; gap: 6px; padding: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--paper-shadow);
}
.custom-box input { width: 5.5em; }
@media (max-width: 600px) {
  .custom-size summary { padding: 6px 9px; }
}

/* ---------- Shared pieces for Weak Points, My Progress and the landing page ---------- */

/* Badges: yellow = open, green = fixed. */
.badge-open { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }
.badge-fixed { border-color: var(--know-green); color: var(--know-green); }

/* A highlighter stroke behind a word, like a student marking notes: a flat band, no colour fade. */
mark.stroke { background: none; box-shadow: inset 0 -0.55em 0 var(--highlight); padding: 0 2px; color: inherit; }

/* A navy line icon on a soft square; yellow while a weak topic is open. */
.topic-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: #EEF2F5; color: var(--ink);
}
.topic-icon.is-open { background: #FFF3B0; }

/* Rows in an index-card list (weak topics and misconceptions). */
.weak-rows { list-style: none; margin: 0; padding: 0; background-image: none; }
.weak-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-family: var(--font-ui); }
.weak-row:first-child { border-top: 0; }
.weak-row-body { flex: 1; min-width: 0; }
.weak-row-topic { margin: 0; font-weight: 700; font-size: 1.0625rem; overflow-wrap: anywhere; }
.weak-row .deck-meta { margin: 0; }
.weak-row-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.weak-row-badges .badge { font-size: 0.8125rem; }
.missed-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; max-width: 320px; }
.missed-track { flex: 1; height: 6px; border-radius: 3px; background: #EEF2F5; overflow: hidden; }
.missed-fill { height: 100%; background: var(--ink-soft); }
.missed-text { font-size: 0.8125rem; color: var(--ink-soft); white-space: nowrap; }
.fix-button { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.fix-button .icon { width: 16px; height: 16px; }
.mastered-text { color: var(--know-green); font-weight: 700; }
.weak-rows.index-card::before { display: none; }  /* a plain list card: no header, so no red line */
@media (max-width: 600px) {
  /* On a phone the button goes under the text, so long questions keep the full width. */
  .weak-row { flex-wrap: wrap; }
  .weak-row-body { flex: 1 1 calc(100% - 52px); }
  .fix-button { margin-left: 52px; }
}

/* Weak Points: profile strip with a small index-card avatar (navy initial over a thin red line). */
.weak-points { max-width: 760px; margin: 0 auto; }
.profile-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px;
  padding: 20px 24px; background-image: none; font-family: var(--font-ui);
}
.profile-strip::before { display: none; }
.profile-who { flex: 1 1 200px; min-width: 0; }
.profile-who h1 { margin: 0; font-size: 1.5rem; }
.profile-who .deck-meta { margin: 0; overflow-wrap: anywhere; }
.avatar-card {
  position: relative; display: inline-flex; align-items: flex-start; justify-content: center; flex: none;
  width: 56px; height: 56px; padding-top: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px; box-shadow: var(--paper-shadow);
  font-family: var(--font-card); font-size: 1.625rem; font-weight: 600; color: var(--ink);
}
.avatar-card::after { content: ""; position: absolute; left: 6px; right: 6px; top: 42px; border-top: 2px solid var(--margin-red); }
.profile-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 24px; margin: 0; }
.profile-stats dt { color: var(--ink-soft); font-size: 0.8125rem; }
.profile-stats dd { margin: 0; font-size: 1.375rem; font-weight: 700; color: var(--ink); }
@media (max-width: 600px) {
  .profile-stats { grid-template-columns: repeat(2, auto); }
}

/* My Progress: one line about weak topics. */
.weak-line { margin: 16px 0 0; }

/* My decks: the count and the mode badge share the card's top row. */
.deck-card-top { flex-wrap: wrap; gap: 6px 10px; }
.deck-card-count { margin-left: auto; }
.deck-card-top .badge { font-size: 0.8125rem; }

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

.landing-page { max-width: 960px; margin: 0 auto; }
.landing-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; margin-top: 16px; }
.landing-hero h1 { font-size: 2.5rem; line-height: 1.15; color: var(--ink); }
.hero-text { font-size: 1.125rem; max-width: 52ch; }
.sample-card { margin: 0; }
.sample-card .index-card { min-height: 180px; transform: rotate(-1deg); }
.sample-buttons { display: flex; gap: 10px; margin-top: 16px; }
.sample-buttons .button { cursor: default; }
.landing-section { margin-top: 56px; }
.landing-sub { margin: -4px 0 16px; color: var(--ink-soft); }
.landing-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; background-image: none; }
.feature-card .card-header { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.feature-card .topic-icon { width: 34px; height: 34px; }
.feature-text { margin: 0; flex: 1; }
.feature-card .button { align-self: flex-start; font-family: var(--font-ui); }
.how-steps { grid-template-columns: repeat(4, 1fr); }
.how-steps h3 { margin: 10px 0 4px; font-size: 1.0625rem; }
.how-steps p { margin: 0; color: var(--ink-soft); }
/* Step numbers on small index-card tiles. */
.step-tile {
  position: relative; display: inline-flex; align-items: flex-start; justify-content: center;
  width: 40px; height: 40px; padding-top: 3px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px; box-shadow: var(--paper-shadow);
  font-family: var(--font-card); font-weight: 600; font-size: 1.125rem;
}
.step-tile::after { content: ""; position: absolute; left: 5px; right: 5px; top: 29px; border-top: 2px solid var(--margin-red); }
.quick-links { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.quick-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.quick-link:hover { border-color: var(--ink); }
.quick-title { display: block; font-weight: 700; }
.quick-text { display: block; font-size: 0.875rem; color: var(--ink-soft); }
.landing-cta { margin-top: 56px; padding: 32px 24px; background: var(--ink); color: var(--paper); border-radius: var(--radius); text-align: center; }
.landing-cta h2 { color: var(--paper); }
.landing-cta .actions { justify-content: center; }
.button-on-navy { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button-outline-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.landing-footer { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.875rem; text-align: center; }
@media (max-width: 760px) {
  .landing-hero, .landing-grid, .how-steps { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 2rem; }
}
