/*
 * Link Up on the web: one stylesheet for every page Firebase Hosting serves
 * (landing, legal, child safety, report, account deletion, link fallback,
 * 404) and for pages added later (e.g. /under-13/, which only adds its own
 * under13.css on top of this file).
 *
 * Design source of truth: the Flutter app's design system.
 *   - Colours:  mobile_app/lib/core/theme/app_colors.dart (AppColors), plus
 *     the WCAG AA variants the launch track adds to AppColors (…AA tokens,
 *     conciergeGradientAA; contract phase-8a §16.3) for body-size text.
 *   - Type:     app_text.dart. Bricolage Grotesque (display, 600/800, tight
 *     tracking) and Figtree (body, 400–700), self-hosted from /fonts.
 *   - Depth:    app_shadows.dart. Radii and sizes from core/widgets
 *     (AppButton pills 60/54, PillChip r14, TagChip r10, cards r24, hero
 *     cards r28, onboarding cards r36, AppTextField r18).
 *   - Mascots sit on pastel brand surfaces (.panel-*), like MascotView in
 *     the app; the web copies are transparent cut-outs (/img/mascot-*.webp).
 *   - Dark mode follows the admin panel's dark palette
 *     (admin_panel/src/app/globals.css): ink page, #1e1e1e cards, yellow
 *     primary actions.
 *
 * Rules (Hosting CSP): no inline styles, no inline scripts, no data: URLs
 * (img-src 'self'), no third-party requests. Icons are inline <svg>.
 *
 * Building a page on this file: use the semantic tokens (--bg, --surface,
 * --text, --text-2, --border, --primary …) so it follows light and dark.
 * The names from the first version of this file (--ink, --white,
 * --hairline, --input-fill, --danger, --yellow …) still work: --ink is the
 * strong text colour and --white the raised surface in both schemes.
 * Components: .card, .button (.outline, .danger, .small), .field /
 * .field-label / .input / .select / .textarea / .field-error / .hint,
 * .check, .alert, .callout, .list, .state-icon, .eyebrow, .lead, .chip,
 * .tag, .badge, .panel-*, .tile. Put text on brand pastels with
 * --on-pastel (ink in both schemes).
 */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  /* Brand palette (AppColors). The same in both schemes. */
  --lu-ink: #141414;
  --lu-canvas: #f6f6f4;
  --lu-white: #ffffff;
  --lu-hairline: #eeeae2;
  --lu-divider: #f2f0eb;
  --lu-muted-fill: #f5f3ee;
  --lu-disabled: #e2ded6;
  --lu-input-fill: #faf9f6;
  --lu-stone: #e8e6e0;
  --lu-dot-inactive: #d9d6cf;
  --lu-yellow: #ffd54a;
  --lu-orange: #ff7a21;
  --lu-sky: #9ed4ff;
  --lu-lilac: #b9a6ff;
  --lu-pink: #ffb3e0;
  --lu-mint: #5fd68b;
  /* AppColors AA variants (phase-8a §16.3): body-size text. */
  --lu-text-secondary-aa: rgb(20 20 20 / 0.7);
  --lu-text-tertiary-aa: rgb(0 0 0 / 0.62);
  --lu-placeholder-aa: #6e6c66;
  --lu-orange-text-aa: #b54708;
  --lu-orange-fill-aa: #c44f00;
  --lu-mint-text-aa: #17804a;
  /* conciergeGradient and its AA variant (white text ≥ 4.6 : 1 on it; as
     the fill of large display text it is ≥ 4.2 : 1 on the canvas). */
  --lu-concierge: linear-gradient(90deg, #ff6fb5, #ff7a21);
  --lu-concierge-aa: linear-gradient(90deg, #de1d78, #c45207);

  /* Shape (core/widgets) and depth (AppShadows). */
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgb(0 0 0 / 0.05);
  --shadow-raised: 0 16px 36px rgb(0 0 0 / 0.1);
  --shadow-float: 0 24px 50px rgb(0 0 0 / 0.14);
  --shadow-sticker: 0 10px 24px rgb(0 0 0 / 0.1);
  --shadow-bar: 0 12px 30px rgb(0 0 0 / 0.14), 0 0 0 1.5px var(--border);

  /* Type (AppText). */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;

  /* Layout. */
  --gutter: clamp(16px, 4vw, 32px);
  --page-max: 1180px;
  --main-max: 760px;
  --measure: 68ch;
  --header-h: 68px;

  /* Semantic tokens: light. */
  --bg: var(--lu-canvas);
  --surface: var(--lu-white);
  --surface-muted: var(--lu-muted-fill);
  --surface-input: var(--lu-input-fill);
  --surface-sunken: var(--lu-divider);
  --border: var(--lu-hairline);
  --border-strong: var(--lu-dot-inactive);
  --line: var(--lu-divider);
  --text: var(--lu-ink);
  --text-2: var(--lu-text-secondary-aa);
  --text-3: var(--lu-text-tertiary-aa);
  --placeholder: var(--lu-placeholder-aa);
  --accent-text: var(--lu-orange-text-aa);
  --danger: var(--lu-orange-text-aa);
  --danger-surface: #fff1ea;
  --danger-on-surface: #8a2b0d;
  --success: var(--lu-mint-text-aa);
  /* Focus ring: brand lilac darkened to ≥ 4.6 : 1 on the light surfaces. */
  --focus: #6e56f0;
  --focus-soft: rgb(110 86 240 / 0.22);
  --primary: var(--lu-ink);
  --on-primary: var(--lu-white);
  --primary-hover: #2e2e2e;
  --destructive: var(--lu-orange-fill-aa);
  --destructive-hover: #a84400;
  --on-destructive: var(--lu-white);
  --disabled-fill: var(--lu-disabled);
  --disabled-text: rgb(20 20 20 / 0.55);
  --control: var(--lu-ink);
  --on-pastel: var(--lu-ink);
  --on-pastel-2: var(--lu-text-secondary-aa);
  --gradient-text: var(--lu-concierge-aa);
  --link-underline: rgb(20 20 20 / 0.32);
  --header-bg: rgb(246 246 244 / 0.86);
  --callout-bg: #fff8dc;
  --callout-border: #f5e3a3;
  --band-bg: var(--lu-ink);
  --band-text: var(--lu-canvas);
  --band-text-2: rgb(246 246 244 / 0.74);
  --band-card: rgb(255 255 255 / 0.06);
  --band-border: rgb(255 255 255 / 0.1);
  --chip-selected: var(--lu-ink);
  --on-chip-selected: var(--lu-white);
  --tag-bg: var(--lu-ink);
  --tag-fg: var(--lu-white);
  --skeleton-a: var(--lu-muted-fill);
  --skeleton-b: var(--lu-divider);

  /* Names from the first version of this file (kept for page CSS built on
     it, e.g. under13.css). They follow the colour scheme. */
  --ink: var(--text);
  --canvas: var(--bg);
  --white: var(--surface);
  --hairline: var(--border);
  --divider: var(--line);
  --muted-fill: var(--surface-muted);
  --disabled: var(--disabled-fill);
  --input-fill: var(--surface-input);
  --yellow: var(--lu-yellow);
  --orange: var(--lu-orange);
  --sky: var(--lu-sky);
  --lilac: var(--lu-lilac);
  --pink: var(--lu-pink);
  --mint: var(--lu-mint);
  --mint-text: var(--success);
  --radius-card: var(--radius-lg);
  --display: var(--font-display);
  --body: var(--font-body);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --surface: #1e1e1e;
    --surface-muted: #262626;
    --surface-input: #232323;
    --surface-sunken: #191919;
    --border: rgb(255 255 255 / 0.1);
    --border-strong: rgb(255 255 255 / 0.22);
    --line: rgb(255 255 255 / 0.08);
    --text: #f6f6f4;
    --text-2: rgb(246 246 244 / 0.74);
    --text-3: rgb(246 246 244 / 0.64);
    --placeholder: rgb(246 246 244 / 0.52);
    --accent-text: #ff9a5c;
    --danger: #ff8a4c;
    --danger-surface: rgb(255 122 33 / 0.14);
    --danger-on-surface: #ffc6a8;
    --success: var(--lu-mint);
    --focus: var(--lu-lilac);
    --focus-soft: rgb(185 166 255 / 0.3);
    --primary: var(--lu-yellow);
    --on-primary: var(--lu-ink);
    --primary-hover: #ffe17a;
    --disabled-fill: #2e2e2e;
    --disabled-text: rgb(246 246 244 / 0.5);
    --control: var(--lu-yellow);
    --gradient-text: var(--lu-concierge);
    --link-underline: rgb(246 246 244 / 0.4);
    --header-bg: rgb(20 20 20 / 0.84);
    --callout-bg: rgb(255 213 74 / 0.08);
    --callout-border: rgb(255 213 74 / 0.24);
    --band-bg: #1e1e1e;
    --chip-selected: var(--lu-yellow);
    --on-chip-selected: var(--lu-ink);
    --tag-bg: var(--lu-canvas);
    --tag-fg: var(--lu-ink);
    --shadow-card: 0 1px 0 rgb(255 255 255 / 0.03), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-raised: 0 16px 36px rgb(0 0 0 / 0.45);
    --shadow-float: 0 24px 50px rgb(0 0 0 / 0.5);
    --shadow-sticker: 0 10px 24px rgb(0 0 0 / 0.35);
    --skeleton-a: #232323;
    --skeleton-b: #2c2c2c;
  }
}

/* ------------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--main-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 28px var(--gutter) 72px;
}

main.main-wide {
  max-width: calc(var(--page-max) + 2 * var(--gutter));
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.55rem + 3vw, 3.5rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

strong,
b {
  font-weight: 700;
}

address {
  font-style: normal;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

::selection {
  background: rgb(255 122 33 / 0.3);
}

[hidden] {
  display: none !important;
}

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

.icon {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ---------------------------------------------------------- accessibility */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -120px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-raised);
}

.skip:focus {
  top: 12px;
}

/* ----------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding-block: 10px;
  padding-inline: max(var(--gutter), calc((100% - var(--page-max)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
}

/* The app's logo (AuthHeader): ink disc with a yellow ✦, then "link up."
   in Bricolage 22 with an orange full stop. */
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-mark img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1;
  white-space: nowrap;
}

.brand-dot {
  color: var(--lu-orange);
}


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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

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

.site-nav a[aria-current] {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text);
}

@media (max-width: 479px) {
  .site-nav .nav-extra {
    display: none;
  }

  .site-nav a {
    padding: 0 10px;
  }
}

/* First-version logo markup (dots + "Link Up"), still used by older
   pages. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.wordmark-dots {
  display: inline-grid;
  grid-template-columns: repeat(2, 9px);
  gap: 3px;
}

.wordmark-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.wordmark-dots .dot-yellow { background: var(--lu-yellow); }
.wordmark-dots .dot-pink { background: var(--lu-pink); }
.wordmark-dots .dot-sky { background: var(--lu-sky); }
.wordmark-dots .dot-lilac { background: var(--lu-lilac); }

/* ----------------------------------------------------------------- footer */

.site-footer {
  padding: 48px max(var(--gutter), calc((100% - var(--page-max)) / 2)) 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 15px;
}

.footer-top {
  display: grid;
  gap: 32px;
}

.footer-brand p {
  max-width: 34ch;
  margin: 14px 0 0;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px 24px;
}

.footer-heading {
  margin: 0 0 12px;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

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

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

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer-bottom p,
.footer-bottom address {
  margin: 0;
}

.footer-bottom .credit a {
  font-weight: 700;
}

.footer-bottom a {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 820px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    gap: 48px;
  }
}

/* First-version footer markup: a link row and a copyright line. */
.site-footer > nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer > nav a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-footer > p {
  margin: 16px 0 0;
  font-size: 14px;
}

/* ------------------------------------------------------------- typography */

.lead {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
}

/* The app's small labels (FreeBadge): a white pill with a coloured dot. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 6px 12px 6px 10px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eyebrow-dot, var(--lu-mint));
}

.eyebrow.dot-orange { --eyebrow-dot: var(--lu-orange); }
.eyebrow.dot-yellow { --eyebrow-dot: var(--lu-yellow); }
.eyebrow.dot-lilac { --eyebrow-dot: var(--lu-lilac); }
.eyebrow.dot-pink { --eyebrow-dot: var(--lu-pink); }
.eyebrow.dot-sky { --eyebrow-dot: var(--lu-sky); }

.muted {
  color: var(--text-2);
}

.small {
  font-size: 14px;
}

.center {
  text-align: center;
}

/* Accent words in display text: the Concierge gradient (AA variant on
   light surfaces), like the app's orange accent words. */
.accent {
  color: var(--accent-text);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
}

/* ---------------------------------------------------------------- buttons */

/* AppButton: pill, Figtree 17 bold. Ink with white text (light), yellow
   with ink text (dark, as in the admin panel). */
.button {
  --btn-bg: var(--primary);
  --btn-fg: var(--on-primary);
  --btn-border: transparent;
  --btn-hover: var(--primary-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  padding: 0 26px;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease;
}

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

.button:active {
  transform: scale(0.97);
}

.button.outline,
.button.secondary {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border);
  --btn-hover: var(--surface-muted);
  min-height: 54px;
  font-size: 16px;
}

.button.outline:hover,
.button.secondary:hover {
  --btn-border: var(--border-strong);
}

.button.danger {
  --btn-bg: var(--destructive);
  --btn-fg: var(--on-destructive);
  --btn-hover: var(--destructive-hover);
}

.button.small {
  width: auto;
  min-width: 0;
  min-height: 44px;
  margin-top: 0;
  padding: 0 18px;
  font-size: 15px;
}

/* After the variants, so a disabled danger or outline button looks
   disabled too. */
.button:is(:disabled, [aria-busy="true"]) {
  --btn-bg: var(--disabled-fill);
  --btn-fg: var(--disabled-text);
  --btn-hover: var(--disabled-fill);
  --btn-border: transparent;
  cursor: default;
  transform: none;
}

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

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

.actions .button {
  margin-top: 0;
}

@media (min-width: 720px) {
  .button {
    width: auto;
    min-width: 240px;
  }

  .actions .button {
    min-width: 0;
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.button:not([aria-busy="true"]) .spinner {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------ chips and badges */

/* PillChip: white with a hairline; ink (yellow in dark) when selected. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease,
    color 150ms ease;
}

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

.chip[aria-current="page"],
.chip[aria-current="true"],
.chip.is-selected {
  border-color: var(--chip-selected);
  background: var(--chip-selected);
  color: var(--on-chip-selected);
}

/* TagChip: small ink pill with white text (inverted in dark). */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  background: var(--tag-bg);
  color: var(--tag-fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* Meta badge (version, effective date). */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.badge .icon {
  width: 15px;
  height: 15px;
  color: var(--text-2);
}

/* ------------------------------------------------------------------ cards */

.card {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

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

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

.card h2 + p,
.card h2 + .list,
.card h2 + ul {
  margin-top: 10px;
}

.card-sub {
  margin-top: 28px;
}

.stack > * + * {
  margin-top: 14px;
}

@media (min-width: 720px) {
  .card {
    padding: 32px;
  }
}

/* Pastel brand surfaces (HomeFreeCard, onboarding cards). Text on them is
   always ink. The app multiplies its white-backed mascot art into these
   colours; the web copies in /img/mascot-*.webp are transparent cut-outs
   instead, so the characters keep their own colours on any surface and in
   dark mode. */
.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--panel, var(--lu-yellow));
  color: var(--on-pastel);
}

.panel-yellow { --panel: var(--lu-yellow); }
.panel-sky { --panel: var(--lu-sky); }
.panel-pink { --panel: var(--lu-pink); }
.panel-lilac { --panel: var(--lu-lilac); }
.panel-mint { --panel: var(--lu-mint); }

/* The app's floating chips over artwork (OnboardingSticker). */
.sticker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--lu-white);
  box-shadow: var(--shadow-sticker);
  color: var(--lu-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.sticker.dark {
  background: var(--lu-ink);
  color: var(--lu-white);
}

.going-dots {
  display: inline-flex;
}

.going-dots span {
  width: 20px;
  height: 20px;
  border: 2px solid var(--lu-ink);
  border-radius: 50%;
}

.going-dots span + span {
  margin-left: -7px;
}

.going-dots .g1 { background: var(--lu-yellow); }
.going-dots .g2 { background: var(--lu-sky); }
.going-dots .g3 { background: var(--lu-lilac); }

/* ---------------------------------------------------------------- content */

.list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding: 11px 0 11px 30px;
  border-top: 1px solid var(--line);
}

.list li:first-child {
  border-top: 0;
}

.list li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lu-yellow);
}

.list.keep li::before {
  background: var(--lu-sky);
}

.callout {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  font-size: 15px;
}

.callout.warn,
.danger-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgb(196 79 0 / 0.18);
  background: var(--danger-surface);
  color: var(--danger-on-surface);
}

.callout.warn .icon,
.danger-callout .icon {
  margin-top: 1px;
  color: var(--danger);
}

.callout.warn p,
.danger-callout p {
  margin: 0;
}

.callout.info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}

.callout.info .icon {
  margin-top: 1px;
  color: var(--text);
}

.callout.info p {
  margin: 0;
}

.alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--danger-surface);
  color: var(--danger-on-surface);
  font-size: 15px;
  font-weight: 600;
}

.state-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: var(--lu-ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
}

.state-icon.ok {
  background: var(--lu-mint);
}

.state-icon.warn {
  background: var(--lu-yellow);
}

.center .state-icon,
.focus-card .state-icon {
  margin-inline: auto;
}

.skeleton {
  display: grid;
  gap: 14px;
}

.skeleton span {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--skeleton-a), var(--skeleton-b),
    var(--skeleton-a));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton .sk-title {
  width: 45%;
  height: 22px;
  margin: 10px 0 6px;
}

.skeleton span:nth-child(3n) {
  width: 72%;
}

.skeleton span:nth-child(3n + 1) {
  width: 92%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* Link rows and tiles (ProfileScreenLinkRow / ValueRow). */
.links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  font-weight: 600;
  text-decoration: none;
}

.link-row:hover {
  background: var(--surface-sunken);
}

.link-row::after {
  content: "\203A";
  color: var(--text-3);
  font-size: 22px;
  line-height: 1;
}

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

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease,
    border-color 150ms ease;
}

.tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-raised);
  transform: translateY(-2px);
}

.tile-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--panel, var(--lu-yellow));
  color: var(--on-pastel);
}

.tile-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.tile-title {
  font-weight: 700;
  line-height: 1.3;
}

.tile-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
}

.tile > .icon {
  color: var(--text-3);
}

/* ------------------------------------------------------------------ forms */

.field {
  display: block;
  margin-top: 20px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.field-label .optional {
  color: var(--text-2);
  font-weight: 500;
}

/* AppTextField: 54+ high, input fill, hairline border, r18. */
.input {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  appearance: none;
  transition: border-color 150ms ease, box-shadow 150ms ease,
    background-color 150ms ease;
}

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

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  border-color: var(--text);
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--focus-soft);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgb(196 79 0 / 0.18);
}

.select {
  padding-right: 46px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  cursor: pointer;
}

.select:invalid {
  color: var(--text-2);
}

.select option {
  color: var(--text);
  background: var(--surface);
}

.textarea {
  min-height: 150px;
  padding: 14px 18px;
  line-height: 1.5;
  resize: vertical;
}

.hint,
.field + .small.muted {
  display: block;
  margin-top: 8px;
  line-height: 1.45;
}

.counter {
  display: block;
  margin-top: 6px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.field-error {
  display: block;
  min-height: 1em;
  margin-top: 8px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.field-error:empty {
  margin-top: 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}

.check:has(input:checked) {
  border-color: var(--border-strong);
}

.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--control);
}

.form-heading {
  font-size: 1.25rem;
}

.form-heading .small {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
}

/* ------------------------------------------------------------- page heads */

.page-head {
  padding-block: 8px 4px;
}

.page-head h1 {
  max-width: 22ch;
}

.page-head .lead {
  max-width: 60ch;
}

.page-head .actions {
  margin-top: 24px;
}

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

.meta-note {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

/* ---------------------------------------------------------------- landing */

.hero {
  display: grid;
  gap: 36px;
  align-items: center;
  padding-block: 12px 32px;
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.5rem, 1.1rem + 4.2vw, 4.625rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero .lead {
  max-width: 44ch;
  margin-top: 20px;
}

/* Tilted colour card with the mascot and floating stickers
   (OnboardingCardPanel). */
.stage {
  position: relative;
  width: min(100%, 500px);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

.stage-card {
  position: absolute;
  inset: 7% 6%;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-float);
  transform: rotate(-4deg);
}

.stage-card img {
  position: absolute;
  inset: -6%;
  width: 112%;
  max-width: none;
  height: 112%;
  object-fit: contain;
  transform: rotate(4deg);
}

.stage .sticker.s1 {
  top: 9%;
  left: 0;
  border-radius: 18px 18px 18px 4px;
  transform: rotate(-5deg);
}

.stage .sticker.s2 {
  right: 0;
  bottom: 8%;
  transform: rotate(5deg);
}

.section {
  padding-block: 56px 8px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 28px;
}

.section-head .lead {
  margin-top: 12px;
}

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

.feature {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.feature-art {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.feature-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.18) translateY(4%);
}

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

.feature-body h3 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.feature-body p {
  margin: 10px 0 0;
  color: var(--text-2);
}

.feature .tag {
  margin-top: 14px;
}

/* Safety band: an ink card like the app's dark stickers and itinerary. */
.band {
  margin-top: 64px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--band-border);
  border-radius: var(--radius-2xl);
  background: var(--band-bg);
  color: var(--band-text);
}

.band h2,
.band h3 {
  color: var(--band-text);
}

.band .lead {
  color: var(--band-text-2);
}

.band .eyebrow {
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px var(--band-border);
  color: var(--band-text);
}

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

.point {
  padding: 20px;
  border: 1px solid var(--band-border);
  border-radius: 22px;
  background: var(--band-card);
}

.point h3 {
  margin-top: 14px;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.point p {
  margin: 8px 0 0;
  color: var(--band-text-2);
  font-size: 15px;
}

.point-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel, var(--lu-yellow));
  color: var(--on-pastel);
}

.band .actions .button.outline {
  --btn-bg: transparent;
  --btn-fg: var(--band-text);
  --btn-border: rgb(255 255 255 / 0.22);
  --btn-hover: rgb(255 255 255 / 0.08);
}

.band .actions .button:not(.outline) {
  --btn-bg: var(--lu-yellow);
  --btn-fg: var(--lu-ink);
  --btn-hover: #ffe17a;
}

.band :focus-visible {
  outline-color: var(--lu-lilac);
}

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

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

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 48px;
    padding-block: 36px 40px;
  }
}

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

@media (max-width: 519px) {
  .hero .actions .button {
    width: 100%;
  }
}

/* ------------------------------------------------------------ inner pages */

/* Two columns on wide screens: the form or text, and a side card. */
.split {
  display: grid;
  gap: 0 28px;
  align-items: start;
}

.split > * {
  min-width: 0;
}

@media (min-width: 980px) {
  .split {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }

  .split .aside-sticky {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

main.main-split {
  max-width: calc(1060px + 2 * var(--gutter));
}

/* Centred single-card pages (404, link fallback, deletion states). */
.focus-card,
.narrow-card {
  max-width: 560px;
  margin: 12px auto 0;
}

.focus-card {
  text-align: center;
}

.focus-card h1,
.narrow-card h1 {
  font-size: clamp(2rem, 1.55rem + 1.8vw, 2.75rem);
}

.narrow-card .lead {
  font-size: 1.0625rem;
}

.form-card form > :first-child {
  margin-top: 0;
}

.focus-card .lead {
  margin-inline: auto;
}

.focus-card .button {
  margin-inline: auto;
}

.mascot-disc {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto 22px;
  border-radius: 50%;
  box-shadow: var(--shadow-raised);
}

.mascot-disc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06) translateY(3%);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

/* -------------------------------------------------------------- legal etc */

.legal-head {
  display: grid;
  gap: 24px;
  align-items: end;
  padding-block: 8px 28px;
}

.legal-head h1 {
  max-width: 16ch;
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

@media (max-width: 479px) {
  .doc-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-tabs .chip {
    justify-content: center;
  }

  .meta-row .badge {
    padding: 4px 10px;
    font-size: 12.5px;
  }

  .meta-row {
    gap: 6px;
  }
}

.region {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.region-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.region-label .icon {
  width: 16px;
  height: 16px;
}

/* Segmented control for the region (?pack=). */
.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
}

.segmented a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}

.segmented a:hover {
  color: var(--text);
}

.segmented a[aria-current="page"] {
  background: var(--chip-selected);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
  color: var(--on-chip-selected);
}

.region-note {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}

.region-note strong {
  color: var(--text);
}

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

.report-actions .button {
  flex: 1 1 auto;
}

@media (min-width: 900px) {
  .legal-head {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    gap: 40px;
  }
}

.legal-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

.legal-doc {
  min-width: 0;
}

@media (min-width: 1040px) {
  .legal-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 44px;
  }

  /* 68ch of 17px text plus the card's padding and border. */
  .legal-doc {
    width: 100%;
    max-width: calc(var(--measure) + 106px);
    font-size: 1.0625rem;
  }

  .legal-doc .legal-body {
    font-size: inherit;
  }
}

/* Table of contents: built by site.js from the document's h2/h3 ids. */
.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.toc-toggle .toc-count {
  margin-left: auto;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.toc-toggle .icon {
  transition: transform 200ms ease;
}

.toc.is-open .toc-toggle .icon {
  transform: rotate(180deg);
}

.toc-label {
  display: none;
  margin: 0 0 10px;
  padding: 0 12px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc-list {
  margin: 0;
  padding: 0 10px 12px;
  list-style: none;
  counter-reset: none;
}

.toc:not(.is-open) .toc-list {
  display: none;
}

.toc-list a {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.toc-list a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.toc-list a[aria-current="location"] {
  background: var(--surface-muted);
  box-shadow: inset 3px 0 0 var(--toc-mark, var(--lu-orange));
  color: var(--text);
}

.toc-num {
  flex: none;
  min-width: 1.4em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.toc-list .toc-sub a {
  padding-left: 30px;
  font-weight: 500;
}

@media (min-width: 1040px) {
  .toc {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    max-height: calc(100vh - var(--header-h) - 40px);
    padding: 18px 8px 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .toc-toggle {
    display: none;
  }

  .toc-label {
    display: block;
  }

  .toc:not(.is-open) .toc-list,
  .toc-list {
    display: block;
    padding: 0 0 8px;
  }
}

/* The document itself: a paper card with a comfortable measure. */
.legal-body {
  font-size: 1rem;
  line-height: 1.7;
}

.card.legal-body {
  margin-top: 0;
  padding: clamp(22px, 4.2vw, 52px);
}

.legal-body > * {
  max-width: var(--measure);
}

.legal-body > :first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body ul,
.legal-body ol {
  margin: 0 0 1em;
}

.legal-body h2 {
  margin: 2.1em 0 0.7em;
  padding-top: 1.35em;
  border-top: 1px solid var(--line);
  font-size: clamp(1.375rem, 1.2rem + 0.55vw, 1.625rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.legal-body > h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-body h3 {
  margin: 1.7em 0 0.5em;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.35em;
}

.legal-body li {
  margin: 0.4em 0;
  padding-left: 0.3em;
}

.legal-body li::marker {
  color: var(--bullet, var(--text-3));
}

.legal-body ul > li::marker {
  font-size: 1.15em;
}

.legal-body li > ul,
.legal-body li > ol {
  margin: 0.4em 0 0;
}

.legal-body a {
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1.5px;
}

.legal-body a:hover {
  text-decoration-color: currentColor;
}

.legal-body a[href^="mailto:"] {
  font-weight: 600;
}

.legal-body .callout {
  margin: 1.5em 0 1.8em;
  padding: 20px 22px 8px;
  border: 1px solid var(--callout-border);
  border-radius: 22px;
  background: var(--callout-bg);
  font-size: inherit;
}

.legal-body .callout > p:first-child strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.legal-body .muted.small {
  font-size: 14px;
  line-height: 1.5;
}

/* Tables are wrapped by site.js in a scrollable, rounded frame. */
.table-wrap {
  margin: 1.25em 0 1.6em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.legal-body > .table-wrap {
  max-width: none;
}

.table-wrap table,
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375em;
  line-height: 1.5;
}

.legal-body th,
.legal-body td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.legal-body th {
  background: var(--surface-muted);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-body td {
  border-top: 1px solid var(--line);
}

.legal-body td:first-child {
  width: 42%;
  color: var(--text);
  font-weight: 600;
}

.legal-body tbody tr:hover td {
  background: var(--surface-muted);
}

/* Phones: each row becomes a small card, the column names become labels
   (site.js sets the ARIA table roles and data-label). */
@media (max-width: 559px) {
  .legal-body table[role="table"],
  .legal-body table[role="table"] tbody,
  .legal-body table[role="table"] tr,
  .legal-body table[role="table"] td {
    display: block;
    width: auto;
  }

  .legal-body table[role="table"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .legal-body table[role="table"] tr {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
  }

  .legal-body table[role="table"] tbody tr:first-child {
    border-top: 0;
  }

  .legal-body table[role="table"] td {
    padding: 0;
    border: 0;
  }

  .legal-body table[role="table"] td + td {
    margin-top: 6px;
    color: var(--text-2);
  }

  .legal-body table[role="table"] td + td[data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    margin-bottom: 2px;
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .legal-body tbody tr:hover td {
    background: none;
  }
}

.doc-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 4px 0;
  color: var(--text-2);
  font-size: 14px;
}

.doc-end a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.doc-end a:hover {
  text-decoration: underline;
}

/* Floating "back to top" (shown by site.js after some scrolling). */
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-bar);
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s 200ms;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s;
}

.to-top:hover {
  background: var(--surface-muted);
}

/* Teen summary: the same system with warmer accents. */
[data-doc="teen-summary"] {
  --toc-mark: var(--lu-pink);
  --teen-band: linear-gradient(120deg, rgb(255 179 224 / 0.55),
    rgb(255 213 74 / 0.42));
}

[data-doc="teen-summary"] .legal-head {
  margin-bottom: 24px;
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--radius-2xl);
  background: var(--teen-band);
}

@media (min-width: 640px) {
  [data-doc="teen-summary"] .legal-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 28px;
    align-items: center;
  }

  [data-doc="teen-summary"] .legal-title > * {
    grid-column: 2;
    justify-self: start;
  }

  [data-doc="teen-summary"] .legal-title > .legal-mascot {
    grid-row: 1 / span 3;
    grid-column: 1;
    margin: 0;
  }
}

.legal-mascot {
  display: block;
  width: 132px;
  height: 132px;
  margin-bottom: 16px;
  border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%;
  box-shadow: var(--shadow-raised);
  transform: rotate(-4deg);
}

.legal-mascot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18) rotate(4deg);
}

[data-doc="teen-summary"] .legal-body {
  font-size: 1.0625rem;
}

[data-doc="teen-summary"] .legal-body h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-doc="teen-summary"] .legal-body h2::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dot, var(--lu-yellow));
  box-shadow: 0 0 0 5px var(--dot-halo, rgb(255 213 74 / 0.28));
}

[data-doc="teen-summary"] .legal-body h2:nth-of-type(5n + 2) {
  --dot: var(--lu-sky);
  --dot-halo: rgb(158 212 255 / 0.32);
}

[data-doc="teen-summary"] .legal-body h2:nth-of-type(5n + 3) {
  --dot: var(--lu-pink);
  --dot-halo: rgb(255 179 224 / 0.36);
}

[data-doc="teen-summary"] .legal-body h2:nth-of-type(5n + 4) {
  --dot: var(--lu-lilac);
  --dot-halo: rgb(185 166 255 / 0.32);
}

[data-doc="teen-summary"] .legal-body h2:nth-of-type(5n) {
  --dot: var(--lu-mint);
  --dot-halo: rgb(95 214 139 / 0.3);
}

[data-doc="teen-summary"] .legal-body ul > li:nth-child(4n + 1) { --bullet: var(--lu-orange); }
[data-doc="teen-summary"] .legal-body ul > li:nth-child(4n + 2) { --bullet: #3d9be9; }
[data-doc="teen-summary"] .legal-body ul > li:nth-child(4n + 3) { --bullet: #e0569f; }
[data-doc="teen-summary"] .legal-body ul > li:nth-child(4n) { --bullet: #7b62f0; }

[data-doc="teen-summary"] .legal-body ul > li::marker {
  font-size: 1.3em;
}

[data-doc="teen-summary"] .legal-body th {
  background: rgb(158 212 255 / 0.32);
  color: var(--text);
}

[data-doc="teen-summary"] .legal-body > p:nth-child(2) {
  font-size: 1.125em;
}

[data-doc="teen-summary"] .legal-body a {
  text-decoration-color: #e0569f;
}

@media (prefers-color-scheme: dark) {
  [data-doc="teen-summary"] {
    --teen-band: linear-gradient(120deg, rgb(255 179 224 / 0.16),
      rgb(255 213 74 / 0.1));
  }

  [data-doc="teen-summary"] .legal-body th {
    background: rgb(158 212 255 / 0.14);
  }

  [data-doc="teen-summary"] .legal-body ul > li:nth-child(4n + 2) { --bullet: var(--lu-sky); }
  [data-doc="teen-summary"] .legal-body ul > li:nth-child(4n + 3) { --bullet: var(--lu-pink); }
  [data-doc="teen-summary"] .legal-body ul > li:nth-child(4n) { --bullet: var(--lu-lilac); }

  [data-doc="teen-summary"] .legal-body a {
    text-decoration-color: var(--lu-pink);
  }
}

/* ------------------------------------------------------------------ motion */

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

  .skeleton span {
    animation: none;
  }
}

/* ---------------------------------------------------------- forced colours */

@media (forced-colors: active) {
  .accent {
    background: none;
    color: CanvasText;
  }

  .button,
  .chip,
  .segmented a,
  .tile,
  .card,
  .toc,
  .region,
  .badge,
  .eyebrow {
    border: 1px solid CanvasText;
  }

  .segmented a[aria-current="page"],
  .chip[aria-current="page"],
  .toc-list a[aria-current="location"] {
    outline: 2px solid Highlight;
  }
}

/* ------------------------------------------------------------------ print */

@media print {
  @page {
    margin: 16mm 14mm;
  }

  :root {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --text-2: #333;
    --text-3: #444;
    --border: #bbb;
    --line: #ccc;
    --callout-bg: #fff;
    --callout-border: #999;
  }

  html {
    scroll-padding-top: 0;
  }

  body {
    display: block;
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .skip,
  .site-nav,
  .doc-tabs,
  .segmented,
  .region-label,
  .toc,
  .to-top,
  .doc-end,
  .footer-nav,
  .stage,
  .legal-mascot,
  .mascot-disc,
  .button,
  .actions,
  noscript {
    display: none !important;
  }

  .site-header {
    position: static;
    min-height: 0;
    padding: 0 0 10pt;
    border-bottom: 1px solid #999;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .brand-mark {
    border: 1px solid #000;
  }

  main,
  main.main-wide {
    max-width: none;
    padding: 12pt 0 0;
  }

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

  .region {
    display: block;
    margin: 8pt 0 14pt;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  [data-doc="teen-summary"] .legal-head {
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
  }

  [data-doc="teen-summary"] .legal-title {
    display: block;
  }

  .brand-mark {
    background: var(--lu-ink);
    color: var(--lu-yellow);
  }

  .legal-doc {
    max-width: none;
  }

  .card,
  .card.legal-body {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .legal-body > * {
    max-width: none;
  }

  .legal-body h2 {
    margin-top: 16pt;
    padding-top: 0;
    border-top: 0;
    break-after: avoid;
  }

  .legal-body h3 {
    break-after: avoid;
  }

  .legal-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }

  .table-wrap {
    overflow: visible;
    border-color: #999;
  }

  .legal-body tr {
    break-inside: avoid;
  }

  .legal-body tbody tr:hover td {
    background: none;
  }

  .badge,
  .eyebrow {
    box-shadow: none;
    border: 1px solid #999;
  }

  h1 {
    font-size: 24pt;
  }

  .accent {
    background: none;
    color: #000;
  }

  .site-footer {
    margin-top: 18pt;
    padding: 10pt 0 0;
    border-top: 1px solid #999;
    background: none;
  }

  .footer-brand p {
    display: none;
  }

  .footer-bottom {
    margin: 0;
    padding: 0;
    border: 0;
  }
}
