:root {
  /* The page: deep navy under Clauzzz'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);
  --card: rgb(28 55 74);
  /* 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;
  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;
}

.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 {
  min-height: 40px;
  padding: 0;
  font: inherit;
  cursor: pointer;
  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;
}

/* ---------- Header: sections and the date ---------- */

.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
}

.sections {
  display: flex;
  gap: 30px;
  margin-left: 48px;
}

.sections a {
  padding: 8px 0 7px;
  border-bottom: 2px solid transparent;
  color: var(--soft);
  font-size: 16px;
  text-decoration: none;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.4);
}

.sections a[aria-current] {
  color: var(--on);
  border-bottom-color: var(--mint);
}

.today-date {
  font-size: 15px;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
  font-variant-numeric: tabular-nums;
}

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

/* The headline and today's time on the left, Clauzzz on the right, the scores along the bottom. */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  grid-template-areas:
    'main pip'
    'rings rings'
    'updated updated';
  gap: 28px 32px;
}

.hero-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-top: 20px;
}

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

.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  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: 760px;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.35);
}

.subhead {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--on);
  text-shadow:
    0 1px 2px rgb(0 0 0 / 0.35),
    0 1px 14px rgb(0 0 0 / 0.5);
}

/* Today's time: a glass card with the total, and one bar with labelled marks. */
.compare {
  width: min(100%, 720px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 22px 26px 18px;
  border-radius: 24px;
  border: 1px solid rgb(255 255 255 / 0.24);
  background: rgb(13 42 62 / 0.38);
  backdrop-filter: blur(16px);
  font-variant-numeric: tabular-nums;
}

.compare-total strong {
  display: block;
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
}

.compare-total span {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--soft);
}

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

.compare-bar:has(.mark.above:not([hidden])) {
  padding-top: 46px;
}

.track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
}

.fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--w, 0) * 1%);
  border-radius: 999px;
  background: var(--mint);
  transition: width 0.6s ease;
}

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

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

.mark {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: calc(var(--at, 0) * 1%);
  width: 0;
  border-left: 3px solid var(--on);
  border-radius: 2px;
  transform: translateX(-1.5px);
}

.mark.limit {
  border-left-style: dashed;
  border-left-color: var(--amber);
}

.mark-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.3;
  color: var(--soft);
}

.mark-label strong {
  font-size: 15px;
  font-weight: 650;
  color: var(--on);
}

.mark.above .mark-label {
  top: auto;
  bottom: calc(100% + 8px);
}

/* A mark near the end keeps its label inside the card. */
.mark.end .mark-label {
  transform: translateX(-85%);
}

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

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
}

button.go {
  min-height: 56px;
  padding: 0 28px;
  font-size: 17px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.25);
}

#tag-open {
  min-height: 44px;
  color: var(--on);
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
}

.late {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

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

.chosen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  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;
}

/* Clauzzz, standing in the meadow, with a word for the day. */
.hero-pip {
  grid-area: pip;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.pip-says {
  position: relative;
  align-self: flex-start;
  max-width: 320px;
  padding: 16px 26px;
  border-radius: 28px;
  background: rgb(255 255 255 / 0.92);
  color: var(--page);
  font-weight: 600;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.25;
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.22);
}

.pip-says::after {
  content: '';
  position: absolute;
  left: 26%;
  bottom: -6px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: inherit;
  transform: rotate(45deg);
}

.pip-says:empty {
  display: none;
}

.pip {
  width: clamp(200px, 24vw, 300px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.35));
}

/* The four scores, in a row along the bottom of the scene. */
.rings {
  grid-area: rings;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ring {
  min-width: 0;
  padding: 4px 14px;
  border-left: 1px solid rgb(255 255 255 / 0.16);
}

/* Each score is a button that opens its explanation. */
.ring-button {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px;
  border-radius: 22px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ring-button:hover {
  background: rgb(255 255 255 / 0.07);
}

.ring:first-child {
  padding-left: 0;
  border-left: 0;
}

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

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

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

:is(.ring, .score-dialog)[data-tone='none'] .ring-dial {
  --tone: transparent;
}

.ring-value {
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 999px;
  background: var(--page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ring-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ring-name {
  font-size: 20px;
  font-weight: 600;
}

.ring-hint {
  font-size: 14px;
  color: var(--soft);
}

.ring-hint::first-letter {
  text-transform: uppercase;
}

/* With the day showing, the scene ends with the scores, and the cards follow straight on. */
.inner:has(> #today:not([hidden])) {
  min-height: 0;
}

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

/* Narrower than a laptop: Clauzzz sits beside the headline, the scores two by two. */
@media (max-width: 980px) {
  .sections {
    margin-left: 24px;
    gap: 20px;
  }

  .rings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 0;
  }

  .ring:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- 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;
}

/* Three columns from tablet width: each row is a major card (two thirds) beside a smaller one
   (one third), or a wide card across all three, so no card leaves a hole beside it. */
@media (min-width: 860px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card.major {
    grid-column: span 2;
  }
}

.card {
  min-width: 0;
  /* The card colour at full strength along the top, fading to nothing by the bottom edge. */
  background: linear-gradient(180deg, var(--card) 0%, rgb(28 55 74 / 0) 100%);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.card h2,
.reads h2 {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.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],
.tag-choose[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);
}

/* Clauzzz noticed */

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

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

.insight {
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  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;
  padding: 4px;
  margin: -4px;
}

.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);
}

.cell[data-current='true'] {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 8px rgb(255 177 86 / 0.22);
}

.hour-orbit {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  overflow: visible;
  fill: none;
  pointer-events: none;
  stroke-linecap: round;
}

.hour-orbit-track {
  stroke: rgb(255 182 105 / 0.55);
  stroke-width: 0.8;
}

.hour-orbit-trail,
.hour-orbit-sparks {
  animation: hour-orbit 12s linear infinite;
}

.hour-orbit-trail {
  stroke: #ffb25b;
  stroke-width: 1.3;
  stroke-dasharray: 24 76;
  filter: drop-shadow(0 0 1.5px #ff983d);
}

.hour-orbit-sparks {
  stroke: #fff0ce;
  stroke-width: 1.6;
  stroke-dasharray: 1 6 1.5 9 2 80.5;
  filter: drop-shadow(0 0 2px #ffc77c);
}

@keyframes hour-orbit {
  to {
    stroke-dashoffset: -100;
  }
}

.now-swatch {
  border: 1px solid #ffc77c;
  box-shadow: 0 0 5px rgb(255 177 86 / 0.3);
}

.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);
}

/* 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: rgb(255 255 255 / 0.08);
  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: linear-gradient(180deg, var(--card) 0%, rgb(28 55 74 / 0) 100%);
  border-radius: 16px;
  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;
}

/* ---------- Sign-in panels, dialogs and the tour: the day's navy, never paper ---------- */

/* These used to be paper. Their rules still speak in paper tokens, so inside them the tokens
   point at the dark palette instead. */
.panel,
dialog,
.tour {
  --paper: var(--page);
  --ink: var(--on);
  --ink-muted: var(--muted);
  --line: rgb(255 255 255 / 0.22);
  --plum: var(--mint);
  --error: var(--error-on-dark);
}

.panel,
dialog {
  background: var(--paper);
  color: var(--ink);
  color-scheme: dark;
  border: 1px solid var(--glass-line);
}

.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-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.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: rgb(255 255 255 / 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS focus */
}

input:user-invalid {
  border-color: var(--error);
  background: rgb(255 179 196 / 0.08);
}

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-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-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

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

button.danger {
  background: #e5484d;
  color: #fff;
}

/* The main action in a dialog or panel: mint on navy, like the day's buttons. */
button.dark {
  background: var(--mint);
  color: var(--page);
}

.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 var(--line);
  background: rgb(255 255 255 / 0.08);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

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

/* ---------- Getting started ---------- */

.guide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid rgb(113 247 177 / 0.4);
  border-radius: 28px;
  background: rgb(13 42 62 / 0.78);
  backdrop-filter: blur(14px);
}

.guide-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.guide-count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mint);
}

.guide h2 {
  margin-top: 4px;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.guide h2:focus {
  outline: none;
}

.guide h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.guide-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px 0 6px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
}

/* The step's number, or a check once it's done. The state is also in the item's label. */
.guide-steps li::before {
  content: attr(data-n);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  font-size: 12px;
  font-weight: 700;
  color: var(--on);
}

.guide-steps li[data-state='done'] {
  color: var(--soft);
}

.guide-steps li[data-state='done']::before {
  content: '✓';
  background: var(--mint);
  color: var(--page);
}

.guide-steps li[data-state='now'] {
  border-color: var(--mint);
  color: var(--on);
  font-weight: 700;
}

.guide-steps li[data-state='now']::before {
  background: var(--on);
  color: var(--page);
}

.guide-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.guide-way {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}

.guide-way p {
  color: var(--soft);
  font-size: 15px;
}

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

.guide-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--page);
  font-weight: 700;
  text-decoration: none;
}

.guide-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.guide-try code {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgb(0 0 0 / 0.35);
  font:
    600 15px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: var(--on);
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.guide-live {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
  font-size: 14px;
  color: var(--soft);
}

.guide-live:empty {
  display: none;
}

.guide-live[data-waiting='true']::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--mint);
  animation: guide-pulse 1.6s ease-in-out infinite;
}

@keyframes guide-pulse {
  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}

.download-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.08);
}

/* ---------- Today in numbers: stat tiles ---------- */

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

/* Six tiles sit as two even rows of three, rather than four and a gap. */
@media (min-width: 641px) {
  .tiles:is([data-count='5'], [data-count='6']) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 104px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--glass);
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tile-icon {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgb(113 247 177 / 0.12);
  color: var(--mint);
}

.tile-icon svg {
  display: block;
}

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

.tile-value {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.tile-note {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- The tour ---------- */

/* The part of the page the tour is talking about. */
.tour-target {
  outline: 3px solid var(--mint);
  outline-offset: 8px;
  border-radius: 20px;
  scroll-margin-top: 28px;
}

/* Docked at the bottom corner by default; tethered to its target where the browser can. Closed
   until shown: as a popover, or with .open where popovers aren't supported. */
.tour {
  display: none;
  position: fixed;
  inset: auto 16px 16px auto;
  z-index: 20;
  width: min(380px, calc(100vw - 32px));
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: 20px;
  border: 1px solid var(--glass-line);
  background: var(--paper);
  color: var(--ink);
  color-scheme: dark;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
}

.tour:is(:popover-open, .open) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tour-count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--plum);
}

.tour h2 {
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
}

.tour p:not(.tour-count) {
  font-size: 15px;
  color: var(--ink-muted);
}

.tour-actions,
.tour-move {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-actions {
  justify-content: space-between;
  margin-top: 6px;
}

.tour button {
  min-height: 44px;
  border-radius: 999px;
}

.tour button.link {
  color: var(--plum);
}

.tour :focus-visible {
  outline-color: var(--plum);
}

@media (min-width: 641px) {
  @supports (anchor-name: --a) and (position-area: bottom) {
    .tour-target {
      anchor-name: --tour-target;
    }

    .tour:popover-open {
      position-anchor: --tour-target;
      position-area: bottom;
      inset: auto;
      margin: 18px;
      position-try-fallbacks: flip-block, --tour-dock;
    }

    /* Browsers keep the last placement that fitted. The tour alternates between two identical
       lists, so each part starts again from "under it". */
    .tour[data-turn='1']:popover-open {
      position-try-fallbacks: flip-block, --tour-dock-again;
    }

    /* A part too tall to leave room above or below it: dock in the corner. */
    @position-try --tour-dock {
      position-area: none;
      inset: auto 16px 16px auto;
      margin: 0;
    }

    @position-try --tour-dock-again {
      position-area: none;
      inset: auto 16px 16px auto;
      margin: 0;
    }
  }
}

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

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

  .brand img {
    height: 22px;
  }

  .top {
    grid-template-columns: auto 1fr;
    row-gap: 10px;
  }

  .sections {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
    gap: 22px;
  }

  .who {
    justify-self: end;
  }

  .today-date {
    font-size: 13px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'main'
      'pip'
      'rings'
      'updated';
    gap: 22px;
  }

  .hero-main {
    padding-top: 4px;
  }

  .hero-pip {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }

  .pip-says {
    align-self: center;
    font-size: 19px;
    padding: 12px 18px;
  }

  .pip {
    width: 140px;
  }

  .compare {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .rings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 0;
  }

  .ring {
    padding: 0 6px;
  }

  .ring-button {
    gap: 10px;
    padding: 4px;
  }

  .ring:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

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

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

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

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

  .late button {
    flex: 1;
  }

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

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

  .insight {
    font-size: 22px;
  }

  .guide {
    padding: 18px;
    border-radius: 24px;
  }

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

  .tile-value {
    font-size: 28px;
  }

  .tour {
    inset: auto 12px 12px 12px;
    width: auto;
  }
}

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

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

  .guide-live[data-waiting='true']::before,
  .hour-orbit-trail,
  .hour-orbit-sparks {
    animation: none;
  }
}

/* ---------- Invite-only: the waitlist panel and the members' invites card ---------- */

.inline-field {
  display: flex;
  gap: 8px;
}

.inline-field input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS focus */
}

.inline-field input[readonly] {
  background: rgb(255 255 255 / 0.04);
  font-size: 15px;
}

.place {
  font-weight: 700;
  font-size: 20px;
  color: var(--plum);
}

.invite-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  color: var(--ink);
  font-size: 15px;
}

.invite-note.error {
  background: rgb(255 179 196 / 0.1);
  color: var(--error);
}

.share-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.share-box h2 {
  font-size: 17px;
}

.panel button.link.danger-link {
  color: var(--error);
}

.invite-new {
  margin-top: 12px;
}

.invite-new .inline-field input {
  border-color: var(--glass-line);
  background: rgb(255 255 255 / 0.08);
  color: var(--on);
}

.invites .invite-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.invites strong {
  overflow-wrap: anywhere;
}

.waitlist-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.waitlist-foot p {
  flex-basis: 100%;
}

/* ---------- Sharing: the recap card, the public badge and log-off buddies ---------- */

#recap-open {
  min-height: 40px;
  margin-left: auto;
}

.recap-dialog {
  width: min(520px, calc(100vw - 32px));
}

.recap-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 16px;
  background: var(--page);
}

.recap-dialog .actions {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

a.button,
dialog a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  background: var(--mint);
  color: var(--page);
  font-weight: 700;
  text-decoration: none;
}

.badge-setting {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-line);
}

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

.badge-setting .field.check {
  display: flex;
  align-self: flex-start;
}

.badge-on {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.badge-on .inline-field {
  align-self: stretch;
}

.badge-on .inline-field input {
  border-color: var(--glass-line);
  background: rgb(255 255 255 / 0.08);
  color: var(--on);
  font-size: 14px;
}

.buddy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.buddy-pip {
  width: 44px;
  height: auto;
  flex: none;
}

.buddies strong {
  overflow-wrap: anywhere;
}

button.mint.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.buddy-own {
  margin-top: 8px;
}

.buddies .invite-actions {
  align-items: center;
  gap: 10px;
}

/* ---------- Settings dialog: the dark cards, over the day ---------- */

.settings-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--page);
  color: var(--on);
  color-scheme: dark;
  border: 1px solid var(--glass-line);
  border-radius: 28px;
}

.settings-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--page);
  border-bottom: 1px solid var(--glass-line);
}

.settings-dialog .settings-cards {
  padding: 20px 24px 24px;
}

/* Settings keeps two columns: boundaries across the top, IDEs and invites side by side. */
@media (min-width: 860px) {
  .settings-dialog .settings-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dialogs are paper by default; these cards keep the dashboard's dark look. */
.settings-dialog a,
.settings-dialog button.link {
  color: var(--mint);
}

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

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

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

.settings-dialog :focus-visible {
  outline-color: var(--mint);
}

/* ---------- Account menu (under the avatar) ---------- */

.user-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(13 42 62 / 0.96);
  color: var(--on);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}

.user-menu:popover-open {
  display: flex;
  flex-direction: column;
}

.user-menu-email {
  margin: 0 0 6px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  font-size: 13px;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.user-menu button,
.user-menu a {
  all: unset;
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--on);
  cursor: pointer;
}

.user-menu button:hover,
.user-menu a:hover,
.user-menu button:focus-visible,
.user-menu a:focus-visible {
  background: rgb(255 255 255 / 0.1);
}

/* The check-in disclosure inside the (paper) tag dialog. */
.tag-consent .consent-link {
  color: var(--plum);
}

.tag-consent button.dark {
  align-self: flex-start;
}

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

/* ---------- Clauzzz noticed ---------- */

.insight-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: auto;
}

/* ---------- Check in with Clauzzz (dialog) ---------- */

.checkin-dialog {
  width: min(560px, calc(100vw - 32px));
}

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

.checkin-body h2 {
  font-weight: 700;
}

.dialog-done {
  margin-top: 16px;
}

.dialog-done button {
  width: 100%;
}

/* Already checked in today: a quieter button that still opens the answers. */
button.go.done {
  background: rgb(113 247 177 / 0.14);
  color: var(--mint);
  box-shadow: none;
}

button.go.done span[aria-hidden] {
  display: none;
}

/* ---------- One score, explained (dialog) ---------- */

.score-dialog {
  width: min(580px, calc(100vw - 32px));
}

.score-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.score-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.score-dial {
  width: 112px;
  height: 112px;
}

.score-dial .ring-value {
  font-size: 36px;
}

.score-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.score-verdict {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--mint);
}

.score-dialog[data-tone='warn'] .score-verdict {
  color: var(--amber);
}

.score-dialog[data-tone='bad'] .score-verdict {
  color: var(--rose);
}

.score-dialog[data-tone='none'] .score-verdict {
  color: var(--muted);
}

.score-dialog h2 {
  font-size: 26px;
}

.score-measures {
  color: var(--soft);
  font-size: 15px;
}

.score-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.score-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.06);
}

.fact-label {
  font-size: 12px;
  color: var(--muted);
}

.fact-value {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* The scale: rose under 45, amber to 70, mint to 100, and a marker at today's score. */
.scale-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose) 0 45%, var(--amber) 45% 70%, var(--mint) 70% 100%);
}

.scale-marker {
  position: absolute;
  top: 50%;
  left: calc(var(--at, 0) * 1%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 4px solid var(--page);
  background: var(--on);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.4);
  transform: translate(-50%, -50%);
}

.scale-labels {
  position: relative;
  height: 16px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.scale-labels span {
  position: absolute;
  left: calc(var(--at) * 1%);
  transform: translateX(-50%);
}

.scale-labels span:first-child {
  transform: none;
}

.scale-labels span:last-child {
  transform: translateX(-100%);
}

.scale-key {
  margin-top: -8px;
  font-size: 13px;
  color: var(--muted);
}

.score-section h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.score-section p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--soft);
}

.score-done {
  width: 100%;
}

@media (max-width: 640px) {
  .score-dial {
    width: 84px;
    height: 84px;
  }

  .score-dial .ring-value {
    font-size: 28px;
  }

  .score-facts {
    gap: 8px;
  }

  .score-facts li {
    padding: 10px;
  }

  .fact-value {
    font-size: 16px;
  }
}
