/* Nhiệm Vụ Của Con — shared stylesheet
   Layout: warm off-white ground with soft yellow (top-left) and mint (bottom-right) glows;
   one hero with tablet + phone frames, then calm sections built from the app's own cards. */

:root {
  /* Ground & surfaces */
  --bg: #FBF8F2;
  --glow-yellow: #FFF0C2;
  --glow-mint: #DFF5EC;
  --surface: #FFFFFF;
  --surface-alt: #F5F7FB;
  --line: #E9ECF1;

  /* Text */
  --ink: #1F2A44;
  --fg: #4A566C;
  --ink-muted: #667189;

  /* Amber (primary) */
  --amber: #FFC94A;
  --amber-hover: #FFBE2E;
  --amber-deep: #F2A516;
  --amber-soft: #FFF3D6;
  --amber-ink: #8A5A00;
  --on-amber: #1F2A44;
  --marker: #FFDB7A;

  /* Status colors */
  --green: #2EB67D;
  --green-soft: #E6F6EE;
  --green-ink: #1E7A53;
  --orange: #F59E3D;
  --orange-soft: #FFEEDD;
  --orange-ink: #9A5410;
  --red: #E5484D;
  --red-soft: #FDECEC;
  --red-ink: #B4262B;
  --info-soft: #E4F2FD;
  --info-ink: #2F5D86;

  /* Mode cards */
  --child-a: #FFE2A1;
  --child-b: #FFF1CF;
  --parent-a: #DCEBFF;
  --parent-b: #EEF6FF;

  /* Device frames */
  --device: #1F2A44;
  --device-edge: #2E3A57;
  --screen: #FFFFFF;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(31, 42, 68, 0.05), 0 6px 18px rgba(31, 42, 68, 0.06);
  --shadow-md: 0 2px 4px rgba(31, 42, 68, 0.04), 0 16px 40px -12px rgba(31, 42, 68, 0.16);
  --shadow-lg: 0 30px 70px -24px rgba(31, 42, 68, 0.38);
  --focus: #1F2A44;

  /* Type */
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lead: 1.1875rem;
  --fs-h3: 1.1875rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.35rem + 3.6vw, 3.75rem);

  /* Shape & rhythm */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --section-pad: clamp(56px, 8vw, 104px);
  --measure: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141925;
    --glow-yellow: rgba(255, 190, 70, 0.13);
    --glow-mint: rgba(72, 196, 156, 0.10);
    --surface: #1C2332;
    --surface-alt: #222A3B;
    --line: #2C3546;
    --ink: #F4EFE6;
    --fg: #C9CFDA;
    --ink-muted: #9AA4B5;
    --amber: #FFC94A;
    --amber-hover: #FFD46E;
    --amber-deep: #FFBF3D;
    --amber-soft: #3A3018;
    --amber-ink: #FFD88A;
    --on-amber: #1F2A44;
    --marker: rgba(255, 201, 74, 0.30);
    --green: #3DCB8F;
    --green-soft: #17302A;
    --green-ink: #7FE0B4;
    --orange: #F7AA55;
    --orange-soft: #382818;
    --orange-ink: #FFC48A;
    --red: #F2696D;
    --red-soft: #3A1E23;
    --red-ink: #FF9EA1;
    --info-soft: #1B2B40;
    --info-ink: #A9CFF2;
    --child-a: #4A3B1C;
    --child-b: #2E2A20;
    --parent-a: #1E3456;
    --parent-b: #1B2638;
    --device: #0B0F17;
    --device-edge: #3A4458;
    --screen: #1C2332;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 6px 18px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 18px 44px -14px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.70);
    --focus: #FFC94A;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141925;
  --glow-yellow: rgba(255, 190, 70, 0.13);
  --glow-mint: rgba(72, 196, 156, 0.10);
  --surface: #1C2332;
  --surface-alt: #222A3B;
  --line: #2C3546;
  --ink: #F4EFE6;
  --fg: #C9CFDA;
  --ink-muted: #9AA4B5;
  --amber: #FFC94A;
  --amber-hover: #FFD46E;
  --amber-deep: #FFBF3D;
  --amber-soft: #3A3018;
  --amber-ink: #FFD88A;
  --on-amber: #1F2A44;
  --marker: rgba(255, 201, 74, 0.30);
  --green: #3DCB8F;
  --green-soft: #17302A;
  --green-ink: #7FE0B4;
  --orange: #F7AA55;
  --orange-soft: #382818;
  --orange-ink: #FFC48A;
  --red: #F2696D;
  --red-soft: #3A1E23;
  --red-ink: #FF9EA1;
  --info-soft: #1B2B40;
  --info-ink: #A9CFF2;
  --child-a: #4A3B1C;
  --child-b: #2E2A20;
  --parent-a: #1E3456;
  --parent-b: #1B2638;
  --device: #0B0F17;
  --device-edge: #3A4458;
  --screen: #1C2332;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 6px 18px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 18px 44px -14px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.70);
  --focus: #FFC94A;
  color-scheme: dark;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
  font-weight: 800;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
  max-width: var(--measure);
}

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

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

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

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: -100px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
}

/* Soft glows from the app's background */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at -8% -10%, var(--glow-yellow), transparent 70%),
    radial-gradient(55vmax 45vmax at 108% 110%, var(--glow-mint), transparent 70%);
}

.site {
  position: relative;
  z-index: 1;
}

/* Side gutter on every outer wrapper */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.section {
  padding-block: var(--section-pad);
  scroll-margin-top: 8px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-ink);
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
  max-width: 760px;
}

.section-head p {
  font-size: var(--fs-lead);
}

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
}

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

.brand-tile {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--amber);
  box-shadow: var(--shadow-sm);
  font-size: 1.15rem;
  line-height: 1;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-weight: 600;
}

@media (max-width: 720px) {
  .site-header .wrap {
    padding-block: 14px 6px;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    margin-inline: -10px;
  }

  .site-nav a {
    padding: 6px 10px;
    font-size: 0.875rem;
  }
}

/* ---------- Buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 8px 20px -10px var(--amber-deep);
}

.btn-primary:hover {
  background: var(--amber-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

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

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9375rem;
  border-radius: 12px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
}

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

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(28px, 5vw, 64px) var(--section-pad);
}

.hero-copy {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.hero-pill {
  justify-self: start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero h1 mark {
  background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  color: inherit;
  padding-inline: 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-lead {
  font-size: var(--fs-lead);
  max-width: 34ch;
}

.platforms {
  display: grid;
  gap: 10px;
}

.platforms-label,
.fineprint {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

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

/* Device composition */
.devices {
  position: relative;
  min-width: 0;
  padding-bottom: 9%;
}

.device-tablet {
  margin-left: 13%;
  padding: 2.1%;
  border-radius: clamp(16px, 3vw, 30px);
  background: var(--device);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--device-edge);
}

.device-tablet .screen {
  aspect-ratio: 1600 / 1112;
  border-radius: clamp(8px, 1.6vw, 16px);
}

.screen {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--screen);
}

.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.device-phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25%;
  padding: clamp(4px, 0.7vw, 8px);
  border-radius: clamp(16px, 3.2vw, 36px);
  background: var(--device);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--device-edge);
}

.device-phone .screen {
  aspect-ratio: 700 / 1522;
  border-radius: clamp(12px, 2.6vw, 29px);
}

.device-phone .screen img {
  object-position: top;
}

/* ---------- Features ---------- */

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mode {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.mode--child {
  background: linear-gradient(150deg, var(--child-a), var(--child-b));
}

.mode--parent {
  background: linear-gradient(150deg, var(--parent-a), var(--parent-b));
}

.mode-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.mode-title h3 {
  font-size: 1.375rem;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mode-demo {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface);
}

.demo-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Task-card states */
.states {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.state {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 0.8125rem;
  line-height: 1.4;
  min-width: 0;
}

.state b {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
}

.state-stars {
  letter-spacing: 1px;
  font-size: 0.8125rem;
}

.state--todo {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.state--pending {
  background: var(--orange-soft);
  color: var(--orange-ink);
}

.state--done {
  background: var(--green-soft);
  color: var(--green-ink);
}

.state--retry {
  background: var(--red-soft);
  color: var(--red-ink);
}

/* Shuffled keypads */
.keypads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.keypad-wrap {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 6px;
}

.keypad span {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 9px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.keypad .key-del {
  background: var(--red-soft);
  color: var(--red-ink);
  border-color: transparent;
  font-size: 0.75rem;
}

/* Parent tools: screenshot + list */
.tools {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(40px, 6vw, 72px);
}

.shot {
  margin: 0;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.shot .device-tablet {
  margin-left: 0;
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--device-edge);
}

.shot figcaption {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  max-width: 60ch;
}

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

.feature {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
}

.feature .icon {
  grid-row: span 2;
}

.feature p {
  font-size: 0.98rem;
}

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--green {
  background: var(--green-soft);
  color: var(--green-ink);
}

.icon--amber {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.icon--info {
  background: var(--info-soft);
  color: var(--info-ink);
}

.icon--plain {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 800;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}

.step p {
  font-size: 0.97rem;
}

.step-tag {
  justify-self: start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: 24px;
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--r-lg);
  background: var(--info-soft);
}

.rules h3 {
  font-size: 1.375rem;
  margin-bottom: 10px;
}

.rules-intro p {
  color: var(--fg);
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  max-width: 360px;
}

.week li {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.week li.week-start {
  background: var(--amber);
  color: var(--on-amber);
}

.week-note {
  margin-top: 10px;
  font-size: var(--fs-sm);
  color: var(--info-ink);
}

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

.rule-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  color: var(--fg);
}

.rule-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin: 0.6em 0 0 6px;
  border-radius: 3px;
  background: var(--amber-deep);
  transform: rotate(45deg);
}

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

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.faq-layout .section-head {
  margin-bottom: 0;
}

.faq {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq details + details {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(18px, 3vw, 28px);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  justify-self: end;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.faq summary:hover {
  background: var(--surface-alt);
}

.faq summary:focus-visible {
  outline-offset: -3px;
  border-radius: 0;
}

.faq .answer {
  display: grid;
  gap: 10px;
  padding: 0 clamp(18px, 3vw, 28px) 22px;
}

.faq details {
  scroll-margin-top: 16px;
}

.faq details:target summary {
  background: var(--amber-soft);
}

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

.support {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.support-main {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.email-box {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--amber-soft);
}

.email-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber-ink);
}

.email {
  color: var(--ink);
  font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.375rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.email-actions a {
  color: var(--amber-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.copy-status {
  min-height: 1.4em;
  font-size: var(--fs-sm);
  color: var(--amber-ink);
}

.btn[data-state="done"] {
  background: var(--green);
  color: var(--on-amber);
}

.support-side {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

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

.checklist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
}

.checklist li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 0.22em;
  border-radius: 6px;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px var(--green);
}

.note {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  font-size: 0.9375rem;
}

.dev {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

.dev strong {
  letter-spacing: 0.02em;
}

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

.site-footer .wrap {
  padding-block: 0 36px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

.site-footer p {
  margin: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--fg);
  font-weight: 500;
}

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

.doc-head .wrap {
  display: grid;
  gap: 16px;
  padding-block: clamp(24px, 4vw, 48px) clamp(28px, 4vw, 40px);
}

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

.doc-meta li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--fg);
}

.doc-meta b {
  color: var(--ink);
  font-weight: 600;
}

.doc-body .wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-block: 0 var(--section-pad);
}

.toc {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 24px);
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.toc-title {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.policy {
  display: grid;
  gap: clamp(32px, 4vw, 44px);
  min-width: 0;
  max-width: 760px;
}

.summary-card {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--r-lg);
  background: var(--green-soft);
}

.summary-card h2 {
  font-size: 1.375rem;
}

.summary-card p {
  color: var(--ink);
  font-size: var(--fs-lead);
}

.policy section {
  display: grid;
  gap: 14px;
  scroll-margin-top: 16px;
}

.policy h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  font-weight: 700;
}

.policy h2 .num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-size: 0.9375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transform: translateY(-2px);
}

.policy ul.plain {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
  max-width: var(--measure);
}

.policy ul.plain li::marker {
  color: var(--amber-deep);
}

.table-scroll {
  overflow-x: auto;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.data-table th,
.data-table td {
  padding: 13px 18px;
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  background: var(--surface-alt);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tbody th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody tr + tr th,
.data-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.nots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nots li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.97rem;
  line-height: 1.45;
  color: var(--ink);
}

.nots li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--red) 44%, var(--red) 56%, transparent 56%),
    var(--red-soft);
  background-size: 10px 10px, 10px 10px, auto;
  background-position: center;
  background-repeat: no-repeat;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--amber-soft);
  max-width: 560px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-layout,
  .rules,
  .tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-body .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-lead {
    max-width: 44ch;
  }

  .modes,
  .support {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  :root {
    --fs-base: 1rem;
    --fs-lead: 1.0625rem;
  }

  .steps,
  .nots,
  .toc ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions .btn {
    flex: 1 1 auto;
  }

  .keypads {
    gap: 10px;
  }

  .keypad {
    grid-template-columns: repeat(3, 30px);
    gap: 5px;
  }

  .data-table tbody th {
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .states {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover {
    transform: none;
  }
}
