/* Narro landing page. Brand: ink tile, green waveform, warm light (see the brand handoff). */
:root {
  --ink: #1a1917;
  --green: #4fb56e;
  --light: #f7f6f2;
  --font-body: Lato, system-ui, -apple-system, sans-serif;
  --font-head: Montserrat, system-ui, -apple-system, sans-serif;

  --bg: #ffffff;
  --fg: var(--ink);
  --muted: #5f5c56;
  --panel: var(--light);
  --border: #e4e1d9;
  --button: var(--ink);
  --button-fg: var(--light);
  --button-icon: var(--green);
  --shadow: 0 24px 60px rgba(26, 25, 23, 0.16);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --fg: var(--light);
    --muted: #a8a49c;
    --panel: #1c1b19;
    --border: #2e2c29;
    --button: var(--light);
    --button-fg: var(--ink);
    --button-icon: #2e8a4c; /* the logo green, darkened to show on the light button */
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; }
:not(pre) > code { background: var(--panel); border: 1px solid var(--border); padding: 0.1em 0.35em; border-radius: 5px; }

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

/* --- Header and footer --- */

.top, .bottom, main > section {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--font-head); letter-spacing: -0.02em; }
.brand img { display: block; border-radius: 7px; }
@media (prefers-color-scheme: dark) { .brand img { box-shadow: 0 0 0 1px #3a3732; } }
.brand.small { font-size: 16px; }
.top nav, .bottom nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.top nav a, .bottom nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .bottom nav a:hover { color: var(--fg); text-decoration: underline; }
.top nav { align-items: center; }

/* GitHub's Star button; it renders itself into this wrapper. Height is reserved so the header doesn't jump. */
.gh { display: inline-flex; align-items: center; min-height: 28px; line-height: 0; }

.bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 96px; padding: 28px 0 40px; border-top: 1px solid var(--border);
}

/* --- Hero --- */

.hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 56px;
  padding: 56px 0 72px;
}
h1 {
  margin: 0 0 20px;
  font: 700 clamp(40px, 5.6vw, 64px)/1.06 var(--font-head); letter-spacing: -0.03em;
}
.lede { margin: 0 0 28px; font-size: 19px; color: var(--muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 10px;
  font-weight: 700; text-decoration: none; border: 1px solid var(--border); background: transparent;
}
.button:hover { background: var(--panel); }
.button.primary { background: var(--button); color: var(--button-fg); border-color: var(--button); }
.button.primary:hover { filter: brightness(1.15); }
/* The puzzle piece Chrome uses for extensions. */
.button-icon { width: 20px; height: 20px; margin-right: 10px; fill: var(--button-icon); flex: none; }
.fine { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* --- The demo --- */

.demo { margin: 0; }
.demo video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--light);
}

/* --- Sections --- */

.section { padding: 72px 0 0; }
.section h2 { margin: 0 0 12px; font: 700 clamp(26px, 3.2vw, 36px)/1.15 var(--font-head); letter-spacing: -0.02em; }
.section-lede { margin: 0 0 32px; color: var(--muted); max-width: 40em; }

.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.voice-group { padding: 26px 28px 8px 0; }
.voice-group + .voice-group { padding-left: 28px; border-left: 1px solid var(--border); }
.voice-group h3 { margin: 0 0 6px; font: 600 18px/1.3 var(--font-head); }
.voice-note { margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.voice-group ul { list-style: none; margin: 0; padding: 0; }
.voice-group li { display: grid; gap: 1px; padding: 10px 0; border-top: 1px solid var(--border); }
.voice-group li span { font-size: 14px; color: var(--muted); }

.features-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: start; }
.features { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; max-width: 36em; }
.features li { position: relative; padding-left: 26px; color: var(--muted); }
.features li strong { color: var(--fg); }
/* A small waveform bar as the marker, from the logo. */
.features li::before {
  content: ''; position: absolute; left: 4px; top: 0.5em; width: 5px; height: 0.9em; border-radius: 3px; background: var(--green);
}
.popup-shot { margin: 0; width: 330px; }
.popup-shot img { display: block; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }

.kindle-steps {
  list-style: none; counter-reset: step; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; border-top: 1px solid var(--border);
}
.kindle-steps li { counter-increment: step; display: grid; gap: 4px; padding-top: 22px; }
.kindle-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px;
  border-radius: 50%; background: var(--green); color: var(--ink); font: 700 15px/1 var(--font-head);
}
.kindle-steps strong { font: 600 18px/1.3 var(--font-head); }
.kindle-steps span { font-size: 15px; color: var(--muted); }
.kindle-details { margin: 36px 0 0; padding-left: 1.2em; display: grid; gap: 8px; max-width: 44em; }
.kindle-details li::marker { color: var(--green); }
.kindle-note { margin: 24px 0 0; max-width: 48em; font-size: 14px; color: var(--muted); }

.privacy ul { margin: 18px 0 0; padding-left: 1.2em; display: grid; gap: 8px; max-width: 40em; }
.privacy li::marker { color: var(--green); }

.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 14px; max-width: 46em; }
.steps li::marker { font-weight: 700; color: var(--muted); }
.steps p { margin: 0; }
/* Grid items don't shrink below their content by default; let the code box scroll instead. */
.steps li { min-width: 0; }
.steps pre {
  margin: 12px 0 0; padding: 16px 18px; overflow-x: auto; border-radius: 12px;
  background: var(--ink); color: var(--light); line-height: 1.55;
}
@media (prefers-color-scheme: dark) { .steps pre { background: var(--panel); border: 1px solid var(--border); } }

/* Building from source is the secondary route, below the store button. */
.install h3 { margin: 56px 0 6px; font: 600 20px/1.3 var(--font-head); }
.install h3 + p { margin: 0 0 20px; color: var(--muted); max-width: 40em; }

/* --- Small screens --- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 28px; }
  /* Stacked voice groups: each in its own card, so a group's title reads apart from its voices. */
  .voices { grid-template-columns: 1fr; gap: 14px; border-top: 0; }
  .voice-group, .voice-group + .voice-group {
    padding: 18px 18px 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
  }
  .voice-group h3 { font-size: 19px; font-weight: 700; }
  .voice-group li strong { font-weight: 400; }
  .features-section { grid-template-columns: 1fr; }
  .kindle-steps { grid-template-columns: 1fr; gap: 0; }
  .popup-shot { width: min(330px, 100%); }
}
@media (max-width: 560px) {
  .top, .bottom, main > section { width: calc(100% - 40px); }
  .top { padding: 16px 0; }
  .top nav > a { display: none; }

  .hero { gap: 32px; padding: 20px 0 8px; }
  .lede { font-size: 17px; margin-bottom: 22px; }
  .button { min-height: 48px; padding: 0 18px; }

  .section { padding-top: 56px; }
  .section-lede { margin-bottom: 22px; }

  /* Voices: name and details on one row. */
  .voice-group, .voice-group + .voice-group { padding: 16px 16px 4px; }
  .voice-note { margin-bottom: 10px; font-size: 14px; }
  .voice-group li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 9px 0; }
  .voice-group li strong { white-space: nowrap; }
  .voice-group li span { text-align: right; }

  .features-section { gap: 32px; }
  .features { gap: 14px; }
  .popup-shot { width: min(270px, 100%); margin-inline: auto; }

  /* Kindle steps: the number beside the title rather than above it. */
  .kindle-steps li { grid-template-columns: 30px 1fr; column-gap: 14px; padding-top: 16px; }
  .kindle-steps li::before { grid-row: span 2; margin: 0; }
  .kindle-details { margin-top: 26px; }

  /* Install: wrap the long clone URL instead of hiding it off the edge. */
  .steps { padding-left: 1.2em; }
  .steps pre { padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }

  /* Footer: comfortable tap targets. */
  .bottom { margin-top: 64px; padding-bottom: 28px; }
  .bottom nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; width: 100%; }
  .bottom nav a { padding: 10px 0; }
}

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