/* ZettelApp website: no scripts, no external fonts; light and dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --text: #17181c;
  --muted: #555963;
  --border: #e1e4ea;
  --link: #1f63b5;
  --accent-a: #2a78d6;
  --accent-b: #5a3fd0;
  --on-accent: #ffffff;
  --heart: #c2185b; /* 5.9:1 on white */
  --shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 8px 24px rgba(20, 24, 40, 0.08);
  --shadow-lg: 0 2px 4px rgba(20, 24, 40, 0.06), 0 24px 60px rgba(20, 24, 40, 0.16);
  --radius: 12px;
  --gutter: 16px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111215;
    --surface: #1b1c21;
    --surface-2: #22242b;
    --text: #f1f2f5;
    --muted: #aeb2bd;
    --border: #2f323b;
    --link: #8ab8ff;
    --heart: #f48fb1; /* 8:1 on the dark background */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  overflow-x: hidden;
}

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

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-a); outline-offset: 2px; border-radius: 4px; }

code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--surface-2); border-radius: 4px; padding: 0.1em 0.35em; }
kbd {
  background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 5px; padding: 0.05em 0.4em; font-size: 0.85em;
}

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 8px; z-index: 10;
}
/* Logical sides: an off-screen left in a right-to-left page would scroll sideways. */
.skip:focus { inset-inline-start: 8px; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font: 600 1.1rem/1 var(--font-display);
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { background: var(--surface-2); }
.nav .nav-cta { background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); color: var(--on-accent); font-weight: 600; }
.nav .nav-donate { color: var(--heart); font-weight: 600; border: 1px solid color-mix(in srgb, var(--heart) 45%, transparent); }
.nav .nav-donate:hover { background: color-mix(in srgb, var(--heart) 10%, transparent); }
.nav .nav-cta:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Compact header (phones and anything below 900 px, where the full header would wrap in
   some languages): brand, Donate, Download and a CSS-only <details> menu. */
.header-actions { display: none; align-items: center; gap: 6px; }
.hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35em;
  min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.hbtn.donate { color: var(--heart); border: 1px solid color-mix(in srgb, var(--heart) 45%, transparent); }
.hbtn.donate:hover { background: color-mix(in srgb, var(--heart) 10%, transparent); }
.hbtn.cta { color: var(--on-accent); background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); }
.hbtn.cta:hover { filter: brightness(1.08); }
.hbtn-text { display: none; }
.menu > summary {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  list-style: none; cursor: pointer; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--surface-2); }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu[open] .menu-icon { background: transparent; }
.menu[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
/* Tapping anywhere outside the open menu closes it (the backdrop belongs to the summary). */
.menu[open] > summary::after { content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; cursor: default; }
.menu-panel {
  position: absolute; top: calc(100% + 4px); right: var(--gutter); width: min(260px, calc(100vw - 2 * var(--gutter)));
  margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
}
.menu-panel a {
  display: flex; align-items: center; min-height: 46px; padding: 0 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.menu-panel a:hover { background: var(--surface-2); }
/* Header language switch: a globe button and a CSS-only <details> dropdown of every translation. */
.lang-switch { position: relative; }
.lang-switch > summary {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  list-style: none; cursor: pointer; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch .globe { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.lang-switch[open] > summary { background: var(--surface-2); }
.lang-switch[open] > summary::after { content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; cursor: default; }
.lang-switch-panel {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; margin: 0; padding: 6px;
  list-style: none; max-height: 60vh; overflow-y: auto; width: max-content;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
[dir="rtl"] .lang-switch-panel { right: auto; left: 0; }
.lang-switch-panel a {
  display: flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.lang-switch-panel a:hover { background: var(--surface-2); }
.lang-switch-panel a[aria-current] { background: var(--surface-2); font-weight: 700; }
@media (max-width: 899.98px) {
  .nav-wide { display: none; }
  .header-actions { display: flex; }
  .header-row { min-height: 56px; flex-wrap: nowrap; gap: 8px; }
  .brand { min-width: 0; min-height: 44px; font-size: 1rem; gap: 8px; }
  /* The globe joins the buttons and opens its list at the header's edge, like the menu. */
  .lang-switch { position: static; margin-inline-start: auto; }
  .lang-switch-panel { right: var(--gutter); }
  [dir="rtl"] .lang-switch-panel { right: auto; left: var(--gutter); }
  /* The menu opens under its button, which sits at the left in right-to-left pages. */
  [dir="rtl"] .menu-panel { right: auto; left: var(--gutter); }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  .hbtn.donate { padding: 0 14px; }
  .hbtn-text { display: inline; }
}
/* Phones: the logo alone, so the globe, Donate, Download and menu fit in every language. */
@media (max-width: 519.98px) { .brand-name { display: none; } }

/* Hero -------------------------------------------------------------------- */
.hero {
  padding: 56px 0 24px;
  background:
    radial-gradient(900px 420px at 15% -10%, color-mix(in srgb, var(--accent-a) 18%, transparent), transparent 70%),
    radial-gradient(800px 380px at 90% 0%, color-mix(in srgb, var(--accent-b) 16%, transparent), transparent 70%);
}
.hero-inner { text-align: center; max-width: 820px; }
.hero-icon { width: 96px; height: 96px; filter: drop-shadow(0 12px 24px rgba(42, 120, 214, 0.35)); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); margin: 18px 0 10px; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); margin: 0 auto 26px; max-width: 700px; }
[hidden] { display: none !important; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0 0 14px; }
.fine { color: var(--muted); font-size: 0.9rem; margin: 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 46px;
  padding: 10px 22px; border-radius: 10px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.button.primary {
  color: var(--on-accent); background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 6px 18px rgba(64, 80, 214, 0.35);
}
.button.donate { color: #ffffff; background: #c2185b; box-shadow: var(--shadow); }
.button.secondary { color: var(--text); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.button:hover { transform: translateY(-1px); filter: brightness(1.05); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:hover { transform: none; } }

.shot { margin: 0; }
.shot img {
  display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); background: var(--surface);
}
.hero-shot { margin-top: 40px; }

/* Sections ---------------------------------------------------------------- */
.section { padding: 64px 0; }
/* In-page links (#features, #download…) land below the sticky header, not under it. */
main [id] { scroll-margin-top: 72px; }
/* A screenshot opens full size when clicked (phones show it too small to read). */
.shot-link { display: block; border-radius: var(--radius); cursor: zoom-in; }
.section.tinted { background: var(--surface-2); }
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); text-align: center; margin: 0 0 10px; }
.section-lead { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.center { text-align: center; margin-top: 24px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cards.compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.cards.duo { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.feature-link { position: relative; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.feature-link h3 { font-size: 1.3rem; margin-top: 4px; }
.feature-link h3 a { color: var(--text); text-decoration: none; }
.feature-link h3 a::after { content: " →"; color: var(--link); }
.feature-link h3 a::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card is clickable */
.feature-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-link:focus-within { outline: 3px solid var(--accent-a); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .feature-link { transition: none; } .feature-link:hover { transform: none; } }
.card p { margin: 0 0 8px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

.more { font-weight: 600; text-decoration: none; }
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }

.showcase { padding: 48px 0; }
.split { display: grid; gap: 32px; align-items: center; }
.split-text h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 4px 0 12px; }
.split-text p { color: var(--muted); }
.eyebrow {
  display: inline-block; margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.split-text .eyebrow { color: transparent; }
.ticks { margin: 0 0 16px; padding: 0 0 0 1.2em; color: var(--muted); }
.ticks li { margin: 0.2em 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: 48px; }
  .split.reverse { grid-template-columns: 7fr 5fr; }
  .split.reverse .split-text { order: 2; }
}

.download { display: grid; gap: 32px; align-items: start; }
.download h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; }
.download .actions { justify-content: flex-start; }
.specs {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.specs dt { font-weight: 600; }
.specs dd { margin: 0 0 12px; color: var(--muted); }
.specs dd:last-child { margin-bottom: 0; }
@media (min-width: 860px) { .download { grid-template-columns: 1fr 1fr; } }

/* Linux install commands: each stays on one line and scrolls sideways if it is wider than the
   screen, instead of breaking mid-word. The grid's columns must be allowed to be narrower
   than such a line, or the page itself would grow wider than the screen. */
.download > * { min-width: 0; }
.download .fine code {
  display: inline-block; max-width: 100%; overflow-x: auto; white-space: nowrap;
  vertical-align: bottom; overscroll-behavior-x: contain;
  direction: ltr; unicode-bidi: isolate; /* a command reads left to right, even on an Arabic page */
}

/* The Snap Store's own badge (unmodified, CC BY-ND), at the buttons' height. */
.store-badge { margin: 6px 0 12px; }
.store-badge a { display: inline-block; border-radius: 8px; line-height: 0; }
.store-badge img { display: block; width: auto; height: 48px; }

.support { text-align: center; max-width: 720px; }
.support h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 0 0 10px; }
.support > p:first-of-type { color: var(--muted); margin: 0 0 20px; }

/* Footer -------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.92rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.footer-row p { margin: 0; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-row .nav a { color: var(--muted); }
.site-footer .lang-row { justify-content: center; margin-top: 14px; }
.lang-row a { color: var(--muted); font-size: 0.88rem; }
.lang-row a[aria-current] { color: var(--text); font-weight: 600; }
.made-with { margin: 10px 0 0; text-align: center; font-size: 0.82rem; }
.made-with a { color: var(--muted); }

/* Documentation pages ------------------------------------------------------ */
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; padding-bottom: 56px; }
@media (min-width: 900px) { .docs-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; } }
.docs-list { display: none; }
.docs-list h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; }
.docs-list ul { list-style: none; margin: 0; padding: 0; }
.docs-list a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.docs-list a:hover { background: var(--surface-2); }
.docs-list a[aria-current="page"] {
  background: var(--surface); box-shadow: var(--shadow); font-weight: 600;
  border-left: 3px solid var(--accent-a); padding-left: 9px;
}
@media (min-width: 900px) {
  .docs-nav { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
  .docs-list { display: block; }
  .docs-menu { display: none; }
}

/* Below 900px the sidebar becomes a collapsible "Documentation" menu above the page. */
.docs-menu > summary {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; list-style: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
}
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.docs-menu-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.docs-menu-current { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-menu > summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin: 0 4px 3px auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.docs-menu[open] > summary::after { margin-bottom: 0; margin-top: 5px; transform: rotate(225deg); }
.docs-menu ul {
  list-style: none; margin: 8px 0 0; padding: 6px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.docs-menu a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  color: var(--text); text-decoration: none;
}
.docs-menu a:hover { background: var(--surface-2); }
.docs-menu a[aria-current="page"] { background: var(--surface-2); font-weight: 600; border-left: 3px solid var(--accent-a); padding-left: 9px; }
@media (min-width: 560px) { .docs-menu ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc {
  min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(20px, 4vw, 44px);
}
.doc h1 { font-size: clamp(1.8rem, 4.6vw, 2.4rem); margin-top: 0; letter-spacing: -0.01em; }
.doc h2 { margin-top: 2em; font-size: 1.45rem; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.doc h3 { margin-top: 1.6em; font-size: 1.15rem; }
.doc h1, .doc h2, .doc h3 { scroll-margin-top: 80px; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc img { border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.doc pre {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; line-height: 1.5; max-width: 100%; overscroll-behavior-x: contain;
}
.doc pre code { background: none; padding: 0; font-size: 0.88rem; }
.doc blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--accent-a); color: var(--muted); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.table-wrap { overflow-x: auto; margin: 1em 0; overscroll-behavior-x: contain; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.doc th { background: var(--surface-2); font-weight: 600; }
.doc-footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }

/* Documentation on small screens ----------------------------------------------
   Below 900px the page is one column; on phones the card runs edge to edge. */
@media (max-width: 899.98px) {
  .docs-layout { gap: 16px; padding-top: 16px; }
  .doc th, .doc td { min-width: 7rem; }
  .doc td code { white-space: nowrap; }
}

@media (max-width: 640px) {
  .doc {
    margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
    padding: 22px var(--gutter) 28px; border-left: 0; border-right: 0; border-radius: 0; box-shadow: none;
  }
  .doc h1 { font-size: 1.75rem; }
  .doc h2 { font-size: 1.3rem; margin-top: 1.7em; }
  .doc h3 { font-size: 1.1rem; }
  .doc ul, .doc ol { padding-left: 1.35em; }
  .doc pre { padding: 12px 14px; }
  .doc pre code { font-size: 0.82rem; }
  .doc blockquote { padding: 2px 14px; margin: 1em 0; }
  .table-wrap { border: 1px solid var(--border); border-radius: 10px; }
  .table-wrap table { font-size: 0.9rem; }
  .doc tr:last-child td { border-bottom: 0; }
  .doc-footer { margin-top: 28px; }

  /* Soft edge shadows hint that tables and code blocks scroll sideways (CSS-only "scroll shadows"). */
  .table-wrap, .doc pre { --fade: color-mix(in srgb, var(--text) 24%, transparent); }
  .table-wrap {
    background:
      linear-gradient(to right, var(--surface) 30%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(to left, var(--surface) 30%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--fade), transparent) left center / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--fade), transparent) right center / 12px 100% no-repeat scroll;
  }
  .doc pre {
    background:
      linear-gradient(to right, var(--surface-2) 30%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(to left, var(--surface-2) 30%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--fade), transparent) left center / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--fade), transparent) right center / 12px 100% no-repeat scroll var(--surface-2);
  }
}

/* Landing page and footer on phones ---------------------------------------------
   Desktop rules above are untouched; this only tightens spacing and sizes for narrow screens. */
@media (hover: none) {
  .button:hover, .feature-link:hover { transform: none; }
}

@media (max-width: 640px) {
  .hero { padding: 28px 0 8px; }
  .hero-icon { width: 72px; height: 72px; }
  .hero h1 { font-size: clamp(2rem, 9.5vw, 2.6rem); margin: 14px 0 8px; }
  .lead { margin-bottom: 20px; }
  .hero-shot { margin-top: 28px; }
  .section { padding: 40px 0; }
  .showcase { padding: 20px 0; }
  .split { gap: 20px; }
  .section-lead { margin-bottom: 22px; }
  .cards { gap: 12px; }
  .card { padding: 16px 18px; }
  .actions, .download .actions { flex-direction: column; align-items: stretch; max-width: 380px; margin-left: auto; margin-right: auto; }
  .download .actions { margin-left: 0; margin-right: 0; }
  .button { min-height: 48px; }
  .more { display: inline-block; padding: 11px 0; margin: -11px 0; }
  .center { margin-top: 12px; }

  /* Screenshots run edge to edge so they get as many pixels as possible */
  .shot { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .shot img { border-radius: 0; border-left: 0; border-right: 0; }

  .specs { padding: 16px 18px; }
  .site-footer { padding: 16px 0 20px; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer-row .nav { gap: 0 2px; margin-left: -10px; }
  .footer-row .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
}
