/*
 * MCQ Tracker landing page.
 * Tokens mirror the Obsidian theme variables the plugin itself uses in
 * styles.css (background-primary/secondary, background-modifier-border,
 * text-normal/muted/faint, text-accent, interactive-accent, radius-s/m/l,
 * font-interface, font-monospace). Values are the default light and dark
 * themes, so the page and the plugin share one visual language.
 */

:root {
  color-scheme: light;
  --background-primary: #ffffff;
  --background-secondary: #f7f6f8;
  --background-modifier-border: #e3e0e7;
  --background-modifier-hover: #eeecf1;
  --text-normal: #1f2023;
  --text-muted: #5f6167;
  --text-faint: #6f7078;
  --text-accent: #6b46d6;
  --text-on-accent: #ffffff;
  --interactive-accent: #6f4bd8;
  --interactive-accent-hover: #5c3ac4;
  --accent-soft: #f1ecfc;
  --font-interface: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-ui-smaller: 0.75rem;
  --font-ui-small: 0.875rem;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 10px;
  --content: 1040px;
  --gutter: 24px;
  --header-height: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background-primary: #1e1e1e;
    --background-secondary: #262626;
    --background-modifier-border: #3b3b3d;
    --background-modifier-hover: #303033;
    --text-normal: #dadada;
    --text-muted: #a6a7ab;
    --text-faint: #9a9ba0;
    --text-accent: #b9a4ff;
    --text-on-accent: #1e1e1e;
    --interactive-accent: #b9a4ff;
    --interactive-accent-hover: #cbbaff;
    --accent-soft: #2b2438;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  background: var(--background-primary);
  color: var(--text-normal);
  font-family: var(--font-interface);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-normal);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  max-width: 20ch;
  font-size: clamp(2.4rem, 5.2vw, 3.45rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h2 {
  max-width: 27ch;
  font-size: clamp(1.45rem, 2.3vw, 1.85rem);
}

h3 {
  font-size: 0.98rem;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

p {
  margin: 0;
}

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

button,
summary {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code {
  font-family: var(--font-monospace);
  font-size: 0.86em;
  padding: 0.08em 0.3em;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-s);
  background: var(--background-secondary);
}

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

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

.wrap {
  width: min(var(--content), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 9px 12px;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-m);
  background: var(--background-primary);
  color: var(--text-normal);
  font-size: var(--font-ui-small);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--background-modifier-border);
  background: var(--background-primary);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-s);
  background: var(--interactive-accent);
  color: var(--text-on-accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 8px;
  font-size: 0.84rem;
}

.topnav a {
  padding: 6px 0;
  color: var(--text-muted);
  transition: color 0.12s ease;
}

.topnav a:hover,
.topnav a:active {
  color: var(--text-normal);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.quiet-link {
  color: var(--text-muted);
  font-size: 0.84rem;
  transition: color 0.12s ease;
}

.quiet-link:hover,
.quiet-link:active {
  color: var(--text-normal);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-primary {
  background: var(--interactive-accent);
  color: var(--text-on-accent);
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--interactive-accent-hover);
}

.btn-primary:focus-visible {
  outline-color: var(--text-normal);
}

.btn-secondary {
  border-color: var(--background-modifier-border);
  background: var(--background-primary);
  color: var(--text-normal);
}

.btn-secondary:hover,
.btn-secondary:active {
  border-color: var(--text-faint);
  background: var(--background-modifier-hover);
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

/* Mobile menu */

.site-menu {
  display: none;
  position: relative;
}

.site-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-m);
  background: var(--background-secondary);
  color: var(--text-normal);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}

.site-menu[open] summary {
  border-color: var(--interactive-accent);
  color: var(--text-accent);
}

.site-menu nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-m);
  background: var(--background-primary);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.4);
}

.site-menu nav a {
  padding: 8px 10px;
  border-radius: var(--radius-s);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.site-menu nav a:hover,
.site-menu nav a:active {
  background: var(--background-modifier-hover);
  color: var(--text-normal);
}

/* Type and shared section pieces */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--font-monospace);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--interactive-accent);
}

.hero {
  padding: 56px 0 46px;
}

.hero-lede {
  max-width: 64ch;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.hero-audience {
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: right;
  text-wrap: pretty;
}

.hero-shot {
  margin-top: 34px;
}

.shot {
  margin: 28px 0 0;
}

.shot-frame {
  padding: 6px;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-l);
  background: var(--background-secondary);
}

.shot-frame img {
  width: 100%;
  border: 1px solid var(--background-modifier-border);
  border-radius: calc(var(--radius-l) - 4px);
  background: var(--background-primary);
}

.shot figcaption {
  display: flex;
  gap: 10px;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.caption-label {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--text-faint);
  font-family: var(--font-monospace);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--background-modifier-border);
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.section-head {
  max-width: 68ch;
}

.section-head h2 {
  margin-top: 0;
}

.section-lede {
  max-width: 68ch;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.62;
  text-wrap: pretty;
}

.section-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.section-body {
  min-width: 0;
}

.section-body > h2 {
  margin: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-num {
  color: var(--text-faint);
  font-family: var(--font-monospace);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.rail-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* At a glance */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--background-modifier-border);
}

.fact {
  padding: 22px 32px 24px 0;
  border-bottom: 1px solid var(--background-modifier-border);
}

.fact:nth-child(even) {
  padding-right: 0;
  padding-left: 32px;
  border-left: 1px solid var(--background-modifier-border);
}

.fact-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.fact-number {
  min-width: 1.4ch;
  color: var(--text-accent);
  font-family: var(--font-monospace);
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fact h3 {
  font-size: 0.95rem;
}

.fact p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.fact p a {
  color: var(--text-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.fact p a:hover {
  color: var(--interactive-accent-hover);
}

/* Feature sections */

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 26px;
}

.points h3,
.split-list h3,
.agent-note h3 {
  font-size: 0.9rem;
}

.points p,
.split-list p,
.agent-note p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.schedule {
  margin: 26px 0 0;
  border-top: 1px solid var(--background-modifier-border);
}

.schedule-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--background-modifier-border);
}

.schedule-row dt {
  font-size: 0.9rem;
  font-weight: 600;
}

.schedule-tag {
  display: block;
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 400;
}

.schedule-row dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 26px;
}

.tab-block {
  margin-top: 28px;
}

.mini-label {
  color: var(--text-faint);
  font-family: var(--font-monospace);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tab-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
  margin: 10px 0 0;
  padding: 0;
  border-top: 1px solid var(--background-modifier-border);
  list-style: none;
}

.tab-index li {
  padding: 6px 0;
  border-bottom: 1px solid var(--background-modifier-border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.agent-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--background-modifier-border);
}

.agent-note p {
  max-width: 68ch;
}

/* Data */

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 26px;
}

.note-example {
  margin: 0;
}

.code-block {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-m);
  background: var(--background-secondary);
  color: var(--text-normal);
  font-family: var(--font-monospace);
  font-size: 0.76rem;
  line-height: 1.7;
  tab-size: 2;
}

.code-block code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.note-example figcaption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.policy {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy li {
  padding-left: 14px;
  border-left: 2px solid var(--background-modifier-border);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.policy strong {
  color: var(--text-normal);
  font-weight: 600;
}

/* Install */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 36px;
  align-items: start;
  margin-top: 26px;
}

.steps {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--background-modifier-border);
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--background-modifier-border);
}

.step-num {
  padding-top: 2px;
  color: var(--text-faint);
  font-family: var(--font-monospace);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  font-size: 0.9rem;
}

.steps p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.spec {
  padding: 18px;
  border: 1px solid var(--background-modifier-border);
  border-radius: var(--radius-m);
  background: var(--background-secondary);
}

.spec dl {
  margin: 0 0 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--background-modifier-border);
  font-size: 0.8rem;
}

.spec-row:last-child {
  border-bottom: 0;
}

.spec-row dt {
  color: var(--text-muted);
}

.spec-row dd {
  margin: 0;
  font-family: var(--font-monospace);
  font-size: 0.74rem;
  text-align: right;
}

.spec .btn {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.text-link:hover,
.text-link:active {
  color: var(--interactive-accent-hover);
}

.spec .text-link {
  display: flex;
  justify-content: center;
  margin-top: 11px;
  font-size: 0.74rem;
  text-align: center;
}

/* Feedback */

.feedback {
  padding: 44px 0;
  border-top: 1px solid var(--background-modifier-border);
  background: var(--background-secondary);
}

.feedback .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.feedback .wrap > div:first-child {
  max-width: 64ch;
}

.feedback h2 {
  font-size: 1.4rem;
}

.feedback p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.feedback-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
}

/* Footer */

.site-footer {
  padding: 30px 0 22px;
  border-top: 1px solid var(--background-modifier-border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand p {
  max-width: 36ch;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.12s ease;
}

.footer-links a:hover,
.footer-links a:active {
  color: var(--text-accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--background-modifier-border);
  color: var(--text-faint);
  font-family: var(--font-monospace);
  font-size: 0.68rem;
}

/* Responsive */

@media (max-width: 900px) {
  .topnav,
  .quiet-link {
    display: none;
  }

  .site-menu {
    display: block;
  }

  .header-inner {
    gap: 12px;
  }

  .hero-audience {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .hero-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .hero-audience {
    max-width: 60ch;
    text-align: left;
  }

  .section-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .rail {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 7px;
  }

  .rail-num::after {
    content: "/";
    margin-left: 7px;
    color: var(--text-faint);
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .fact,
  .fact:nth-child(even) {
    padding: 18px 0;
    border-left: 0;
  }

  .points,
  .split-list,
  .data-grid,
  .install-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .schedule-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .tab-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feedback .wrap {
    display: grid;
    gap: 18px;
  }

  .footer-top {
    display: grid;
    gap: 20px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
    --header-height: 52px;
  }

  .brand-sub {
    display: none;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .header-inner,
  .topbar-actions {
    gap: 8px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .hero-row {
    align-items: stretch;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    flex: 0 0 auto;
    width: 100%;
  }

  .hero-audience {
    max-width: none;
  }

  .shot-frame {
    padding: 4px;
  }

  .shot figcaption {
    display: block;
  }

  .caption-label {
    display: block;
    margin-bottom: 2px;
  }

  .feedback-actions {
    flex-wrap: wrap;
    gap: 12px;
  }

  .feedback-actions .btn {
    flex: 1 1 auto;
  }
}

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

  .btn,
  .topnav a,
  .quiet-link,
  .footer-links a {
    transition: none;
  }
}
