/* Solé — typographic, wide, quiet; one primary yellow */

:root {
  --bg: #FFFFFF;
  --fg: #111111;
  --fg-2: #555555;
  --fg-3: #9A9A9A;
  --line: #E8E8E8;
  --line-strong: #111111;
  --accent: #A8563A;
  --ok: #111111;
  --gutter: clamp(20px, 5vw, 88px);
  --label-col: minmax(180px, 3fr);
  --body-col: 9fr;
  color-scheme: light;
}

/* dark: follows the device unless the header toggle picked a side */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E0E;
    --fg: #F2F2F2;
    --fg-2: #B0B0B0;
    --fg-3: #6E6E6E;
    --line: #242424;
    --line-strong: #F2F2F2;
    --accent: #EE9C74;
    --ok: #F2F2F2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0E0E;
  --fg: #F2F2F2;
  --fg-2: #B0B0B0;
  --fg-3: #6E6E6E;
  --line: #242424;
  --line-strong: #F2F2F2;
  --accent: #EE9C74;
  --ok: #F2F2F2;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Inter (SIL Open Font License, see fonts/LICENSE.txt), self-hosted: variable, upright, Latin subset. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
}

/* Fraunces (SIL Open Font License, see fonts/LICENSE-Fraunces.txt), self-hosted: variable optical size and
   weight 300–700, upright and italic, Latin + Latin Extended-A. The display face: wordmark, titles, headings.
   Everything you read or tap at small sizes stays in Inter. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/static/fonts/Fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/static/fonts/Fraunces-Italic.woff2") format("woff2");
}
:root { --display: "Fraunces", "Iowan Old Style", Georgia, serif; }

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

body {
  margin: 0;
  /* added to the Home Screen, Solé draws under the iPhone's status bar (black-translucent, viewport-fit=cover):
     every page keeps its content below it; the person view's sun fills it */
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.muted { color: var(--fg-3); }
.tone-due { color: var(--accent); }
.tone-soon { color: var(--fg); }

.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- header ------------------------------------------------------------ */
.top { display: flex; align-items: baseline; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; }
.brand { font-family: var(--display); font-weight: 500; font-size: 27px; letter-spacing: -.02em; }
.top nav { display: flex; gap: 32px; font-size: 15px; }
.top nav a { color: var(--fg-3); transition: color .15s; }
.top nav a:hover, .top nav a.on { color: var(--fg); }

main { padding-bottom: 160px; }

/* ---- type -------------------------------------------------------------- */
h1, h2 { font-family: var(--display); font-optical-sizing: auto; }
h1 em, h1 .hl { font-style: italic; }
h1 {
  font-size: clamp(44px, 7.2vw, 112px);
  font-weight: 450;
  line-height: 1;
  letter-spacing: -.025em;
  margin: 0;
  max-width: 14ch;
  text-wrap: balance;
}
.name-xl { max-width: none; }
.meta { font-size: 15px; color: var(--fg-3); margin: 0 0 24px; }
.meta a:hover { color: var(--fg); }
.lead { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.45; color: var(--fg-2); max-width: 30em; margin: 36px 0 40px; letter-spacing: -.01em; }
.count { color: var(--fg-3); font-weight: 400; margin-left: 6px; }

.intro { padding: clamp(48px, 9vw, 140px) 0 clamp(56px, 8vw, 120px); }

/* ---- sections: label column + content column --------------------------- */
.sec {
  display: grid;
  grid-template-columns: var(--label-col) var(--body-col);
  gap: 48px;
  padding: 40px 0 72px;
  border-top: 1px solid var(--line-strong);
}
.sec-label { font-family: inherit; font-size: 15px; font-weight: 500; margin: 0; letter-spacing: -.005em; }
@media (max-width: 820px) {
  .sec { grid-template-columns: 1fr; gap: 24px; padding-bottom: 56px; }
}

/* ---- rows -------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.row:first-child .row-link { padding-top: 0; }
.row-head, .row-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2.4fr) 110px;
  align-items: center;
  gap: 24px;
}
.row-head { font-size: 13px; color: var(--fg-3); padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.row-head span:last-child { text-align: right; }
.row-link { padding: 20px 0; }
.row-name { font-size: clamp(20px, 2vw, 28px); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; transition: opacity .15s; }
.row-link:hover .row-name { opacity: .55; }
.row-meta { font-size: 15px; color: var(--fg-2); }
.row-meta.tone-due { color: var(--accent); }

.days { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.days b { font-size: clamp(24px, 2.2vw, 32px); font-weight: 500; letter-spacing: -.03em; }
.days small { font-size: 13px; color: var(--fg-3); margin-left: 6px; }
.days.tone-due b { color: var(--accent); }

.bday-date { display: flex; flex-direction: column; align-items: center; width: 40px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); line-height: 1.1; }
.bday-date b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; }

@media (max-width: 820px) {
  .row-head { display: none; }
  .row-link { grid-template-columns: 44px 1fr auto; gap: 4px 16px; }
  .row-link > .row-name { grid-column: 2; }
  .row-link > .row-meta { grid-column: 2; grid-row: auto; font-size: 14px; }
  .row-link > .row-meta:empty { display: none; }
  .row-link > .days { grid-column: 3; grid-row: 1 / span 3; }
  .row-link > .avatar, .row-link > .bday-date { grid-row: 1 / span 3; align-self: start; margin-top: 4px; }
}

/* quick check-in under due rows */
.quick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; padding: 0 0 24px 80px; font-size: 15px; }
.quick span { color: var(--fg-3); }
.quick button { font: inherit; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; border-bottom: 1px solid var(--line-strong); }
.quick button:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 820px) { .quick { padding-left: 60px; } }

/* ---- avatar ------------------------------------------------------------ */
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--line);
  color: var(--fg-2);
  font-size: calc(var(--size) * .36);
  font-weight: 500;
  letter-spacing: -.01em;
  overflow: hidden;
  flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .3s; }
a:hover .avatar img, .person-head .avatar img { filter: none; }

/* ---- buttons & links --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 16px; font-weight: 500;
  background: var(--fg); color: var(--bg);
  border: 0; border-radius: 999px;
  padding: 14px 28px; cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .8; }
.link { font: inherit; font-size: 15px; background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; border-bottom: 1px solid var(--line-strong); }
.link:hover { color: var(--accent); border-color: var(--accent); }
.link-danger { color: var(--fg-3); border-color: var(--fg-3); }
.link-danger:hover { color: var(--accent); border-color: var(--accent); }

/* ---- person ------------------------------------------------------------ */
.person-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.person-head { display: flex; align-items: flex-end; gap: 36px; }
@media (max-width: 820px) {
  .person-intro { flex-direction: column; align-items: flex-start; }
  .person-head { flex-direction: column; align-items: flex-start; gap: 24px; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  padding: 40px 0 88px;
  border-top: 1px solid var(--line-strong);
}
.stats > div { display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 15px; font-weight: 500; }
.stat { font-size: clamp(36px, 4vw, 60px); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat small { font-size: 15px; letter-spacing: 0; color: var(--fg-3); font-weight: 400; margin-left: 8px; }
.stat-sub { font-size: 15px; color: var(--fg-2); }
.stat-sub.tone-due { color: var(--accent); }
@media (max-width: 820px) { .stats { grid-template-columns: 1fr 1fr; gap: 40px 24px; } }

.toggles { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -.02em; }
.toggles label { position: relative; cursor: pointer; }
.toggles input { position: absolute; opacity: 0; pointer-events: none; }
.toggles span { color: var(--fg-3); transition: color .15s; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.toggles label:hover span { color: var(--fg-2); }
.toggles input:checked + span { color: var(--fg); border-color: var(--fg); }
.toggles input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.checkin-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 32px; margin-top: 40px; }
.checkin-row .grow { flex: 1 1 280px; }

.prose { white-space: pre-wrap; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; letter-spacing: -.012em; max-width: 34em; }

.history .row { display: grid; grid-template-columns: 140px 140px 1fr auto; gap: 24px; align-items: baseline; padding: 18px 0; }
.history .row:first-child { padding-top: 0; }
.history time { font-variant-numeric: tabular-nums; color: var(--fg-2); font-size: 15px; }
.h-kind { font-weight: 500; }
.h-note { color: var(--fg-2); }
.x { font: inherit; font-size: 13px; color: var(--fg-3); background: none; border: 0; cursor: pointer; padding: 0; opacity: 0; transition: opacity .15s; }
.history .row:hover .x, .x:focus-visible { opacity: 1; }
.x:hover { color: var(--accent); }
@media (max-width: 820px) {
  .history .row { grid-template-columns: 1fr auto; gap: 2px 16px; }
  .h-note { grid-column: 1 / -1; }
  .x { opacity: 1; }
}

/* ---- inputs ------------------------------------------------------------ */
.line {
  font: inherit; color: var(--fg); background: transparent;
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  padding: 10px 0; outline: none; width: 100%;
  transition: border-color .15s;
}
.line::placeholder, .area::placeholder { color: var(--fg-3); }
.line:focus, .area:focus { border-color: var(--accent); }
.line-lg { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.025em; font-weight: 500; }
.line-num { width: 90px; font-size: 24px; font-variant-numeric: tabular-nums; }
.checkin-row input[type=date] { width: auto; }
.area { font: inherit; font-size: 18px; line-height: 1.55; width: 100%; color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; outline: none; resize: vertical; }

.form { border-top: 1px solid var(--line-strong); }
.f-row { display: grid; grid-template-columns: var(--label-col) var(--body-col); gap: 48px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.f-label { font-size: 15px; font-weight: 500; padding-top: 12px; }
.f-fields { max-width: 760px; }
.f-fields.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.hint { font-size: 14px; color: var(--fg-3); margin: 10px 0 0; }
.cadence { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 16px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: 24px; }
.presets button { font: inherit; font-size: 15px; background: none; border: 0; padding: 0 0 2px; cursor: pointer; color: var(--fg-3); border-bottom: 1px solid transparent; }
.presets button:hover { color: var(--fg); }
.presets button.on { color: var(--fg); border-color: var(--fg); }
.photo { display: flex; align-items: center; gap: 24px; }
.photo input[type=file] { font: inherit; font-size: 14px; color: var(--fg-2); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--fg-2); margin-top: 10px; }
.actions { display: flex; align-items: center; gap: 28px; }
.f-row:has(.actions) { border-bottom: 0; padding-top: 48px; }
.danger { border-bottom: 0; padding-top: 8px; }
@media (max-width: 820px) {
  .f-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .f-row > span:empty { display: none; }
  .f-label { padding-top: 0; }
  .f-fields.two { grid-template-columns: 1fr; gap: 16px; }
  .presets { margin-left: 0; }
}

/* ---- notice ------------------------------------------------------------ */
.notice { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--fg-2); }
.notice::before { content: "✓"; margin-right: 10px; color: var(--fg); }
.notice-error { color: var(--accent); }
.notice-error::before { content: "!"; color: var(--accent); font-weight: 700; }

/* ---- closeness visualisation ------------------------------------------ */
.sec-note { font-size: 14px; line-height: 1.5; color: var(--fg-3); margin: 12px 0 0; max-width: 22em; }

/* everyone table */
.row-head.row-all, .row-link.row-all {
  grid-template-columns: 56px minmax(0, 3.2fr) minmax(0, 2fr) 104px;
}
.row-head .r { text-align: right; }
.row-who { display: flex; flex-direction: column; min-width: 0; }
.row-who .row-meta { font-size: 14px; color: var(--fg-3); }
@media (max-width: 820px) {
  .row-link.row-all { grid-template-columns: 44px 1fr auto; }
  .row-link.row-all > .row-who { grid-column: 2; }
  .row-link.row-all > .row-meta { grid-column: 2; }
  .row-link.row-all > .days { grid-column: 3; grid-row: 1 / span 2; }
}

/* ---- colour ------------------------------------------------------------ */
/* Gentle on purpose: muted, warm, nothing alarm-red. Check-in groups (together / voice / written)
   are three distinct soft hues; status runs sage (later) → honey (soon) → apricot (a good time to
   say hi), so it reads as warmth rising, not a warning. Colour is never the only cue: every dot
   and line has a label nearby. */
:root {
  --t-together: #5E8CC0;
  --t-voice: #9A86C9;
  --t-written: #5FA38A;
  --s-good: #7AA787; --s-soon: #D4A03C; --s-due: #DD8257; --s-calm: #D8CFBE;
  --bday: #D27F9C;
}
/* dark: follows the device unless the header toggle picked a side */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t-together: #7FA6D6;
    --t-voice: #AE9CDB;
    --t-written: #74B89E;
    --s-good: #7FA88C; --s-soon: #E3B652; --s-due: #EE9C74; --s-calm: #4A453C;
    --bday: #E092AE;
  }
}
:root[data-theme="dark"] {
  --t-together: #7FA6D6;
  --t-voice: #AE9CDB;
  --t-written: #74B89E;
  --s-good: #7FA88C; --s-soon: #E3B652; --s-due: #EE9C74; --s-calm: #4A453C;
  --bday: #E092AE;
}
.t-together { --t: var(--t-together); }
.t-voice { --t: var(--t-voice); }
.t-written { --t: var(--t-written); }

/* headline count */
h1 .hl { color: var(--fg); }

/* status dot + label (label always present; colour never alone) */
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--s-calm); }
.dot.s-good { background: var(--s-good); }
.dot.s-soon { background: var(--s-soon); }
.dot.s-due { background: var(--s-due); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s-due) 18%, transparent); }
.row-meta.tone-due, .stat-sub.tone-due { color: var(--fg-2); }
.days.tone-due b { color: var(--fg); }

/* check-in type toggles + quick buttons carry their group colour */
.toggles input:checked + span { border-color: var(--t); }
.toggles label:hover span { color: var(--fg); }
.quick button { border-bottom: 2px solid var(--t); }
.quick button:hover { color: var(--fg); border-color: var(--fg); }
/* snooze sits at the end of the check-in row, its options open on click */
.quick > form { display: contents; }
.snooze > form { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; }
.snooze { display: contents; }
.snooze summary { list-style: none; cursor: pointer; color: var(--fg-3); }
.snooze summary::-webkit-details-marker { display: none; }
.snooze summary::after { content: " ›"; }
.snooze[open] summary { color: var(--fg); }
.snooze[open] summary::after { content: ":"; }
.snooze summary:hover { color: var(--fg); }
.quick .snooze button { color: var(--fg-2); border-bottom: 1px solid var(--line-strong); }
.quick .snooze button:hover { color: var(--fg); border-color: var(--fg); }
.unsnooze { display: inline; margin-left: 10px; }
.unsnooze .link { font-size: 13px; }

/* history */
.h-kind { display: inline-flex; align-items: center; gap: 10px; }
.kbar { width: 3px; height: 16px; border-radius: 2px; background: var(--t); }

/* birthdays */
.bday-date .bday-day { color: var(--bday); }
/* ---- circle (radial view) --------------------------------------------- */
.t-none { --t: var(--s-calm); }

.radial-wrap { position: relative; max-width: 920px; width: 100%; justify-self: center; }
.radial { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }

/* no lines: a soft glow around you, and a few motes of light drifting behind everyone (circle.js) */
.radial .glow-stop { stop-color: var(--area); }
/* closeness: two strips round you, the warm colour in two clear steps, stronger nearest you */
.radial .band { fill: var(--area); }
.radial .band-0 { opacity: .17; }
.radial .band-1 { opacity: .06; }
.radial .node.is-far { opacity: .78; }
.radial .mote { pointer-events: none; }
.radial .ring-label { fill: var(--fg-3); font-size: 12px; letter-spacing: .02em; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 6px; }
.radial .sector-label { fill: var(--fg); font-size: 15px; font-weight: 500; letter-spacing: -.01em; pointer-events: none; }
/* group names are pills, like the range buttons above the chart: tap one to see only that group */
.radial .sector-chip { cursor: pointer; outline: none; }
/* warm, with a soft glow that slowly breathes, like the sun on the welcome page; plain text colour on top */
.radial .chip-bg { fill: color-mix(in srgb, var(--area) 16%, var(--bg)); stroke: color-mix(in srgb, var(--area) 60%, transparent); stroke-width: 1.5;
  transition: fill .15s, stroke .15s; }
.radial .chip-glow { fill: var(--area); opacity: .42; pointer-events: none; }   /* still: a moving blur is redrawn every frame */
.radial .sector-chip:hover .chip-bg, .radial .sector-chip:focus-visible .chip-bg { fill: color-mix(in srgb, var(--area) 30%, var(--bg)); stroke: var(--area); }
.radial .sector-chip:focus-visible .chip-bg { stroke-width: 2.5; }
.radial .sector-chip:active .chip-bg { fill: color-mix(in srgb, var(--area) 42%, var(--bg)); }
/* one group on its own: its name over the chart, and the way back */
/* phones: the group pills in a row over the empty top of the chart, styled like the range buttons */
.group-chips { position: absolute; top: 8px; left: 0; right: 0; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.group-chips[hidden] { display: none; }
.group-chips { gap: 10px; }
.group-chips button { font: inherit; font-size: 14px; color: var(--fg); background: color-mix(in srgb, var(--area) 16%, var(--bg));
  border: 1.5px solid color-mix(in srgb, var(--area) 60%, transparent); border-radius: 999px; padding: 7px 18px; cursor: pointer;
  box-shadow: 0 0 14px 3px color-mix(in srgb, var(--area) 35%, transparent); }
.group-chips button:active { background: color-mix(in srgb, var(--area) 42%, var(--bg)); }

/* it floats over the empty top of the chart, so nothing below it jumps when it comes and goes */
.group-bar { position: absolute; top: 8px; left: 0; right: 0; z-index: 1; display: flex; align-items: baseline; justify-content: center; gap: 18px;
  animation: group-in .3s ease-out both; }
@keyframes group-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .group-bar { animation: none; } }
.group-bar[hidden] { display: none; }
.group-now { font-family: var(--display); font-style: italic; font-size: clamp(26px, 3vw, 34px); color: var(--fg); letter-spacing: -.01em; }
.group-back { font: inherit; font-size: 14px; color: var(--fg-2); background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; cursor: pointer; }
.group-back:hover, .group-back:focus-visible { color: var(--fg); border-color: var(--fg-3); }

.radial .node { cursor: pointer; outline: none; }
.radial .node-ring { fill: var(--bg); stroke: var(--t); stroke-width: 3; }
.radial .node-fill { fill: var(--line); }
.radial .node-initials { fill: var(--fg-2); font-size: 14px; font-weight: 500; }
.radial .node-label { fill: var(--fg); font-size: 13px; font-weight: 500; paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.radial .node-badge { fill: var(--s-due); stroke: var(--bg); stroke-width: 2.5; }
.radial .node:hover .node-ring, .radial .node:focus-visible .node-ring { stroke-width: 5; }
.radial.has-focus :is(.node, .event, .bond):not(.is-focus) { opacity: .45; }
.radial .node image { filter: grayscale(1); }
.radial .node:hover image { filter: none; }

.radial .me circle { fill: var(--fg); }
.radial .me text { fill: var(--bg); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }

.tip { position: absolute; transform: translate(-50%, calc(-100% - 8px)); pointer-events: none; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; white-space: nowrap; z-index: 2; }
.tip.tip-below { transform: translate(-50%, 8px); }
.tip-name { font-weight: 600; font-size: 14px; }
.tip-meta { opacity: .7; }

@media (max-width: 820px) {
  .radial .node-label { font-size: 15px; }
}

/* ---- home hero: half-radial ------------------------------------------- */
.intro-hero { padding: clamp(32px, 5vw, 72px) 0 clamp(8px, 1.5vw, 20px); }
.h1-hero { font-size: clamp(36px, 4.6vw, 72px); max-width: 18ch; }
.hero-circle { padding-bottom: clamp(48px, 6vw, 96px); }
.radial-wrap-half { max-width: 1240px; margin: 0 auto; }
.radial-wrap-half .radial .node-label { font-size: 14px; }
.hero-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px; margin-top: 8px; font-size: 14px; color: var(--fg-2); }
.hero-legend span { display: inline-flex; align-items: center; gap: 8px; }
.hero-legend i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--t, var(--s-calm)); }
.hero-legend .link { font-size: 14px; }
@media (max-width: 820px) {
  .hero-legend { justify-content: flex-start; }
  .hero-legend .muted { flex-basis: 100%; }
}

/* radial text scales with --k (set by circle.js on narrow screens) */
.radial { --k: 1; }
.radial .node-label { font-size: calc(13px * var(--k)); stroke-width: calc(5px * var(--k)); }
.radial-wrap-half .radial .node-label { font-size: calc(14px * var(--k)); }
.radial .node-initials { font-size: calc(14px * var(--k)); }
.radial .sector-label { font-size: calc(14px * var(--k)); }
.radial .ring-label { font-size: calc(12px * var(--k)); }
.radial .me text { font-size: calc(16px * min(var(--k), 1.5)); }
@media (max-width: 820px) { .radial .node-label { font-size: calc(13px * var(--k)); } }

/* ---- login ------------------------------------------------------------- */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; }
.login-form { width: 100%; max-width: 420px; display: grid; gap: 12px; }
.login-form .brand { margin: 0 0 24px; }
.login-form h1 { font-size: clamp(40px, 9vw, 64px); margin-bottom: 40px; }
.login-form .f-label { padding: 0; color: var(--fg-3); }
.login-form .btn { justify-self: start; margin-top: 28px; }
.login-error { margin: 4px 0 0; font-size: 15px; color: var(--accent); }
.login-note { margin: 4px 0 0; font-size: 14px; color: var(--fg-3); }
.login-note a { text-decoration: underline; text-underline-offset: 3px; }
.login-form input[readonly] { color: var(--fg-2); }
.account { max-width: 560px; padding: 24px 0 64px; }
.account h1 { margin-bottom: 8px; }
.account-email { color: var(--fg-2); margin: 0 0 40px; }
.account-form { display: grid; gap: 10px; margin: 0 0 48px; }
.account-form h2 { font-size: 20px; margin: 0 0 8px; }
.account-form .f-label { padding: 0; color: var(--fg-3); }
.account-form .btn { justify-self: start; margin-top: 16px; }
.account-note { color: var(--fg-3); font-size: 15px; margin: 0; }
/* the morning-note switch: push.js sets data-state, and only what fits it shows */
.push .push-msg, .push [data-for] { display: none; }
.push-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.push-buttons .btn { margin-top: 8px; }
.push[data-state="install"] [data-for~="install"], .push[data-state="unsupported"] [data-for~="unsupported"],
.push[data-state="denied"] [data-for~="denied"], .push[data-state="failed"] [data-for~="failed"],
.push[data-state="on"] [data-for~="on"], .push[data-state="off"] [data-for~="off"] { display: block; }
.push-buttons .btn[data-for] { display: none; }
.push[data-state="on"] .push-buttons [data-for~="on"], .push[data-state="off"] .push-buttons [data-for~="off"],
.push[data-state="failed"] .push-buttons [data-for~="failed"] { display: inline-flex; }
.push[data-state="busy"] .push-buttons { opacity: .5; pointer-events: none; }
.top nav form { display: inline; margin: 0; }
.top nav button { font: inherit; background: none; border: 0; padding: 0; color: var(--fg-3); cursor: pointer; }
.top nav button:hover { color: var(--fg); }

/* ---- check-in moments (moment.js) -------------------------------------- */
/* Every element's resting style is the finished drawing; animations only add the way in
   (fill-mode backwards), so reduced motion simply shows the final frame. */
.moment {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer; animation: m-fade .18s ease-out backwards;
}
.moment.is-leaving { opacity: 0; transition: opacity .25s ease-in; }
.moment-card { text-align: center; }
.moment-art { width: 168px; height: 168px; overflow: visible; color: var(--t); }
.moment-art * { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.moment-art .fill { fill: currentColor; stroke: none; }
.moment-title { margin: 20px 0 0; font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.moment-after { margin: 10px 0 0; font-size: 17px; color: var(--fg-2); }

.a-draw { stroke-dasharray: 1; animation: m-draw .45s var(--d, 0s) cubic-bezier(.4, 0, .2, 1) backwards; }
.a-pop { transform-box: fill-box; transform-origin: center; animation: m-pop .45s var(--d, 0s) cubic-bezier(.3, 1.6, .5, 1) backwards; }

/* in person: two figures lean in, arms wrap, a squeeze, a heart */
.a-fig-l { animation: m-in-l .5s cubic-bezier(.3, 1.3, .5, 1) backwards; }
.a-fig-r { animation: m-in-r .5s cubic-bezier(.3, 1.3, .5, 1) backwards; }
.a-lean-l { transform-origin: 33px 98px; transform: rotate(3deg); animation: m-lean-l .35s .3s ease-out backwards; }
.a-lean-r { transform-origin: 87px 98px; transform: rotate(-3deg); animation: m-lean-r .35s .3s ease-out backwards; }
.a-squeeze { transform-origin: 60px 100px; animation: m-squeeze .4s .8s ease-in-out; }
/* message: a high five, with a burst on impact */
.a-hand { transform-origin: 0 0; transform: rotate(12deg); animation: m-five .42s cubic-bezier(.4, 0, .3, 1.4) backwards; }
.a-shake { animation: m-shake .22s .3s; }
.a-ray { animation-duration: .25s; }
/* call: the phone rings, sound waves go out */
.a-ring { transform-origin: 60px 59px; animation: m-ring .7s .05s ease-in-out; }
/* video: a wave from the screen */
.a-wave-arm { transform-origin: 66px 70px; animation: m-wave 1s .45s ease-in-out backwards; }
.a-blink { animation: m-blink .5s .6s steps(1) 3; }
/* email: the envelope folds shut and flies off */
.a-fly { transform-origin: 60px 60px; animation: m-fly .42s 1.05s cubic-bezier(.55, 0, .8, .2) forwards; }
.a-trail { opacity: 0; stroke-dasharray: 1; animation: m-trail .5s calc(1.1s + var(--d, 0s)) ease-out; }
/* letter: the stamp thuds down, the postmark follows */
.a-stamp { transform-box: fill-box; transform-origin: center; animation: m-slam .38s .55s cubic-bezier(.5, 0, .7, 1.4) backwards; }
.a-thud { transform-origin: 60px 86px; animation: m-thud .22s .8s ease-out; }
/* other: a sparkle */
.a-twinkle { transform-box: fill-box; transform-origin: center; animation: m-twinkle .6s cubic-bezier(.3, 1.5, .5, 1) backwards; }

@keyframes m-fade { from { opacity: 0; } }
@keyframes m-draw { from { stroke-dashoffset: 1; } }
@keyframes m-pop { from { transform: scale(0); opacity: 0; } }
@keyframes m-in-l { from { transform: translateX(-18px); opacity: 0; } }
@keyframes m-in-r { from { transform: translateX(18px); opacity: 0; } }
@keyframes m-lean-l { from { transform: rotate(0); } }
@keyframes m-lean-r { from { transform: rotate(0); } }
@keyframes m-squeeze { 50% { transform: scale(.94, 1.03); } }
@keyframes m-five { from { transform: rotate(-38deg) translateY(10px); opacity: 0; } 70% { transform: rotate(17deg); opacity: 1; } }
@keyframes m-shake { 30% { transform: translateY(2px); } 65% { transform: translateY(-1px); } }
@keyframes m-ring { 12% { transform: rotate(-11deg); } 26% { transform: rotate(10deg); } 40% { transform: rotate(-8deg); } 54% { transform: rotate(6deg); } 68% { transform: rotate(-3deg); } 82% { transform: rotate(0); } }
@keyframes m-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-24deg); } 45% { transform: rotate(10deg); } 70% { transform: rotate(-20deg); } }
@keyframes m-blink { 50% { opacity: .15; } }
@keyframes m-fly { 25% { transform: translate(-4px, 3px) rotate(3deg); } to { transform: translate(78px, -64px) rotate(-14deg) scale(.55); opacity: 0; } }
@keyframes m-trail { from { opacity: 0; stroke-dashoffset: 1; } 35% { opacity: 1; stroke-dashoffset: 0; } to { opacity: 0; stroke-dashoffset: -1; } }
@keyframes m-slam { from { transform: scale(2.4) rotate(-14deg); opacity: 0; } 70% { transform: scale(.9); opacity: 1; } }
@keyframes m-thud { 40% { transform: scaleY(.95) translateY(1px); } }
@keyframes m-twinkle { from { transform: scale(0) rotate(-60deg); opacity: 0; } }

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

/* ---- family & dates ---------------------------------------------------- */
.kin .row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 2fr) auto; gap: 24px; align-items: baseline; padding: 16px 0; }
.kin .row:first-child { padding-top: 0; }
.kin .row:hover .x { opacity: 1; }
.kin-name { font-size: clamp(19px, 1.7vw, 24px); font-weight: 500; letter-spacing: -.02em; }
.kin-meta { font-size: 15px; color: var(--fg-2); }
.kin-actions { display: flex; gap: 16px; justify-content: flex-end; align-items: baseline; }
.kin-actions form { margin: 0; }
.kin a.x { text-decoration: none; }
.kin .row-edit { display: block; }
.kin .row-edit .inline-form { margin: 0; }
.add-more { margin-top: 20px; }
.add-more summary { cursor: pointer; font-size: 15px; color: var(--fg-2); list-style: none; display: inline-block; border-bottom: 1px solid var(--line-strong); }
.add-more summary::-webkit-details-marker { display: none; }
.add-more summary:hover { color: var(--fg); }
.add-more[open] summary { color: var(--fg-3); border-color: transparent; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 28px; margin-top: 16px; }
.inline-form .line { flex: 1 1 180px; width: auto; }
.inline-form select.line { flex: 1 1 200px; appearance: none; cursor: pointer; }
.inline-form .check { margin: 0; flex-basis: 100%; }
@media (max-width: 820px) {
  .kin .row { grid-template-columns: 1fr auto; gap: 2px 16px; }
  .kin .kin-meta { grid-column: 1; }
  .kin .row > .kin-actions { grid-column: 2; grid-row: 1; }
  .kin .x { opacity: 1; }
}

/* ---- circle: view toggle + "coming up" view ----------------------------- */
.view-toggle { display: flex; justify-content: center; gap: 28px; margin: 0 0 8px; }
.view-toggle button { font: inherit; font-size: 16px; font-weight: 500; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--fg-3); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.view-toggle button:hover { color: var(--fg); }
.view-toggle button[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }
.hero-legend[hidden] { display: none; }
.horizon { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 4px; }
.horizon[hidden] { display: none; }
.horizon button { font: inherit; font-size: 13px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; cursor: pointer; color: var(--fg-3); transition: color .15s, border-color .15s, background .15s; }
.horizon button:hover { color: var(--fg); border-color: var(--fg-3); }
.horizon button[aria-pressed="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }

/* in "coming up", colour carries due status instead of how you last connected */
.u-due { --u: var(--s-due); } .u-soon { --u: var(--s-soon); } .u-good { --u: var(--s-good); } .u-none { --u: var(--s-calm); }
.radial.v-upcoming .node { --t: var(--u); }
.hero-legend [class^="u-"] i { box-shadow: inset 0 0 0 2.5px var(--u); }
.radial.v-upcoming .node.is-later { opacity: .4; }
/* "+N": everyone with nothing coming up in the range, folded into one quiet bubble */
.radial .more { display: none; cursor: pointer; outline: none; }
.radial.v-upcoming .more { display: inline; }
.radial .more.is-last { cursor: default; }
.radial .more-disc { fill: var(--bg); stroke: var(--fg-3); stroke-width: 2; stroke-dasharray: 3 4; transition: stroke .15s; }
.radial .more:not(.is-last):hover .more-disc, .radial .more:focus-visible .more-disc { stroke: var(--fg); }
.radial .more-count { fill: var(--fg-2); font-size: calc(15px * var(--k)); font-weight: 600; font-variant-numeric: tabular-nums; }
.radial .more-label { fill: var(--fg-3); font-weight: 400; }
.radial.v-upcoming.has-focus :is(.node, .event, .bond):not(.is-focus) { opacity: .3; }

.radial .node-date { fill: var(--bday); stroke: var(--bg); stroke-width: 2.5; }
.radial.v-upcoming .node-date { display: none; }
.radial .events, .radial .bonds { transition: opacity .35s; }
.radial:not(.v-upcoming) :is(.events, .bonds) { opacity: 0; pointer-events: none; }
/* joined avatars: two overlapping lobes behind the people read as one peanut shape */
.radial .bond-lobe { fill: color-mix(in srgb, var(--bday) 22%, var(--bg)); stroke: none; }
.radial .pair-label { pointer-events: none; }
.radial.v-upcoming .node.is-paired .node-label { display: none; }
.radial .sat-fill { fill: var(--bg); stroke: var(--bday); stroke-width: 2.5; }
.radial .sat-initials { fill: var(--fg-2); font-size: calc(10px * var(--k)); font-weight: 600; pointer-events: none; }
.radial .event { cursor: default; outline: none; }
.radial .event-dot { fill: var(--bday); stroke: var(--bg); stroke-width: 3; }
.radial .event:hover .event-dot, .radial .event:focus-visible .event-dot { stroke: var(--bday); stroke-width: 2; }
.radial .event-days { fill: #fff; font-size: calc(11px * var(--k)); font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.radial .event-days.d3 { font-size: calc(8.5px * var(--k)); letter-spacing: -.02em; }
.dot-date { background: var(--bday); }
.dot-num { width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 600; display: inline-grid; place-items: center; }
.tip-date { opacity: 1; color: color-mix(in srgb, var(--bday) 60%, var(--bg)); }
@media (prefers-reduced-motion: reduce) { .radial .events { transition: none; } }
@media (max-width: 520px) {
  /* logo on its own row, the nav spread across the next */
  .top { flex-wrap: wrap; row-gap: 18px; }
  .top nav { width: 100%; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
  .top nav a, .top nav button { white-space: nowrap; }
  .brand { font-size: 24px; }
}


/* ---- sun: one primary yellow over the typographic layout ---------------
   The same layout, warmed up with one primary yellow.
   Yellow is a fill and a highlight, never text: dark ink on yellow reads at ~13:1,
   yellow on white wouldn't read at all. Status and check-in colours stay as they are. */

:root {
  --bg: #FFFCF4;
  --fg: #1E1B16;
  --fg-2: #5B5448;
  --fg-3: #978D7C;
  --line: #EFE7D6;
  --line-strong: #1E1B16;
  --accent: #A8563A;
  --sun: #FFCE3A;
  --sun-deep: #F2B90F;
  --sun-soft: #FFF2C2;
  --sun-wash: #FFF8DF;
  --area: #E9A800;
  --ink-on-sun: #1E1B16;
}
/* brand: a small sun before the name */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 6px var(--sun-soft); }

/* the headline count gets a highlighter stroke instead of red text */
h1 .hl { color: var(--fg); background: linear-gradient(transparent 60%, var(--sun) 60%, var(--sun) 92%, transparent 92%); padding: 0 .06em; margin: 0 -.06em; }

/* buttons: yellow with dark ink */
.btn { background: var(--sun); color: var(--ink-on-sun); }
.btn:hover { opacity: 1; background: var(--sun-deep); }
.link:hover { color: var(--fg); border-color: var(--sun-deep); box-shadow: inset 0 -3px 0 var(--sun); }

/* notices sit on a soft yellow card */
.notice { background: var(--sun-soft); border: 0; border-radius: 14px; padding: 14px 18px; margin-top: 8px; }
.notice-error { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }

/* avatars without a photo get a warm fill */
.avatar { background: var(--sun-soft); color: var(--fg-2); }
.radial .node-fill { fill: var(--sun-soft); }
.radial .sat-fill { fill: var(--sun-soft); }

/* the hero circle sits on a soft yellow panel */
.hero-circle { background: var(--sun-wash); border-radius: 36px; padding: clamp(24px, 3vw, 44px) clamp(12px, 2vw, 32px) clamp(28px, 3vw, 48px); margin-bottom: clamp(48px, 6vw, 96px); }
.radial .node-label, .radial .ring-label { stroke: var(--sun-wash); }
.radial .ring-close { fill: color-mix(in srgb, var(--sun) 20%, transparent); }
.radial .me circle { fill: var(--sun); }
/* the glow around you */
.radial .halo-stop { stop-color: var(--sun); }
.radial .me-rim { fill: var(--sun); opacity: .85; }
.radial .me-halo { opacity: .9; }   /* still: a moving blur is redrawn every frame */
.radial .me text { fill: var(--ink-on-sun); }
.radial-wrap:not(.radial-wrap-half) .radial .node-label { stroke: var(--bg); }

/* selected states: yellow */
.view-toggle button[aria-pressed="true"] { border-color: var(--sun); }
.horizon button[aria-pressed="true"] { background: var(--sun); color: var(--ink-on-sun); border-color: var(--sun); }
.horizon button { background: var(--bg); }

/* form fields: a yellow underline when focused */
.line:focus { border-color: var(--sun-deep); box-shadow: 0 1px 0 0 var(--sun-deep); outline: none; }

/* person page: the check-in block sits on the same soft panel, the stats get a yellow rule */
.sec-checkin { background: var(--sun-wash); border-top: 0; border-radius: 28px; padding: 40px clamp(20px, 2.5vw, 40px) 48px; margin: 0 calc(-1 * clamp(20px, 2.5vw, 40px)) 72px; }
.sec-checkin + .sec { border-top-color: var(--line-strong); }
.stats { border-top: 3px solid var(--sun); }

/* dark: follows the device unless the header toggle picked a side */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A;
    --fg: #F5F1E6;
    --fg-2: #B8B1A2;
    --fg-3: #7A7468;
    --line: #262420;
    --line-strong: #F5F1E6;
    --accent: #EE9C74;
    --sun: #FFCE3A;
    --sun-deep: #FFDB6B;
    --sun-soft: #3B3218;
    --sun-wash: #17150F;
    --area: #FFCE3A;
    --ink-on-sun: #0A0A0A;
  }
  :root:not([data-theme="light"]) .brand::before { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sun) 22%, transparent); }
  :root:not([data-theme="light"]) .avatar { color: var(--fg); }
  :root:not([data-theme="light"]) .radial .node-initials { fill: var(--fg); }
  :root:not([data-theme="light"]) .notice-error { background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
  :root:not([data-theme="light"]) h1 .hl { color: var(--sun); background: none; }
  :root:not([data-theme="light"]) .radial .ring-close { fill: color-mix(in srgb, var(--sun) 11%, transparent); }
}
:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --fg: #F5F1E6;
  --fg-2: #B8B1A2;
  --fg-3: #7A7468;
  --line: #262420;
  --line-strong: #F5F1E6;
  --accent: #EE9C74;
  --sun: #FFCE3A;
  --sun-deep: #FFDB6B;
  --sun-soft: #3B3218;
  --sun-wash: #17150F;
  --area: #FFCE3A;
  --ink-on-sun: #0A0A0A;
}
:root[data-theme="dark"] .brand::before { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sun) 22%, transparent); }
:root[data-theme="dark"] .avatar { color: var(--fg); }
:root[data-theme="dark"] .radial .node-initials { fill: var(--fg); }
:root[data-theme="dark"] .notice-error { background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
:root[data-theme="dark"] h1 .hl { color: var(--sun); background: none; }
:root[data-theme="dark"] .radial .ring-close { fill: color-mix(in srgb, var(--sun) 11%, transparent); }

/* ---- person: nickname under the name ---------------------------------- */
.nickname { margin: 10px 0 0; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.02em; color: var(--fg-2); }

/* ---- header: light / dark toggle -------------------------------------- */
.theme-toggle { align-self: center; display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--fg-3); }
.theme-toggle:hover { color: var(--fg); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---- half view on touch: a tap is a tap ---------------------------------- */
.radial-wrap-half .radial, .orbit { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.radial-wrap-half .node, .radial-wrap-half .event { touch-action: manipulation; }
.radial-wrap-half .event { cursor: pointer; }
.radial .node.is-staged { visibility: hidden; }
@media (hover: none) {
  .radial .node:hover .node-ring { stroke-width: 3; }
  .radial .node:hover image { filter: grayscale(1); }
}

/* ---- orbit: someone tapped in the half view ------------------------------ */
/* on the body too: phones otherwise widen the page to fit the bubbles pushed past its edge */
html.orbit-lock, html.orbit-lock body { overflow: hidden; }
html.orbit-lock body { padding-right: var(--bar, 0); }
/* page < scrim < the chart, lifted so its bubbles stay in view as they're pushed < the ring */
.orbit-scrim { position: fixed; inset: 0; z-index: 39; background: var(--bg); opacity: 0; transition: opacity .3s; }
.orbit-scrim.is-on { opacity: 1; }   /* only the chart's glow and sparkles stay behind them (it's lifted above this) */
.orbit-scrim[hidden] { display: none; }
.radial-wrap.is-lifted { z-index: 40; }
/* someone in focus: "You", the group names, the scale and the "+N" bubble fade back with everyone else */
.radial :is(.sectors, .me, .me-glow, .more, .ring-label), .group-chips { transition: opacity .6s ease; }
.radial.is-focusing :is(.sectors, .me, .me-glow, .more, .ring-label), .group-chips.is-receded { opacity: 0; pointer-events: none; }
.orbit { --o: 1; position: fixed; inset: 0; height: 100dvh; z-index: 41; overscroll-behavior: contain; }
.orbit[hidden] { display: none; }
.orbit :is(a, button) { touch-action: manipulation; }

.orbit-head { position: absolute; top: 0; left: 0; right: 0; padding: calc(20px + env(safe-area-inset-top, 0px)) 24px 0; text-align: center; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .3s; }
.orbit.is-open .orbit-head { opacity: 1; transform: none; }
.orbit-name { margin: 0; font-size: clamp(24px, 3vw, 36px); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; }
.orbit-meta { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--fg-2); }
.orbit-meta p { margin: 0; }
.orbit-date { color: var(--fg); }
.orbit-date::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bday); margin-right: 6px; vertical-align: 1px; }
/* close sits in the bottom right corner, where a thumb is (above the home indicator on iPhone) */
.orbit-close { position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 3; width: 54px; height: 54px;
  display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--fg); cursor: pointer;
  background: color-mix(in srgb, var(--bg) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 14%, transparent), 0 4px 14px color-mix(in srgb, var(--fg) 12%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s, transform .12s, color .8s; }
.orbit-close:active { transform: scale(.92); }
.orbit.is-open .orbit-close { opacity: 1; }
.orbit-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.orbit-field { position: absolute; width: 0; height: 0; }
/* you: a big sun rising from the bottom edge (only its top half shows), rising into view as it opens */
.orbit-sun { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; pointer-events: none; }
.orbit-sun-disc {
  position: absolute; left: 0; top: 0; width: 300px; height: 300px; display: block;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--sun) 70%, #fff) 0, var(--sun) 55%);
  box-shadow: 0 0 calc(30px * var(--o)) calc(10px * var(--o)) color-mix(in srgb, var(--sun) 65%, transparent),
    0 0 calc(110px * var(--o)) calc(40px * var(--o)) color-mix(in srgb, var(--sun) 26%, transparent);
  opacity: 0; transform: translate(-50%, -50%) translateY(80px) scale(.85); transition: opacity .35s, transform .6s cubic-bezier(.32, .72, 0, 1);
}
/* opening, the sun rises into view and quickly spreads, faster and faster, until it's the whole background. It plays once per opening (is-rising), not when moving to someone else. */
.orbit.is-rising .orbit-sun-disc { opacity: 1; animation: sun-rise .8s both; }
@keyframes sun-rise {
  0% { opacity: 0; transform: translate(-50%, -50%) translateY(80px) scale(.85); animation-timing-function: cubic-bezier(.6, 0, .9, .35); }
  10% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) translateY(0) scale(var(--cover, 8)); }
}
/* once it's everywhere it stays put, even when you move to someone else */
.orbit.is-sunlit .orbit-sun-disc { animation: none; opacity: 1; transform: translate(-50%, -50%) scale(var(--cover, 8)); }
@media (prefers-reduced-motion: reduce) { .orbit.is-rising .orbit-sun-disc { animation: none; transform: translate(-50%, -50%) scale(var(--cover, 8)); } }
/* the curve their people sit on, all the way from the sun to the edge: a thin, still line of warm light. It
   fades in gently as the view opens, and goes first as it closes. */
.orbit-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .1s; }
.orbit.is-ready .orbit-trail { opacity: 1; transition: opacity .8s .2s; }
.orbit-trail path { fill: none; stroke-linecap: round; }
.orbit-trail .trail-glow { stroke: #fffbea; stroke-width: 2; opacity: .85; }
/* the history curve: the same line, fainter, a little to the right; swiped in, the two trade places */
.orbit-trail path { transition: transform .55s cubic-bezier(.3, .7, 0, 1), opacity .45s, stroke-width .45s; }
.orbit-trail .trail-hist { stroke: #fffbea; stroke-width: 1.5; opacity: .35; transform: translateX(var(--off, 66px)); }
.orbit.is-history .orbit-trail .trail-hist { transform: none; opacity: .85; stroke-width: 2; }
.orbit.is-history .orbit-trail .trail-glow { transform: translateX(calc(-1 * var(--off, 66px))); opacity: .22; stroke-width: 1.5; }
/* the two layers of nodes on it: their people, and their check-ins with you */
.orbit-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform .55s cubic-bezier(.3, .7, 0, 1), opacity .45s; }
.orbit-layer.is-hist { transform: translateX(var(--off, 66px)); opacity: 0; }
.orbit.is-history .orbit-layer.is-hist { transform: none; opacity: 1; }
.orbit.is-history .orbit-layer.is-kin { transform: translateX(calc(-1 * var(--off, 66px))) scale(.92); opacity: .1; }
.orbit-layer.is-kin .orbit-sat-words { transition: opacity .3s; }
.orbit.is-history .orbit-layer.is-kin .orbit-sat-words { opacity: 0; }   /* in the background: just their shapes */
.orbit:not(.is-history) .orbit-layer.is-hist .orbit-sat, .orbit.is-history .orbit-layer.is-kin .orbit-sat { pointer-events: none; }
/* a check-in: its kind's icon on a disc that glows in its colour */
.orbit-sat.is-checkin .orbit-sat-disc svg { width: calc(20px * var(--o)); height: calc(20px * var(--o)); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.orbit-sat.is-checkin .orbit-sat-role { max-width: 15em; white-space: normal; }
/* which curve: a small switch under their name (a sideways swipe or ← → does the same) */
.orbit-modes { display: inline-flex; gap: 4px; margin-top: 10px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); }
.orbit-modes button { font: inherit; font-size: 13px; color: var(--fg-2); background: none; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.orbit-modes button[aria-pressed="true"] { color: var(--fg); background: color-mix(in srgb, var(--bg) 80%, transparent); box-shadow: 0 1px 3px color-mix(in srgb, var(--fg) 15%, transparent); }
@media (prefers-reduced-motion: reduce) { .orbit-trail path, .orbit-layer { transition: none; } }
/* everything on it turns to the colours that read on the sun, in light and dark alike */
.orbit:is(.is-sunny, .is-sunlit) { --fg: var(--ink-on-sun); --fg-2: color-mix(in srgb, var(--ink-on-sun) 72%, var(--sun)); --fg-3: color-mix(in srgb, var(--ink-on-sun) 50%, var(--sun));
  --bg: color-mix(in srgb, var(--sun) 30%, #fff); --sun-soft: #FFF7DC; --line: color-mix(in srgb, var(--ink-on-sun) 18%, transparent); }
.orbit :is(.orbit-head, .orbit-label, .orbit-sat-words) { transition: color .8s; }
.orbit-head, .orbit-close, .orbit-label, .orbit-sat-name, .orbit-sat-role { color: var(--fg); }
.orbit-meta, .orbit-sat-role { color: var(--fg-2); }

/* the avatar: grows out of where it sat */
.orbit-core {
  position: absolute; left: 0; top: 0; width: calc(92px * var(--o)); height: calc(92px * var(--o));
  display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: var(--sun-soft); color: var(--fg); font-size: calc(30px * var(--o)); font-weight: 500;
  /* no ring: the colour of how you last connected glows out of them instead, soft at the edge */
  box-shadow: inset 0 0 calc(14px * var(--o)) calc(2px * var(--o)) color-mix(in srgb, var(--t, var(--s-calm)) 55%, transparent),
    0 0 calc(20px * var(--o)) calc(5px * var(--o)) color-mix(in srgb, var(--t, var(--s-calm)) 60%, transparent),
    0 0 calc(60px * var(--o)) calc(16px * var(--o)) color-mix(in srgb, var(--t, var(--s-calm)) 26%, transparent);
  overflow: visible;
  transform: translate(-50%, -50%) translate(var(--fx, 0), var(--fy, 0)) scale(var(--fs, 1));
  transition: transform .46s cubic-bezier(.32, .72, 0, 1);
}
.orbit.is-open .orbit-core { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
.orbit-core.by-due { --t: var(--u); }
.orbit-core img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* satellites and actions fold into the avatar; opening sends each one out along its ray */
.orbit-sat, .orbit-act {
  position: absolute; left: 0; top: 0; display: block; padding: 0; background: none; border: 0; font: inherit; color: var(--fg); text-align: center;
  opacity: 0; transform: translate(-50%, -50%) translate(0, 0) scale(.3);
  transition: transform .42s cubic-bezier(.3, 1.3, .5, 1) var(--d, 0s), opacity .18s var(--d, 0s);
  pointer-events: none;
}
.orbit.is-open :is(.orbit-sat, .orbit-act) { opacity: 1; transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0)) scale(1); }
.orbit:not(.is-open) :is(.orbit-sat, .orbit-act) { transition-delay: 0s; transition-duration: .2s; }
.orbit.is-ready :is(button.orbit-sat, a.orbit-sat, .orbit-act) { pointer-events: auto; cursor: pointer; }
/* once open, their people follow a scroll straight away (no easing), and one that's faded out can't be tapped */
.orbit.is-ready .orbit-sat { transition: opacity .2s; }
.orbit.is-ready .orbit-sat.is-out { pointer-events: none; }
/* more of their people further up the curve, or back down it */
.orbit-more { position: absolute; z-index: 1; transform: translate(-50%, -50%); font: inherit; font-size: 13px; font-weight: 600; color: var(--fg);
  background: color-mix(in srgb, var(--sun) 25%, var(--bg)); border: 1.5px solid color-mix(in srgb, var(--sun) 70%, transparent); border-radius: 999px;
  padding: 5px 12px; white-space: nowrap; cursor: pointer; box-shadow: 0 0 14px 2px color-mix(in srgb, var(--sun) 40%, transparent); opacity: 0; transition: opacity .3s .5s; }
.orbit.is-ready .orbit-more { opacity: 1; }
.orbit-more[hidden] { display: none; }
/* a short note (someone who isn't in your circle in Solé) */
.orbit-toast { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 86px calc(18px + env(safe-area-inset-bottom, 0px)) 24px;
  border-radius: 18px 18px 0 0; background: var(--fg); color: var(--bg); font-size: 16px; line-height: 1.35; text-align: center;
  transform: translateY(105%); pointer-events: none; transition: transform .35s cubic-bezier(.32, .72, 0, 1); }
.orbit-toast.is-on { transform: none; }
.orbit-form { display: contents; }
/* the check-in node on the edge of their avatar: the ways of getting in touch fold into it until it's tapped,
   then it turns into an X and they fan out along their arc */
.orbit-qc { position: absolute; left: 0; top: 0; z-index: 1; display: block; padding: 0; background: none; border: 0; font: inherit; color: var(--fg); cursor: pointer;
  opacity: 0; transform: translate(-50%, -50%) translate(0, 0) scale(.3); pointer-events: none;
  transition: transform .42s cubic-bezier(.3, 1.3, .5, 1) .18s, opacity .2s .18s; }
.orbit.is-open .orbit-qc { opacity: 1; transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0)); }
.orbit.is-ready .orbit-qc { pointer-events: auto; }
.orbit-qc-disc { width: calc(44px * var(--o)); height: calc(44px * var(--o)); display: grid; place-items: center; border-radius: 50%; background: #fffbea; color: var(--ink-on-sun);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink-on-sun) 22%, transparent), 0 0 16px 4px rgba(255, 251, 234, .8); transition: transform .3s; }
.orbit-qc-disc svg { width: calc(21px * var(--o)); height: calc(21px * var(--o)); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.orbit-qc .i-x, .orbit.is-checking .orbit-qc .i-check { display: none; }
.orbit.is-checking .orbit-qc .i-x { display: contents; }
.orbit-qc .i-check { display: contents; }
.orbit.is-checking .orbit-qc-disc { transform: rotate(90deg); }
.orbit-qc .orbit-label { transition: opacity .15s; }
.orbit.is-checking .orbit-qc .orbit-label { opacity: 0; }
.orbit-qc:active .orbit-qc-disc { transform: scale(.9); }
/* folded: hidden inside the node */
.orbit.is-open:not(.is-checking) .orbit-act { opacity: 0; transform: translate(-50%, -50%) translate(var(--qx, 0), var(--qy, 0)) scale(.3); transition-delay: 0s; transition-duration: .22s; }
.orbit.is-ready:not(.is-checking) .orbit-act { pointer-events: none; }

.orbit-sat-disc, .orbit-disc { display: grid; place-items: center; margin: 0 auto; border-radius: 50%; overflow: hidden; }
.orbit-sat { width: calc(44px * var(--o)); }
/* no ring: they glow, in the colour of how you last connected if you keep them in Solé, else softly warm */
.orbit-sat-disc { width: calc(44px * var(--o)); height: calc(44px * var(--o)); background: var(--sun-soft); color: var(--fg); font-size: calc(14px * var(--o)); font-weight: 600;
  overflow: visible;
  box-shadow: inset 0 0 calc(8px * var(--o)) calc(1px * var(--o)) color-mix(in srgb, var(--t, var(--sun)) 55%, transparent),
    0 0 calc(14px * var(--o)) calc(3px * var(--o)) color-mix(in srgb, var(--t, var(--sun)) 55%, transparent),
    0 0 calc(36px * var(--o)) calc(8px * var(--o)) color-mix(in srgb, var(--t, var(--sun)) 22%, transparent); }
.orbit-sat.is-plain .orbit-sat-disc, .orbit-sat.is-more .orbit-sat-disc { --t: var(--fg-3); background: color-mix(in srgb, var(--sun-soft) 60%, var(--bg)); }
.orbit-sat-disc img { border-radius: 50%; }
.orbit-sat-words { position: absolute; right: calc(100% + 12px * var(--o)); top: 50%; transform: translateY(-50%); text-align: right; white-space: nowrap; line-height: 1.15; }
.orbit-sat-name { display: block; font-size: calc(16px * var(--o)); font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.orbit-sat-role { display: block; font-family: var(--display); font-style: italic; font-size: calc(13px * var(--o)); color: var(--fg-2); }
.orbit-sat-disc img { width: 100%; height: 100%; object-fit: cover; }
.orbit-sat-days { position: absolute; top: -5px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 9px; background: var(--bday); color: #fff; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }

.orbit-act { width: calc(44px * var(--o)); }
.orbit-disc { width: calc(44px * var(--o)); height: calc(44px * var(--o)); background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 2px var(--t, var(--fg-3)); transition: transform .12s, background .15s; }
.orbit-disc svg { width: calc(20px * var(--o)); height: calc(20px * var(--o)); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.orbit-act.is-profile .orbit-disc { background: var(--sun); color: var(--ink-on-sun); box-shadow: none; }
.orbit-act:active .orbit-disc { transform: scale(.9); }
.orbit-act.is-sending .orbit-disc { background: var(--t, var(--sun)); color: #fff; }
@media (hover: hover) { .orbit-act:hover .orbit-disc { background: var(--sun-soft); } .orbit-act.is-profile:hover .orbit-disc { background: var(--sun-deep); } }
.orbit-act .orbit-label { top: 50%; margin: 0;
  transform: translate(calc(-50% + var(--ax, 0) * 50%), calc(-50% + var(--ay, 1) * 50%)) translate(calc(var(--ax, 0) * 28px * var(--o)), calc(var(--ay, 1) * 27px * var(--o))); }
.orbit-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; font-weight: 500; }
.orbit-close:focus-visible, .orbit-core:focus-visible, .orbit-sat:focus-visible, .orbit-act:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .orbit-scrim, .orbit, .orbit *, .radial :is(.rings, .sectors) { transition: none !important; }
}

/* a secondary action next to the yellow ones */
.btn.btn-quiet { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.btn-quiet:hover { background: var(--line); }

/* ---- landing: what a visitor sees before logging in ---------------------- */
.landing-main { max-width: 980px; padding-bottom: 72px; }
.landing-hero { padding: clamp(32px, 8vw, 96px) 0 clamp(24px, 5vw, 48px); max-width: 760px; }
.landing-hero h1 { font-size: clamp(40px, 7.5vw, 76px); line-height: 1.02; margin: 0 0 28px; }
.landing-lede { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--fg-2); margin: 0 0 36px; max-width: 620px; }
.landing-art { margin: 0 0 clamp(40px, 8vw, 88px); }
.landing-art svg { display: block; width: 100%; max-width: 640px; margin: 0 auto; overflow: visible; }
.landing-art figcaption { text-align: center; color: var(--fg-3); font-size: 15px; max-width: 520px; margin: 18px auto 0; line-height: 1.5; }
.la-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.la-ring.la-close { fill: color-mix(in srgb, var(--area) 9%, transparent); stroke: none; }
.la-base { stroke: var(--line-strong); opacity: .35; }
.la-spokes line { stroke: var(--line); stroke-width: 2; }
.la-p { fill: var(--bg); stroke-width: 3.5; }
.la-t1 { stroke: var(--t-together); }
.la-t2 { stroke: var(--t-voice); }
.la-t3 { stroke: var(--t-written); }
.la-far { stroke: var(--s-calm); }
.la-you { fill: var(--sun); }
.la-you-label { fill: var(--ink-on-sun); font-size: 15px; font-weight: 600; }
.landing-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 36px 40px; border-top: 1px solid var(--line); padding-top: 40px; }
.landing-points h2 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.01em; }
.landing-points p { margin: 0; color: var(--fg-2); line-height: 1.55; font-size: 16px; }
.landing-invite { margin: 56px 0 0; color: var(--fg-3); font-size: 15px; }

/* ---- first run: an empty circle, waiting ---- */
/* a new, empty circle: just an invitation, in words, and the way to add someone */
.first-run { max-width: 34em; padding-top: clamp(8px, 4vw, 40px); }
.first-title { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.05; margin: 0 0 14px; max-width: 14ch; }
.first-title em { font-style: italic; }
.first-run .lead { margin: 0 0 26px; }

/* ---- "add to Home Screen" card ---- */
.install { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; max-width: 480px; margin: 0 auto;
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 12px 16px 18px; background: var(--sun-wash); color: var(--fg);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 32px rgba(30, 27, 22, .14);
  opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease; }
.install[hidden] { display: none; }
.install.on { opacity: 1; transform: none; }
.install[data-mode="ios"] .install-android, .install[data-mode="android"] .install-ios { display: none; }
.install-sun { flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 6px var(--sun-soft); }
.install-text { flex: 1; min-width: 0; }
.install-text strong { display: block; font-size: 16px; font-weight: 600; }
.install-text p { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--fg-2); }
.install-text p b { color: var(--fg); font-weight: 600; }
.install-text svg { width: 17px; height: 17px; vertical-align: -3px; color: var(--fg); }
.install-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--fg-3); }
.install .install-go { margin-top: 12px; padding: 9px 20px; font-size: 15px; }
.install-x { flex: none; background: none; border: 0; padding: 2px 6px; font-size: 24px; line-height: 1; color: var(--fg-3); cursor: pointer; }
.install-x:hover { color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .install { transition: none; } }
