/*
 * Plantiv website — shared styles.
 *
 * The palette and type mirror the app's botanical design
 * (frontend/lib/pages/home/widgets/home_style.dart, plantivHeading in
 * frontend/lib/widgets/plantiv_design.dart): cream and deep-forest surfaces,
 * Libre Caslon Display headings, and text in the device's own font (SF Pro on
 * Apple devices, Roboto on Android) with the app's -0.3px tracking.
 *
 * Theme resolution: light tokens on :root; dark tokens when the system prefers
 * dark (unless forced light), or when forced dark. On the web the override
 * lives in localStorage['plantiv-theme']; inside the app it comes from the
 * ?theme= query the in-app browser sends. Either way the inline script in each
 * page's <head> applies it to <html data-theme> before first paint.
 *
 * html.in-app marks a page opened inside the app's in-app browser sheet, which
 * already draws a title, close button and host line. See "In-app" below.
 */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/libre-caslon-display.woff2") format("woff2");
}

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

:root {
  color-scheme: light;

  --bg: #f8f7f2;
  --bg-tint: #f0f1e9;
  --paper: #fcfbf7;
  --surface: #ffffff;
  --chip: #e9ede1;
  --placeholder: #e2e8d9;
  --ink: #102321;
  --body: #60666b;
  --muted: #60666b;
  --subtle: #929799;
  --divider: #e3e4dc;
  --border-strong: #c9d0c3;

  --fill: #123f35;
  --fill-end: #0d2e27;
  --on-fill: #ffffff;
  --accent: #173f35;
  --accent-text: #416b46;
  --sage-ink: #71896c;
  --sage: #b8d79a;
  --accent-soft: rgb(23 63 53 / 0.06);
  --accent-soft-strong: rgb(23 63 53 / 0.12);

  --warn: #80521a;
  --warn-bg: #fff2da;
  --warn-dot: #e0902f;
  --danger: #ad4334;
  --danger-bg: #fbe8e4;

  --card-sage: linear-gradient(120deg, #e9ede1, #dfe8d3);
  --header-bg: rgb(248 247 242 / 0.82);
  --store-bg: #102321;
  --store-ink: #f8f7f2;
  --photo-dim: none;
  --on-photo-border: rgb(16 35 33 / 0.08);

  --shadow-card: 0 1px 2px rgb(16 35 33 / 0.04), 0 14px 34px -18px rgb(16 35 33 / 0.18);
  --shadow-pop: 0 2px 6px rgb(16 35 33 / 0.06), 0 22px 48px -16px rgb(16 35 33 / 0.28);
  --shadow-phone: 0 2px 4px rgb(16 35 33 / 0.1), 0 34px 70px -26px rgb(16 35 33 / 0.55);
  --focus: #173f35;

  --sun-opacity: 0;
  --sun-transform: rotate(-90deg) scale(0.5);
  --moon-opacity: 1;
  --moon-transform: none;

  --serif: "Libre Caslon Display", Georgia, "Noto Serif", serif;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
  --toc-bar-h: 52px;
  --gutter: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Dark tokens — kept identical in both blocks below. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #101a16;
    --bg-tint: #13201a;
    --paper: #1b2922;
    --surface: #1b2922;
    --chip: #24372c;
    --placeholder: #2c4031;
    --ink: #f1f2e9;
    --body: #b8c4b9;
    --muted: #b8c4b9;
    --subtle: #8fa395;
    --divider: #35483b;
    --border-strong: #465c4c;

    --fill: #b8d79a;
    --fill-end: #cfe0a6;
    --on-fill: #101a16;
    --accent: #b8d79a;
    --accent-text: #b8d79a;
    --sage-ink: #b8d79a;
    --sage: #b8d79a;
    --accent-soft: rgb(184 215 154 / 0.08);
    --accent-soft-strong: rgb(184 215 154 / 0.16);

    --warn: #e8bd72;
    --warn-bg: #352a18;
    --warn-dot: #e8bd72;
    --danger: #e5766a;
    --danger-bg: #3a211d;

    --card-sage: linear-gradient(120deg, #1d3027, #24372c);
    --header-bg: rgb(16 26 22 / 0.8);
    --store-bg: #f1f2e9;
    --store-ink: #101a16;
    --photo-dim: brightness(0.74) saturate(0.95);
    --on-photo-border: rgb(241 242 233 / 0.08);

    --shadow-card: 0 0 0 transparent;
    --shadow-pop: 0 22px 48px -16px rgb(0 0 0 / 0.65);
    --shadow-phone: 0 34px 70px -26px rgb(0 0 0 / 0.85);
    --focus: #b8d79a;

    --sun-opacity: 1;
    --sun-transform: none;
    --moon-opacity: 0;
    --moon-transform: rotate(90deg) scale(0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #101a16;
  --bg-tint: #13201a;
  --paper: #1b2922;
  --surface: #1b2922;
  --chip: #24372c;
  --placeholder: #2c4031;
  --ink: #f1f2e9;
  --body: #b8c4b9;
  --muted: #b8c4b9;
  --subtle: #8fa395;
  --divider: #35483b;
  --border-strong: #465c4c;

  --fill: #b8d79a;
  --fill-end: #cfe0a6;
  --on-fill: #101a16;
  --accent: #b8d79a;
  --accent-text: #b8d79a;
  --sage-ink: #b8d79a;
  --sage: #b8d79a;
  --accent-soft: rgb(184 215 154 / 0.08);
  --accent-soft-strong: rgb(184 215 154 / 0.16);

  --warn: #e8bd72;
  --warn-bg: #352a18;
  --warn-dot: #e8bd72;
  --danger: #e5766a;
  --danger-bg: #3a211d;

  --card-sage: linear-gradient(120deg, #1d3027, #24372c);
  --header-bg: rgb(16 26 22 / 0.8);
  --store-bg: #f1f2e9;
  --store-ink: #101a16;
  --photo-dim: brightness(0.74) saturate(0.95);
  --on-photo-border: rgb(241 242 233 / 0.08);

  --shadow-card: 0 0 0 transparent;
  --shadow-pop: 0 22px 48px -16px rgb(0 0 0 / 0.65);
  --shadow-phone: 0 34px 70px -26px rgb(0 0 0 / 0.85);
  --focus: #b8d79a;

  --sun-opacity: 1;
  --sun-transform: none;
  --moon-opacity: 0;
  --moon-transform: rotate(90deg) scale(0.5);
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --header-h: 72px;
  }
}

@media (min-width: 1280px) {
  :root {
    --gutter: 48px;
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  letter-spacing: -0.3px;
}

main {
  flex: 1 0 auto;
}

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

img {
  height: auto;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

strong {
  font-weight: 600;
  color: var(--ink);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 400;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-soft-strong);
  color: var(--ink);
}

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

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--divider);
}

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

.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Section titles share the app's heading style: tight, light and left-aligned. */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.display em {
  color: var(--sage-ink);
  font-style: normal;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--bg);
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--divider);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-right: auto;
  padding-right: 6px;
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1.06;
  letter-spacing: -1.1px;
  text-decoration: none;
}

.brand-leaf {
  width: 27px;
  height: 27px;
  color: var(--sage-ink);
  fill: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-list a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.nav-list a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent-soft-strong);
}

.nav-list .nav-legal {
  display: none;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: 6px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: var(--store-bg);
  color: var(--store-ink);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out);
}

.header-cta:hover {
  transform: translateY(-1px);
}

.header-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (min-width: 620px) {
  .header-cta {
    display: inline-flex;
  }
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--chip);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn:focus-visible {
  border-radius: 999px;
}

.theme-toggle {
  margin-left: 6px;
}

.theme-toggle .icon {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 0.3s var(--ease-out), transform 0.45s var(--ease-out);
}

.theme-toggle .icon-sun {
  opacity: var(--sun-opacity);
  transform: var(--sun-transform);
}

.theme-toggle .icon-moon {
  opacity: var(--moon-opacity);
  transform: var(--moon-transform);
}

.nav-toggle {
  display: none;
}

.nav-toggle .icon-close {
  display: none;
}

.site-header.nav-open .nav-toggle .icon-close {
  display: block;
}

.site-header.nav-open .nav-toggle .icon-menu {
  display: none;
}

html:not(.js) .theme-toggle {
  display: none;
}

@media (max-width: 767px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav-list {
    display: none;
    position: absolute;
    top: calc(var(--header-h) - 2px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-pop);
  }

  .js .site-header.nav-open .nav-list {
    display: flex;
    animation: pop 0.18s var(--ease-out);
  }

  .js .nav-list a {
    display: flex;
    min-height: 50px;
    padding: 0 16px;
    border-radius: var(--radius-lg);
    color: var(--ink);
    font-size: 15.5px;
  }

  .js .nav-list .nav-legal {
    display: block;
  }
}

html:not(.js) .site-nav {
  display: none;
}

@media (min-width: 768px) {
  html:not(.js) .site-nav {
    display: flex;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 14.5px/1.25 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  border-radius: 999px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--fill), var(--fill-end));
  color: var(--on-fill);
}

.btn-primary:hover {
  box-shadow: var(--shadow-pop);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--chip);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px 26px 8px 20px;
  border-radius: 20px;
  background: var(--store-bg);
  color: var(--store-ink);
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

a.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}

.store-btn:focus-visible {
  border-radius: 20px;
}

.store-btn svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.store-btn small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.82;
}

.store-btn span {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.store-soon {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  overflow: clip;
}

.hero-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1.04;
  overflow: hidden;
  /* The same soft arc the photo ends on in the app's welcome screen. */
  border-radius: 0 0 50% 50% / 0 0 7% 7%;
}

.hero-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 32%;
  filter: var(--photo-dim);
}

/* The page as a viewfinder: Plantiv's scan brackets lock on to the plant. */
.viewfinder {
  position: absolute;
  inset: 9% 6% 22% 10%;
  pointer-events: none;
}

.viewfinder i {
  position: absolute;
  width: clamp(36px, 7vw, 68px);
  height: clamp(36px, 7vw, 68px);
  border: 0 solid #fff;
  filter: drop-shadow(0 0 1px rgb(16 35 33 / 0.55)) drop-shadow(0 2px 10px rgb(16 35 33 / 0.3));
  animation: lock-on 0.9s var(--ease-out) both;
}

.viewfinder i:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 4px 0 0 4px;
  border-top-left-radius: 20px;
  --from: -16px, -16px;
}

.viewfinder i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 4px 4px 0 0;
  border-top-right-radius: 20px;
  --from: 16px, -16px;
}

.viewfinder i:nth-child(3) {
  bottom: 0;
  right: 0;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: 20px;
  --from: 16px, 16px;
}

.viewfinder i:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 4px 4px;
  border-bottom-left-radius: 20px;
  --from: -16px, 16px;
}

@keyframes lock-on {
  from {
    opacity: 0;
    transform: translate(var(--from));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.id-card {
  position: absolute;
  left: 50%;
  bottom: 9%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 22px 12px 12px;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
  animation: card-in 0.7s 0.75s var(--ease-out) both;
}

.id-card img {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 16px;
  object-fit: cover;
}

.id-card b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.id-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 600;
}

.id-card .icon {
  width: 15px;
  height: 15px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.hero-copy {
  position: relative;
  padding-block: 30px 56px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(66px, 19vw, 104px);
  line-height: 1.06;
}

.hero-lede {
  max-width: 27em;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(16.5px, 1.4vw, 19px);
  line-height: 1.4;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  list-style: none;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-facts .icon {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
}

@media (min-width: 960px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: min(860px, calc(100vh - var(--header-h)));
  }

  .hero-photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: 62%;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .hero-photo > img {
    object-position: 60% 50%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24%), linear-gradient(to top, transparent, #000 10%);
    mask-image: linear-gradient(to right, transparent, #000 24%), linear-gradient(to top, transparent, #000 10%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }

  .viewfinder {
    inset: 9% 7% 15% 21%;
  }

  .id-card {
    left: 18%;
    bottom: 11%;
    transform: none;
    animation-name: card-in-desk;
  }

  @keyframes card-in-desk {
    from {
      opacity: 0;
      transform: translateY(14px) scale(0.97);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .hero-copy {
    padding-block: 56px 72px;
  }

  .hero-copy > * {
    max-width: min(620px, 40vw);
  }

  .hero-copy .store-row,
  .hero-copy .hero-facts {
    max-width: min(620px, 44vw);
  }

  .hero-copy .hero-lede {
    max-width: min(27em, 33vw);
  }

  .hero-title {
    font-size: clamp(104px, 10.5vw, 158px);
    line-height: 1.06;
    margin-bottom: 26px;
  }
}

/* ---------- Home: sections ---------- */

.section {
  padding-block: clamp(72px, 10vw, 148px);
}

.section--tint {
  background: var(--bg-tint);
}

.section--flush {
  padding-top: 0;
}

.section-title {
  font-size: clamp(42px, 5.6vw, 84px);
}

.section-sub {
  max-width: 34em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.4;
}

/* ---------- Home: tour ---------- */

.tour-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.tour-tabs {
  display: flex;
  gap: 6px;
  margin: 28px calc(var(--gutter) * -1) 0;
  padding: 2px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.tour-tabs::-webkit-scrollbar {
  display: none;
}

.tour-tab {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tour-tab b {
  font-weight: inherit;
}

.tour-tab small {
  display: none;
}

.tour-tab[aria-pressed="true"] {
  border-color: transparent;
  background: var(--fill);
  color: var(--on-fill);
}

.tour-tab:focus-visible {
  border-radius: 999px;
}

.tour-note {
  min-height: 3.2em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.tour-stage {
  display: flex;
  justify-content: center;
}

html:not(.js) .m-nav button {
  pointer-events: none;
}

html:not(.js) .tour-tab small {
  grid-template-rows: 1fr;
  opacity: 1;
}

@media (min-width: 960px) {
  .tour-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 72px;
    align-items: center;
  }

  .tour-tabs {
    flex-direction: column;
    gap: 0;
    margin: 40px 0 0;
    padding: 0;
    overflow: visible;
    border-top: 1px solid var(--divider);
  }

  .tour-tab {
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    min-height: 0;
    padding: 20px 8px;
    border: 0;
    border-bottom: 1px solid var(--divider);
    border-radius: 0;
    background: none;
    transition: padding 0.25s var(--ease-out);
  }

  .tour-tab .icon {
    margin-top: 4px;
    color: var(--accent-text);
  }

  .tour-tab b {
    display: block;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -0.03em;
    transition: color 0.2s ease;
  }

  .tour-tab small {
    display: grid;
    grid-template-rows: 0fr;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.32;
    opacity: 0;
    transition: grid-template-rows 0.35s var(--ease-out), opacity 0.3s ease, margin 0.3s ease;
  }

  .tour-tab small > span {
    overflow: hidden;
  }

  .tour-tab:hover b {
    color: var(--ink);
  }

  .tour-tab[aria-pressed="true"] {
    background: none;
    color: var(--ink);
    padding-left: 14px;
  }

  .tour-tab[aria-pressed="true"] b {
    color: var(--ink);
  }

  .tour-tab[aria-pressed="true"] small {
    grid-template-rows: 1fr;
    margin-top: 6px;
    opacity: 1;
  }

  .tour-tab:focus-visible {
    border-radius: 12px;
  }

  .tour-note {
    display: none;
  }
}

/* ---------- Home: chapters ---------- */

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.chapter + .chapter {
  margin-top: clamp(88px, 12vw, 176px);
}

.chapter-title {
  margin-bottom: 18px;
  font-size: clamp(54px, 7vw, 104px);
  line-height: 1.06;
}

.chapter-lede {
  max-width: 28em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.4;
}

.ticks {
  display: grid;
  gap: 18px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 14px;
}

.ticks .tick-ico {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
}

.ticks .icon {
  width: 18px;
  height: 18px;
}

.ticks strong {
  font-size: 16px;
  line-height: 1.25;
}

.ticks p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.32;
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.topic-cloud li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.topic-cloud .icon {
  width: 15px;
  height: 15px;
  color: var(--accent-text);
}

.stage {
  --s: 0.62;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 44px;
  min-width: 0;
}

.stage-photo {
  position: absolute;
  inset: 0 0 56px;
  width: 100%;
  height: calc(100% - 56px);
  border-radius: var(--radius-3xl);
  object-fit: cover;
  filter: var(--photo-dim);
}

.stage .phone {
  z-index: 1;
}

.stage--pair .phone + .phone {
  margin: 44px 0 0 -60px;
  z-index: 2;
}

.stage--pair {
  --s: 0.48;
}

@media (max-width: 359px) {
  .stage {
    --s: 0.58;
  }

  .stage--pair {
    --s: 0.4;
  }
}

@media (min-width: 400px) {
  .stage {
    --s: 0.68;
  }

  .stage--pair {
    --s: 0.52;
  }

  .stage--pair .phone + .phone {
    margin-left: -66px;
  }
}

@media (min-width: 760px) {
  .stage {
    --s: 0.74;
    padding-top: 64px;
  }

  .stage--pair {
    --s: 0.66;
  }

  .stage--pair .phone + .phone {
    margin-left: -30px;
    margin-top: 64px;
  }
}

@media (min-width: 1040px) {
  .chapter {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6vw, 96px);
  }

  .chapter--flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .chapter--flip .chapter-copy {
    order: 2;
  }

  .stage {
    --s: 0.8;
    padding-top: 72px;
  }

  .stage--pair {
    --s: 0.68;
  }
}

/* ---------- Home: bento ---------- */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 44px;
}

.tile {
  position: relative;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 28px;
  background: var(--paper);
}

.tile h3 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.tile > p {
  margin: 8px 0 0;
  max-width: 32em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.32;
}

.tile-demo {
  margin-top: 22px;
}

@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tile--3 {
    grid-column: span 3;
  }

  .tile--2 {
    grid-column: span 3;
  }

  .tile--4 {
    grid-column: span 6;
  }
}

@media (min-width: 1080px) {
  .tile {
    padding: 30px;
  }

  .tile--2 {
    grid-column: span 2;
  }

  .tile--4 {
    grid-column: span 4;
  }
}

.demo-rows {
  display: grid;
  gap: 8px;
}

.demo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--divider);
}

.demo-row img {
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 13px;
  object-fit: cover;
}

.demo-row b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.demo-row small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

.demo-row time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
}

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

.pills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.pills li.is-on {
  background: var(--fill);
  color: var(--on-fill);
}

.pills .icon {
  width: 16px;
  height: 16px;
}

.demo-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.demo-photos figure {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--divider);
  border-radius: 18px;
  background: var(--bg);
}

.demo-photos figcaption {
  padding: 2px 4px 7px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}

.demo-photos small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.demo-photos img {
  width: 100%;
  aspect-ratio: 1 / 0.9;
  border-radius: 12px;
  object-fit: cover;
}

.lang-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.lang-wall li:nth-child(3n + 1) {
  color: var(--ink);
}

.theme-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 20px;
}

.theme-split > div {
  padding: 16px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.theme-split small {
  display: block;
  margin-top: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  letter-spacing: -0.3px;
}

.theme-split .is-light {
  background: #f8f7f2;
  color: #102321;
}

.theme-split .is-dark {
  background: #101a16;
  color: #f1f2e9;
}

/* ---------- Home: Pro ---------- */

.pro {
  position: relative;
  overflow: hidden;
  padding: 44px 22px 26px;
  border-radius: 36px;
  background: #173f35;
  color: #d9dfd4;
}

:root[data-theme="dark"] .pro {
  background: #1b2922;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pro {
    background: #1b2922;
  }
}

.pro .kicker {
  color: #b8d79a;
}

.pro-title {
  color: #f8f7f2;
  font-size: clamp(54px, 8vw, 118px);
  line-height: 1.06;
}

.pro-sub {
  margin: 18px 0 0;
  color: #d3dccf;
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.4;
}

.pro-art {
  display: block;
  width: min(78%, 330px);
  margin: 0 auto 8px;
  /* The pedestal fades out instead of ending on a hard edge. */
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 74%, transparent 96%);
}

.pro-list {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: #f1f2e9;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

.pro-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pro-list .icon {
  color: #b8d79a;
  margin-top: 2px;
}

.pro-facts {
  display: grid;
  gap: 0;
  margin: 26px 0 0;
  border-top: 1px solid rgb(241 242 233 / 0.16);
}

.pro-facts > div {
  padding: 16px 0;
  border-bottom: 1px solid rgb(241 242 233 / 0.16);
}

.pro-facts dt {
  color: #f8f7f2;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.pro-facts dd {
  margin: 5px 0 0;
  color: #c5d0c2;
  font-size: 14px;
  line-height: 1.32;
}

.pro-note {
  margin: 18px 0 0;
  color: #b8c4b9;
  font-size: 12.5px;
  line-height: 1.3;
}

.pro-note a {
  color: #f1f2e9;
}

@media (min-width: 960px) {
  /* The plant grows up out of the panel; the facts run along its base. */
  .pro {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 48px 40px;
    overflow: visible;
    padding: 72px 72px 56px;
    border-radius: 48px;
  }

  .pro-copy {
    grid-area: 1 / 1;
  }

  .pro-art {
    grid-area: 1 / 2;
    align-self: end;
    justify-self: end;
    width: 100%;
    max-width: 420px;
    margin: -150px 0 -24px;
    pointer-events: none;
  }

  .pro-details {
    grid-column: 1 / -1;
  }

  .pro-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
    padding-top: 24px;
  }

  .pro-facts > div {
    padding: 0;
    border: 0;
  }
}

/* ---------- Home: trust ---------- */

.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--divider);
}

.trust-grid > div {
  padding: 22px 0;
  border-bottom: 1px solid var(--divider);
}

.trust-grid h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.trust-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.32;
}

@media (min-width: 760px) {
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }
}

@media (min-width: 1080px) {
  .trust-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trust-grid > div {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

.fine-print {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

/* ---------- Questions (home and support) ---------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

@media (min-width: 960px) {
  .faq-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }
}

.qa-list {
  border-top: 1px solid var(--divider);
}

.qa {
  border-bottom: 1px solid var(--divider);
  scroll-margin-top: 56px;
}

.qa summary {
  position: relative;
  display: block;
  padding: 18px 44px 18px 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

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

.qa summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.8px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.8px 100% no-repeat;
  color: var(--accent-text);
  transition: transform 0.25s var(--ease-out);
}

.qa[open] summary::after {
  transform: rotate(135deg);
}

.qa summary:focus-visible {
  border-radius: 8px;
}

.qa-body {
  padding: 0 28px 22px 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.qa-body p {
  margin: 0 0 10px;
}

.qa-body > :last-child {
  margin-bottom: 0;
}

.qa-body ol,
.qa-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.qa-body li {
  margin-bottom: 5px;
}

.path {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Home: closing call to action ---------- */

.closer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  overflow: hidden;
  padding: 44px 22px 0;
  border-radius: 36px;
  background: var(--card-sage);
}

.closer h2 {
  font-size: clamp(54px, 8vw, 118px);
  line-height: 1.06;
}

.closer p {
  max-width: 26em;
  margin: 16px 0 26px;
  color: var(--muted);
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.4;
}

.closer img {
  justify-self: center;
  width: min(84%, 360px);
  margin-bottom: -28px;
}

@media (min-width: 860px) {
  .closer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
    padding: 72px 72px 0;
    border-radius: 48px;
  }

  .closer > div {
    padding-bottom: 72px;
  }

  .closer img {
    justify-self: end;
    align-self: end;
    width: 100%;
    max-width: 440px;
    margin-bottom: -56px;
  }
}

/* ---------- Phone frame ---------- */

/*
 * Screens are laid out at the app's own 393 x 852 points and scaled with --s,
 * so sizes below read one-to-one against the Flutter code. The screen follows
 * the page's theme, as the app follows the device.
 */
.phone {
  --s: 0.7;
  --bz: calc(11px * var(--s));
  position: relative;
  flex: none;
  width: calc(393px * var(--s) + var(--bz) * 2);
  height: calc(852px * var(--s) + var(--bz) * 2);
  padding: var(--bz);
  border-radius: calc(66px * var(--s));
  background: #0c1311;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14), var(--shadow-phone);
}

.stage .phone,
.tour-stage .phone {
  --s: inherit;
}

.tour-stage {
  --s: 0.66;
}

@media (min-width: 360px) {
  .tour-stage {
    --s: 0.74;
  }
}

@media (min-width: 400px) {
  .tour-stage {
    --s: 0.82;
  }
}

@media (min-width: 960px) {
  .tour-stage {
    --s: 0.9;
  }
}

.phone-view {
  position: relative;
  width: calc(393px * var(--s));
  height: calc(852px * var(--s));
  overflow: hidden;
  border-radius: calc(55px * var(--s));
  background: var(--bg);
  isolation: isolate;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 393px;
  height: 852px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.3px;
  transform: scale(var(--s));
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-select: none;
}

.screen[hidden] {
  display: none;
}

.screen .icon {
  stroke-width: 1.9;
}

.m-status {
  position: relative;
  z-index: 4;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 12px 32px 0 42px;
  font-size: 16px;
  font-weight: 600;
}

.m-status::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 122px;
  height: 35px;
  border-radius: 20px;
  background: #000;
  transform: translateX(-50%);
}

.m-status svg {
  height: 13px;
  width: auto;
  fill: currentColor;
}

.m-status span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.m-body {
  flex: 1;
  min-height: 0;
  padding: 0 20px;
  overflow: hidden;
}

.m-home-bar {
  position: absolute;
  bottom: 9px;
  left: 50%;
  z-index: 5;
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
  transform: translateX(-50%);
}

.m-serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.m-muted {
  color: var(--muted);
}

.m-italic {
  color: var(--subtle);
  font-style: italic;
}

.m-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1;
  letter-spacing: -1.1px;
}

.m-logo svg {
  width: 27px;
  height: 27px;
  color: var(--sage-ink);
  fill: currentColor;
}

.m-row {
  display: flex;
  align-items: center;
}

.m-grow {
  flex: 1;
  min-width: 0;
}

.m-card {
  border-radius: 20px;
  background: var(--paper);
}

.m-card--line {
  border: 1px solid var(--divider);
}

.m-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--fill), var(--fill-end));
  color: var(--on-fill);
  font-size: 14.5px;
  font-weight: 600;
}

.m-btn--line {
  border: 1.5px solid var(--ink);
  background: none;
  color: var(--ink);
}

.m-back {
  display: flex;
  align-items: center;
  height: 44px;
  margin: 0 -6px 8px;
}

.m-back .m-title {
  flex: 1;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -0.03em;
  text-align: center;
}

.m-seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 16px;
  background: var(--chip);
  font-size: 13.5px;
  font-weight: 500;
}

.m-seg span {
  flex: 1;
  padding: 9px 4px;
  border-radius: 13px;
  text-align: center;
  white-space: nowrap;
}

.m-seg .is-on {
  background: var(--fill);
  color: var(--on-fill);
}

.m-search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--chip);
  color: var(--muted);
  font-size: 14.5px;
}

.m-search .icon {
  width: 18px;
  height: 18px;
  color: var(--ink);
}

.m-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 10px;
  border: 1px solid var(--divider);
  border-radius: 13px;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.m-pill .icon {
  width: 13px;
  height: 13px;
}

.m-pill--warn {
  border-color: rgb(224 144 47 / 0.32);
  background: var(--warn-bg);
  color: var(--warn);
}

.m-pill--bad {
  border-color: transparent;
  background: var(--danger-bg);
  color: var(--danger);
}

.m-pill--soft {
  border-color: transparent;
  background: var(--chip);
  color: var(--ink);
}

.m-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.m-thumb {
  flex: none;
  border-radius: 12px;
  object-fit: cover;
}

/* Bottom navigation: the app's floating bar with the raised scan button. */
.m-nav {
  position: absolute;
  right: 12px;
  bottom: 22px;
  left: 12px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  height: 66px;
  padding: 0 4px 7px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--divider), 0 14px 26px -16px rgb(16 35 33 / 0.5);
}

.m-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.m-nav button:focus-visible {
  border-radius: 12px;
}

.m-nav .icon {
  width: 24px;
  height: 24px;
}

.m-nav button[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
}

.m-nav button[aria-current="true"] .icon {
  color: var(--accent);
  fill: var(--accent-soft-strong);
}

.m-nav .m-nav-scan i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: -20px 0 1px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fill), var(--fill-end));
  color: var(--on-fill);
}

.m-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--fill);
  color: var(--on-fill);
}

.m-panel {
  position: absolute;
  inset: 58px 0 0;
  display: flex;
  flex-direction: column;
  padding: 0 20px 110px;
  overflow: hidden;
  background: var(--bg);
}

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

.scroll-motion .m-panel:not([hidden]) {
  animation: panel-in 0.38s var(--ease-out) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.m-panel--scan {
  z-index: 3;
  padding: 0;
}

.screen[data-tab="scan"] .m-nav {
  display: none;
}

/* Home */
.m-know {
  position: relative;
  height: 150px;
  overflow: hidden;
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--card-sage);
}

.m-know img {
  position: absolute;
  right: 4px;
  bottom: -12px;
  width: 130px;
}

.m-tile {
  flex: 1;
  min-width: 0;
  height: 130px;
  padding: 14px;
  border: 1px solid var(--divider);
  border-radius: 20px;
}

.m-tile b {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}

.m-tile small {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.25;
}

/* Lists */
.m-listrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 18px;
  background: var(--paper);
}

/* Garden */
.m-plants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.m-plant {
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 20px;
  background: var(--paper);
}

.m-plant img {
  width: 100%;
  height: 108px;
  object-fit: cover;
}

.m-plant > div {
  padding: 10px 12px 12px;
}

.m-plant b {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
}

.m-plant small {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 1px 0 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.m-plant small .icon {
  width: 13px;
  height: 13px;
}

/* Scan */
.m-scan {
  position: relative;
  flex: 1;
  min-height: 0;
}

.m-scan img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-scan .viewfinder i {
  width: 40px;
  height: 40px;
  border-color: #fff;
  animation: none;
}

.m-hint {
  position: absolute;
  right: 42px;
  bottom: 32px;
  left: 42px;
  padding: 9px 14px;
  border-radius: 24px;
  background: rgb(16 35 33 / 0.6);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.m-hint small {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
}

.m-shutter {
  width: 76px;
  height: 76px;
  border: 4px solid var(--fill);
  border-radius: 50%;
  background: var(--surface);
}

.m-round {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--chip);
}

/* Results */
.m-hero-img {
  width: 100%;
  height: 124px;
  border-radius: 18px;
  object-fit: cover;
}

.m-section {
  margin: 16px 0 8px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.m-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--warn-bg);
}

.m-alert i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--warn-dot);
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
}

.m-score {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--warn-dot) 56%, var(--chip) 0);
  font-size: 17px;
  font-weight: 700;
}

.m-score::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.m-score span {
  position: relative;
}

.m-sign {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--chip);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.m-sign img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.m-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 13.5px;
}

.m-step i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--chip);
  font-family: var(--serif);
  font-size: 15px;
  font-style: normal;
}

.m-facts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.m-facts > div {
  padding: 11px;
  border-radius: 16px;
  background: var(--paper);
}

.m-facts .icon {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.m-facts small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.m-facts b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}

.m-guide-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--divider);
  font-size: 14.5px;
  font-weight: 500;
}

.m-guide-row .icon {
  width: 19px;
  height: 19px;
  color: var(--accent-text);
}

.m-guide-row .m-chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
}

/* Rescue */
.m-days {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.m-days span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chip);
  font-size: 12px;
}

.m-days .is-on {
  background: var(--fill);
  color: var(--on-fill);
  font-weight: 600;
}

.m-bar {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--chip);
}

.m-bar i {
  display: block;
  width: 21%;
  height: 100%;
  border-radius: 4px;
  background: var(--fill);
}

.m-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--divider);
  font-size: 14px;
}

.m-task:first-child {
  border-top: 0;
}

.m-check {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1.6px solid var(--muted);
  border-radius: 50%;
}

.m-check.is-done {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: var(--accent);
  color: var(--accent);
}

.m-check .icon {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

/* Calendar */
.m-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 12px;
  text-align: center;
}

.m-week span {
  padding: 8px 0;
  border-radius: 14px;
  font-size: 11.5px;
}

.m-week b {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 500;
}

.m-week .is-on {
  background: var(--fill);
  color: var(--on-fill);
}

/* Assistant */
.m-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.38;
}

.m-bubble--me {
  align-self: flex-end;
  background: var(--fill);
  color: var(--on-fill);
}

.m-bubble--ai {
  background: var(--chip);
  color: var(--ink);
}

.m-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-ai-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.m-ai-av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--chip);
  color: var(--sage-ink);
}

.m-ai-av svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.m-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 0 36px;
  color: var(--muted);
  font-size: 12px;
}

.m-tools span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.m-tools .icon {
  width: 14px;
  height: 14px;
}

.m-input {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 8px 0 16px;
  border-radius: 27px;
  background: var(--chip);
  color: var(--muted);
  font-size: 14.5px;
}

.m-input > .icon {
  color: var(--ink);
}

.m-input i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--placeholder);
  color: var(--muted);
}

.m-suggest {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  margin-top: 8px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--chip);
  font-size: 14px;
}

.m-suggest .icon:first-child {
  color: var(--accent);
}

.m-suggest .m-chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
}

/* Reminder form */
.m-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-top: 1px solid var(--divider);
  font-size: 14.5px;
}

.m-form-row:first-child {
  border-top: 0;
}

.m-form-row > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 13.5px;
}

.m-toggle {
  width: 46px;
  height: 28px;
  margin-left: auto;
  padding: 3px;
  border-radius: 14px;
  background: var(--fill);
}

.m-toggle::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin-left: 18px;
  border-radius: 50%;
  background: var(--on-fill);
}

/* ---------- Support ---------- */

.support-hero .container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding-block: 32px 44px;
}

.support-title {
  font-size: clamp(60px, 9vw, 128px);
  line-height: 1.06;
}

.support-lede {
  max-width: 30em;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.4;
}

.support-art {
  display: none;
}

@media (min-width: 900px) {
  .support-hero .container {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: center;
    padding-block: 64px 72px;
  }

  .support-art {
    display: block;
    width: 100%;
  }
}

.qa-search {
  position: relative;
  max-width: 560px;
}

.qa-search .icon {
  position: absolute;
  top: 50%;
  left: 20px;
  margin-top: -10px;
  color: var(--muted);
  pointer-events: none;
}

.qa-search input {
  width: 100%;
  height: 58px;
  padding: 0 20px 0 52px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--chip);
  color: var(--ink);
  font: 400 16px/1.2 var(--font);
  appearance: none;
  -webkit-appearance: none;
}

.qa-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.qa-search input:focus {
  border-color: var(--accent);
  outline: none;
}

.qa-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.qa-count {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.quick-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 620px) {
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quick {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px 14px 14px;
  border: 1px solid var(--divider);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.quick:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.quick:focus-visible {
  border-radius: 22px;
}

.quick > i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
}

.quick .m-chev {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--muted);
}

.topic-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  margin: 0 calc(var(--gutter) * -1);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
}

.topic-nav ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 10px var(--gutter);
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.topic-nav ul::-webkit-scrollbar {
  display: none;
}

.topic-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.topic-nav a.is-active {
  background: var(--fill);
  color: var(--on-fill);
}

.topic-nav a:focus-visible {
  border-radius: 999px;
}

.qa-group {
  padding-top: 44px;
  scroll-margin-top: 40px;
}

.qa-group[hidden] {
  display: none;
}

.qa-group h2 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.qa-empty {
  margin-top: 32px;
  padding: 26px 22px;
  border-radius: 24px;
  background: var(--chip);
}

.qa-empty h2 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.qa-empty p {
  margin: 8px 0 16px;
  color: var(--muted);
}

.safety-note {
  display: flex;
  gap: 14px;
  margin-top: 44px;
  padding: 20px;
  border-radius: 22px;
  background: var(--warn-bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.safety-note .icon {
  margin-top: 2px;
  color: var(--warn);
}

.contact-grid {
  display: grid;
  gap: 12px;
  margin-top: 36px;
}

@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.contact-way {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 20px;
  border: 1px solid var(--divider);
  border-radius: 28px;
  background: var(--paper);
}

.contact-way h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.contact-way p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.32;
}

.contact-way .btn {
  margin-top: auto;
  max-width: 100%;
  padding-inline: 18px;
  font-size: 14.5px;
}

.contact-steps {
  margin: 0 0 20px;
  padding: 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  list-style: none;
}

.contact-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.contact-steps .icon {
  color: var(--accent-text);
}

.contact-steps .m-chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

/* ---------- Legal hero ---------- */

.legal-hero .container {
  position: relative;
  padding-block: 32px 28px;
}

@media (min-width: 768px) {
  .legal-hero .container {
    padding-block: 72px 56px;
  }
}

.doc-badge {
  display: none;
}

.page-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(50px, 8vw, 104px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 30em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.4;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 18px 0 0;
  font-size: 12.5px;
}

.meta-row > div {
  display: flex;
  gap: 8px;
}

.meta-row dt {
  color: var(--muted);
}

.meta-row dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Legal layout & table of contents ---------- */

.legal-layout {
  padding-block: 0 72px;
}

@media (min-width: 1024px) {
  .legal-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 760px);
    gap: 72px;
    align-items: start;
    padding-block: 24px 120px;
  }
}

.toc {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  margin: 0 calc(var(--gutter) * -1) 8px;
}

.toc summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--toc-bar-h);
  padding: 0 var(--gutter);
  border-block: 1px solid var(--divider);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

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

.toc summary .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.toc-current {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.toc-current:not(:empty)::before {
  content: "· ";
}

.toc .toc-chevron {
  transition: transform 0.2s ease;
}

.toc details[open] .toc-chevron {
  transform: rotate(180deg);
}

.toc-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: var(--gutter);
  right: var(--gutter);
  max-height: min(70vh, 540px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  animation: pop 0.18s var(--ease-out);
}

.toc-title {
  display: none;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.toc a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.toc a .n {
  min-width: 1.7em;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.toc a.is-active {
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: 600;
}

.toc a.is-active .n {
  color: var(--accent-text);
}

.toc-foot {
  display: none;
}

@media (min-width: 1024px) {
  .toc {
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    margin: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .js .toc summary {
    display: none;
  }

  .toc-panel {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    animation: none;
  }

  .toc-title {
    display: block;
    margin: 0 0 10px 12px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
  }

  .toc a {
    min-height: 0;
    padding: 7px 12px;
    font-size: 14px;
  }

  .toc-foot {
    display: grid;
    gap: 2px;
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--divider);
  }

  .toc-foot a {
    gap: 10px;
    align-items: center;
    color: var(--muted);
  }

  .toc-foot .icon {
    width: 16px;
    height: 16px;
  }
}

/* ---------- Legal document ---------- */

.legal-doc {
  min-width: 0;
  padding-top: 24px;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.45;
}

@media (min-width: 768px) {
  .legal-doc {
    padding-top: 8px;
    font-size: 14.5px;
  }
}

.legal-doc p {
  margin: 0 0 16px;
}

.legal-doc .doc-intro {
  margin: 0;
  color: var(--ink);
  font-size: 1em;
  line-height: 1.45;
}

.legal-doc h2 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.legal-doc h3 {
  margin: 28px 0 8px;
  color: var(--ink);
  font-size: 1em;
  font-weight: 600;
  line-height: 1.25;
}

.legal-doc ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.legal-doc ul > li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 22px;
}

.legal-doc ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage-ink);
}

.legal-doc ul ul {
  margin: 10px 0 0;
}

.legal-doc > :last-child,
.doc-section > :last-child {
  margin-bottom: 0;
}

.doc-section {
  padding-block: 36px;
  border-top: 1px solid var(--divider);
  scroll-margin-top: var(--toc-bar-h);
}

@media (min-width: 768px) {
  .doc-section {
    padding-block: 48px;
  }
}

@media (min-width: 1024px) {
  .doc-section {
    scroll-margin-top: 0;
  }
}

.glance + .doc-section {
  border-top: 0;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.sec-head h2 {
  flex: 1;
  min-width: 0;
}

.sec-num {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-text);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1.4px;
}

.anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.anchor .icon {
  width: 16px;
  height: 16px;
}

.sec-head:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

.anchor:hover {
  color: var(--accent-text);
  background: var(--accent-soft);
}

@media (hover: none) {
  .anchor {
    display: none;
  }
}

/* "At a glance" summary */
.glance {
  margin: 24px 0 4px;
  padding: 22px 20px;
  border-radius: var(--radius-2xl);
  background: var(--chip);
}

@media (min-width: 768px) {
  .glance {
    margin-top: 32px;
    padding: 30px 32px;
    border-radius: 28px;
  }
}

.glance h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.glance .glance-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12.5px;
}

.glance ul {
  display: grid;
  gap: 16px;
  margin: 0;
}

.glance ul > li {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.4;
}

.glance ul > li::before {
  content: none;
}

.glance .glance-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
}

.glance .glance-ico .icon {
  width: 17px;
  height: 17px;
}

/* Callouts */
.callout {
  margin: 24px 0;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--chip);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px !important;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
}

.callout-title .icon {
  margin-top: 2px;
  color: var(--accent);
}

.callout--key {
  background: var(--warn-bg);
}

.callout--key .callout-title .icon {
  color: var(--warn);
}

.callout--key p {
  color: var(--ink);
}

/* Third-party services */
.vendors {
  margin: 8px 0 20px;
  border-top: 1px solid var(--divider);
}

.vendors > div {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--divider);
}

@media (min-width: 768px) {
  .vendors > div {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 4px 24px;
  }
}

.vendors dt {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
}

.vendors dt span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
}

.vendors dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.vendors dd a {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Contact card */
.contact-card {
  display: grid;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 22px;
  border-radius: var(--radius-2xl);
  background: var(--chip);
}

.contact-card .contact-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--sage-ink);
}

.contact-card .contact-ico svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

@media (min-width: 640px) {
  .contact-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    padding: 28px;
  }
}

.contact-card .contact-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.contact-card p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.32;
}

.contact-card .btn {
  max-width: 100%;
}

.legal-doc address {
  font-style: normal;
}

.doc-end {
  margin: 0;
  padding: 24px 0 8px;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 12.5px;
}

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

.error-page {
  display: grid;
  gap: 8px;
  place-items: center start;
  padding-block: 56px 96px;
}

.error-page .error-code {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.error-page h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(50px, 8vw, 96px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.error-page p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-art {
  width: min(70%, 320px);
  margin-top: 20px;
}

@media (min-width: 860px) {
  .error-page {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    padding-block: 96px 128px;
  }

  .error-art {
    width: 100%;
    margin: 0;
  }
}

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

.site-footer {
  overflow: hidden;
  border-top: 1px solid var(--divider);
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-block: 44px 24px;
}

.footer-brand p {
  max-width: 24em;
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.32;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}

.footer-cols h2 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

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

.footer-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  font-size: 12.5px;
}

.footer-bottom p {
  margin: 0;
}

.footer-word {
  display: block;
  margin: 12px 0 -0.2em;
  color: var(--placeholder);
  font-family: var(--serif);
  font-size: clamp(110px, 27vw, 400px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

@media (min-width: 860px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    padding-block: 64px 24px;
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }
}

/* ---------- In-app: the page inside the app's browser sheet ---------- */

/*
 * The sheet (frontend/lib/core/services/presenter/ui/web_view.dart) already
 * shows a title, close button, back button and host line, so the site's own
 * chrome goes away. The opening matches the sheet's loading skeleton (a 52 pt
 * badge at 24/28 pt padding), so the page dissolves in without a jump.
 */
.in-app {
  --header-h: 0px;
  --gutter: 24px;
  scroll-padding-top: 64px;
}

.in-app .site-header,
.in-app .site-footer,
.in-app .skip-link,
.in-app .anchor,
.in-app .toc-foot,
.in-app .hide-in-app {
  display: none !important;
}

.in-app body {
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.in-app .reveal {
  animation: none;
}

.in-app .legal-hero .container {
  padding: 28px var(--gutter) 22px;
}

.in-app .doc-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
}

/* The sheet's header already names the document. */
.in-app .page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.in-app .lede {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.in-app .meta-row {
  margin-top: 12px;
  font-size: 12.5px;
}

.in-app .toc {
  top: 0;
}

.in-app .toc summary {
  min-height: 48px;
  background: var(--bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.in-app .legal-layout {
  display: block;
  padding-block: 0 40px;
}

.in-app .legal-doc {
  padding-top: 22px;
  font-size: 14.5px;
}

.in-app .doc-section {
  padding-block: 32px;
  scroll-margin-top: 0;
}

.in-app .doc-end {
  padding-bottom: 0;
}

.in-app .vendors > div {
  grid-template-columns: minmax(0, 1fr);
}

.in-app .contact-card {
  grid-template-columns: minmax(0, 1fr);
}

/* Tablets: the sheet caps at 760 pt, so the document stays one column. */
.in-app .toc-panel {
  position: absolute;
  max-height: min(70vh, 540px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--divider);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.in-app .toc-title {
  display: none;
}

.in-app .toc {
  max-height: none;
  margin: 0 calc(var(--gutter) * -1) 8px;
  overflow: visible;
}

.in-app .toc summary {
  display: flex;
}

.in-app .support-hero .container {
  display: block;
  padding-block: 28px 24px;
}

.in-app .support-art {
  display: none;
}

.in-app .support-title {
  font-size: 40px;
}

/* ---------- Toast (copy link feedback) ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 60;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  animation: rise 0.7s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 80ms);
}

/* Set by site.js, so a failed script never leaves content hidden. */
.scroll-motion .rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}

.scroll-motion .rise.is-in {
  opacity: 1;
  transform: none;
}

/* Applied by site.js for the length of a theme switch only. */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition-property: background-color, color, border-color, fill, stroke, box-shadow, opacity, transform !important;
  transition-duration: 0.3s !important;
  transition-timing-function: ease !important;
  transition-delay: 0s !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */

@media print {
  :root:root:root {
    color-scheme: light;
    --bg: #fff;
    --bg-tint: #fff;
    --paper: #fff;
    --surface: #fff;
    --chip: #f5f5f5;
    --ink: #000;
    --body: #111;
    --muted: #444;
    --divider: #ccc;
    --border-strong: #999;
    --accent: #000;
    --accent-text: #000;
    --sage-ink: #000;
    --accent-soft: transparent;
    --accent-soft-strong: #ccc;
    --warn-bg: #f5f5f5;
    --shadow-card: none;
    --shadow-pop: none;
  }

  .site-header,
  .toc,
  .site-footer,
  .skip-link,
  .anchor,
  .toast {
    display: none !important;
  }

  .legal-hero .container {
    padding-block: 0 16px;
  }

  .legal-layout {
    display: block;
    padding-block: 0;
  }

  .legal-doc {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 14.5px;
  }

  .doc-section {
    padding-block: 16px;
    break-inside: auto;
  }

  .sec-head {
    break-after: avoid;
  }

  .legal-doc a[href^="http"]::after,
  .legal-doc a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
  }

  .reveal {
    animation: none;
  }

  .scroll-motion .rise {
    opacity: 1;
    transform: none;
  }
}
