/* Hallmark · genre: editorial · macrostructure: Dashboard (one screen) · theme: custom (warm oat paper, one vermilion accent, Instrument Serif + Geist) · enrichment: canvas week grid · nav: N9 · footer: data band */

:root {
  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;

  --color-paper: oklch(97.4% 0.007 75);
  --color-paper-2: oklch(94.6% 0.009 75);
  --color-rule: oklch(87.5% 0.009 75);
  --color-faint: oklch(62% 0.01 70);
  --color-muted: oklch(45% 0.011 65);
  --color-ink: oklch(21% 0.012 60);
  --color-ink-hover: oklch(33% 0.012 60);
  --color-accent: oklch(63.5% 0.19 38);
  --color-accent-ink: oklch(51% 0.17 36);
  --color-accent-soft: oklch(92% 0.04 55);
  --color-focus: oklch(55% 0.19 38);
  --color-scrim: oklch(20% 0.01 60 / 0.4);
  --shadow-whisper: 0 1px 2px oklch(20% 0.01 60 / 0.06);
  --shadow-sheet: 0 20px 60px oklch(20% 0.01 60 / 0.18);

  /* Data marks: grays for time that is spoken for, the accent for time that is yours. */
  --mark-lived: oklch(89% 0.008 70);
  --mark-ahead: oklch(46% 0.012 60);
  --mark-sleep: oklch(84% 0.009 70);
  --mark-work: oklch(52% 0.012 60);
  --mark-commute: oklch(30% 0.012 60);
  --mark-admin: oklch(69% 0.01 65);
  --mark-yours: var(--color-accent);
  --mark-yours-2: oklch(72% 0.15 45);

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-madlib: clamp(1.3rem, 0.7rem + 1.5vh, 1.9rem);
  --text-figure: clamp(2.2rem, 0.6rem + 4.2vh, 3.6rem);
  --text-title: clamp(1.1rem, 0.75rem + 1vh, 1.5rem);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;

  --gutter: clamp(1rem, 2.5vw, 2rem);
  --radius: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-paper: oklch(17.5% 0.008 60);
    --color-paper-2: oklch(21.5% 0.009 60);
    --color-rule: oklch(33% 0.009 60);
    --color-faint: oklch(60% 0.009 65);
    --color-muted: oklch(75% 0.008 70);
    --color-ink: oklch(94% 0.006 75);
    --color-ink-hover: oklch(84% 0.006 75);
    --color-accent: oklch(70% 0.17 40);
    --color-accent-ink: oklch(77% 0.14 45);
    --color-accent-soft: oklch(30% 0.05 40);
    --color-focus: oklch(74% 0.16 42);
    --color-scrim: oklch(5% 0.01 60 / 0.6);
    --shadow-whisper: 0 1px 2px oklch(5% 0.01 60 / 0.4);
    --shadow-sheet: 0 20px 60px oklch(5% 0.01 60 / 0.6);

    --mark-lived: oklch(27% 0.008 60);
    --mark-ahead: oklch(70% 0.008 70);
    --mark-sleep: oklch(34% 0.009 60);
    --mark-work: oklch(61% 0.009 65);
    --mark-commute: oklch(82% 0.008 70);
    --mark-admin: oklch(47% 0.009 60);
    --mark-yours-2: oklch(58% 0.13 40);

    color-scheme: dark;
  }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 var(--text-base) / 1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

p, ul, ol, dl, dd { margin: 0; }
p { text-wrap: pretty; }
b { font-weight: 600; font-variant-numeric: tabular-nums; }
a { color: inherit; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.note { color: var(--color-muted); font-size: var(--text-sm); }

/* Controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1.2rem;
  border: 1px solid var(--color-ink);
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-paper);
  font: 500 var(--text-base) / 1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.btn:hover { background: var(--color-ink-hover); border-color: var(--color-ink-hover); }
.btn:active { transform: scale(0.97); }
.btn--quiet { background: transparent; color: var(--color-ink); border-color: var(--color-rule); }
.btn--quiet:hover { background: var(--color-paper-2); border-color: var(--color-faint); }
.btn--sm { min-height: 2.1rem; padding: 0 0.95rem; font-size: var(--text-sm); }

.link {
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: 500 var(--text-sm) / 1.4 var(--font-body);
  text-decoration: underline;
  text-decoration-color: var(--color-rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  white-space: nowrap;
  cursor: pointer;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}

.link:hover { text-decoration-color: var(--color-accent); }

.field {
  font: inherit;
  color: var(--color-accent-ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--color-rule);
  border-radius: 0;
  padding: 0 0.08em;
  margin: 0;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out);
}

.field:hover { border-bottom-color: var(--color-accent); }
.field:focus-visible { border-bottom-color: var(--color-accent); }
.field[readonly] { cursor: default; border-bottom-style: dotted; }
select.field { text-overflow: ellipsis; max-width: 100%; }
input.field { cursor: text; text-align: center; -moz-appearance: textfield; }
input.field::-webkit-outer-spin-button,
input.field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field option { color: var(--color-ink); background-color: var(--color-paper); }
.field--sm { font-family: var(--font-body); font-weight: 600; font-size: inherit; }
.field--text { text-align: left; }
.field--pick { max-width: 100%; text-align: left; }
input[type="date"].field { text-align: left; cursor: pointer; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.5rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--color-accent) calc(var(--p, 0) * 1%), var(--color-rule) 0);
}

input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--color-rule); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--color-accent); }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: calc(2px - 0.525rem);
  border: 3px solid var(--color-paper);
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow: 0 0 0 1px var(--color-rule);
  transition: transform var(--dur-micro) var(--ease-out);
}

input[type="range"]::-moz-range-thumb {
  width: 0.7rem;
  height: 0.7rem;
  border: 3px solid var(--color-paper);
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow: 0 0 0 1px var(--color-rule);
}

input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline-offset: 0; border-radius: 4px; }

.switch { display: flex; align-items: center; gap: var(--space-xs); cursor: pointer; }
.switch input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--color-accent); }

/* Page frame */

.app { display: grid; grid-template-rows: auto auto auto; min-height: 100vh; min-height: 100dvh; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-lg);
  padding: var(--space-sm) var(--gutter);
  border-bottom: 1px solid var(--color-rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.glider { width: 1rem; height: 1rem; fill: var(--color-accent); }

.tagline { order: 3; flex-basis: 100%; font-size: var(--text-title); }

.top__actions { display: flex; gap: var(--space-xs); margin-left: auto; }

.board {
  display: grid;
  gap: var(--space-xl) var(--space-lg);
  padding: var(--space-lg) var(--gutter);
}

.panel { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; min-height: 0; }

/* Left: the week you describe and what it leaves */

.madlib { font-family: var(--font-display); font-size: var(--text-madlib); line-height: 1.4; }
.madlib > p + p { margin-top: 0.2em; }

.you__tools { display: flex; flex-wrap: wrap; gap: 0 var(--space-md); }

.warn { font-size: var(--text-sm); color: var(--color-accent-ink); }

.result { padding-top: var(--space-xs); border-top: 1px solid var(--color-rule); }

.figure {
  font-family: var(--font-display);
  font-size: var(--text-figure);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-accent);
  white-space: nowrap;
}

.figure__unit { font-size: 0.42em; letter-spacing: 0; color: var(--color-muted); }
.result__line { color: var(--color-muted); font-size: var(--text-sm); }

.legend { display: grid; gap: 0.1rem; font-size: var(--text-sm); }
.legend > div { display: flex; align-items: center; gap: var(--space-xs); margin-inline: -0.3rem; padding-inline: 0.3rem; border-radius: 4px; transition: background-color var(--dur-micro) var(--ease-out); }
.legend > div:hover { background: var(--color-paper-2); }
.legend dt { display: flex; align-items: center; gap: 0.45rem; }
.legend dd { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend__head { font-weight: 600; }
.legend__yours { margin-top: 0.15rem; padding-top: 0.2rem; border-top: 1px solid var(--color-rule); font-weight: 600; }

.sw { width: 0.65rem; height: 0.65rem; flex: none; border-radius: 2px; }
.sw--sleep { background: var(--mark-sleep); }
.sw--work { background: var(--mark-work); }
.sw--commute { background: var(--mark-commute); }
.sw--admin { background: var(--mark-admin); }
.sw--yours { background: var(--mark-yours); }

/* Center: the week grid and its zoom levels */

.levels {
  display: flex;
  gap: 2px;
  align-self: flex-start;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  background: var(--color-paper-2);
  border-radius: 999px;
}

.levels button {
  min-height: 1.9rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  font: 500 var(--text-sm) / 1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.levels button:hover { color: var(--color-ink); }
.levels button[aria-pressed="true"] { background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-whisper); }

.stage { position: relative; height: 62vh; min-height: 16rem; }
/* Holding a finger on a square shows its tooltip; it must not select the page or open the callout. */
.stage { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.stage canvas { display: block; width: 100%; height: 100%; }

/* The picker: a small box for every dropdown. The country one adds a search field on top. */
.picker {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(19rem, 100vw - 1rem);
  padding: 0.5rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--color-ink);
  box-shadow: var(--shadow-sheet);
  font: 400 var(--text-base) / 1.4 var(--font-body);
}

.picker:popover-open { display: grid; gap: 0.4rem; animation: sheet-in var(--dur-short) var(--ease-out); }
.picker--list { width: max-content; min-width: 8rem; max-width: min(19rem, 100vw - 1rem); }

.picker__search {
  width: 100%;
  min-height: 2.3rem;
  padding: 0 0.75rem;
  border: 1px solid var(--color-rule);
  border-radius: 8px;
  background: var(--color-paper-2);
  color: var(--color-ink);
  font: inherit;
}

.picker__search:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }

.picker__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.picker__list:focus { outline: none; } /* the highlighted row shows where you are */

.picker__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.picker__list li.is-active { background: var(--color-paper-2); }
.picker__list li[aria-selected="true"] { color: var(--color-accent-ink); font-weight: 600; }
.picker__list li[aria-selected="true"]::after { content: "✓"; }
.picker__empty { padding: 0.35rem 0.6rem; color: var(--color-muted); font-size: var(--text-sm); }

/* One tooltip for every chart: the value leads, the label follows. */
.tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 600;
  display: grid;
  gap: 0.1rem;
  max-width: 17rem;
  padding: 0.45rem 0.65rem;
  background: var(--color-paper);
  color: var(--color-ink);
  border: 1px solid var(--color-rule);
  border-radius: 8px;
  box-shadow: var(--shadow-whisper);
  font-size: var(--text-sm);
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-micro) var(--ease-out);
}

.tooltip.is-on { opacity: 1; }
.tooltip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip span { color: var(--color-muted); }

.captions { max-width: 46rem; }

.scrub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem var(--space-sm); font-size: var(--text-sm); }
.scrub label { color: var(--color-muted); }
.scrub input[type="range"] { width: 9rem; }
.scrub .link { margin-left: auto; }
.caption { display: grid; gap: 0.3rem; }

.focus { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); padding-top: 0.2rem; font-size: var(--text-sm); }
.focus label { color: var(--color-muted); }
.focus input[type="range"] { width: 8rem; }
.focus .field--text { width: 9rem; }

.units { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.unit {
  min-height: 1.8rem;
  padding: 0 0.75rem;
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--color-ink);
  font: 500 var(--text-sm) / 1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.unit:hover { border-color: var(--color-faint); }
.unit[aria-checked="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }

/* Right: the split */

.spend__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.spend__head h2 { font-size: var(--text-title); }

.bar { display: flex; gap: 2px; height: 0.55rem; flex: none; }

.bar span {
  position: relative;
  flex: var(--g, 1) 1 0;
  min-width: 0;
  cursor: pointer;
  background: var(--color-accent);
  border-radius: 2px;
  opacity: 0.45;
  transition: flex-grow var(--dur-long) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.bar span.is-on, .bar span.is-hover { opacity: 1; }
.bar span::before { content: ""; position: absolute; inset: -0.6rem 0; }
.bar.is-dragging span { transition: opacity var(--dur-short) var(--ease-out); }

.alloc { list-style: none; padding: 0; display: grid; gap: 1px; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 2.6rem;
  grid-template-areas:
    "name range pct"
    "buys buys buys";
  align-items: center;
  column-gap: var(--space-sm);
  padding: clamp(0.05rem, 0.35vh, 0.35rem) var(--space-xs);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out);
}

.row:hover, .row.is-hover, .row.is-focus { background: var(--color-paper-2); }

.row__name {
  grid-area: name;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: 500 var(--text-sm) / 1.3 var(--font-body);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.row.is-focus .row__name { color: var(--color-accent-ink); font-weight: 600; }
.row__range { grid-area: range; height: clamp(1.2rem, 0.7rem + 1vh, 1.5rem); }
.row__pct { grid-area: pct; text-align: right; font: 600 var(--text-sm) / 1 var(--font-body); font-variant-numeric: tabular-nums; }

.row__buys {
  grid-area: buys;
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__buys b { color: var(--color-ink); font-weight: 600; }

/* Bottom band */

.band {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-md) var(--gutter) var(--space-lg);
  border-top: 1px solid var(--color-rule);
  font-size: var(--text-sm);
}

.band__part { display: grid; align-content: start; gap: 0.3rem; min-width: 0; }
.band__title { font: 600 var(--text-xs) / 1.2 var(--font-body); letter-spacing: 0.02em; color: var(--color-muted); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.tiles > div { display: flex; flex-direction: column-reverse; }
.tiles > div:hover dd { color: var(--color-accent-ink); }
.tiles dd { font-family: var(--font-display); font-size: clamp(1.3rem, 0.8rem + 1.2vh, 1.9rem); line-height: 1; font-variant-numeric: tabular-nums; }
.tiles dt { color: var(--color-muted); font-size: var(--text-xs); }

.pace { list-style: none; padding: 0; display: grid; line-height: 1.35; }
.pace input.field { width: 2.6ch; }
#peopleLine { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; }
.pace__who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#changePick { justify-self: start; max-width: 100%; }

/* Dialogs */

.sheet {
  width: min(100% - 2rem, 34rem);
  max-height: min(100% - 2rem, 48rem);
  padding: 0;
  border: 1px solid var(--color-rule);
  border-radius: 16px;
  background: var(--color-paper);
  color: var(--color-ink);
  box-shadow: var(--shadow-sheet);
}

.sheet--wide { width: min(100% - 2rem, 58rem); }
.sheet[open] { animation: sheet-in var(--dur-short) var(--ease-out); }
.sheet::backdrop { background: var(--color-scrim); }

@keyframes sheet-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

.sheet__body { display: grid; gap: var(--space-md); padding: var(--space-lg); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.sheet__head h2 { font-size: 1.6rem; }
.sheet__head h2:focus { outline: none; }

.close {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  border: 1px solid var(--color-rule);
  border-radius: 50%;
  background: transparent;
  color: var(--color-ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.close:hover { background: var(--color-paper-2); }

.buckets { display: grid; gap: var(--space-md); }
.bucket h3 { font: 600 var(--text-sm) / 1.2 var(--font-body); color: var(--color-muted); margin-bottom: var(--space-xs); }
.bucket--mine h3 { color: var(--color-accent-ink); }
.bucket ul { list-style: none; padding: 0; display: grid; gap: var(--space-xs); min-height: 2.6rem; }

.chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: 999px;
}

.bucket--mine .chip { border-color: var(--color-accent); }
.chip__name { flex: 1; min-width: 0; font-weight: 500; }
.chip .field { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); }

.chip__move {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--color-paper-2);
  color: var(--color-ink);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.chip__move:hover { background: var(--color-accent-soft); }
.chip__move:active { transform: scale(0.94); }
.chip__move svg { width: 0.95rem; height: 0.95rem; transform: rotate(90deg); }
.bucket--mine .chip__move svg { transform: rotate(-90deg); }

.madlib--sm { font-size: 1.15rem; line-height: 1.7; }
.field--wide { width: 100%; }

.people { list-style: none; padding: 0; display: grid; gap: var(--space-sm); }

.person {
  display: grid;
  gap: 0.35rem;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
}

.person__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem; }
.person__line .field--text { width: 8rem; }
.person__line input[type="number"] { width: 3ch; }
.person__out { color: var(--color-muted); font-size: var(--text-sm); }
.person__out b { color: var(--color-ink); }
.person .link { justify-self: start; }

.share__body { display: grid; gap: var(--space-md); justify-items: start; }
.share__pick { display: flex; gap: 2px; padding: 3px; background: var(--color-paper-2); border-radius: 999px; }
.share__pick button { min-height: 1.9rem; padding: 0 0.85rem; border: 0; border-radius: 999px; background: transparent; color: var(--color-muted); font: 500 var(--text-sm) / 1 var(--font-body); cursor: pointer; }
.share__pick button[aria-pressed="true"] { background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-whisper); }
.share__image { display: block; width: auto; max-width: 100%; height: min(58vh, 36rem); object-fit: contain; border: 1px solid var(--color-rule); border-radius: var(--radius); background: var(--color-paper-2); }
.share__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

.method { display: grid; gap: var(--space-lg); }
.method > div { display: grid; gap: var(--space-sm); align-content: start; }
.method h3 { font-size: 1.3rem; margin-top: var(--space-xs); }
.method p, .method li { color: var(--color-muted); }
.method ul { padding-left: 1.1rem; display: grid; gap: var(--space-2xs); }
.method__tables { display: grid; gap: var(--space-md); grid-column: 1 / -1; }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table caption { text-align: left; font-weight: 600; padding-bottom: 0.2rem; }
.table th, .table td { padding: 0.25rem 0.4rem; border-bottom: 1px solid var(--color-rule); text-align: right; font-variant-numeric: tabular-nums; }
.table th:first-child, .table td:first-child { text-align: left; }
.table thead th { color: var(--color-muted); font-weight: 500; }

@media (min-width: 40rem) {
  .buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip__move svg { transform: none; }
  .bucket--mine .chip__move svg { transform: rotate(180deg); }
  .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* One screen: from laptop size up, the page locks to the viewport and nothing scrolls. */

@media (min-width: 60rem) {
  .tagline { order: 0; flex-basis: auto; margin-right: auto; }
  .top__actions { margin-left: 0; }
  .board { grid-template-columns: minmax(16rem, 1fr) minmax(0, 1.75fr) minmax(19.5rem, 1fr); }
  .band { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--space-xl); padding-block: clamp(0.4rem, 1.2vh, 0.9rem); line-height: 1.35; }
}

@media (min-width: 60rem) and (min-height: 34rem) {
  html, body { height: 100%; overflow: hidden; }
  .app { height: 100vh; height: 100dvh; grid-template-rows: auto minmax(0, 1fr) auto; }
  .board { min-height: 0; padding-block: clamp(0.6rem, 1.8vh, 1.25rem); padding-inline: max(0.5rem, calc(var(--gutter) - 0.5rem)); }
  /* A little inner room so hover backgrounds and focus rings stay inside each panel. */
  .panel { overflow-y: auto; overflow-x: hidden; padding-inline: 0.5rem; overscroll-behavior: contain; scrollbar-width: thin; }
  .weeks { overflow: hidden; }
  .stage { flex: 1 1 auto; height: auto; min-height: 0; }
  .you { gap: clamp(0.4rem, 1.2vh, 0.75rem); }
  .legend { line-height: 1.35; }
}

@media (pointer: coarse) {
  input[type="range"] { height: 2.25rem; }
  .row { padding-block: 0.3rem; }
  .chip__move { width: 2.75rem; height: 2.75rem; }
  .unit, .levels button { min-height: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    transition-duration: 150ms !important;
  }
  .sheet[open], .picker:popover-open { animation: none; }
}
