/* Aether Tail website. Uses the app's color themes and light/dark mode
   (docs/requirements.md D1–D3): gradient background, rounded cards, an
   accent color and the serpent's glowing ribbon. Each page type has its own body class and
   layout (docs/website.md W3). */

:root {
  /* Colors come from the app's palette (lib/ui/palette.dart). The build
     appends them for every theme and mode, keyed on <html data-theme> and
     <html data-mode> (docs/website.md W8). Only sizes live here. */
  --radius: 28px;
  --max: 1080px;
  --bar-h: 56px;
  /* W3: the space between a page's sections. */
  --section-gap: 60px;
  --bar-inset: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --read: 700px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  outline: none;
}

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

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

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

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 12px;
  z-index: 20;
}

.skip:focus {
  left: 16px;
}

/* ---------- Header & footer ---------- */

.site-header {
  /* W9: a floating, frosted bar that stays at the top of the screen. The
     header itself is see-through and lets clicks pass; only the bar takes
     them. */
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--bar-inset) 16px 0;
  pointer-events: none;
}

.bar {
  pointer-events: auto;
  position: relative;
  width: min(100%, calc(var(--max) + 24px));
  min-height: var(--bar-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg-top) var(--bar-glass), transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 0 0 1px var(--bar-ring), 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Once the page scrolls, the glass thickens and lifts off the page. */
.site-header.scrolled .bar {
  background: color-mix(in srgb, var(--bg-top) var(--bar-glass-scrolled), transparent);
  box-shadow: inset 0 0 0 1px var(--bar-ring), var(--bar-shadow);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  gap: 2px;
}

/* Links are soft pills: a faint tint on hover and a slightly deeper one for
   the current page, never a solid fill. */
.site-nav a {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease), background-color 0.25s var(--ease);
}

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

.site-nav a[aria-current="page"] {
  opacity: 1;
  background: var(--nav-current);
}

.bar-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-footer {
  margin-top: 72px;
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer a {
  color: var(--muted);
}

/* The phone menu (W9): a two-line button that turns into a cross, and a
   frosted sheet under the bar. Hidden on wider screens. */
.menu,
.scrim,
.sheet {
  display: none;
}

.menu {
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.menu:hover {
  background: var(--nav-hover);
}

.menu span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}

.menu span:first-child {
  top: 17px;
}

.menu span:last-child {
  top: 25px;
}

.site-header.open .menu span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.site-header.open .menu span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--menu-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.site-header.open .scrim {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  pointer-events: auto;
  position: absolute;
  top: calc(100% + 8px);
  left: 16px;
  right: 16px;
  padding: 10px;
  border-radius: 28px;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg-top) var(--sheet-glass), transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--bar-ring), var(--bar-shadow);
  transform-origin: top;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}

.site-header.open .sheet {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease);
}

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

/* Each item fades down in turn as the sheet opens. */
.sheet li,
.sheet .more {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease);
}

.site-header.open .sheet li,
.site-header.open .sheet .more {
  opacity: 1;
  transform: none;
  transition-delay: calc(45ms * var(--i) + 60ms);
}

.sheet li a {
  display: block;
  padding: 10px 16px;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sheet li a:hover {
  background: var(--nav-hover);
}

.sheet li a[aria-current="page"] {
  background: var(--nav-current);
}

.sheet .more {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 8px 6px 0;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
}

.sheet .more a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.sheet .more a:hover {
  color: var(--ink);
  background: var(--nav-hover);
}

@media (prefers-reduced-motion: reduce) {
  .menu span,
  .scrim,
  .sheet,
  .sheet li,
  .sheet .more {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Color and dark mode control (W8) ---------- */

.theme-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  flex: none;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.theme-button:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.theme-button[aria-expanded="true"] {
  box-shadow: inset 0 0 0 2px var(--ink);
}

.theme-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(400px, calc(100vw - 32px));
  padding: 22px 20px 16px;
  z-index: 30;
}

.theme-panel[hidden] {
  display: none;
}

.theme-panel h2 {
  font-size: 20px;
  margin: 0 0 14px;
}

.theme-panel h3 {
  font-size: 15px;
  margin: 0 0 12px;
  letter-spacing: 0;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.swatches button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.swatches button span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-clip: content-box !important;
  padding: 3px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.swatches button[aria-checked="true"] {
  color: var(--ink);
}

.swatches button[aria-checked="true"] span {
  border-color: var(--ink);
}

.swatches button[aria-checked="true"] span::after {
  content: "✓";
}

.mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-weight: 600;
}

.mode-row #theme-dark-label {
  flex: 1;
}

.mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sky-soft);
  color: var(--ink);
  flex: none;
}

.switch {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  padding: 3px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease;
  flex: none;
}

.switch span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.switch[aria-checked="true"] {
  background: var(--accent-deep);
}

.switch[aria-checked="true"] span {
  transform: translateX(22px);
}

/* ---------- Shared pieces ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 10px;
}

.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 34em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.primary {
  border: 0;
  background: var(--accent-gradient);
  color: #fff;
}

.button[aria-disabled="true"] {
  opacity: 0.75;
  cursor: default;
}

.button small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.1;
}

.button span {
  text-align: left;
  line-height: 1.2;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin: 28px 0 0;
}

.crumbs a {
  color: var(--muted);
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
}

/* Glowing tiles, as on the game board. */
.tile {
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.12s ease;
}

.tile.on {
  background: var(--glow);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- Home ---------- */

.page-home .hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 40px;
}

.page-home .hero h1 {
  font-size: clamp(42px, 7vw, 68px);
  margin: 0 0 16px;
}

.page-home .store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.demo {
  padding: 28px;
  text-align: center;
}

.demo canvas {
  display: block;
  width: min(100%, 300px);
  aspect-ratio: 17 / 24;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: var(--board);
  border: 1.5px solid var(--line);
  touch-action: none;
  cursor: pointer;
}

.demo canvas:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.demo .pad {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(2, 48px);
  gap: 6px;
  justify-content: center;
  margin: 0 auto 12px;
}

.demo .pad button {
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.demo .pad button:active {
  transform: scale(0.92);
}

.demo .pad [data-dir="up"] {
  grid-column: 2;
}

.demo .pad [data-dir="left"] {
  grid-row: 2;
  grid-column: 1;
}

.demo .pad [data-dir="down"] {
  grid-row: 2;
  grid-column: 2;
}

.demo .pad [data-dir="right"] {
  grid-row: 2;
  grid-column: 3;
}

.demo .status {
  min-height: 1.6em;
  font-weight: 600;
}

.demo .status button {
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: var(--section-gap);
}

.feature {
  padding: 26px;
}

.feature .icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: var(--accent-soft);
}

.feature:nth-child(3n + 2) .icon {
  background: var(--sky-soft);
}

.feature:nth-child(3n) .icon {
  background: var(--pink-soft);
}

.feature h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

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

.steps {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.steps h2 {
  font-size: clamp(30px, 4.5vw, 42px);
  margin: 0;
}

.steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  padding: 20px 22px 20px 72px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

.cta-band {
  margin-top: var(--section-gap);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius);
}

.cta-band h2 {
  margin: 0;
  font-size: 28px;
}

.cta-band .button {
  background: #fff;
  color: var(--accent-deep);
  border: 0;
}

/* Phone screenshots (W10): real screens from the app, in a phone frame. */
.phone {
  margin: 0;
  border: 10px solid #111018;
  border-radius: 46px;
  overflow: hidden;
  background: #111018;
}

/* The frame wraps the whole screen at its own shape: nothing is cropped. */
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 36px;
}

.showcase {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.showcase h2,
.gallery-section h2 {
  font-size: clamp(30px, 4.5vw, 42px);
  margin: 0 0 12px;
}

.showcase .phones {
  position: relative;
  height: 600px;
}

.showcase .phone {
  position: absolute;
  width: 260px;
}

.showcase .phone-back {
  left: 8%;
  top: 0;
  transform: rotate(-6deg);
}

.showcase .phone-front {
  right: 8%;
  top: 40px;
  transform: rotate(4deg);
}

.gallery-section {
  margin-top: var(--section-gap);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.gallery figure {
  margin: 0;
  text-align: center;
}

.gallery .phone {
  width: min(100%, 260px);
  margin: 0 auto;
}

.gallery figcaption {
  margin-top: 18px;
  font-size: 19px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 860px) {
  .showcase {
    grid-template-columns: 1fr;
  }

  .showcase .phones {
    height: 520px;
  }

  .showcase .phone {
    width: 220px;
  }

  .showcase .phone-back {
    left: calc(50% - 215px);
  }

  .showcase .phone-front {
    right: calc(50% - 215px);
  }

  /* Swipe through the screens on phones and small tablets. */
  .gallery {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: min(70%, 240px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .gallery figure {
    scroll-snap-align: center;
  }
}

@media (max-width: 480px) {
  .showcase .phones {
    height: 420px;
  }

  .showcase .phone {
    width: 170px;
    border-width: 7px;
    border-radius: 32px;
  }

  .showcase .phone img {
    border-radius: 25px;
  }

  .showcase .phone-back {
    left: 2px;
  }

  .showcase .phone-front {
    right: 2px;
  }
}

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

.page-faq .page-hero,
.page-blog .page-hero,
.page-privacy .page-hero,
.page-404 .page-hero {
  padding: 56px 0 24px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 54px);
  margin: 0 0 12px;
}

.page-faq .faq-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
}

.page-faq .faq-toc {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.page-faq .faq-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.page-faq .faq-toc a:hover {
  background: var(--accent-soft);
}

.page-faq .faq-group {
  margin-bottom: var(--section-gap);
}

.page-faq .faq-group h2 {
  font-size: 22px;
  margin: 0 0 14px;
}

.page-faq details {
  margin-bottom: 12px;
  padding: 0 22px;
}

.page-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 600;
  position: relative;
}

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

.page-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--link);
  font-weight: 700;
}

.page-faq details[open] summary::after {
  content: "–";
}

.page-faq details > div {
  padding: 0 0 20px;
  color: var(--muted);
}

.page-faq details > div p {
  margin: 0 0 10px;
}

.page-faq .still {
  padding: 28px;
  text-align: center;
}

/* ---------- Blog index ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-card .cover {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 18px 28px;
  background: var(--surface-soft);
}

.post-card .cover .tile {
  border-radius: 50%;
  transform: scale(0.62);
}

.post-card .body {
  padding: 22px 24px 26px;
}

.post-card h2 {
  font-size: 21px;
  margin: 8px 0;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Article ---------- */

.page-article .article-head {
  width: min(100% - 32px, var(--read));
  margin: 0 auto;
  padding: 40px 0 28px;
  text-align: center;
}

.page-article .article-head h1 {
  font-size: clamp(34px, 5.5vw, 50px);
  margin: 14px 0;
}

.page-article .article-head .crumbs ol {
  justify-content: center;
}

.page-article .prose {
  width: min(100% - 32px, var(--read));
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 56px);
}

.prose h2 {
  font-size: 27px;
  margin: 40px 0 10px;
}

.prose h3 {
  font-size: 21px;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
  border-radius: 0 16px 16px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-variant-numeric: tabular-nums;
}

.prose td code {
  font-size: 1.25em;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

.prose .mini-board {
  display: inline-grid;
  grid-template-columns: repeat(var(--n, 5), 22px);
  gap: 4px;
  margin: 8px 0 18px;
}

.related {
  width: min(100% - 32px, var(--max));
  margin: var(--section-gap) auto 0;
}

.related h2 {
  font-size: 22px;
}

/* ---------- Privacy ---------- */

.page-privacy .policy {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 36px;
  align-items: start;
}

.page-privacy .policy-body {
  overflow-wrap: anywhere;
  padding: 40px clamp(20px, 5vw, 52px);
}

.page-privacy .policy-body h2 {
  font-size: 22px;
  margin: 32px 0 8px;
}

.page-privacy .policy-body h2:first-child {
  margin-top: 0;
}

.page-privacy .policy-body p {
  margin: 0;
}

.page-privacy aside {
  position: sticky;
  top: 92px;
  padding: 20px;
  font-size: 15px;
}

.page-privacy aside ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.page-privacy aside li {
  margin: 6px 0;
}

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

.page-404 .lost {
  text-align: center;
  padding: 40px 0;
}

.page-404 .lost .board {
  display: inline-grid;
  grid-template-columns: repeat(3, 56px);
  gap: 10px;
  margin-bottom: 24px;
}

/* ---------- Page transitions & small screens ---------- */

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.22s;
  }
}

@media (max-width: 860px) {
  .page-home .hero,
  .steps,
  .page-faq .faq-layout,
  .page-privacy .policy {
    grid-template-columns: 1fr;
  }

  .page-home .hero {
    padding-top: 36px;
    gap: 32px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .page-faq .faq-toc,
  .page-privacy aside {
    position: static;
  }

  .page-privacy aside {
    order: -1;
  }
}

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

  /* One row: the logo, the palette button and the menu button; the links
     move into the sheet. */
  .bar {
    grid-template-columns: 1fr auto;
    padding: 0 6px 0 16px;
  }

  .site-nav {
    display: none;
  }

  .menu,
  .scrim,
  .sheet {
    display: block;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-inline: 10px;
  }

  .sheet {
    left: 10px;
    right: 10px;
  }

  .theme-button {
    width: 44px;
    height: 44px;
  }

  .site-nav {
    gap: 0;
  }

  .cta-band {
    padding: 28px;
  }
}


/* Generated by tool/build_website.dart from lib/ui/palette.dart. */
:root { color-scheme: light; --ink: #17161f; --muted: #605e78; --surface: #ffffff; --surface-soft: #f4f3fa; --line: #e6e4f0; --pink-soft: #f6ddfb; --sky-soft: #d9f1f4; --bar-glass: 58%; --bar-glass-scrolled: 84%; --bar-ring: rgba(255, 255, 255, 0.55); --bar-shadow: 0 14px 34px -16px rgba(23, 22, 31, 0.30); --nav-hover: rgba(23, 22, 31, 0.06); --nav-current: rgba(23, 22, 31, 0.09); --sheet-glass: 90%; --menu-scrim: rgba(23, 22, 31, 0.20); --accent: #1f7fa0; --accent-soft: #d9eef2; --accent-deep: #1d627c; --accent-gradient: linear-gradient(135deg, #1d6a86, #1d627c); --link: #1d627c; --glow: linear-gradient(135deg, #f8bb56, #f47230, #42aec2); --glow-1: #f8bb56; --glow-2: #f47230; --glow-3: #42aec2; --board: #faf8f6; --bg-top: #f1ece4; --bg-bottom: #e2eef0; --shadow: 0 8px 24px rgba(31, 127, 160, 0.08); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) { color-scheme: dark; --ink: #f1f0f7; --muted: #a3a1bc; --surface: #1a1c22; --surface-soft: #24262e; --line: #33353f; --pink-soft: #45304d; --sky-soft: #26414a; --bar-glass: 45%; --bar-glass-scrolled: 74%; --bar-ring: rgba(255, 255, 255, 0.08); --bar-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.6); --nav-hover: rgba(255, 255, 255, 0.10); --nav-current: rgba(255, 255, 255, 0.15); --sheet-glass: 88%; --menu-scrim: rgba(0, 0, 0, 0.45); --accent: #1f7fa0; --accent-soft: #1b3a48; --accent-deep: #1d627c; --accent-gradient: linear-gradient(135deg, #1d6a86, #1d627c); --link: #84b9cb; --glow: linear-gradient(135deg, #f8bb56, #f47230, #42aec2); --glow-1: #f8bb56; --glow-2: #f47230; --glow-3: #42aec2; --board: #0f1115; --bg-top: #14222d; --bg-bottom: #10161c; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); } }
html[data-mode="light"] { color-scheme: light; --ink: #17161f; --muted: #605e78; --surface: #ffffff; --surface-soft: #f4f3fa; --line: #e6e4f0; --pink-soft: #f6ddfb; --sky-soft: #d9f1f4; --bar-glass: 58%; --bar-glass-scrolled: 84%; --bar-ring: rgba(255, 255, 255, 0.55); --bar-shadow: 0 14px 34px -16px rgba(23, 22, 31, 0.30); --nav-hover: rgba(23, 22, 31, 0.06); --nav-current: rgba(23, 22, 31, 0.09); --sheet-glass: 90%; --menu-scrim: rgba(23, 22, 31, 0.20); }
html[data-mode="dark"] { color-scheme: dark; --ink: #f1f0f7; --muted: #a3a1bc; --surface: #1a1c22; --surface-soft: #24262e; --line: #33353f; --pink-soft: #45304d; --sky-soft: #26414a; --bar-glass: 45%; --bar-glass-scrolled: 74%; --bar-ring: rgba(255, 255, 255, 0.08); --bar-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.6); --nav-hover: rgba(255, 255, 255, 0.10); --nav-current: rgba(255, 255, 255, 0.15); --sheet-glass: 88%; --menu-scrim: rgba(0, 0, 0, 0.45); }
html[data-theme="aether"][data-mode="light"] { --accent: #1f7fa0; --accent-soft: #d9eef2; --accent-deep: #1d627c; --accent-gradient: linear-gradient(135deg, #1d6a86, #1d627c); --link: #1d627c; --glow: linear-gradient(135deg, #f8bb56, #f47230, #42aec2); --glow-1: #f8bb56; --glow-2: #f47230; --glow-3: #42aec2; --board: #faf8f6; --bg-top: #f1ece4; --bg-bottom: #e2eef0; --shadow: 0 8px 24px rgba(31, 127, 160, 0.08); }
html[data-theme="aether"][data-mode="dark"] { --accent: #1f7fa0; --accent-soft: #1b3a48; --accent-deep: #1d627c; --accent-gradient: linear-gradient(135deg, #1d6a86, #1d627c); --link: #84b9cb; --glow: linear-gradient(135deg, #f8bb56, #f47230, #42aec2); --glow-1: #f8bb56; --glow-2: #f47230; --glow-3: #42aec2; --board: #0f1115; --bg-top: #14222d; --bg-bottom: #10161c; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="celestial"][data-mode="light"] { --accent: #2e5bd8; --accent-soft: #e0e7fb; --accent-deep: #2848a4; --accent-gradient: linear-gradient(135deg, #294db3, #2848a4); --link: #2848a4; --glow: linear-gradient(135deg, #f2cc4b, #3fb8a0, #2449b8); --glow-1: #f2cc4b; --glow-2: #3fb8a0; --glow-3: #2449b8; --board: #f7f8fd; --bg-top: #e8ecfa; --bg-bottom: #e4f3f0; --shadow: 0 8px 24px rgba(46, 91, 216, 0.08); }
html[data-theme="celestial"][data-mode="dark"] { --accent: #2e5bd8; --accent-soft: #202f59; --accent-deep: #2848a4; --accent-gradient: linear-gradient(135deg, #294db3, #2848a4); --link: #8ca5ea; --glow: linear-gradient(135deg, #f2cc4b, #3fb8a0, #2449b8); --glow-1: #f2cc4b; --glow-2: #3fb8a0; --glow-3: #2449b8; --board: #0f1115; --bg-top: #161d35; --bg-bottom: #11151f; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="ember"][data-mode="light"] { --accent: #d4521c; --accent-soft: #ffe3d4; --accent-deep: #9f411d; --accent-gradient: linear-gradient(135deg, #ae461d, #9f411d); --link: #9f411d; --glow: linear-gradient(135deg, #ffb25c, #f07a2a, #6b2e8f); --glow-1: #ffb25c; --glow-2: #f07a2a; --glow-3: #6b2e8f; --board: #fff9f6; --bg-top: #ffefe4; --bg-bottom: #fbe6ec; --shadow: 0 8px 24px rgba(212, 82, 28, 0.08); }
html[data-theme="ember"][data-mode="dark"] { --accent: #d4521c; --accent-soft: #522c20; --accent-deep: #9f411d; --accent-gradient: linear-gradient(135deg, #ae461d, #9f411d); --link: #e7a082; --glow: linear-gradient(135deg, #ffb25c, #f07a2a, #6b2e8f); --glow-1: #ffb25c; --glow-2: #f07a2a; --glow-3: #6b2e8f; --board: #0f1115; --bg-top: #2d1c1a; --bg-bottom: #191415; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="orchid"][data-mode="light"] { --accent: #b8327e; --accent-soft: #f8ddec; --accent-deep: #8b2a63; --accent-gradient: linear-gradient(135deg, #982c6b, #8b2a63); --link: #8b2a63; --glow: linear-gradient(135deg, #d9e35a, #d0458e, #3340a8); --glow-1: #d9e35a; --glow-2: #d0458e; --glow-3: #3340a8; --board: #fdf6fa; --bg-top: #f8e6f1; --bg-bottom: #e7e9fb; --shadow: 0 8px 24px rgba(184, 50, 126, 0.08); }
html[data-theme="orchid"][data-mode="dark"] { --accent: #b8327e; --accent-soft: #49233e; --accent-deep: #8b2a63; --accent-gradient: linear-gradient(135deg, #982c6b, #8b2a63); --link: #d88eb8; --glow: linear-gradient(135deg, #d9e35a, #d0458e, #3340a8); --glow-1: #d9e35a; --glow-2: #d0458e; --glow-3: #3340a8; --board: #0f1115; --bg-top: #291728; --bg-bottom: #17131a; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="folk"][data-mode="light"] { --accent: #2f5fc4; --accent-soft: #dfe7f8; --accent-deep: #284b96; --accent-gradient: linear-gradient(135deg, #2a50a3, #284b96); --link: #284b96; --glow: linear-gradient(135deg, #e8b82e, #ee7fa4, #2f5fc4); --glow-1: #e8b82e; --glow-2: #ee7fa4; --glow-3: #2f5fc4; --board: #fefbf6; --bg-top: #fbf4e6; --bg-bottom: #f3e7f0; --shadow: 0 8px 24px rgba(47, 95, 196, 0.08); }
html[data-theme="folk"][data-mode="dark"] { --accent: #2f5fc4; --accent-soft: #203053; --accent-deep: #284b96; --accent-gradient: linear-gradient(135deg, #2a50a3, #284b96); --link: #8da7df; --glow: linear-gradient(135deg, #e8b82e, #ee7fa4, #2f5fc4); --glow-1: #e8b82e; --glow-2: #ee7fa4; --glow-3: #2f5fc4; --board: #0f1115; --bg-top: #161e32; --bg-bottom: #11151e; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
html[data-theme="autumn"][data-mode="light"] { --accent: #b5541c; --accent-soft: #f6e0cf; --accent-deep: #89431d; --accent-gradient: linear-gradient(135deg, #95481d, #89431d); --link: #89431d; --glow: linear-gradient(135deg, #e8c07a, #e07a1f, #7a1f2b); --glow-1: #e8c07a; --glow-2: #e07a1f; --glow-3: #7a1f2b; --board: #fcf9f5; --bg-top: #f7eee2; --bg-bottom: #edf1e3; --shadow: 0 8px 24px rgba(181, 84, 28, 0.08); }
html[data-theme="autumn"][data-mode="dark"] { --accent: #b5541c; --accent-soft: #492d20; --accent-deep: #89431d; --accent-gradient: linear-gradient(135deg, #95481d, #89431d); --link: #d6a182; --glow: linear-gradient(135deg, #e8c07a, #e07a1f, #7a1f2b); --glow-1: #e8c07a; --glow-2: #e07a1f; --glow-3: #7a1f2b; --board: #0f1115; --bg-top: #291c1a; --bg-bottom: #171415; --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
