/* Methodox Reader — official site
   Tokens mirror the application's own design tokens: 4px spacing grid,
   3px corners, one accent colour spent only on selection and focus. */

/* Inter, self-hosted — nothing on this page leaves the origin.
   One variable file per subset, carrying the real 100-900 weight axis, so the
   400 / 500 / 600 the page uses are true instances rather than synthesised.
   The latin subset covers every character this page renders; latin-ext is here
   for future copy and is only fetched if a character in its range is used.
   Inter is licensed under the SIL Open Font License 1.1 — see assets/fonts/OFL.txt. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-ext-var.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Light palette — the application's default theme */
  --bg: #F6F7F8;
  --surface: #FFFFFF;
  --workspace: #E6E8EB;
  --border: #E2E4E8;
  --border-strong: #C6CAD0;
  --text: #1A1C20;
  --text-muted: #646A73;
  --accent: #2C6AE4;
  --accent-wash: #E7EFFD;
  --on-accent: #FFFFFF;
  --shadow-card: 0 1px 2px rgba(26, 28, 32, 0.04);

  /* 4px grid; 12px is the default gutter */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  --radius: 3px;
  --measure: 1120px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E2025;
    --surface: #24272D;
    --workspace: #14161A;
    --border: #33373E;
    --border-strong: #454A52;
    --text: #E7E9EC;
    --text-muted: #99A0AA;
    --accent: #5B8DEF;
    --accent-wash: #25334C;
    --on-accent: #14161A;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

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

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  z-index: 10;
}

.skip:focus {
  left: var(--s-3);
  top: var(--s-3);
}

/* ---------- header: the application's title bar, flattened ---------- */

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  min-height: 48px;
  padding-block: var(--s-2);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.wordmark svg {
  flex: none;
}

.tag {
  display: inline-block;
  padding: 1px var(--s-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: 14px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--s-16);
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  border-top: 0;
}

.eyebrow {
  margin: 0 0 var(--s-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section h2 {
  font-size: 26px;
  max-width: 22ch;
}

.lede {
  margin-top: var(--s-4);
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 17px;
}

/* ---------- hero ---------- */

.hero {
  padding-block: var(--s-16) var(--s-12);
}

.hero h1 {
  font-size: clamp(32px, 6vw, 48px);
  max-width: 18ch;
}

.hero-sub {
  margin-top: var(--s-5);
  max-width: 56ch;
  font-size: 18px;
  color: var(--text-muted);
}

.hero-meta {
  margin-top: var(--s-3);
  font-size: 14px;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.btn {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  transition: background-color 90ms cubic-bezier(0.2, 0, 0, 1);
}

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

.btn-primary:hover {
  background: var(--accent);
  filter: brightness(0.94);
}

.btn-quiet {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-quiet:hover {
  background: var(--workspace);
}

/* ---------- screenshot frames ---------- */

.shot {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.shot img {
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.shot figcaption {
  padding: var(--s-3);
  font-size: 13px;
  color: var(--text-muted);
}

.hero-shot {
  margin-top: var(--s-10);
}

/* ---------- feature grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(232px, 100%), 1fr));
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--s-4);
}

.card h3 {
  font-size: 15px;
  letter-spacing: 0;
}

.card p {
  margin-top: var(--s-2);
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- screenshot switcher ---------- */

.switcher {
  margin-top: var(--s-8);
}

.tabs-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-4);
}

.tabs {
  display: flex;
  gap: var(--s-1);
  width: max-content;
  min-width: 100%;
  padding-bottom: 1px;
}

.tabs button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin: 0;
  padding: var(--s-2) var(--s-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
}

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

/* Keep the focus ring inside the horizontally scrolling tab strip. */
.tabs button:focus-visible {
  outline-offset: -2px;
}

.tabs button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
  background: var(--accent-wash);
}

.panel:not([hidden]) + .panel:not([hidden]) {
  margin-top: var(--s-4);
}

.panel[hidden] {
  display: none;
}

/* ---------- theme pair ---------- */

.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.pair > * {
  min-width: 0;
}

/* ---------- availability ---------- */

.availability {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--s-8);
  margin-top: var(--s-8);
}

.availability h3 {
  font-size: 17px;
}

.availability p {
  margin-top: var(--s-3);
  max-width: 62ch;
  color: var(--text-muted);
}

.availability .actions {
  margin-top: var(--s-6);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: var(--s-10);
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer p + p {
  margin-top: var(--s-2);
}

.site-footer a {
  color: var(--text-muted);
}

/* ---------- narrow viewports ---------- */

@media (max-width: 600px) {
  .wrap {
    padding-inline: var(--s-4);
  }

  /* The nav wraps to more than one row here; do not pin it to the top. */
  .site-header {
    position: static;
  }

  .section {
    padding-block: var(--s-12);
  }

  .hero {
    padding-block: var(--s-12) var(--s-10);
  }

  .availability {
    padding: var(--s-5);
  }

  .actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

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