:root {
  --bg: #f4f4f1; --card: #fff; --ink: #1b1b1f; --muted: #6b6b73; --line: #e3e3de;
  --accent: #c8102e; --accent-ink: #fff; --soft: #f8f8f5;
  --st-research: #7c5cff; --st-test: #e58a00; --st-mvp: #0a84ff; --st-operational: #1a9c5b; --st-stopped: #8a8a92; --st-done: #1a9c5b;
  --danger: #c8102e; --warn: #e58a00; --ok: #1a9c5b;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px -12px rgba(0,0,0,.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: .82em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.err { color: var(--danger); min-height: 1.2em; margin: .5rem 0 0; font-size: .9em; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.x { border: 0; background: none; color: var(--muted); font-size: 1.05em; padding: 0 .3rem; line-height: 1; }
.x:hover { color: var(--danger); }

/* gate */
body.gate { display: grid; place-items: center; min-height: 100vh; }
.gate-card { background: var(--card); padding: 2rem 2.2rem; border-radius: 16px; box-shadow: var(--shadow); width: min(92vw, 360px); text-align: center; }
.gate-card h1 { margin: .6rem 0 .2rem; font-size: 1.4rem; }
.gate-card p { margin: 0 0 1rem; }
.gate-logo, .brand-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.gate-card input { width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .6rem; }
.gate-card button { width: 100%; padding: .7rem; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; }

/* layout */
header.top { position: sticky; top: 0; z-index: 5; background: rgba(244,244,241,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1500px; margin: 0 auto; padding: .6rem 1.2rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; }
.brand-logo { width: 32px; height: 32px; font-size: 1rem; border-radius: 9px; }
nav.tabs { display: flex; gap: .2rem; margin-left: .5rem; }
nav.tabs a { text-decoration: none; padding: .4rem .8rem; border-radius: 8px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; }
nav.tabs a.active { background: var(--ink); color: #fff; }
.badge { background: var(--accent); color: #fff; font-size: .72em; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; min-width: 1.4em; text-align: center; }
.who { display: flex; align-items: center; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .9em; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72em; font-weight: 700; color: #fff; flex: 0 0 auto; }
.avatar.Hady { background: #0a84ff; } .avatar.Johann { background: #e58a00; } .avatar.none { background: #999; } .avatar.Claude { background: #7c5cff; }
.via { display: inline-block; font-size: .68em; font-weight: 700; letter-spacing: .04em; color: #7c5cff; border: 1px solid #d6cdff; background: #f3f0ff; border-radius: 4px; padding: 0 .3rem; margin-left: .35rem; vertical-align: middle; }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { padding: .7rem 0; border-top: 1px solid var(--line); }
.updates li:first-child { border-top: 0; }
.uhead { display: flex; align-items: center; gap: .4rem; font-size: .88em; }
.uhead time { color: var(--muted); font-size: .9em; margin-left: .3rem; }
.aud { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; font-size: .74em; padding: .05rem .5rem; color: var(--muted); margin-left: .4rem; }
.aud.johann { color: #7a4b00; background: #fff4e0; border-color: #f2d6a3; }
.ubody { white-space: pre-wrap; margin-top: .3rem; font-size: .95em; line-height: 1.5; }
.upd-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; resize: vertical; }
.upd-form { margin-bottom: .8rem; }
.pcard .lastupd { font-size: .82em; line-height: 1.35; color: #444; border-left: 3px solid #d6cdff; padding-left: .5rem; }
.ms-strip { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: .2rem; }
.ms-chip { flex: 0 0 auto; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; min-width: 150px; max-width: 240px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: .45rem .6rem; font-size: .84em; text-align: left; }
.ms-chip:hover { border-color: #bbb; }
.ms-chip.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ms-chip.done { opacity: .7; }
.ms-chip .ms-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ms-chip .ms-meta { display: flex; gap: .6rem; color: var(--muted); font-size: .9em; }
.sum-upd { list-style: none; padding: 0; margin: 0; font-size: .9em; }
.sum-upd li { padding: .35rem 0; border-top: 1px dashed var(--line); }
.sum-upd li:first-child { border-top: 0; }
.sum-upd li div { white-space: pre-wrap; margin-top: .1rem; }
.linkbtn { background: none; border: 0; color: var(--muted); padding: .3rem .4rem; }
.linkbtn:hover { color: var(--ink); }
main { max-width: 1500px; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }
.page-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.btn { border: 1px solid var(--line); background: var(--card); padding: .45rem .8rem; border-radius: 9px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.btn:hover { border-color: #c9c9c2; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: .25rem .55rem; font-size: .85em; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; padding: .35rem .7rem; font-size: .9em; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.subtabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; overflow-y: hidden; }
.subtabs a { text-decoration: none; padding: .5rem .9rem; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.subtabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.cnt { font-size: .75em; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem; color: var(--muted); }
.stack { display: grid; gap: 1.2rem; }

/* board */
.summary, .stats-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stats-row { margin-bottom: .8rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; min-width: 130px; }
.stats-row .stat { background: var(--soft); flex: 1; }
.stat b { display: block; font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: .85em; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem; cursor: pointer; transition: transform .12s, box-shadow .12s; position: relative; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 14px 30px -12px rgba(0,0,0,.2); }
.pcard .head { display: flex; align-items: flex-start; gap: .6rem; }
.pcard h3 { margin: 0; font-size: 1.1rem; }
.status { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .75em; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.status.research { background: var(--st-research); } .status.test { background: var(--st-test); } .status.mvp { background: var(--st-mvp); }
.status.operational { background: var(--st-operational); } .status.stopped { background: var(--st-stopped); } .status.done { background: var(--st-done); }
.health { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #bbb; }
.health.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(26,156,91,.18); }
.health.down { background: var(--danger); box-shadow: 0 0 0 3px rgba(200,16,46,.2); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(200,16,46,.05); } }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: .2rem .6rem; font-size: .9em; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.deadline.over { color: var(--danger); font-weight: 600; } .deadline.soon { color: var(--warn); font-weight: 600; }
.progress { display: block; height: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.progress.warn i { background: var(--warn); } .progress.over i { background: var(--danger); }
.progress.sm { width: 60px; height: 5px; }
.budget-line { font-size: .82em; color: var(--muted); display: grid; gap: .25rem; }
.infra-list { list-style: none; margin: 0; padding: 0; font-size: .88em; }
.infra-list li { display: flex; justify-content: space-between; gap: .5rem; border-top: 1px dashed var(--line); padding: .2rem 0; }
.infra-list li:first-child { border-top: 0; }
.infra-list .total { font-weight: 700; border-top: 1px solid var(--line); }
.pcard .foot { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: auto; font-size: .85em; }
.pill { padding: .15rem .5rem; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.pill.over { background: #fdecef; border-color: #f5b8c3; color: var(--danger); }
.pill.review { background: #eef3ff; border-color: #c8d6f5; color: #2b5bd7; }
.links { display: flex; gap: .4rem; flex-wrap: wrap; }
.links a { font-size: .85em; color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: .15rem .5rem; border-radius: 6px; }
.links a:hover { color: var(--ink); border-color: #bbb; }
.pcard.add { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); box-shadow: none; min-height: 160px; }

/* cards & forms */
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; }
.card h2 { margin: 0 0 .8rem; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; }
.card h3 { margin: 1rem 0 .4rem; font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .8rem; }
.form label { display: flex; flex-direction: column; gap: .2rem; font-size: .82em; color: var(--muted); }
.form label.full { grid-column: 1 / -1; }
.form label.row { flex-direction: row; align-items: center; gap: .4rem; }
.form input, .form select, .form textarea { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: .95rem; }
.form textarea { min-height: 70px; resize: vertical; }
.form-actions { grid-column: 1 / -1; display: flex; gap: .5rem; justify-content: flex-end; align-items: center; }
.infra-edit { display: grid; grid-template-columns: 1.4fr 90px 1.6fr 32px; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.infra-edit input { padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.inline-add { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0 .8rem; align-items: center; }
.inline-add input, .inline-add select { padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; min-width: 0; flex: 1 1 120px; }
.inline-add input[type=date] { flex: 0 0 140px; } .inline-add input[type=number] { flex: 0 0 90px; }
.spend-add select { flex: 0 0 110px; }
.ghost { border: 1px solid transparent; background: transparent; padding: .25rem .4rem; border-radius: 6px; }
.ghost:hover, .ghost:focus { border-color: var(--line); background: #fff; }
.ghost.sm { font-size: .85em; color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9em; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8em; text-transform: uppercase; letter-spacing: .05em; padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: .35rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .r { text-align: right; }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; margin: .3rem 0; }
.label { display: inline-flex; align-items: center; gap: .15rem; font-size: .74em; font-weight: 600; padding: .08rem .45rem; border-radius: 999px; background: hsl(var(--h, 200) 70% 93%); color: hsl(var(--h, 200) 60% 30%); border: 1px solid hsl(var(--h, 200) 60% 82%); white-space: nowrap; }
.label .x { font-size: 1em; padding: 0 0 0 .1rem; color: inherit; opacity: .6; }
.mslist { list-style: none; margin: 0; padding: 0; }
.mslist li { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); }
.mslist li:first-child { border-top: 0; }
.mslist li.done .title { text-decoration: line-through; color: var(--muted); }
.mslist .title { font-weight: 500; cursor: text; }
.mslist .meta { font-size: .8em; color: var(--muted); display: flex; gap: .6rem; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: .7rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.kcol { background: #ecece8; border-radius: var(--radius); padding: .5rem; display: flex; flex-direction: column; gap: .4rem; min-height: 200px; border: 2px solid transparent; transition: border-color .12s; }
.kcol.over { border-color: var(--ink); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .82em; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .2rem .4rem; }
.kcol.doing .kcol-head { color: var(--st-mvp); } .kcol.review .kcol-head { color: #2b5bd7; } .kcol.done .kcol-head { color: var(--ok); }
.kcol-list { display: flex; flex-direction: column; gap: .4rem; min-height: 40px; }
.kcard { background: var(--card); border-radius: 9px; padding: .55rem .65rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: grab; border-left: 3px solid transparent; font-size: .92em; }
.kcard:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.kcard.p1 { border-left-color: var(--danger); } .kcard.p2 { border-left-color: var(--warn); } .kcard.p3 { border-left-color: #ccc; }
.kcard.dragging { opacity: .4; }
.kcol.done .kcard .ktitle { color: var(--muted); }
.ktitle { font-weight: 500; line-height: 1.3; }
.ktitle .proj, .task .title .proj, .tm-titlebar .proj { font-size: .78em; font-weight: 600; color: var(--muted); margin-right: .4rem; text-decoration: none; white-space: nowrap; }
.kmeta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .78em; color: var(--muted); margin-top: .35rem; }
.kmeta .ok { color: var(--ok); }
.kmeta a { text-decoration: none; }
.kmeta .ms { color: #2b5bd7; }
.due.over { color: var(--danger); font-weight: 600; } .due.soon { color: var(--warn); font-weight: 600; }
.kgroup { display: flex; flex-direction: column; gap: .4rem; }
.kgroup-h { display: flex; align-items: center; gap: .4rem; border: 0; background: none; padding: .25rem .3rem; font-size: .78em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; }
.kgroup-h .chev { display: inline-block; transition: transform .15s; }
.kgroup.open .kgroup-h .chev { transform: rotate(90deg); }
.kgroup-body { display: none; flex-direction: column; gap: .4rem; }
.kgroup.open .kgroup-body { display: flex; }
.kmarker { height: 3px; background: var(--ink); border-radius: 2px; margin: -.1rem 0; }
.kadd { border: 1px dashed #c9c9c2; background: none; border-radius: 8px; color: var(--muted); padding: .35rem; font-size: .85em; }
.kadd:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(5, 240px); } }

/* task list */
.tasklist { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: 26px 1fr auto; gap: .6rem; align-items: start; padding: .55rem .2rem; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.task .title { font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.task .meta { font-size: .8em; color: var(--muted); display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .15rem; }
.task .ctl { display: flex; gap: .2rem; align-items: center; }
.check { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--ok); flex: 0 0 auto; }
.prio { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.prio.p1 { background: var(--danger); } .prio.p2 { background: var(--warn); } .prio.p3 { background: #bbb; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; align-items: center; }
.filters button { border: 1px solid var(--line); background: var(--card); padding: .3rem .7rem; border-radius: 999px; font-size: .88em; }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters .sep { width: 1px; height: 20px; background: var(--line); margin: 0 .3rem; }
.group-h { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .3rem; }
.group-h.over { color: var(--danger); } .group-h.soon { color: var(--warn); }

/* money */
.money-stack { display: grid; gap: 1.2rem; }
.money-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .money-grid { grid-template-columns: 1fr; } }
.tbl.money th, .tbl.money td { white-space: nowrap; padding: .45rem .6rem; }
.tbl.money th:first-child, .tbl.money td:first-child { position: sticky; left: 0; background: var(--card); font-weight: 600; }
.tbl.money tbody tr:hover td { background: var(--soft); }
.tbl.money tr.total td { background: var(--soft); }
.proj-totals { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .9rem; }
.proj-totals .stat { flex: 1 1 150px; padding: .5rem .8rem; }
.proj-totals .stat b { font-size: 1.15rem; }
.tbl.pay td { vertical-align: middle; }
.tbl.pay select { max-width: 260px; }
.tbl tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.tbl td.warn { color: var(--warn); font-weight: 600; }
.tbl tr.warn-row td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tr.muted-row td { color: var(--muted); }
.minilist code { font-size: .85em; background: var(--soft); padding: .05rem .35rem; border-radius: 4px; }

.fold .fold-head { cursor: pointer; margin: 0; user-select: none; }
.fold .fold-head .chev { display: inline-block; transition: transform .15s; color: var(--muted); }
.fold.open .fold-head .chev { transform: rotate(90deg); }
.fold .fold-body { display: none; margin-top: .8rem; }
.fold.open .fold-body { display: block; }

/* github */
.ghlist { list-style: none; margin: 0; padding: 0; }
.ghrow { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-top: 1px solid var(--line); }
.ghrow:first-child { border-top: 0; }
.ghn { color: var(--muted); font-size: .85em; flex: 0 0 52px; padding-top: .1rem; text-decoration: none; }
.ghtitle { text-decoration: none; font-weight: 500; }
.ghtitle:hover { text-decoration: underline; }
.ghrow .meta { font-size: .8em; color: var(--muted); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .15rem; }

/* activity / comments */
.activity { list-style: none; margin: 0; padding: 0; font-size: .9em; }
.activity li { display: grid; grid-template-columns: 22px 1fr; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--line); align-items: start; }
.activity li:first-child { border-top: 0; }
.activity time { color: var(--muted); font-size: .85em; margin-left: .4rem; }
.activity a { text-decoration: none; } .activity a:hover { text-decoration: underline; }
.comments { list-style: none; margin: 0; padding: 0; }
.comments li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.comments li:first-child { border-top: 0; }
.chead { display: flex; gap: .5rem; align-items: center; font-size: .88em; }
.chead time { color: var(--muted); font-size: .85em; }
.cbody { white-space: pre-wrap; font-size: .93em; margin-top: .1rem; }
.comment-add { display: grid; grid-template-columns: 22px 1fr auto; gap: .6rem; align-items: start; margin-top: .6rem; }
.comment-add textarea { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: .5rem; align-items: center; padding: .25rem 0; }
.checklist li.done .txt { text-decoration: line-through; color: var(--muted); }
.checklist .txt { flex: 1; outline: none; padding: .1rem .3rem; border-radius: 4px; }
.checklist .txt:focus { background: var(--soft); }
.minilist { list-style: none; margin: .3rem 0 0; padding: 0; font-size: .85em; }
.minilist li { display: flex; gap: .4rem; align-items: center; padding: .2rem 0; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,25,.45); display: grid; place-items: center; z-index: 20; padding: 1rem; overflow-y: auto; }
.modal { background: var(--card); border-radius: 16px; padding: 1.2rem 1.4rem 1.4rem; width: min(96vw, 520px); box-shadow: 0 20px 60px -10px rgba(0,0,0,.4); max-height: 94vh; overflow-y: auto; }
.modal.wide { width: min(96vw, 960px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.modal h2 { margin: 0; }
.tm-titlebar { display: flex; align-items: center; gap: .6rem; }
.task-modal { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 1.4rem; }
@media (max-width: 760px) { .task-modal { grid-template-columns: 1fr; } }
.tm-main h4 { margin: 1.2rem 0 .4rem; font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tm-title { width: 100%; font-size: 1.25rem; font-weight: 600; border: 1px solid transparent; border-radius: 8px; padding: .3rem .4rem; margin-left: -.4rem; background: transparent; }
.tm-title:hover, .tm-title:focus { border-color: var(--line); background: #fff; outline: none; }
.tm-details { width: 100%; min-height: 90px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; margin-top: .4rem; }
.tm-side { display: flex; flex-direction: column; gap: .55rem; font-size: .9em; border-left: 1px solid var(--line); padding-left: 1.2rem; min-height: 100%; }
.tm-side label { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: .4rem; font-size: .82em; color: var(--muted); }
.tm-side label > * :not(.muted) { color: var(--ink); }
.tm-side select, .tm-side input { width: 100%; font-size: .95rem; }
.tm-side .inline-add { margin: .2rem 0 0; }
.who-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.who-pick button { padding: 1.2rem; border: 2px solid var(--line); border-radius: 14px; background: var(--soft); font-size: 1.1rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.who-pick button:hover { border-color: var(--ink); }
.who-pick .avatar { width: 44px; height: 44px; font-size: 1.1rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .55rem 1rem; border-radius: 999px; font-size: .9em; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 30; }
.toast.show { opacity: 1; }

/* ---------- management summary ---------- */
.summary { margin-top: 1.4rem; padding: 1rem 0 0; }
.summary > h2 { flex-wrap: wrap; padding: 0 1.2rem .9rem; margin: 0; border-bottom: 1px solid var(--line); width: 100%; box-sizing: border-box; }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sum-sec { padding: .9rem 1.2rem 1rem; border-left: 1px solid var(--line); border-top: 1px solid var(--line); min-width: 0; }
.sum-sec:nth-child(3n + 2), .sum-sec:first-child { border-left: 0; }
.sum-sec:first-child { grid-column: 1 / -1; border-top: 0; }
.sum-sec:nth-child(2), .sum-sec:nth-child(3), .sum-sec:nth-child(4) { border-top: 0; border-top: 1px solid var(--line); }
.sum-sec:last-child { grid-column: 2 / -1; }
.sum-sec:nth-child(5) { grid-column: 1 / -1; border-left: 0; }
.sum-sec:nth-child(6) { border-left: 0; }
.sum-sec h3 { margin: 0 0 .45rem; font-size: .76em; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.sum-sec p { margin: 0 0 .3rem; font-size: .93em; line-height: 1.55; }
.sum-sec ul { margin: 0; padding-left: 1.1rem; font-size: .9em; line-height: 1.6; }
.sum-sec li + li { margin-top: .15rem; }
.sum-sec .bad { color: var(--danger); font-weight: 600; }
.sum-sec textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; resize: vertical; font-size: .93em; }
.sum-tbl { font-size: .9em; }
.sum-tbl td, .sum-tbl th { padding: .4rem .5rem; white-space: nowrap; }
.sum-tbl td:first-child { padding-left: 0; } .sum-tbl th:first-child { padding-left: 0; }
.sum-tbl tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) { .sum-grid { grid-template-columns: 1fr; } .sum-sec { border-left: 0 !important; border-top: 1px solid var(--line) !important; grid-column: auto !important; } .sum-sec:first-child { border-top: 0 !important; } }

/* ---------- v3: date picker ---------- */
.dp { display: inline-flex; align-items: center; position: relative; min-width: 0; }
.dp-text { width: 112px; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px 0 0 8px; min-width: 0; background: #fff; }
.dp-text.ghost { border-color: transparent; background: transparent; border-radius: 6px 0 0 6px; }
.dp:hover .dp-text.ghost, .dp-text.ghost:focus { border-color: var(--line); background: #fff; }
.dp-btn { border: 1px solid var(--line); border-left: 0; background: var(--soft); border-radius: 0 8px 8px 0; padding: .4rem .45rem; color: var(--muted); line-height: 1.15; }
.dp .ghost + .dp-btn { border-color: transparent; background: transparent; }
.dp:hover .ghost + .dp-btn { border-color: var(--line); }
.form .dp-text { padding: .45rem .6rem; width: 100%; } .form .dp { width: 100%; }
.inline-add .dp { flex: 0 0 auto; } .inline-add .dp-text { padding: .4rem .55rem; }
.tm-side .dp-text { width: 100%; font-size: .95rem; }
.dp-pop { position: fixed; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px -10px rgba(0,0,0,.35); padding: .6rem; width: 292px; font-size: .88em; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.dp-nav { border: 0; background: var(--soft); border-radius: 6px; width: 28px; height: 28px; font-size: 1.1em; }
.dp-row { display: grid; grid-template-columns: 26px repeat(7, 1fr); gap: 2px; align-items: center; }
.dp-dow { color: var(--muted); font-size: .78em; text-align: center; margin-bottom: .15rem; }
.dp-dow .we { color: #b08a4a; }
.dp-kw { font-size: .7em; color: var(--muted); text-align: center; }
.dp-day { border: 0; background: none; border-radius: 7px; height: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; font-variant-numeric: tabular-nums; }
.dp-day:hover { background: var(--soft); }
.dp-day.other { color: #b5b5bb; } .dp-day.we { color: #8a7a5a; } .dp-day.we.other { color: #cfc6b5; }
.dp-day.today { font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent); }
.dp-day.sel { background: var(--ink); color: #fff; }
.dp-day .dots { display: flex; gap: 2px; height: 4px; }
.dp-day .dots i, .dp-legend i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; }
.dp-day.sel .dots i { background: #fff !important; }
i.dl { background: var(--danger); } i.ms { background: #2b5bd7; } i.tk { background: var(--warn); } i.st { background: var(--ok); }
.dp-quicks { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.dp-quick { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .15rem .5rem; font-size: .82em; }
.dp-quick:hover { border-color: var(--ink); }
.dp-legend { display: flex; gap: .7rem; margin-top: .4rem; font-size: .75em; color: var(--muted); }
.dp-legend span { display: inline-flex; align-items: center; gap: .25rem; }
.dp-legend i { width: 6px; height: 6px; }

/* ---------- v3: calmer project cards ---------- */
.board { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pcard { gap: .55rem; padding: .95rem 1.05rem .85rem; border-top: 3px solid var(--line); }
.pcard.research { border-top-color: var(--st-research); } .pcard.test { border-top-color: var(--st-test); } .pcard.mvp { border-top-color: var(--st-mvp); }
.pcard.operational { border-top-color: var(--st-operational); } .pcard.stopped { border-top-color: var(--st-stopped); opacity: .75; } .pcard.done { border-top-color: var(--st-done); }
.pcard .head { align-items: center; gap: .5rem; }
.pcard h3 { display: flex; align-items: center; gap: .45rem; font-size: 1.08rem; }
.pcard .dates { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .85em; color: var(--muted); }
.pcard .dates .arrow { color: #c5c5c0; }
.pcard .dates .next { color: #2b5bd7; margin-left: .2rem; }
.pcard .cost { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; font-size: .95em; padding: .45rem .6rem; background: var(--soft); border-radius: 8px; }
.pcard .cost b { font-size: 1.05em; } .pcard .cost small { color: var(--muted); font-size: .78em; }
.pcard .svcs { display: flex; gap: .3rem; flex-wrap: wrap; }
.svc { font-size: .76em; border: 1px solid var(--line); border-radius: 6px; padding: .1rem .4rem; color: #444; background: #fff; display: inline-flex; gap: .3rem; align-items: center; }
.svc em { font-style: normal; color: var(--muted); font-size: .9em; border-left: 1px solid var(--line); padding-left: .3rem; }
.pcard .ai { margin-top: -.15rem; }
.pcard .foot { margin-top: .1rem; font-size: .82em; }
.pcard.add { min-height: 120px; }

/* ---------- v3: timeline ---------- */
.tl { --tl-name: 190px; overflow: hidden; }
.tl-body, .tl-track { overflow: visible; }
.tl-months span:last-child, .tl-ms label, .tl-dl label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.tl-row { --lanes: 1; display: grid; grid-template-columns: var(--tl-name) 1fr; align-items: center; min-height: calc(62px + var(--lanes) * 17px); border-top: 1px solid var(--line); cursor: pointer; }
.tl-row:hover { background: var(--soft); }
.tl-headrow { border-top: 0; min-height: 26px; cursor: default; } .tl-headrow:hover { background: none; }
.tl-name { padding: .3rem .6rem .3rem .2rem; display: flex; flex-direction: column; line-height: 1.2; }
.tl-track { position: relative; height: calc(62px + var(--lanes) * 17px); }
.tl-headrow .tl-track { height: 26px; }
.tl-months { position: absolute; inset: 0; }
.tl-months span { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--line); font-size: .72em; color: var(--muted); padding-left: .3rem; white-space: nowrap; overflow: hidden; }
.tl-months span.cur { color: var(--ink); font-weight: 700; }
.tl-body { position: relative; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--accent); z-index: 2; pointer-events: none; }
.tl-today label { position: absolute; top: -1.1rem; left: -1.2rem; font-size: .68em; color: var(--accent); font-weight: 700; }
.tl-bar { position: absolute; top: 30px; height: 14px; border-radius: 7px; background: #d9d9d3; min-width: 6px; }
.tl-bar.research { background: color-mix(in srgb, var(--st-research) 45%, #fff); } .tl-bar.test { background: color-mix(in srgb, var(--st-test) 45%, #fff); }
.tl-bar.mvp { background: color-mix(in srgb, var(--st-mvp) 45%, #fff); } .tl-bar.operational { background: color-mix(in srgb, var(--st-operational) 45%, #fff); }
.tl-ms { position: absolute; top: 29px; width: 12px; height: 12px; margin-left: -6px; background: #2b5bd7; transform: rotate(45deg); border: 2px solid #fff; border-radius: 2px; z-index: 1; }
.tl-ms.done { background: var(--ok); } .tl-ms.over { background: var(--danger); }
.tl-lbl { position: absolute; top: 48px; margin-left: -4px; padding: calc(var(--lane, 0) * 17px + 2px) 0 0 8px; border-left: 1px solid #c9d3ee; font-size: .7em; line-height: 1.2; white-space: nowrap; color: #2b5bd7; }
.tl-lbl.done { color: var(--ok); border-color: #bfe3cf; } .tl-lbl.over { color: var(--danger); border-color: #f0b8c2; }
.tl-dl { position: absolute; top: 25px; width: 4px; height: 24px; margin-left: -2px; background: var(--ink); border-radius: 2px; z-index: 1; }
.tl-dl.over { background: var(--danger); } .tl-dl.soon { background: var(--warn); }
.tl-dl label { position: absolute; right: 8px; top: -20px; font-size: .7em; font-weight: 600; white-space: nowrap; color: var(--ink); }
.tl-dl.over label { color: var(--danger); } .tl-dl.soon label { color: var(--warn); }
.infra-edit { grid-template-columns: 1fr 2fr 32px; }

/* decision briefs (/Nivo) */
.brief main { max-width: 980px; }
.brief-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; color: var(--muted); font-size: .9em; margin-bottom: 1.2rem; }
.brief-meta a { color: var(--ink); }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.toc a { text-decoration: none; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: .9em; }
.toc a:hover { border-color: var(--ink); }
.brief-sec { margin-bottom: 1.4rem; scroll-margin-top: 70px; }
.brief-sec h2 { font-size: 1.25rem; margin-bottom: .4rem; }
.brief-sec h3 { margin: 1.1rem 0 .3rem; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.brief-sec p { margin: .3rem 0 .6rem; max-width: 72ch; }
.brief-sec ul { margin: .2rem 0 .6rem; padding-left: 1.2rem; max-width: 72ch; }
.brief-sec li { margin: .25rem 0; }
.brief-sec .tbl td:first-child { font-weight: 600; white-space: nowrap; }
.q { padding: .9rem 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q .qt { font-weight: 600; margin-bottom: .5rem; max-width: 72ch; }
.q .qt .tag { font-weight: 500; font-size: .78em; color: var(--muted); margin-left: .4rem; }
.opts { display: grid; gap: .35rem; }
.opt { display: flex; gap: .55rem; align-items: flex-start; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); cursor: pointer; }
.opt:hover { border-color: #c9c9c2; }
.opt.on { border-color: var(--ink); background: var(--card); }
.opt input { margin-top: .2rem; }
.q textarea { width: 100%; min-height: 84px; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px; resize: vertical; }
.q .when { font-size: .8em; color: var(--muted); margin-top: .35rem; }
.ans { padding: .45rem .7rem; border-radius: 9px; background: var(--soft); white-space: pre-wrap; max-width: 72ch; }
.ans.none { color: var(--muted); font-style: italic; }
.brief-progress { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9em; margin-bottom: .3rem; }
.brief-progress b { font-weight: 600; }

/* logins tab */
.lg-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lg-h { margin: 0; font-size: 1.05rem; }
.lg-search { padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--card); min-width: 200px; }
.lg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; align-items: start; }
.lg-none { grid-column: 1 / -1; margin: 0; }
.lg-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.lg-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .35rem; }
.lg-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; letter-spacing: .02em; flex: 0 0 auto; }
.lg-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lg-title b, .lg-title a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-title a { text-decoration: none; }
.lg-title a:hover { color: var(--ink); }
.lg-owner { display: inline-flex; align-items: center; gap: .3rem; font-size: .8em; padding: .15rem .55rem .15rem .2rem; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.lg-owner.shared { padding-left: .55rem; color: var(--muted); }
.lg-field { display: grid; grid-template-columns: 5.2rem 1fr auto; align-items: center; gap: .5rem; padding: .4rem .55rem; border-radius: 8px; background: var(--soft); min-height: 2.2rem; }
.lg-k { font-size: .72em; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lg-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9em; }
.lg-v.secret { letter-spacing: .1em; color: var(--muted); }
.lg-acts { display: inline-flex; gap: .15rem; opacity: .5; transition: opacity .15s; }
.lg-field:hover .lg-acts, .lg-acts:focus-within { opacity: 1; }
.icon-btn { border: 1px solid transparent; background: none; color: var(--muted); font-size: .78em; padding: .15rem .45rem; border-radius: 6px; }
.icon-btn:hover { border-color: var(--line); background: var(--card); color: var(--ink); }
.lg-note { font-size: .85em; color: var(--muted); white-space: pre-wrap; padding: .2rem .1rem 0; }
.lg-add { border-style: dashed; box-shadow: none; background: transparent; align-items: center; justify-content: center; flex-direction: row; min-height: 150px; color: var(--muted); font-weight: 500; gap: .5rem; }
.lg-add:hover { color: var(--ink); border-color: #c9c9c2; background: var(--card); }
.lg-plus { font-size: 1.4em; line-height: 1; }
.lg-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem .7rem; }
.lg-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .78em; color: var(--muted); min-width: 0; }
.lg-form .full { grid-column: 1 / -1; }
.lg-form input, .lg-form select, .lg-form textarea { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: .95rem; color: var(--ink); width: 100%; min-width: 0; }
.lg-form input:focus, .lg-form select:focus, .lg-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27,27,31,.08); }
.lg-form textarea { resize: vertical; }
.lg-form input[name=username], .lg-form input[name=password] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.lg-form-acts { display: flex; gap: .4rem; align-items: center; margin-top: .2rem; }
@media (max-width: 600px) { .lg-grid { grid-template-columns: 1fr; } .lg-search { flex: 1; min-width: 0; } }

/* wishes tab */
.wl-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; resize: vertical; font-size: .98em; line-height: 1.5; }
.wl-form textarea:focus, .wl-reply-edit textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27,27,31,.08); }
.wl-form-row { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; flex-wrap: wrap; }
.wl-form { margin-bottom: 1rem; }
.wl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.wl-item { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px; padding: .75rem .9rem; background: var(--card); }
.wl-item.planned { border-left-color: var(--st-mvp); }
.wl-item.done { border-left-color: var(--ok); opacity: .8; }
.wl-item.declined { border-left-color: var(--st-stopped); opacity: .7; }
.wl-head { display: flex; align-items: center; gap: .45rem; font-size: .88em; flex-wrap: wrap; }
.wl-head time { color: var(--muted); font-size: .92em; }
.wl-badge { font-size: .75em; font-weight: 600; padding: .08rem .5rem; border-radius: 999px; background: #fff4e0; color: #7a4b00; border: 1px solid #f2d6a3; }
.wl-badge.planned { background: #e8f2ff; color: #0a5bc4; border-color: #b9d6fb; }
.wl-badge.done { background: #e6f6ee; color: #136e41; border-color: #b4e2c9; }
.wl-badge.declined { background: var(--soft); color: var(--muted); border-color: var(--line); }
.wl-body { white-space: pre-wrap; margin: .45rem 0 .2rem; font-size: 1em; line-height: 1.5; }
.wl-reply { display: flex; gap: .5rem; margin: .5rem 0 .1rem; padding: .5rem .6rem; background: var(--soft); border-radius: 8px; }
.wl-reply-text { white-space: pre-wrap; font-size: .93em; }
.wl-reply-edit { margin-top: .5rem; }
.wl-reply-edit textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; resize: vertical; }
.wl-foot { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; flex-wrap: wrap; }
.wl-seg button { font-size: .8em; padding: .25rem .6rem; }
.wl-seg button.on.new { background: #c27400; } .wl-seg button.on.planned { background: var(--st-mvp); }
.wl-seg button.on.done { background: var(--ok); } .wl-seg button.on.declined { background: var(--st-stopped); }
.wl-task { font-size: .85em; text-decoration: none; padding: .2rem .55rem; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); }
.wl-task:hover { border-color: #c9c9c2; }
.wl-closed-toggle { margin-top: .9rem; }
.wl-closed-toggle + .wl-list { margin-top: .7rem; }
.wl-inbox { list-style: none; margin: 0 0 .4rem; padding: 0; }
.wl-inbox li { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .2rem; border-top: 1px solid var(--line); }
.wl-inbox li:first-child { border-top: 0; }
.wl-inbox a { flex: 1; text-decoration: none; }
.wl-inbox a:hover { text-decoration: underline; }
