/* ╔══════════════════════════════════════════════════════════════════╗
   ║  R247 — Public pages: home, privacy, terms, 404 · macOS          ║
   ║  Tokens, traffic lights and the theme switch live in brand.css.  ║
   ║  The home page is a desktop: menu bar, a window, a Dock.         ║
   ╚══════════════════════════════════════════════════════════════════╝ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --mb-h: 34px; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--mb-h) + 14px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5; letter-spacing: -0.006em;
  color: var(--label); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--label-2); letter-spacing: -0.01em; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 0;
  font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s, background-color 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0.5px 0 rgba(255, 255, 255, 0.2); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-glass {
  background: var(--glass); color: var(--label);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 0 0 0.5px var(--glass-edge), 0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn-glass:hover { background: var(--glass-strong); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════
   MENU BAR
═══════════════════════════════════════════════════════════════════ */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--mb-h); padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 0.5px 0 var(--separator);
  font-size: 13.5px;
}
.menubar-left, .menubar-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.mb-item {
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 9px; border-radius: 6px; border: 0;
  background: none; color: var(--label); white-space: nowrap; cursor: default;
  transition: background-color 0.1s;
}
a.mb-item, button.mb-item { cursor: pointer; }
.mb-item:hover, .mb-item[aria-expanded="true"] { background: var(--selection); }
.mb-brand { font-weight: 700; }
.mb-brand .app-icon { --size: 16px; }
.mb-clock { cursor: default; font-variant-numeric: tabular-nums; }
.mb-clock:hover { background: none; }
.menubar .theme-toggle { width: 30px; height: 24px; border-radius: 6px; color: var(--label); }
.menubar .theme-toggle svg { width: 15px; height: 15px; }

/* the R247 menu — like the Apple menu */
.menu { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 70;
  min-width: 232px; padding: 5px;
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 11px; box-shadow: var(--shadow-pop), inset 0 0 0 0.5px var(--glass-edge);
  display: none;
}
.menu-panel.open { display: block; animation: menu-in 0.14s var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.menu-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 24px; padding: 0 10px; border-radius: 5px;
  font-size: 13.5px; color: var(--label);
}
.menu-panel a:hover, .menu-panel a:focus-visible { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.menu-panel a span { color: var(--label-3); font-size: 12.5px; }
.menu-panel a:hover span, .menu-panel a:focus-visible span { color: inherit; }
.menu-panel hr { border: 0; height: 0.5px; background: var(--separator-strong); margin: 5px 10px; }

/* ═══════════════════════════════════════════════════════════════════
   HERO — the desktop
═══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--mb-h) + clamp(56px, 9vh, 104px)) 0 clamp(56px, 8vw, 96px);
  text-align: center;
}

/* The hero's wallpaper, live: the same hills as wallpaper-*.svg, but six
   separate ridges that drift at their own depth as you scroll (site.js). */
:root {
  --sky-1: #CFDAE5; --sky-2: #E7ECEF; --sky-3: #F4EFE9;
  --glow: rgba(255, 241, 226, 0.95); --glow-at: 72% 50%;
  --h0a: #CDD7DD; --h0b: #BFCCD3; --h1a: #B4C5CD; --h1b: #A2B6C0; --h2a: #97AEB8; --h2b: #839EAA;
  --h3a: #7894A0; --h3b: #66838F; --h4a: #587987; --h4b: #486A78; --h5a: #3B5B68; --h5b: #2E4B57;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-1: #0A111C; --sky-2: #111C2B; --sky-3: #1A283B;
    --glow: rgba(93, 122, 166, 0.3); --glow-at: 32% 47%;
    --h0a: #22324A; --h0b: #1C2A3F; --h1a: #1C2A3E; --h1b: #172335; --h2a: #172335; --h2b: #131D2C;
    --h3a: #131D2B; --h3b: #0F1823; --h4a: #0F1721; --h4b: #0C121B; --h5a: #0B1119; --h5b: #080C13;
  }
}
:root[data-theme="dark"] {
  --sky-1: #0A111C; --sky-2: #111C2B; --sky-3: #1A283B;
  --glow: rgba(93, 122, 166, 0.3); --glow-at: 32% 47%;
  --h0a: #22324A; --h0b: #1C2A3F; --h1a: #1C2A3E; --h1b: #172335; --h2a: #172335; --h2b: #131D2C;
  --h3a: #131D2B; --h3b: #0F1823; --h4a: #0F1721; --h4b: #0C121B; --h5a: #0B1119; --h5b: #080C13;
}
.hero-scene {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(var(--sky-1), var(--sky-2) 55%, var(--sky-3));
}
.scene-glow { position: absolute; inset: -10% -10% 0; background: radial-gradient(55% 60% at var(--glow-at), var(--glow), transparent 70%); }
.hill { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scene [data-depth] { will-change: transform; }
/* the headline drifts up and fades as the window takes over */
.hero-copy { transform: translate3d(0, calc(var(--hs, 0) * 0.18px), 0); opacity: calc(1 - var(--hs, 0) / 520); }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 14px 0 8px; border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 0 0 0.5px var(--glass-edge), 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 13px; font-weight: 500; color: var(--label);
}
.hero-chip .app-icon { --size: 18px; }
.hero-chip b { font-weight: 600; }
.hero h1, .section-head h2, .privacy-copy h2, .invite-copy h2 { text-wrap: balance; }
.hero-sub, .section-head p { text-wrap: pretty; }
.hero h1 {
  margin: 22px auto 0; max-width: 12em;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 7.4vw, 88px); line-height: 1.02; letter-spacing: -0.035em;
}
.hero-sub {
  margin: 22px auto 0; max-width: 34em;
  font-size: clamp(17px, 1.7vw, 21px); line-height: 1.45; color: var(--label-2); letter-spacing: -0.012em;
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* The product window — drawn at 1100×680 and scaled to fit (site.js) */
.hero-window { position: relative; width: min(1100px, 100%); margin: clamp(48px, 7vw, 80px) auto 0; aspect-ratio: 1100 / 680; text-align: left; }
.win {
  position: absolute; top: 0; left: 0; width: 1100px; height: 680px;
  transform-origin: top left; transform: scale(var(--k, 1));
  display: flex; overflow: hidden;
  border-radius: 20px; box-shadow: var(--shadow-window);
  font-size: 13.5px;
}
.win-side {
  width: 214px; flex-shrink: 0; padding: 16px 10px;
  background: var(--sidebar);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 0.5px solid var(--separator);
  display: flex; flex-direction: column;
}
.win-side .traffic { padding: 2px 10px 0; }
.ws-label { margin: 22px 10px 6px; font-size: 11px; font-weight: 600; color: var(--label-3); }
.ws-item { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--label); }
.ws-item svg { width: 16px; height: 16px; color: var(--accent); }
.ws-item.on { background: var(--selection); font-weight: 500; }
.ws-item i { margin-left: auto; font-style: normal; font-size: 12px; color: var(--label-3); }
.ws-item i.warn { color: var(--text-orange); font-weight: 600; }
.ws-item i.live { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-user { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 10px 6px 0; border-top: 0.5px solid var(--separator); }
.ws-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#A9A9AE, #7D7D83); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.ws-user b { font-size: 12.5px; font-weight: 600; display: block; }
.ws-user small { font-size: 11px; color: var(--label-2); }

.win-main { flex: 1; min-width: 0; background: var(--bg); display: flex; flex-direction: column; }
.win-bar { height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 12px; }
.win-bar svg { color: var(--label-2); }
.win-bar-left { display: flex; align-items: center; gap: 16px; }
.win-bar-traffic { display: none; }
.win-bar-right { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--label-2); }
.win-qa { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--control); box-shadow: var(--shadow-ctl); color: var(--label); font-size: 12.5px; font-weight: 500; }
.win-qa svg { color: var(--accent); }
.win-content { padding: 6px 28px 24px; }
.wc-date { font-size: 11.5px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.02em; }
.wc-hello { margin-top: 2px; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.wc-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto auto; gap: 12px; margin-top: 16px; }
.wc-activity { grid-row: span 2; display: flex; flex-direction: column; }
.wc-recent { grid-column: span 3; }

/* ── Widgets (shared by the window mock and the gallery) ── */
.wgt {
  background: var(--bg-elevated); border-radius: 18px; box-shadow: var(--shadow-card);
  padding: 14px 16px; min-width: 0;
}
.wgt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.wgt-title { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c, var(--accent)); }
.wgt-title svg { width: 14px; height: 14px; }
.wgt-head small { font-size: 12px; color: var(--label-2); }
.wgt-num { margin-top: 14px; font-family: var(--font-rounded); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wgt-num small { font-size: 0.5em; color: var(--label-3); font-weight: 500; margin-left: 2px; }
.wgt-sub { margin-top: 4px; font-size: 12px; color: var(--label-2); }
.c-blue { --c: var(--blue); } .c-green { --c: var(--green); } .c-orange { --c: var(--orange); }
.c-pink { --c: var(--pink); } .c-yellow { --c: color-mix(in srgb, var(--yellow) 72%, var(--label)); } .c-label { --c: var(--label); }

.rings { flex: 1; display: flex; align-items: center; gap: 20px; margin-top: 4px; }
.rings svg { width: 150px; height: 150px; transform: rotate(-90deg); flex-shrink: 0; }
.rings circle { fill: none; stroke-width: 13; stroke-linecap: round; }
.rings .rb-t { stroke: color-mix(in srgb, var(--blue) 16%, transparent); stroke-linecap: butt; }
.rings .rb-h { stroke: color-mix(in srgb, var(--green) 16%, transparent); stroke-linecap: butt; }
/* the rings close as the window lifts upright (--p, set while you scroll) — 60% and 75% */
.rings .rf-t { stroke: var(--blue);  stroke-dasharray: 377;   stroke-dashoffset: calc(377 - 226.2 * var(--p, 1)); }
.rings .rf-h { stroke: var(--green); stroke-dasharray: 276.5; stroke-dashoffset: calc(276.5 - 207.4 * var(--p, 1)); }
.ring-legend { display: flex; flex-direction: column; gap: 12px; }
.ring-legend b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.ring-legend b::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ring-legend span { display: block; padding-left: 13px; font-family: var(--font-rounded); font-size: 22px; font-weight: 600; color: var(--c); }

.rows { margin-top: 6px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 8px 0; font-size: 13px; }
.row + .row { box-shadow: inset 0 0.5px 0 var(--separator); }
.row b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row time { font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--label-2); }
.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════════════════════ */
/* overflow-x: clip — animated cards slide in from off-screen, and phone browsers
   would otherwise widen the whole page to fit them (hidden is the older fallback) */
.section { padding: clamp(80px, 11vw, 140px) 0; overflow-x: hidden; overflow-x: clip; }
.section-head { max-width: 720px; margin: 0 auto clamp(44px, 6vw, 72px); text-align: center; }
.section-head h2, .privacy-copy h2, .invite-copy h2 {
  margin-top: 8px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.032em;
}
.section-head p:last-child, .privacy-copy > p:last-child, .invite-copy > p:last-of-type {
  margin-top: 18px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--label-2); letter-spacing: -0.012em;
}

/* ── Apps — a widget gallery ── */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.g-item { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.g-item figcaption { text-align: center; }
.g-item figcaption b { display: block; font-size: 15px; font-weight: 600; }
.g-item figcaption span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--label-2); }
.g-large  { grid-column: span 2; grid-row: span 2; }
.g-medium { grid-column: span 2; }
.g-wide   { grid-column: 1 / -1; }
.g-item .wgt { flex: 1; padding: 18px 20px; border-radius: 22px; }

.entry { padding: 12px 0; }
.entry + .entry { box-shadow: inset 0 0.5px 0 var(--separator); }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry b { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.entry time { display: block; margin-top: 1px; font-size: 12.5px; color: var(--label-2); }
.entry p { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--label-2); }
.tags { display: flex; gap: 5px; margin-top: 8px; }
.tags span { padding: 2px 9px; border-radius: 999px; background: var(--fill-2); font-size: 11.5px; font-weight: 500; color: var(--label-2); }

.checks { margin-top: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.check + .check { box-shadow: inset 30px 0.5px 0 var(--bg-elevated), inset 0 0.5px 0 var(--separator); }
.check i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--label-4); flex-shrink: 0; position: relative; }
.check.done i { background: var(--accent); border-color: var(--accent); }
.check.done i::after { content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check.done { color: var(--label-3); text-decoration: line-through; text-decoration-color: var(--label-4); }
.check small { margin-left: auto; font-size: 12px; color: var(--label-3); }
.check small.due-soon, .check small.due-late { padding: 1px 8px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.check small.due-soon { color: var(--text-orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.check small.due-late { color: var(--text-red); background: color-mix(in srgb, var(--red) 12%, transparent); }

.note-title { margin-top: 12px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.note-body { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--label-2); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--tt, var(--label-2)); background: color-mix(in srgb, var(--t, var(--gray)) 14%, transparent); }
.chip.orange { --t: var(--orange); --tt: var(--text-orange); }
.chip.blue { --t: var(--blue); --tt: var(--text-blue); }

.habit-rows { margin-top: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 32px; }
.habit-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 0; }
.habit-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--c) 16%, var(--bg-elevated)); grid-row: span 2; }
.habit-row b { font-size: 14px; font-weight: 600; }
.habit-row em { font-style: normal; font-family: var(--font-rounded); font-size: 20px; font-weight: 600; text-align: right; grid-row: span 2; }
.week { display: flex; gap: 4px; }
.week i { width: 16px; height: 16px; border-radius: 50%; background: var(--fill-2); }
.week i.on { background: var(--c); }
.week i.today { box-shadow: 0 0 0 1.5px var(--bg-elevated), 0 0 0 3px var(--c); }

/* ── Day Plan — the day's 24 hours, a running timer, its notifications ── */
.plan-sec { padding-top: clamp(24px, 4vw, 56px); }
.new-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-right: 8px; border-radius: 999px; background: var(--teal); color: #FFFFFF; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; vertical-align: 2px; }
.plan-stage { position: relative; max-width: 980px; margin: 0 auto; }
.pw { border-radius: 18px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-window); }
.pw .pane-bar b { position: absolute; left: 50%; transform: translateX(-50%); }
.pw .pane-bar { position: relative; }
.pw-body {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr;
  gap: 14px; padding: 18px;
}
.pw-card { background: var(--bg-elevated); border-radius: 16px; box-shadow: var(--shadow-card); min-width: 0; }

/* the dial — a watch face for the day */
.pw-day { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 22px 22px 20px; }
.pw-dial { position: relative; width: 100%; max-width: 252px; aspect-ratio: 1; margin: 0 auto; }
.pw-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pw-track { fill: none; stroke: var(--fill-2); stroke-width: 16; }
.pw-arc { fill: none; stroke: var(--block); stroke-width: 16; stroke-dasharray: 100; }
.pw-ticks line { stroke: var(--label-4); stroke-width: 1.2; stroke-linecap: round; }
.pw-ticks line.major { stroke: var(--label-3); stroke-width: 1.8; }
.pw-labels text { font-family: var(--font); font-size: 9.5px; font-weight: 600; fill: var(--label-3); dominant-baseline: central; }
.pw-hand { transform: rotate(calc(var(--min) * 0.25deg)); transform-origin: 120px 120px; transform-box: view-box; transition: transform 0.6s var(--ease-out); }
.pw-knob { fill: var(--bg-elevated); stroke: var(--label); stroke-width: 3; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
.pw-center { position: absolute; inset: 27%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.pw-center b { font-family: var(--font-rounded); font-size: 25px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pw-center span { font-size: 11.5px; line-height: 1.3; color: var(--label-2); }
.pw-budget p { font-size: 13px; color: var(--label-2); }
.pw-budget p b { font-weight: 600; color: var(--label); }
.pw-budget p b.free { color: var(--text-green); }
.pw-bar { display: flex; gap: 2px; height: 10px; margin-top: 8px; border-radius: 5px; overflow: hidden; }
.pw-bar i { flex: 1 1 0; background: var(--block); }
.pw-bar i.free { background: repeating-linear-gradient(-45deg, var(--fill-2) 0 4px, var(--fill) 4px 8px); }
.pw-legend { list-style: none; margin-top: 12px; }
.pw-legend li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.pw-legend li + li { box-shadow: inset 0 0.5px 0 var(--separator); }
.pw-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--block); }
.pw-legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

/* the running timer */
.pw-timer { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 22px; }
.pw-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--label-2); }
.pw-live { width: 8px; height: 8px; border-radius: 50%; background: var(--block); animation: pw-pulse 2s ease-out infinite; }
@keyframes pw-pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--block) 55%, transparent); } to { box-shadow: 0 0 0 9px transparent; } }
.pw-name { display: flex; align-items: center; gap: 10px; }
.pw-name b { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.018em; }
.pw-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; line-height: 1; background: color-mix(in srgb, var(--block) 15%, var(--bg-elevated)); }
.pw-count { margin: 4px 0 2px; font-family: var(--font-rounded); font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--block); }
.pw-progress { width: 100%; max-width: 380px; height: 6px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--block) 16%, transparent); }
.pw-progress i { display: block; height: 100%; border-radius: 3px; background: var(--block); transition: width 1s linear; }
.pw-meta { font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.pw-meta b { font-weight: 600; color: var(--label); }
.pw-actions { display: flex; gap: 8px; margin-top: 8px; }
.pw-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--control); box-shadow: var(--shadow-ctl); font-size: 13px; font-weight: 500; }
.pw-btn.stop { background: color-mix(in srgb, var(--red) 13%, var(--control)); color: var(--text-red); }
.pw-btn svg { width: 11px; height: 11px; }

/* the blocks, in time order */
.pw-list { overflow: hidden; }
.pw-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; position: relative; isolation: isolate; }
.pw-row + .pw-row { box-shadow: inset 62px 0.5px 0 var(--bg-elevated), inset 0 0.5px 0 var(--separator); }
.pw-row.running { background: color-mix(in srgb, var(--block) 7%, var(--bg-elevated)); box-shadow: none; }
.pw-row.running + .pw-row { box-shadow: none; }
.pw-text { display: flex; flex-direction: column; min-width: 0; }
.pw-text b { font-size: 14px; font-weight: 600; letter-spacing: -0.008em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-text > span { font-size: 12.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pw-done { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--text-green); font-size: 12px; font-weight: 600; }
.pw-state { display: flex; align-items: center; gap: 10px; }
.pw-left { font-family: var(--font-rounded); font-size: 16px; font-weight: 700; color: var(--block); font-variant-numeric: tabular-nums; }
.pw-play { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--block) 14%, transparent); color: var(--block); }
.pw-play svg { width: 12px; height: 12px; }
.pw-play:not(.stop) svg { margin-left: 2px; }
.pw-play.stop { background: var(--block); color: #FFFFFF; }

/* notification banners, like the ones in the corner of a Mac's screen */
.banners { position: absolute; z-index: 2; top: -34px; right: -44px; width: 344px; display: flex; flex-direction: column; gap: 10px; }
.banner {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px;
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 18px; box-shadow: var(--shadow-pop), inset 0 0 0 0.5px var(--glass-edge);
}
.banner .app-icon { --size: 34px; flex-shrink: 0; }
.banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; font-size: 13px; line-height: 1.35; }
.banner-text p { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; }
.banner-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-text time { flex-shrink: 0; font-size: 11.5px; color: var(--label-3); }
.banner-text span { color: var(--label-2); }
.banner-text em { margin-top: 8px; padding: 4px 11px; border-radius: 7px; background: var(--fill); font-style: normal; font-size: 12px; font-weight: 500; }

.details.plan-points { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 72px); }

/* ── The window's dashboard: search, the three tabs, what needs you now ── */
.win-search { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px; border-radius: 999px; background: var(--control); box-shadow: var(--shadow-ctl); color: var(--label-2); font-size: 12.5px; font-weight: 500; }
.win-search svg { width: 12px; height: 12px; }
.wc-tabs { display: inline-flex; gap: 2px; margin-top: 12px; padding: 2px; border-radius: 8px; background: var(--fill-2); box-shadow: inset 0 0 0 0.5px var(--separator); font-size: 12px; }
.wc-tabs span { padding: 3px 12px; border-radius: 6px; }
.wc-tabs .on { background: var(--bg-elevated); box-shadow: var(--shadow-ctl); font-weight: 500; }
.wc-attn, .ds-attn {
  --t: var(--orange);
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px 8px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--t) 10%, var(--bg-elevated));
  box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--t) 32%, transparent);
}
.ds-attn.red { --t: var(--red); }
.wc-attn i, .ds-attn i { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--t); color: #FFFFFF; font-style: normal; font-size: 13px; font-weight: 800; }
.wc-attn i svg, .ds-attn i svg { width: 14px; height: 14px; }
.wc-attn > span, .ds-attn > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.3; }
.wc-attn b, .ds-attn b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-attn small, .ds-attn small { font-size: 11.5px; color: var(--label-2); }
.wc-attn em, .ds-attn em { flex-shrink: 0; padding: 3px 10px; border-radius: 999px; background: var(--control); box-shadow: var(--shadow-ctl); font-style: normal; font-size: 11.5px; font-weight: 500; }
.wgt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.wgt-dot.red { background: var(--red); }
.wgt-num.warn, .ds-kpis b.warn { color: var(--text-orange); }
.wgt-num.late, .ds-kpis b.late { color: var(--text-red); }
.c-indigo { --c: var(--indigo); }
/* deadlines, as the app shows them */
.due { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--fill-2); font-size: 11.5px; font-weight: 600; color: var(--label-2); white-space: nowrap; }
.due svg { width: 11px; height: 11px; }
.due.soon { color: var(--text-orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.due.late { color: var(--text-red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.check small.repeat { display: inline-flex; align-items: center; gap: 4px; }
.check small.repeat svg { width: 11px; height: 11px; }

/* ── Dashboard: today, a report, reminders with buttons ── */
/* the report's two series — the same validated pair the app uses */
:root { --viz-todo: #007AFF; --viz-office: #E68600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-todo: #0A84FF; --viz-office: #D6780A; } }
:root[data-theme="dark"] { --viz-todo: #0A84FF; --viz-office: #D6780A; }
.dash-sec { padding-top: clamp(24px, 4vw, 56px); }
.ds-stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.95fr); gap: 18px; max-width: 1100px; margin: 0 auto; align-items: start; }
.ds-card { min-width: 0; padding: 18px 18px 20px; border-radius: 22px; background: var(--bg-elevated); box-shadow: var(--shadow-card); }
.ds-label { font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--label-2); }
.ds-today .ds-attn:first-of-type { margin-top: 10px; }
.ds-today .ds-attn + .ds-attn { margin-top: 8px; }
.ds-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ds-kpis > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--fill-2); }
.ds-kpis small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--label-2); white-space: nowrap; }
.ds-kpis b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.ds-kpis b em { font-style: normal; font-size: 14px; font-weight: 500; color: var(--label-2); }
.ds-kpis span { font-size: 11px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-btns { display: flex; gap: 6px; }
.ds-btns em { padding: 3px 10px; border-radius: 999px; background: var(--control); box-shadow: var(--shadow-ctl); font-style: normal; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.ds-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ds-stats > div { display: flex; flex-direction: column; min-width: 0; }
.ds-stats small { font-size: 11.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-stats b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ds-stats span { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-stats .up { color: var(--text-green); }
.ds-stats .down { color: var(--text-red); }
/* columns on one baseline, a 2px gap between the stacked parts */
.ds-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 128px; margin-top: 16px; background: linear-gradient(var(--separator), var(--separator)) bottom 18px left 0 / 100% 1px no-repeat; }
.ds-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.ds-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: min(18px, 60%); height: calc((var(--t) + var(--o)) / 7 * 100px); }
.ds-stack i { display: block; min-height: 2px; }
.ds-stack i.t { flex: var(--t); background: var(--viz-todo); }
.ds-stack i.o { flex: var(--o); background: var(--viz-office); }
.ds-stack i:last-child { border-radius: 4px 4px 0 0; }
.ds-col small { height: 12px; font-size: 10.5px; line-height: 12px; color: var(--label-2); }
.ds-col.today small { color: var(--label); font-weight: 600; }
.ds-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--label-2); }
.ds-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ds-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--viz-todo); }
.ds-legend i.o { background: var(--viz-office); }
.ds-notify { display: flex; flex-direction: column; gap: 10px; background: var(--bg-sunken) var(--wallpaper) center / cover no-repeat; }
.ds-notify .ds-label { color: #FFFFFF; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.ds-notify .banner-text b { white-space: normal; }
.banner-btns { display: flex; gap: 6px; margin-top: 8px; }
.banner-btns em { padding: 4px 11px; border-radius: 7px; background: var(--fill); font-style: normal; font-size: 12px; font-weight: 500; }
.banner-btns em:first-child { background: var(--accent); color: var(--on-accent); }
/* the reminder arrives, then the "done" that answers it */
.ds-notify .banner { transition: opacity 0.5s var(--ease-out), transform 0.6s var(--spring); }
.ds-notify .banner:nth-of-type(1) { transition-delay: 0.5s; }
.ds-notify .banner:nth-of-type(2) { transition-delay: 1.6s; }
.js .ds-stage:not(.in) .ds-notify .banner { opacity: 0; transform: translateY(-14px); }
.ds-stack { transform-origin: bottom; transition: transform 0.8s var(--ease-out); }
.js .ds-stage:not(.in) .ds-stack { transform: scaleY(0); }
.ds-col:nth-child(2) .ds-stack { transition-delay: 0.05s; } .ds-col:nth-child(3) .ds-stack { transition-delay: 0.1s; }
.ds-col:nth-child(4) .ds-stack { transition-delay: 0.15s; } .ds-col:nth-child(5) .ds-stack { transition-delay: 0.2s; }
.detail.in .sq-icon.repeat svg { animation: spin-once 1.1s var(--ease-out) 0.55s; }
.detail.in .sq-icon.search svg { animation: key-press-icon 0.5s var(--ease) 0.6s; }
.detail.in .sq-icon.download svg { animation: drop 0.7s var(--ease) 0.6s; }
@keyframes drop { 40% { transform: translateY(3px); } }
/* six details: three to a row */
@media (min-width: 1001px) { #details .details { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .ds-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-notify { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ds-stage { grid-template-columns: minmax(0, 1fr); }
  .wc-attn em { display: none; }
}

/* ── Privacy — a System Settings pane ── */
.privacy, .invite { background: var(--bg-elevated); }
:root[data-theme="dark"] :is(.privacy, .invite) { background: #161617; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.privacy, .invite) { background: #161617; } }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.pane {
  border-radius: 18px; overflow: hidden; background: var(--bg);
  box-shadow: var(--shadow-window);
}
.pane-bar { height: 44px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 0.5px solid var(--separator); background: var(--bg); }
.pane-bar b { font-size: 13.5px; font-weight: 600; }
.pane-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.group { background: var(--bg-elevated); border-radius: 12px; box-shadow: var(--shadow-card); }
.group-title { margin: 0 4px -10px; font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; font-size: 13.5px; }
.set-row + .set-row { box-shadow: inset 52px 0.5px 0 var(--bg-elevated), inset 0 0.5px 0 var(--separator); }
.set-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #FFFFFF; background: linear-gradient(color-mix(in srgb, var(--c) 80%, #FFFFFF), var(--c)); flex-shrink: 0; }
.set-ico svg { width: 15px; height: 15px; }
.set-row > span:nth-child(2) { flex: 1; }
.set-val { color: var(--label-2); font-size: 13px; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--fill); position: relative; flex-shrink: 0; box-shadow: inset 0 0 0 0.5px var(--separator); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.popup { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px 0 10px; border-radius: 6px; background: var(--control); box-shadow: var(--shadow-ctl); font-size: 12.5px; }
.popup::after { content: ''; width: 8px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14' fill='none'%3E%3Cpath d='M2 5l3-3 3 3M2 9l3 3 3-3' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ── Details ── */
.details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.detail { background: var(--bg-elevated); border-radius: 22px; box-shadow: var(--shadow-card); padding: 24px 22px 26px; }
.detail h3 { margin-top: 22px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.detail p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--label-2); }
.keys { display: flex; gap: 6px; height: 52px; align-items: flex-end; }
.key {
  min-width: 48px; height: 48px; padding: 0 10px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 500; color: var(--label);
  background: linear-gradient(var(--bg-elevated), color-mix(in srgb, var(--bg-elevated) 90%, var(--label)));
  box-shadow: 0 0 0 0.5px var(--separator-strong), 0 2px 0 var(--separator-strong), 0 3px 6px rgba(0, 0, 0, 0.08);
}
.key small { font-size: 10px; color: var(--label-2); align-self: end; justify-self: end; margin: 0 -2px 4px 0; }
.sq-icon { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; color: #FFFFFF; background: linear-gradient(color-mix(in srgb, var(--c) 80%, #FFFFFF), var(--c)); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.12); }
.sq-icon svg { width: 26px; height: 26px; }
.sq-icon.app { background: none; box-shadow: none; }
.sq-icon.app .app-icon { --size: 52px; }

/* ── Sign-in — a macOS alert ── */
.cta {
  padding: clamp(96px, 13vw, 168px) 0;
  background: var(--bg-sunken) var(--wallpaper) center / cover no-repeat;
}
.alert {
  width: min(320px, calc(100% - 40px)); margin: 0 auto; padding: 22px 18px 18px;
  text-align: center;
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 22px; box-shadow: var(--shadow-window), inset 0 0 0 0.5px var(--glass-edge);
}
.alert .app-icon { --size: 64px; margin: 0 auto; }
.alert h2 { margin-top: 14px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.alert p { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--label); }
.alert-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.alert-buttons .btn { height: 30px; font-size: 13.5px; width: 100%; }
.alert-buttons .btn-glass { background: var(--fill); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }

/* ── Ask for an invite — a request form in a window ── */
.invite-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.invite-steps { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 30px; }
.invite-steps li { display: flex; align-items: center; gap: 14px; font-size: 14.5px; line-height: 1.4; color: var(--label-2); }
.invite-steps .set-ico { width: 34px; height: 34px; border-radius: 9px; }
.invite-steps .set-ico svg { width: 18px; height: 18px; }
.invite-steps b { display: block; font-size: 15.5px; font-weight: 600; color: var(--label); }
.invite-form [hidden] { display: none !important; }
.invite-form .pane-body { gap: 16px; }
.inv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.inv-wide { grid-column: 1 / -1; }
.inv-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inv-field > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.inv-field small { font-size: 12px; font-weight: 400; color: var(--label-3); font-variant-numeric: tabular-nums; }
.inv-field input, .inv-field textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px;
  background: var(--bg-elevated); box-shadow: var(--shadow-ctl);
  font: inherit; font-size: 14.5px; color: var(--label); outline: none;
  transition: box-shadow 0.15s;
}
.inv-field textarea { height: auto; min-height: 108px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.inv-field input::placeholder, .inv-field textarea::placeholder { color: var(--label-3); }
.inv-field input:focus, .inv-field textarea:focus { box-shadow: 0 0 0 0.5px var(--accent), var(--focus-ring); }
.inv-field.bad input, .inv-field.bad textarea { box-shadow: 0 0 0 1.5px var(--red); }
.inv-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.inv-error { padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--text-red); font-size: 13.5px; line-height: 1.45; }
.inv-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.inv-actions p { font-size: 12.5px; color: var(--label-2); }
.inv-actions a { color: var(--accent); }
.inv-actions .btn { height: 36px; padding: 0 18px; font-size: 14px; }
.inv-actions .btn:disabled { opacity: 0.6; cursor: default; }
.inv-done { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 340px; padding: 48px 24px 44px; text-align: center; }
.inv-check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #FFFFFF; box-shadow: 0 4px 14px color-mix(in srgb, var(--green) 35%, transparent); }
.inv-check svg { width: 28px; height: 28px; }
.inv-done h3 { margin-top: 16px; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; outline: none; }
.inv-done p { margin-top: 6px; max-width: 360px; font-size: 14.5px; line-height: 1.5; color: var(--label-2); text-wrap: pretty; }
.inv-done .btn { margin-top: 20px; }

/* ── Footer ── */
.footer { padding: 40px 0 120px; background: var(--bg); font-size: 12.5px; color: var(--label-2); }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding-bottom: 26px; border-bottom: 0.5px solid var(--separator); }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--label); }
.footer-brand .app-icon { --size: 22px; }
.footer-cols p { margin-top: 10px; max-width: 26em; line-height: 1.5; }
.footer h4 { font-size: 12.5px; font-weight: 600; color: var(--label); margin-bottom: 10px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer ul a:hover, .footer-base a:hover { color: var(--label); text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; }
.footer-base a { color: var(--label); }

/* ═══════════════════════════════════════════════════════════════════
   THE DOCK
═══════════════════════════════════════════════════════════════════ */
.dock {
  position: fixed; left: 50%; bottom: 10px; z-index: 55;
  transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 4px;
  padding: 6px 8px;
  background: var(--glass);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 22px;
  box-shadow: inset 0 0 0 0.5px var(--glass-edge), 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 10px 30px rgba(0, 0, 0, 0.2);
}
.dock-item {
  --s: 1;
  position: relative; display: block;
  width: calc(48px * var(--s)); height: calc(48px * var(--s));
  transition: width 0.18s var(--ease-out), height 0.18s var(--ease-out);
}
.dock.magnify .dock-item { transition: none; }
.dock-icon {
  width: 100%; height: 100%; border-radius: 23%;
  display: grid; place-items: center; color: #FFFFFF;
  background: linear-gradient(color-mix(in srgb, var(--c) 78%, #FFFFFF), var(--c));
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.18);
}
.dock-icon svg { width: 52%; height: 52%; filter: drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.15)); }
.dock-icon.app { background: url("/favicon.svg") center / contain no-repeat; box-shadow: none; border-radius: 0; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25)); }
.dock-icon.dark { --c: #2C2C2E; }
.dock-icon.gray { --c: #8E8E93; }
.dock-sep { width: 0.5px; height: 40px; margin: 0 5px 4px; background: var(--separator-strong); align-self: center; }
/* name label above the hovered icon */
.dock-item::before {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  padding: 3px 10px; border-radius: 7px; white-space: nowrap;
  background: var(--glass-strong); color: var(--label); font-size: 12.5px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; transition: opacity 0.12s;
}
.dock-item:hover::before, .dock-item:focus-visible::before { opacity: 1; }
.dock-item:focus-visible { box-shadow: none; }
.dock-item:focus-visible .dock-icon { box-shadow: var(--focus-ring); }
/* running indicator — the section you're reading */
.dock-item::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--label); opacity: 0; transition: opacity 0.3s;
}
.dock-item.running::after { opacity: 0.75; }
.dock-item.bounce .dock-icon { animation: dock-bounce 0.7s var(--ease); }
@keyframes dock-bounce { 0%, 100% { transform: none; } 30% { transform: translateY(-22px); } 55% { transform: none; } 75% { transform: translateY(-8px); } }

/* ═══════════════════════════════════════════════════════════════════
   LEGAL + 404 — a document window, an alert
═══════════════════════════════════════════════════════════════════ */
.desk { min-height: 100vh; min-height: 100dvh; padding: calc(var(--mb-h) + clamp(28px, 6vh, 64px)) clamp(12px, 4vw, 40px) clamp(40px, 8vh, 80px); background: var(--bg-sunken) var(--wallpaper) center / cover no-repeat fixed; }
.doc-window { max-width: 780px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--bg-elevated); box-shadow: var(--shadow-window); }
.doc-bar { position: relative; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 16px; background: var(--bg); border-bottom: 0.5px solid var(--separator); }
.doc-bar .traffic { position: absolute; left: 16px; }
.doc-bar b { font-size: 13.5px; font-weight: 600; }
.doc-tabs { position: absolute; right: 12px; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--fill-2); }
.doc-tabs a { height: 22px; padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 12px; color: var(--label); }
.doc-tabs a[aria-current="page"] { background: var(--bg-elevated); box-shadow: var(--shadow-ctl); font-weight: 500; }
.doc-body { padding: clamp(32px, 6vw, 64px) clamp(24px, 7vw, 80px) clamp(40px, 7vw, 72px); }
.doc-body h1 { font-family: var(--font-display); font-size: clamp(32px, 5vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.doc-updated { margin-top: 8px; font-size: 14px; color: var(--label-2); }
.doc-lede { margin-top: 26px; font-size: 19px; line-height: 1.55; letter-spacing: -0.012em; }
.doc-body h2 { margin-top: 36px; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.doc-body p:not(.doc-updated):not(.doc-lede) { margin-top: 8px; font-size: 16px; line-height: 1.65; color: var(--label-2); }
.doc-body a { color: var(--accent); }
.doc-body a:hover { text-decoration: underline; }

.lost { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 60px 20px; background: var(--bg-sunken) var(--wallpaper) center / cover no-repeat; }
.lost .alert { width: min(300px, 100%); }
.lost .alert-icon { position: relative; width: 64px; margin: 0 auto; }
.lost .alert-icon .badge { position: absolute; right: -6px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #FFFFFF; font-weight: 800; font-size: 16px; box-shadow: 0 0 0 2.5px var(--glass-strong); }

/* ═══════════════════════════════════════════════════════════════════
   MOTION — reveal on scroll (only when JS is running)
═══════════════════════════════════════════════════════════════════ */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Headlines come into focus a word at a time */
.js [data-reveal][data-words] { opacity: 1; transform: none; }
[data-words] .w {
  display: inline-block;
  transition: opacity 0.8s var(--ease-out), filter 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 0.05s);
}
.js [data-words]:not(.in) .w { opacity: 0; filter: blur(12px); transform: translateY(0.28em); }

/* The product window lifts from tilted-back to upright as you scroll (--p from site.js) */
.hero-window[data-tilt] {
  transform-origin: 50% 100%;
  transform: perspective(1800px) rotateX(calc((1 - var(--p, 1)) * 24deg)) scale(calc(0.9 + 0.1 * var(--p, 1)));
}
.js .hero-window[data-tilt] { animation: fade-up 1.2s var(--ease-out) 0.35s both; }
@keyframes fade-up { from { opacity: 0; } to { opacity: 1; } }

/* Widgets drift in from where they were "dropped" and settle into the grid */
[data-scatter] {
  transform:
    translate3d(calc(var(--sx, 0px) * var(--spread, 1) * (1 - var(--p, 1))), calc(var(--sy, 0px) * (1 - var(--p, 1))), 0)
    rotate(calc(var(--sr, 0deg) * var(--spread, 1) * (1 - var(--p, 1))));
  opacity: calc(0.1 + 0.9 * var(--p, 1));
}

/* Privacy: the tracking switches start on and flip off, one by one */
.switch { transition: background-color 0.3s var(--ease), box-shadow 0.3s; }
.switch::after { transition: transform 0.4s var(--spring); }
.switch.on { background: var(--green); box-shadow: none; }
.switch.on::after { transform: translateX(16px); }

/* Details: press the keys, spin the sync, launch the app, click the lock shut */
.detail.in .key:nth-child(1) { animation: key-press 0.5s var(--ease) 0.55s; }
.detail.in .key:nth-child(2) { animation: key-press 0.5s var(--ease) 0.8s; }
@keyframes key-press {
  40% { transform: translateY(2px); box-shadow: 0 0 0 0.5px var(--separator-strong), 0 0 0 var(--separator-strong), 0 1px 2px rgba(0, 0, 0, 0.06); }
}
.detail.in .sq-icon.sync svg { animation: spin-once 1.1s var(--ease-out) 0.55s; }
@keyframes spin-once { to { transform: rotate(360deg); } }
.detail.in .sq-icon.app { animation: dock-bounce 0.8s var(--ease) 0.55s; }
.sq-icon.lock .shackle { transition: transform 0.4s var(--spring) 0.75s; }
.js .sq-icon.lock .shackle { transform: translateY(-3.5px); }
.js .detail.in .sq-icon.lock .shackle { transform: none; }

/* Day Plan: the day draws itself round the dial, then the notifications arrive */
.pw-arc { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease-out) var(--d, 0s); }
.js .plan-stage:not(.in) .pw-arc { stroke-dashoffset: 100; }
.pw-knob { transition: opacity 0.4s 1s; }
.js .plan-stage:not(.in) .pw-knob { opacity: 0; }
.banner { transition: opacity 0.5s var(--ease-out), transform 0.6s var(--spring); }
.banner:nth-child(1) { transition-delay: 2.1s; }
.banner:nth-child(2) { transition-delay: 1.3s; }
.js .plan-stage:not(.in) .banner { opacity: 0; transform: translateX(48px); }
.detail.in .sq-icon.bell svg { animation: bell-ring 0.9s var(--ease) 0.6s; transform-origin: 50% 15%; }
@keyframes bell-ring { 15% { transform: rotate(16deg); } 35% { transform: rotate(-13deg); } 55% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } }
.detail.in .sq-icon.pie svg { animation: spin-once 1.1s var(--ease-out) 0.55s; }
.detail.in .sq-icon.play svg { animation: key-press-icon 0.5s var(--ease) 0.6s; }
@keyframes key-press-icon { 40% { transform: scale(0.82); } }

/* Sign-in: the alert pops in like a real one */
.js .alert[data-reveal] { transform: scale(0.86); transition: opacity 0.3s var(--ease); }
.js .alert[data-reveal].in { animation: alert-pop 0.7s var(--spring) both; }
@keyframes alert-pop { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-large { grid-row: auto; }
  .habit-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .habit-rows .habit-row:nth-child(3) { display: none; }
  .privacy-grid, .invite-grid { grid-template-columns: 1fr; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banners { position: static; width: auto; flex-direction: row; margin-bottom: 14px; }
  .banner { flex: 1 1 0; min-width: 0; }
  .pw-body { grid-template-columns: 260px minmax(0, 1fr); }
  .pw-day { padding: 18px 16px; }
  .pw-count { font-size: 46px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .mb-nav, .mb-date { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .g-large, .g-medium { grid-column: auto; }
  .habit-rows { grid-template-columns: 1fr; }
  .habit-rows .habit-row:nth-child(3) { display: grid; }
  .details, .details.plan-points { grid-template-columns: 1fr; }
  .dock { bottom: max(8px, env(safe-area-inset-bottom)); padding: 5px 6px; gap: 3px; border-radius: 19px; }
  .dock-item { width: 42px; height: 42px; }
  .dock .wide-only { display: none; }
  .dock-item::before { display: none; }
  .doc-tabs { display: none; }
}
/* ── Phones ── */
@media (max-width: 720px) {
  /* a menu bar you can hit with a thumb */
  :root { --mb-h: 46px; }
  .menubar { padding: 0 8px; font-size: 15px; }
  .mb-item { height: 36px; padding: 0 10px; border-radius: 8px; }
  .mb-brand .app-icon { --size: 20px; }
  .menubar .theme-toggle { width: 38px; height: 36px; border-radius: 8px; }
  .menu-panel a { height: 40px; font-size: 15px; }

  /* the product window: a narrow version (no sidebar) that fits the screen exactly */
  .hero-window { width: 100%; margin-top: 40px; aspect-ratio: auto; }
  .win { width: 540px; height: auto; border-radius: 24px; }
  .win-side { display: none; }
  .win-bar-traffic { display: flex; }
  .wc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wc-activity, .wc-recent { grid-column: 1 / -1; grid-row: auto; }

  /* gallery cards slide in from a shorter distance on a narrow screen */
  [data-scatter] { --spread: 0.35; }

  /* Details: icon beside the words rather than stacked tall cards */
  .detail { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 18px; }
  .detail > :first-child { grid-row: span 2; }
  .detail h3 { margin-top: 2px; }
  .detail p { margin-top: 4px; font-size: 14px; }
  .keys { height: auto; gap: 4px; }
  .key { min-width: 38px; height: 38px; font-size: 16px; border-radius: 8px; }
  .sq-icon { width: 44px; height: 44px; border-radius: 11px; }
  .sq-icon svg { width: 22px; height: 22px; }
  .sq-icon.app .app-icon { --size: 44px; }

  /* Day Plan: the notifications sit above the window, which becomes one column */
  .banners { flex-direction: column; }
  .banner { flex: none; padding: 11px 12px; }
  .pw-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .pw-legend li { padding: 3px 0; gap: 6px; }
  .pw-legend li + li { box-shadow: none; }
  .pw-legend b { margin-left: 0; color: var(--label-2); }
  .pw { border-radius: 16px; }
  .pw-body { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .pw-day { grid-row: auto; padding: 18px 16px 16px; }
  .pw-dial { max-width: 236px; }
  .pw-timer { padding: 16px 18px 18px; }
  .pw-count { font-size: 48px; }
  .pw-row { padding: 8px 12px; gap: 11px; }
  .pw-row + .pw-row { box-shadow: inset 59px 0.5px 0 var(--bg-elevated), inset 0 0.5px 0 var(--separator); }
  .pw-state .pw-left { display: none; }

  /* the invite form: one field a row, 16px text so iOS doesn't zoom, a full-width button */
  .inv-grid { grid-template-columns: minmax(0, 1fr); }
  .inv-field input, .inv-field textarea { font-size: 16px; }
  .inv-field input { height: 44px; }
  .invite-form .pane-body { padding: 16px; }
  .inv-actions { flex-direction: column-reverse; align-items: stretch; text-align: center; gap: 12px; }
  .inv-actions .btn { height: 48px; font-size: 16px; }

  /* the sign-in alert's buttons, thumb-sized */
  .alert { width: min(340px, calc(100% - 32px)); padding: 24px 18px 18px; }
  .alert-buttons .btn { height: 44px; font-size: 16px; }
  .btn { height: 48px; font-size: 16px; }
}

@media (max-width: 420px) {
  .hero-actions .btn { flex: 1; }
  .dock-item { width: 38px; height: 38px; }
  .pw-more { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js .alert[data-reveal] { opacity: 1; transform: none; transition: none; animation: none; }
  .js [data-words]:not(.in) .w { opacity: 1; filter: none; transform: none; }
  .js .hero-window[data-tilt] { animation: none; }
  .hero-window[data-tilt], [data-scatter], .hero-copy { transform: none; opacity: 1; }
  .js .sq-icon.lock .shackle { transform: none; }
  .rings .rf-t, .rings .rf-h { transition: none; }
  .pw-arc, .pw-knob, .banner, .pw-hand { transition: none; }
  .js .plan-stage:not(.in) .pw-arc { stroke-dashoffset: 0; }
  .js .plan-stage:not(.in) .pw-knob, .js .plan-stage:not(.in) .banner { opacity: 1; transform: none; }
  .pw-live, .detail.in .sq-icon svg { animation: none; }
  .dock-item, .dock-item.bounce .dock-icon { transition: none; animation: none; }
}
