/*
 * Free Kanban styles. Hand-written, no framework. Served as-is by Propshaft.
 */

:root {
  --bg: #fbf5e9;            /* warm paper */
  --surface: #ffffff;
  --ink: #241f17;           /* warm near-black — text + primary buttons */
  --ink-soft: #6e6656;      /* warm gray */
  --line: #e7dcc6;          /* warm hairline */
  --brand: #241f17;         /* primary action = ink (chunky black buttons) */
  --brand-dark: #000000;
  --link: #6b4dea;          /* interactive violet for links */
  --pop: #ffd23f;           /* signature yellow */
  --pop-deep: #f4b52c;
  --coral: #ff6b4a;         /* secondary accent */
  --danger: #d64545;
  --board-bg: #14655a;        /* board canvas — overridden per board theme */
  --board-header-bg: #0e564d; /* board header bar */
  --board-deep: #073f3a;      /* darkest board tone — inset fields */
  --board-pattern: none;      /* tiling overlay — set by the pattern themes */
  --board-pattern-size: auto;
  /* Text and translucent controls that sit on the board surface. Dark themes
     use white-on-color; the light "paper" theme flips these to ink. */
  --board-ink: #ffffff;
  --board-ink-soft: rgba(255,255,255,0.85);
  --board-veil: rgba(255,255,255,0.16);
  --board-veil-strong: rgba(255,255,255,0.30);
  --board-veil-line: rgba(255,255,255,0.30);
  --board-ok: #6ee7b7;        /* success tick on the board header */
  --column-bg: #f2ead8;     /* cream column */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(40, 32, 16, 0.14);
  --shadow-lg: 0 12px 30px rgba(40, 32, 16, 0.18);
  --hard: 3px 3px 0 var(--ink);      /* offset hard shadow */
  --hard-sm: 2px 2px 0 var(--ink);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); }
.topnav { display: flex; align-items: center; gap: 0.5rem; }
/* Buy Me a Coffee button. Hidden on narrow screens — the top bar is already
   full there, and the footer carries the same link. */
.bmc-link { display: inline-flex; align-items: center; margin-left: 0.25rem; }
.bmc-link img { display: block; height: 34px; width: auto; border-radius: 6px; }
.bmc-link:hover img { opacity: 0.9; }
@media (max-width: 780px) { .topnav .bmc-link { display: none; } }
.whoami { color: var(--ink-soft); font-size: 0.9rem; padding: 0.45rem 0.35rem; font-weight: 600; }
.whoami:hover { color: var(--ink); text-decoration: none; }
.settings-title { font-size: 1rem; margin: 0 0 0.25rem; }
.swimlane-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.swimlane-item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  color: var(--ink);
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: #f1f2f4; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fdecec; }
.btn-sm { padding: 0.25rem 0.55rem; font-size: 0.8rem; }
.btn-ship { background: #17915b; color: #fff; }
.btn-ship:hover { background: #0f7a4b; color: #fff; }
.inline-actions { display: flex; gap: 0.5rem; align-items: center; }
.inline-actions .inline { margin: 0; }
.btn-focus { background: #eef0ff; color: var(--brand); font-weight: 700; white-space: nowrap; }
.btn-focus:hover { background: var(--brand); color: #fff; text-decoration: none; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Flash ---------- */
.flash {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.flash-notice { background: #e3fcef; color: #006644; }
.flash-alert { background: #ffebe6; color: #bf2600; }

/* ---------- Layout ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem; }
.narrow { max-width: 420px; margin: 3rem auto; padding: 0 1.25rem; }
.form-page { max-width: 760px; margin: 2.5rem auto; padding: 0 1.25rem; }
.export-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--ink-soft); }
.input, input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  line-height: 1.3;
}
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
textarea { resize: vertical; min-height: 4rem; }
/* Match the calendar/stepper picker color to the app text. */
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.55; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 0.85; }
input[type=date], input[type=number] { -webkit-appearance: none; appearance: none; }
.form-errors { background: #ffebe6; color: #bf2600; padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.form-errors ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }

.card-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.muted { color: var(--ink-soft); }
.stack > * + * { margin-top: 0.75rem; }

/* ---------- Dashboard ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.board-tile {
  display: block;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1rem 1rem;
  min-height: 88px;
  color: var(--ink);
}
/* Theme stripe across the top, so a tile reads as the board it opens. */
.board-tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  background: var(--board-bg);
  background-image: var(--board-pattern);
  background-size: var(--board-pattern-size);
}
.board-tile:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-1px); transition: all .12s; }
.tile-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.tile-wrap .board-tile { flex: 1; }
.claim-btn { width: 100%; }
.board-header .btn.btn-claim { background: #fff; color: var(--brand); font-weight: 700; border-color: #fff; }
.board-header .btn.btn-claim:hover { background: #eef0ff; border-color: #eef0ff; }
.board-tile h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.board-tile .meta { font-size: 0.8rem; color: var(--ink-soft); }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.1rem 0.4rem; border-radius: 4px; }
.tag-anon { background: #fff3d6; color: #8a6d00; }
.tag-team { background: #e6e6ff; color: #4338ca; }
.section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin: 0 0 0.75rem; }
.dash-main .section-title { margin-top: 2rem; }
.empty { color: var(--ink-soft); padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-sm { padding: 1.1rem; text-align: left; font-size: 0.88rem; line-height: 1.5; }

/* ---------- Dashboard: sidebar + activity wall ---------- */
.dashboard-wrap { max-width: 1120px; margin: 0 auto; padding: 1.75rem 1.25rem; }
.dashboard { display: flex; gap: 2rem; align-items: flex-start; }
.dash-sidebar { flex: 0 0 232px; width: 232px; position: sticky; top: 72px; }
.dash-feed { flex: 1; min-width: 0; max-width: 680px; }
@media (max-width: 860px) {
  .dashboard { flex-direction: column; }
  .dash-sidebar { width: 100%; position: static; }
  .dash-feed { max-width: none; width: 100%; }
}

.side-section { margin-bottom: 2.5rem; }
.side-section form { margin: 0; }
.side-section form + form { margin-top: 3px; }
.side-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #97a0af; padding: 0 0.65rem; margin-bottom: 0.7rem; }
.side-title-row { display: flex; align-items: center; justify-content: space-between; padding: 0 0.65rem; margin-bottom: 0.7rem; }
.side-title-row .side-title { padding: 0; margin: 0; }
.side-add { font-size: 0.78rem; font-weight: 700; color: var(--brand); }
.side-item {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.55rem 0.65rem; border-radius: 8px; text-align: left;
  color: var(--ink); font-size: 0.9rem; font-weight: 500; line-height: 1.3;
  background: none; border: none; cursor: pointer;
  margin-bottom: 2px;
}
.side-item:hover { background: #e9ebef; text-decoration: none; }
.side-item.is-active { background: #e6e6ff; color: var(--brand); font-weight: 700; }
.side-item-label, .side-board-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-ws-avatar {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700;
}
.side-board { color: var(--ink-soft); min-width: 0; }
/* The sidebar row is already a flex container with a gap — drop the dot's own margin. */
.side-board .board-dot { width: 13px; height: 13px; margin-right: 0; }
.side-empty { color: var(--ink-soft); font-size: 0.85rem; padding: 0 0.65rem; }
.side-footer { margin-top: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.side-link { display: inline-block; padding: 0 0.65rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.side-link:hover { color: var(--brand); }

.feed-head { margin-bottom: 1.25rem; }
.feed-head-title { display: flex; align-items: baseline; gap: 0.75rem; }
.feed-head-edit { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.feed-head-edit:hover { color: var(--brand); }
.feed-head h1 { margin: 0; font-size: 1.6rem; }
.feed-head p { margin: 0.15rem 0 0; font-size: 0.95rem; }

.activity-wall .activity {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  margin-bottom: 0.9rem;
  border-top: 1px solid var(--line);
}
.activity {
  display: flex;
  gap: 0.85rem;
}
.act-icon {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-size: 1.05rem;
  background: #f1f2f4; border-radius: 9px;
  line-height: 1;
}
.act-icon.cat-create  { background: #dcfce7; }
.act-icon.cat-move    { background: #ffedd5; }
.act-icon.cat-update  { background: #e0eaff; }
.act-icon.cat-delete  { background: #fee2e2; }
.act-icon.cat-comment { background: #e7e5ff; }
.act-icon.cat-claim   { background: #d7efe9; }
.act-icon.cat-join    { background: #fce7f3; }

.act-body { min-width: 0; flex: 1; align-self: center; }
.act-text { font-size: 0.98rem; line-height: 1.5; color: var(--ink-soft); }
.act-text strong { color: var(--ink); font-weight: 600; }
.act-text .act-title { font-weight: 600; color: var(--ink); }
.act-text a.act-link { color: var(--brand); }
.act-text a.act-link:hover { text-decoration: underline; }
.act-quote {
  margin: 0.55rem 0 0.15rem;
  padding: 0.5rem 0.85rem;
  border-left: 3px solid #d7d9e0;
  background: #f8f9fb;
  border-radius: 0 6px 6px 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.act-meta { font-size: 0.8rem; color: #8993a4; margin-top: 0.4rem; }
.act-dot { margin: 0 0.15rem; }
.act-board { color: var(--brand); font-weight: 600; }
.act-board:hover { text-decoration: underline; }

/* ---------- Landing hero ---------- */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 2.2rem; margin: 0 0 0.5rem; }
.hero p { font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; margin: 0 auto 1.5rem; }
.hero-form { max-width: 460px; margin: 0 auto; display: flex; gap: 0.5rem; }
.hero-form input[type=text] { flex: 1; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 2.5rem; text-align: left; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.feature h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.feature p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Board themes ---------- */
/* One block per Board::THEMES key. Applied to the <main> wrapper so both the
   header and the canvas pick it up — and to swatches in board settings, which
   just paint themselves with var(--board-bg). All tones stay dark enough for
   the white header/swimlane text to stay legible. */
/* The default: the same warm paper and dot texture as the rest of the app, so
   a board blends into the dashboard it came from. Being light, it flips the
   board-surface ink and veils to dark — everything else reads them as vars. */
.theme-paper {
  --board-bg: #fbf5e9; --board-header-bg: #f4ead6; --board-deep: #ece0c6;
  --board-pattern: radial-gradient(rgba(36,31,23,0.05) 1px, transparent 1.4px);
  --board-pattern-size: 22px 22px;
  --board-ink: var(--ink);
  --board-ink-soft: var(--ink-soft);
  --board-veil: rgba(36,31,23,0.06);
  --board-veil-strong: rgba(36,31,23,0.12);
  --board-veil-line: rgba(36,31,23,0.20);
  --board-ok: #17915b;
  --column-bg: #f4ecdb;
}
/* Cream columns on a cream canvas need an edge to read as panels — and the
   add-column's translucent veil turns muddy here, so match the columns. */
.theme-paper .column, .theme-paper .add-column { border: 1px solid var(--line); }
.theme-paper .add-column { background: var(--column-bg); }
.theme-teal    { --board-bg: #14655a; --board-header-bg: #0e564d; --board-deep: #073f3a; }
.theme-ocean   { --board-bg: #1b5a86; --board-header-bg: #144a70; --board-deep: #0b2f49; }
.theme-forest  { --board-bg: #2f6b3a; --board-header-bg: #255730; --board-deep: #14361c; }
.theme-indigo  { --board-bg: #3b4291; --board-header-bg: #2e3477; --board-deep: #1c2050; }
.theme-plum    { --board-bg: #5b3a72; --board-header-bg: #4a2e5e; --board-deep: #2f1c3d; }
.theme-crimson { --board-bg: #8c3b3b; --board-header-bg: #74302f; --board-deep: #4a1d1d; }
.theme-rust    { --board-bg: #9c5324; --board-header-bg: #82441c; --board-deep: #522a10; }
.theme-slate   { --board-bg: #3d4550; --board-header-bg: #313842; --board-deep: #1e232a; }

/* Bright row — louder and more saturated, still dark enough for white text. */
.theme-bubblegum { --board-bg: #e0447c; --board-header-bg: #c22e65; --board-deep: #861c41; }
.theme-tangerine { --board-bg: #e2660f; --board-header-bg: #c1530a; --board-deep: #7d3406; }
.theme-grape     { --board-bg: #7048e8; --board-header-bg: #5c37c9; --board-deep: #38208a; }
.theme-electric  { --board-bg: #1288d8; --board-header-bg: #0d6fb4; --board-deep: #084472; }
.theme-lime      { --board-bg: #4f9c12; --board-header-bg: #3f800c; --board-deep: #254d06; }
.theme-magenta   { --board-bg: #b430c4; --board-header-bg: #9722a5; --board-deep: #5d1367; }

/* Pattern row — a tiling background-image layered over the base color.
   `--board-pattern-size` tiles the gradients that need an explicit cell;
   both properties default to the no-op values on :root, so solid themes
   simply leave them alone. Kept low-contrast so cards stay the focus. */
.theme-stripes {
  --board-bg: #c92a6d; --board-header-bg: #a92159; --board-deep: #6b1338;
  --board-pattern: repeating-linear-gradient(45deg, rgba(255,255,255,0.13) 0 9px, transparent 9px 18px);
}
.theme-polka {
  --board-bg: #2b6cb0; --board-header-bg: #235891; --board-deep: #13375c;
  --board-pattern: radial-gradient(rgba(255,255,255,0.20) 2.5px, transparent 3px);
  --board-pattern-size: 18px 18px;
}
.theme-checkers {
  --board-bg: #2f855a; --board-header-bg: #266b49; --board-deep: #13402b;
  --board-pattern: conic-gradient(rgba(255,255,255,0.11) 0 25%, transparent 0 50%, rgba(255,255,255,0.11) 0 75%, transparent 0);
  --board-pattern-size: 24px 24px;
}
.theme-graph {
  --board-bg: #2c3e6b; --board-header-bg: #233355; --board-deep: #131d33;
  --board-pattern:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.14) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 1px, transparent 1px 20px);
}
.theme-confetti {
  --board-bg: #7a3fbf; --board-header-bg: #63329c; --board-deep: #3b1c61;
  --board-pattern:
    radial-gradient(circle at 22% 28%, rgba(255,210,63,0.55) 0 2.5px, transparent 3px),
    radial-gradient(circle at 72% 62%, rgba(255,107,74,0.55) 0 2.5px, transparent 3px),
    radial-gradient(circle at 45% 88%, rgba(110,231,183,0.5) 0 2.5px, transparent 3px),
    radial-gradient(circle at 88% 15%, rgba(255,255,255,0.45) 0 2.5px, transparent 3px);
  --board-pattern-size: 34px 34px;
}

/* The theme color as an accent wherever a board is named elsewhere in the app. */
/* Ringed so the pale "paper" theme still reads as a dot on the cream sidebar. */
.board-dot {
  display: inline-block; flex: 0 0 auto;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--board-bg);
  border: 1px solid rgba(36, 31, 23, 0.30);
  margin-right: 0.4rem;
}

/* One labelled row per Board::THEME_GROUPS entry. */
.theme-picker { display: flex; flex-direction: column; gap: 1rem; margin-top: 0.35rem; }
.theme-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.theme-group-name {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-soft);
}
.field-title { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--ink-soft); }
/* Beat `.field label { display: block }` — swatches sit side by side. */
.field .theme-swatch { display: inline-block; margin-bottom: 0; }
.theme-swatch { cursor: pointer; }
.theme-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-swatch .dot {
  display: block; width: 46px; height: 46px; border-radius: 10px;
  background: var(--board-bg);
  background-image: var(--board-pattern);
  background-size: var(--board-pattern-size);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-sm);
}
.theme-swatch .name { display: block; margin-top: 0.35rem; text-align: center; font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); }
.theme-swatch:hover .dot { transform: translate(-1px, -1px); box-shadow: var(--hard); }
.theme-swatch input:checked ~ .dot { outline: 3px solid var(--pop); outline-offset: 2px; }
.theme-swatch input:checked ~ .name { color: var(--ink); }
.theme-swatch input:focus-visible ~ .dot { outline: 3px solid var(--link); outline-offset: 2px; }

/* ---------- Board view ---------- */
.board-page { display: flex; flex-direction: column; height: calc(100vh - 55px); }
/* Two rows: identity + share link, then the action bar. Fixed rows mean the
   buttons sit in the same place whatever the board is called. */
.board-header {
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 0.7rem 1.25rem;
  background: var(--board-header-bg);
  color: var(--board-ink);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.18);
}
.board-header-top { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
/* Right-aligned so the action bar sits under the share link, not the title. */
.board-header-nav { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
/* The title takes the slack and truncates rather than shoving the link away. */
.board-header h1 {
  margin: 0; font-size: 1.2rem; color: var(--board-ink);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-header-top .tag, .board-header-top .inline { flex: 0 0 auto; }
.board-header .btn {
  color: var(--board-ink);
  background: var(--board-veil);
  border: 1px solid var(--board-veil-line);
}
.board-header .btn:hover { background: var(--board-veil-strong); border-color: var(--board-ink-soft); }
.board-header .share-input {
  background: var(--board-deep);
  color: var(--board-ink);
  border-color: var(--board-veil-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}
.board-header .share-input:focus { border-color: var(--board-ink-soft); box-shadow: none; }
.copy-btn { display: inline-grid; place-items: center; padding: 0.4rem 0.5rem; line-height: 0; }
.copy-btn .icon-check { display: none; }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: inline; color: var(--board-ok); }
.board-header .spacer { flex: 1; }
/* The share input is sized by the URL's length; let it shrink on narrow screens. */
.copy-link { flex: 0 1 auto; min-width: 0; }
.copy-link input { flex: 0 1 auto; }
.board-header .share-input { min-width: 3rem; max-width: 100%; }
/* Primary action on the board — the one people reach for most. */
.board-header .btn.btn-add-card {
  background: var(--pop); color: var(--ink); border-color: var(--pop);
  font-weight: 700;
}
.board-header .btn.btn-add-card:hover { background: var(--pop-deep); border-color: var(--pop-deep); color: var(--ink); }
.board-canvas {
  flex: 1;
  overflow: auto;
  background: var(--board-bg);
  background-image: var(--board-pattern);
  background-size: var(--board-pattern-size);
  padding: 1rem;
}

.swimlane { margin-bottom: 1.25rem; }
.swimlane-head {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--board-ink); font-weight: 700; font-size: 0.9rem;
  padding: 0.35rem 0.25rem; margin-bottom: 0.4rem;
}
.swimlane-head form { display: inline; }

.columns { display: flex; gap: 0.75rem; align-items: stretch; min-height: 40px; }

.column {
  width: 272px;
  flex: 0 0 272px;
  background: var(--column-bg);
  border-radius: var(--radius);
  padding: 0.5rem;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.15s;
}
.column.lane-dimmed { opacity: 0.35; }
.column-head { display: flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.35rem 0.5rem; }
.column-head .col-name { font-weight: 700; font-size: 0.9rem; flex: 1; }
.column-head .count { color: var(--ink-soft); font-size: 0.8rem; }
.column-head form { flex: 1; }
.column-head input { padding: 0.2rem 0.4rem; font-weight: 700; font-size: 0.9rem; }

.cards { flex: 1 1 auto; min-height: 40px; display: flex; flex-direction: column; gap: 0.5rem; overflow-y: auto; }
.cards.drag-over { outline: 2px dashed rgba(79,70,229,0.6); outline-offset: -2px; border-radius: 6px; }

.kcard {
  display: block;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: grab;
  border: 1px solid transparent;
}
.kcard:hover { text-decoration: none; border-color: #c1c7d0; }
.kcard-wrap { position: relative; }
.kcard-wrap.dragging { opacity: 0.5; }
.kcard-wrap.dragging .kcard { cursor: grabbing; }
/* Hover-reveal "ship" button in the card's top-right corner. */
.kcard-ship-form { position: absolute; top: 5px; right: 5px; margin: 0; opacity: 0; transition: opacity .1s; }
.kcard-wrap:hover .kcard-ship-form { opacity: 1; }
.kcard-ship {
  width: 22px; height: 22px; border-radius: 6px; padding: 0; line-height: 1;
  background: #fff; border: 1px solid var(--line); color: #17915b; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow);
}
.kcard-ship:hover { background: #17915b; color: #fff; border-color: #17915b; }

/* ---------- Card colors ---------- */
.c-red    { --card-accent: #e5484d; --card-tint: #fff5f5; }
.c-orange { --card-accent: #f76808; --card-tint: #fff4ec; }
.c-yellow { --card-accent: #e8a200; --card-tint: #fff8e3; }
.c-green  { --card-accent: #30a46c; --card-tint: #edfbf3; }
.c-blue   { --card-accent: #3b82f6; --card-tint: #eef4ff; }
.c-purple { --card-accent: #8e4ec6; --card-tint: #f6f0fd; }

.kcard.is-colored {
  background: var(--card-tint);
  box-shadow: var(--shadow), inset 4px 0 0 var(--card-accent);
}
.focus-card.is-colored { border-left: 5px solid var(--card-accent); background: var(--card-tint); }

/* Swatch picker */
.color-picker-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--ink-soft); }
.color-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.color-swatch { cursor: pointer; line-height: 0; }
.color-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.color-swatch .swatch {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  background: var(--card-accent); border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .1s;
}
.color-swatch .swatch-none { background: #fff; position: relative; }
.color-swatch .swatch-none::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: linear-gradient(to top left, transparent 44%, #d0343a 44%, #d0343a 56%, transparent 56%);
}
.color-swatch input:checked + .swatch { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #44506b; }
.color-swatch input:focus-visible + .swatch { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.kcard .kcard-title { display: block; }
.kcard-milestone {
  display: inline-block; margin-top: 0.35rem;
  font-size: 0.72rem; font-weight: 600; color: #6d28d9;
  background: #f3edff; border-radius: 5px; padding: 0.05rem 0.35rem;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kcard-badges { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.35rem; font-size: 0.75rem; color: var(--ink-soft); }
.kcard-avatars { display: inline-flex; margin-left: auto; }
.kcard-avatars .mini-avatar { margin-left: -6px; }
.kcard-avatars .mini-avatar:first-child { margin-left: 0; }

/* Small user avatar (initials) */
.mini-avatar {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.02em;
  border: 2px solid #fff; box-sizing: content-box;
}

.filtered-hidden { display: none !important; }

/* ---------- Milestones ---------- */
.milestone-form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.milestone-form-row .field { margin-bottom: 0; }
.milestone-form-row .grow2 { flex: 2; min-width: 200px; }
.milestone-form-row .grow1 { flex: 1; min-width: 140px; }
.milestone-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 1rem 1.15rem; margin-bottom: 1rem;
}
.milestone-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.milestone-heading { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.milestone-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.milestone-title:hover { color: var(--brand); }
.milestone-actions { display: flex; align-items: center; gap: 0.75rem; flex: 0 0 auto; }
.milestone-desc { margin: 0.5rem 0 0; font-size: 0.9rem; white-space: pre-wrap; }
.milestone-edit { margin-top: 0.75rem; }
.milestone-edit summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.milestone-edit summary:hover { color: var(--brand); }
.milestone-edit .stack { margin-top: 0.75rem; }

.due-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 20px; padding: 0.12rem 0.55rem; text-transform: uppercase; letter-spacing: 0.02em; }
.due-none { background: #eef0f3; color: #8993a4; }
.due-ok   { background: #e6f4ff; color: #0b6bcb; }
.due-soon { background: #fff3d6; color: #8a6d00; }
.due-over { background: #ffe0e0; color: #c62828; }

/* ---------- Labels ---------- */
.lc-red { --label: #e5484d; }
.lc-orange { --label: #f76808; }
.lc-yellow { --label: #d99400; }
.lc-green { --label: #30a46c; }
.lc-blue { --label: #3b82f6; }
.lc-purple { --label: #8e4ec6; }
.lc-pink { --label: #e93d82; }
.lc-gray { --label: #7b8794; }
.label-chip { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--label, #7b8794); border-radius: 5px; padding: 0.12rem 0.5rem; }
.label-bar { display: inline-block; width: 34px; height: 8px; border-radius: 4px; background: var(--label, #7b8794); }
.kcard-labels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 0.4rem; }
.assignee-option input:checked + .label-chip { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--label); }

/* ---------- Card badges (board) ---------- */
.kcard-ref { font-size: 0.68rem; font-weight: 700; color: #8993a4; letter-spacing: 0.02em; }
.kcard-due { font-weight: 600; }
.kcard-due.is-over { color: #c62828; background: #ffe0e0; border-radius: 4px; padding: 0 0.3rem; }
.checklist-complete { color: #17915b; font-weight: 700; }

/* ---------- Checklist ---------- */
.checklist-progress { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.checklist-bar { flex: 1; height: 8px; background: #e6e8eb; border-radius: 4px; overflow: hidden; }
.checklist-bar span { display: block; height: 100%; background: #30a46c; transition: width .15s; }
.checklist-count { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.checklist-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; }
.checklist-item .inline { display: inline; margin: 0; line-height: 0; }
.checklist-item.is-done .checklist-content { text-decoration: line-through; color: var(--ink-soft); }
.checklist-content { flex: 1; font-size: 0.9rem; }
.checklist-del { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0 0.3rem; }
.checklist-del:hover { color: var(--danger); }
.checklist-add { margin-top: 0.5rem; }

/* ---------- Markdown body ---------- */
.markdown-body { font-size: 0.95rem; line-height: 1.6; }
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body p { margin: 0 0 0.6rem; }
.markdown-body ul, .markdown-body ol { margin: 0 0 0.6rem 1.3rem; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { margin: 0.9rem 0 0.4rem; line-height: 1.3; }
.markdown-body code { background: #f1f2f4; padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.85em; }
.markdown-body pre { background: #f1f2f4; padding: 0.7rem 0.9rem; border-radius: 6px; overflow-x: auto; }
.markdown-body pre code { background: none; padding: 0; }
.markdown-body blockquote { border-left: 3px solid var(--line); margin: 0 0 0.6rem; padding: 0.2rem 0.9rem; color: var(--ink-soft); }
.markdown-body table { border-collapse: collapse; margin: 0 0 0.6rem; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 0.3rem 0.55rem; }
.markdown-body a { color: var(--brand); }

/* ---------- Card page extras ---------- */
.crumb-ref { font-size: 0.8rem; font-weight: 700; color: #8993a4; background: #eef0f3; border-radius: 5px; padding: 0.05rem 0.45rem; }
.checkbox-line { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-top: 0.6rem; }
.checkbox-line input { width: auto; }
.dep-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0; }
.due-over-text { color: #c62828; font-weight: 700; }

/* Release form */
.release-lists { display: flex; flex-direction: column; gap: 0.35rem; }
.release-list-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.release-list-row span:nth-of-type(1) { flex: 1; font-weight: 500; }
.release-list-row.is-empty { opacity: 0.55; cursor: default; }
.release-list-row input { width: auto; }
.release-move { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; }

/* Releases index (list of past releases) */
.release-index { display: flex; flex-direction: column; gap: 0.5rem; }
.release-index-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit; transition: border-color 0.12s, box-shadow 0.12s; }
.release-index-row:hover { border-color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.release-index-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.release-index-name { font-weight: 600; }
.release-index-date { white-space: nowrap; font-size: 0.86rem; }

/* ---------- My assignments ---------- */
.assign-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.assign-filters select { width: auto; min-width: 120px; padding: 0.4rem 0.6rem; font-size: 0.85rem; }
.assign-filter-count { font-size: 0.85rem; }
.assign-group { margin-bottom: 2rem; }
.assign-group-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.assign-board-link { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.assign-board-link:hover { color: var(--brand); }
.assign-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.assign-row {
  display: flex; align-items: center; gap: 0.75rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 0.7rem 0.9rem; color: var(--ink);
}
.assign-row:hover { text-decoration: none; box-shadow: var(--shadow-lg); border-color: #c1c7d0; }
.assign-row.is-colored { border-left: 5px solid var(--card-accent); background: var(--card-tint); }
.assign-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-meta { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.status-chip { font-size: 0.75rem; font-weight: 700; background: #eef0f3; color: var(--ink-soft); border-radius: 20px; padding: 0.15rem 0.6rem; text-transform: uppercase; letter-spacing: 0.02em; }
.swimlane-tag { font-size: 0.8rem; }
.assign-others { display: inline-flex; }
.assign-others .mini-avatar { margin-left: -6px; }
.assign-others .mini-avatar:first-child { margin-left: 0; }

/* Board assignee filter bar */
.filter-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 0.15rem 0.1rem; }
.filter-label { color: var(--board-ink-soft); font-size: 0.82rem; font-weight: 600; }
.filter-search {
  margin-left: auto;
  width: 220px; padding: 0.35rem 0.7rem; font-size: 0.85rem;
  background: var(--board-deep); color: var(--board-ink);
  border: 1px solid var(--board-veil-line); border-radius: 20px;
}
.filter-search::placeholder { color: var(--board-ink-soft); opacity: 0.75; }
.filter-search:focus { outline: none; border-color: var(--board-ink-soft); box-shadow: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--board-veil); border: 1px solid var(--board-veil-line);
  color: var(--board-ink); border-radius: 20px; padding: 0.15rem 0.6rem 0.15rem 0.15rem;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.filter-chip:hover { background: var(--board-veil-strong); }
.filter-chip.is-active { background: var(--board-ink); color: var(--board-header-bg); border-color: var(--board-ink); }
.filter-chip-name { line-height: 1; }
.filter-clear { background: none; border: none; color: var(--board-ink-soft); font-size: 0.82rem; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Assignee multi-select in card forms */
.assignee-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.assignee-option { cursor: pointer; }
.assignee-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.assignee-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line); border-radius: 20px; padding: 0.2rem 0.6rem 0.2rem 0.2rem;
  font-size: 0.85rem; font-weight: 500; color: var(--ink-soft); background: #fff;
}
.assignee-option input:checked + .assignee-chip { border-color: var(--brand); color: var(--brand); background: #eef0ff; }
.assignee-option input:focus-visible + .assignee-chip { box-shadow: 0 0 0 3px rgba(79,70,229,0.2); }

.add-card-form { margin-top: 0.5rem; }
.add-card-form input { font-size: 0.9rem; padding: 0.4rem 0.55rem; background: rgba(255,255,255,0.7); border-color: transparent; }
.add-card-form input:focus { background: #fff; }
.add-card-toggle { color: var(--ink-soft); font-size: 0.85rem; padding: 0.35rem; display: block; width: 100%; text-align: left; }
.add-card-toggle:hover { background: rgba(0,0,0,0.06); border-radius: 4px; text-decoration: none; }

.add-column {
  width: 272px; flex: 0 0 272px;
  background: var(--board-veil-strong);
  border-radius: var(--radius); padding: 0.5rem;
}
.add-column input { background: #fff; }
.add-column .btn { color: var(--board-ink); }

/* ---------- Focused list view ---------- */
.focus-page { display: flex; flex-direction: column; min-height: calc(100vh - 55px); }
.lane-tabs { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.lane-tab {
  color: var(--board-ink-soft);
  padding: 0.32rem 0.7rem;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.lane-tab:hover { background: var(--board-veil); color: var(--board-ink); text-decoration: none; }
.lane-tab.is-active { background: var(--board-veil-strong); color: var(--board-ink); }
.lane-tab.is-active::before { content: "⤢"; font-weight: 400; opacity: 0.9; }
.tab-count { background: var(--board-veil-strong); border-radius: 20px; padding: 0 0.42rem; font-size: 0.72rem; line-height: 1.5; }
.lane-tab.is-active .tab-count { background: rgba(255, 255, 255, 0.34); }
.focus-canvas { flex: 1; background: var(--bg); padding: 2rem 1rem 4rem; }
.focus-col { max-width: 660px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.85rem; }
.focus-cards { display: flex; flex-direction: column; gap: 0.85rem; }

/* Focus-page filter bar (light background variant of the board filter) */
.focus-filter { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.focus-filter .filter-label { color: var(--ink-soft); }
.focus-filter .filter-chip { background: #fff; border: 1px solid var(--line); color: var(--ink-soft); }
.focus-filter .filter-chip:hover { background: #f1f2f4; }
.focus-filter .filter-chip.is-active { background: #e6e6ff; color: var(--brand); border-color: #c7c9ff; }
.focus-filter .filter-search { background: #fff; color: var(--ink); border: 1px solid var(--line); margin-left: auto; }
.focus-filter .filter-search::placeholder { color: var(--ink-soft); }
.focus-filter .filter-clear { color: var(--ink-soft); }
.focus-lane-head {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-soft); margin: 1.5rem 0 0.6rem;
}
.focus-col > .focus-lane-head:first-of-type { margin-top: 0.5rem; }
.focus-lane-count { background: #e6e8eb; color: var(--ink-soft); border-radius: 20px; padding: 0 0.5rem; font-size: 0.72rem; }
.focus-cards + .focus-lane-head { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.focus-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem;
  color: var(--ink);
  cursor: grab;
}
.focus-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); border-color: #c1c7d0; transform: translateY(-1px); transition: all .12s; }
.focus-card.dragging { opacity: 0.45; cursor: grabbing; }
.focus-card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; line-height: 1.3; }
.focus-card .desc {
  color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 0.6rem;
  white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.focus-card .foot { display: flex; gap: 0.6rem; align-items: center; font-size: 0.82rem; color: var(--ink-soft); }
.focus-add {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.75rem;
  margin-bottom: 1.25rem;
}
.focus-add input[type=text], .focus-add textarea { background: #fff; }
.focus-add .add-more { margin-top: 0.6rem; }
.focus-add .add-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.badge { display: inline-block; background: #eef0f3; border-radius: 20px; padding: 0.12rem 0.6rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }
.badge-lane { background: #d7efe9; color: #0b5e57; }

/* ---------- Modal (card detail) ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; z-index: 50;
  overflow: auto;
}
.modal {
  background: #fff; border-radius: 10px;
  width: 100%; max-width: 860px;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
/* Two-column body: content on the left, fields on the right. */
.modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; margin-bottom: 1rem; }
@media (max-width: 700px) { .modal-cols { grid-template-columns: 1fr; } }
.modal-col-main { display: flex; flex-direction: column; }
.modal-col-main .field-fill { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
.modal-col-main .field-fill textarea { flex: 1; min-height: 200px; }
.modal-col-side .field:last-child, .modal-col-side .assignee-picker { margin-bottom: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.modal-head h2 { margin: 0; font-size: 1.3rem; }
.modal-close { font-size: 1.5rem; line-height: 1; color: var(--ink-soft); cursor: pointer; background: none; border: none; text-decoration: none; }
.modal-meta { color: var(--ink-soft); font-size: 0.85rem; margin: 0.25rem 0 1rem; }

.comment { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: none; }
.comment-head { font-size: 0.8rem; color: var(--ink-soft); display: flex; justify-content: space-between; }
.comment-author { font-weight: 700; color: var(--ink); }
.comment-body { white-space: pre-wrap; margin: 0.2rem 0 0; }

.inline-form { display: flex; gap: 0.5rem; }
.subhead { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin: 1.25rem 0 0.5rem; }
.modal-head-actions { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.modal-move-row { display: flex; gap: 0.75rem; }
.modal-move-row .field { flex: 1; margin-bottom: 1rem; }
/* Confirmation banner when "Save and add another" reopens the form. */
.modal-added {
  background: #e8f7ee; border: 1px solid #b6e2c6; color: #1c6b3f;
  border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0.35rem 0 1rem; font-size: 0.88rem;
}
.modal-error {
  background: #fdecec; border: 1px solid #f3bcbc; color: #a12626;
  border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0.35rem 0 1rem; font-size: 0.88rem;
}

/* ---------- Full card page ---------- */
.card-page-wrap { max-width: 960px; margin: 0 auto; padding: 1.75rem 1.25rem; }
.card-page-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.25rem; }
.crumbs { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; font-size: 0.95rem; flex-wrap: wrap; }
.crumbs .crumb { color: var(--brand); font-weight: 600; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .crumb:hover { text-decoration: underline; }
.crumbs .crumb-sep { color: #b3bac5; }
.crumbs .crumb-lane { color: var(--ink-soft); font-weight: 500; }
.crumbs .crumb-current { color: var(--ink-soft); font-weight: 500; }
.crumbs .crumb-current:hover { text-decoration: none; }
.card-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 256px; gap: 1.75rem; align-items: start; }
@media (max-width: 780px) { .card-page-grid { grid-template-columns: 1fr; } }

.card-edit-form, .card-comments, .card-page-side .side-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 1.25rem;
}
.card-edit-form { margin-bottom: 1.5rem; }
.card-title-input {
  font-size: 1.5rem; font-weight: 700; line-height: 1.25;
  border: 1px solid transparent; padding: 0.35rem 0.5rem; margin-bottom: 0.85rem; border-radius: 8px;
}
.card-title-input:hover { border-color: var(--line); }
.card-edit-form textarea { margin-bottom: 0.85rem; }
.card-block-title { font-size: 1rem; margin: 0 0 1rem; }

.card-page-side .side-card { padding: 1rem 1.1rem; margin-bottom: 1rem; }
.side-card-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin: 0 0 0.7rem; }
.detail-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 0.75rem; font-size: 0.88rem; align-items: baseline; }
.detail-list dt { color: var(--ink-soft); }
.detail-list dd { margin: 0; text-align: right; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.detail-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 0.3rem; }
.move-form select { margin-bottom: 0.9rem; }
.move-form .btn-block { margin-top: 0.2rem; }

/* ---------- Team page ---------- */
.member-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.member-row:first-child { border-top: none; }
.member-row .role { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.copy-link { display: flex; gap: 0.5rem; align-items: center; }
.copy-link input { font-family: monospace; font-size: 0.8rem; }

/* ---------- Menu dropdown ---------- */
.workspace-switcher { position: relative; }
.menu {
  position: absolute; top: 100%; right: 0; margin-top: 0.35rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-lg); min-width: 200px; padding: 0.35rem; z-index: 40;
}
.menu-item { display: block; width: 100%; text-align: left; padding: 0.45rem 0.6rem; border-radius: 6px; font-size: 0.9rem; color: var(--ink); background: none; border: none; cursor: pointer; }
.menu-item:hover { background: #f1f2f4; text-decoration: none; }
.menu-item.is-current { font-weight: 700; color: var(--brand); }
.menu-sep { height: 1px; background: var(--line); margin: 0.35rem 0; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.inline { display: inline; }

/* ---------- Templates gallery ---------- */
.tpl-hero { max-width: 1120px; margin: 0 auto 1.5rem; padding: 1.5rem 1.25rem 0; }
.tpl-hero h1 { margin: 0 0 0.4rem; font-size: 1.9rem; }
.tpl-hero p { max-width: 40rem; }
.tpl-catnav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.tpl-catnav a { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 0.3rem 0.75rem; }
.tpl-catnav a:hover { color: var(--brand); text-decoration: none; border-color: #c7c9ff; }
.tpl-count { display: inline-block; background: #eef0f3; color: var(--ink-soft); border-radius: 20px; padding: 0 0.4rem; font-size: 0.72rem; margin-left: 0.15rem; }
.tpl-section { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 0; scroll-margin-top: 70px; }
.tpl-cat-title { font-size: 1.25rem; margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.tpl-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.tpl-card:hover { box-shadow: var(--shadow-lg); }
.tpl-card-body { padding: 1rem 1.1rem; flex: 1; }
.tpl-card-body h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.tpl-card-body h3 a { color: var(--ink); }
.tpl-card-body h3 a:hover { color: var(--brand); }
.tpl-desc { margin: 0 0 0.75rem; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }
.tpl-lists { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tpl-list-chip { font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); background: #f1f2f4; border-radius: 5px; padding: 0.1rem 0.45rem; }
.tpl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); background: #fbfbfc; }

/* Template preview (show page) */
.tpl-show-actions { display: flex; gap: 0.5rem; align-items: center; }
.tpl-preview-labels { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.tpl-preview { display: flex; gap: 0.85rem; overflow-x: auto; padding-bottom: 1rem; }
.tpl-col { flex: 0 0 260px; background: var(--column-bg); border-radius: 10px; padding: 0.6rem; }
.tpl-col-head { font-weight: 700; font-size: 0.9rem; padding: 0.15rem 0.35rem 0.6rem; display: flex; gap: 0.4rem; align-items: center; }
.tpl-mini-card { background: #fff; border: 1px solid transparent; border-radius: 7px; box-shadow: var(--shadow); padding: 0.5rem 0.6rem; margin-bottom: 0.5rem; }
.tpl-mini-card.is-colored { background: var(--card-tint); box-shadow: var(--shadow), inset 4px 0 0 var(--card-accent); }
.tpl-mini-title { display: block; font-size: 0.88rem; color: var(--ink); }
.tpl-mini-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.35rem; font-size: 0.72rem; }

/* ---------- Insights / charts ---------- */
.viz-root { --viz-ink: #172b4d; --viz-muted: #6b7280; --viz-grid: #e6e8eb; }
.viz-filter { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.viz-filter form { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.viz-filter .detail-label { margin: 0; }
.viz-filter select { width: auto; min-width: 180px; padding: 0.4rem 0.6rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-value.stat-danger { color: #c62828; }
.stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }

.viz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.viz-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 1.1rem 1.25rem; }
.viz-full { grid-column: 1 / -1; }
.viz-title { font-size: 0.95rem; margin: 0 0 0.9rem; }
.viz-svg { display: block; overflow: visible; }
.viz-cat { fill: #52514e; font-size: 12.5px; font-family: inherit; }
.viz-val { fill: #172b4d; font-size: 12px; font-weight: 700; font-family: inherit; }
.viz-axis { fill: #898781; font-size: 11px; font-family: inherit; }
.viz-grid-line { }
.viz-svg .viz-grid { stroke: #e6e8eb; stroke-width: 1; }
.viz-svg .viz-milestone { stroke: #8e4ec6; stroke-width: 1.5; stroke-dasharray: 3 3; }
.viz-milestone-label { fill: #8e4ec6; font-size: 11px; font-weight: 600; font-family: inherit; }
.viz-svg .viz-today { stroke: #e34948; stroke-width: 1.5; }
.viz-today-label { fill: #e34948; font-size: 11px; font-weight: 700; font-family: inherit; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem; }
.viz-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }
.viz-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.viz-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1100px;
  margin: 2.5rem auto 1.25rem;
  padding: 1.6rem 1.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: 0.85rem;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Link columns. The use-case column is wider and wraps into two of its own. */
.footer-cols {
  display: grid; gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.footer-col-wide { grid-column: span 2; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.footer-head {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink); margin: 0 0 0.2rem;
}
.footer-use-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem 1.25rem; }
.footer-coffee { color: var(--link) !important; font-weight: 600; }

/* Legal strip under the columns. */
.footer-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1.75rem; padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.footer-bar nav { display: flex; gap: 1rem; }
.footer-by a { color: var(--link); font-weight: 600; }

@media (max-width: 620px) {
  .footer-col-wide { grid-column: span 1; }
}

/* Label row with a right-aligned helper link (e.g. Forgot password?) */
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.field-link { font-size: 0.82rem; }

/* ---------- Legal pages ---------- */
.legal h2 { margin-top: 1.6rem; font-size: 1.05rem; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.2rem; }

/* ============================================================
   Personality layer — warm paper, display serif, chunky ink
   buttons, hard offset shadows, sticker tags. Comes last so it
   wins; the structural rules above are untouched.
   ============================================================ */

::selection { background: var(--pop); color: var(--ink); }

/* Faint dotted "paper" texture behind everything */
body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(36, 31, 23, 0.05) 1px, transparent 1.4px);
  background-size: 22px 22px;
}

/* Display serif for headings */
h1, h2, .hero h1, .page-head h1, .board-header h1, .board-tile h3, .feature h3 {
  font-family: var(--font-display);
}
h1 { font-weight: 900; letter-spacing: -0.02em; }
h2, .board-tile h3, .feature h3 { font-weight: 600; }

/* ---- Top bar + brand wordmark ---- */
.topbar { background: var(--surface); border-bottom: 2px solid var(--ink); }
.brand {
  font-family: var(--font-display); font-weight: 900; font-size: 1.35rem;
  letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 0.45rem;
}
.brand-mark {
  display: inline-block; color: var(--ink); background: var(--pop);
  border: 2px solid var(--ink); border-radius: 7px;
  padding: 0.02em 0.26em; line-height: 1;
  transform: rotate(-5deg); box-shadow: var(--hard-sm);
}

/* ---- Buttons: tactile + chunky ---- */
.btn { border-radius: 9px; font-weight: 700; transition: transform .08s ease, box-shadow .08s ease, background .12s ease; }
.btn-primary { background: var(--ink); color: #fff; border: 2px solid var(--ink); box-shadow: var(--hard-sm); }
.btn-primary:hover { background: #000; color: #fff; transform: translate(-1px, -1px); box-shadow: var(--hard); }
.btn-primary:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: #efe6d3; color: var(--ink); }
.btn-focus { background: var(--pop); color: var(--ink); border: 2px solid var(--ink); box-shadow: var(--hard-sm); }
.btn-focus:hover { background: var(--pop-deep); color: var(--ink); transform: translate(-1px, -1px); box-shadow: var(--hard); }
.btn-ship { background: #1f9d63; color: #fff; border: 2px solid var(--ink); box-shadow: var(--hard-sm); }
.btn-ship:hover { background: #17915b; color: #fff; }

/* ---- Panels / cards ---- */
.card-panel { border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--hard); }

/* ---- Inputs ---- */
.input, input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], input[type=datetime-local], textarea, select {
  border: 2px solid var(--line); border-radius: 9px; background: #fffdf8;
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px var(--pop);
}

/* ---- Flash: sticker banners ---- */
.flash { font-weight: 700; border-bottom: 2px solid var(--ink); }
.flash-notice { background: #d7f4c6; color: #1c4d15; }
.flash-alert { background: #ffdccf; color: #9a2b12; }

/* ---- Tags as tilted stickers ---- */
.tag { border: 1.5px solid var(--ink); border-radius: 6px; transform: rotate(-2deg); font-weight: 800; }
.tag-anon { background: var(--pop); color: var(--ink); }
.tag-team { background: #e6ddff; color: #3a2b8f; }

/* ---- Dashboard tiles ---- */
.board-tile { border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--hard); }
.board-tile:hover { box-shadow: 6px 6px 0 var(--ink); transform: translate(-2px, -2px); text-decoration: none; }

/* ---- Landing hero + features ---- */
.hero h1 { font-size: 2.6rem; }
.feature { border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--hard); }
.feature:nth-child(2n) { transform: rotate(0.7deg); }
.feature:nth-child(3n) { transform: rotate(-0.7deg); }

/* ---- Board chrome ---- */
.board-header { border-bottom: 3px solid var(--ink); }

/* ---- Footer + empty states ---- */
.site-footer { border-top: 2px solid var(--ink); }
.empty { border: 2px dashed var(--ink); border-radius: 14px; background: #fffdf8; color: var(--ink-soft); }

/* ---------- Admin ---------- */
.admin-page { max-width: 1080px; margin: 0 auto; padding: 2rem 1.25rem; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
@media (max-width: 780px) { .admin-cols { grid-template-columns: 1fr; } }
.admin-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 0.9rem; background: var(--surface);
  border: 2px solid var(--ink); border-radius: 11px;
  text-decoration: none; color: inherit;
}
a.admin-row:hover { text-decoration: none; box-shadow: var(--hard-sm); transform: translate(-1px, -1px); }
.admin-row .tag { margin-left: 0.4rem; vertical-align: middle; }
.admin-page .section-title { margin-top: 1.6rem; }

/* Admin stat tiles — compact, chunky, readable (scoped so Insights is untouched) */
.admin-page .stat-tiles { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.4rem; }
.admin-page .stat-tile {
  flex: 1 1 150px; max-width: 210px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--hard-sm);
  padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.admin-page .stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 900; line-height: 1;
  color: var(--ink); letter-spacing: -0.01em;
}
.admin-page .stat-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-soft);
}
.admin-page .stat-tile.stat-accent { background: #fff6d6; }

/* Admin — visual hierarchy: hero totals, secondary chips, proportion bars */
.admin-hero-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.admin-hero { background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--hard); padding: 1.05rem 1.2rem; }
.admin-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.admin-hero-num { font-family: var(--font-display); font-size: 2.9rem; font-weight: 900; line-height: 1; color: var(--ink); }
.admin-hero-label { display: block; margin-top: 0.4rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.admin-delta { font-size: 0.7rem; font-weight: 700; color: #1f7a4d; background: #dcf5e3; border: 1.5px solid #a9e2ba; border-radius: 999px; padding: 0.12rem 0.5rem; white-space: nowrap; }

.admin-mini-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.admin-mini { display: inline-flex; align-items: baseline; gap: 0.4rem; padding: 0.45rem 0.8rem; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); }
.admin-mini-num { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.admin-mini-label { font-size: 0.76rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }

.admin-breakdowns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 2rem; }
@media (max-width: 780px) { .admin-breakdowns { grid-template-columns: 1fr; } }
.admin-panel { background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--hard); padding: 1.05rem 1.2rem; }
.admin-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.85rem; }
.admin-panel-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; }
.seg-bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; border: 2px solid var(--ink); background: var(--column-bg); }
.seg { height: 100%; }
.seg + .seg { border-left: 2px solid var(--ink); }
.seg-legend { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.8rem; font-size: 0.82rem; color: var(--ink-soft); }
.seg-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.seg-legend i { width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--ink); display: inline-block; }
.seg-legend b { color: var(--ink); font-weight: 800; }

/* ---------- Landing + demo board ---------- */
.landing { max-width: 1140px; margin: 0 auto; padding: 2.25rem 1.25rem 3rem; }
.demo-board-section { margin: 2.25rem 0 2.5rem; }
.demo-board-frame {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--hard);
  padding: 1.5rem 1.5rem 0.6rem;
  text-align: left;
}
.demo-board-head { margin-bottom: 1rem; }
.demo-board-head h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 900; margin: 0.45rem 0 0.25rem; letter-spacing: -0.01em; }
.demo-board-head p { margin: 0; max-width: 42rem; }
.demo-board-frame .tpl-col { flex-basis: 245px; }

/* Landing template CTA */
.landing-cta { text-align: center; max-width: 42rem; margin: 3rem auto 2.75rem; }
.landing-cta h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 900; letter-spacing: -0.01em; margin: 0 0 0.65rem; }
.landing-cta p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; margin: 0 auto 1.6rem; max-width: 38rem; }
.btn-lg { font-size: 1.05rem; padding: 0.72rem 1.5rem; border-radius: 12px; }

/* Yellow "pop" button variant */
.btn-pop { background: var(--pop); color: var(--ink); border: 2px solid var(--ink); box-shadow: var(--hard-sm); font-weight: 700; }
.btn-pop:hover { background: var(--pop-deep); color: var(--ink); transform: translate(-1px, -1px); box-shadow: var(--hard); }
.btn-pop:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }

/* ---------- Use-case landing pages ---------- */
/* Reuses the landing hero, feature grid, and template gallery; these rules
   only add the sections that are unique to them. */
.use-case .hero { padding-top: 1.5rem; }
.use-case .hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.hero-note { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.9rem; }
.hero-note a { font-weight: 600; margin-left: 0.35rem; }

.use-case > section { margin-bottom: 3rem; }
.use-case h2 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 900;
  letter-spacing: -0.01em; margin: 0 0 1.1rem;
}
/* The gallery section carries its own page-level width — cancel it in here. */
.use-case .tpl-section { max-width: none; padding: 0; }
.use-case .tpl-cat-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; border-bottom: none; padding-bottom: 0; margin-bottom: 0.35rem; }
.uc-section-lead { margin: 0 0 1.25rem; }
.uc-benefits .features { margin-top: 0; }
.uc-faq { max-width: 46rem; }
.uc-faq .faq-item h3 { font-size: 1.05rem; }
.uc-related-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.uc-related-links a {
  font-size: 0.88rem; font-weight: 600; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 0.35rem 0.85rem;
}
.uc-related-links a:hover { color: var(--brand); border-color: var(--ink); text-decoration: none; }
.footer-use-cases { flex-wrap: wrap; gap: 0.65rem !important; }
.footer-use-cases a { font-size: 0.8rem; }

/* ---------- FAQ ---------- */
.faq h1 { margin-bottom: 1.5rem; }
.faq-lead { background: #fff6d6; border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--hard); padding: 1.5rem 1.6rem; margin-bottom: 2.25rem; }
.faq-lead h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; margin: 0 0 0.7rem; }
.faq-lead p { margin: 0 0 0.8rem; line-height: 1.65; }
.faq-lead p:last-child { margin-bottom: 0; }
.faq-lead-links { font-size: 0.9rem; color: var(--ink-soft); }
.faq-section { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; margin: 2.5rem 0 1.1rem; padding-bottom: 0.45rem; border-bottom: 2px solid var(--line); }
.faq-item { margin-bottom: 1.6rem; }
.faq-item h3 { font-size: 1.08rem; font-weight: 700; margin: 0 0 0.4rem; }
.faq-item p { margin: 0 0 0.65rem; line-height: 1.65; }
.faq-item p:last-child { margin-bottom: 0; }
.faq-item code { background: var(--column-bg); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; font-size: 0.9em; }

/* Admin server-health cards */
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.health-card { background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--hard-sm); padding: 0.9rem 1.05rem; }
.health-head { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.health-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem; padding: 0.2rem 0; color: var(--ink-soft); }
.health-row b { color: var(--ink); font-weight: 700; text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-block; flex: 0 0 auto; }
.dot-ok { background: #30a46c; }
.dot-bad { background: #e5484d; }

/* Server-health charts */
.viz-panel { margin-bottom: 1.75rem; }
.viz-panel-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.viz-panel-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; }
.viz-panel-head b { color: var(--ink); }
.viz-svg { width: 100%; height: auto; display: block; }
.viz-grid { stroke: var(--line); stroke-width: 1; }
.viz-tick { fill: var(--ink-soft); font-size: 10px; font-family: var(--font-ui); }
.viz-area { fill: rgba(59, 111, 212, 0.13); stroke: none; }
.viz-line { fill: none; stroke: #3b6fd4; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-peak { fill: #3b6fd4; stroke: #fff; stroke-width: 1.5; }
.viz-peak-label { fill: #2b57ad; font-size: 11px; font-weight: 700; font-family: var(--font-ui); }

.health-card-split { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.health-card-split > div { flex: 1; min-width: 0; }
.gauge { width: 92px; height: 92px; flex: 0 0 auto; }
.gauge-track { fill: none; stroke: var(--line); stroke-width: 9; }
.gauge-fill { fill: none; stroke: #3b6fd4; stroke-width: 9; stroke-linecap: round; }
.gauge-num { fill: var(--ink); font-size: 16px; font-weight: 800; font-family: var(--font-display); }
.gauge-label { fill: var(--ink-soft); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; }

/* RAM / big-number health stat card */
.health-stat { display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; }
.health-stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.health-stat-value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; line-height: 1; color: var(--ink); }
.health-stat-sub { color: #2f9e57; font-weight: 700; font-size: 0.95rem; }
.health-stat-sub.muted { color: var(--ink-soft); font-weight: 600; }
.health-stat-note { color: var(--ink-soft); font-size: 0.8rem; }

/* ---------- Admin browse tables (/admin/users, /admin/boards) ---------- */
.page-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.admin-search { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1.1rem; flex-wrap: wrap; }
.admin-search .input { flex: 1 1 260px; max-width: 420px; }

/* Wrapped so a wide table scrolls on its own instead of the page. */
.admin-table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--hard-sm); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 0.6rem 0.9rem; text-align: left; vertical-align: top; }
.admin-table thead th {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-soft); border-bottom: 2px solid var(--ink); white-space: nowrap;
}
.admin-table tbody tr + tr td { border-top: 1.5px solid var(--line); }
.admin-table tbody tr:hover { background: #fffdf2; }
.admin-table .num { text-align: right; }
.admin-table .nowrap { white-space: nowrap; }
.admin-table-sub { display: block; font-size: 0.75rem; font-weight: 400; text-align: right; }

.admin-pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; font-size: 0.85rem; }
.admin-pager-links { display: flex; gap: 0.4rem; }

/* ---------- CSV import explainer ---------- */
/* Column reference table on the public /import-csv-to-kanban-board page. */
.csv-cols { overflow-x: auto; border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--hard-sm); background: var(--surface); }
.csv-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.csv-table th, .csv-table td { padding: 0.6rem 0.9rem; text-align: left; vertical-align: top; }
.csv-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
.csv-table tbody tr + tr td { border-top: 1px solid var(--line); }
.csv-table td:first-child { white-space: nowrap; }
.csv-table code { background: var(--column-bg); border-radius: 4px; padding: 0.1rem 0.35rem; font-size: 0.85rem; }
