/* ==========================================================================
   Monthling
   Three colour schemes (Plum, Dark, Slate) x three layouts (Classic, Plum,
   Scoreboard). Skin sets the tokens; layout sets the arrangement. Both are
   attributes on <html>, so either can change without touching the other.
   ========================================================================== */

/* --- Plum (light) is the base palette ------------------------------------ */
:root {
  --bg:#F3F1F6; --surface:#FFFFFF; --surface-2:#F7F5FA;
  --line:#E3DEEA; --line-strong:#C5BCD2;
  --ink:#1D1726; --muted:#625A70; --faint:#948CA1;
  --accent:#8A2372; --accent-soft:#F6E4EF; --on-accent:#FFFFFF;
  --ok:#1F7A4F; --ok-soft:#DDF1E6;
  --warn:#9A6208; --warn-soft:#FBEDD3;
  --bad:#B3321F; --bad-soft:#F9E0D9;
  --flag:#D1432E;
  --shadow:0 1px 2px rgb(30 20 40 / .06), 0 8px 24px -14px rgb(30 20 40 / .22);

  --display:"Syne", "Segoe UI", system-ui, sans-serif;
  --body:"Manrope", "Segoe UI", system-ui, sans-serif;
  --mono:"DM Mono", ui-monospace, Menlo, monospace;
  --r:14px;
  color-scheme: light;
}

/* Dark values, reused by "follow my device" and by the explicit Dark choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-skin]) {
    color-scheme: dark;
    --bg:#16121B; --surface:#1F1926; --surface-2:#271F30;
    --line:#342B3F; --line-strong:#4A3F58;
    --ink:#EDE8F2; --muted:#A89FB5; --faint:#776E84;
    --accent:#EE93D0; --accent-soft:#3A1F34; --on-accent:#2A0E22;
    --ok:#5BC98F; --ok-soft:#173326;
    --warn:#E6A94A; --warn-soft:#3A2B12;
    --bad:#F2896F; --bad-soft:#3D1D16;
    --flag:#FB8A5C;
    --shadow:0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -14px rgb(0 0 0 / .6);
  }
}

:root[data-skin="plum"] { color-scheme: light; }

:root[data-skin="dark"] {
  color-scheme: dark;
  --bg:#16121B; --surface:#1F1926; --surface-2:#271F30;
  --line:#342B3F; --line-strong:#4A3F58;
  --ink:#EDE8F2; --muted:#A89FB5; --faint:#776E84;
  --accent:#EE93D0; --accent-soft:#3A1F34; --on-accent:#2A0E22;
  --ok:#5BC98F; --ok-soft:#173326;
  --warn:#E6A94A; --warn-soft:#3A2B12;
  --bad:#F2896F; --bad-soft:#3D1D16;
  --flag:#FB8A5C;
  --shadow:0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -14px rgb(0 0 0 / .6);
}

:root[data-skin="slate"] {
  color-scheme: dark;
  --bg:#101614; --surface:#18201D; --surface-2:#1E2724;
  --line:#2B3632; --line-strong:#3D4A45;
  --ink:#E6ECE9; --muted:#9CA9A4; --faint:#6E7B76;
  --accent:#8FA4FF; --accent-soft:#232C4F; --on-accent:#0E1330;
  --ok:#5BC98F; --ok-soft:#173326;
  --warn:#E6A94A; --warn-soft:#3A2B12;
  --bad:#F2896F; --bad-soft:#3D1D16;
  --flag:#FB923C;
  --shadow:0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -14px rgb(0 0 0 / .6);
}

/* --- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin:0; }
body {
  background:var(--bg); color:var(--ink);
  font-family:var(--body); font-size:15px; line-height:1.5;
  padding:0 16px;
  padding-top:env(safe-area-inset-top, 0px);
  padding-bottom:env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing:antialiased;
}
img { max-width:100%; }
[hidden] { display:none !important; }
button, input, textarea, select { font:inherit; color:inherit; }
button { cursor:pointer; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:6px; }
.mono { font-family:var(--mono); font-variant-numeric:tabular-nums; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

.boot { max-width:900px; margin:0 auto; padding:80px 0; color:var(--muted); display:flex; align-items:center; gap:10px; justify-content:center; }
.spinner { width:15px; height:15px; border:2px solid var(--line-strong); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

.toast {
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:calc(env(safe-area-inset-bottom, 0px) + 18px);
  background:var(--ink); color:var(--bg); padding:11px 18px; border-radius:99px;
  font-size:14px; font-weight:500; box-shadow:var(--shadow); z-index:60; max-width:calc(100% - 32px);
}
.toast.bad { background:var(--bad); color:#fff; }

/* --- buttons and controls ------------------------------------------------ */
.btn { border:0; border-radius:12px; padding:10px 16px; background:var(--accent); color:var(--on-accent); font-weight:600; white-space:nowrap; }
.btn:hover { filter:brightness(1.07); }
.btn:disabled { opacity:.5; cursor:default; filter:none; }
.btn.small { padding:7px 12px; font-size:14px; border-radius:9px; }
.btn.ghost { background:transparent; color:var(--muted); border:1px solid var(--line); }
.btn.ghost:hover { color:var(--ink); border-color:var(--line-strong); filter:none; }
.btn.danger { background:var(--bad); color:#fff; }
.btn.block { width:100%; justify-content:center; display:flex; align-items:center; gap:10px; padding:13px 16px; }
.linkbtn { background:none; border:0; padding:0; color:var(--accent); font-weight:500; font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.iconbtn { width:32px; height:32px; border-radius:9px; border:1px solid transparent; background:transparent; display:grid; place-items:center; color:var(--faint); padding:0; }
.iconbtn:hover { background:var(--surface-2); color:var(--ink); }
.iconbtn svg { width:17px; height:17px; }
.iconbtn.flagged { color:var(--flag); }
.check { width:24px; height:24px; border-radius:50%; border:1.5px solid var(--line-strong); background:var(--surface); display:grid; place-items:center; padding:0; color:transparent; flex:none; }
.check svg { width:13px; height:13px; }
.check[aria-pressed="true"] { background:var(--ok); border-color:var(--ok); color:#fff; }
.field { width:100%; padding:12px 14px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); }
::placeholder { color:var(--faint); }

/* --- sign in ------------------------------------------------------------- */
.auth { min-height:100vh; min-height:100dvh; display:grid; place-items:center; padding:32px 0; }
.authcard { width:100%; max-width:400px; background:var(--surface); border-radius:22px; box-shadow:var(--shadow); padding:30px 26px; display:flex; flex-direction:column; gap:16px; }
.brand { display:flex; align-items:center; gap:10px; }
/* The mark is a row of three moons, so it is wider than it is tall. It paints
   in the accent rather than the ink so the logo carries the brand colour and
   follows every skin — plum in light, pink in dark, blue in slate — without
   needing a second copy of the artwork. */
.brand svg { width:40px; height:30px; color:var(--accent); }
.brand b { font-family:var(--display); font-size:22px; font-weight:800; letter-spacing:-.015em; }
.authcard h1 { font-family:var(--display); font-size:25px; font-weight:700; margin:4px 0 0; letter-spacing:-.02em; text-wrap:balance; line-height:1.15; }
.authcard p.lede { margin:0; color:var(--muted); font-size:14.5px; }
.google { background:var(--surface); color:var(--ink); border:1.5px solid var(--line-strong); }
.google:hover { background:var(--surface-2); filter:none; }
.or { display:flex; align-items:center; gap:12px; color:var(--faint); font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.or::before, .or::after { content:""; height:1px; background:var(--line); flex:1; }
.authnote { font-size:12.5px; color:var(--faint); line-height:1.45; }
.authnote a { color:var(--muted); }

/* --- app frame ----------------------------------------------------------- */
#app { max-width:1180px; margin:0 auto; padding-block:22px 64px; display:flex; flex-direction:column; gap:20px; }
.appbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tabs { display:inline-flex; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:3px; gap:2px; }
.tabs button { border:0; background:transparent; border-radius:9px; padding:7px 15px; font-size:14px; font-weight:600; color:var(--muted); }
.tabs button[aria-selected="true"] { background:var(--accent); color:var(--on-accent); }
.who { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.avatar { width:28px; height:28px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:grid; place-items:center; font-weight:700; font-size:12px; }

/* --- planner grid -------------------------------------------------------- */
.planner { display:grid; grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:26px; align-items:start; }
.side { position:sticky; top:calc(env(safe-area-inset-top, 0px) + 16px); display:flex; flex-direction:column; gap:16px; }
.main { display:flex; flex-direction:column; gap:16px; min-width:0; }
@media (max-width:900px) { .planner { grid-template-columns:minmax(0,1fr); } .side { position:static; } }

.monthnav { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.monthnav h1 { font-family:var(--display); font-weight:700; font-size:28px; letter-spacing:-.02em; margin:0; flex:1; text-align:center; text-wrap:balance; }
.navbtn { width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--surface); display:grid; place-items:center; color:var(--muted); flex:none; }
.navbtn:hover { color:var(--ink); border-color:var(--line-strong); }
.eyebrow { font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.metarow { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:13px; color:var(--muted); }
.savestate { display:inline-flex; align-items:center; gap:6px; }
.savestate i { width:7px; height:7px; border-radius:50%; background:var(--ok); flex:none; }
.savestate.busy i { background:var(--warn); }
.savestate.off i { background:var(--faint); }

.card { background:var(--surface); border-radius:18px; box-shadow:var(--shadow); padding:18px; display:flex; flex-direction:column; gap:15px; }
.bigprog { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.bigprog strong { font-family:var(--display); font-size:19px; font-weight:700; letter-spacing:-.01em; }
.bigprog span { color:var(--muted); font-size:14px; }
.bar { height:10px; border-radius:99px; background:var(--surface-2); overflow:hidden; }
.bar > span { display:block; height:100%; background:var(--accent); border-radius:99px; transition:width .3s; }
.stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 10px; }
.stat { display:flex; flex-direction:column; gap:1px; }
.stat b { font-family:var(--mono); font-size:23px; font-weight:500; line-height:1.15; }
.stat small { font-size:12px; color:var(--muted); }
.stat.acc b { color:var(--accent); } .stat.ok b { color:var(--ok); }
.stat.bad b { color:var(--bad); } .stat.warn b { color:var(--warn); }

/* month calendar */
/* The month title doubles as the way into the year picker. It has to still
   read as a heading, so it carries no button chrome until you touch it. */
.monthpick { border:0; background:transparent; font:inherit; color:inherit; padding:2px 6px;
  border-radius:10px; display:inline-flex; align-items:center; gap:6px; cursor:pointer; max-width:100%; }
.monthpick:hover { background:var(--surface-2); }
.monthpick .tchev { color:var(--faint); }
.monthpick .tchev svg { width:15px; height:15px; transition:transform .2s; }
.monthpick[aria-expanded="true"] .tchev svg { transform:rotate(180deg); }

/* Review's year switcher. Same shape as the month nav on Plan, so moving
   through time looks the same wherever you do it. */
.yearbar { display:flex; align-items:center; gap:10px; }
.yearbar strong { font-family:var(--display); font-size:22px; font-weight:800; letter-spacing:-.01em; }
.yearbar .navbtn[disabled] { opacity:.35; cursor:default; }
.yearbar .linkbtn { margin-left:auto; }
.hilites { margin:0; padding-left:1.1em; display:flex; flex-direction:column; gap:7px; }
.hilites li { font-size:14.5px; line-height:1.5; }
/* a month with no goals still gets a row, because the gap is part of the year */
.mrow.none .track { background:transparent; box-shadow:inset 0 0 0 1px var(--line); }
.mrow.none .mono, .mrow.none .num { color:var(--faint); }

.yearpick { display:flex; flex-direction:column; gap:10px; }
.yearnav { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.yearnav strong { font-family:var(--mono); font-size:15px; letter-spacing:.04em; }
.mgrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.mcell { display:flex; flex-direction:column; align-items:flex-start; gap:3px;
  padding:8px 9px; border:1px solid var(--line); border-radius:11px;
  background:var(--surface); font:inherit; color:inherit; cursor:pointer; text-align:left; }
.mcell:hover { border-color:var(--line-strong); background:var(--surface-2); }
.mcell .mname { font-size:12.5px; font-weight:700; letter-spacing:.03em; }
.mcell .mnum { font-family:var(--mono); font-size:11.5px; color:var(--muted); }
.mcell .mbar { display:block; width:100%; height:3px; border-radius:99px; background:var(--line); overflow:hidden; }
.mcell .mbar i { display:block; height:100%; background:var(--accent); border-radius:99px; }
.mcell.blank { opacity:.55; }
.mcell.blank .mbar { visibility:hidden; }
.mcell.all .mbar i { background:var(--ok); }
/* where you are, and where today is — two different things worth telling apart */
.mcell.current { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.mcell.now .mname::after { content:'•'; margin-left:5px; color:var(--warn); }
.ycap { font-size:12.5px; color:var(--muted); line-height:1.45; }

.cal { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.wkhead { font-size:11px; text-align:center; color:var(--faint); font-weight:700; letter-spacing:.04em; }
.day { aspect-ratio:1/1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border-radius:10px; font-size:11px; color:var(--faint); }
.day .n { font-family:var(--mono); font-size:13px; color:var(--muted); }
.day .tick { width:6px; height:6px; border-radius:50%; background:transparent; }
.day.plan .tick { background:var(--accent); }
.day.done .tick { background:var(--ok); }
.day.late .tick { background:var(--bad); }
.day.past .n { color:var(--faint); }
.day.today { background:var(--accent); }
.day.today .n { color:var(--on-accent); font-weight:700; }
.day.today .tick { box-shadow:0 0 0 1.5px var(--on-accent); }
.legend { display:flex; flex-wrap:wrap; gap:13px; font-size:12px; color:var(--muted); }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.legend i { width:8px; height:8px; border-radius:50%; display:inline-block; }

/* --- toolbar and goals --------------------------------------------------- */
.addgoal { display:flex; gap:8px; }
.addgoal .field { flex:1; min-width:0; }
.toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.filters { display:flex; flex-wrap:wrap; gap:6px; }
.chip { border:1px solid var(--line); background:var(--surface); border-radius:10px; padding:5px 12px; font-size:13px; color:var(--muted); display:inline-flex; gap:6px; align-items:center; }
.chip b { font-family:var(--mono); font-weight:500; font-size:12px; }
.chip[aria-pressed="true"] { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding:11px 15px; border:1px dashed var(--line-strong); border-radius:var(--r); font-size:14px; color:var(--muted); }

.goals { display:flex; flex-direction:column; gap:10px; }
.goal { background:var(--surface); border-radius:16px; box-shadow:var(--shadow); overflow:hidden; }
.goal.isdone { opacity:.82; }
.ghead { display:grid; grid-template-columns:auto 1fr auto auto auto; align-items:center; gap:10px; padding:13px 13px 11px 15px; }
.gtitle { border:0; background:transparent; font-family:var(--display); font-weight:700; font-size:17px; letter-spacing:-.01em; padding:4px 6px; border-radius:7px; min-width:0; width:100%;
  resize:none; overflow:hidden; line-height:1.3; display:block; }
.gtitle:hover { background:var(--surface-2); }
.gtitle:focus { background:var(--surface-2); outline:none; box-shadow:inset 0 0 0 1px var(--line-strong); }
.goal.isdone .gtitle { color:var(--muted); text-decoration:line-through; text-decoration-color:var(--line-strong); }
.pills { display:flex; gap:6px; align-items:center; }
.pill { font-size:11.5px; font-weight:700; letter-spacing:.02em; padding:3px 9px; border-radius:8px; white-space:nowrap; background:var(--surface-2); color:var(--muted); }
.pill.ok { background:var(--ok-soft); color:var(--ok); }
.pill.bad { background:var(--bad-soft); color:var(--bad); }
.pill.warn { background:var(--warn-soft); color:var(--warn); }
.pill.acc { background:var(--accent-soft); color:var(--accent); }
.expand { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:5px 9px; font-family:var(--mono); font-size:12.5px; color:var(--muted); }
.expand svg { width:14px; height:14px; transition:transform .2s; }
.expand[aria-expanded="true"] svg { transform:rotate(180deg); }
.gprog { height:4px; background:var(--surface-2); margin:0 15px 11px; border-radius:4px; overflow:hidden; }
.gprog span { display:block; height:100%; background:var(--accent); }
.goal.isdone .gprog span { background:var(--ok); }
@media (max-width:560px) {
  /* Give the title a full row of its own so long goal names are never clipped. */
  .ghead { grid-template-columns:auto 1fr auto auto; row-gap:9px; }
  .ghead .gtitle { grid-column:2 / -1; grid-row:1; }
  .ghead .pills { grid-column:1 / 3; grid-row:2; flex-wrap:wrap; }
  .ghead .iconbtn { grid-column:3; grid-row:2; }
  .ghead .expand { grid-column:4; grid-row:2; }
}

.gbody { border-top:1px dashed var(--line); padding:15px; display:flex; flex-direction:column; gap:14px; }
.note { width:100%; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); padding:10px 12px; resize:vertical; min-height:46px; font-size:14px; }
.sub { font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:700; display:flex; justify-content:space-between; gap:8px; }
.sub span { letter-spacing:0; text-transform:none; font-weight:400; font-family:var(--mono); }
.tasks { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.task { display:grid; grid-template-columns:auto 116px 1fr auto auto; align-items:start; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); }
.task > .check, .task > .pill, .task > .iconbtn { margin-top:2px; }
.task > .pill { align-self:start; }
.task:last-child { border-bottom:0; }
.task .check { width:20px; height:20px; }
.task input[type=date] { border:1px solid transparent; background:transparent; font-family:var(--mono); font-size:12.5px; color:var(--muted); padding:4px; border-radius:7px; width:100%; }
.task input[type=date]:hover, .task input[type=date]:focus { border-color:var(--line); }
.ttext { border:0; background:transparent; padding:5px 6px; border-radius:7px; min-width:0; width:100%;
  resize:none; overflow:hidden; line-height:1.4; display:block; }
.ttext:hover { background:var(--surface-2); }
.ttext:focus { background:var(--surface-2); outline:none; box-shadow:inset 0 0 0 1px var(--line-strong); }
.task.isdone .ttext { color:var(--faint); text-decoration:line-through; }
.empty { font-size:14px; color:var(--faint); padding:6px 0; }
@media (max-width:560px) {
  .task { grid-template-columns:auto 1fr auto auto; }
  .task input[type=date] { grid-column:2/3; grid-row:1; width:auto; justify-self:start; }
  .task .ttext { grid-column:2/-1; grid-row:2; }
  .task .pill { grid-column:3; grid-row:1; }
  .task .iconbtn { grid-column:4; grid-row:1; }
}
.addtask { display:flex; gap:8px; flex-wrap:wrap; }
.addtask input[type=date] { border:1px solid var(--line-strong); border-radius:9px; background:var(--surface); padding:7px 8px; font-family:var(--mono); font-size:13px; }
.addtask input[type=text] { flex:1; min-width:170px; border:1px solid var(--line-strong); border-radius:9px; background:var(--surface); padding:7px 11px; }
.gfoot { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.gfoot .row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.emptystate { text-align:center; padding:38px 16px; border:1px dashed var(--line-strong); border-radius:18px; color:var(--muted); }
.emptystate strong { display:block; font-family:var(--display); font-size:19px; color:var(--ink); margin-bottom:4px; font-weight:700; }
/* Borrowed from the Today panel so the highlight and the place it points at
   are the same yellow. Both tokens flip for dark mode, so it stays readable. */
.emptystate .hi { color:var(--warn); background:var(--warn-soft); font-weight:700;
  padding:2px 8px; border-radius:8px; white-space:nowrap; }

/* --- AI suggestions ------------------------------------------------------ */
.airow { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.aihint { font-size:12.5px; color:var(--faint); line-height:1.45; }
.ai { border:1px solid var(--accent); border-radius:14px; padding:13px 14px; background:var(--accent-soft); display:flex; flex-direction:column; gap:9px; }
.ai strong { font-family:var(--display); font-size:15px; font-weight:700; color:var(--accent); }
.ai .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:2px; }
.pastebox { width:100%; resize:vertical; min-height:7.5em; line-height:1.5;
  font-family:var(--mono); font-size:13px; white-space:pre; overflow-wrap:normal; overflow-x:auto; }
.ai .aihint { color:var(--muted); }
/* Sits between the heading and the steps, so it is read as the shape of the
   plan rather than as one more instruction underneath it. */
.aibrief { font-size:13.5px; line-height:1.5; color:var(--ink); margin:-2px 0 1px;
  padding-left:11px; border-left:2px solid var(--accent); }
.aitask { display:grid; grid-template-columns:auto 76px 1fr; gap:10px; align-items:center; font-size:14px; }
.aitask .check { width:20px; height:20px; }
.aitask .mono { font-size:12.5px; color:var(--muted); }
.sparkle { margin-right:5px; }

/* --- dashboard ----------------------------------------------------------- */
.dash { display:flex; flex-direction:column; gap:18px; }
.dashgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:14px; }
.kpi { background:var(--surface); border-radius:18px; box-shadow:var(--shadow); padding:16px 18px; display:flex; flex-direction:column; gap:3px; }
.kpi b { font-family:var(--mono); font-size:30px; font-weight:500; line-height:1.1; }
.kpi small { font-size:12.5px; color:var(--muted); }
.kpi .sub2 { font-size:12px; color:var(--faint); margin-top:3px; }
.panel { background:var(--surface); border-radius:18px; box-shadow:var(--shadow); padding:18px; display:flex; flex-direction:column; gap:14px; }
.panel h2 { font-family:var(--display); font-size:17px; font-weight:700; margin:0; letter-spacing:-.01em; }
.panel .cap { font-size:12.5px; color:var(--muted); margin:-8px 0 0; }
.chartwrap { overflow-x:auto; }
.heatwrap { display:inline-grid; grid-template-columns:auto auto; grid-template-rows:auto auto; gap:5px 8px; }
.heatmonths { grid-column:2; grid-row:1; display:grid; grid-auto-flow:column; grid-auto-columns:14px; gap:3px; font-size:10px; color:var(--muted); height:12px; }
.heatmonths span { white-space:nowrap; line-height:1; }
.heatdays { grid-column:1; grid-row:2; display:grid; grid-template-rows:repeat(7,14px); gap:3px; font-size:9.5px; color:var(--faint); align-items:center; line-height:1; text-align:right; }
.heat { grid-column:2; grid-row:2; display:grid; grid-auto-flow:column; grid-template-rows:repeat(7,14px); gap:3px; min-width:min-content; }
.heat i { width:14px; height:14px; border-radius:3px; background:color-mix(in srgb, var(--line) 60%, var(--surface)); display:block; }
.heat i[data-l="1"] { background:color-mix(in srgb, var(--accent) 26%, var(--surface)); }
.heat i[data-l="2"] { background:color-mix(in srgb, var(--accent) 52%, var(--surface)); }
.heat i[data-l="3"] { background:color-mix(in srgb, var(--accent) 76%, var(--surface)); }
.heat i[data-l="4"] { background:var(--accent); }
.heat i[data-miss="1"] { box-shadow:inset 0 0 0 1.5px var(--bad); }
.months { display:flex; flex-direction:column; gap:9px; }
.mrow { display:grid; grid-template-columns:78px 1fr 58px; gap:10px; align-items:center; font-size:13px; }
.mrow .track { height:16px; border-radius:5px; background:var(--surface-2); overflow:hidden; display:flex; }
/* A 2px gap of the surface between stacked segments, so where one ends and the
   next begins survives being read small, in dark mode, or by someone who tells
   the two colours apart poorly. */
.mrow .track i { display:block; height:100%; }
.mrow .track i.d + i { box-shadow:inset 2px 0 0 var(--surface); }
.mrow .track i.d { background:var(--ok); }
.mrow .track i.o { background:var(--bad); }
.mrow .track i.p { background:color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.mrow .num { text-align:right; font-family:var(--mono); font-size:12.5px; color:var(--muted); }

/* --- the day panel --------------------------------------------------------
   Collapsed by default: the header carries the signal, the list is opened on
   purpose. Overdue is edged in red, the selected day in amber. */
.today { display:flex; flex-direction:column; gap:10px; }
.tblock { background:var(--surface); border-radius:16px; box-shadow:var(--shadow); overflow:hidden; }
.tblock.clear { padding:13px 16px; font-size:14px; color:var(--muted); display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.tblock.overdue { box-shadow:var(--shadow), inset 4px 0 0 var(--bad); }
.tblock.due { box-shadow:var(--shadow), inset 4px 0 0 var(--warn); }

.thead { width:100%; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:13px 16px; border:0; background:transparent; text-align:left; font:inherit; color:inherit; }
.thead:hover { background:var(--surface-2); }
.tlabel { font-family:var(--display); font-size:16px; font-weight:700; letter-spacing:-.01em; }
.tblock.overdue .tlabel { color:var(--bad); }
.tblock.due .tlabel { color:var(--warn); }
.thead .count { font-family:var(--mono); font-size:12.5px; font-weight:500; padding:2px 9px; border-radius:99px;
  background:var(--surface-2); color:var(--muted); }
.tblock.overdue .thead .count { background:var(--bad-soft); color:var(--bad); }
.tblock.due .thead .count { background:var(--warn-soft); color:var(--warn); }
.tsum { font-size:13px; color:var(--muted); flex:1; min-width:0; }
.tchev { display:grid; place-items:center; color:var(--faint); flex:none; }
.tchev svg { width:16px; height:16px; transition:transform .2s; }
.tblock.open .tchev svg { transform:rotate(180deg); }

.tbody { padding:0 16px 14px; display:flex; flex-direction:column; gap:14px; }
.tgroup { display:flex; flex-direction:column; gap:3px; }
.tghead { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gcheck { width:18px; height:18px; }
.gcheck svg { width:11px; height:11px; }
.tgoal { border:0; background:transparent; padding:2px 0; font:inherit;
  font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);
  text-align:left; }
.tgoal:hover { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.tgroup.ready .tgoal { color:var(--ok); }
.tghead .pill.ready { font-size:10.5px; padding:2px 7px; }

/* The last column is the delete button, which only day-to-day rows get. Goal
   rows keep the empty slot so dates and pills line up down the whole panel. */
.trow { display:grid; grid-template-columns:auto 1fr 124px auto 32px; align-items:center; gap:10px;
  padding:7px 0; border-bottom:1px solid var(--line); }
.iconslot { width:32px; height:1px; }
.trow:last-child { border-bottom:0; }
.trow .check { width:21px; height:21px; }
.ttitle { font-size:14.5px; line-height:1.35; min-width:0; }
.trow.isdone .ttitle { color:var(--faint); text-decoration:line-through; }
.trow input[type=date] { border:1px solid transparent; background:transparent; font-family:var(--mono);
  font-size:12.5px; color:var(--muted); padding:4px; border-radius:7px; width:100%; }
.trow input[type=date]:hover, .trow input[type=date]:focus { border-color:var(--line); }
@media (max-width:560px) {
  .trow { grid-template-columns:auto 1fr auto; row-gap:3px; }
  .ttitle { grid-column:2 / -1; grid-row:1; }
  .trow input[type=date] { grid-column:2; grid-row:2; width:auto; justify-self:start; }
  .trow .pill { grid-column:3; grid-row:2; justify-self:end; }
}

/* Day to day — BAU jobs that belong to a day rather than to a goal. Quieter
   than a goal heading on purpose: it is a bucket, not something you achieve. */
.tgroup.bau .tgoal.flat { color:var(--faint); letter-spacing:.08em; cursor:default; }
/* Daily tasks are editable in place: the panel is the only place they live. */
.trow .ttext { border:1px solid transparent; background:transparent; font:inherit; font-size:14.5px;
  line-height:1.35; color:inherit; resize:none; overflow:hidden; padding:3px 6px; margin:-3px -6px;
  border-radius:7px; min-width:0; width:100%; }
.trow .ttext:hover { border-color:var(--line); }
.trow .ttext:focus { border-color:var(--accent); outline:none; background:var(--surface); }
.trow.isdone .ttext { color:var(--faint); text-decoration:line-through; }
.tgroup.bau .tghead { padding-left:2px; }
.tgroup.bau .iconbtn { opacity:0; }
.tgroup.bau .trow:hover .iconbtn, .tgroup.bau .iconbtn:focus-visible { opacity:1; }
@media (max-width:560px) {
  .tgroup.bau .iconbtn { grid-column:3; grid-row:1; justify-self:end; opacity:1; }
  .iconslot { display:none; }
}

.qadd { display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding-top:12px; border-top:1px dashed var(--line); }
.qadd .field { flex:1; min-width:140px; padding:8px 11px; font-size:14px; }
.qadd .qdate { font-family:var(--mono); font-size:12.5px; color:var(--muted);
  border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:7px 8px; flex:none; }
.tblock.clear .qadd { border-top:0; padding-top:0; width:100%; }
@media (max-width:560px) {
  .qadd .field { order:-1; width:100%; flex:1 0 100%; }
}

/* a date chip earns a ring only while something is actually in it, in the same
   colour as the panel above it: amber for today, red for behind */
.chip.urgent { border-color:var(--warn); color:var(--warn); background:var(--warn-soft); }
.chip.urgent b { color:var(--warn); }
.chip.danger { border-color:var(--bad); color:var(--bad); background:var(--bad-soft); }
.chip.danger b { color:var(--bad); }
/* Ready to tick is good news, so it is green — never red like Behind, which is
   the confusion that split the two apart in the first place. */
.chip.good { border-color:var(--ok); color:var(--ok); background:var(--ok-soft); }
.chip.good b { color:var(--ok); }
.qadd + .backtoday { align-self:flex-start; margin-top:2px; }

/* calendar days are buttons that pick the day shown above */
.day { border:0; background:transparent; font:inherit; cursor:pointer; padding:0;
  -webkit-appearance:none; appearance:none; }
.day:hover { background:var(--surface-2); }
.day.picked { box-shadow:inset 0 0 0 2px var(--accent); }
.day.today.picked { box-shadow:inset 0 0 0 2px var(--ink); }

/* --- goal ready to tick ---------------------------------------------------
   Every task done but the goal not ticked. The ring draws the eye to the one
   control that finishes it; the pulse is dropped under reduced motion and the
   ring stays. */
.pill.ready { background:var(--ok-soft); color:var(--ok); }
.goal.ready .check,
.tgroup.ready .gcheck {
  border-color:var(--ok);
  box-shadow:0 0 0 3px var(--ok-soft);
  animation:readyPulse 2.2s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { box-shadow:0 0 0 3px var(--ok-soft); }
  50%      { box-shadow:0 0 0 7px color-mix(in srgb, var(--ok) 20%, transparent); }
}
.goal.ready .gfoot > span { color:var(--ok); font-weight:600; }

/* --- admin --------------------------------------------------------------- */
.atable { width:100%; border-collapse:collapse; font-size:14px; min-width:520px; }
.atable th { text-align:left; font-size:11px; letter-spacing:.07em; text-transform:uppercase; color:var(--muted); font-weight:700; padding:0 12px 8px 0; }
.atable td { padding:8px 12px 8px 0; border-top:1px solid var(--line); vertical-align:top; }
.atable tr:first-child td { border-top:0; }
.atable .stale { color:var(--faint); }
.atable .refid { font-size:11px; color:var(--faint); }
.atable td:has(.limitbox) { vertical-align:middle; }
.limitbox { width:6.5rem; font-family:var(--mono); font-size:13.5px; color:var(--ink);
  background:var(--surface-2); border:1px solid var(--line); border-radius:9px; padding:7px 10px; }
.limitbox:focus { outline:none; border-color:var(--accent); background:var(--surface); }
.planbox { font-family:var(--mono); font-size:13px; color:var(--ink); text-transform:capitalize;
  background:var(--surface-2); border:1px solid var(--line); border-radius:9px; padding:5px 8px; }
.planbox:focus { outline:none; border-color:var(--accent); background:var(--surface); }
.planbox:disabled { opacity:.55; }
.mrow.feat { grid-template-columns:124px 1fr 76px; }
.mrow.feat .track i { background:var(--accent); }
.daybars { display:flex; align-items:flex-end; gap:3px; height:110px; min-width:min-content; }
.daybar { flex:1 0 10px; height:100%; display:flex; align-items:flex-end; border-radius:3px; background:var(--surface-2); }
.daybar i { display:block; width:100%; height:var(--h); min-height:2px; background:var(--accent); border-radius:3px; }
.daybar[style*="--h:0%"] i { background:var(--line); }

/* --- settings ------------------------------------------------------------ */
.setgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:14px; }
.opt { display:flex; flex-direction:column; gap:9px; }
.opt > span { font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.swatches { display:flex; flex-wrap:wrap; gap:8px; }
.sw { border:1.5px solid var(--line); background:var(--surface); border-radius:11px; padding:7px 12px; font-size:13.5px; font-weight:600; color:var(--muted); display:inline-flex; align-items:center; gap:7px; }
.sw i { width:12px; height:12px; border-radius:50%; border:1px solid rgb(128 128 128 / .35); display:inline-block; }
.sw[aria-pressed="true"] { border-color:var(--accent); color:var(--ink); background:var(--accent-soft); }

/* --- settings: assistant keys -------------------------------------------- */
.keylist { list-style:none; display:flex; flex-direction:column; gap:10px; margin:4px 0 0; padding:0; }
.keylist > li { border:1px solid var(--line); border-radius:12px; padding:11px 13px; display:flex; flex-direction:column; gap:6px; }
.keylist .kmain { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.keylist .kmain strong { font-family:var(--display); font-size:15px; font-weight:700; }
.keylist code { font-family:var(--mono); font-size:12.5px; color:var(--muted); }
.keylist .row { display:flex; gap:8px; flex-wrap:wrap; margin-top:3px; }
.newkey .keyval { font-family:var(--mono); font-size:13px; background:var(--surface); border:1px solid var(--line); border-radius:9px;
  padding:9px 11px; word-break:break-all; user-select:all; display:block; }
.newkeyform { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; margin-top:4px; }
.newkeyform label { display:flex; flex-direction:column; gap:5px; font-size:11.5px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted); font-weight:700; }
.newkeyform input, .newkeyform select { border:1px solid var(--line); background:var(--surface); color:var(--ink);
  border-radius:10px; padding:9px 11px; font-size:14.5px; font-weight:400; letter-spacing:normal; text-transform:none; }
.newkeyform input { min-width:min(100%,230px); }
.newkeyform input:focus-visible, .newkeyform select:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }

/* ==========================================================================
   Layout: Classic — one column, framed cards, square-ish corners
   ========================================================================== */
:root[data-layout="classic"] #app { max-width:880px; }
:root[data-layout="classic"] .planner { grid-template-columns:minmax(0,1fr); }
:root[data-layout="classic"] .side { position:static; }
:root[data-layout="classic"] .monthnav h1 { text-align:left; font-size:clamp(28px,6vw,40px); }
:root[data-layout="classic"] .monthnav { justify-content:flex-start; }
:root[data-layout="classic"] .monthnav h1 { flex:0 1 auto; order:-1; margin-right:auto; }
:root[data-layout="classic"] .card,
:root[data-layout="classic"] .goal,
:root[data-layout="classic"] .panel,
:root[data-layout="classic"] .kpi { border:1px solid var(--line); box-shadow:none; border-radius:10px; }
:root[data-layout="classic"] .emptystate { border-radius:10px; }
:root[data-layout="classic"] .stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
:root[data-layout="classic"] .stat { padding-left:10px; border-left:3px solid var(--line); }
:root[data-layout="classic"] .stat.acc { border-color:var(--accent); }
:root[data-layout="classic"] .stat.ok { border-color:var(--ok); }
:root[data-layout="classic"] .stat.bad { border-color:var(--bad); }
:root[data-layout="classic"] .stat.warn { border-color:var(--warn); }
:root[data-layout="classic"] .stat b { color:var(--ink); }
:root[data-layout="classic"] .cal { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(24px,1fr); overflow-x:auto; }
:root[data-layout="classic"] .wkhead { display:none; }
:root[data-layout="classic"] .day { aspect-ratio:auto; padding:6px 0; border-radius:6px; }
/* The planner calendar offsets day 1 to its weekday column with an inline
   style. These layouts show a flat strip instead, so that offset must go. */
:root[data-layout="classic"] .day { grid-column-start:auto !important; }
:root[data-layout="classic"] .day .tick { width:14px; height:4px; border-radius:2px; }
:root[data-layout="classic"] .legend i { width:12px; height:4px; border-radius:2px; }
:root[data-layout="classic"] .check { border-radius:7px; }
:root[data-layout="classic"] .task .check { border-radius:6px; }
:root[data-layout="classic"] .bar { border:1px solid var(--line); height:8px; }
:root[data-layout="classic"] .gtitle { font-weight:600; font-size:18px; }
:root[data-layout="classic"] .gprog { margin:0; border-radius:0; height:3px; }
@media (max-width:560px) { :root[data-layout="classic"] .stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ==========================================================================
   Layout: Scoreboard — wide uppercase type, solid summary band, card grid
   ========================================================================== */
:root[data-layout="scoreboard"] { --r:4px; }
:root[data-layout="scoreboard"] #app { max-width:1100px; }
:root[data-layout="scoreboard"] .planner { grid-template-columns:minmax(0,1fr); }
:root[data-layout="scoreboard"] .side { position:static; }
:root[data-layout="scoreboard"] .monthnav h1 { font-size:clamp(30px,6.5vw,52px); text-transform:uppercase; font-weight:800; letter-spacing:-.01em; }
:root[data-layout="scoreboard"] .card { background:var(--ink); color:var(--bg); border-radius:4px; }
:root[data-layout="scoreboard"] .card .bigprog span,
:root[data-layout="scoreboard"] .card .stat small,
:root[data-layout="scoreboard"] .card .legend { color:color-mix(in srgb, var(--bg) 66%, var(--ink)); }
:root[data-layout="scoreboard"] .card .bar { background:color-mix(in srgb, var(--bg) 16%, var(--ink)); height:6px; border-radius:0; }
:root[data-layout="scoreboard"] .card .bar > span { border-radius:0; }
:root[data-layout="scoreboard"] .bigprog strong { text-transform:uppercase; font-size:19px; font-weight:800; }
:root[data-layout="scoreboard"] .stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
:root[data-layout="scoreboard"] .stat { border-top:2px solid color-mix(in srgb, var(--bg) 22%, var(--ink)); padding-top:9px; }
:root[data-layout="scoreboard"] .stat b { font-size:31px; color:var(--bg); }
:root[data-layout="scoreboard"] .stat.acc { border-top-color:var(--accent); }
:root[data-layout="scoreboard"] .stat.ok { border-top-color:var(--ok); }
:root[data-layout="scoreboard"] .stat.bad { border-top-color:var(--bad); }
:root[data-layout="scoreboard"] .stat.warn { border-top-color:var(--warn); }
:root[data-layout="scoreboard"] .card .cal { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(22px,1fr); overflow-x:auto; }
:root[data-layout="scoreboard"] .card .wkhead { display:none; }
:root[data-layout="scoreboard"] .card .day { aspect-ratio:auto; padding:5px 0; border-radius:2px; color:color-mix(in srgb, var(--bg) 55%, var(--ink)); }
:root[data-layout="scoreboard"] .card .day { grid-column-start:auto !important; }
:root[data-layout="scoreboard"] .card .day .n { color:var(--bg); }
:root[data-layout="scoreboard"] .card .day.past .n { color:color-mix(in srgb, var(--bg) 52%, var(--ink)); }
:root[data-layout="scoreboard"] .card .day .tick { width:16px; height:4px; border-radius:0; background:color-mix(in srgb, var(--bg) 20%, var(--ink)); }
:root[data-layout="scoreboard"] .card .day.plan .tick { background:var(--accent); }
:root[data-layout="scoreboard"] .card .day.done .tick { background:var(--ok); }
:root[data-layout="scoreboard"] .card .day.late .tick { background:var(--bad); }
:root[data-layout="scoreboard"] .card .day.today { background:var(--accent); }
:root[data-layout="scoreboard"] .card .day.today .n { color:var(--on-accent); }
:root[data-layout="scoreboard"] .card .legend i { width:12px; height:4px; border-radius:0; }
:root[data-layout="scoreboard"] .btn, :root[data-layout="scoreboard"] .chip,
:root[data-layout="scoreboard"] .field, :root[data-layout="scoreboard"] .sw { border-radius:4px; }
:root[data-layout="scoreboard"] .btn { text-transform:uppercase; letter-spacing:.06em; font-size:13px; font-weight:700; }
:root[data-layout="scoreboard"] .btn.small { font-size:12px; }
:root[data-layout="scoreboard"] .chip { text-transform:uppercase; letter-spacing:.06em; font-size:12px; font-weight:700; }
:root[data-layout="scoreboard"] .goals { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr)); gap:12px; }
:root[data-layout="scoreboard"] .goal { border:1px solid var(--line); border-radius:4px; box-shadow:none; }
:root[data-layout="scoreboard"] .goal.open { grid-column:1 / -1; }
:root[data-layout="scoreboard"] .emptystate { grid-column:1 / -1; border-radius:4px; }
:root[data-layout="scoreboard"] .ghead { grid-template-columns:auto 1fr auto auto; row-gap:8px; }
:root[data-layout="scoreboard"] .ghead .gtitle { grid-column:2 / -1; grid-row:1; }
:root[data-layout="scoreboard"] .ghead .pills { grid-column:1 / 3; grid-row:2; flex-wrap:wrap; }
:root[data-layout="scoreboard"] .ghead .iconbtn { grid-column:3; grid-row:2; }
:root[data-layout="scoreboard"] .ghead .expand { grid-column:4; grid-row:2; }
:root[data-layout="scoreboard"] .gprog { display:none; }
:root[data-layout="scoreboard"] .expand { position:relative; padding:5px 9px 5px 32px; border-radius:4px; }
:root[data-layout="scoreboard"] .expand::before {
  content:""; position:absolute; left:8px; top:50%; width:18px; height:18px; margin-top:-9px; border-radius:50%;
  background:conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--line) 0);
  -webkit-mask:radial-gradient(circle, transparent 5.5px, #000 6px);
  mask:radial-gradient(circle, transparent 5.5px, #000 6px);
}
:root[data-layout="scoreboard"] .goal.isdone .expand::before { background:var(--ok); }
:root[data-layout="scoreboard"] .check, :root[data-layout="scoreboard"] .task .check { border-radius:3px; }
:root[data-layout="scoreboard"] .pill { border-radius:3px; text-transform:uppercase; letter-spacing:.06em; font-size:10.5px; }
:root[data-layout="scoreboard"] .gbody { background:var(--surface-2); border-top:1px solid var(--line); }
:root[data-layout="scoreboard"] .note { background:var(--surface); border-radius:4px; }
:root[data-layout="scoreboard"] .panel, :root[data-layout="scoreboard"] .kpi { border-radius:4px; box-shadow:none; border:1px solid var(--line); }
@media (max-width:560px) { :root[data-layout="scoreboard"] .stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }

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

/* The sign-in email is the one thing that must not be missed, and a new sending
   domain lands in junk often enough that burying this in grey body text loses
   people at the only step where losing them costs an account.
   Box model is copied from .ai deliberately: these two sit directly above and
   below each other, and any difference in padding or radius reads as sloppy.
   The warning carries through colour and type weight, not through size. */
.junkwarn { border:1px solid var(--warn); border-radius:14px; padding:13px 14px;
  background:var(--warn-soft); display:flex; flex-direction:column; gap:7px; }
.junkwarn strong { font-family:var(--display); font-size:15px; font-weight:700; color:var(--warn);
  letter-spacing:-.01em; }
.junkwarn span { font-size:13.5px; line-height:1.5; color:var(--ink); }
.junkwarn b { font-weight:700; }

/* The delete confirmation opens inside the accounts table, under the row it
   belongs to, so the account being deleted stays on screen while its email is
   typed back. Warning colours, not danger: nothing has happened yet. */
.delrow > td { background:var(--warn-soft); border-top:0; padding:14px 16px; }
.delrow form { display:flex; flex-direction:column; gap:7px; }
.delrow strong { font-family:var(--display); font-size:15px; font-weight:700; color:var(--warn); }
.delrow span { font-size:13px; line-height:1.5; color:var(--ink); }
.delrow .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:4px; }
.delrow .field { min-width:min(100%,280px); }

/* Settings footer. These were a grey line inside the "Your data" panel and
   nobody found them, which matters for terms and privacy in particular. */
.setfoot {
  grid-column:1/-1;
  display:flex; flex-wrap:wrap; gap:18px;
  padding:4px 2px 8px;
  font-size:13.5px;
}
.setfoot a { color:var(--muted); text-underline-offset:3px; }
.setfoot a:hover { color:var(--accent); }
