/* MyRoom shared styles: frosted glass over a tinted ground, a slim icon rail, one working
   colour. Each person picks their room's colour ([data-room] on <html>, set by room.js).
   Tokens and rules are described in DESIGN.md. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

/* ---- Room colours -----------------------------------------------------------------------
   Each room sets its ground (three stops + a wash of colour behind the rail), its inks and
   its working colour. Every ink is checked at 4.5:1 or better on the frosted cards, and
   white text at 4.5:1 or better on the working colour. Keep the names in step with ROOMS
   in lib/settings.js. Sky (the default) is the dashboard's own icy daylight. */

:root,
:root[data-room="sky"] {
  --g-0: #d2e9f8; --g-1: #a9d6f3; --g-2: #c8e4f6; --wash: rgb(108 186 238 / 80%);
  --ink: #13233b; --ink-2: #3e4f68; --muted: #4f6079; --label: #52637c;
  --accent: #1a62d6; --accent-deep: #1452b8; --accent-rgb: 31 111 232; --tint: 22 64 110;
}

:root[data-room="sea"] {
  --g-0: #d7efe9; --g-1: #a3dbcd; --g-2: #c6e8df; --wash: rgb(86 190 166 / 70%);
  --ink: #11302b; --ink-2: #33524c; --muted: #43615a; --label: #46635c;
  --accent: #0b7163; --accent-deep: #085c51; --accent-rgb: 11 128 112; --tint: 14 78 68;
}

:root[data-room="blossom"] {
  --g-0: #f8e6ed; --g-1: #f0c1d3; --g-2: #f5d6e2; --wash: rgb(236 140 178 / 62%);
  --ink: #2e1a28; --ink-2: #563e50; --muted: #684f62; --label: #6a5164;
  --accent: #bd2e68; --accent-deep: #9e2456; --accent-rgb: 200 50 110; --tint: 110 36 72;
}

:root[data-room="lilac"] {
  --g-0: #ebe6f9; --g-1: #cdc0f2; --g-2: #ddd5f6; --wash: rgb(160 136 234 / 62%);
  --ink: #221c3d; --ink-2: #484165; --muted: #585177; --label: #5b5479;
  --accent: #6a3fd0; --accent-deep: #5631b0; --accent-rgb: 110 70 220; --tint: 64 46 128;
}

:root[data-room="sunset"] {
  --g-0: #fbe8db; --g-1: #f6c3a2; --g-2: #f9d8c2; --wash: rgb(244 150 100 / 58%);
  --ink: #33200f; --ink-2: #5a4232; --muted: #6c5241; --label: #6e5443;
  --accent: #ad3e0a; --accent-deep: #903307; --accent-rgb: 214 84 20; --tint: 120 58 20;
}

:root[data-room="sage"] {
  --g-0: #e3ecdd; --g-1: #c0d7b2; --g-2: #d4e3ca; --wash: rgb(138 184 108 / 58%);
  --ink: #1b2a16; --ink-2: #41523a; --muted: #51624a; --label: #53644c;
  --accent: #3c7428; --accent-deep: #30611f; --accent-rgb: 70 130 46; --tint: 46 78 30;
}

:root[data-room="sand"] {
  --g-0: #f4ecdc; --g-1: #e5d0a6; --g-2: #eee0c3; --wash: rgb(214 180 112 / 58%);
  --ink: #2b2418; --ink-2: #52483a; --muted: #635849; --label: #655a4a;
  --accent: #965711; --accent-deep: #7b470d; --accent-rgb: 176 104 22; --tint: 92 70 30;
}

:root[data-room="slate"] {
  --g-0: #dfe3e9; --g-1: #b6c0cd; --g-2: #ccd3dd; --wash: rgb(120 140 166 / 55%);
  --ink: #161c25; --ink-2: #3b4452; --muted: #4b5564; --label: #4e5867;
  --accent: #34507a; --accent-deep: #283f62; --accent-rgb: 52 80 122; --tint: 36 48 70;
}

/* ---- Shared tokens (the same in every room) --------------------------------------------- */

:root {
  color-scheme: light;
  --pane: rgb(255 255 255 / 20%);
  --glass: rgb(255 255 255 / 44%);
  --glass-strong: rgb(255 255 255 / 78%);
  --edge: rgb(255 255 255 / 78%);
  --line: rgb(var(--tint) / 10%);
  --line-strong: rgb(var(--tint) / 18%);
  --fill: rgb(var(--tint) / 6%);
  --hover: rgb(255 255 255 / 55%);
  --accent-wash: rgb(var(--accent-rgb) / 13%);
  --lift: 0 1px 2px rgb(var(--tint) / 6%), 0 10px 28px rgb(var(--tint) / 10%);
  --lift-strong: 0 2px 4px rgb(var(--tint) / 8%), 0 16px 36px rgb(var(--tint) / 16%);
  /* Frosted glass. --blur is for glass that floats over content (the sidebar sliding out, the
     phone's bottom bar, menus): the blur is what you see there. Glass that only ever sits on
     the room's ground (cards, page heads, the pane) uses --glass-filter: the ground is soft
     gradients, so blurring it changes nothing you can see (checked pixel by pixel, 2026-12),
     but costs a full blur pass on every card on every scrolled frame. The saturation boost,
     which you can see, stays. */
  --blur: blur(20px) saturate(1.35);
  --glass-filter: saturate(1.35);

  --gain: #0d7334;
  --loss: #c21f1f;
  --amber: #8f5a00;

  --r-check: 6px;
  --r-pill: 9px;
  --r-control: 11px;
  --r-item: 12px;
  --r-bar: 16px;
  --r-card: 18px;
  --r-rail: 22px;
  --r-pane: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --rail: 232px;
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--g-0);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* The room's ground: a layer pinned to the window, behind everything. (Same look as a
   "background-attachment: fixed" body, which made the browser repaint the whole page on every
   scrolled frame; a fixed layer is painted once and just stays put.) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(70% 90% at 0% 40%, var(--wash), transparent 62%),
    radial-gradient(55% 50% at 100% 0%, rgb(255 255 255 / 30%), transparent 70%),
    linear-gradient(100deg, var(--g-1) 0%, var(--g-2) 30%, var(--g-0) 100%);
  pointer-events: none;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgb(var(--accent-rgb) / 22%); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: rgb(var(--tint) / 28%) transparent; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Pages stay hidden until sign-in is confirmed, so signed-out visitors never see a flash of the app. */
html.auth-pending .shell { visibility: hidden; }

/* ---- Shell: sidebar + main -------------------------------------------------------------- */
/* Laptop and up: a full-height frosted-white sidebar on the left, always open, icons with their
   names (like the open sidebar on Sam's dashboard). Narrower windows: a slim icon column that
   slides out over the page on hover or keyboard focus. Phones: the bottom bar instead. */

.shell {
  --rail-open: 232px;
  --rail-slim: 68px;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 20px;
  /* The whole window on laptops and big monitors; only very wide screens get side margins. */
  max-width: 2400px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px clamp(20px, 1.6vw, 32px) 18px 18px;
}

.rail {
  position: sticky;
  top: 18px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: var(--rail-open);
  height: calc(100svh - 36px);
  padding: 14px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--r-rail);
  /* The same frosted glass as the cards, hovered or not (Sam, 2026-12-03). */
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--lift);
}

.rail-top { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 2px 3px 12px; color: inherit; text-decoration: none; }
.rail-me {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgb(255 255 255 / 70%), rgb(var(--accent-rgb) / 30%)), var(--g-1);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 14px rgb(var(--tint) / 18%), inset 0 1px 0 rgb(255 255 255 / 60%);
}
.rail-who { display: grid; min-width: 0; line-height: 1.2; white-space: nowrap; }
.rail-who b { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; }
.rail-who small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }

.rail-rule { flex: none; height: 1px; margin: 4px 2px 8px; background: rgb(var(--tint) / 12%); }
.rail-spacer { flex: 1; }

.rail-link {
  display: flex;
  flex: none;
  align-items: center;
  gap: 13px;
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.rail-link svg { flex: none; width: 20px; height: 20px; }
.rail-link:hover { background: rgb(255 255 255 / 55%); color: var(--ink); box-shadow: 0 1px 2px rgb(var(--tint) / 8%); }
.rail-link[aria-current="page"] { background: rgb(var(--accent-rgb) / 11%); color: var(--accent); }
.rail-name { transition: opacity 0.2s; }

/* Narrower windows: the slim column, sliding out over the page when you're on it. */
@media (min-width: 600px) and (max-width: 1099px) {
  .shell { grid-template-columns: var(--rail-slim) minmax(0, 1fr); }
  .rail {
    width: var(--rail-slim);
    padding: 14px 10px 12px;
    transition: width 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
  }
  .rail-top { padding: 2px 1px 12px; }
  .rail-link { padding: 0 13px; }
  .rail:not(:hover, :focus-within) :is(.rail-name, .rail-who) { opacity: 0; }
  .rail:is(:hover, :focus-within) { width: var(--rail-open); }
  .rail .rail-who { transition: opacity 0.2s; }
}

@media (prefers-reduced-motion: reduce) {
  .rail, .rail-name, .rail-who { transition: none; }
}

.main { min-width: 0; padding-bottom: 32px; }

/* The page head is a frosted bar: title and one line under it. */
.page-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  margin-bottom: 18px;
  padding: 10px 14px 10px 22px;
  border: 1px solid var(--edge);
  border-radius: var(--r-bar);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--lift);
}

.page-head h1 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.page-head p { margin-top: 2px; color: var(--muted); font-size: 13px; }

/* Every page's cards sit in one faint frosted pane. */
.pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: var(--r-pane);
  background: var(--pane);
  /* No backdrop filter: the pane only ever sits on the soft ground, where a blur is invisible,
     and a blurred pane under blurred cards made every card blur twice. */
}

/* ---- Phone: a frosted bottom bar instead of the rail ------------------------------------ */

.bottom-bar { display: none; }

@media (max-width: 599px) {
  .shell { display: block; padding: 12px 12px calc(var(--bar-h) + env(safe-area-inset-bottom) + 28px); }
  .rail { display: none; }
  .page-head { min-height: 58px; margin-bottom: 12px; padding: 10px 14px 10px 16px; }
  .page-head h1 { font-size: 18px; }
  .pane { gap: 12px; padding: 10px; border-radius: 20px; }

  .bottom-bar {
    position: fixed;
    inset: auto 10px calc(10px + env(safe-area-inset-bottom));
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: var(--bar-h);
    padding: 6px;
    border: 1px solid var(--edge);
    border-radius: 20px;
    background: rgb(255 255 255 / 72%);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: var(--lift-strong);
  }

  .bottom-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    border-radius: 14px;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
  }

  .bottom-bar svg { width: 22px; height: 22px; }
  .bottom-bar a[aria-current="page"] { background: rgb(255 255 255 / 85%); color: var(--accent); box-shadow: var(--lift); }
}

/* ---- Cards ------------------------------------------------------------------------------ */

.grid { display: grid; gap: 16px; }
.grid-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1050px) { .grid-3-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) { .grid { gap: 12px; } }

.card {
  padding: 20px 22px;
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--lift);
}

@media (max-width: 640px) { .card { padding: 18px; } }

/* Card headings: small, uppercase, quiet. The heading is the label. */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { color: var(--label); font-size: 12.5px; font-weight: 600; letter-spacing: 0.07em; line-height: 1.3; text-transform: uppercase; }
.card-head a::after { content: ""; width: 6px; height: 6px; margin-left: 4px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.card-head a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.card-head a:hover { color: var(--accent); }

.empty { color: var(--muted); }
.empty a { color: var(--accent); font-weight: 600; }

/* "Set it up in Settings": the one link an empty page or card gives when a source isn't set up
   yet. Settings is the only place things get connected, imported or uploaded. */
.to-settings { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.to-settings::after { content: ""; width: 6px; height: 6px; margin-left: 3px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.to-settings:hover { color: var(--accent-deep); text-decoration: underline; }
.to-settings:hover::after { transform: translateX(2px) rotate(45deg); }
.setup-line { color: var(--ink-2); }

/* Small text buttons: secondary actions after setup ("Manage", "Remove", "or type them"). */
.link-btn { padding: 2px 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--accent); text-decoration-color: currentColor; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.link-btn[aria-expanded="true"] { color: var(--accent); }
.link-btn:disabled { opacity: 0.5; cursor: default; }

/* A switch: a real checkbox drawn as a track and knob; a hint beside it says its state in words. */
.switch { display: inline-flex; flex: none; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--glass-strong);
  appearance: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.switch input:checked { border-color: var(--accent); background: var(--accent); }
.switch input:checked::after { background: #fff; transform: translateX(16px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch input:disabled { opacity: 0.5; cursor: default; }

/* ---- Buttons and inputs ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(var(--accent-rgb) / 20%), 0 6px 16px rgb(var(--accent-rgb) / 24%);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}

.btn:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn.ghost { border: 1px solid var(--line-strong); background: var(--glass); color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--glass-strong); }
.btn.small { padding: 7px 12px; font-size: 13.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-item);
  background: rgb(255 255 255 / 78%);
  caret-color: var(--accent);
}

.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { outline: none; border-color: rgb(var(--accent-rgb) / 55%); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 14%); }

.error-text { color: var(--loss); }
.account-out { margin-top: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .main > * { animation: rise 0.4s var(--ease) both; }
  .main > *:nth-child(2) { animation-delay: 0.06s; }
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---- Forms ------------------------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }
.hint.ok { color: var(--gain); }
.hint.bad { color: var(--loss); }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
select.input {
  appearance: none;
  padding-right: 38px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 20px center / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 14px center / 6px 6px no-repeat,
    rgb(255 255 255 / 78%);
}
.page-foot { margin-top: 18px; padding-left: 6px; color: var(--muted); font-size: 13px; }
.page-foot a { color: var(--ink-2); }

/* ---- Room colour picker (Settings) ------------------------------------------------------- */

.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0; padding: 0; border: 0; }
@media (max-width: 520px) { .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.room {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 255 255 / 45%);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.room:hover { background: var(--glass-strong); }
.room input { position: absolute; opacity: 0; pointer-events: none; }
.room-chip { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgb(255 255 255 / 80%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%); }
.room b { font-weight: 600; font-size: 14px; }
.room:has(input:checked) { background: var(--glass-strong); box-shadow: 0 0 0 2px var(--accent), var(--lift); }
.room:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.rooms-note { margin-top: 12px; }

/* The chips show each room's own ground and working colour, whatever room is active. */
.room-chip[data-for="sky"] { background: linear-gradient(135deg, #a9d6f3 55%, #1a62d6 55%); }
.room-chip[data-for="sea"] { background: linear-gradient(135deg, #a3dbcd 55%, #0b7163 55%); }
.room-chip[data-for="blossom"] { background: linear-gradient(135deg, #f0c1d3 55%, #bd2e68 55%); }
.room-chip[data-for="lilac"] { background: linear-gradient(135deg, #cdc0f2 55%, #6a3fd0 55%); }
.room-chip[data-for="sunset"] { background: linear-gradient(135deg, #f6c3a2 55%, #ad3e0a 55%); }
.room-chip[data-for="sage"] { background: linear-gradient(135deg, #c0d7b2 55%, #3c7428 55%); }
.room-chip[data-for="sand"] { background: linear-gradient(135deg, #e5d0a6 55%, #965711 55%); }
.room-chip[data-for="slate"] { background: linear-gradient(135deg, #b6c0cd 55%, #34507a 55%); }

/* The whole room changes colour smoothly when a new one is picked: registering the colours
   lets the browser blend the gradients from one room to the next. */
@property --g-0 { syntax: "<color>"; inherits: true; initial-value: #d2e9f8; }
@property --g-1 { syntax: "<color>"; inherits: true; initial-value: #a9d6f3; }
@property --g-2 { syntax: "<color>"; inherits: true; initial-value: #c8e4f6; }
@property --wash { syntax: "<color>"; inherits: true; initial-value: rgb(108 186 238 / 80%); }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #1a62d6; }
@property --accent-deep { syntax: "<color>"; inherits: true; initial-value: #1452b8; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #13233b; }
@property --ink-2 { syntax: "<color>"; inherits: true; initial-value: #3e4f68; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #4f6079; }
@property --label { syntax: "<color>"; inherits: true; initial-value: #52637c; }
html.room-changing { transition-property: --g-0, --g-1, --g-2, --wash, --accent, --accent-deep, --ink, --ink-2, --muted, --label; transition-duration: 0.5s; transition-timing-function: var(--ease); }

/* ---- Today: greeting card with the day strip ---------------------------------------------- */

.hello { display: flex; align-items: center; gap: 16px; }
.hello .rail-me { flex: none; width: 40px; height: 40px; margin: 0; background: linear-gradient(150deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 14px; box-shadow: 0 6px 14px rgb(var(--accent-rgb) / 28%), inset 0 1px 0 rgb(255 255 255 / 30%); }
.hello h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.hello p { margin-top: 3px; color: var(--muted); }

/* The day from 7 AM to 11 PM, with a bead at the current time. Events join it in task 14. */
.day { margin-top: 22px; }
.day-track { position: relative; height: 44px; border: 1px solid var(--edge); border-radius: var(--r-item); background: rgb(255 255 255 / 40%); }
.day-hours { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.day-now { position: absolute; top: -5px; bottom: -5px; left: var(--now, 0%); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--accent); }
.day-now::before { content: ""; position: absolute; top: -5px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(var(--accent-rgb) / 16%); }
.day-now[hidden] { display: none; }
.day-past { position: absolute; inset: 0 auto 0 0; width: var(--now, 0%); border-radius: var(--r-item) 0 0 var(--r-item); background: rgb(var(--tint) / 5%); }
.day-note { margin-top: 14px; color: var(--muted); }
.day-note a { color: var(--accent); font-weight: 600; }

/* ---- Setup checklist (Today) ------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.steps a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / 40%); text-decoration: none; transition: background 0.2s; }
.steps a:hover { background: var(--glass-strong); }
.steps b { display: block; font-weight: 600; }
.steps small { display: block; color: var(--muted); font-size: 13px; }
.steps a > span:last-of-type { flex: 1; }
.steps a::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px; border-top: 1.6px solid var(--muted); border-right: 1.6px solid var(--muted); transform: rotate(45deg); }
.step-check { flex: none; width: 20px; height: 20px; border: 1.6px solid var(--line-strong); border-radius: 50%; background: #fff; }
.steps .done .step-check { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.steps .done b { color: var(--muted); text-decoration: line-through; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
