/* eOctavo store. Warm paper and ink, like the device, with an orange accent.
   The landing page uses the sections below; the thank-you / error pages from
   server.js use .bar, .narrow, .button, .muted and .foot. */

:root {
  --paper: #f4f0e6;
  --paper-2: #ebe5d6;
  --card: #fffdf8;
  --ink: #17150f;
  --ink-2: #3b372d;
  --muted: #6f6858;
  --line: #d8d0bd;
  --accent: #e0592a;
  --accent-dark: #b8441c;
  --screen: #e9e5da; /* e-ink grey the screenshots are tinted to */
  --radius: 14px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.eyebrow {
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 18px;
}
.eyebrow.light { color: #f0a47f; }

/* ---- Buttons ---------------------------------------------------------------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px;
  padding: 12px 26px;
  font: 600 16px/1 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(23, 21, 15, 0.6); }
.button.big { padding: 17px 34px; font-size: 17px; }
.button.ghost { background: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--ink); color: var(--paper); }
.buy .button, .final-cta .button, .hero-cta .button:not(.ghost) { background: var(--accent); border-color: var(--accent); color: #fff; }
.buy .button:hover, .final-cta .button:hover, .hero-cta .button:not(.ghost):hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---- Brand + nav ------------------------------------------------------------ */

.brand {
  display: inline-flex; align-items: center; gap: 2px;
  font: 700 22px/1 var(--display); text-decoration: none; letter-spacing: -0.01em;
}
.brand.small { font-size: 16px; }
/* The octavo mark from logo-mark.png: transparent, so it sits on any background. */
.brand-mark { height: 1.5em; width: auto; margin-right: 8px; }
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 240, 230, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(23, 21, 15, 0.08);
}
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-buy {
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.nav-buy:hover { background: var(--accent); }

/* ---- Device mockup ---------------------------------------------------------- */
/* An Xteink X3 drawn around a 2:3 screen. Every size is a fraction of --w (the
   body width) measured off a photo of the real device, so a mockup at any size
   keeps the X3's proportions: ~10% side bezels, ~8% on top and a ~24% chin
   holding the two rocker buttons. Set --w, never width, to resize one.
   The screenshots are pure black and white; multiply blends their white into
   the e-ink grey behind them. */

.device {
  --w: 300px;
  margin: 0;
  width: var(--w);
  padding: calc(var(--w) * 0.082) calc(var(--w) * 0.098) calc(var(--w) * 0.24);
  border-radius: calc(var(--w) * 0.06);
  background: linear-gradient(155deg, #3a3833 0%, #1d1c19 55%, #121110 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 40px 70px -30px rgba(23, 21, 15, 0.55),
    0 18px 30px -18px rgba(23, 21, 15, 0.45);
  position: relative;
}
/* The two rocker buttons in the chin (left: back/confirm, right: up/down). */
.device::before,
.device::after {
  content: ""; position: absolute; bottom: calc(var(--w) * 0.045);
  width: 34%; height: calc(var(--w) * 0.028); border-radius: 999px;
  background: #0d0c0b;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.09);
}
.device::before { left: 14.5%; }
.device::after { right: 14.5%; }
.device.small { --w: 230px; }
/* .screen isn't positioned, so its pseudo-elements below hang off .device. */
.screen {
  background: var(--screen);
  border-radius: 4px;
  aspect-ratio: 528 / 792;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
/* Page-turn buttons, one high on each side edge: a strip 1.2% wider than the
   body on each side, painted only at its two ends. */
.screen::before {
  content: ""; position: absolute; top: calc(var(--w) * 0.26); height: calc(var(--w) * 0.16);
  left: calc(var(--w) * -0.012); right: calc(var(--w) * -0.012); border-radius: 2px;
  background:
    linear-gradient(90deg, #2b2925, #1a1917) left / calc(var(--w) * 0.012) 100% no-repeat,
    linear-gradient(270deg, #2b2925, #1a1917) right / calc(var(--w) * 0.012) 100% no-repeat;
}
/* Power button on the top edge, toward the right. */
.screen::after {
  content: ""; position: absolute; top: calc(var(--w) * -0.012); right: calc(var(--w) * 0.12);
  width: calc(var(--w) * 0.11); height: calc(var(--w) * 0.012); border-radius: 2px 2px 0 0;
  background: linear-gradient(#34322d, #1a1917);
}
.screen img { display: block; width: 100%; height: 100%; border-radius: inherit; mix-blend-mode: multiply; }

/* ---- Hero ------------------------------------------------------------------- */

.hero {
  max-width: 1180px; margin: 0 auto; padding: 72px 24px 88px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
}
.hero h1 em { font-style: italic; font-weight: 700; color: var(--accent-dark); }
.lead { font-size: 20px; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 24px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 15px; }
.hero-facts li::before { content: "\2713"; color: var(--accent); font-weight: 700; margin-right: 8px; }
.hero-devices { position: relative; height: 600px; }
.hero-devices .device { position: absolute; }
.device-front { --w: 320px; right: 16%; top: 30px; z-index: 2; }
.device-back { --w: 280px; right: 0; top: 0; transform: rotate(7deg); opacity: 0.97; }
.hero-devices::before { /* soft glow behind the devices */
  content: ""; position: absolute; inset: 10% 5% 0 10%;
  background: radial-gradient(closest-side, rgba(224, 89, 42, 0.22), transparent 70%);
  filter: blur(10px);
}

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.float { animation: float 7s ease-in-out infinite; }
.float-slow { animation: float 9s ease-in-out infinite -3s; }

/* ---- Promise strip ---------------------------------------------------------- */

.strip { background: var(--ink); color: var(--paper); }
.strip-inner {
  max-width: 1180px; margin: 0 auto; padding: 20px 24px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px;
  font: 500 15px/1.2 var(--sans); letter-spacing: 0.02em;
}
.strip-inner span::before { content: "\25CF"; color: var(--accent); margin-right: 10px; font-size: 10px; vertical-align: 2px; }

/* ---- Feature rows ----------------------------------------------------------- */

.feature {
  max-width: 1120px; margin: 0 auto; padding: 110px 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature-copy p { font-size: 18px; color: var(--ink-2); }
.tilt-left { transform: rotate(-3deg); }

.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin: 10px 0; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.clock-fan { position: relative; width: 460px; height: 440px; }
.clock-fan .device { position: absolute; top: 20px; }
.fan-1 { left: 0; transform: rotate(-10deg); }
.fan-2 { left: 115px; top: 0 !important; z-index: 2; }
.fan-3 { left: 230px; transform: rotate(10deg); }

.pair { position: relative; width: 420px; height: 440px; }
.pair .device { position: absolute; }
.pair-a { left: 0; top: 0; transform: rotate(-4deg); }
.pair-b { right: 0; top: 60px; transform: rotate(4deg); z-index: 2; }

/* ---- Battery band ----------------------------------------------------------- */

.battery { background: var(--ink); color: var(--paper); }
.battery-inner { max-width: 1120px; margin: 0 auto; padding: 100px 24px; }
.battery h2 { max-width: 14em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.stat { border-top: 2px solid rgba(244, 240, 230, 0.2); padding-top: 20px; }
.stat strong { display: block; font: 800 56px/1 var(--display); color: var(--accent); margin-bottom: 12px; }
.stat span { color: rgba(244, 240, 230, 0.75); }

/* ---- Comparison ------------------------------------------------------------- */
/* A table on a card. The eOctavo column is tinted; each verdict cell gets a
   mark: filled tick (yes), hollow ring (partly / with a catch), dash (no).
   On narrow screens the table scrolls sideways with the row labels pinned. */

.compare { padding: 110px 24px 70px; }
.compare-wrap {
  max-width: 1180px; margin: 0 auto; overflow-x: auto;
  background: var(--card); border-radius: 24px;
  box-shadow: 0 40px 80px -40px rgba(23, 21, 15, 0.35), 0 0 0 1px rgba(23, 21, 15, 0.06);
}
.compare-table { width: 100%; min-width: 940px; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.compare-table th, .compare-table td { padding: 18px 20px; text-align: left; vertical-align: top; }
.compare-table thead th {
  font: 700 21px/1.2 var(--display); padding-top: 26px; padding-bottom: 22px;
}
.compare-table thead th.us { background: var(--ink); color: var(--paper); }
.compare-table tbody th {
  width: 22%; font-weight: 600; color: var(--ink);
  position: sticky; left: 0; background: var(--card); z-index: 1;
}
.compare-table tbody th, .compare-table tbody td { border-top: 1px solid var(--line); }
.compare-table td { color: var(--ink-2); line-height: 1.45; }
.compare-table td.us { background: rgba(224, 89, 42, 0.07); color: var(--ink); font-weight: 500; }
.compare-table td.us strong { font: 700 20px/1.2 var(--display); }
.compare-table td.no { color: var(--muted); }
.compare-table td.yes, .compare-table td.meh, .compare-table td.no { position: relative; padding-left: 50px; }
.compare-table td.yes::before, .compare-table td.meh::before, .compare-table td.no::before {
  content: ""; position: absolute; left: 20px; top: 20px; width: 18px; height: 18px; border-radius: 50%;
}
.compare-table td.yes::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.compare-table td.meh::before { box-shadow: inset 0 0 0 2px var(--muted); }
.compare-table td.no::before {
  background: linear-gradient(var(--muted), var(--muted)) center / 8px 2px no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);
}
.compare-note { max-width: 760px; margin: 36px auto 0; text-align: center; color: var(--ink-2); }
.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;
}

/* ---- Gallery ---------------------------------------------------------------- */

.gallery { padding: 110px 0 60px; background: var(--paper-2); }
.section-head { max-width: 760px; margin: 0 auto 48px; padding: 0 24px; text-align: center; }
.gallery-track {
  display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px max(24px, calc((100vw - 1120px) / 2)) 40px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gallery-track figure { margin: 0; flex: none; scroll-snap-align: center; text-align: center; }
.gallery-track figcaption { margin-top: 14px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.gallery-track .device { transition: transform 0.25s ease; }
.gallery-track figure:hover .device { transform: translateY(-8px); }
.gallery-nav { display: flex; justify-content: center; gap: 12px; }
.round {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: 500 20px/1 var(--sans); cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.round:hover { background: var(--ink); color: var(--paper); }

/* ---- Buy -------------------------------------------------------------------- */

.buy { padding: 120px 24px; }
.buy-card {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--card); border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(23, 21, 15, 0.45), 0 0 0 1px rgba(23, 21, 15, 0.06);
}
.buy-main { padding: 48px; }
.buy-side { padding: 48px; background: var(--paper-2); }
.buy-side h3 { font-family: var(--sans); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.buy-side .ticks { margin: 8px 0 28px; }
.buy-side .ticks:last-child { margin-bottom: 0; }
.price { font: 800 84px/1 var(--display); margin: 0 0 6px; letter-spacing: -0.03em; }
.price:empty { display: none; }
.price-note { font-size: 18px; color: var(--ink-2); margin-bottom: 26px; }
.buy-main .button { width: 100%; margin-bottom: 18px; }
.buy-main form { margin: 0; }

/* ---- FAQ -------------------------------------------------------------------- */

.faq { padding: 40px 24px 110px; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font: 600 19px/1.35 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 400 28px/1 var(--sans); color: var(--accent); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-2); padding-right: 40px; }

/* ---- Final CTA + footer ----------------------------------------------------- */

.final-cta { text-align: center; padding: 20px 24px 120px; }
.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 28px 24px; border-top: 1px solid var(--line); }
.foot p { margin: 0; }
.foot-logo { display: block; width: 150px; height: auto; margin: 8px auto 18px; }

/* ---- Scroll reveal ---------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float, .float-slow { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Thank-you / error pages (server.js page()) ----------------------------- */

.bar { max-width: 1180px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.narrow { max-width: 640px; margin: 0 auto; padding: 48px 24px 80px; }
.narrow h1 { font-size: clamp(36px, 5vw, 52px); }
.narrow h2 { font-size: 26px; margin-top: 40px; }
.narrow ol { padding-left: 22px; }
.narrow li { margin: 8px 0; }
.narrow .button { background: var(--accent); border-color: var(--accent); color: #fff; }
.narrow .button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---- App store (/apps, app_pages.js) ------------------------------------------
   Laid out like Google Play: shelves of app cards on the list page; on an app
   page, icon + name, a strip of stats, Install, a screenshot rail, then About,
   What's new, Data safety and App info, with "More apps" down the side. */

.wide { max-width: 1180px; margin: 0 auto; padding: 40px 24px 90px; }
.wide h1 { font-size: clamp(34px, 4.5vw, 52px); margin-bottom: 8px; }
.wide h2 { font-size: 22px; margin: 0 0 14px; }
.lead-small { font-size: 18px; color: var(--ink-2); max-width: 36em; }
.small { font-size: 14px; }
code { font: 14px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }

.store-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.store-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 34px; }
.store-search {
  flex: 0 1 320px; padding: 11px 18px 11px 42px; border: 1px solid var(--line); border-radius: 999px;
  font: 16px var(--sans); color: var(--ink); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6858' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") 15px center / 18px no-repeat;
}
.store-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); font: 500 14px/1 var(--sans); cursor: pointer;
}
.chip:hover { background: var(--paper-2); }
.chip.on { background: #f6dccf; border-color: #f6dccf; color: var(--accent-dark); }
.chip.static { cursor: default; margin-top: 4px; }
.store-updated { margin-top: 40px; }

.shelf { margin-bottom: 40px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.app-card {
  display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px;
  text-decoration: none; color: inherit; transition: background 0.15s ease;
}
.app-card:hover { background: var(--paper-2); }
.app-card[hidden], .shelf[hidden] { display: none; }
.app-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.app-card-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Rounded-square icons, as on Play; .tile is the lettered fallback. */
.app-icon {
  flex: none; width: 64px; height: 64px; border-radius: 22%; object-fit: cover; background: var(--screen);
  box-shadow: 0 1px 2px rgba(23, 21, 15, 0.25), 0 0 0 1px rgba(23, 21, 15, 0.06);
}
.app-icon.tile { display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 800 24px/1 var(--display); }
.app-icon.big { width: 96px; height: 96px; font-size: 36px; }

/* "Our picks": a big feature card for the first pick, smaller ones beside it. */
.picks { margin-bottom: 48px; }
.picks[hidden] { display: none; }
.picks-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.picks-head h2 { margin: 0; }
.picks-head p { margin: 0; }
.picks-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }
.picks-grid.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.pick-hero, .pick-small {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pick-hero:hover, .pick-small:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(23, 21, 15, 0.55); }
.pick-art { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; background: var(--screen); border-bottom: 1px solid var(--line); }
.banner-fallback { display: flex; align-items: center; justify-content: center; }
.pick-hero-body { flex: 1; display: flex; align-items: center; gap: 20px; padding: 20px 24px 24px; }
.pick-hero-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; line-height: 1.35; }
.pick-hero-text strong { font: 700 26px/1.15 var(--display); }
.pick-cta { flex: none; min-width: 0; padding: 12px 26px; }
.pick-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.pick-small-body { display: flex; align-items: center; gap: 14px; padding: 12px 16px 14px; }
.pick-small .app-icon { width: 48px; height: 48px; }
.pick-small .app-card-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-badge {
  display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 999px; margin-bottom: 4px;
  background: #f6dccf; color: var(--accent-dark); font: 700 12px/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
}
.app-tagline { font-size: 18px; color: var(--ink-2); margin: 16px 0 0; }

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.app-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.app-head { display: flex; align-items: center; gap: 24px; }
.app-head h1 { margin: 0 0 4px; }
.app-dev { color: var(--accent-dark); font-weight: 600; margin: 0 0 2px; }

.stat-strip { display: flex; margin: 28px 0 24px; overflow-x: auto; }
.stat-cell { display: flex; flex-direction: column; align-items: center; padding: 0 22px; min-width: 96px; text-align: center; }
.stat-cell + .stat-cell { border-left: 1px solid var(--line); }
.stat-cell:first-child { padding-left: 0; align-items: flex-start; text-align: left; }
.stat-cell strong { font-size: 16px; font-weight: 600; white-space: nowrap; }
.stat-cell span { font-size: 13px; color: var(--muted); white-space: nowrap; }

.app-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.button.install { background: var(--accent); border-color: var(--accent); color: #fff; min-width: 220px; }
.button.install:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.disabled { background: var(--paper-2); border-color: var(--paper-2); color: var(--muted); cursor: default; }
.button.disabled:hover { transform: none; box-shadow: none; }

.shot-rail { display: flex; gap: 22px; overflow-x: auto; padding: 6px 4px 26px; margin-bottom: 18px; scroll-snap-type: x mandatory; }
.shot-rail .device { --w: 200px; flex: none; scroll-snap-align: start; }

.app-section { padding: 26px 0; border-top: 1px solid var(--line); }
.app-section p { color: var(--ink-2); max-width: 44em; }
.steps { padding-left: 22px; color: var(--ink-2); }
.steps li { margin: 8px 0; }

.safety { border: 1px solid var(--line); border-radius: 18px; padding: 8px 22px; background: var(--card); max-width: 640px; }
.safety-row { display: flex; gap: 16px; padding: 14px 0; }
.safety-row + .safety-row { border-top: 1px solid var(--line); }
.safety-row p { margin: 2px 0 0; }
.safety-ic { flex: none; width: 24px; height: 24px; margin-top: 2px; background: var(--ink-2); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.ic-globe { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E"); }
.ic-plane { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M10 13 3 11l1-2 7 1 4-6h2l-2 7 5 1 1-2h1l-1 4 1 4h-1l-1-2-5 1 2 7h-2l-4-6-7 1-1-2z'/%3E%3C/svg%3E"); }
.ic-disk { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 3h11l3 3v15H5z'/%3E%3Cpath d='M8 3v5h7V3M8 21v-7h8v7'/%3E%3C/svg%3E"); }
.ic-lock { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='10' width='14' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.ic-clock { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }

.info { display: grid; grid-template-columns: 130px 1fr; gap: 10px 20px; margin: 0; max-width: 560px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }

.app-side { position: sticky; top: 90px; }
.app-side h2 { font-size: 20px; }
.app-side .app-card { padding: 10px; }
.app-side .app-icon { width: 56px; height: 56px; }
.more-link { display: inline-block; margin: 10px 10px 0; color: var(--accent-dark); font-weight: 600; text-decoration: none; }

@media (max-width: 960px) {
  .picks-grid { grid-template-columns: minmax(0, 1fr); }
  .pick-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .app-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .app-side { position: static; border-top: 1px solid var(--line); padding-top: 26px; }
  .store-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .pick-side { grid-template-columns: minmax(0, 1fr); }
  .pick-hero-body { flex-wrap: wrap; padding: 16px 18px 20px; }
  .pick-cta { width: 100%; text-align: center; }
  .app-head { gap: 16px; }
  .app-icon.big { width: 72px; height: 72px; font-size: 28px; }
  .shot-rail .device { --w: 170px; }
  .stat-cell { padding: 0 14px; min-width: 84px; }
  .info { grid-template-columns: 100px 1fr; }
}

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

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-buy { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-facts { justify-content: center; }
  .hero-devices { height: 520px; max-width: 460px; width: 100%; margin: 0 auto; }
  .device-front { --w: 270px; right: auto; left: 8%; }
  .device-back { --w: 240px; }
  .feature { grid-template-columns: 1fr; gap: 48px; padding: 80px 24px; }
  .feature.flip .feature-media { order: 0; }
  .stats { grid-template-columns: 1fr; }
  .buy-card { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .hero-devices { height: 440px; }
  .device-front { --w: 220px; left: 4%; }
  .device-back { --w: 200px; }
  /* The fanned groups are laid out at desktop size, then scaled to fit; the
     negative margins give back the width and height the scale frees up. */
  .clock-fan { transform: scale(0.7); transform-origin: top left; margin: 0 -138px -132px 0; }
  .pair { transform: scale(0.76); transform-origin: top left; margin: 0 -101px -106px 0; }
  .feature-media { justify-content: flex-start; padding-left: calc((100% - 322px) / 2); }
  .strip-inner { gap: 10px 22px; font-size: 14px; }
  .buy-main, .buy-side { padding: 32px 24px; }
  .price { font-size: 64px; }
}
/* Phones: each row becomes its own card, with the three answers labelled
   underneath (the labels replace the tick marks). */
@media (max-width: 700px) {
  .compare { padding: 80px 16px 50px; }
  .compare-wrap { background: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td {
    display: block; min-width: 0; width: auto;
  }
  .compare-table thead { display: none; }
  .compare-table tbody tr {
    background: var(--card); border-radius: 18px; margin-bottom: 14px; overflow: hidden;
    box-shadow: 0 20px 40px -30px rgba(23, 21, 15, 0.4), 0 0 0 1px rgba(23, 21, 15, 0.06);
  }
  .compare-table tbody th {
    position: static; width: auto; border-top: 0; padding: 18px 18px 10px; font: 700 19px/1.25 var(--display);
  }
  .compare-table td,
  .compare-table td.yes, .compare-table td.meh, .compare-table td.no {
    display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 18px;
  }
  .compare-table td::before,
  .compare-table td.yes::before, .compare-table td.meh::before, .compare-table td.no::before {
    position: static; width: auto; height: auto; border-radius: 0; background: none; box-shadow: none;
    font: 600 13px/1.6 var(--sans); color: var(--muted);
  }
  .compare-table td:nth-child(2)::before { content: "eOctavo"; color: var(--accent-dark); }
  /* One per column of the table in index.html, in the same order. */
  .compare-table td:nth-child(3)::before { content: "X3 stock"; }
  .compare-table td:nth-child(4)::before { content: "Snail OS"; }
  .compare-table td:nth-child(5)::before { content: "CrossPoint"; }
}

/* ---- Admin (admin.js) --------------------------------------------------------- */

.admin { max-width: 860px; margin: 0 auto; padding: 32px 0 64px; }
.admin h1 { font-size: clamp(32px, 4vw, 44px); }
.admin-login { max-width: 380px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-head h1 { margin: 0; }
.admin-head > div { display: flex; gap: 10px; align-items: center; }
.admin form.inline { display: inline; margin: 0; }
.admin-ok, .admin-warn, .admin-error { padding: 12px 16px; border-radius: 10px; border: 1px solid; }
.admin-ok { background: #eaf4e4; border-color: #b9d6a8; }
.admin-warn { background: #fdf3dc; border-color: #ecd193; }
.admin-error { background: #fbe6df; border-color: #eab3a0; color: #7a2410; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { font: 600 13px/1 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table img { display: block; border-radius: 8px; }
.admin-noicon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--paper-2); font-weight: 700; }
.admin-actions a { margin-right: 12px; }
.admin form label { display: block; margin: 0 0 18px; font-weight: 600; }
.admin form label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0 0 12px; }
.admin form .help label.check { margin: 0; font-size: 14px; }
.admin .admin-now { margin: -12px 0 18px; }
.admin input[type="text"], .admin input:not([type]), .admin input[type="password"], .admin textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.admin input:focus, .admin textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.admin input[type="file"] { display: block; margin-top: 6px; font: 400 15px var(--sans); }
.admin .help { display: block; margin-top: 4px; font: 400 14px/1.45 var(--sans); color: var(--muted); }
.admin fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px 20px 4px; margin: 0 0 20px; }
.admin legend { font: 700 18px var(--display); padding: 0 6px; }
.admin-shots { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 10px; }
.admin-shots img { border: 1px solid var(--line); border-radius: 6px; background: var(--screen); }
.admin-danger { margin-top: 40px; padding: 18px 20px; border: 1px solid #eab3a0; border-radius: var(--radius); }
.admin-danger h2 { font-size: 24px; }
/* ---- App simulator (/admin/preview, public/sim) ------------------------------ */

.admin:has(.sim) { max-width: 1120px; }
.sim { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.sim-device { display: flex; flex-direction: column; align-items: center; }
.sim-body { display: flex; align-items: center; gap: 10px; padding: 22px 14px 22px 22px; background: #d9d4c7; border-radius: 26px; box-shadow: inset 0 0 0 2px #c4bead; }
#sim-screen { width: 396px; height: 594px; background: #fff; image-rendering: pixelated; border: 1px solid #b3ad9e; outline: none; }
#sim-screen:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.sim-side { display: flex; flex-direction: column; gap: 10px; }
.sim-front { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 420px; margin-top: 12px; }
.sim-btn { padding: 10px 0; font: 600 15px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sim-btn:hover { background: var(--paper-2); }
.sim-btn:active { transform: translateY(1px); }
.sim-side .sim-btn { width: 54px; padding: 18px 0; font-size: 13px; }
.sim-panel select { display: block; width: 100%; margin-top: 6px; padding: 9px 10px; font: 400 15px var(--sans); border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.sim-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.sim-actions .button { padding: 9px 16px; font-size: 14px; }
.sim-stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 14px; }
.sim-stats dt { font-weight: 600; }
.sim-stats dd { margin: 0; }
.sim-stats dd.near { color: #9a6200; font-weight: 600; }
.sim-stats dd.over { color: #b3261e; font-weight: 700; }
.sim-log { height: 220px; overflow-y: auto; margin-bottom: 14px; padding: 8px 10px; font: 12.5px/1.5 ui-monospace, Consolas, monospace; background: #fbfaf6; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; }
.sim-log-error { color: #b3261e; font-weight: 600; }
.sim-log-warn { color: #9a6200; }
.sim-log-info { color: var(--muted); }
@media (max-width: 900px) {
  .sim { grid-template-columns: 1fr; }
  #sim-screen { width: 300px; height: 450px; }
  .sim-front { width: 100%; max-width: 380px; }
}