/* InLibrary site — one stylesheet for every page.
   Brand colours come from the app (src/constants/design-tokens.ts). Change them in :root. */

/* ---------- Fonts (self-hosted, SIL OFL — see fonts/OFL.txt) ---------- */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/PlusJakartaSans_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/PlusJakartaSans_500Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/PlusJakartaSans_700Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/PlusJakartaSans_800ExtraBold.ttf') format('truetype');
}

/* ---------- Tokens ---------- */

:root {
  --bg: #fff3dc;
  --surface: #ffffff;
  --raised: #ffe2b0;
  --track: #f3e3cb;
  --ink: #2b1608;
  --ink-2: #6f5232; /* body-secondary; AA on --bg and --surface */
  --accent: #ff6a00; /* fills only */
  --accent-text: #c84f00; /* large orange text; ≥3:1 on --bg */
  --link: #7a2e00;
  --success: #178352;
  --dark: #2b1608; /* dark feature panels */
  --on-dark: #fff3dc;
  --on-dark-2: #e8c99c;
  --border: rgba(43, 22, 8, 0.1);
  --border-strong: rgba(43, 22, 8, 0.18);
  --shadow-sm: 0 2px 10px rgba(122, 46, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(122, 46, 0, 0.16);
  --glow: radial-gradient(circle, rgba(255, 217, 92, 0.7) 0%, rgba(255, 150, 40, 0.24) 38%, rgba(255, 243, 220, 0) 68%);
  --header-bg: rgba(255, 243, 220, 0.85);
  --radius: 20px;
  --radius-lg: 32px;
  --page: 72rem;
  --gutter: 16px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110c;
    --surface: #221a13;
    --raised: #3a2a1b;
    --track: #3a2a1b;
    --ink: #f6ead8;
    --ink-2: #cbb08c;
    --accent: #ff7a1a;
    --accent-text: #ff9a4d;
    --link: #ffb27a;
    --success: #4cc28a;
    --dark: #2a1f16;
    --on-dark: #f6ead8;
    --on-dark-2: #d9b98c;
    --border: rgba(255, 236, 210, 0.1);
    --border-strong: rgba(255, 236, 210, 0.2);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
    --glow: radial-gradient(circle, rgba(255, 150, 40, 0.28) 0%, rgba(255, 106, 0, 0.1) 40%, rgba(23, 17, 12, 0) 68%);
    --header-bg: rgba(23, 17, 12, 0.85);
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

code {
  font-size: 0.9em;
  background: var(--track);
  border-radius: 6px;
  padding: 1px 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
}

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

.container {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--raised);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.logo-book {
  fill: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: var(--raised);
}

.site-nav a[aria-current='page'] {
  background: var(--ink);
  color: var(--bg);
}

/* Phone menu: a <details>, so it opens without JavaScript. Shown below 640px only. */

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

.menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

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

.menu summary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu[open] summary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(270px, calc(100vw - 2 * var(--gutter)));
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.menu-panel a:hover,
.menu-panel a[aria-current='page'] {
  background: var(--raised);
}

/* ---------- Buttons & pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: #2b1608;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--dark);
  color: var(--on-dark);
  padding: 10px 20px 10px 16px;
  border-radius: 14px;
  line-height: 1.2;
  border: 1px solid var(--border-strong);
}

.store-pill svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-pill small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}

.store-pill strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.tag {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
  margin: 0 0 12px;
}

/* ---------- Landing: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}

.hero::before {
  content: '';
  position: absolute;
  right: -240px;
  top: -200px;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background: var(--glow);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 88px 0 104px;
  }
  .hero .container {
    grid-template-columns: 1.15fr 1fr;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-text);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 34rem;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 28px;
}

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

/* Timer card (decorative) */

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  padding: 28px 0;
}

.timer-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.timer-card svg {
  width: 190px;
  height: 190px;
  margin-bottom: 12px;
}

.ring-track {
  stroke: var(--track);
}

.timer-card .eyebrow {
  margin: 0;
}

.timer-card .time {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.timer-card .sub {
  color: var(--ink-2);
  font-weight: 500;
}

.float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.float-top {
  top: 0;
  left: -8px;
}

.float-bottom {
  bottom: 0;
  right: -8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
}

.float .muted {
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- Landing: sections ---------- */

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 40rem;
  margin: 0 0 40px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}

.section-head p {
  color: var(--ink-2);
  font-size: 1.1rem;
  margin: 0;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.feature h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 18px 0 6px;
}

.feature p {
  color: var(--ink-2);
  margin: 0;
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--raised);
  display: grid;
  place-items: center;
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--link);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Screenshots: scrolls inside its own row, never the page */

.gallery {
  list-style: none;
  padding: 8px var(--gutter) 24px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  max-width: var(--page);
  margin: 0 auto;
}

.gallery li {
  flex: 0 0 auto;
  width: min(240px, 70vw);
  scroll-snap-align: start;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.hint {
  color: var(--ink-2);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

/* Privacy band */

.band {
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 48px 28px;
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .band {
    padding: 56px;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
  }
}

.band .eyebrow {
  color: var(--on-dark-2);
}

.band h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}

.band p {
  color: var(--on-dark-2);
  margin: 0 0 20px;
}

.band a {
  color: var(--on-dark);
  font-weight: 700;
}

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

.checks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}

.checks svg {
  width: 28px;
  height: 28px;
}

.checks strong {
  display: block;
}

.checks span {
  color: var(--on-dark-2);
}

/* Policy cards */

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.link-card {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

@media (prefers-reduced-motion: reduce) {
  .link-card {
    transition: none;
  }
  .link-card:hover {
    transform: none;
  }
}

.link-card strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.link-card span {
  display: block;
  color: var(--ink-2);
}

.link-card .arrow {
  margin-top: 14px;
  color: var(--link);
  font-weight: 700;
}

.contact {
  text-align: center;
  padding: 24px 0 88px;
}

.contact h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 8px;
}

.contact p {
  color: var(--ink-2);
  margin: 0 0 20px;
}

/* ---------- Legal pages ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
}

.page-hero::before {
  content: '';
  position: absolute;
  right: -200px;
  top: -380px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--glow);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}

.page-hero .updated {
  display: inline-block;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

.page-hero .intro {
  color: var(--ink-2);
  font-size: 1.1rem;
  max-width: 40rem;
  margin: 0 0 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

.doc-layout {
  display: grid;
  gap: 24px;
  padding-bottom: 80px;
}

@media (min-width: 1024px) {
  .doc-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 88px;
  }
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.92rem;
}

.toc summary {
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
}

.toc ol {
  margin: 8px 0 4px;
  padding-left: 20px;
}

.toc li + li {
  margin-top: 4px;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 20px 32px;
  box-shadow: var(--shadow-sm);
  max-width: 50rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .doc {
    padding: 16px 48px 48px;
  }
}

.doc h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 40px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

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

.doc h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 6px;
}

.doc p,
.doc li {
  color: var(--ink);
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0 8px;
}

.summary > p:first-child {
  margin-top: 0;
}

.summary ul {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--bg);
  font-weight: 800;
}

tbody tr:last-child td {
  border-bottom: 0;
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  white-space: pre-wrap;
  font-size: 0.9rem;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* ---------- 404 ---------- */

.not-found {
  text-align: center;
  padding: 96px 0 120px;
}

.not-found .big {
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--accent-text);
  margin: 0;
}

.not-found h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0;
}

.not-found p {
  color: var(--ink-2);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.footer-grid p {
  color: var(--ink-2);
  margin: 12px 0 0;
  max-width: 22rem;
}

.footer-grid h2 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 12px;
}

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

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.footer-grid .brand {
  display: inline-flex;
}

.footer-grid a:hover {
  text-decoration: underline;
}

.copyright {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 0.875rem;
}

/* ---------- Back to top (legal pages) ---------- */

.to-top-wrap {
  margin: 40px 0 0;
  text-align: center;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.to-top::before {
  content: '↑';
}

/* ---------- Phones (under 640px) ---------- */

@media (max-width: 639px) {
  html {
    scroll-padding-top: 76px;
  }

  /* Header: one 60px row — logo left, Menu right */
  .site-nav {
    display: none;
  }
  .menu {
    display: block;
  }
  .site-header .container {
    flex-wrap: nowrap;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .brand {
    min-height: 44px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }

  /* Hero: headline, pitch and primary action fit the first screen */
  .hero {
    padding: 28px 0 44px;
  }
  .hero::before {
    right: -360px;
    top: -260px;
  }
  .hero .container {
    gap: 28px;
  }
  .hero h1 {
    font-size: clamp(2.2rem, 10.5vw, 2.75rem);
    margin-bottom: 14px;
  }
  .lead {
    font-size: 1.05rem;
    margin-bottom: 22px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 18px;
  }
  .hero-actions .store-pill,
  .hero-actions .btn {
    justify-content: center;
    min-height: 54px;
  }
  .tags {
    gap: 6px;
  }
  .tag {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
  .hero-visual {
    width: min(100%, 300px);
    padding: 22px 0;
  }
  .timer-card {
    padding: 24px 20px 22px;
    border-radius: 28px;
  }
  .timer-card svg {
    width: 136px;
    height: 136px;
    margin-bottom: 8px;
  }
  .timer-card .time {
    font-size: 2rem;
  }
  .float {
    font-size: 0.82rem;
    padding: 6px 12px;
  }
  .float-top {
    left: 6px;
  }
  .float-bottom {
    right: 6px;
  }

  /* Rhythm */
  .section {
    padding: 36px 0;
  }
  .section-head {
    margin-bottom: 22px;
  }
  .section-head h2 {
    font-size: clamp(1.65rem, 7.5vw, 2rem);
  }
  .section-head p {
    font-size: 1rem;
  }

  /* Features: compact rows, icon on the left */
  .feature-grid {
    gap: 10px;
  }
  .feature {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 2px 14px;
    padding: 16px 18px;
    border-radius: 18px;
  }
  .feature .icon {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .feature h3 {
    margin: 0;
    font-size: 1.05rem;
    align-self: end;
  }
  .feature p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* Screenshots */
  .gallery {
    gap: 14px;
    padding-bottom: 16px;
  }
  .gallery li {
    width: 66vw;
  }
  .gallery img {
    border-radius: 20px;
  }

  /* Privacy band */
  .band {
    padding: 30px 22px;
    gap: 24px;
    border-radius: 24px;
  }

  /* Policy cards: compact rows with a trailing arrow */
  .card-grid {
    gap: 10px;
  }
  .link-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 14px;
    padding: 16px 18px;
    border-radius: 18px;
  }
  .link-card strong {
    margin: 0;
    font-size: 1.02rem;
  }
  .link-card span {
    grid-column: 1;
    font-size: 0.92rem;
  }
  .link-card .arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 0;
  }
  .link-card .arrow::after {
    content: '→';
    font-size: 1.3rem;
  }

  .contact {
    padding: 4px 0 52px;
  }
  .contact .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }

  /* Legal pages: text starts on the first screen, full-width reading */
  .page-hero {
    padding: 24px 0 16px;
  }
  .page-hero::before {
    top: -440px;
  }
  .page-hero h1 {
    font-size: clamp(2rem, 9vw, 2.5rem);
    margin-bottom: 6px;
  }
  .page-hero .updated {
    display: block;
    padding: 0;
    background: none;
    border: 0;
    font-size: 0.85rem;
  }
  .doc-layout {
    gap: 12px;
    padding-bottom: 48px;
  }
  .toc {
    padding: 0 16px;
    border-radius: 14px;
  }
  .toc summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    list-style: none;
  }
  .toc summary::-webkit-details-marker {
    display: none;
  }
  .toc summary::after {
    content: '';
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }
  .toc[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
  }
  .toc ol {
    margin-top: 0;
    margin-bottom: 10px;
  }
  .toc li + li {
    margin-top: 0;
  }
  .toc a {
    display: block;
    padding: 7px 0;
  }
  .doc {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    font-size: 1.0625rem;
  }
  .doc h2 {
    font-size: 1.25rem;
    margin-top: 32px;
    padding-top: 20px;
  }
  .summary {
    padding: 16px 18px;
  }
  th,
  td {
    padding: 10px 12px;
  }

  /* Footer: two columns */
  .site-footer {
    padding: 36px 0 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 16px;
  }
  .footer-grid > :first-child,
  .footer-grid > :last-child {
    grid-column: 1 / -1;
  }
  .footer-grid li + li {
    margin-top: 2px;
  }
  .footer-grid a {
    display: inline-block;
    padding: 6px 0;
  }
  .copyright {
    margin-top: 24px;
  }
}
