/* ==========================================================================
   iRefair app prototype
   Design tokens are the contract for the native build. Each token notes its
   iOS / Android counterpart where one exists.

   Idea: the four leaves of the iRefair mark are the four stages of a
   referral (teal requested, violet meeting, coral with HR, saffron offer).
   Brand colour appears only where it means progress. Chrome is glass,
   content is solid.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand (from the logo) */
  --teal: #06A898;
  --violet: #8C52FE;
  --coral: #EF7246;
  --saffron: #F2BC48;
  --navy: #102561;

  /* Stage text colours (4.5:1 on surface) and soft fills */
  --teal-ink: #00786C;   --teal-soft: #E1F5F2;
  --violet-ink: #6A36DB; --violet-soft: #EFE8FF;
  --coral-ink: #B4461E;  --coral-soft: #FDEBE4;
  --saffron-ink: #8A5800; --saffron-soft: #FDF2D9;

  /* Neutrals. iOS: systemGroupedBackground / secondarySystemGroupedBackground */
  --ground: #F2F3F7;
  --surface: #FFFFFF;
  --surface-2: #F6F7FA;
  --ink: #111318;
  --ink-2: #545A6B;
  --ink-3: #646A7B;
  --hairline: rgba(17, 19, 24, 0.09);
  --separator: rgba(17, 19, 24, 0.12);
  --fill: rgba(116, 122, 138, 0.12);
  --fill-2: rgba(116, 122, 138, 0.2);

  /* Actions */
  --primary: var(--navy);
  --primary-ink: #FFFFFF;
  --primary-press: #0A1A4A;
  --tint: #2747B5;
  --negative: #C4242A;
  --negative-soft: #FDECEC;

  /* Glass. iOS 26: .glassEffect(). Android: blurred translucent surface */
  --glass-bg: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-rim-a: rgba(255, 255, 255, 0.95);
  --glass-rim-b: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 0 0 0.5px rgba(17, 19, 24, 0.06), 0 12px 32px -10px rgba(16, 24, 56, 0.22), 0 2px 6px -2px rgba(16, 24, 56, 0.08);
  --glass-blur: blur(16px) saturate(190%) brightness(1.04);
  --edge-fade: rgba(242, 243, 247, 0.92);

  /* Shape */
  --r-device: 55px;
  --r-sheet: 34px;
  --r-group: 24px;
  --r-card: 22px;
  --r-field: 14px;
  --r-chip: 999px;
  --gutter: 16px;

  /* Type: iOS Dynamic Type defaults (pt == px here) */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;

  /* Motion. iOS default spring approximated as a curve */
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Device frame insets. Real devices override with env() */
  --safe-top: max(env(safe-area-inset-top), 20px);
  --safe-bottom: max(env(safe-area-inset-bottom), 12px);
  --nav-h: 52px;
  --tabbar-h: 62px;
}

.framed { --safe-top: 54px; --safe-bottom: 30px; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --teal-ink: #3FD3C2;   --teal-soft: rgba(6, 168, 152, 0.18);
  --violet-ink: #B99AFF; --violet-soft: rgba(140, 82, 254, 0.2);
  --coral-ink: #FF9C78;  --coral-soft: rgba(239, 114, 70, 0.18);
  --saffron-ink: #F6CB6E; --saffron-soft: rgba(242, 188, 72, 0.18);

  --ground: #000000;
  --surface: #1C1C1E;
  --surface-2: #2A2A2D;
  --ink: #F4F5F8;
  --ink-2: #B3B7C2;
  --ink-3: #9599A6;
  --hairline: rgba(255, 255, 255, 0.09);
  --separator: rgba(255, 255, 255, 0.13);
  --fill: rgba(120, 120, 128, 0.24);
  --fill-2: rgba(120, 120, 128, 0.36);

  --primary: #EEF1FF;
  --primary-ink: #0B1640;
  --primary-press: #D5DBF7;
  --tint: #9DB0FF;
  --negative: #FF6B6B;
  --negative-soft: rgba(255, 69, 58, 0.16);

  --glass-bg: rgba(44, 44, 48, 0.5);
  --glass-strong: rgba(36, 36, 40, 0.82);
  --glass-rim-a: rgba(255, 255, 255, 0.34);
  --glass-rim-b: rgba(255, 255, 255, 0.04);
  --glass-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 12px 32px -10px rgba(0, 0, 0, 0.7);
  --glass-blur: blur(16px) saturate(170%) brightness(0.96);
  --edge-fade: rgba(0, 0, 0, 0.9);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.024em;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--tint); text-decoration: none; }
img, svg { display: block; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 17px; height: 17px; }
.icon-xs { width: 14px; height: 14px; stroke-width: 2; }
.icon-lg { width: 28px; height: 28px; stroke-width: 1.6; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 10px; }

/* ---------- App shell ---------- */
.app {
  position: relative;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--ground);
  isolation: isolate;
}
.stage { position: absolute; inset: 0; overflow: hidden; }
.app.sheet-open .stage { pointer-events: none; }

/* Fake status bar, only inside the showcase frame */
.statusbar {
  position: absolute; z-index: 90; inset: 0 0 auto 0; height: 54px;
  display: none; align-items: center; justify-content: space-between;
  padding: 6px 34px 0 44px; pointer-events: none;
  font-weight: 600; font-size: 17px; letter-spacing: -0.02em;
  color: var(--ink);
}
.framed .statusbar { display: flex; }
.statusbar.on-dark { color: #fff; }
.statusbar .sb-right { display: flex; gap: 6px; align-items: center; }
.statusbar svg { width: auto; height: 12px; fill: currentColor; }
.home-indicator {
  display: none; position: absolute; z-index: 95; left: 50%; bottom: 8px;
  width: 139px; height: 5px; margin-left: -69.5px; border-radius: 3px;
  background: var(--ink); opacity: 0.85; pointer-events: none;
}
.framed .home-indicator { display: block; }

/* ---------- Screen ---------- */
.screen {
  position: absolute; inset: 0;
  background: var(--ground);
  display: flex; flex-direction: column;
  will-change: transform;
  contain: layout paint;
}
.screen.is-under { pointer-events: none; }
.screen .shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 40; }
.scroll {
  position: relative; flex: 1;
  scroll-padding-top: calc(var(--safe-top) + var(--nav-h) + 8px);
  scroll-padding-bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 24px);
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  padding: calc(var(--safe-top) + var(--nav-h)) 0 calc(var(--safe-bottom) + 24px);
}
.scroll::-webkit-scrollbar { display: none; }
.has-tabbar .scroll { padding-bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 40px); }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }

/* Navigation bar. iOS 26: transparent bar, glass buttons, scroll edge effect */
.navbar {
  position: absolute; z-index: 30; left: 0; right: 0; top: 0;
  height: calc(var(--safe-top) + var(--nav-h));
  padding: var(--safe-top) 12px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  pointer-events: none;
}
.navbar > * { pointer-events: auto; }
.navbar .nav-lead { justify-self: start; display: flex; gap: 8px; }
.navbar .nav-trail { justify-self: end; display: flex; gap: 8px; }
.nav-title {
  font-size: 17px; font-weight: 600; letter-spacing: -0.024em;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s, transform 0.25s var(--ease-out);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}
.screen.scrolled .nav-title, .navbar.title-always .nav-title { opacity: 1; transform: none; }
.edge-top {
  position: absolute; z-index: 20; left: 0; right: 0; top: 0;
  height: calc(var(--safe-top) + var(--nav-h) + 24px);
  pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: linear-gradient(var(--edge-fade) 0%, var(--edge-fade) 45%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent);
}
.screen.scrolled .edge-top { opacity: 1; }
.edge-bottom {
  position: absolute; z-index: 20; left: 0; right: 0; bottom: 0;
  height: calc(var(--safe-bottom) + var(--tabbar-h) + 30px); pointer-events: none;
  background: linear-gradient(transparent, var(--edge-fade) 75%);
  -webkit-mask-image: linear-gradient(transparent, #000 50%); mask-image: linear-gradient(transparent, #000 50%);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

/* Large title */
.large-title-wrap { padding: 2px var(--gutter) 14px; }
.eyebrow-date { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.large-title {
  margin: 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.022em;
  transform-origin: left center;
}
.large-sub { margin: 4px 0 0; font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; text-wrap: pretty; }

/* ---------- Glass ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), inset 0 1px 0.5px rgba(255, 255, 255, 0.55), inset 0 -0.5px 0.5px rgba(255, 255, 255, 0.25);
}
:root[data-theme="dark"] .glass { box-shadow: var(--glass-shadow), inset 0 1px 0.5px rgba(255, 255, 255, 0.16); }
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(150deg, var(--glass-rim-a), var(--glass-rim-b) 38%, var(--glass-rim-b) 62%, var(--glass-rim-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.85;
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(140% 90% at 25% -10%, rgba(255, 255, 255, 0.42), transparent 55%);
  opacity: 0.7;
}
:root[data-theme="dark"] .glass::after { opacity: 0.18; }
.glass > * { position: relative; z-index: 3; }
.glass.refract { -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--refract, none) var(--glass-blur); }

/* Glass circular button (nav bar, close) */
.gbtn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; color: var(--ink);
  transition: transform 0.35s var(--ease-out);
}
.gbtn:active { transform: scale(1.12); }
.gbtn.pill { width: auto; padding: 0 16px; border-radius: 22px; font-weight: 600; font-size: 17px; gap: 4px; display: inline-flex; align-items: center; }
.gbtn.pill.tinted { color: var(--tint); }
.gbtn .badge-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--surface); z-index: 4; }
.gbtn.avatar-btn { padding: 0; overflow: hidden; }

/* ---------- Tab bar. iOS 26 floating glass capsule ---------- */
.tabbar-wrap {
  position: absolute; z-index: 60; left: 0; right: 0; bottom: calc(var(--safe-bottom) - 4px);
  display: flex; align-items: center; gap: 10px; padding: 0 20px;
  pointer-events: none;
  transition: transform 0.45s var(--ease-ios), opacity 0.3s;
}
.tabbar-wrap.hidden { transform: translateY(140%); opacity: 0; visibility: hidden; transition: transform 0.45s var(--ease-ios), opacity 0.3s, visibility 0s 0.45s; }
.tabbar {
  pointer-events: auto; flex: 1; height: var(--tabbar-h); border-radius: 31px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center;
  padding: 4px; touch-action: none; user-select: none; -webkit-user-select: none;
}
.tab {
  position: relative; z-index: 4; height: 54px; border-radius: 27px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--ink); font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0;
  transition: color 0.2s;
}
.tab .icon { width: 24px; height: 24px; stroke-width: 1.7; transition: transform 0.4s var(--ease-out); }
.tab.active { color: var(--tint); }
.tab.active .icon { stroke-width: 2; }
.tab.active .icon .fillable { fill: currentColor; fill-opacity: 0.16; }
.tab-lens {
  position: absolute; z-index: 3; top: 4px; left: 4px; height: 54px; border-radius: 27px;
  background: var(--fill); pointer-events: none;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.5);
  transform-origin: center;
}
:root[data-theme="dark"] .tab-lens { background: rgba(255, 255, 255, 0.12); }
.tabbar.dragging .tab-lens { background: rgba(255, 255, 255, 0.5); box-shadow: 0 6px 18px -6px rgba(16, 24, 56, 0.3), inset 0 0 0 0.5px rgba(255, 255, 255, 0.8); }
.tab-search {
  pointer-events: auto; width: var(--tabbar-h); height: var(--tabbar-h); border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); flex: none;
  transition: transform 0.35s var(--ease-out);
}
.tab-search:active { transform: scale(1.1); }
.tab-search .icon { width: 24px; height: 24px; }

/* ---------- Type helpers ---------- */
.title1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.022em; margin: 0; text-wrap: balance; }
.title2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.title3 { font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.headline { font-size: 17px; line-height: 22px; font-weight: 600; margin: 0; }
.body { font-size: 17px; line-height: 22px; margin: 0; }
.callout { font-size: 16px; line-height: 21px; letter-spacing: -0.02em; margin: 0; }
.subhead { font-size: 15px; line-height: 20px; letter-spacing: -0.016em; margin: 0; }
.footnote { font-size: 13px; line-height: 18px; letter-spacing: -0.006em; margin: 0; }
.caption { font-size: 12px; line-height: 16px; letter-spacing: 0; margin: 0; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.pretty { text-wrap: pretty; }

/* ---------- Sections and grouped lists ---------- */
.section { margin-top: 26px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 0 calc(var(--gutter) + 4px) 8px;
}
.section-head h2 { margin: 0; font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -0.02em; }
.section-head .link { font-size: 15px; font-weight: 500; color: var(--tint); white-space: nowrap; }
.section-foot { padding: 8px calc(var(--gutter) + 4px) 0; font-size: 13px; line-height: 18px; color: var(--ink-3); text-wrap: pretty; }
.group-label { padding: 0 calc(var(--gutter) + 4px) 7px; font-size: 13px; line-height: 18px; color: var(--ink-3); font-weight: 500; }

.group {
  margin: 0 var(--gutter);
  background: var(--surface); border-radius: var(--r-group);
  overflow: hidden;
}
.row {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 11px 16px;
  text-align: left; color: var(--ink);
  transition: background-color 0.15s;
}
button.row:active, a.row:active, .row.tappable:active { background: var(--fill); }
.row + .row::before, .row + .field::before, .field + .row::before, .field + .field::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 0.5px; background: var(--separator);
}
.row.inset-sep + .row::before { left: 64px; }
.group.inset-sep-60 .row + .row::before { left: 68px; }
.row .row-main { flex: 1; min-width: 0; }
.row .row-title { font-size: 17px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .row-title.wrap { white-space: normal; }
.row .row-sub { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .row-sub.wrap { white-space: normal; text-wrap: pretty; }
.row .row-value { color: var(--ink-2); font-size: 17px; white-space: nowrap; }
.row .chev { color: var(--ink-3); opacity: 0.7; width: 15px; height: 15px; stroke-width: 2.4; }
.row .row-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--ink); }
.row .row-icon .icon { width: 18px; height: 18px; }
.row.destructive { color: var(--negative); }
.row.destructive .row-title { color: var(--negative); }
.row.center { justify-content: center; }
.row.center .row-title { font-weight: 500; }
.row.tint .row-title { color: var(--tint); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 26px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.024em; white-space: nowrap;
  transition: transform 0.3s var(--ease-out), background-color 0.15s, opacity 0.2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn.block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:active { background: var(--primary-press); }
.btn-secondary { background: var(--fill); color: var(--ink); }
.btn-secondary:active { background: var(--fill-2); }
.btn-tinted { background: color-mix(in srgb, var(--tint) 12%, transparent); color: var(--tint); }
.btn-plain { color: var(--tint); height: 44px; padding: 0 12px; }
.btn-destructive { background: var(--negative-soft); color: var(--negative); }
.btn-glass { color: var(--ink); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 15px; border-radius: 18px; letter-spacing: -0.016em; }
.btn.md { height: 44px; padding: 0 18px; border-radius: 22px; }
.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; }
.btn.is-loading { pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.btn-stack { display: grid; gap: 10px; }

/* Bottom action dock (sign-up, request flow) */
.dock {
  position: absolute; z-index: 40; left: 0; right: 0; bottom: 0;
  padding: 14px var(--gutter) calc(var(--safe-bottom) + 8px);
  background: linear-gradient(transparent, var(--ground) 26%);
}
.dock .dock-note { text-align: center; margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--ink-3); text-wrap: pretty; }
.dock.over-sheet { background: linear-gradient(transparent, var(--sheet-ground, var(--surface)) 26%); }

/* ---------- Form fields. Label stays visible above the value ---------- */
.field {
  position: relative; display: block; padding: 10px 16px 11px; background: var(--surface);
}
.field-label { display: block; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.006em; margin-bottom: 3px; }
.field-label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea, .field .field-value {
  display: block; width: 100%; border: 0; padding: 0; margin: 0; background: transparent;
  font-size: 17px; line-height: 24px; color: var(--ink); outline: none; letter-spacing: -0.024em;
  min-height: 24px;
}
.field textarea { resize: none; min-height: 72px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field:focus-within .field-label { color: var(--tint); }
.field.has-error .field-label { color: var(--negative); }
.field-error { display: none; margin-top: 4px; font-size: 13px; line-height: 17px; color: var(--negative); }
.field.has-error .field-error { display: block; }
.field-row { display: flex; align-items: center; gap: 8px; }
.field-row input { flex: 1; min-width: 0; }
.field .prefix-btn { display: inline-flex; align-items: center; gap: 3px; font-size: 17px; color: var(--ink); padding-right: 8px; border-right: 0.5px solid var(--separator); margin-right: 2px; }
.field .prefix-btn .icon { width: 13px; height: 13px; color: var(--ink-3); stroke-width: 2.4; }
.field.select { cursor: pointer; }
.field.select .field-value { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field.select .field-value .placeholder { color: var(--ink-3); }
.field.select .icon { color: var(--ink-3); width: 16px; height: 16px; stroke-width: 2.2; }
.field-help { padding: 8px calc(var(--gutter) + 4px) 0; font-size: 13px; line-height: 18px; color: var(--ink-3); text-wrap: pretty; }

/* Choice chips (single or multi) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--gutter); }
.chips.scroller { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: -2px; }
.chips.scroller::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-chip);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; letter-spacing: -0.016em; white-space: nowrap;
  box-shadow: inset 0 0 0 0.5px var(--separator);
  transition: background-color 0.18s, color 0.18s, transform 0.25s var(--ease-out), box-shadow 0.18s;
}
.chip:active { transform: scale(0.96); }
.chip .icon { width: 16px; height: 16px; stroke-width: 2.4; display: none; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.chip[aria-pressed="true"] .icon, .chip[aria-checked="true"] .icon { display: block; }
.chips.on-fill .chip { background: var(--fill); box-shadow: none; }
.chips.on-fill .chip[aria-pressed="true"] { background: var(--ink); }

/* Segmented control. iOS UISegmentedControl / Android SegmentedButton */
.segmented {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: 36px; padding: 2px; border-radius: 18px; background: var(--fill);
  margin: 0 var(--gutter);
}
.segmented.in-field { margin: 4px 0 0; }
.segmented button { position: relative; z-index: 2; border-radius: 16px; font-size: 15px; font-weight: 500; letter-spacing: -0.016em; color: var(--ink); }
.segmented button[aria-checked="true"] { font-weight: 600; }
.seg-thumb {
  position: absolute; z-index: 1; top: 2px; bottom: 2px; left: 2px; border-radius: 16px;
  background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}
:root[data-theme="dark"] .seg-thumb { background: #636366; }

/* Toggle. iOS UISwitch */
.switch { position: relative; width: 63px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch .track { position: absolute; inset: 0; border-radius: 14px; background: var(--fill-2); transition: background-color 0.25s; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 39px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transition: transform 0.35s var(--ease-out); }
.switch input:checked + .track { background: var(--teal); }
.switch input:checked ~ .knob { transform: translateX(20px); }
.switch input:focus-visible ~ .knob { outline: 2px solid var(--tint); outline-offset: 2px; }

/* Check row (consent) */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); display: grid; place-items: center; transition: background-color 0.2s, box-shadow 0.2s; margin-top: -1px; }
.check .box .icon { width: 14px; height: 14px; stroke-width: 3; color: #fff; opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.check input:checked + .box { background: var(--teal); box-shadow: none; }
.check input:checked + .box .icon { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 2px solid var(--tint); outline-offset: 2px; }
.check .check-text { font-size: 15px; line-height: 20px; letter-spacing: -0.016em; }

/* Search field. iOS UISearchBar */
.searchbar {
  display: flex; align-items: center; gap: 6px; height: 40px; margin: 0 var(--gutter); padding: 0 10px;
  border-radius: 20px; background: var(--fill); color: var(--ink-3);
}
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--ink); }
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar .clear { display: none; position: relative; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-3); color: var(--surface); place-items: center; }
.searchbar .clear::before { content: ""; position: absolute; inset: -12px; }
.searchbar .clear .icon { width: 12px; height: 12px; stroke-width: 3; }
.searchbar.has-value .clear { display: grid; }

/* ---------- Identity ---------- */
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; font-weight: 600; letter-spacing: 0;
  color: var(--ink); background: var(--fill);
  font-family: var(--font-rounded);
}
.avatar.lg { width: 84px; height: 84px; font-size: 32px; }
.avatar.md { width: 52px; height: 52px; font-size: 19px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.logo-tile {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  font-family: var(--font-rounded);
  background: var(--lt-bg, var(--fill)); color: var(--lt-ink, var(--ink));
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}
.logo-tile.lg { width: 76px; height: 76px; border-radius: 20px; font-size: 32px; }
.logo-tile.md { width: 56px; height: 56px; border-radius: 15px; font-size: 23px; }
.logo-tile.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }

/* Status pill: soft tint, ink of the same hue */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0; white-space: nowrap;
  background: var(--fill); color: var(--ink-2);
}
.pill.s1 { background: var(--teal-soft); color: var(--teal-ink); }
.pill.s2 { background: var(--violet-soft); color: var(--violet-ink); }
.pill.s3 { background: var(--coral-soft); color: var(--coral-ink); }
.pill.s4 { background: var(--saffron-soft); color: var(--saffron-ink); }
.pill.neg { background: var(--negative-soft); color: var(--negative); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Leaves: the progress system ---------- */
.leaves { display: block; overflow: visible; }
.leaves .leaf-bg { fill: var(--fill-2); }
.leaves .leaf-fill { transform-box: fill-box; }
.leaves.mini { width: 34px; height: 18px; }
.leaves.md { width: 64px; height: 34px; }
.stage-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stage-track .st-label { font-size: 12px; line-height: 15px; font-weight: 600; color: var(--ink-3); text-align: center; letter-spacing: 0; }
.stage-track .st-label.done { color: var(--ink); }
.stage-track .st-label.now { color: var(--ink); }

/* Stepper header for multi-step forms */
.stepper { display: flex; align-items: center; gap: 14px; padding: 4px var(--gutter) 18px; }
.stepper .leaves { width: 78px; height: 41px; flex: none; }
.stepper .step-count { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.stepper .step-name { font-size: 17px; line-height: 22px; font-weight: 600; }
.progress-rail { position: relative; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin: 0 var(--gutter); }
.progress-rail .pr-fill { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); border-radius: 2px;
  background: linear-gradient(90deg, var(--teal) 0 25%, var(--violet) 25% 50%, var(--coral) 50% 75%, var(--saffron) 75% 100%);
  background-size: 100% 100%; }

/* ---------- Cards ---------- */
.card { margin: 0 var(--gutter); background: var(--surface); border-radius: var(--r-card); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card-title { font-size: 17px; line-height: 22px; font-weight: 600; margin: 0; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.card .meta-item { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); letter-spacing: -0.016em; }
.card .meta-item .icon { width: 16px; height: 16px; color: var(--ink-3); }
.card-actions { display: flex; gap: 8px; margin-top: 14px; }
.card-actions .btn { flex: 1; }

/* Needs-you card carries a stage colour on its left rail */
.action-card { position: relative; overflow: hidden; }
.action-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 3px 3px 0; background: var(--rail, var(--violet)); }
.action-card .who { display: flex; gap: 12px; align-items: center; }

/* Member pass (iRAIN / iRREF). Wallet-style */
.pass {
  position: relative; margin: 0 var(--gutter); border-radius: 24px; overflow: hidden;
  padding: 18px 18px 16px; color: #fff; background: #0E1A45;
  box-shadow: 0 18px 40px -18px rgba(16, 37, 97, 0.6);
  isolation: isolate;
}
.pass .pass-leaves { position: absolute; right: -36px; top: -30px; width: 230px; height: 120px; opacity: 0.95; z-index: -1; }
.pass .pass-sheen { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 40%); }
.pass .pass-kind { font-size: 13px; line-height: 18px; font-weight: 600; opacity: 0.75; letter-spacing: 0; }
.pass .pass-name { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 30px; }
.pass .pass-id-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.pass .pass-id-label { font-size: 12px; line-height: 16px; opacity: 0.7; font-weight: 500; }
.pass .pass-id { font-size: 19px; line-height: 24px; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.pass .pass-copy { height: 34px; padding: 0 14px; border-radius: 17px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.35); }
.pass .pass-copy .icon { width: 16px; height: 16px; }

/* Summary strip: type, not tiles */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 var(--gutter); background: var(--surface); border-radius: var(--r-card); padding: 14px 0; }
.strip > div { padding: 0 12px; text-align: left; }
.strip > div + div { border-left: 0.5px solid var(--separator); }
.strip .k { font-size: 12px; line-height: 16px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.strip .v { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* Horizontal card rail */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
.co-card { width: 220px; background: var(--surface); border-radius: var(--r-card); padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 12px; transition: transform 0.3s var(--ease-out); }
.co-card:active { transform: scale(0.97); }
.co-card .co-name { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-card .co-sub { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; }

/* Empty state: keeps its frame */
.empty { margin: 0 var(--gutter); border-radius: var(--r-card); border: 1px dashed var(--separator); padding: 22px 18px; text-align: center; }
.empty .title3 { margin-bottom: 4px; }
.empty p { margin: 0 auto; max-width: 290px; }
.empty .btn { margin-top: 14px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 6px 16px; }
.timeline li { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 10px 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 26px; bottom: -10px; width: 2px; border-radius: 1px; background: var(--fill-2); }
.timeline li:last-child::before { display: none; }
.timeline .t-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; background: var(--fill-2); box-shadow: 0 0 0 3px var(--surface); }
.timeline .t-title { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.016em; }
.timeline .t-when { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.timeline .t-note { font-size: 15px; line-height: 20px; color: var(--ink-2); margin-top: 2px; letter-spacing: -0.016em; }

/* Key-value list */
.kv .row { min-height: 48px; }
.kv .row .k { color: var(--ink-2); font-size: 15px; letter-spacing: -0.016em; flex: none; }
.kv .row .v { flex: 1; min-width: 0; text-align: right; font-size: 15px; letter-spacing: -0.016em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv .row .v.num { font-variant-numeric: tabular-nums; }

/* Upload card */
.upload {
  margin: 0 var(--gutter); width: calc(100% - 2 * var(--gutter));
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-card);
  background: var(--surface); text-align: left; border: 1.5px dashed var(--separator);
  transition: border-color 0.2s, transform 0.25s var(--ease-out);
}
.upload:active { transform: scale(0.98); }
.upload.has-file { border-style: solid; border-color: transparent; }
.upload .u-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--fill); color: var(--ink); flex: none; position: relative; }
.upload.has-file .u-icon { background: var(--teal-soft); color: var(--teal-ink); }
.upload .u-ring { position: absolute; inset: -3px; width: 52px; height: 52px; transform: rotate(-90deg); }
.upload .u-ring circle { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; }
.upload .u-title { font-size: 17px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload .u-sub { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; }
.upload.has-error { border-color: var(--negative); }

/* Info note */
.note { display: flex; gap: 10px; margin: 0 var(--gutter); padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.note .icon { width: 18px; height: 18px; color: var(--ink-2); margin-top: 1px; }
.note p { margin: 0; font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; text-wrap: pretty; }
.note strong { color: var(--ink); font-weight: 600; }
.note.warn { background: var(--saffron-soft); }
.note.warn .icon, .note.warn p { color: var(--saffron-ink); }
.note.warn strong { color: var(--saffron-ink); }

/* ---------- Sheets. iOS 26 glass sheet with detents ---------- */
.sheet-layer { position: absolute; inset: 0; z-index: 70; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.28); opacity: 0; pointer-events: auto; }
.sheet {
  --sheet-ground: var(--glass-strong);
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  max-height: calc(100% - var(--safe-top) - 8px);
  border-radius: var(--r-sheet);
  display: flex; flex-direction: column;
  pointer-events: auto; overflow: hidden;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 -10px 40px -10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overscroll-behavior: contain;
  will-change: transform;
}
:root[data-theme="dark"] .sheet { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 -10px 40px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.sheet.large { top: calc(var(--safe-top) + 8px); left: 0; right: 0; bottom: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; --sheet-ground: var(--ground); }
.sheet-grabber { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grabber::before { content: ""; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); }
.sheet-head { flex: none; display: grid; grid-template-columns: minmax(44px, 1fr) minmax(0, auto) minmax(44px, 1fr); align-items: center; gap: 8px; padding: 0 12px 6px; touch-action: none; }
.sheet-head .sh-title { margin: 0; font-size: 17px; line-height: 22px; font-weight: 600; text-align: center; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.024em; }
.sheet-head .sh-lead { justify-self: start; }
.sheet-head .sh-trail { justify-self: end; }
.sheet-head .gbtn { width: 38px; height: 38px; }
.sheet-head .gbtn .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 0 20px; scrollbar-width: none; overscroll-behavior: contain; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet .group, .sheet .card { background: var(--surface); }
.sheet:not(.large) .group, .sheet:not(.large) .card { background: color-mix(in srgb, var(--surface) 78%, transparent); }
.sheet-foot { flex: none; padding: 10px var(--gutter) calc(var(--safe-bottom) - 2px); }
.sheet:not(.large) .sheet-foot { padding-bottom: 16px; }
.sheet-intro { padding: 4px 20px 16px; text-align: center; }
.sheet-intro .title2 { margin-bottom: 6px; }
.sheet-intro p { margin: 0 auto; max-width: 320px; }
.stage-scale { transition: transform 0.5s var(--ease-ios), border-radius 0.5s var(--ease-ios); }

/* ---------- Alerts. iOS 26 alert ---------- */
.alert-layer { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0, 0, 0, 0.25); padding: 40px; }
.alert { width: 100%; max-width: 300px; border-radius: 30px; padding: 20px 18px 16px; text-align: center; }
.alert .alert-title { font-size: 17px; line-height: 22px; font-weight: 600; margin: 0 0 6px; }
.alert .alert-msg { font-size: 15px; line-height: 20px; color: var(--ink-2); margin: 0 0 18px; text-wrap: pretty; letter-spacing: -0.016em; }
.alert .btn { height: 46px; border-radius: 23px; }

/* ---------- Banner (push notification + toast) ---------- */
.banner-layer { position: absolute; z-index: 85; left: 8px; right: 8px; top: calc(var(--safe-top) - 6px); pointer-events: none; display: grid; gap: 8px; }
.banner {
  pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 24px; text-align: left; width: 100%;
}
.banner .b-app { width: 38px; height: 38px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
.banner .b-app svg { width: 30px; height: auto; }
.banner .b-main { flex: 1; min-width: 0; }
.banner .b-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; line-height: 20px; }
.banner .b-top strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .b-top span { color: var(--ink-2); font-size: 13px; flex: none; }
.banner .b-text { font-size: 15px; line-height: 20px; color: var(--ink); letter-spacing: -0.016em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast-layer { position: absolute; z-index: 86; left: 0; right: 0; bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 18px); display: grid; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px 10px 14px; border-radius: 22px; font-size: 15px; font-weight: 600; letter-spacing: -0.016em; max-width: calc(100% - 40px); }
.toast .icon { width: 20px; height: 20px; color: var(--teal-ink); stroke-width: 2.2; }

/* ---------- Menu (UIMenu) ---------- */
.menu-layer { position: absolute; inset: 0; z-index: 82; }
.menu { position: absolute; min-width: 230px; max-width: 280px; border-radius: 22px; padding: 6px; transform-origin: top right; }
.menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border-radius: 16px; font-size: 17px; text-align: left; }
.menu button:active { background: var(--fill); }
.menu button.destructive { color: var(--negative); }
.menu .icon { width: 20px; height: 20px; }
.menu hr { border: 0; height: 0.5px; background: var(--separator); margin: 4px 10px; }

/* ---------- Onboarding ---------- */
.ob { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); overflow: hidden; }
:root[data-theme="dark"] .ob { background: #000; }
.ob-hero { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.ob-hero .hero-mark { position: absolute; left: 50%; top: 46%; width: 128%; transform: translate(-50%, -50%); overflow: visible; }
.ob-hero .hero-mark .leaf { transform-box: fill-box; transform-origin: 50% 100%; }
.ob-copy { flex: none; padding: 0 24px calc(var(--safe-bottom) + 10px); }
.ob-copy .wordmark-sm { height: 26px; width: auto; margin-bottom: 16px; }
.ob-copy h1 { margin: 0; font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
.ob-copy p.lead { margin: 10px 0 0; font-size: 17px; line-height: 23px; color: var(--ink-2); text-wrap: pretty; }
.ob-actions { display: grid; gap: 4px; margin-top: 26px; }
.ob-legal { margin: 10px 0 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.ob-legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.lang-pill { position: absolute; z-index: 5; right: 16px; top: calc(var(--safe-top) + 4px); height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; letter-spacing: -0.016em; }
.lang-pill .icon { width: 17px; height: 17px; }

/* How it works pager */
.pager { position: relative; flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pager::-webkit-scrollbar { display: none; }
.page { flex: none; width: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 64px) 28px 0; }
.page .pg-art { flex: 1; min-height: 0; display: grid; place-items: center; }
.page .pg-copy { padding-bottom: 24px; min-height: 200px; }
.page .pg-step { font-size: 15px; font-weight: 600; letter-spacing: -0.016em; margin-bottom: 8px; }
.page h2 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.024em; text-wrap: balance; }
.page p { margin: 10px 0 0; font-size: 17px; line-height: 23px; color: var(--ink-2); text-wrap: pretty; }
.pager-foot { flex: none; padding: 0 24px calc(var(--safe-bottom) + 10px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pager-dots { display: flex; gap: 6px; align-items: flex-end; }
.pager-dots svg { width: 58px; height: 30px; }
.skip-btn { position: absolute; z-index: 5; right: 16px; top: calc(var(--safe-top) + 4px); }

/* Scene art inside pages: built from real UI pieces */
.scene { position: relative; width: 100%; max-width: 330px; aspect-ratio: 1 / 1; }
.scene .s-card { position: absolute; background: var(--surface); border-radius: 20px; box-shadow: 0 18px 40px -16px rgba(16, 24, 56, 0.28), 0 0 0 0.5px var(--hairline); padding: 12px; display: flex; align-items: center; gap: 10px; }
:root[data-theme="dark"] .scene .s-card { background: #1C1C1E; }
.scene .s-card .s-t { font-size: 15px; font-weight: 600; letter-spacing: -0.016em; line-height: 19px; }
.scene .s-card .s-s { font-size: 13px; color: var(--ink-2); line-height: 17px; }
.scene .s-blob { position: absolute; border-radius: 50%; }

/* Role choice */
.role-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; width: 100%;
  padding: 18px; border-radius: 26px; background: var(--surface); overflow: hidden;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.2s, transform 0.3s var(--ease-out);
}
.role-card:active { transform: scale(0.98); }
.role-card[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.role-card .rc-art { width: 100%; height: 92px; position: relative; margin-bottom: 8px; }
.role-card .rc-title { font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -0.02em; }
.role-card .rc-text { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; text-wrap: pretty; }
.role-card .rc-check { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--separator); display: grid; place-items: center; }
.role-card .rc-check .icon { width: 15px; height: 15px; stroke-width: 3; color: var(--surface); opacity: 0; }
.role-card[aria-checked="true"] .rc-check { background: var(--ink); box-shadow: none; }
.role-card[aria-checked="true"] .rc-check .icon { opacity: 1; }

/* Plain screen header used in onboarding forms */
.form-head { padding: 0 var(--gutter) 18px; }
.form-head h1 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.024em; text-wrap: balance; }
.form-head p { margin: 8px 0 0; font-size: 17px; line-height: 23px; color: var(--ink-2); text-wrap: pretty; }

/* Success */
.success { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ground); }
.success-art { display: grid; place-items: center; padding-top: calc(var(--safe-top) + 40px); }
.success-art svg { width: 200px; height: auto; overflow: visible; }
.success h1 { text-align: center; margin: 20px 24px 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.024em; text-wrap: balance; }
.success p.lead { text-align: center; margin: 8px 28px 0; font-size: 17px; line-height: 23px; color: var(--ink-2); text-wrap: pretty; }

/* Launch overlay */
.launch { position: absolute; inset: 0; z-index: 100; background: var(--surface); display: grid; place-items: center; }
:root[data-theme="dark"] .launch { background: #000; }
.launch svg { width: 210px; height: auto; overflow: visible; }
.launch .leaf, .launch .glyph, .launch .eye { transform-box: fill-box; }
:root[data-theme="dark"] .launch .wordmark, :root[data-theme="dark"] .hero-wordmark { fill: #fff; }
:root[data-theme="dark"] .launch .smile, :root[data-theme="dark"] .smile-ink { stroke: #fff; }

/* Mode switch overlay */
.mode-wipe { position: absolute; inset: 0; z-index: 99; pointer-events: none; overflow: hidden; }
.mode-wipe .mw-band { position: absolute; top: -20%; bottom: -20%; width: 40%; border-radius: 999px; }
.mode-wipe .mw-label { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 700; letter-spacing: -0.024em; opacity: 0; text-align: center; padding: 0 30px; }

/* Company hero */
.co-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px var(--gutter) 0; }
.co-hero .title1 { margin-top: 14px; }
.co-hero .co-hero-sub { margin-top: 4px; font-size: 17px; color: var(--ink-2); }
.co-hero .approved { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--teal-ink); }
.co-hero .approved .icon { width: 16px; height: 16px; }
.co-hero .btn-row { width: 100%; margin-top: 20px; }

/* How-to steps inside a card */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps .n.s1 { background: var(--teal-soft); color: var(--teal-ink); } .steps .n.s2 { background: var(--violet-soft); color: var(--violet-ink); }
.steps .n.s3 { background: var(--coral-soft); color: var(--coral-ink); } .steps .n.s4 { background: var(--saffron-soft); color: var(--saffron-ink); }
.steps .s-title { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.016em; }
.steps .s-text { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; text-wrap: pretty; }

/* Application header */
.app-head { display: flex; gap: 14px; align-items: center; padding: 0 var(--gutter); }
.app-head .ah-main { min-width: 0; }
.app-head .ah-role { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.app-head .ah-co { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; }
.stage-card { margin: 18px var(--gutter) 0; background: var(--surface); border-radius: var(--r-card); padding: 18px 16px 16px; }
.stage-card .big-leaves { width: 100%; height: auto; max-width: 250px; margin: 0 auto 14px; display: block; overflow: visible; }
.status-block { margin: 12px var(--gutter) 0; background: var(--surface); border-radius: var(--r-card); padding: 16px; }
.status-block .sb-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.status-block h3 { margin: 0; font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.status-block p { margin: 6px 0 0; font-size: 15px; line-height: 21px; color: var(--ink-2); letter-spacing: -0.016em; text-wrap: pretty; }
.status-block .quote { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 15px; line-height: 21px; color: var(--ink); letter-spacing: -0.016em; }
.status-block .quote .q-by { display: block; font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.slot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.slot .cal { width: 46px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface); text-align: center; box-shadow: inset 0 0 0 0.5px var(--hairline); }
.slot .cal .m { font-size: 11px; line-height: 16px; font-weight: 700; color: #fff; background: #B4461E; letter-spacing: 0.02em; text-transform: uppercase; }
.slot .cal .d { font-size: 21px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot .s-main .s-t { font-size: 17px; line-height: 22px; font-weight: 600; }
.slot .s-main .s-s { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; }

/* Application rows */
.app-row .leaves.mini { margin-top: 6px; }
.app-row .row-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.app-row .when { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Slots picker (schedule) */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gutter); scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 58px; padding: 8px 0 10px; border-radius: 18px; background: var(--surface); text-align: center; transition: background-color 0.2s, color 0.2s; }
.day .dw { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.day .dn { font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day[aria-checked="true"] { background: var(--ink); color: var(--surface); }
.day[aria-checked="true"] .dw { color: inherit; opacity: 0.7; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 var(--gutter); }
.time { height: 44px; border-radius: 14px; background: var(--surface); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color 0.2s, color 0.2s; }
.time[aria-checked="true"] { background: var(--ink); color: var(--surface); }

/* Option list (status update) */
.opt-list .row { align-items: flex-start; padding-top: 13px; padding-bottom: 13px; }
.opt-list .row .row-icon { margin-top: 1px; }
.opt-list .row .row-sub { white-space: normal; }

/* CV preview */
.cv-page { margin: 0 var(--gutter); background: #fff; color: #1a1a1a; border-radius: 10px; padding: 26px 22px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.3); font-size: 11px; line-height: 15px; letter-spacing: 0; }
.cv-page h4 { margin: 0; font-size: 18px; line-height: 22px; letter-spacing: -0.01em; }
.cv-page .cv-sub { color: #555; margin-top: 2px; }
.cv-page h5 { margin: 16px 0 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: #444; }
.cv-page p { margin: 0 0 6px; color: #333; }
.cv-page .cv-sample { display: inline-block; margin-bottom: 12px; padding: 2px 8px; border-radius: 6px; background: #f1f1f1; color: #666; font-size: 10px; font-weight: 600; }

/* Notification preview (permission screen) */
.notif-demo { position: relative; margin: 0 auto; width: 100%; max-width: 340px; }

/* Misc */
.spacer-8 { height: 8px; } .spacer-12 { height: 12px; } .spacer-16 { height: 16px; } .spacer-24 { height: 24px; } .spacer-32 { height: 32px; }
.center { text-align: center; }
.hstack { display: flex; align-items: center; gap: 8px; }
.copy-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--tint); font-weight: 500; }
.copy-inline .icon { width: 16px; height: 16px; }
.divider { height: 0.5px; background: var(--separator); margin: 0 16px; }
.footer-note { padding: 26px 28px 0; text-align: center; font-size: 13px; line-height: 18px; color: var(--ink-3); text-wrap: pretty; }
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 var(--gutter); }
.profile-head .title2 { margin-top: 12px; }
.profile-head .ph-sub { margin-top: 2px; font-size: 15px; color: var(--ink-2); letter-spacing: -0.016em; }
.mode-card { margin: 0 var(--gutter); width: calc(100% - 2 * var(--gutter)); display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-card); background: var(--surface); text-align: left; transition: transform 0.3s var(--ease-out); }
.mode-card:active { transform: scale(0.98); }
.mode-card .mc-art { width: 54px; height: 54px; flex: none; }
.mode-card .mc-title { font-size: 17px; line-height: 22px; font-weight: 600; }
.mode-card .mc-text { font-size: 15px; line-height: 20px; color: var(--ink-2); letter-spacing: -0.016em; }

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

/* Focus: visible for keyboard, never clipped, never under the glass bars */
.group :focus-visible, .chips.scroller :focus-visible, .rail :focus-visible, .days :focus-visible, .card :focus-visible { outline-offset: -2px; }
@media (pointer: fine) {
  .field:focus-within { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tint) 55%, transparent); border-radius: inherit; }
  .searchbar:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--tint) 55%, transparent); }
}
.field { cursor: text; }
.field .field-label { cursor: pointer; }
h1.ah-role { margin: 0; }
.toast-action { margin-left: 6px; padding: 4px 10px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent); }
label.row { cursor: pointer; }
