:root {
  /* The page: deep navy under Pip's meadow, with glass cards. */
  --page: #0d2a3e;
  --on: #f2f7fa;
  --soft: #dfe9ef;
  --muted: #bcd0dc;
  --glass: rgb(255 255 255 / 0.06);
  --glass-line: rgb(255 255 255 / 0.12);
  /* Status tones for rings and today's bar (always shown with the number beside them). */
  --mint: #71f7b1;
  --amber: #f2c26b;
  --rose: #e58aa9;
  /* Chart marks on the dark cards: both pass the dataviz checks against the card surface
     (lightness band, CVD separation, 3:1 contrast). Pure mint is too light for marks here. */
  --ai: #1fa968;
  --late: #9a7cf0;
  /* Paper: sign-in panels and dialogs. */
  --paper: #fffbf8;
  --ink: #392d43;
  --ink-muted: #5e4f66;
  --line: #e5dce1;
  --plum: #7b628f;
  --error: #a33a55;
  --error-on-dark: #ffb3c4;
  --serif: 'Instrument Serif', Georgia, serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* Views switch with the hidden attribute; layout rules like display: flex must not override it. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--on);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.45;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: var(--mint);
}

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

.muted {
  color: var(--muted);
  font-size: 14px;
}

.small {
  font-size: 13px;
}

/* ---------- Buttons ---------- */

button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button.mint {
  background: var(--mint);
  color: var(--page);
  border-radius: 999px;
}

button.ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.75);
  background: rgb(13 42 62 / 0.3);
  color: var(--on);
  font-weight: 500;
  font-size: 15px;
  backdrop-filter: blur(12px);
}

button.link {
  min-height: 44px;
  padding: 0 4px;
  background: transparent;
  color: var(--mint);
  font-size: 14px;
}

button.link.inline {
  min-height: 0;
  padding: 0;
  margin-left: 6px;
}

/* ---------- The scene ---------- */

.scene {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.art img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

/* Darken the top for the header and fade into the page at the bottom, per scene. */
.wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgb(13 42 62 / 0.55) 0%,
    rgb(13 42 62 / 0.12) 26%,
    rgb(13 42 62 / 0.05) 46%,
    rgb(13 42 62 / 0.72) 72%,
    var(--page) 100%
  );
}

.scene[data-scene='dusk'] .wash {
  background: linear-gradient(
    180deg,
    rgb(13 42 62 / 0.5) 0%,
    rgb(13 42 62 / 0.08) 26%,
    rgb(13 42 62 / 0.12) 48%,
    rgb(13 42 62 / 0.76) 72%,
    var(--page) 100%
  );
}

.scene[data-scene='night'] .wash,
.scene[data-scene='late'] .wash {
  background: linear-gradient(
    180deg,
    rgb(10 29 44 / 0.4) 0%,
    rgb(10 29 44 / 0.05) 30%,
    rgb(10 29 44 / 0.22) 52%,
    rgb(10 29 44 / 0.86) 76%,
    var(--page) 100%
  );
}

.inner {
  max-width: 1200px;
  /* The meadow fills the first screen, but a very tall window doesn't get a mile of sky. */
  min-height: min(100svh, 980px);
  margin: 0 auto;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  line-height: 0;
}

.brand img {
  height: 26px;
  width: auto;
}

.nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgb(13 42 62 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.18);
  backdrop-filter: blur(16px);
}

.nav a {
  color: var(--on);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
}

.nav a[aria-current='true'] {
  background: var(--on);
  color: var(--page);
  font-weight: 600;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.glass-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.3);
  background: rgb(13 42 62 / 0.4);
  backdrop-filter: blur(12px);
  font-variant-numeric: tabular-nums;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgb(13 42 62 / 0.5);
  border: 1px solid rgb(255 255 255 / 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

/* ---------- Today, over the scene ---------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.ring {
  width: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.5);
}

.ring-dial {
  --tone: var(--mint);
  width: 104px;
  height: 104px;
  border-radius: 999px;
  background: conic-gradient(var(--tone) calc(var(--v) * 1%), rgb(255 255 255 / 0.2) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring[data-tone='warn'] .ring-dial {
  --tone: var(--amber);
}

.ring[data-tone='bad'] .ring-dial {
  --tone: var(--rose);
}

.ring[data-tone='none'] .ring-dial {
  --tone: transparent;
}

.ring-value {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border-radius: 999px;
  background: rgb(13 42 62 / 0.62);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

.ring-name {
  font-size: 15px;
}

.ring-hint {
  font-size: 12px;
  color: #e6eef3;
}

.pip {
  align-self: center;
  width: 210px;
  height: auto;
  margin-top: auto;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.35));
}

.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: #e6eef3;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
}

.scene[data-scene='dusk'] .label {
  color: #ffe3b0;
}

.scene[data-scene='night'] .label,
.scene[data-scene='late'] .label {
  color: #f4b6cb;
}

.story h1 {
  max-width: 840px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.5px;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.35);
}

.today-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 28px;
  align-items: end;
}

.compare {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-name {
  font-size: 14px;
  color: var(--soft);
}

.compare-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.fill {
  flex: none;
  height: 20px;
  width: calc((100% - 96px) * var(--w, 0) / 100);
  border-radius: 999px;
  background: var(--mint);
  transition: width 0.6s ease;
}

.fill.typical {
  background: rgb(255 255 255 / 0.32);
}

.fill[data-tone='warn'] {
  background: var(--amber);
}

.fill[data-tone='bad'] {
  background: var(--rose);
}

.compare-value {
  white-space: nowrap;
}

.limits {
  font-size: 13px;
  color: var(--soft);
}

.act {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.late,
.tag-ask {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-ask span {
  font-size: 17px;
}

.pass-note {
  font-size: 14px;
  color: var(--soft);
  text-align: right;
}

.pass-note:empty {
  display: none;
}

.chosen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.chosen li {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgb(113 247 177 / 0.16);
  border: 1px solid rgb(113 247 177 / 0.45);
  font-size: 13px;
}

.updated {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Cards ---------- */

.cards {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Two columns from tablet width; wide cards span both, so no card leaves a hole beside it. */
@media (min-width: 860px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card.wide,
.reads,
.foot {
  grid-column: 1 / -1;
}

.card h2,
.reads h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.mintcard {
  background: rgb(113 247 177 / 0.09);
  border-color: rgb(113 247 177 / 0.35);
}

.eyebrow,
.card h2.eyebrow {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--mint);
}

/* One-tap check-in */

.consent {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consent h3 {
  margin: 0;
  font-size: 18px;
}

.consent-points {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.consent-link {
  color: var(--mint);
}

.consent button.mint {
  align-self: flex-start;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 700;
}

.checkin-questions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.consent[hidden],
.checkin-questions[hidden] {
  display: none;
}

.scale {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.scale legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 16px;
}

.taps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.taps button {
  min-height: 52px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(255 255 255 / 0.08);
  color: var(--on);
  font-size: 18px;
}

.taps button[aria-pressed='true'] {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--page);
}

.ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.thanks {
  min-height: 20px;
  font-size: 14px;
  color: var(--mint);
}

.thanks.error {
  color: var(--error-on-dark);
}

/* Pip noticed */

.insight-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insight-head img {
  width: 60px;
  height: auto;
}

.insight {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  text-wrap: balance;
}

.progress {
  height: 20px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--ai);
  transition: width 0.6s ease;
}

.mint-link {
  align-self: flex-start;
  margin-top: auto;
  background: var(--mint);
  color: var(--page);
  text-decoration: none;
  font-weight: 700;
  padding: 13px 18px;
  border-radius: 16px;
}

/* Rhythm heatmap: one hue for time with AI, brighter is more; violet for after curfew. */

.heat-scroll {
  overflow-x: auto;
}

.heat {
  min-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.heat-hours,
.heat-rows li {
  display: grid;
  grid-template-columns: 48px repeat(24, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.heat-hours {
  font-size: 11px;
  color: var(--muted);
}

.heat-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.heat-rows .day-name {
  font-size: 12px;
  color: var(--soft);
}

.cell {
  height: 20px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.06);
}

.cell[data-level='1'] {
  background: rgb(31 169 104 / 0.35);
}

.cell[data-level='2'] {
  background: rgb(31 169 104 / 0.55);
}

.cell[data-level='3'] {
  background: rgb(31 169 104 / 0.78);
}

.cell[data-level='4'] {
  background: var(--ai);
}

.cell[data-late='true'] {
  background: var(--late);
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.swatch.ai {
  background: var(--ai);
}

.swatch.late-swatch {
  background: var(--late);
}

/* Supervision load */

.stat {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.split {
  display: flex;
  height: 20px;
  gap: 3px;
}

.split span {
  min-width: 0;
  border-radius: 4px;
}

.split .one {
  background: rgb(31 169 104 / 0.45);
  border-radius: 999px 4px 4px 999px;
}

.split .many {
  background: var(--ai);
  border-radius: 4px 999px 999px 4px;
}

.split .one:has(+ .many[hidden]) {
  border-radius: 999px;
}

/* Evenings */

.nights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
}

.nights li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.night-track {
  width: 12px;
  height: 90px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.night-fill {
  width: 12px;
  border-radius: 999px;
}

.nights li[data-kind='kept'] .night-fill {
  height: 12px;
  background: var(--ai);
}

.nights li[data-kind='late'] .night-fill {
  background: var(--late);
}

/* Tokens by tool: ranked bars on one baseline, one hue, every value printed. */

.tool-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool {
  position: relative;
  display: grid;
  gap: 5px;
  border-radius: 10px;
  outline-offset: 4px;
}

.tool-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}

.tool-name {
  font-weight: 600;
}

.tool-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tool-track {
  height: 20px;
  border-left: 1px solid rgb(255 255 255 / 0.25);
}

.tool-bar {
  height: 100%;
  width: 0;
  background: var(--ai);
  border-radius: 0 4px 4px 0;
  transition:
    width 0.6s ease,
    filter 0.15s ease;
}

.tool:hover .tool-bar,
.tool:focus-visible .tool-bar {
  filter: brightness(1.2);
}

.tool-meta {
  color: var(--muted);
  font-size: 12.5px;
  min-height: 1em;
}

.tool-tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 1;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--on);
  color: var(--page);
  font-size: 12.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.tool:hover .tool-tip,
.tool:focus-visible .tool-tip {
  opacity: 1;
}

/* Connected IDEs */

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

.devices li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--glass-line);
}

.devices strong {
  display: block;
  font-size: 15px;
}

.devices span {
  color: var(--muted);
  font-size: 13px;
}

.status {
  min-height: 20px;
  font-size: 14px;
  color: var(--muted);
}

.status.error {
  color: var(--error-on-dark);
}

/* Boundaries */

.bounds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 8px 28px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.field output {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.cards select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  color: var(--on);
  font: inherit;
  font-size: 16px;
}

input[type='range'] {
  width: 100%;
  accent-color: var(--mint);
  min-height: 32px;
}

.field.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  align-self: center;
}

.field.check input {
  width: 22px;
  height: 22px;
  accent-color: var(--mint);
  flex: none;
}

.field.check label {
  font-weight: 500;
}

.zone,
.save {
  grid-column: 1 / -1;
}

.save {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.cards button.danger-link {
  color: var(--error-on-dark);
}

.account .status {
  flex-basis: 100%;
}

.legal-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
}

.panel a,
dialog a {
  color: var(--plum);
}

.foot a {
  color: var(--on);
}

#delete-confirm {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

dialog label {
  font-size: 14px;
  font-weight: 600;
}

.account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--glass-line);
}

/* Reads */

.reads {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 12px;
}

.read-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 20px;
}

.read-list a {
  height: 100%;
  min-height: 180px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--on);
}

.read-list a:hover {
  background: rgb(255 255 255 / 0.1);
}

.read-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--mint);
}

.read-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.read-source {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}

.foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding-top: 16px;
}

/* ---------- Paper: sign-in panels and dialogs ---------- */

.panel,
dialog {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.panel {
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.narrow {
  width: 100%;
  max-width: 440px;
  margin: auto;
}

.panel h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
}

.panel .muted,
dialog .muted,
.panel .status,
dialog .status {
  color: var(--ink-muted);
}

.panel .status.error,
dialog .status.error {
  color: var(--error);
}

.panel-pip {
  align-self: center;
  width: 140px;
  height: auto;
}

.panel :focus-visible,
dialog :focus-visible {
  outline-color: var(--plum);
}

.panel button.link,
dialog button.link {
  color: var(--plum);
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel label {
  font-size: 14px;
  font-weight: 600;
}

input[type='email'],
input[type='password'] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS focus */
}

input:user-invalid {
  border-color: var(--error);
  background: #fff6f8;
}

button.google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 2px;
  color: var(--ink-muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
}

dialog::backdrop {
  background: rgb(5 18 28 / 0.55);
}

dialog form {
  gap: 12px;
}

dialog h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
}

button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid #d9bec9;
}

button.danger {
  background: var(--error);
}

button.dark {
  background: #113752;
  color: #fff;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tag-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.tag-group legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.tag-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-choices button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #d9cfd6;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.tag-choices button[aria-pressed='true'] {
  background: #113752;
  border-color: #113752;
  color: #fff;
  opacity: 1;
}

/* ---------- Phones ---------- */

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

@media (max-width: 640px) {
  .inner {
    padding: 16px 16px 28px;
    gap: 20px;
  }

  .brand img {
    height: 22px;
  }

  .rings {
    gap: 10px;
  }

  .ring {
    width: 76px;
    gap: 6px;
  }

  .ring-dial {
    width: 68px;
    height: 68px;
  }

  .ring-value {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    font-size: 22px;
  }

  .ring-name {
    font-size: 12px;
  }

  .ring-hint {
    display: none;
  }

  .pip {
    width: 150px;
  }

  .act,
  .late,
  .tag-ask,
  .chosen {
    align-items: stretch;
    justify-content: flex-start;
  }

  .pass-note {
    text-align: left;
  }

  .late button {
    flex: 1;
  }

  .cards {
    padding: 8px 16px 48px;
    gap: 16px;
  }

  .card {
    padding: 20px;
    border-radius: 24px;
  }

  .insight {
    font-size: 28px;
  }
}

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

  .fill,
  .progress span,
  .tool-bar,
  .tool-tip {
    transition: none;
  }
}
