/*
 * Rumis landing page.
 *
 * Every value here comes from docs/DESIGN.md in the workspace root: the tokens
 * in § 1, the components in § 3 and the contrast table in § 7. The site has
 * the app's single light theme; there is no dark variant because the app has
 * none. Change a token in DESIGN.md first, then here.
 */

/* ---------- 1. Tokens (DESIGN.md § 1) ---------- */

:root {
  color-scheme: light;

  /* Surfaces and ink */
  --canvas: #f0ece1;
  --surface: #ffffff;
  --surface-sunken: #f2f0ea;
  --surface-sunken-strong: #e9e6df;
  --ink: #16171a;
  --ink-secondary: #5e5a52;
  --ink-tertiary: #857f76; /* non-text only */
  --line: #e6e3db;
  --line-strong: #d4cec3;

  /* Brand, action and status */
  --brand: #5b4bd6;
  --brand-strong: #4536b8;
  --brand-surface: #e9e6fb;
  --cta: #f5a93c;
  --cta-pressed: #d68f2a;
  --warning: #86560a;
  --warning-surface: #fbefd6;

  /* Flow mode */
  --flow: #5b4bd6;
  --flow-deep: #2c2560;
  --flow-top: #7a3fbf;
  --on-flow-secondary: #e6e2ff;

  /* Vivid icon palette: white glyphs only, never text or page colours */
  --vivid-orange: #ea580c;
  --vivid-pink: #db2777;
  --vivid-blue: #0284c7;
  --vivid-amber: #d97706;
  --vivid-red: #e11d48;
  --vivid-magenta: #c026d3;

  /* Avatar palette (RumisAvatarChip) */
  --avatar-orange: #c2410c;
  --avatar-blue: #1d4ed8;
  --avatar-pink: #be185d;
  --avatar-slate: #334155;

  /* Type: SF Pro Rounded for every bold token, SF Pro for running text.
     ui-rounded resolves to SF Pro Rounded in Safari; other browsers fall back
     to the platform's own sans. No web fonts are downloaded. */
  --font-rounded: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing (4pt grid) */
  --s-micro: 4px;
  --s-tight: 8px;
  --s-standard: 12px;
  --s-card: 16px;
  --s-generous: 20px;
  --s-section: 24px;
  --s-block: 32px;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Elevation */
  --e-card: 0 4px 8px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.05);
  --e-float: 0 6px 14px rgb(0 0 0 / 0.1);
  --e-control: 0 2px 4px rgb(0 0 0 / 0.06);
  --e-overlay: 0 8px 16px rgb(0 0 0 / 0.12);

  /* Motion */
  --press: 150ms cubic-bezier(0.3, 0.9, 0.4, 1);
  --tab: 220ms ease-out;

  --page-max: 1120px;
  --focus-ring: var(--brand);
}

/* ---------- 2. Base ---------- */

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem; /* 17px: iOS body */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Components set display; the hidden attribute must still win. */
[hidden] {
  display: none !important;
}

a {
  color: var(--brand-strong);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  text-wrap: balance;
  font-family: var(--font-rounded);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

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

.visually-hidden {
  position: absolute !important;
  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;
  top: -100px;
  left: var(--s-card);
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-rounded);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-card);
}

.wrap {
  width: min(100% - 2 * var(--s-generous), var(--page-max));
  margin-inline: auto;
}

/* Icons: stroked by default; filled shapes carry their own fill. */
.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 3. Registers (DESIGN.md § 2.1) ---------- */

/* Flow mode: the purple page, white type, dot grid (§ 3.21). */
.flow {
  --focus-ring: #ffffff;
  position: relative;
  color: #ffffff;
  background-color: var(--flow);
  background-image:
    radial-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1.4px),
    linear-gradient(180deg, var(--flow-top) 0%, var(--flow) 62%);
  background-size: 22px 22px, 100% 100%;
}

.flow a {
  color: #ffffff;
}

.flow .secondary-text {
  color: var(--on-flow-secondary);
}

/* ---------- 4. Components (DESIGN.md § 3) ---------- */

/* 3.1 Primary: amber face over a darker edge 4pt lower. The edge is not a
   shadow; pressing slides the face down onto it. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-tight);
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--font-rounded);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn .ico {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.btn-primary {
  position: relative;
  color: var(--ink);
  background: var(--cta);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 4px 0 var(--cta-pressed);
  transform: translateY(0);
  transition: transform var(--press), box-shadow var(--press);
}

.flow .btn-primary {
  color: var(--ink);
}

.btn-primary:hover {
  background: #f7b24f;
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 0 0 var(--cta-pressed);
}

.btn-compact {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9375rem;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 3px 0 var(--cta-pressed);
}

.btn-compact:active {
  transform: translateY(3px);
}

/* 3.1 Flow secondary: 12% white capsule, white label, 48pt. Also used,
   without a link, for the "coming soon" platform badge. */
.btn-flow-secondary {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: rgb(255 255 255 / 0.12);
}

.badge-soon {
  cursor: default;
}

.badge-soon .ico {
  stroke-width: 2.2;
}

/* 3.1 Circle, neutral / secondary / CTA */
.circle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--e-control);
}

.circle .ico {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.circle-secondary {
  border: 1.5px solid rgb(91 75 214 / 0.4);
  background: rgb(245 169 60 / 0.16);
  color: var(--brand);
  box-shadow: none;
}

/* Vivid icon tile (RumisIconBadge, § 3.16) */
.tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-sm);
  color: #ffffff;
  background: var(--brand);
}

.tile .ico {
  width: 22px;
  height: 22px;
  stroke-width: 2.3;
}

.tile-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
}

.tile-sm .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}

.tile-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.tile-lg .ico {
  width: 26px;
  height: 26px;
}

.c-home { background: var(--brand); }
.c-chore { background: var(--vivid-pink); }
.c-shopping { background: var(--vivid-orange); }
.c-expense { background: var(--vivid-blue); }
.c-event { background: var(--vivid-red); }
.c-balance { background: var(--vivid-amber); }
.c-people { background: var(--vivid-magenta); }

/* Hero tile (RumisHeroTile, § 3.16a): vivid two-stop gradient, white glyph at
   43% of the size, 1pt 35% white inner stroke, soft shadow. */
.hero-tile {
  --size: 76px;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: calc(var(--size) * 0.286);
  color: #ffffff;
  background: linear-gradient(135deg, var(--vivid-orange), var(--vivid-pink));
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.35),
    0 6px 12px rgb(0 0 0 / 0.18);
}

.hero-tile .ico {
  width: calc(var(--size) * 0.43);
  height: calc(var(--size) * 0.43);
}

.hero-tile-sm {
  --size: 36px;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.35),
    0 3px 6px rgb(0 0 0 / 0.16);
}

/* Card (§ 3.5): white, r-lg, e-card plus a hairline. */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--e-card);
}

/* Status pill (§ 3.11) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.pill-success {
  color: var(--brand-strong);
  background: var(--brand-surface);
}

.pill-neutral {
  color: var(--ink-secondary);
  background: var(--surface-sunken);
}

.pill-warning {
  color: var(--warning);
  background: var(--warning-surface);
}

/* Section label (§ 3.4) */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--s-standard);
  font-family: var(--font-rounded);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Avatar (§ 3.15): solid disc, white rounded initials, white ring. */
.avatar {
  --size: 32px;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: calc(var(--size) * 0.38);
  font-weight: 700;
  box-shadow: 0 0 0 max(1.5px, calc(var(--size) * 0.05)) #ffffff;
}

.a-orange { background: var(--avatar-orange); }
.a-blue { background: var(--avatar-blue); }
.a-pink { background: var(--avatar-pink); }
.a-slate { background: var(--avatar-slate); }

/* ---------- 5. Page: header ---------- */

.site-header {
  position: relative;
  z-index: 2;
  padding-block: var(--s-generous);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-generous);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-rounded);
  font-size: 1.375rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-tight);
}

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-rounded);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  background: rgb(255 255 255 / 0.12);
}

.site-nav .btn {
  margin-left: var(--s-tight);
}

/* ---------- 6. Page: hero ---------- */

.hero {
  padding-bottom: 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
  padding-top: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.14);
  font-family: var(--font-rounded);
  font-size: 0.9375rem;
  font-weight: 600;
}

.eyebrow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cta);
  box-shadow: 0 0 0 4px rgb(245 169 60 / 0.3);
}

.hero h1 {
  margin-top: var(--s-section);
  font-size: clamp(2.75rem, 6.4vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  /* .rumisHeroTextShadow(): hard, unblurred */
  text-shadow: 2px 3px 0 rgb(0 0 0 / 0.22);
}

.hero-lede {
  max-width: 34rem;
  margin-top: var(--s-generous);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-card);
  margin-top: var(--s-block);
}

.fine-print {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: var(--s-generous) 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.fine-print li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fine-print .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.hero-device {
  display: grid;
  justify-items: center;
  gap: var(--s-card);
}

.device-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-rounded);
  font-size: 0.9375rem;
  font-weight: 600;
}

.device-hint .ico {
  width: 18px;
  height: 18px;
}

/* ---------- 7. The interactive phone ---------- */

.phone {
  position: relative;
  width: 318px;
  padding: 11px;
  border-radius: 54px;
  background: #0e0f12;
  box-shadow:
    inset 0 0 0 2px #2a2b30,
    0 30px 60px rgb(20 10 60 / 0.45),
    0 10px 20px rgb(20 10 60 / 0.3);
}

.phone-screen {
  position: relative;
  height: 640px;
  overflow: hidden;
  border-radius: 43px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  --focus-ring: var(--brand);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 26px 0 30px;
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
}

.island {
  width: 92px;
  height: 27px;
  border-radius: var(--r-pill);
  background: #0e0f12;
}

.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.status-icons i {
  display: block;
  width: 4px;
  border-radius: 1px;
  background: var(--ink);
}

.status-icons i:nth-child(1) { height: 5px; }
.status-icons i:nth-child(2) { height: 7px; }
.status-icons i:nth-child(3) { height: 9px; }
.status-icons i:nth-child(4) { height: 11px; }

.status-icons b {
  display: block;
  width: 22px;
  height: 11px;
  margin-left: 4px;
  border: 1.5px solid var(--ink);
  border-radius: 3.5px;
  background: linear-gradient(90deg, var(--ink) 70%, transparent 70%) content-box;
  padding: 1px;
}

.app-view {
  position: absolute;
  inset: 46px 0 0;
  overflow-y: auto;
  padding: 4px 16px 110px;
  scrollbar-width: none;
}

.app-view::-webkit-scrollbar {
  display: none;
}

.app-view.is-entering {
  animation: view-in var(--tab) both;
}

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

.app-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-topbar .circle {
  width: 34px;
  height: 34px;
}

.app-topbar .circle .ico {
  width: 15px;
  height: 15px;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--e-control);
}

.home-pill .ico {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.app-topbar .spacer {
  flex: 1;
}

.sync-pill {
  padding: 3px 8px;
  font-size: 10px;
}

.app-title {
  margin: 14px 0 12px;
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
}

.app-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 14px;
}

.app-header-row .app-title {
  margin: 0;
}

.app-header-row .circle {
  width: 36px;
  height: 36px;
}

.members {
  display: flex;
  align-items: center;
  padding-left: 4px;
}

.members .avatar {
  --size: 30px;
  margin-left: -6px;
}

.members .avatar:first-child {
  margin-left: 0;
}

.add-avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 4px;
  border: 1.5px dashed var(--brand);
  border-radius: 50%;
  background: rgb(245 169 60 / 0.16);
  color: var(--brand);
}

.add-avatar .ico {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

/* Day strip (§ 3.25) */
.day-strip {
  display: flex;
  gap: 6px;
  margin: 14px -16px 0;
  padding: 2px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-strip::-webkit-scrollbar {
  display: none;
}

.day {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  width: 38px;
  height: 54px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.day small {
  font-family: var(--font-rounded);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
}

.day strong {
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 600;
}

.day i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}

.day.has-items i {
  background: var(--brand);
}

.day.is-today {
  border: 1.5px solid var(--brand);
}

.day[aria-pressed="true"],
.day.is-on {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.day[aria-pressed="true"] small,
.day.is-on small {
  color: #ffffff;
}

.day[aria-pressed="true"] i,
.day.is-on i {
  background: #ffffff;
}

.app-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
}

.app-section .section-label {
  gap: 8px;
  font-size: 15px;
}

.app-section .tile-sm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.app-section .tile-sm .ico {
  width: 12px;
  height: 12px;
}

.see-all {
  font-family: var(--font-rounded);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-strong);
}

/* Home tiles (HomeTileStyle) */
.tile-row {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tile-row::-webkit-scrollbar {
  display: none;
}

.home-tile {
  display: grid;
  align-content: space-between;
  gap: 8px;
  width: 112px;
  min-height: 104px;
  flex: none;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 6px rgb(0 0 0 / 0.05);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--tab), transform var(--press);
}

.home-tile:active {
  transform: scale(0.97);
}

.home-tile-title {
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.home-tile-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-secondary);
  font-size: 11px;
}

.home-tile-meta .avatar {
  --size: 18px;
  box-shadow: none;
}

.check {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid var(--ink-tertiary);
  border-radius: 50%;
  color: #ffffff;
  transition: background-color var(--tab), border-color var(--tab);
}

.check .ico {
  width: 13px;
  height: 13px;
  stroke-width: 3.4;
  opacity: 0;
  transition: opacity var(--tab);
}

.is-done .check,
[aria-pressed="true"] > .check {
  border-color: var(--brand);
  background: var(--brand);
}

.is-done .check .ico,
[aria-pressed="true"] > .check .ico {
  opacity: 1;
}

.home-tile[aria-pressed="true"] {
  background: var(--brand-surface);
  border-color: transparent;
}

.home-tile[aria-pressed="true"] .home-tile-title {
  color: var(--ink-secondary);
  text-decoration: line-through;
}

.event-tile {
  cursor: default;
}

.event-when {
  color: var(--ink-secondary);
  font-size: 11px;
}

.add-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  width: 92px;
  min-height: 104px;
  flex: none;
  border: 1.5px dashed var(--ink-tertiary);
  border-radius: 16px;
  color: var(--ink-secondary);
  font-family: var(--font-rounded);
  font-size: 12px;
  font-weight: 600;
}

.add-tile .circle {
  width: 32px;
  height: 32px;
}

.add-tile .circle .ico {
  width: 14px;
  height: 14px;
}

/* Section card and rows (§ 3.5, § 3.6) */
.row-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--e-card);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
}

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

.row-body {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-family: var(--font-rounded);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
}

.row-meta {
  color: var(--ink-secondary);
  font-size: 11px;
}

.row-value {
  font-family: var(--font-rounded);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.row-value.positive {
  color: var(--brand);
}

.row .tile {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.row .tile .ico {
  width: 16px;
  height: 16px;
}

.row .avatar {
  --size: 30px;
  box-shadow: none;
}

.check-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.row.is-done .row-title {
  color: var(--ink-secondary);
  text-decoration: line-through;
}

.bill-toggle {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-tertiary);
  cursor: pointer;
}

.bill-toggle .ico {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.bill-toggle[aria-pressed="true"],
.bill-toggle.is-on {
  color: var(--brand);
}

.bill-toggle[aria-pressed="true"] .ico,
.bill-toggle.is-on .ico {
  stroke-width: 2.4;
}

.billing-bar {
  position: absolute;
  right: 12px;
  bottom: 88px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--e-float);
  animation: view-in var(--tab) both;
}

.billing-bar .btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.ghost {
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--ink-secondary);
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Segmented control (§ 3.2) */
.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
}

.segmented > * {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--ink-secondary);
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--tab), box-shadow var(--tab);
}

.segmented > [aria-pressed="true"],
.segmented > .is-on {
  color: var(--ink);
  background: var(--cta);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 3px 0 var(--cta-pressed);
}

/* Balance card (§ 3.18) */
.balance-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
}

.balance-card .caption {
  color: var(--ink-secondary);
  font-family: var(--font-rounded);
  font-size: 12px;
  font-weight: 500;
}

.balance-amount {
  margin-top: 2px;
  color: var(--brand);
  font-family: var(--font-rounded);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.balance-card .btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.month-label {
  margin: 16px 0 8px;
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 600;
}

/* Tab bar (§ 3.8) */
.app-tabbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 26px;
  background: linear-gradient(180deg, rgb(240 236 225 / 0), var(--canvas) 38%);
}

.tabbar-capsule {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--e-float);
}

.tab {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-height: 44px;
  padding: 5px 0 4px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--ink-secondary);
  font-family: var(--font-rounded);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--tab), color var(--tab);
}

.tab .ico {
  width: 18px;
  height: 18px;
}

.tab[aria-current="page"] {
  background: var(--brand-surface);
  color: var(--brand-strong);
}

.plus-disc {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cta);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 4px 0 var(--cta-pressed),
    var(--e-float);
  cursor: pointer;
  transition: transform var(--press), box-shadow var(--press);
}

.plus-disc .ico {
  width: 24px;
  height: 24px;
  stroke-width: 2.8;
}

.plus-disc:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 0 0 var(--cta-pressed);
}

/* Quick add sheet (§ 3.9, § 3.10) */
.sheet-scrim {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  background: rgb(22 23 26 / 0.3);
  animation: fade-in var(--tab) both;
}

.sheet {
  width: 100%;
  padding: 8px 16px 30px;
  border-radius: 28px 28px 0 0;
  background: var(--canvas);
  animation: sheet-in 280ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.sheet-grabber {
  width: 36px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sheet-head .circle {
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.sheet-head h3 {
  font-size: 19px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line-strong);
  font-family: var(--font-rounded);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.option-card .tile {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.option-card .tile .ico {
  width: 17px;
  height: 17px;
}

.option-card > .ico {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--ink-tertiary);
  stroke-width: 2.8;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
}

/* Celebration (§ 3.22) */
.celebration {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.celebration-badge {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--e-overlay);
  text-align: center;
  animation: badge-in 420ms cubic-bezier(0.3, 1.5, 0.5, 1) both;
}

.celebration-badge .seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
}

.celebration-badge .seal .ico {
  width: 22px;
  height: 22px;
  stroke-width: 3;
}

.celebration-badge strong {
  font-family: var(--font-rounded);
  font-size: 16px;
}

.celebration-badge span {
  color: var(--ink-secondary);
  font-size: 12px;
}

.particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: particle 900ms ease-out both;
}

@keyframes badge-in {
  from { opacity: 0; transform: scale(0.7); }
}

@keyframes particle {
  from { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); }
}

/* ---------- 8. Page: sections ---------- */

.section {
  padding-block: clamp(56px, 7vw, 96px);
}

.section + .section {
  padding-top: clamp(24px, 3vw, 40px);
}

.section-head {
  max-width: 44rem;
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s-card);
  color: var(--brand-strong);
  font-family: var(--font-rounded);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.08;
}

.section-head p:not(.kicker) {
  margin-top: var(--s-card);
  color: var(--ink-secondary);
  font-size: 1.125rem;
}

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-generous);
  margin-top: 48px;
}

.category-card {
  display: grid;
  align-content: start;
  gap: var(--s-standard);
  padding: var(--s-section);
}

.category-card h3 {
  margin-top: var(--s-tight);
  font-size: 1.375rem;
}

.category-card p {
  color: var(--ink-secondary);
  font-size: 1rem;
}

/* Feature deep-dives */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.feature + .feature {
  margin-top: clamp(72px, 10vw, 128px);
}

.feature.reverse .feature-copy {
  order: 2;
}

.feature-copy h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.625rem);
}

.feature-copy > p:not(.kicker) {
  margin-top: var(--s-card);
  color: var(--ink-secondary);
  font-size: 1.125rem;
}

.ticks {
  display: grid;
  gap: var(--s-standard);
  margin: var(--s-section) 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-standard);
  font-size: 1.0625rem;
}

.ticks .tick {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  flex: none;
  border-radius: 50%;
  background: var(--cta);
  color: var(--ink);
}

.ticks .tick .ico {
  width: 14px;
  height: 14px;
  stroke-width: 3.2;
}

/* The mock scenes reuse the phone's component classes at a larger size. */
.scene {
  position: relative;
  display: grid;
  gap: var(--s-card);
  padding: clamp(20px, 3.5vw, 36px);
  border-radius: var(--r-xl);
  background: var(--surface-sunken-strong);
  font-size: 14px;
  line-height: 1.35;
}

.scene .row {
  min-height: 60px;
  padding: 12px 16px;
  gap: 12px;
}

.scene .row-title {
  font-size: 15px;
}

.scene .row-meta {
  font-size: 12.5px;
}

.scene .row-value {
  font-size: 15px;
}

.scene .row .tile {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.scene .row .tile .ico {
  width: 20px;
  height: 20px;
}

.scene .section-label {
  font-size: 1.0625rem;
}

.scene .check {
  width: 24px;
  height: 24px;
}

.assignees {
  display: flex;
  align-items: center;
}

.assignees .avatar {
  --size: 24px;
  margin-left: -6px;
}

.assignees .avatar:first-child {
  margin-left: 0;
}

.order-disc {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: 12px;
  font-weight: 700;
}

.fair-work {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
}

.fair-work .fair-title {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 4px;
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand-strong);
  font-size: 12.5px;
  font-weight: 600;
}

.chip .avatar {
  --size: 22px;
  box-shadow: none;
}

.scene-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--e-float);
}

.scene-bar .btn {
  min-height: 44px;
  font-size: 15px;
}

.scene .balance-card {
  margin: 0;
  padding: 18px;
}

.scene .balance-amount {
  font-size: 34px;
}

.scene .balance-card .caption {
  font-size: 13px;
}

.scene .balance-card .btn {
  min-height: 40px;
  font-size: 14px;
}

.scene .segmented > * {
  min-height: 38px;
  font-size: 14px;
}

.scene-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-secondary);
  font-size: 13px;
}

.scene-note .ico {
  width: 16px;
  height: 16px;
}

.reminder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.86);
  box-shadow: var(--e-float);
  backdrop-filter: blur(12px);
}

.reminder .hero-tile {
  --size: 38px;
  border-radius: 10px;
}

.reminder-body {
  flex: 1;
  min-width: 0;
}

.reminder-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink-secondary);
  font-size: 12px;
}

.reminder-title {
  font-family: var(--font-rounded);
  font-size: 14.5px;
  font-weight: 600;
}

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

.week .day {
  width: auto;
  height: 60px;
  cursor: default;
}

/* Details grid */
.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-generous);
  margin-top: 48px;
}

.detail {
  display: flex;
  align-items: flex-start;
  gap: var(--s-card);
  padding: var(--s-section);
}

.detail h3 {
  font-size: 1.1875rem;
}

.detail p {
  margin-top: 6px;
  color: var(--ink-secondary);
  font-size: 1rem;
}

/* Availability */
.platforms {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s-generous);
  margin-top: 48px;
}

.platform {
  display: grid;
  align-content: start;
  gap: var(--s-card);
  padding: clamp(24px, 3.5vw, 36px);
}

.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-standard);
}

.platform-devices {
  display: flex;
  gap: var(--s-tight);
}

.platform h3 {
  font-size: clamp(1.625rem, 3vw, 2rem);
}

.platform > p {
  color: var(--ink-secondary);
}

.steps {
  display: grid;
  gap: var(--s-standard);
  margin: var(--s-tight) 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-standard);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: 0.875rem;
  font-weight: 700;
}

.platform .btn {
  justify-self: start;
}

.platform-soon {
  background: var(--surface-sunken);
  box-shadow: none;
}

.platform-soon .pill-neutral {
  background: var(--surface);
}

.requirements {
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

/* FAQ */
.faq {
  display: grid;
  gap: var(--s-standard);
  max-width: 50rem;
  margin: 48px auto 0;
}

.faq details {
  padding: 0;
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-card);
  min-height: 64px;
  padding: 18px var(--s-section);
  font-family: var(--font-rounded);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

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

.faq summary .ico {
  width: 20px;
  height: 20px;
  color: var(--ink-tertiary);
  stroke-width: 2.6;
  transition: transform var(--tab);
}

.faq details[open] summary .ico {
  transform: rotate(180deg);
}

.faq details > div {
  display: grid;
  gap: var(--s-standard);
  padding: 0 var(--s-section) var(--s-section);
  color: var(--ink-secondary);
}

/* Closing band */
.closing {
  padding-bottom: clamp(48px, 7vw, 88px);
}

.closing-card {
  display: grid;
  justify-items: center;
  gap: var(--s-generous);
  padding: clamp(40px, 7vw, 80px) var(--s-section);
  border-radius: 36px;
  text-align: center;
  overflow: hidden;
}

.closing-card .hero-tile {
  --size: 84px;
}

.closing-card h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  text-shadow: 2px 3px 0 rgb(0 0 0 / 0.22);
}

.closing-card p {
  max-width: 34rem;
  font-size: 1.125rem;
}

.closing-card .cta-row {
  justify-content: center;
  margin-top: var(--s-tight);
}

/* Footer */
.site-footer {
  padding-block: var(--s-block) 48px;
  color: var(--ink-secondary);
  font-size: 0.9375rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-generous);
  padding-bottom: var(--s-section);
  border-bottom: 1px solid var(--line-strong);
}

.site-footer .brand {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--s-section);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-rounded);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-strong);
}

.footer-legal {
  display: grid;
  gap: 6px;
  padding-top: var(--s-section);
  font-size: 0.8125rem;
}

/* 404 */
.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: var(--s-block) var(--s-generous);
  text-align: center;
}

.not-found .inner {
  display: grid;
  justify-items: center;
  gap: var(--s-generous);
  max-width: 30rem;
}

.not-found h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  text-shadow: 2px 3px 0 rgb(0 0 0 / 0.22);
}

/* ---------- 9. Responsive ---------- */

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

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

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-top: 16px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lede {
    margin-inline: auto;
  }

  .hero .cta-row,
  .fine-print {
    justify-content: center;
  }

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

  .feature.reverse .feature-copy {
    order: 0;
  }

  .site-nav a:not(.btn) {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-bottom: 64px;
  }

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

  .hero .cta-row .btn {
    width: 100%;
  }

  .site-nav .btn {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9375rem;
  }

  .phone {
    width: 300px;
  }

  .phone-screen {
    height: 610px;
  }

  .scene .row {
    padding: 10px 12px;
  }
}

/* ---------- 10. Reduce Motion (DESIGN.md § 6) ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .particle {
    display: none;
  }
}
