/* ============================================================
   olausson.de apps — shared design system
   Editorial / typographic. Serif display (Fraunces) + mono labels
   (IBM Plex Mono) + system sans body. Proton purple accent.
   Follows system light/dark via prefers-color-scheme.
   ============================================================ */

/* ---- Self-hosted fonts ----
   Replaces the former Google Fonts CDN <link>. Keeps every request first-party
   (no visitor IP handed to Google) and drops a render-blocking third party.
   Fraunces variable (opsz 9..144, wght 400..900) upright + italic; IBM Plex
   Mono 400/500. latin + latin-ext subsets only. Files in /fonts. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/fraunces-latin.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: "Fraunces";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/fraunces-latin-ext.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;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/fraunces-italic-latin.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: "Fraunces";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/fraunces-italic-latin-ext.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;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-latin.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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-latin-ext.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;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-latin.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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-latin-ext.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 {
  color-scheme: light dark;

  /* ---- Colors (light: warm paper) ---- */
  --bg: #faf8f3;
  --bg-alt: #f4f0e3;
  --ink: #0a0a0d;
  --text: #1c1c20;
  --muted: #5a5a60;
  --muted-2: #8a8a90;
  --rule: #e4dfd2;
  --card: #ffffff;
  --card-border: #e8e2d5;
  --accent: #6D4AFF;
  --accent-deep: #5a3de0;
  --accent-soft: rgba(109, 74, 255, 0.07);
  --highlight: #fff4a8;
  --success: #2a9d4a;
  --shadow: 0 6px 24px rgba(20, 18, 10, 0.06);

  /* ---- Typography ---- */
  --serif: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* ---- Layout ---- */
  --content-width: 1100px;
  --reading-width: 720px;
}

/* Dark palette. Applied when the system prefers dark (and the user hasn't
   forced light), OR when the user explicitly forces dark via [data-theme].
   The two selectors can't be comma-joined across a media boundary, so the
   declarations are intentionally duplicated. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0e12;
    --bg-alt: #161821;
    --ink: #ece8de;
    --text: #dcd8cc;
    --muted: #9a9692;
    --muted-2: #6e6a64;
    --rule: #2a2c34;
    --card: #1a1c22;
    --card-border: #2a2c34;
    --accent: #9277ff;
    --accent-deep: #b4a0ff;
    --accent-soft: rgba(146, 119, 255, 0.10);
    --highlight: rgba(255, 244, 168, 0.20);
    --success: #51cf66;
    --shadow: 0 6px 28px rgba(0, 0, 0, 0.50);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e12;
  --bg-alt: #161821;
  --ink: #ece8de;
  --text: #dcd8cc;
  --muted: #9a9692;
  --muted-2: #6e6a64;
  --rule: #2a2c34;
  --card: #1a1c22;
  --card-border: #2a2c34;
  --accent: #9277ff;
  --accent-deep: #b4a0ff;
  --accent-soft: rgba(146, 119, 255, 0.10);
  --highlight: rgba(255, 244, 168, 0.20);
  --success: #51cf66;
  --shadow: 0 6px 28px rgba(0, 0, 0, 0.50);
}
:root[data-theme="light"] { color-scheme: light; }

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
.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;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

/* ---- Containers ---- */
.container { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.reading { max-width: var(--reading-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tight { padding: 48px 0; }

@media (max-width: 720px) {
  .section { padding: 56px 0; }
}

/* ---- Top bar (back link + section nav) — sticky ---- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 24px 14px;
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 24px;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.back-link {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.18s;
}
.back-link::before { content: "← "; }
.back-link:hover { color: var(--accent); text-decoration: none; }

.top-nav {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.top-nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.top-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---- Light/dark theme toggle ---- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { display: block; }
/* Default (light): show moon (= switch to dark). The .theme-toggle prefix keeps
   this above `.theme-toggle svg { display:block }` in specificity. */
.theme-toggle .theme-toggle__sun { display: none; }
.theme-toggle[data-theme="dark"] .theme-toggle__sun { display: block; }
.theme-toggle[data-theme="dark"] .theme-toggle__moon { display: none; }
/* Fixed variant for the landing page (which has no top bar) */
.theme-toggle--fixed {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
}
/* On narrow screens the nav wraps; keep the toggle anchored to the right edge
   of its line instead of falling to the left. */
@media (max-width: 720px) {
  .top-bar .theme-toggle { margin-left: auto; }
}

/* ---- Bottom bar (mirrors the top: back link + jump-to-top) ---- */
.bottom-bar {
  padding: 32px 24px 40px;
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
}
.top-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
}
.top-link::after { content: "↑"; font-size: 14px; }
.top-link:hover { color: var(--accent); text-decoration: none; }

/* ---- Anchor links on section headings ---- */
/* Make any section with an id offset enough that the heading isn't flush
   under the page chrome when you arrive via #fragment. */
section[id] { scroll-margin-top: 84px; }

.anchor-link {
  color: inherit;
  text-decoration: none;
  position: relative;
}
.anchor-link:hover,
.anchor-link:focus { color: inherit; text-decoration: none; }
.anchor-link::after {
  content: "#";
  font-family: var(--mono);
  color: var(--muted-2);
  font-size: 0.45em;
  margin-left: 0.5em;
  opacity: 0;
  transition: opacity 0.2s, color 0.15s;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  vertical-align: 0.35em;
}
.anchor-link:hover::after,
.anchor-link:focus::after { opacity: 1; color: var(--accent); }

/* ---- Eyebrow ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* ---- Display headings (serif) ---- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  margin: 0;
}
.display--xl { font-size: clamp(2.5rem, 6.5vw, 5rem); }
.display--lg { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.display--md { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.display em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

/* ---- Lead paragraph (serif, larger) ---- */
/* No max-width — fills the parent (the .hero__inner constrains hero leads to
   880px on its own; section leads flow to the container's natural width so
   they align with grids/cards below). */
.lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--text);
  font-variation-settings: "opsz" 36;
  margin: 24px 0 0;
}

/* ---- Body prose ---- */
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }

/* ---- Pull quote ---- */
.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-variation-settings: "opsz" 96;
  color: var(--ink);
  line-height: 1.3;
  border-left: 3px solid var(--accent);
  padding-left: 22px;
  margin: 36px 0;
  max-width: 600px;
}

/* ---- Hero (per page header) ---- */
.hero { padding: 56px 0 32px; }
.hero__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero__icons {
  display: flex;
  gap: 10px;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.hero__icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.hero__meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---- Status pill ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill--live {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 50%, transparent);
  background: color-mix(in srgb, var(--success) 7%, transparent);
}
.pill--plain {
  color: var(--muted);
  border-color: var(--rule);
  background: transparent;
}

/* ---- Status banner (install / availability) ---- */
.banner {
  border: 1px solid var(--rule);
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.banner strong { color: var(--ink); }
.banner a {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.banner a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.banner--accent {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-soft);
}

/* ---- Features list (numbered editorial) ---- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
  margin-top: 32px;
}
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; gap: 32px; }
}
.feature { padding-top: 20px; border-top: 1px solid var(--rule); }
.feature__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.feature__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.feature ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}
.feature li { margin-bottom: 4px; }

/* ---- Gallery (horizontal scroll) ---- */
.gallery-section { margin-top: 8px; }
.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.gallery-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
}
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  scrollbar-color: var(--rule) transparent;
}
.gallery::-webkit-scrollbar { height: 10px; }
.gallery::-webkit-scrollbar-track { background: transparent; }
.gallery::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 5px; }
.gallery figure {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.gallery img {
  height: 360px;
  width: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  background: var(--card);
}
.gallery--portrait img { height: 540px; }
.gallery figcaption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
  margin-top: 10px;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .gallery img { height: 280px; }
  .gallery--portrait img { height: 400px; }
}

/* ---- Theme gallery (one tile per theme) ----
   Each tile holds a light + dark rendering; only the one matching the current
   resolved site theme is shown, swapping live with the theme toggle. The hidden
   variant has no layout box, so lazy-loading defers it until it's revealed. */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 26px 20px;
  margin-top: 32px;
}
.theme-tile { margin: 0; cursor: zoom-in; }
.theme-tile img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  background: var(--card);
  transition: border-color 0.15s, transform 0.15s;
}
.theme-tile:hover img { border-color: var(--accent); transform: translateY(-2px); }
.theme-tile figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 10px;
}
.theme-tile .theme-tile__light { display: block; }
.theme-tile .theme-tile__dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-tile__light { display: none; }
  :root:not([data-theme="light"]) .theme-tile__dark { display: block; }
}
:root[data-theme="dark"] .theme-tile__light { display: none; }
:root[data-theme="dark"] .theme-tile__dark { display: block; }
:root[data-theme="light"] .theme-tile__light { display: block; }
:root[data-theme="light"] .theme-tile__dark { display: none; }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 13, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
}
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #ddd;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
/* Richer caption (theme name + description) */
.lightbox__caption--rich {
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: #e8e8e8;
  line-height: 1.5;
  text-align: center;
  max-width: min(760px, 86vw);
}
.lightbox__caption--rich strong { color: #fff; font-weight: 600; }
.lightbox__caption--rich .pos {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #aaa;
}

/* ---- Encryption section (3-column) ---- */
.enc-intro {
  margin: 24px 0 36px;
  color: var(--muted);
}
.enc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) {
  .enc-grid { grid-template-columns: 1fr; }
}
.enc-col {
  border-top: 3px solid var(--rule);
  padding-top: 18px;
}
.enc-col--encrypted { border-color: var(--accent); }
.enc-col--plain { border-color: #d39e2a; }
.enc-col--mem { border-color: var(--muted-2); }
.enc-col__title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
}
.enc-col__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 16px;
  display: block;
}
.enc-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}
.enc-col li { padding: 8px 0; border-top: 1px solid var(--rule); }
.enc-col li:first-child { padding-top: 0; border-top: 0; }
.enc-footnote {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}
.enc-footnote strong { color: var(--ink); }

/* Inline footnote marker (the "*" with a hover tooltip, e.g. the Scribe caveat) */
.note-marker {
  cursor: help;
  color: var(--accent);
  font-weight: 700;
  margin-left: 1px;
}

/* ---- Pricing / plan cards ---- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}
@media (max-width: 720px) {
  .plans-grid { grid-template-columns: 1fr; }
}
.plan-card {
  position: relative;
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 28px 26px 24px;
  background: var(--card);
}
.plan-card--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 70%);
}
.plan-card__badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-card__name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.plan-card__price {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1;
}
.plan-card__period { font-size: 0.9rem; color: var(--muted); margin: 4px 0 18px; }
.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: var(--text);
}
.plan-card li {
  padding: 8px 0 8px 22px;
  border-top: 1px solid var(--rule);
  position: relative;
  line-height: 1.4;
}
.plan-card li:first-child { border-top: 0; }
.plan-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--accent);
  font-weight: 600;
}
.plan-card__cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
}
.plan-card__cta:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }
.plan-card__cta-sub {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.85;
}
.plan-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 20px;
}

/* ---- Distribution channels (Sync only) ---- */
.channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 720px) { .channels { grid-template-columns: 1fr; } }
.channel {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--card);
}
.channel__name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.channel__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
}
.channel__desc { font-size: 0.88rem; color: var(--muted); margin: 0 0 10px; line-height: 1.55; }
.channel__link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}
.channel__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
}
.channel__buy {
  display: inline-block;
  padding: 11px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.channel__buy:hover { background: var(--accent-deep); color: #fff; text-decoration: none; transform: translateY(-1px); }

/* Channel cards (equal, in .plans-grid) — flex column so each card's actions
   pin to the bottom and the two cards' primary buttons align regardless of
   how long the descriptions run. */
.plan-card--channel { display: flex; flex-direction: column; }
.plan-card--channel .channel__actions { margin-top: auto; }

/* ---- Price / value showcase (channel-agnostic: same price + trial both ways) ---- */
.price-showcase {
  border: 1.5px solid var(--accent);
  background: var(--featured-bg);
  border-radius: 14px;
  padding: 30px 32px;
  margin-top: 28px;
  margin-bottom: 36px;
}
.price-showcase__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
.price-showcase__amount {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.price-showcase__period { font-size: 1rem; color: var(--muted); margin-left: 4px; }
.price-showcase__alt { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }
.price-showcase__features {
  columns: 2;
  column-gap: 44px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}
@media (max-width: 680px) { .price-showcase__features { columns: 1; } }
.price-showcase__features li {
  padding: 7px 0 7px 24px;
  position: relative;
  break-inside: avoid;
  color: var(--text);
  line-height: 1.4;
}
.price-showcase__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--accent);
  font-weight: 600;
}

/* Intro line above the two channel cards */
.channels-intro {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: var(--reading-width);
}

/* ---- Support block (per product) ---- */
.support {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 28px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--reading-width);
  margin: 0 auto;
}
.support__email {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.92rem;
}
.support__email a { flex: 1; color: var(--ink); }
.support__copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.support__copy:hover { background: var(--accent-deep); }
.support__copy.is-copied { background: var(--success); }
.support__note { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ---- Cross-reference card (bottom of product pages) ---- */
.cross-ref {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 28px;
  background: var(--bg-alt);
  display: flex;
  gap: 22px;
  align-items: center;
  max-width: var(--reading-width);
  margin: 0 auto;
}
@media (max-width: 560px) {
  .cross-ref { flex-direction: column; align-items: flex-start; gap: 16px; }
}
.cross-ref__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.cross-ref__body { flex: 1; min-width: 0; }
.cross-ref__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.cross-ref__title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
}
.cross-ref__desc { font-size: 0.92rem; color: var(--muted); margin: 0; line-height: 1.55; }
.cross-ref__cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.cross-ref__cta:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 56px 24px 40px;
  background: var(--bg);
  text-align: center;
}
.site-footer__copy {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 14px;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 0 0 16px;
}
.site-footer__links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer__links a:hover { color: var(--accent); text-decoration: none; }
.site-footer__fine {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
  margin: 8px 0 0;
}
.site-footer__fine a { color: var(--muted); }

/* ---- Landing-page two-card layout ---- */
.landing {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 24px;
}
.landing__hero { text-align: center; margin-bottom: 64px; }
.landing__hero .lead { margin: 28px auto 0; }
.landing__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 820px) {
  .landing__cards { grid-template-columns: 1fr; }
}
.product-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 36px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--accent) 18%, transparent);
  text-decoration: none;
  color: var(--text);
}
.product-card:hover::after { opacity: 1; }
.product-card__icons { display: flex; gap: 8px; position: relative; z-index: 1; }
.product-card__icon { width: 56px; height: 56px; border-radius: 12px; box-shadow: var(--shadow); }
.product-card__name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}
.product-card__kind {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 6px 0 0;
  position: relative;
  z-index: 1;
}
.product-card__desc {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 1;
}
.product-card__cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.product-card__cta::after { content: "→"; transition: transform 0.2s; }
.product-card:hover .product-card__cta::after { transform: translateX(4px); }

/* ---- FAQ (native details/summary, content always in the DOM) ---- */
/* Full container width to match the sections above; answer text is held to a
   readable measure via .faq__a max-width. */
.faq { margin-top: 28px; }
.faq__item { border-top: 1px solid var(--rule); }
.faq__item:last-child { border-bottom: 1px solid var(--rule); }
.faq__q {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  padding: 18px 40px 18px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  line-height: 1.35;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 15px;
  font-family: var(--mono);
  font-weight: 400;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}
.faq__item[open] .faq__q::after { content: "\2212"; }
.faq__q:hover { color: var(--accent); }
.faq__a {
  padding: 0 0 22px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}
.faq__a p { margin: 0 0 0.9em; }
.faq__a p:last-child { margin-bottom: 0; }
.faq__a strong { color: var(--ink); }
.faq__a a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.faq__a a:hover { text-decoration: none; border-bottom-color: var(--accent); }

/* ---- Comparison table ---- */
.compare-wrap {
  margin-top: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--rule) transparent;
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}
.compare th,
.compare td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.45;
}
.compare thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  white-space: nowrap;
}
.compare tbody th {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .is-own {
  background: var(--accent-soft);
  color: var(--ink);
}
.compare thead .is-own { color: var(--accent); }
.compare .yes { color: var(--success); font-weight: 600; }
.compare .no { color: var(--muted-2); }
.compare td small { display: block; color: var(--muted-2); font-size: 0.82rem; margin-top: 3px; line-height: 1.4; }
.compare-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
  margin-top: 10px;
}

/* ---- Article / explainer pages (long-form prose) ---- */
.article { padding: 8px 0 56px; }
.article__lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.5;
  color: var(--text);
  font-variation-settings: "opsz" 36;
  margin: 0 0 32px;
}
.article h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-variation-settings: "opsz" 60;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 48px 0 14px;
}
.article h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  margin: 32px 0 10px;
}
.article p { margin: 0 0 1.1em; color: var(--text); }
.article ul,
.article ol { margin: 0 0 1.2em; padding-left: 22px; color: var(--text); }
.article li { margin-bottom: 8px; line-height: 1.6; }
.article a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.article a:hover { text-decoration: none; border-bottom-color: var(--accent); }
/* The CTA button keeps its own colours inside .article (the generic .article a
   link colour would otherwise tint it accent-on-accent and add an underline). */
.article a.channel__buy,
.article a.channel__buy:hover { color: #fff; border-bottom: 0; }
.article strong { color: var(--ink); }
.article__note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
  font-size: 0.94rem;
  color: var(--text);
}
.article__note strong { color: var(--ink); }
.article__sources {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.article__sources h2 {
  font-size: 1rem;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin: 0 0 12px;
}
.article__sources ul { padding-left: 18px; margin: 0; }
.article__sources li { margin-bottom: 6px; }
.article__sources a { word-break: break-word; }

/* ---- Floating back-to-top button (appears after scrolling) ---- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.15s;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity 0.25s, visibility 0.25s; transform: none; }
}
