[hidden] { display: none !important; }

/* ---------- tokens: light matches the shop, dark is optional ---------- */
:root {
  --bg: #fff;
  --raise: #fff;
  --soft: #f4f4f4;
  --line: #e3e3e3;
  --line-2: #000;
  --fg: #000;
  --mute: #5c5c5c;
  --dim: #9b9b9b;
  --red: #d92d20;
  --red-bg: #fdeceb;
  --red-line: #f1b3ad;
  --inv: #000;
  --inv-fg: #fff;
  --inv-mute: #a8a8a8;
  --inv-line: #3a3a3a;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --max: 1120px;
  color-scheme: light;
}
:root[data-theme="dark"], .force-dark {
  --bg: #000;
  --raise: #0d0d0d;
  --soft: #141414;
  --line: #2b2b2b;
  --line-2: #fff;
  --fg: #fff;
  --mute: #a3a3a3;
  --dim: #666;
  --red: #ff5a48;
  --red-bg: #2a0d0b;
  --red-line: #6b231c;
  --inv: #fff;
  --inv-fg: #000;
  --inv-mute: #555;
  --inv-line: #ccc;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-variation-settings: 'wdth' 100; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the shop's voice: wide capitals */
.wide { font-variation-settings: 'wdth' 125; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: .98; }
.caps { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; }
.mute { color: var(--mute); }
.red { color: var(--red); }

/* ---------- header: black bar with the wordmark, nav underneath ---------- */
.bar { background: #000; color: #fff; position: sticky; top: 0; z-index: 20; }
:root[data-theme="dark"] .bar { border-bottom: 1px solid #262626; }
.bar-in { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; gap: 16px; }
.bar .l, .bar .r { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: #bdbdbd; white-space: nowrap; }
.bar .r { justify-self: end; text-decoration: none; }
.bar .r:hover { color: #fff; }
.mark { font-variation-settings: 'wdth' 125; font-weight: 900; text-transform: uppercase; font-size: 30px; letter-spacing: .03em; line-height: 1; text-decoration: none; color: #fff; }
.mark span { font-weight: 400; font-size: 11px; letter-spacing: .14em; vertical-align: top; margin-left: 4px; color: #bdbdbd; }
.navrow { border-bottom: 1px solid var(--line-2); background: var(--bg); position: sticky; top: 64px; z-index: 19; }
.nav { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: flex; justify-content: center; gap: 4px; }
.nav a { text-decoration: none; padding: 14px 14px 12px; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 600; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current] { color: var(--fg); border-bottom-color: var(--fg); }
.tabbar { display: none; }

main { max-width: var(--max); margin: 0 auto; padding: 44px 24px 120px; }

@media (max-width: 760px) {
  .navrow { display: none; }
  .bar-in { height: 56px; padding: 0 16px; grid-template-columns: 1fr auto 1fr; }
  .mark { font-size: 24px; }
  .bar .l { font-size: 10px; }
  main { padding: 24px 16px 120px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { text-decoration: none; color: var(--dim); display: grid; justify-items: center; gap: 4px; padding: 10px 0 8px; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .06em; font-size: 9px; font-weight: 600; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--fg); }
}

/* ---------- page headers and sections ---------- */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 32px; }
.page-h h1 { margin: 0; font-size: clamp(30px, 5.5vw, 54px); }
.page-h p { margin: 10px 0 0; color: var(--mute); max-width: 60ch; }
.crumb { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 600; color: var(--mute); text-decoration: none; display: inline-block; margin-bottom: 12px; }
.crumb:hover { color: var(--fg); }
h2.sec { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; color: var(--fg); margin: 48px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h2.sec .n { font-weight: 500; color: var(--mute); }
h2.sec .count { background: var(--red); color: #fff; padding: 1px 7px; letter-spacing: .04em; }

/* ---------- buttons: square, capitals, invert on hover ---------- */
.btn { background: var(--fg); color: var(--bg); border: 1px solid var(--fg); padding: 12px 20px; cursor: pointer; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; white-space: nowrap; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--bg); color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); }
.btn.sm { padding: 8px 12px; font-size: 11px; }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 4px; font-size: inherit; }
.link:hover { text-decoration-color: var(--fg); }
.link.caps { text-decoration-thickness: 1px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chipset { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--mute); padding: 6px 10px; cursor: pointer; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; }
.chip:hover { color: var(--fg); border-color: var(--fg); }
.chip[aria-pressed=true] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- dashboard ---------- */
.hello { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 20px; }
.hello h1 { font-size: clamp(22px, 3.4vw, 32px); margin: 0; }
.hello p { margin: 0; color: var(--mute); }

.hero { background: var(--inv); color: var(--inv-fg); padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px 48px; align-items: end; }
.hero .lbl { color: var(--inv-mute); margin-bottom: 14px; display: block; }
.hero .ttl { font-size: clamp(28px, 4.6vw, 56px); margin: 0 0 28px; overflow-wrap: anywhere; }
.hero .btn { background: var(--inv-fg); color: var(--inv); border-color: var(--inv-fg); }
.hero .btn:hover { background: var(--inv); color: var(--inv-fg); }
.hero .btn.ghost { background: transparent; color: var(--inv-fg); border-color: var(--inv-fg); }
.hero .btn.ghost:hover { background: var(--inv-fg); color: var(--inv); }
.hero-side { display: grid; gap: 10px; align-content: end; border-left: 1px solid var(--inv-line); padding-left: 32px; }
.hero-side .big { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 110; }
.hero-side .sub { color: var(--inv-mute); font-size: 14px; }
.hero .meter { background: var(--inv-line); }
.hero .meter i { background: var(--inv-fg); }
.hero .waiting { grid-column: 1 / -1; border-top: 1px solid var(--inv-line); padding-top: 16px; color: var(--inv-mute); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero .waiting .link { color: var(--inv-fg); text-decoration-color: var(--inv-mute); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-side { border-left: 0; border-top: 1px solid var(--inv-line); padding: 20px 0 0; } }

.att { list-style: none; margin: 0; padding: 0; }
.att li { border-bottom: 1px solid var(--line); }
.att a, .att .row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 0; text-decoration: none; font-size: 16px; }
.att a:hover .t { text-decoration: underline; text-underline-offset: 4px; }
.att .area { color: var(--mute); }
.sq { width: 8px; height: 8px; background: var(--fg); }
.sq.red { background: var(--red); }
.sec-foot { padding-top: 12px; }

.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cell { padding: 22px 24px 24px 0; display: grid; gap: 6px; align-content: start; text-decoration: none; min-width: 0; }
.cell + .cell { border-left: 1px solid var(--line); padding-left: 24px; }
.cell:hover .v { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.cell .k { color: var(--mute); }
.cell .v { font-size: 38px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 110; overflow-wrap: anywhere; }
.cell .v.name { font-size: 22px; font-variation-settings: 'wdth' 125; text-transform: uppercase; }
.cell .s { color: var(--mute); font-size: 14px; }
@media (max-width: 760px) { .strip { grid-template-columns: 1fr; } .cell, .cell + .cell { border-left: 0; padding: 18px 0; } .cell + .cell { border-top: 1px solid var(--line); } }

.dates { list-style: none; margin: 0; padding: 0; }
.dates li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dates .d { font-variant-numeric: tabular-nums; }
.dates .st-text { color: var(--mute); font-size: 14px; text-align: right; }

@media (max-width: 560px) { .dates li { grid-template-columns: 76px minmax(0, 1fr); } .dates .st-text { grid-column: 2; text-align: left; } }

.team { list-style: none; margin: 0; padding: 0; }
.team li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 200px; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.team .s { color: var(--mute); font-size: 14px; text-align: right; }
@media (max-width: 640px) { .team li { grid-template-columns: 1fr auto; } .team .meter { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- bars ---------- */
.meter { height: 3px; background: var(--line); position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--fg); transition: width .4s; }
.meter i.over { background: var(--red); }
.meter.thick { height: 6px; }

/* ---------- my day ---------- */
.day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.day-head h1 { margin: 0; font-size: clamp(32px, 6vw, 60px); }
.daynav { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.daynav button { background: none; border: 1px solid var(--fg); color: var(--fg); width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.daynav button:hover { background: var(--fg); color: var(--bg); }
.daynav button svg { width: 16px; height: 16px; }
.daynav span { color: var(--mute); padding: 0 10px; }
.daynav .link { border: 0; width: auto; height: auto; }
.daynav .link:hover { background: none; color: var(--fg); }
.cap { display: grid; gap: 10px; margin: 0 0 8px; }
.cap-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 12px 16px; margin-top: 18px; }
.notice.red { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }

.block-h { display: flex; justify-content: space-between; align-items: baseline; margin: 40px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.block-h h2 { margin: 0; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; font-weight: 700; }
.block-h span { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }
.block.drop-over .block-h { border-bottom-width: 3px; }
.plan { list-style: none; margin: 0; padding: 0; min-height: 12px; }
.plan .empty { padding: 14px 0; }
.prow { border-bottom: 1px solid var(--line); }
.prow.dragging { opacity: .35; }
.prow.drop-before { box-shadow: inset 0 3px 0 var(--fg); }
.prow-main { display: grid; grid-template-columns: 18px 26px 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 0; }
.grip { color: var(--dim); cursor: grab; display: grid; place-items: center; }
.grip svg { width: 14px; height: 14px; }
.chk { width: 24px; height: 24px; border: 1.5px solid var(--fg); background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--bg); }
.chk:hover { background: var(--soft); }
.chk svg { width: 14px; height: 14px; opacity: 0; stroke: currentColor; }
.done .chk { background: var(--fg); border-color: var(--fg); }
.done .chk svg { opacity: 1; }
.done .p-title, .trow.done .t-title { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--dim); }
.done .p-time, .done .est { color: var(--dim); }
.p-time { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.p-title { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 17px; line-height: 1.35; width: 100%; color: var(--fg); }
.p-meta { font-size: 13px; color: var(--mute); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.p-meta .late { color: var(--red); }
.est { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.est.none { color: var(--dim); }
.p-more { padding: 4px 0 22px 110px; display: grid; gap: 18px; }
.p-more .howto { white-space: pre-wrap; font-size: 15px; margin: 0; border-left: 2px solid var(--fg); padding-left: 14px; }
.p-more .lbl { color: var(--mute); margin-bottom: 8px; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; }
.prow.is-next .p-more .lbl { color: var(--inv-mute); }

/* the task you should be on now */
.prow.is-next { background: var(--inv); color: var(--inv-fg); border-bottom-color: var(--inv); margin: 0 -16px; padding: 0 16px; }
.prow.is-next .p-title { color: var(--inv-fg); font-size: 19px; font-weight: 700; }
.prow.is-next .p-time, .prow.is-next .est, .prow.is-next .p-meta { color: var(--inv-mute); }
.prow.is-next .grip { color: var(--inv-mute); }
.prow.is-next .chk { border-color: var(--inv-fg); color: var(--inv); }
.prow.is-next .chk:hover { background: transparent; }
.prow.is-next .now { color: var(--inv-fg); background: none; padding: 0; display: block; margin-bottom: 2px; }
.prow.is-next .p-more .howto { border-left-color: var(--inv-fg); }
.prow.is-next .chip { color: var(--inv-mute); border-color: var(--inv-line); }
.prow.is-next .chip[aria-pressed=true] { background: var(--inv-fg); color: var(--inv); border-color: var(--inv-fg); }
.prow.is-next .btn { background: var(--inv-fg); color: var(--inv); border-color: var(--inv-fg); }
.prow.is-next .btn.ghost { background: transparent; color: var(--inv-fg); border-color: var(--inv-fg); }
.prow.is-next .btn.ghost:hover { background: var(--inv-fg); color: var(--inv); }
.now { display: none; }

@media (max-width: 640px) {
  .prow-main { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 4px 12px; }
  .grip { display: none; }
  .prow-main .chk { grid-row: span 2; align-self: start; margin-top: 2px; }
  .p-time { grid-column: 2; grid-row: 1; font-size: 13px; }
  .prow-main > div:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  .prow-main .est { grid-column: 3; grid-row: 1 / span 2; }
  .p-more { padding-left: 38px; }
  .prow.is-next { margin: 0 -16px; }
}
.empty { padding: 20px 0; color: var(--mute); }
.add-row { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- focus: lights off ---------- */
.focus-wrap { background: var(--bg); color: var(--fg); min-height: 100vh; }
.focus { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; max-width: 860px; margin: 0 auto; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.focus-top { display: flex; justify-content: space-between; align-items: center; color: var(--mute); }
.focus-top a { color: var(--mute); text-decoration: none; }
.focus-top a:hover { color: var(--fg); }
.focus-body { display: grid; align-content: center; gap: 24px; padding: 40px 0; }
.focus-body .ttl { font-size: clamp(34px, 7vw, 76px); margin: 0; }
.focus-body .howto { color: var(--mute); white-space: pre-wrap; max-width: 60ch; margin: 0; font-size: 17px; }
.timer { font-size: clamp(56px, 12vw, 120px); font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.timer.over { color: var(--red); }
.focus-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.focus-actions .btn { padding: 16px 26px; }
.focus-next { border-top: 1px solid var(--line); padding-top: 16px; color: var(--mute); }

/* ---------- generic lists, tables ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.trow { border-bottom: 1px solid var(--line); }
.trow-main { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; }
.trow .chk { margin-top: 1px; }
.trow .t-title { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 16px; color: var(--fg); }
.who { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 600; color: var(--mute); border: 1px solid var(--line); padding: 2px 7px; white-space: nowrap; align-self: center; }
.tl-week { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 600; color: var(--mute); padding: 26px 0 6px; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--mute); padding: 12px 12px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.badge { display: inline-block; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 700; padding: 3px 8px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.badge.now { background: var(--red); border-color: var(--red); color: #fff; }
.badge.soon { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.stock-in { width: 76px; background: transparent; border: 1px solid var(--line); padding: 6px 8px; text-align: right; }
.stock-in:focus { border-color: var(--fg); outline: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.filters select, .filters input { background: var(--bg); border: 1px solid var(--fg); padding: 9px 10px; border-radius: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line-2); }
.stat { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); }
.stat .v { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 110; }
.stat .l { font-size: 14px; color: var(--mute); }
.spark { width: 100%; height: 56px; display: block; color: var(--fg); }
.spark .target { stroke: var(--dim); }

/* projects */
.proj { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.proj:hover .nm { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.proj .nm { font-size: 22px; }
.proj .p-meta { margin-top: 8px; }
.proj .side { display: grid; gap: 8px; text-align: right; font-size: 14px; color: var(--mute); }
@media (max-width: 640px) { .proj { grid-template-columns: 1fr; gap: 12px; } .proj .side { text-align: left; } }

/* routines */
.rh { display: grid; grid-template-columns: minmax(0, 1fr) 190px 60px 70px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rh .when, .rh .est { font-size: 14px; color: var(--mute); }
.rh .t-title { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 16px; color: var(--fg); }
@media (max-width: 640px) { .rh { grid-template-columns: 1fr auto; } .rh .when { grid-column: 1; } .rh .est { display: none; } }

/* more */
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--line-2); }
.more-grid a { padding: 22px 20px 22px 0; text-decoration: none; display: grid; gap: 6px; border-bottom: 1px solid var(--line); }
.more-grid a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.more-grid b { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .02em; font-size: 18px; font-weight: 800; }
.more-grid span { color: var(--mute); font-size: 14px; }

/* settings */
.blocks-ed { display: grid; gap: 8px; margin-top: 14px; max-width: 540px; }
.blocks-ed .b { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; }
.hours-ed { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 14px; max-width: 640px; }
.hours-ed label { display: grid; gap: 6px; }
@media (max-width: 560px) { .hours-ed { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
input.in, select.in { background: var(--bg); border: 1px solid var(--fg); padding: 10px; width: 100%; border-radius: 0; }
input.in:focus, select.in:focus { outline: 2px solid var(--fg); outline-offset: -2px; }
.set-sec { max-width: 680px; }
.set-sec p { color: var(--mute); margin: 12px 0 0; }

/* ---------- dialog ---------- */
dialog { background: var(--bg); color: var(--fg); border: 1px solid var(--line-2); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border-radius: 0; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dlg-h { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; background: #000; color: #fff; }
.dlg-h h2 { margin: 0; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; font-weight: 800; }
.dlg-h button { background: none; border: 0; color: #bdbdbd; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.dlg-h button:hover { color: #fff; }
.dlg-b { padding: 22px 20px; display: grid; gap: 16px; }
.fld { display: grid; gap: 6px; }
.fld label { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--mute); }
.fld .hint { font-size: 13px; color: var(--mute); }
.fld input, .fld select, .fld textarea { background: var(--bg); border: 1px solid var(--fg); padding: 10px 11px; width: 100%; border-radius: 0; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--fg); outline-offset: -2px; }
.fld textarea { min-height: 90px; resize: vertical; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 480px) { .fld-row { grid-template-columns: 1fr; } }
.dlg-f { display: flex; justify-content: space-between; gap: 8px; padding: 0 20px 20px; flex-wrap: wrap; }
.err { color: var(--red); font-size: 14px; min-height: 1em; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-2); padding: 0 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--mute); padding: 14px 12px 12px; cursor: pointer; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--fg); border-bottom-color: var(--fg); }
.pull-list { list-style: none; margin: 0; padding: 0 20px 20px; max-height: 55vh; overflow-y: auto; }
.pull-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.pull-list .meta { font-size: 13px; color: var(--mute); }
.pull-list .meta .late { color: var(--red); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; background: var(--bg); }
.login-art { background: #000; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .big { font-size: clamp(64px, 12vw, 176px); }
.login-art p { max-width: 32ch; color: #bdbdbd; margin: 0; }
.login-form { padding: 48px; display: flex; align-items: center; }
.login-form form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login-form h1 { margin: 0 0 4px; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .login-art { padding: 32px 24px; gap: 40px; } .login-form { padding: 32px 24px; align-items: start; } }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--fg); color: var(--bg); padding: 12px 18px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; display: flex; gap: 16px; align-items: center; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { background: none; border: 0; color: var(--bg); text-decoration: underline; cursor: pointer; padding: 0; font-weight: 700; }
@media (max-width: 760px) { #toast { bottom: 84px; } }

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

/* =================== round 4: hub, calendar, stock, money =================== */
.sel { user-select: text; }
.full { grid-column: 1 / -1; }
dialog.dlg-wide { width: min(820px, calc(100vw - 24px)); }
dialog.confirm { width: min(440px, calc(100vw - 24px)); }
.fld .lab { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--mute); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick.cols3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.pick-opt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 7px 10px; cursor: pointer; font-size: 14px; }
.pick-opt:has(input:checked) { border-color: var(--fg); }
.pick-opt input { accent-color: var(--fg); width: 16px; height: 16px; margin: 0; }
.pick-opt.solo { border: 0; padding: 0; }
.pick.cols3 .pick-opt { border: 0; padding: 4px 0; }

/* popovers and menus */
.pop { position: fixed; z-index: 80; background: var(--bg); border: 1px solid var(--line-2); min-width: 200px; max-width: min(340px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.menu { display: grid; padding: 6px; }
.menu > button { background: none; border: 0; text-align: left; padding: 9px 10px; cursor: pointer; font-size: 14px; color: var(--fg); }
.menu > button:hover, .menu > button:focus-visible { background: var(--soft); }
.menu > button.on { font-weight: 700; }
.menu.multi { gap: 2px; padding: 10px; }
.menu.multi .pick-opt { border: 0; padding: 6px 2px; }
.pop-t { font-size: 10px; margin: 0 0 6px; }
.pop-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.tip { position: fixed; z-index: 90; background: var(--fg); color: var(--bg); font-size: 13px; padding: 6px 9px; pointer-events: none; max-width: 300px; }

/* status pills (monday-style, kept black and white with red for stuck) */
.st { display: inline-flex; align-items: center; justify-content: center; min-width: 108px; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; font-weight: 700; padding: 5px 8px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.st-doing { border-color: var(--fg); color: var(--fg); background: var(--soft); }
.st-stuck { border-color: var(--red); background: var(--red); color: #fff; }
.st-done { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.st-chip.st-stuck[aria-pressed=true] { background: var(--red); border-color: var(--red); color: #fff; }
.st-btn, .ppl-btn, .pst-btn { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: var(--fg); }
.pst-btn svg { width: 12px; height: 12px; }
.ppl { display: inline-flex; gap: 3px; }
.pp { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; font-weight: 700; border: 1px solid var(--fg); padding: 2px 5px; min-width: 32px; text-align: center; }
.ppl.none { font-size: 12px; color: var(--dim); }
.ppl-btn:hover .pp, .ppl-btn:focus-visible .pp { background: var(--fg); color: var(--bg); }
.pst { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; font-weight: 700; padding: 3px 7px; border: 1px solid var(--line); color: var(--mute); }
.pst-active { border-color: var(--fg); color: var(--fg); }
.pst-on_hold { border-style: dashed; }
.pst-complete { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* page tabs, toolbars, segmented controls */
.ptabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-2); margin: 0 0 22px; overflow-x: auto; scrollbar-width: none; }
.ptabs a { text-decoration: none; padding: 12px 14px 10px; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; color: var(--mute); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptabs a:first-child { padding-left: 0; }
.ptabs a:hover { color: var(--fg); }
.ptabs a[aria-current] { color: var(--fg); border-bottom-color: var(--fg); }
.ptabs a span { color: var(--dim); font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.toolbar select, .toolbar input[type=search], .toolbar input[type=date] { background: var(--bg); border: 1px solid var(--fg); padding: 8px 10px; border-radius: 0; font-size: 14px; min-width: 0; }
.toolbar input[type=search] { flex: 1 1 180px; }
.tb-gap { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--fg); }
.seg button, .seg a { background: transparent; border: 0; padding: 8px 12px; cursor: pointer; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; text-decoration: none; color: var(--fg); white-space: nowrap; }
.seg button + button, .seg a + a { border-left: 1px solid var(--fg); }
.seg [aria-pressed=true], .seg [aria-current=true] { background: var(--fg); color: var(--bg); }
.fbtn { background: var(--bg); border: 1px solid var(--line); padding: 7px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--fg); }
.fbtn:hover { border-color: var(--fg); }
.fbtn .caps { font-size: 10px; color: var(--mute); }
.fbtn svg { width: 12px; height: 12px; }
.sq-btn { background: none; border: 1px solid var(--fg); color: var(--fg); width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center; padding: 0; flex: 0 0 34px; }
.sq-btn:hover { background: var(--fg); color: var(--bg); }
.sq-btn svg { width: 16px; height: 16px; }
.strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .strip.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip.four .cell:nth-child(3) { border-left: 0; padding-left: 0; } .strip.four .cell:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .strip.four { grid-template-columns: 1fr; } .strip.four .cell { border-left: 0 !important; padding-left: 0 !important; } }
.legend-inline { display: inline-flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mute); align-items: center; }
.legend-inline span { display: inline-flex; gap: 6px; align-items: center; }
.legend-inline i { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--fg); }
.hint-line { font-size: 13px; margin: 14px 0 0; }

/* charts */
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--mute); margin: 14px 0 8px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .k { width: 12px; height: 12px; display: inline-block; }
.legend .k.a { background: var(--fg); } .legend .k.b { background: var(--dim); opacity: .45; } .legend .k.t { border-top: 2px dashed var(--mute); height: 0; width: 16px; }
.cols { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; height: 240px; margin: 8px 0 24px; }
.cols-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--mute); text-align: right; padding-bottom: 22px; font-variant-numeric: tabular-nums; }
.cols-plot { position: relative; display: flex; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--fg); background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 50%; padding-bottom: 0; margin-bottom: 22px; }
.col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; cursor: default; }
.col:hover .bars i.a, .col:focus .bars i.a { background: var(--mute); }
.bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bars i { display: block; width: 46%; max-width: 34px; min-height: 1px; }
.bars i.a { background: var(--fg); }
.bars i.a.neg { background: var(--red); }
.bars i.b { background: var(--dim); opacity: .45; }
.cl { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cols-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--mute); pointer-events: none; }
.hb { list-style: none; margin: 8px 0 20px; padding: 0; display: grid; gap: 8px; }
.hb li { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: 14px; }
.hb-bar { height: 12px; background: var(--soft); }
.hb-bar i { display: block; height: 100%; background: var(--fg); }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .hb li { grid-template-columns: 1fr 70px; } .hb-bar { grid-column: 1 / -1; grid-row: 2; } }
.stat .l.caps { font-size: 10px; margin-bottom: 4px; }

/* ---------- my day: week strip, month picker, week grid ---------- */
.strip-wrap { margin: 0 0 22px; }
.wkstrip { display: flex; gap: 8px; align-items: stretch; }
.wkstrip .sq-btn { height: auto; }
.wk-days { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line-2); }
.wd { display: grid; gap: 2px; padding: 10px 10px 8px; text-decoration: none; border-left: 1px solid var(--line); min-width: 0; }
.wd:first-child { border-left: 0; }
.wd:hover { background: var(--soft); }
.wd-n { font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 600; color: var(--mute); }
.wd-d { font-size: 22px; font-weight: 800; line-height: 1.1; font-variation-settings: 'wdth' 110; }
.wd-l { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd .meter { margin-top: 4px; }
.wd.off { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--soft) 6px 7px); }
.wd.off .wd-d { color: var(--dim); }
.wd-off { height: 3px; }
.wd.today .wd-n { color: var(--fg); }
.wd.today .wd-d { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.wd.sel { background: var(--inv); color: var(--inv-fg); }
.wd.sel .wd-n, .wd.sel .wd-l { color: var(--inv-mute); }
.wd.sel .meter { background: var(--inv-line); } .wd.sel .meter i { background: var(--inv-fg); }
.wd.over .wd-l { color: var(--red); }
.strip-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; padding: 0 42px; }
.lg-work { background: var(--bg); }
.lg-off { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--dim) 3px 4px); border-color: var(--dim) !important; }
@media (max-width: 640px) {
  .wkstrip .sq-btn { display: none; }
  .wd { padding: 8px 4px; text-align: center; }
  .wd-l { display: none; }
  .wd-d { font-size: 18px; }
  .strip-foot { padding: 0; }
  .strip-foot .legend-inline { display: none; }
}
.mcal { padding: 12px; width: 300px; }
.mcal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mcal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mcal-dn { text-align: center; font-size: 10px; color: var(--mute); padding: 4px 0; }
.mc { position: relative; background: none; border: 1px solid transparent; height: 36px; cursor: pointer; font-size: 14px; color: var(--fg); font-variant-numeric: tabular-nums; }
.mc:hover { border-color: var(--fg); }
.mc.work { font-weight: 700; }
.mc.off { color: var(--dim); background: repeating-linear-gradient(135deg, transparent 0 4px, var(--soft) 4px 5px); }
.mc.out { opacity: .4; }
.mc.today { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mc.sel { background: var(--fg); color: var(--bg); }
.mc i { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; background: currentColor; }
.mc i.over { background: var(--red); }
.mcal-k { display: flex; gap: 12px; font-size: 11px; color: var(--mute); margin-top: 10px; }
.mcal-k span { display: inline-flex; gap: 5px; align-items: center; }
.mcal-k b { width: 10px; height: 10px; display: inline-block; border: 1px solid var(--fg); }
.mcal-k .k-o { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--dim) 2px 3px); border-color: var(--dim); }
.mcal-k .k-d { width: 4px; height: 4px; background: var(--fg); border: 0; }

.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line-2); margin-top: 14px; }
.wcol { border-left: 1px solid var(--line); min-height: 320px; display: flex; flex-direction: column; min-width: 0; }
.wcol:first-child { border-left: 0; }
.wcol.off { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--soft) 8px 9px); }
.wcol.drop-over { outline: 2px solid var(--fg); outline-offset: -2px; }
.wcol header { padding: 10px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.wcol.today header { background: var(--inv); color: var(--inv-fg); }
.wcol.today header .mute { color: var(--inv-mute); }
.wcol.today .meter { background: var(--inv-line); } .wcol.today .meter i { background: var(--inv-fg); }
.wcol-d { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.wcol-d b { font-size: 20px; font-weight: 800; }
.wcol header .mute { font-size: 12px; }
.wlist { list-style: none; margin: 0; padding: 6px; display: grid; gap: 6px; align-content: start; flex: 1; }
.wcard { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 8px; border: 1px solid var(--line); background: var(--bg); cursor: grab; }
.wcard .chk { width: 18px; height: 18px; }
.wcard .t-title { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 13px; line-height: 1.3; color: var(--fg); overflow-wrap: anywhere; }
.wcard .p-meta { font-size: 11px; gap: 6px; }
.wcard.done .t-title { color: var(--dim); text-decoration: line-through; }
.wcard.dragging { opacity: .4; }
.wadd { margin: 6px; background: none; border: 1px dashed var(--line); padding: 6px; cursor: pointer; color: var(--mute); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; justify-content: center; }
.wadd:hover { border-color: var(--fg); color: var(--fg); }
.wadd svg { width: 12px; height: 12px; }
@media (max-width: 1000px) {
  .weekgrid { grid-template-columns: 1fr; }
  .wcol { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
  .wcol:first-child { border-top: 0; }
  .wcol header { grid-template-columns: auto 1fr; align-items: center; }
  .wcol header .meter { grid-column: 1 / -1; }
}

/* task panel */
.task-panel { gap: 18px; }
.tp-title { font-size: 22px; font-weight: 700; border: 0; border-bottom: 1px solid var(--line); background: transparent; resize: none; padding: 4px 0 8px; width: 100%; overflow: hidden; line-height: 1.3; }
.tp-title:focus { outline: none; border-bottom-color: var(--fg); }
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.tp-grid .fld:nth-child(-n+2) { grid-column: 1 / -1; }
.tp-grid input, .tp-grid select, .task-panel textarea:not(.tp-title) { background: var(--bg); border: 1px solid var(--fg); padding: 9px 10px; width: 100%; border-radius: 0; }
@media (max-width: 560px) { .tp-grid { grid-template-columns: 1fr; } }
.subs { border-top: 1px solid var(--line-2); padding-top: 12px; }
.subs-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.inline-add { display: flex; gap: 8px; margin-top: 10px; }
.inline-add input { flex: 1; background: var(--bg); border: 1px solid var(--line); padding: 9px 10px; }
.inline-add input:focus { border-color: var(--fg); outline: none; }

/* projects list board */
.pboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pcol { border: 1px solid var(--line); background: var(--soft); min-height: 200px; display: flex; flex-direction: column; }
.pcol.drop-over { outline: 2px solid var(--fg); outline-offset: -2px; }
.pcol header { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.pcol-list { display: grid; gap: 8px; padding: 8px; align-content: start; flex: 1; }
.pcol .link { padding: 0 12px 12px; }
.pcard { background: var(--bg); border: 1px solid var(--line); padding: 12px; display: grid; gap: 6px; text-decoration: none; cursor: grab; }
.pcard:hover { border-color: var(--fg); }
.pcard b { font-size: 15px; }
.pcard .mute { font-size: 12px; }
.pcol-empty { font-size: 13px; padding: 8px; margin: 0; }
@media (max-width: 900px) { .pboard { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pboard { grid-template-columns: 1fr; } }

/* project hub */
.hub-h { margin-bottom: 18px; }
.hub-meta { margin-top: 14px; align-items: center; font-size: 14px; }
.hub-progress { display: grid; gap: 8px; margin: 0 0 22px; font-size: 14px; }
.ov { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 8px; }
.ov h2.sec:first-child, .ov section:first-child h2.sec { margin-top: 0; }
.ov-side { display: grid; gap: 12px; align-content: start; }
.ov-side h2.sec { margin-top: 24px; }
@media (max-width: 900px) { .ov { grid-template-columns: 1fr; gap: 0; } }
.prose { white-space: pre-wrap; max-width: 68ch; margin: 12px 0 0; line-height: 1.6; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 10px; color: var(--mute); padding-top: 3px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.kv.two > div { grid-template-columns: 1fr; gap: 2px; }
@media (max-width: 560px) { .kv.two { grid-template-columns: 1fr; } .kv > div { grid-template-columns: 1fr; gap: 2px; } }
.links { margin: 12px 0 0; padding-left: 18px; }
.links li { margin: 4px 0; overflow-wrap: anywhere; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.upd-new { display: grid; gap: 10px; margin-bottom: 24px; }
.upd-new textarea { background: var(--bg); border: 1px solid var(--fg); padding: 12px; width: 100%; resize: vertical; }
.upd { border-top: 1px solid var(--line); padding: 16px 0; }
.upd-h { display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.upd-h .link { margin-left: auto; font-size: 13px; }
.upd .prose { margin-top: 8px; }

/* project task board */
.board { border-top: 1px solid var(--line-2); }
.brow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px 140px 84px; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); min-height: 46px; padding: 4px 0; }
.brow.bhead { min-height: 0; padding: 10px 0 8px; border-bottom-color: var(--line-2); }
.brow.bhead > div { font-size: 10px; color: var(--mute); }
.bc-task { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-task .t-title { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 15px; color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.bc-task .t-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.brow.done .t-title { color: var(--dim); text-decoration: line-through; }
.bc-task input { flex: 1; border: 0; background: transparent; padding: 8px 0; font-size: 14px; }
.bc-task input:focus { outline: none; border-bottom: 1px solid var(--fg); }
.bc-due input, .bc-est select { background: transparent; border: 1px solid transparent; padding: 5px 4px; width: 100%; font-size: 13px; color: var(--fg); }
.bc-due input:hover, .bc-est select:hover, .bc-due input:focus, .bc-est select:focus { border-color: var(--fg); outline: none; }
.bc-due input.late { color: var(--red); }
.bgroup { margin-top: 26px; }
.bgroup-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 2px solid var(--fg); }
.bgroup-h h3 { margin: 0; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; font-weight: 800; }
.exp { background: none; border: 0; padding: 0; width: 18px; height: 18px; cursor: pointer; color: var(--mute); display: grid; place-items: center; flex: 0 0 18px; }
.exp svg { width: 12px; height: 12px; transition: transform .15s; }
.exp.on svg { transform: rotate(90deg); }
.subc { font-size: 11px; color: var(--mute); border: 1px solid var(--line); padding: 1px 5px; cursor: pointer; white-space: nowrap; }
.brow.sub { background: var(--soft); }
.brow.sub .bc-task { padding-left: 38px; }
.sub-ind { width: 12px; height: 12px; border-left: 1px solid var(--dim); border-bottom: 1px solid var(--dim); margin-top: -8px; flex: 0 0 12px; }
.brow .grip { width: 14px; flex: 0 0 14px; }
.brow.dragging { opacity: .35; }
.brow.drop-before { box-shadow: inset 0 3px 0 var(--fg); }
.add-row-b { border-bottom: 1px dashed var(--line); }
.add-row-b .bc-task, .add-sub .bc-task { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .brow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'task task' 'ppl st' 'due est'; padding: 10px 0; gap: 6px 10px; }
  .brow.bhead { display: none; }
  .bc-task { grid-area: task; } .bc-ppl { grid-area: ppl; } .bc-st { grid-area: st; justify-self: end; } .bc-due { grid-area: due; } .bc-est { grid-area: est; justify-self: end; }
  .brow .grip { display: none; }
  .add-row-b, .add-sub { grid-template-areas: 'task task'; }
  .brow.sub .bc-task { padding-left: 16px; }
}

/* files */
.files { display: grid; gap: 12px; margin-top: 12px; }
.drop { border: 1px dashed var(--fg); padding: 22px; display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer; font-size: 15px; }
.drop:hover, .drop.over { background: var(--soft); }
.drop .mute { font-size: 13px; }
.wide-drop { margin-bottom: 18px; }
.flist { list-style: none; margin: 0; padding: 0; }
.flist li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.flist.compact li { grid-template-columns: 20px minmax(0, 1fr) auto auto; padding: 6px 0; }
.flist .thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); }
.ficon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--mute); }
.flist.compact .ficon { width: 20px; height: 20px; border: 0; }
.ficon svg { width: 18px; height: 18px; }
.fmeta { display: grid; gap: 2px; min-width: 0; }
.fmeta .link { text-align: left; overflow-wrap: anywhere; }
.fmeta .mute { font-size: 12px; }

/* calendar */
.cal-filters { display: grid; gap: 10px; margin-bottom: 18px; }
.presets .saved { display: inline-flex; }
.presets .saved .x { background: none; border: 1px solid var(--line); border-left: 0; cursor: pointer; color: var(--mute); padding: 0 7px; }
.presets .saved .x:hover { color: var(--red); }
.cal-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.cal-nav h2 { margin: 0 6px; font-size: 22px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line); }
.mg-h { padding: 8px; font-size: 10px; color: var(--mute); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mg-c { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mg-c.out { background: var(--soft); }
.mg-c.out .mg-n { color: var(--dim); }
.mg-n { background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 13px; padding: 2px 4px; color: var(--fg); }
.mg-n:hover { background: var(--fg); color: var(--bg); }
.mg-c.today .mg-n { background: var(--fg); color: var(--bg); }
.mg-list { display: grid; gap: 2px; min-width: 0; }
.mg-list.big { gap: 6px; }
.ci { display: block; text-align: left; background: none; border: 0; padding: 2px 5px; font-size: 11px; line-height: 1.35; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); text-decoration: none; min-width: 0; }
.mg-list.big .ci { white-space: normal; font-size: 14px; padding: 6px 8px; }
.ci:hover { text-decoration: underline; }
.ci-keydate { background: var(--red); color: #fff; font-weight: 700; }
.ci-launch { background: var(--fg); color: var(--bg); font-weight: 700; }
.ci-event { border: 1px solid var(--fg); background: var(--soft); }
.ci-task::before { content: ''; display: inline-block; width: 6px; height: 6px; border: 1px solid var(--fg); margin-right: 5px; vertical-align: 1px; }
.ci-task.done { color: var(--dim); text-decoration: line-through; }
.ci-task.done::before { background: var(--dim); border-color: var(--dim); }
.ci-task.stuck { color: var(--red); }
.ci-more { background: none; border: 0; font-size: 11px; color: var(--mute); text-align: left; padding: 2px 5px; cursor: pointer; }
.lg-kd { background: var(--red); border-color: var(--red) !important; }
.lg-launch { background: var(--fg); }
.lg-ev { background: var(--soft); }
.lg-task { width: 8px !important; height: 8px !important; }
.lg-proj { background: var(--dim); border-color: var(--dim) !important; height: 6px !important; }
.lg-kdl { border: 0 !important; border-left: 2px dashed var(--red) !important; width: 2px !important; }
.lg-today { border: 0 !important; border-left: 2px solid var(--fg) !important; width: 2px !important; }
@media (max-width: 760px) { .mg-c { min-height: 70px; } .ci { font-size: 0; padding: 0; height: 6px; } .ci-task::before { display: none; } .ci-task { background: var(--fg); } .ci-task.done { background: var(--dim); } .mg-h { font-size: 9px; padding: 4px; } .ci-more { font-size: 10px; } }

.tl-legend { margin-bottom: 10px; }
.tl-wrap { overflow-x: auto; border: 1px solid var(--line-2); position: relative; }
.tl { min-width: calc(var(--w) + 200px); position: relative; }
.tl-row { display: grid; grid-template-columns: 200px var(--w); border-bottom: 1px solid var(--line); }
.tl-head { position: sticky; top: 0; background: var(--bg); z-index: 3; border-bottom: 1px solid var(--line-2); }
.tl-label { position: sticky; left: 0; z-index: 2; background: var(--bg); border-right: 1px solid var(--line-2); padding: 10px 12px; display: grid; gap: 2px; align-content: start; font-size: 14px; min-width: 0; }
.tl-label a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.tl-label a:hover { text-decoration: underline; }
.tl-label .mute { font-size: 11px; }
.tl-axis { position: relative; height: 52px; }
.tl-months { position: absolute; top: 0; left: 0; right: 0; height: 26px; }
.tl-months span { position: absolute; top: 0; height: 26px; padding: 6px 6px; font-variation-settings: 'wdth' 125; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 700; border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; }
.tl-ticks { position: absolute; top: 26px; left: 0; right: 0; height: 26px; border-top: 1px solid var(--line); }
.tl-ticks span { position: absolute; top: 0; height: 26px; font-size: 10px; color: var(--mute); padding: 6px 3px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tl-ticks span.we { background: var(--soft); }
.tl-body { position: relative; }
.tl-overlay { position: absolute; top: 0; bottom: 0; left: 200px; pointer-events: none; z-index: 1; }
.tl-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--fg); pointer-events: auto; }
.tl-kd { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--red); }
.tl-kd button { pointer-events: auto; position: absolute; top: 2px; left: 3px; background: var(--red); color: #fff; border: 0; font-size: 10px; font-weight: 700; padding: 2px 5px; cursor: pointer; white-space: nowrap; }
.tl-track { position: relative; }
.tl-proj { position: absolute; top: 4px; height: 6px; background: var(--dim); }
.tl-launch { position: absolute; top: 1px; width: 12px; height: 12px; background: var(--fg); transform: rotate(45deg); }
.tl-it { position: absolute; height: 22px; border: 1px solid var(--fg); background: var(--bg); padding: 0 5px; font-size: 11px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--fg); z-index: 2; }
.tl-it span { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
.tl-it:hover { background: var(--fg); color: var(--bg); }
.tl-task { background: var(--fg); color: var(--bg); }
.tl-task:hover { background: var(--mute); }
.tl-task.done { background: var(--soft); color: var(--dim); border-color: var(--dim); }
.tl-task.stuck { background: var(--red); border-color: var(--red); color: #fff; }
.tl-event { background: var(--soft); }
@media (max-width: 640px) { .tl-row { grid-template-columns: 120px var(--w); } .tl { min-width: calc(var(--w) + 120px); } .tl-overlay { left: 120px; } .tl-label { padding: 8px; font-size: 12px; } }

/* stock: catalogue, list, product page */
.totals-line { font-size: 13px; margin: 0 0 14px; }
.catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.catalogue.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.pcat { display: grid; text-decoration: none; border: 1px solid var(--line); background: var(--bg); }
.pcat:hover { border-color: var(--fg); }
.pcat.disc { opacity: .55; }
.pcat-img { aspect-ratio: 4 / 5; max-width: 100%; position: relative; background: var(--soft); overflow: hidden; }
.pcat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcat-img .badge { position: absolute; top: 8px; left: 8px; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 34px; color: var(--dim); text-transform: uppercase; }
.noimg.big { font-size: 64px; }
.pcat-b { padding: 12px; display: grid; gap: 4px; }
.pcat-b b { font-variation-settings: 'wdth' 115; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; }
.pcat-b .mute { font-size: 12px; }
.pcat-row { display: flex; justify-content: space-between; font-size: 14px; }
.sizes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sz { display: inline-flex; gap: 4px; align-items: baseline; border: 1px solid var(--line); padding: 1px 5px; font-size: 11px; font-variation-settings: 'wdth' 115; }
.sz b { font-weight: 700; }
.sz.low { border-color: var(--fg); }
.sz.out { border-color: var(--red); color: var(--red); text-decoration: line-through; }
.sz.out b { text-decoration: none; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--fg); }
.prod { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 40px; margin-bottom: 8px; }
.prod-main { aspect-ratio: 4 / 5; max-width: 100%; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.prod-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.prod-thumbs button { padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; aspect-ratio: 1; max-width: 100%; overflow: hidden; }
.prod-thumbs button.on { border: 2px solid var(--fg); }
.prod-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-up { margin-top: 10px; }
.prod-info { display: grid; gap: 14px; align-content: start; }
.prod-info h1 { margin: 0; font-size: clamp(28px, 4.5vw, 46px); }
.prod-price { font-size: 26px; font-weight: 700; }
@media (max-width: 860px) { .prod { grid-template-columns: 1fr; gap: 20px; } }
.cell-in { background: transparent; border: 1px solid var(--line); padding: 6px 8px; width: 100%; max-width: 160px; }
.cell-in:focus { border-color: var(--fg); outline: none; }
tr.row-out td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tfoot td { border-bottom: 0; border-top: 1px solid var(--line-2); }

/* money */
.bulk { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: var(--inv); color: var(--inv-fg); margin-bottom: 12px; position: sticky; top: 112px; z-index: 5; }
.bulk.on { display: flex; }
.bulk .btn { background: var(--inv-fg); color: var(--inv); border-color: var(--inv-fg); }
.bulk .btn.ghost { background: transparent; color: var(--inv-fg); }
.bulk .btn.danger { background: transparent; color: #ff8a80; border-color: #ff8a80; }
.bulk .link { color: var(--inv-fg); }
@media (max-width: 760px) { .bulk { top: 56px; } }
.tx td:first-child, .tx th:first-child { padding-right: 4px; }
.tx input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--fg); }
.tx tr.draft td { background: var(--soft); }
.clip svg { width: 16px; height: 16px; }
.export { max-width: 760px; display: grid; gap: 16px; }
.ex-preview { border-left: 3px solid var(--fg); padding: 8px 14px; margin: 0; background: var(--soft); }
.wide-in { width: 110px; }
tr.paused td { color: var(--dim); }
.doc { border-top: 1px solid var(--line-2); padding-top: 18px; font-size: 16px; }

/* round 4 fixes */
.ov-main { display: grid; gap: 36px; align-content: start; min-width: 0; }
.ov-main h2.sec { margin-top: 0; }
.bc-due { position: relative; }
.due-btn { background: transparent; border: 1px solid transparent; padding: 5px 4px; font-size: 13px; color: var(--fg); text-align: left; width: 100%; cursor: pointer; }
.due-btn:hover, .due-btn:focus-visible { border-color: var(--fg); outline: none; }
.due-btn.late { color: var(--red); }
.due-btn.mute { color: var(--mute); }
.due-in { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; }
.sizes-ed + .ov { margin-top: 48px; }
.pcat { grid-template-rows: auto 1fr; }
.pcat-b { align-content: start; }
.flist li.empty { display: block; color: var(--mute); }
.tbl-wrap td:first-child, .tbl-wrap th { white-space: nowrap; }
.st-chip[aria-pressed=false] { background: var(--bg); color: var(--fg); border-color: var(--line-2); }
.st-chip.st-stuck[aria-pressed=false] { color: var(--red); }
.st-chip[aria-pressed=true]:not(.st-stuck) { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (max-width: 520px) { .seg { max-width: 100%; overflow-x: auto; } .seg button, .seg a { padding: 8px 9px; } }
