/* ───────────── Clean — the third theme ─────────────
   Applies when <html data-style="clean">. A flat white board, hairline column
   dividers, and soft cards made of three stacked rows: a status icon + title, a
   grey meta line, a hairline, then the content and a row of pill chips. Set in
   Geist. Every number below was measured off a reference screenshot (a 2x
   capture, so CSS px = image px / 2): 315px columns, 124px-tall cards with a
   16px radius, 13px gaps, 30px chips, a 46px column header. The extra pieces this
   look needs (header icon, "+" button, meta line, chips) are added by app.js only
   while this style is active, so the other themes keep their markup untouched. */

:root[data-style="clean"] {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-mark: var(--font-sans);

  --bg: #ffffff;
  --board: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --line: #efefef;
  --line-strong: #e2e2e2;
  --text: #0d0d0d;
  --text-2: #262626;
  --muted: #727272;
  --faint: #9b9b9b;
  --hover: #f5f5f5;
  --chip-line: #ececec;
  --sub-line: #ebebeb;
  --dot: #d5d5d5;
  --icon-gray: #a7a6a7;
  --placeholder: #fafafa;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.07), 0 2px 5px -1px rgba(0, 0, 0, 0.035);
  --shadow-pop: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 32px -8px rgba(0, 0, 0, 0.16);
  --shadow-ghost: 0 0 0 1px rgba(72, 121, 201, 0.5), 0 0 0 4px rgba(72, 121, 201, 0.16), 0 12px 30px -8px rgba(72, 121, 201, 0.28);

  --accent: #0e5def;
  --accent-hover: #0b52d6;
  --accent-press: #0a47bb;
  --on-accent: #ffffff;
  --accent-ink: #0e5def;
  --focus: #0e5def;
  --selection: rgba(14, 93, 239, 0.18);
  --toast-action: #7fb0ff;
  --tick: #ffffff;
  --tint: 9%;
  --blue: #0e5def;
  --orange: #ff6d00;
  --pink: #e5457a;
  --green: #43bc3d;
  --purple: #7a4fe0;
  --brown: #a98467;
  --gray: #8a8a8a;
  --blue-ink: var(--blue);
  --tag-fg: var(--accent-ink);
  --tag-bg: rgba(14, 93, 239, 0.08);

  --state-todo: #a7a6a7;
  --state-doing: #0e5def;
  --state-done: #43bc3d;
  --state-late: #dc181a;
  --tone-0: #a7a6a7;
  --tone-1: #286fe9;
  --tone-2: #5ec155;
  --tone-3: #ff8a1f;
  --tone-4: #8b5cf6;
  --tone-5: #ec4899;
  --tone-today: #ff6d00;

  --radius-card: 16px;
  --topbar-h: 58px;
}

:root[data-style="clean"][data-theme="dark"] {
  --bg: #0c0c0d;
  --board: #0c0c0d;
  --surface: #151516;
  --surface-2: #1f1f21;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f4;
  --text-2: #d4d4d4;
  --muted: #9a9a9a;
  --faint: #6e6e70;
  --hover: rgba(255, 255, 255, 0.06);
  --chip-line: rgba(255, 255, 255, 0.1);
  --sub-line: rgba(255, 255, 255, 0.08);
  --dot: #4a4a4c;
  --icon-gray: #78787a;
  --placeholder: rgba(255, 255, 255, 0.03);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 16px 36px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-ghost: 0 0 0 1px rgba(110, 160, 255, 0.55), 0 0 0 4px rgba(110, 160, 255, 0.16), 0 14px 34px -8px rgba(0, 0, 0, 0.7);

  --accent: #5b9bff;
  --accent-hover: #7aacff;
  --accent-press: #8fbaff;
  --on-accent: #06152e;
  --accent-ink: #8ab4ff;
  --focus: #5b9bff;
  --selection: rgba(91, 155, 255, 0.3);
  --toast-action: #0e5def;
  --tick: #06152e;
  --tint: 16%;
  --blue: #5b9bff;
  --orange: #ff9a4d;
  --pink: #ff7aa8;
  --green: #5fd36a;
  --purple: #a487ff;
  --brown: #cba98a;
  --gray: #a0a0a0;
  --tag-bg: rgba(91, 155, 255, 0.14);

  --state-todo: #78787a;
  --state-doing: #5b9bff;
  --state-done: #5fd36a;
  --state-late: #ff6b6b;
}

/* ── type ── */
:root[data-style="clean"] body { font-size: 13px; }

/* ── chrome ── */
:root[data-style="clean"] .topbar { padding: 0 16px; border-bottom: 1px solid var(--line); }
:root[data-style="clean"] .wordmark { font-weight: 600; font-size: 20px; letter-spacing: -0.04em; }
:root[data-style="clean"] .wordmark span { color: var(--text); transform: none; }
:root[data-style="clean"] .topbar .wordmark { font-size: 20px; }

:root[data-style="clean"] .seg { padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); }
:root[data-style="clean"] .seg button { height: 26px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; }
:root[data-style="clean"] .seg button[aria-selected="true"] { box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.06); }

:root[data-style="clean"] .search input { height: 32px; padding-left: 32px; border-radius: 9px; font-size: 13px; }
:root[data-style="clean"] .icon-btn { border-radius: 8px; }
:root[data-style="clean"] .btn { height: 32px; border-radius: 9px; font-size: 13px; font-weight: 500; box-shadow: none; }
:root[data-style="clean"] .ghost-btn { font-size: 13px; }
:root[data-style="clean"] .menu,
:root[data-style="clean"] .results,
:root[data-style="clean"] dialog.confirm,
:root[data-style="clean"] dialog.expand-dialog { border-radius: 12px; }
:root[data-style="clean"] .menu .mi { font-size: 13px; }
:root[data-style="clean"] .toast { border-radius: 10px; font-size: 13px; }
:root[data-style="clean"] .demo-badge { font-size: 12px; }

/* ── board: 315px columns split by hairlines ── */
:root[data-style="clean"] .col.stack,
:root[data-style="clean"] .col.day:not(.collapsed) { width: 315px; }
:root[data-style="clean"] .col { border-right-color: var(--line); }
:root[data-style="clean"] .col.day { background: var(--board); }
:root[data-style="clean"] .col-head { height: 46px; gap: 8px; padding: 0 12px 0 15px; }
:root[data-style="clean"] .col-body { padding: 0 14px 20px 15px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
:root[data-style="clean"] .col-body:hover { scrollbar-color: var(--line-strong) transparent; }
:root[data-style="clean"] .card-list { gap: 13px; }
:root[data-style="clean"] .stack-name,
:root[data-style="clean"] .col-title {
  padding: 4px 0; margin-left: 0; border-radius: 6px;
  font: 450 13px/1 var(--font-display); letter-spacing: -0.005em; color: var(--text);
}
:root[data-style="clean"] .stack-name:hover { background: transparent; }
:root[data-style="clean"] .stack-input { height: 26px; padding: 0 6px; margin-left: -6px; font: 450 13px var(--font-display); }
:root[data-style="clean"] .col-head .date { font-size: 12px; }
:root[data-style="clean"] .col-head .icon-btn { opacity: 1; color: var(--muted); }
:root[data-style="clean"] .col-head .icon-btn.sm { width: 24px; height: 24px; }
:root[data-style="clean"] .col-foot { display: none; }
:root[data-style="clean"] .col.add { width: 220px; border-right: 0; }
:root[data-style="clean"] .col.add .ghost-btn { height: 40px; border-radius: 12px; }
:root[data-style="clean"] .card-list:empty::before { height: 70px; font-size: 13px; }

/* the small coloured square in front of a column name */
:root[data-style="clean"] .stack-icon { flex: none; width: 15px; height: 15px; display: block; color: var(--tone-0); }
:root[data-style="clean"] .stack-icon svg { width: 15px; height: 15px; display: block; }
:root[data-style="clean"] .stack-icon[data-tone="0"] { color: var(--tone-0); }
:root[data-style="clean"] .stack-icon[data-tone="1"] { color: var(--tone-1); }
:root[data-style="clean"] .stack-icon[data-tone="2"] { color: var(--tone-2); }
:root[data-style="clean"] .stack-icon[data-tone="3"] { color: var(--tone-3); }
:root[data-style="clean"] .stack-icon[data-tone="4"] { color: var(--tone-4); }
:root[data-style="clean"] .stack-icon[data-tone="5"] { color: var(--tone-5); }
:root[data-style="clean"] .stack-icon[data-tone="today"] { color: var(--tone-today); }

/* ── cards ── */
:root[data-style="clean"] .card { padding: 0; border: 0; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
:root[data-style="clean"] .card-head { height: 32px; min-height: 0; margin: 0; padding: 14px 16px 0; gap: 8px; align-items: center; }
:root[data-style="clean"] .card.collapsed .card-head { height: 46px; padding-bottom: 14px; }
:root[data-style="clean"] .card-head .spacer { flex: 1; }
:root[data-style="clean"] .card-head .icon-btn.sm { width: 22px; height: 22px; margin-block: -2px; }
:root[data-style="clean"] .card-head .list-progress { display: none; }

:root[data-style="clean"] .kind-icon { flex: none; width: 12px; height: 12px; display: block; color: var(--state-todo); }
:root[data-style="clean"] .kind-icon svg { width: 12px; height: 12px; display: block; }
:root[data-style="clean"] .card[data-state="doing"] .kind-icon { color: var(--state-doing); }
:root[data-style="clean"] .card[data-state="done"] .kind-icon { color: var(--state-done); }

/* the card title is plain text now, not a coloured label */
:root[data-style="clean"] .pill {
  padding: 0; border-radius: 0; background: transparent;
  font: 450 13px/18px var(--font-sans); letter-spacing: -0.005em; color: var(--text);
}
:root[data-style="clean"] .pill-input { height: 26px; margin: -4px 0; font: 450 13px var(--font-sans); border-radius: 8px; }

:root[data-style="clean"] .card-sub {
  display: flex; align-items: center;
  padding: 3px 16px 12px; border-bottom: 1px solid var(--sub-line);
  font-size: 13px; line-height: 18px; color: var(--faint); white-space: nowrap; overflow: hidden;
}
:root[data-style="clean"] .card-sub .sep { flex: none; width: 3px; height: 3px; margin: 0 8px; border-radius: 50%; background: var(--dot); }

/* content sits between the meta line and the chips */
:root[data-style="clean"] .card > .note-text { margin: 12px 16px 14px; font-size: 13px; line-height: 20px; }
:root[data-style="clean"] .card > .note-text .ed-mirror { min-height: 2.6em; }
:root[data-style="clean"] .card > div:not(.card-head):not(.card-sub):not(.card-chips):not(.note-text) { padding: 10px 16px 12px; }
:root[data-style="clean"] .card > .card-chips + * { margin-top: 0; }

:root[data-style="clean"] .card-chips { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0 16px 15px; }
:root[data-style="clean"] .chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 8px 0 7px;
  border-radius: 999px; border: 1px solid var(--chip-line); background: var(--surface);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.035);
  font-size: 13px; letter-spacing: -0.01em; color: #727272; white-space: nowrap;
}
:root[data-style="clean"][data-theme="dark"] .chip { color: var(--muted); box-shadow: none; }
:root[data-style="clean"] .chip-ico { display: inline-flex; width: 13px; height: 13px; color: var(--icon-gray); }
:root[data-style="clean"] .chip-ico svg { width: 13px; height: 13px; display: block; }
:root[data-style="clean"] .chip.tone-todo .chip-ico { color: var(--orange); }
:root[data-style="clean"] .chip.tone-doing .chip-ico { color: var(--state-doing); }
:root[data-style="clean"] .chip.tone-done .chip-ico { color: var(--state-done); }
:root[data-style="clean"] .chip.late { color: var(--state-late); padding-left: 10px; }
:root[data-style="clean"] .chip.late .chip-ico { display: none; }

/* tags in text, and the tag style shared with search */
:root[data-style="clean"] .tag { border-radius: 4px; box-shadow: none; }

/* ── checklist ── */
:root[data-style="clean"] .item { gap: 10px; padding: 4px 0; border-radius: 0; }
:root[data-style="clean"] .item .ed { font-size: 13px; line-height: 18px; }
:root[data-style="clean"] .item .grip { left: -14px; top: 6px; }
:root[data-style="clean"] .check { width: 16px; height: 16px; margin-top: 1px; border-width: 1.5px; border-radius: 5px; border-color: color-mix(in oklab, var(--text) 24%, var(--surface)); }
:root[data-style="clean"] .check svg { width: 10px; height: 10px; }
:root[data-style="clean"] .check:hover { border-color: var(--accent); }
:root[data-style="clean"] .check[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
:root[data-style="clean"] .item.done .ed-mirror { color: var(--faint); }
:root[data-style="clean"] .add-item .ghost-btn { padding: 4px 0; gap: 10px; font-size: 13px; }
:root[data-style="clean"] .add-item .ghost-btn .box { width: 16px; height: 16px; border-width: 1.5px; border-radius: 5px; }
:root[data-style="clean"] .add-item-bottom .ghost-btn { font-size: 12px; }
:root[data-style="clean"] .item.heading .heading-ed { font-size: 11.5px; }

/* ── Today ── */
:root[data-style="clean"] .today-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
:root[data-style="clean"] .today-head h1 .muted { font-weight: 400; }
:root[data-style="clean"] .today-grid .card { padding: 0; min-height: 0; }
:root[data-style="clean"] .today-grid .note-text { margin-top: 14px; font-size: 14px; line-height: 22px; }
:root[data-style="clean"] .today-grid .note-text .ed-mirror { min-height: 300px; }
:root[data-style="clean"] .today-grid .item .ed { font-size: 14px; line-height: 20px; }
:root[data-style="clean"] .back-today { border-radius: 8px; }

/* ── Tags view ── */
:root[data-style="clean"] .tag-col { width: 315px; border: 0; }
:root[data-style="clean"] .tag-col .col-head { padding: 16px 16px 8px; height: auto; }
:root[data-style="clean"] .tag-entry { border-bottom-color: var(--line); }
:root[data-style="clean"] .tag-snip { font-size: 13px; }

/* ── drag: a tilted card with a soft blue ring, over a pale dashed slot ── */
:root[data-style="clean"] .card.ghost { rotate: -4deg; }
:root[data-style="clean"] .card.placeholder::after,
:root[data-style="clean"] .item.placeholder::after { border: 1px dashed var(--line-strong); background: var(--placeholder); }
:root[data-style="clean"] .col.placeholder::after { border: 1px dashed var(--line-strong); background: var(--placeholder); }
:root[data-style="clean"] .col.ghost { background: var(--board); }

@media (max-width: 720px) {
  :root[data-style="clean"] .col.stack,
  :root[data-style="clean"] .col.day:not(.collapsed) { width: 84vw; max-width: 340px; }
  :root[data-style="clean"] .tag-col { width: 84vw; max-width: 340px; }
  :root[data-style="clean"] { --topbar-h: 56px; }
  :root[data-style="clean"] .topbar .wordmark { font-size: 18px; }
  :root[data-style="clean"] .seg button { padding: 0 9px; }
}
