/* StickTask: one stylesheet. Tokens first, then base, components, public pages, app screens. */

@font-face { font-family: "Nunito"; src: url("fonts/nunito-var.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("fonts/patrick-hand.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #fbf5e9;
  --card: #fffdf7;
  --sunk: #f3ead8;
  --ink: #211c18;
  --muted: #655c54;
  --line: #211c18;
  --hair: #dccfb8;
  --brand: #f0603a;
  --brand-deep: #c53f1c;
  --on-brand: #211c18;
  --high: #f0603a;
  --medium: #f5b21a;
  --low: #23b5a6;
  --doing: #7b5bd6;
  --ok: #2c9a5b;
  --late-bg: #fde6de;
  --focus: #2456d6;
  --sc: #211c18;
  --shadow: 3px 3px 0 var(--sc);
  --shadow-lg: 6px 6px 0 var(--sc);
  --r: 14px;
  --r-sm: 10px;
  --font: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17151b; --card: #221f28; --sunk: #1d1a22; --ink: #f6efe2; --muted: #b0a69a; --line: #f6efe2; --hair: #3b3644;
    --brand: #ff7a52; --brand-deep: #ff9d7e; --on-brand: #17151b; --high: #ff7a52; --medium: #f7c043; --low: #3fd0c0;
    --doing: #a48bf0; --ok: #57c988; --late-bg: #3a2320; --focus: #8fb0ff;
    --sc: #000; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #17151b; --card: #221f28; --sunk: #1d1a22; --ink: #f6efe2; --muted: #b0a69a; --line: #f6efe2; --hair: #3b3644;
  --brand: #ff7a52; --brand-deep: #ff9d7e; --on-brand: #17151b; --high: #ff7a52; --medium: #f7c043; --low: #3fd0c0;
  --doing: #a48bf0; --ok: #57c988; --late-bg: #3a2320; --focus: #8fb0ff;
  --sc: #000; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.55 var(--font); min-height: 100vh; min-height: 100dvh; }
h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.2rem); }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .88rem; }
.icon { flex: none; vertical-align: -4px; }
code { font: 600 .9em ui-monospace, monospace; background: var(--sunk); padding: 1px 6px; border-radius: 6px; }

/* ---- pieces ---- */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 2px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .08s, box-shadow .08s; white-space: nowrap; }
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--sc); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sc); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { color: var(--on-brand); }
.btn-ghost { box-shadow: none; border-color: transparent; background: none; }
.btn-ghost:hover { box-shadow: none; transform: none; text-decoration: underline; }
.btn-lg { min-height: 52px; padding: 10px 24px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; color: var(--ink); position: relative; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.has-dot::after { content: ""; position: absolute; top: 8px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--paper); }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .when-dark { display: inline; } :root:not([data-theme="light"]) .when-light { display: none; } }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--medium);
  color: #211c18; font-size: .72rem; font-weight: 900; text-decoration: none; flex: none; }
.avatar.a2 { background: var(--low); } .avatar.a3 { background: #c9b6ff; }
.avatar + .avatar { margin-left: -9px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--sunk); border: 1.5px solid var(--hair); font-size: .78rem; font-weight: 800; color: var(--muted); }
.chip { font-size: .78rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; border: 1.500px solid var(--hair); background: var(--sunk); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line); background: var(--medium); flex: none; }
.p-high .dot, .dot.p-high { background: var(--high); } .p-medium .dot, .dot.p-medium { background: var(--medium); } .p-low .dot, .dot.p-low { background: var(--low); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px; border: 2px solid var(--line); border-radius: 999px; font-weight: 800; font-size: .85rem; }
.pill.s-doing { background: var(--doing); color: #fff; }
:root[data-theme="dark"] .pill.s-doing { color: #17151b; }
.hand-note { font-family: var(--hand); font-size: 1.25rem; line-height: 1.2; color: var(--muted); margin: 0; }
.eyebrow { font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--brand-deep); margin-bottom: 10px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label-row label { font-weight: 800; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], textarea, select {
  width: 100%; min-height: 44px; padding: 9px 13px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
textarea { resize: vertical; }
::placeholder { color: var(--muted); opacity: 1; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--line); border-radius: 7px; background: var(--card); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--ok); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -1px); }
.form .check { margin-bottom: 18px; }

/* ---- brand + Twiggy ---- */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.25rem; text-decoration: none; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.logo-ball { stroke: currentColor; stroke-width: 1.6; }
.logo-ball.b1 { fill: var(--high); } .logo-ball.b2 { fill: var(--medium); } .logo-ball.b3 { fill: var(--low); }

.twiggy { display: block; width: 100%; height: auto; overflow: visible; }
.tw-body { stroke: var(--ink); stroke-width: 6; }
.tw-head { fill: var(--card); }
.tw-face { stroke-width: 4.500; }
.tw-floor { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; opacity: .55; }
.tw-shadow { fill: var(--ink); opacity: .09; }
.tw-ball circle { fill: var(--medium); stroke: var(--ink); stroke-width: 3; }
.tw-ball.p-high circle { fill: var(--high); } .tw-ball.p-low circle { fill: var(--low); }
.tw-ball text { font: 900 15px var(--font); fill: #211c18; pointer-events: none; }
.tw-ball { cursor: default; }
a.tw-ball { cursor: pointer; }
a.tw-ball:hover circle, a.tw-ball:focus-visible circle, .tw-ball.is-hot circle { stroke-width: 5; }
a.tw-ball:focus-visible { outline: none; }
.tw-balls .tw-ball {
  offset-path: path("M240 205 C232 -20 138 10 128 205 Q142 238 160 208 C168 -20 262 10 272 205 Q258 238 240 205 Z");
  offset-rotate: 0deg; offset-distance: 0%;
  animation: tw-fly var(--tw-dur, 3.200s) linear infinite; animation-delay: var(--tw-delay, 0s);
}
/* every other ball flies a taller, wider loop so they do not pile up at the top */
.tw-balls .tw-ball:nth-child(even) { offset-path: path("M236 205 C222 -62 120 -28 122 205 Q140 240 164 208 C178 -62 280 -28 278 205 Q260 240 236 205 Z"); }
.tw-balls .tw-ball:nth-child(2) { --tw-delay: -.64s; } .tw-balls .tw-ball:nth-child(3) { --tw-delay: -1.28s; }
.tw-balls .tw-ball:nth-child(4) { --tw-delay: -1.92s; } .tw-balls .tw-ball:nth-child(5) { --tw-delay: -2.56s; }
@keyframes tw-fly {
  0%   { offset-distance: 0%;    animation-timing-function: cubic-bezier(.18, .62, .82, .38); }
  44%  { offset-distance: 46.5%; animation-timing-function: linear; }
  50%  { offset-distance: 50%;   animation-timing-function: cubic-bezier(.18, .62, .82, .38); }
  94%  { offset-distance: 96.5%; animation-timing-function: linear; }
  100% { offset-distance: 100%; }
}
.tw-arm-l, .tw-arm-r { transform-box: fill-box; animation: tw-arm 0.800s ease-in-out infinite alternate; }
.tw-arm-l { transform-origin: 100% 0; } .tw-arm-r { transform-origin: 0 0; animation-delay: -.4s; }
@keyframes tw-arm { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
.tw-head, .tw-face { animation: tw-nod 1.600s ease-in-out infinite alternate; }
@keyframes tw-nod { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.twiggy.is-paused .tw-ball, .twiggy.is-paused .tw-arm, .twiggy.is-paused .tw-head, .twiggy.is-paused .tw-face { animation-play-state: paused; }
.twiggy:has(a.tw-ball:hover) .tw-balls .tw-ball, .twiggy:has(a.tw-ball:focus-visible) .tw-balls .tw-ball { animation-play-state: paused; }

.twiggy.is-hover-paused .tw-balls .tw-ball { animation-play-state: paused; }
.tw-ball.is-dropped circle { stroke-dasharray: 5 4; }
@media (prefers-reduced-motion: reduce) {
  .tw-balls .tw-ball, .tw-arm-l, .tw-arm-r, .tw-head, .tw-face { animation: none; }
  .tw-balls .tw-ball { offset-distance: calc(var(--tw-still, 12) * 1%); }
  .btn { transition: none; }
}

/* ---- public pages ---- */
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1160px; margin: 0 auto; padding: 16px 20px; }
.pub-nav { display: flex; align-items: center; gap: 6px; }
.pub-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1160px; margin: 40px auto 0; padding: 22px 20px 30px; border-top: 2px dashed var(--hair); color: var(--muted); font-size: .92rem; }
.pub-foot nav { display: flex; gap: 18px; }
.layout-public main { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 34px 0 54px; }
.hero h1 { font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4.3rem); line-height: 1.02; letter-spacing: -.03em; }
.scribble { background: linear-gradient(transparent 62%, var(--medium) 62%, var(--medium) 92%, transparent 92%); padding: 0 .08em; white-space: nowrap; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 34em; margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.hero-art { position: relative; max-width: 440px; justify-self: center; width: 100%; }
.hero-art .hand-note { position: absolute; right: -6px; bottom: 58px; transform: rotate(-4deg); max-width: 9em; text-align: center; }

.features { padding: 30px 0; }
.features > h2, .closer h2, .band h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin-bottom: 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-grid h3 { font-size: 1.2rem; margin: 14px 0 6px; }
.feature-grid p { color: var(--muted); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--line); border-radius: 50%; background: var(--medium); color: #211c18; }
.feature-icon.p-high { background: var(--high); } .feature-icon.p-low { background: var(--low); }
.band { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; margin: 40px 0; padding: 34px; background: var(--sunk); border: 2px solid var(--line); border-radius: 22px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 1.08rem; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { color: var(--ok); margin-top: 3px; stroke-width: 3; }
.mini-board { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.mini-board li { display: grid; grid-template-columns: 22px 30px 1fr auto; gap: 10px; align-items: center; font-weight: 800; }
.mini-board .rank { color: var(--muted); } .mini-board .pts { font-variant-numeric: tabular-nums; }
.closer { text-align: center; padding: 40px 0 20px; }

.auth { display: grid; place-items: start center; padding: 40px 0 60px; }
.auth-card { width: 100%; max-width: 440px; padding: 30px; box-shadow: var(--shadow-lg); }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .form { margin-top: 22px; }
.auth-alt { text-align: center; margin: 18px 0 0; }

.oops { display: grid; grid-template-columns: .8fr 1.200fr; gap: 30px; align-items: center; padding: 30px 0 50px; }
.oops-art { max-width: 360px; justify-self: center; width: 100%; }
.oops h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); }
.trace { overflow: auto; max-height: 300px; background: var(--sunk); border: 2px solid var(--hair); border-radius: var(--r-sm); padding: 12px; font-size: .8rem; }

/* ---- app shell ---- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; min-height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; border-right: 2px solid var(--line); background: var(--sunk); position: sticky; top: 0; height: 100vh; height: 100dvh; }
.side .brand { padding: 0 8px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid transparent; border-radius: 12px; text-decoration: none; font-weight: 800; color: var(--ink); }
.side-nav a:hover { background: var(--card); color: var(--ink); }
.side-nav a[aria-current] { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
.side-streak { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px; border: 2px dashed var(--line); border-radius: 12px; }
.side-streak .icon { color: var(--brand-deep); width: 26px; height: 26px; }
.side-streak strong, .side-streak span { display: block; line-height: 1.25; } .side-streak span { font-size: .82rem; color: var(--muted); }
.shell-main { min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 28px; }
.top-search { position: relative; flex: 1; max-width: 460px; }
.top-search .icon { position: absolute; left: 13px; top: 12px; color: var(--muted); }
.top-search input { padding-left: 42px; border-radius: 999px; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.top-actions .avatar { width: 38px; height: 38px; font-size: .82rem; margin-left: 6px; }
.layout-app main { padding: 8px 28px 60px; max-width: 1280px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.crumb { font-size: .9rem; color: var(--muted); margin: 0 0 4px; font-weight: 700; }
.page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted); font-size: .9rem; font-weight: 700; }
progress { appearance: none; width: 170px; height: 12px; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
progress::-webkit-progress-bar { background: var(--card); } progress::-webkit-progress-value { background: var(--ok); } progress::-moz-progress-bar { background: var(--ok); }
.tabs { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; background: var(--card); padding: 3px; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font-weight: 800; text-decoration: none; color: var(--ink); min-height: 34px; }
.tabs a[aria-current] { background: var(--ink); color: var(--paper); }

/* tasks */
.task { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); }
.task-title { font-weight: 800; text-decoration: none; color: var(--ink); line-height: 1.3; display: block; }
.task-title:hover { text-decoration: underline; color: var(--ink); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.task-meta .icon { width: 15px; height: 15px; margin-right: 3px; vertical-align: -2px; }
.task.is-late .due { color: var(--brand-deep); }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-who { display: flex; }

.task-card { padding: 12px 40px 12px 14px; box-shadow: var(--shadow); border-left-width: 9px; cursor: grab; touch-action: none; user-select: none; }
.task-card.p-high { border-left-color: var(--high); } .task-card.p-medium { border-left-color: var(--medium); } .task-card.p-low { border-left-color: var(--low); }
.task-card .dot { display: none; }
.task-card .task-who { margin-top: 10px; }
.task-card.is-late { background: var(--late-bg); }
.task-card.is-dragging { opacity: .35; }
.task-card.is-held { outline: 3px solid var(--focus); outline-offset: 2px; transform: rotate(-1.500deg); }
.drag-ghost { position: fixed; z-index: 60; pointer-events: none; transform: rotate(2.500deg); box-shadow: var(--shadow-lg); cursor: grabbing; margin: 0; }
.move { position: absolute; top: 6px; right: 6px; }
.move summary { list-style: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.move summary::-webkit-details-marker { display: none; }
.move summary:hover { background: var(--sunk); color: var(--ink); }
.menu { position: absolute; right: 0; top: 36px; z-index: 5; display: grid; min-width: 130px; padding: 6px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.menu button { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-weight: 800; cursor: pointer; }
.menu button:hover { background: var(--sunk); }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.col { background: var(--sunk); border: 2px solid var(--line); border-radius: 18px; padding: 12px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.col-head h2 { display: flex; align-items: center; gap: 8px; }
.col-head h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.col-doing .col-head h2::before { background: var(--doing); } .col-done .col-head h2::before { background: var(--ok); }
.col-body { display: grid; gap: 12px; min-height: 70px; align-content: start; border-radius: 12px; padding-bottom: 4px; }
.col.is-over .col-body { outline: 3px dashed var(--focus); outline-offset: 4px; }
.drop-mark { height: 4px; border-radius: 4px; background: var(--focus); margin: -4px 0; }
.add-row { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border: 2px dashed var(--line); border-radius: 12px; background: none; font-weight: 800; color: var(--muted); cursor: pointer; }
.add-row:hover { color: var(--ink); background: var(--card); }

.my-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.group { margin-bottom: 26px; }
.group > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.group-late > h2 { color: var(--brand-deep); }
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; margin-bottom: 8px; }
.task-row .task-meta { margin-top: 4px; }
.group-late .task-row { background: var(--late-bg); }
.tick { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--line); border-radius: 50%; background: var(--card); color: transparent; cursor: pointer; }
.tick:hover { color: var(--ok); } .tick[aria-pressed=true] { background: var(--ok); color: #fff; }
.my-side { display: grid; gap: 18px; position: sticky; top: 16px; }
.juggle-mini .twiggy { margin: -6px 0 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; padding: 16px 10px; }
.stats strong { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1.1; } .stats span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.stats .icon { color: var(--brand-deep); }

.juggle-page { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 26px; align-items: start; }
.juggle-stage { padding: 10px 20px 18px; }
.juggle-stage .twiggy { max-width: 520px; margin: 0 auto; }
.juggle-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: .9rem; }
.legend .dot { margin-left: 8px; }
.ball-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ball-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; }
.ball-list li.is-hot { box-shadow: var(--shadow); transform: translate(-1px, -1px); }
.ball-list a { font-weight: 800; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ball-list a:hover { text-decoration: underline; }
.ball-list .due { color: var(--muted); font-size: .86rem; font-weight: 700; }
.group-late .ball-list li { background: var(--late-bg); } .group-late .due { color: var(--brand-deep); }
.ball-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--medium); color: #211c18; font-weight: 900; font-size: .82rem; }
.p-high > .ball-n { background: var(--high); } .p-low > .ball-n { background: var(--low); }
.group-late .hand-note { margin-top: 12px; }

.task-page { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.task-body { display: grid; gap: 18px; }
.task-body .card p:last-child { margin-bottom: 0; }
.checklist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.inline-add { display: flex; gap: 10px; } .inline-add input { flex: 1; }
.files { list-style: none; margin: 0 0 14px; padding: 0; } .files li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; } .files a { font-weight: 800; }
.thread { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.thread li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.bubble { background: var(--sunk); border: 2px solid var(--hair); border-radius: 4px 14px 14px 14px; padding: 10px 14px; }
.bubble p { margin: 0; } .bubble .by { margin-bottom: 2px; font-size: .92rem; }
.comment-form { display: grid; gap: 10px; justify-items: end; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; margin: 0 0 22px; align-items: center; }
.facts dt { color: var(--muted); font-weight: 700; font-size: .9rem; } .facts dd { margin: 0; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; border-left: 2px dashed var(--hair); padding-left: 14px; }
.history .muted { display: block; font-size: .82rem; }
.pts-hint { font-size: .8rem; padding: 0 7px; border-radius: 999px; background: var(--on-brand); color: var(--brand); }
.task-side { position: sticky; top: 16px; }

/* ---- small screens ---- */
@media (max-width: 900px) {
  .hero, .band, .oops, .my-grid, .juggle-page, .task-page { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 10px; gap: 8px; } .hero-art { max-width: 320px; order: -1; } .hero-art .hand-note { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .band { padding: 22px; }
  .oops-art { max-width: 240px; }
  .my-side, .task-side { position: static; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: auto 0 0 0; height: auto; z-index: 30; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 2px solid var(--line); }
  .side .brand, .side-streak { display: none; }
  .side-nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .side-nav a { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .68rem; text-align: center; }
  .side-nav a[aria-current] { box-shadow: none; }
  .top { padding: 12px 16px; } .layout-app main { padding: 4px 16px 110px; }
  .board { grid-template-columns: repeat(3, minmax(270px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 14px; }
  .col { scroll-snap-align: center; }
  .page-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .pub-nav .btn-ghost { display: none; }
  .pub-top { padding: 12px 16px; } .layout-public main { padding: 0 16px; }
  .btn-lg { width: 100%; }
  .auth-card { padding: 22px; }
  .tabs a { padding: 6px 11px; }
  .task-row { grid-template-columns: auto minmax(0, 1fr); } .task-row .task-who { display: none; }
}

/* ---- forms, notices, account screens ---- */
.notice { padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r-sm); font-weight: 700; margin: 14px 0; }
.notice-ok { background: color-mix(in srgb, var(--ok) 22%, var(--card)); }
.notice-error { background: var(--late-bg); }
.field-error { color: var(--brand-deep); font-weight: 800; font-size: .92rem; margin: 0; }
[aria-invalid="true"] { border-color: var(--brand-deep) !important; box-shadow: 0 0 0 2px var(--late-bg); }
.hint { color: var(--muted); font-size: .88rem; margin: 0; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-small { font-size: .92rem; margin-top: 4px; }
.check-small input { width: 18px; height: 18px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-inline { margin: 0 0 6px; }
.auth-wide { max-width: 520px; }
.auth-msg { display: grid; gap: 12px; justify-items: start; }
.auth-msg p { margin: 0; }
select { appearance: auto; }
.acct { position: relative; margin-left: 6px; }
.acct summary { list-style: none; cursor: pointer; width: 38px; height: 38px; font-size: .82rem; }
.acct summary::-webkit-details-marker { display: none; }
.acct .menu { top: 46px; min-width: 170px; }
.acct .menu a, .acct .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; font-weight: 800; text-decoration: none; color: var(--ink); cursor: pointer; text-align: left; }
.acct .menu a:hover, .acct .menu button:hover { background: var(--sunk); }
.welcome { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 30px; align-items: center; max-width: 980px; }
.welcome h1 { margin-bottom: 20px; }
.welcome-art { max-width: 360px; justify-self: center; width: 100%; }
.empty { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; max-width: 760px; }
.empty h2 { font-size: 1.4rem; margin-bottom: 8px; }
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; max-width: 980px; }
@media (max-width: 900px) { .welcome, .settings, .empty { grid-template-columns: minmax(0, 1fr); } .welcome-art { display: none; } .empty-art { max-width: 200px; } }
@media (max-width: 520px) { .field-pair { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* ---- projects, lists, task page (real data) ---- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; align-items: start; }
.proj-card { display: grid; gap: 8px; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .08s; }
.proj-card:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sc); }
.proj-card h2 { font-size: 1.15rem; } .proj-card p { margin: 0; font-size: .92rem; }
.proj-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .85rem; font-weight: 800; color: var(--muted); margin-top: 4px; }
.proj-foot progress { width: 90px; } .proj-foot .late { color: var(--brand-deep); }
.proj-new summary { display: flex; align-items: center; gap: 8px; font-weight: 900; cursor: pointer; list-style: none; }
.proj-new summary::-webkit-details-marker { display: none; }
.proj-new[open] summary { margin-bottom: 14px; }
.proj-desc { margin: 4px 0 0; max-width: 60ch; }
.proj-edit { position: relative; } .proj-edit summary { list-style: none; } .proj-edit summary::-webkit-details-marker { display: none; }
.menu-wide { width: min(380px, 86vw); padding: 16px; top: 50px; gap: 14px; }
.proj-status { border-top: 2px dashed var(--hair); padding-top: 12px; display: grid; gap: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 10px; align-items: center; margin-bottom: 16px; padding: 12px; background: var(--sunk); border: 2px solid var(--line); border-radius: var(--r); }
.quick-add select, .filters select { width: auto; } .quick-add input[type=date] { width: auto; }
.quick-add .check { margin: 0; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.filters select { min-height: 38px; padding: 5px 10px; border-radius: 999px; font-weight: 700; }
.filters .btn { min-height: 38px; padding: 4px 14px; box-shadow: none; }
.tick-form { display: contents; }
.chip-doing { background: var(--doing); color: #fff; border-color: var(--line); } :root[data-theme="dark"] .chip-doing { color: #17151b; }
a.chip { text-decoration: none; color: var(--ink); } a.chip:hover { text-decoration: underline; }
.done-group summary { cursor: pointer; list-style: none; display: inline-block; margin-bottom: 10px; } .done-group summary h2 { display: flex; gap: 8px; align-items: center; }
.done-group summary::-webkit-details-marker { display: none; } .done-group summary h2::before { content: "▸"; } .done-group[open] summary h2::before { content: "▾"; }
.col-add input { margin-top: 12px; border-style: dashed; background: transparent; font-weight: 700; }
.col-add input:focus { background: var(--card); border-style: solid; }
.is-done-title { text-decoration: line-through; color: var(--muted); }
.task-edit textarea { min-height: 110px; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.checklist form { display: contents; }
.box { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 2px solid var(--line); border-radius: 7px; background: var(--card); color: transparent; cursor: pointer; }
.box .icon { width: 16px; height: 16px; stroke-width: 3.2; }
.is-checked .box { background: var(--ok); color: #fff; } .is-checked .step { color: var(--muted); text-decoration: line-through; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: .82rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--brand-deep); }
form.inline { display: inline; margin-left: 8px; }
.bubble p { overflow-wrap: anywhere; }
.status-form { display: flex; flex-wrap: wrap; gap: 6px; }
.status-form .pill { background: var(--card); cursor: pointer; color: var(--ink); }
.status-form .pill.is-on.s-todo { background: var(--ink); color: var(--paper); }
.status-form .pill.is-on.s-doing { background: var(--doing); color: #fff; } :root[data-theme="dark"] .status-form .pill.is-on.s-doing { color: #17151b; }
.status-form .pill.is-on.s-done { background: var(--ok); color: #fff; }
.is-late-text { color: var(--brand-deep); }
.assign { display: grid; gap: 8px; margin-bottom: 22px; justify-items: start; }
.assign .check span { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; color: var(--ink) !important; }
.assign .avatar { width: 24px; height: 24px; font-size: .62rem; }
.danger { margin-top: 20px; border-top: 2px dashed var(--hair); padding-top: 12px; font-size: .9rem; } .danger summary { cursor: pointer; color: var(--muted); font-weight: 700; } .danger form { margin-top: 10px; }
@media (max-width: 900px) { .quick-add { grid-template-columns: minmax(0, 1fr) auto; } .quick-add input[type=text] { grid-column: 1 / -1; } }

.bubble .by { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 2px; font-size: .92rem; }
.bubble .by form { margin-left: auto; }

/* ---- home page ---- */
.layout-public main:has(.hm-hero) { max-width: none; padding: 0; }
.hm-hero, .hm-strip ul, .hm-views, .hm-split, .hm-steps, .hm-faq, .hm-cta { max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.hm-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding-block: 26px 64px; }
.hm-hero h1 { font-size: clamp(2.6rem, 1.2rem + 5.4vw, 5rem); line-height: .98; letter-spacing: -.035em; margin-top: 18px; }
.hm-hero .lede { font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); max-width: 30em; }
.hm-badge { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 5px 14px 5px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 800; font-size: .9rem; box-shadow: 2px 2px 0 var(--sc); }
.hm-badge-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--line); }
.hm-stage { padding: 14px 18px 18px; box-shadow: var(--shadow-lg); border-radius: 22px; transform: rotate(.6deg); }
.hm-stage-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hm-points { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--medium); color: #211c18; font-weight: 800; font-size: .9rem; }
.hm-points .icon { width: 16px; height: 16px; }
.hm-points.is-bump { animation: hm-bump .45s ease-out; }
@keyframes hm-bump { 0% { transform: scale(1); } 35% { transform: scale(1.22) rotate(-4deg); } 100% { transform: scale(1); } }
.hm-stage .twiggy { max-width: 330px; margin: -8px auto -6px; }
.twiggy.is-idle .tw-arm-l, .twiggy.is-idle .tw-arm-r { animation-duration: 2.400s; }
.hm-demo-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.hm-demo-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 8px 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); transition: opacity .25s, transform .25s; }
.hm-demo-list li.is-leaving { opacity: 0; transform: translateX(14px); }
.hm-demo-list li.is-new { animation: hm-in .3s ease-out; }
.hm-demo-list li.is-late { background: var(--late-bg); }
.hm-demo-list li.is-late .ball-n { outline: 2px dashed var(--line); outline-offset: 2px; }
.hm-demo-list.is-empty::after { content: "All done. Toss Twiggy something."; font-family: var(--hand); font-size: 1.2rem; color: var(--muted); text-align: center; padding: 6px; }
@keyframes hm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hm-demo-title { font-weight: 800; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-mini { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 11px; border: 2px solid var(--line); border-radius: 999px; background: var(--low); color: #211c18; font-weight: 800; font-size: .82rem; cursor: pointer; }
.hm-mini .icon { width: 14px; height: 14px; stroke-width: 3; }
.hm-mini:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--sc); }
.hm-mini-quiet { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; padding-inline: 6px; }
.hm-mini-quiet:hover { box-shadow: none; transform: none; color: var(--brand-deep); }
.hm-demo-add { display: flex; gap: 8px; } .hm-demo-add input { flex: 1; min-width: 0; } .hm-demo-add .btn { box-shadow: 2px 2px 0 var(--sc); }

.hm-strip { border-block: 2px solid var(--line); background: var(--sunk); }
.hm-strip ul { list-style: none; margin-block: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 24px; padding-block: 16px; font-weight: 800; }
.hm-strip li { display: flex; align-items: center; gap: 10px; } .hm-strip .icon { color: var(--brand-deep); }

.hm-head { max-width: 46em; margin-bottom: 26px; }
.hm-head h2, .hm-split h2, .hm-faq h2, .hm-cta h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); letter-spacing: -.025em; text-wrap: balance; }
.hm-head .lede { margin-top: 12px; }
.hm-views { padding-block: 72px 30px; }
.hm-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); margin-bottom: 18px; }
.hm-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 18px; border: 0; border-radius: 999px; background: none; font-weight: 800; cursor: pointer; color: var(--ink); }
.hm-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.hm-window { border: 2px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow-lg); overflow: hidden; }
.hm-window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 16px; border-bottom: 2px solid var(--line); background: var(--sunk); font-weight: 800; font-size: .9rem; }
.hm-window-bar i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--high); }
.hm-window-bar i:nth-child(2) { background: var(--medium); } .hm-window-bar i:nth-child(3) { background: var(--low); margin-right: 10px; }
.hm-pane { padding: 22px; min-height: 330px; }
.hm-pane-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.hm-pane .task-row { cursor: default; } .hm-pane .task-card { cursor: default; padding-right: 14px; }
.hm-pane .tick { cursor: default; }
.hm-pane-note h3 { font-size: 1.35rem; margin-bottom: 8px; } .hm-pane-note p { color: var(--muted); font-size: 1.05rem; }
.hm-pane-foot { margin: 16px 0 0; color: var(--muted); font-weight: 700; text-align: center; }
.hm-board .col-head h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.hm-board .col-head h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.hm-board .col-doing h3::before { background: var(--doing); } .hm-board .col-done h3::before { background: var(--ok); }
.hm-pane-juggle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hm-juggle-art { max-width: 300px; justify-self: center; width: 100%; }
.hm-pane-note .ball-list { margin-top: 14px; } .hm-pane-note .ball-list li { background: var(--late-bg); font-weight: 800; }
.hm-late { color: var(--brand-deep); }

.hm-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; padding-block: 64px; }
.hm-split .ticks { margin-top: 20px; gap: 14px; font-size: 1.05rem; } .hm-split .ticks strong { display: block; }
.hm-split .ticks span { color: var(--muted); } .hm-split .ticks span strong { color: var(--ink); }
.hm-split-art { position: relative; display: grid; gap: 14px; justify-items: start; }
.hm-thread { width: min(100%, 440px); display: grid; gap: 12px; transform: rotate(-1.200deg); }
.hm-thread-title { display: flex; align-items: center; gap: 9px; font-weight: 900; margin: 0; }
.hm-msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.hm-msg p { margin: 0; padding: 8px 12px; background: var(--sunk); border: 2px solid var(--hair); border-radius: 4px 14px 14px 14px; }
.hm-msg strong { display: block; font-size: .85rem; }
.hm-checks { list-style: none; margin: 0; padding: 10px 0 0; border-top: 2px dashed var(--hair); display: grid; gap: 6px; font-weight: 700; }
.hm-checks li { display: flex; align-items: center; gap: 9px; }
.hm-checks .icon { width: 20px; height: 20px; padding: 2px; border: 2px solid var(--line); border-radius: 6px; color: transparent; stroke-width: 3.2; }
.hm-checks .is-on { color: var(--muted); text-decoration: line-through; } .hm-checks .is-on .icon { background: var(--ok); color: #fff; }
.hm-mail { justify-self: end; width: min(100%, 320px); margin-top: -34px; transform: rotate(2deg); padding: 12px 16px; position: relative; }
.hm-mail p { margin: 0; } .hm-mail-from { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .85rem; font-weight: 800; margin-bottom: 4px !important; }
.hm-mail-from .icon { width: 16px; height: 16px; color: var(--brand-deep); }
.hm-rules { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hm-rule { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 700; }
.hm-rule strong { font-weight: 900; color: var(--brand-deep); } .hm-rule .icon { color: var(--brand-deep); }
.hm-board-card { width: min(100%, 420px); justify-self: center; transform: rotate(1deg); box-shadow: var(--shadow-lg); padding: 22px; }
.hm-board-card .mini-board li { grid-template-columns: 18px 30px auto minmax(40px, 1fr) auto; }
.hm-bar { height: 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--sunk); overflow: hidden; }
.hm-bar i { display: block; height: 100%; background: var(--low); } .hm-bar .w100 { width: 100%; background: var(--medium); } .hm-bar .w76 { width: 76%; } .hm-bar .w51 { width: 51%; }
.hm-streak { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; margin: 18px 0 0; padding-top: 14px; border-top: 2px dashed var(--hair); }
.hm-streak .icon { grid-row: span 2; width: 30px; height: 30px; color: var(--brand-deep); } .hm-streak span { color: var(--muted); font-size: .88rem; }

.hm-steps { padding-block: 40px 64px; }
.hm-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.hm-steps li { position: relative; padding: 26px 22px 20px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.hm-steps h3 { font-size: 1.25rem; margin-bottom: 6px; } .hm-steps p { margin: 0; color: var(--muted); }
.hm-num { position: absolute; top: -18px; left: 18px; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--line); border-radius: 50%; background: var(--medium); color: #211c18; font-weight: 900; }
.hm-steps li:nth-child(1) .hm-num { background: var(--high); } .hm-steps li:nth-child(3) .hm-num { background: var(--low); }

.hm-faq { padding-block: 20px 64px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.hm-faq-list { display: grid; gap: 10px; }
.hm-faq details { border: 2px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 18px; }
.hm-faq summary { cursor: pointer; font-weight: 900; font-size: 1.08rem; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.hm-faq summary::-webkit-details-marker { display: none; } .hm-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; }
.hm-faq details[open] summary::after { content: "–"; } .hm-faq details p { margin: 0 0 16px; color: var(--muted); max-width: 60ch; }

.hm-cta { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 20px; align-items: center; margin-bottom: 10px; padding: 44px 48px 0; background: var(--brand); color: #211c18; border: 2px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden; }
.hm-cta > div:first-child { padding-bottom: 44px; } .hm-cta p { font-size: 1.15rem; font-weight: 700; margin: 10px 0 22px; }
.hm-cta-btn { background: #211c18; color: #fbf5e9; border-color: #211c18; box-shadow: 3px 3px 0 #fffdf7; }
.hm-cta-btn:hover { color: #fbf5e9; box-shadow: 4px 4px 0 #fffdf7; }
.hm-cta-art { max-width: 260px; justify-self: center; width: 100%; margin-bottom: -18px; }
.hm-cta .tw-body { stroke: #211c18; } .hm-cta .tw-head { fill: #fffdf7; } .hm-cta .tw-floor { stroke: #211c18; } .hm-cta .tw-shadow { fill: #211c18; } .hm-cta .tw-ball circle { stroke: #211c18; }
.pub-foot { border-top: 0; }

@media (max-width: 900px) {
  .hm-hero, .hm-split, .hm-faq, .hm-cta, .hm-pane-grid { grid-template-columns: minmax(0, 1fr); }
  .hm-hero { gap: 28px; padding-block: 12px 44px; } .hm-stage { transform: none; }
  .hm-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-views { padding-block: 48px 20px; } .hm-pane { padding: 14px; min-height: 0; }
  .hm-board { margin: 0; padding: 0 0 8px; }
  .hm-split { gap: 28px; padding-block: 44px; } .hm-split-flip .hm-split-art { order: 2; }
  .hm-steps ol { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hm-cta { padding: 30px 22px 0; margin-inline: 16px; } .hm-cta-art { max-width: 180px; }
  .hm-mail { margin-top: -10px; }
}
@media (max-width: 520px) {
  .hm-strip ul { grid-template-columns: minmax(0, 1fr); } .hm-tabs button { padding: 6px 13px; }
  .hm-demo-list li { grid-template-columns: auto minmax(0, 1fr) auto; } .hm-mini-quiet { grid-column: 2 / -1; justify-self: end; min-height: 24px; }
  .hm-hero, .hm-strip ul, .hm-views, .hm-split, .hm-steps, .hm-faq { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { .hm-points.is-bump, .hm-demo-list li.is-new { animation: none; } .hm-demo-list li { transition: none; } }

/* ---- leaderboard ---- */
.lb-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 24px; align-items: start; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb-list li { display: grid; grid-template-columns: 28px 34px minmax(0, auto) minmax(60px, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; font-weight: 800; }
.lb-list li.is-me { background: var(--sunk); outline: 2px solid var(--line); }
.lb-list .rank { color: var(--muted); text-align: center; font-size: 1.1rem; } .lb-list .pts { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.lb-list li:first-child .rank { color: var(--brand-deep); }
.lb-list progress { width: 100%; } .lb-list progress::-webkit-progress-value { background: var(--medium); } .lb-list progress::-moz-progress-bar { background: var(--medium); }
.lb-list .avatar { width: 34px; height: 34px; }
.lb-side { display: grid; gap: 18px; } .lb-side .stats { grid-template-columns: repeat(2, 1fr); }
.rules { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--muted); } .rules strong { color: var(--ink); }
a.stats, a.side-streak { text-decoration: none; color: var(--ink); } a.stats:hover, a.side-streak:hover { color: var(--ink); }
@media (max-width: 900px) { .lb-grid { grid-template-columns: minmax(0, 1fr); } .lb-list li { grid-template-columns: 24px 30px minmax(0, 1fr) auto; } .lb-list progress { display: none; } }

/* ---- team, notifications ---- */
.team-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
.team-side { display: grid; gap: 20px; }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.members li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 34px; gap: 12px; align-items: center; padding: 8px 4px; font-weight: 800; border-bottom: 2px dashed var(--hair); }
.members li:last-child { border-bottom: 0; }
.member-menu { position: relative; } .member-menu summary { list-style: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.member-menu summary::-webkit-details-marker { display: none; } .member-menu summary:hover { background: var(--sunk); color: var(--ink); }
.member-menu .menu { min-width: 190px; top: 38px; } .member-menu .menu form { display: contents; }
.leave { margin-top: 16px; } .sub-h { font-size: .95rem; margin: 20px 0 8px; }
.pending { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 700; } .pending li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.switch { display: flex; gap: 8px; align-items: center; } .switch select { width: auto; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.notes li { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; padding: 12px 16px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; }
.notes li.is-unread { border-left-width: 9px; border-left-color: var(--brand); font-weight: 800; }
.notes a { text-decoration: none; } .notes a:hover { text-decoration: underline; } .notes .muted { font-size: .85rem; white-space: nowrap; font-weight: 600; }
@media (max-width: 900px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }

.settings .check { margin-bottom: 12px; }
.settings { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.upload input[type=file] { flex: 1; min-width: 0; padding: 8px; border: 2px dashed var(--line); border-radius: var(--r-sm); background: var(--card); }
.files li { padding: 4px 0; }

/* ---- admin, content pages ---- */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.admin-nav a { padding: 5px 13px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 800; font-size: .9rem; text-decoration: none; color: var(--ink); }
.admin-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.tile { display: grid; gap: 2px; text-decoration: none; color: var(--ink); } .tile strong { font-size: 2.1rem; font-weight: 900; line-height: 1; } .tile span { font-weight: 800; } .tile small { color: var(--muted); }
.is-bad { color: var(--brand-deep) !important; }
.admin-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.bars { width: 100%; border-collapse: collapse; } .bars th { text-align: left; font-weight: 700; color: var(--muted); width: 70px; padding: 3px 0; white-space: nowrap; } .bars progress { width: 100%; } .bars td.num { width: 40px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: var(--r); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; } .table th, .table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--hair); }
.table th { font-weight: 900; background: var(--sunk); white-space: nowrap; } .table tr:last-child td { border-bottom: 0; } .table td.num, .table th.num { text-align: right; }
.cards-list, .roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 860px; }
.cards-list .by { margin: 0 0 6px; } .pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.roadmap li { padding: 12px 16px; box-shadow: none; } .row-actions { display: flex; gap: 14px; align-items: center; font-size: .85rem; } .row-actions form { display: inline; }
.roadmap-add, .fin-add, .narrow { max-width: 860px; margin-bottom: 24px; }
.fin-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.plan output { font-weight: 900; font-size: 1.2rem; } .plan .label { font-weight: 800; }
.prose { max-width: 800px; font-size: 1.04rem; } .prose h2 { font-size: 1.5rem; margin: 1.6em 0 .5em; } .prose h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; } .prose h4 { margin: 1em 0 .3em; }
.prose > :first-child { margin-top: 0; } .prose img { height: auto; border: 2px solid var(--line); border-radius: 12px; } .prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1em 0; padding: 4px 18px; border-left: 6px solid var(--medium); font-family: var(--hand); font-size: 1.3rem; } .prose blockquote p { margin: .3em 0; }
.prose table { border-collapse: collapse; } .prose td, .prose th { border: 2px solid var(--hair); padding: 6px 10px; }
.page-narrow { max-width: 800px; margin: 0 auto; padding: 30px 0 20px; } .page-narrow h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: 18px; }
.apply { margin-top: 34px; box-shadow: var(--shadow-lg); display: grid; gap: 10px; } .apply h2 { font-size: 1.5rem; } .apply p { margin: 0; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; } .legal-toc a { padding: 5px 13px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 800; text-decoration: none; }
@media (max-width: 900px) { .admin-two { grid-template-columns: minmax(0, 1fr); } }

.upload { flex-wrap: wrap; } .upload input[type=file] { flex: 1 1 180px; width: 100%; max-width: 100%; }
.inline-add { flex-wrap: wrap; } .inline-add input[type=text] { flex: 1 1 160px; min-width: 0; }
.files li { min-width: 0; } .files a { overflow-wrap: anywhere; }

/* ---- empty states: one centred card, Twiggy above the words ---- */
.my-grid.is-solo { grid-template-columns: minmax(0, 1fr); }
.empty { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 6px; max-width: 520px; margin: 28px auto 0; padding: 30px 28px 34px; }
.empty-art { width: 170px; max-width: 60%; }
.empty h2 { font-size: 1.5rem; margin: 6px 0 8px; }
.empty p { margin: 0 auto; max-width: 34ch; }
.empty .btn { margin-top: 20px; }

/* ---- fixes from the visual tour ---- */
.tw-more { font: 800 15px var(--font); fill: var(--muted); }
.status-form .pill:not(.is-on) { background: var(--card); color: var(--ink) !important; }
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1200px) { .quick-add { grid-template-columns: minmax(0, 1fr) auto auto auto; } .quick-add input[type=text] { grid-column: 1 / -1; } }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick-add { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.field { min-width: 0; } .field input, .field select, .field textarea { min-width: 0; }
