:root {
  --bg: #0B0B0C; --surface: #16171A; --line: #2A2C31; --line2: #5A5D63;
  --text: #F2F1EE; --muted: #B5B8BD; --accent: #F39200; --accent-hi: #FFB347;
  --late: #FF7A6B; --late-bg: #2A1614; --late-line: #7A2E26;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 'Archivo', system-ui, sans-serif; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.late { color: var(--late); }
.pad { padding: 24px; }

header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.brand span { font-weight: 400; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
nav a { padding: 12px 14px; color: var(--muted); font-weight: 500; }
nav a.on { background: var(--line); color: var(--accent); font-weight: 600; }
main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.between { justify-content: space-between; }
.end { align-items: flex-end; }
.grow { flex: 1 1 240px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > .wide { flex: 999 1 520px; min-width: 0; }
.cols > .side { flex: 1 1 300px; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.card.hot { border-color: var(--accent); }
.card.bad { background: var(--late-bg); border-color: var(--late-line); color: #FF9C90; }
.card.bad .muted { color: #FF9C90; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.big { font-family: var(--mono); font-size: 32px; font-weight: 500; margin-top: 4px; }
.huge { font-family: var(--mono); font-size: clamp(40px, 8vw, 52px); font-weight: 500; line-height: 1.1; }
.huge small { font-size: 0.55em; color: var(--muted); }

.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.col > .head { display: flex; justify-content: space-between; padding: 0 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pcard { background: var(--surface); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pcard a { font-weight: 600; }
.empty { border: 1px dashed var(--line); padding: 14px; color: var(--muted); font-size: 13px; }
.bar { height: 6px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bar.thick { height: 12px; }
.bar.plain > i { background: var(--text); }
.bar.red > i { background: var(--late); }
.line { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.line .d { font-family: var(--mono); font-size: 14px; width: 64px; flex-shrink: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.steps button { display: block; width: 100%; min-height: 56px; text-align: left; padding: 10px 14px; background: var(--surface); border: 1px dashed var(--line2); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.steps button.done { background: var(--text); color: var(--surface); border: 1px solid var(--text); }
.steps button.now { background: var(--accent); color: var(--surface); border: 1px solid var(--accent); }
.steps button small { display: block; font-size: 12px; font-weight: 400; }

button, .btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .btn:hover { border-color: var(--text); color: var(--text); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
button.primary:hover, .btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--bg); }
button.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 0 10px; font-weight: 500; }
button.ghost:hover { color: var(--late); }
button.danger { color: var(--late); border-color: var(--late-line); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

form.f { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
label.fl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); flex: 1 1 140px; min-width: 0; }
label.fl.narrow { flex: 0 1 140px; }
label.fl.full { flex-basis: 100%; }
input, select, textarea { min-height: 44px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line2); color: var(--text); font: inherit; border-radius: 0; width: 100%; }
textarea { min-height: 88px; resize: vertical; }
label.check { display: flex; align-items: center; gap: 12px; min-height: 44px; flex-grow: 1; cursor: pointer; }
label.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex-shrink: 0; }
label.check.done span { color: var(--muted); text-decoration: line-through; }
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 600; }
details[open] > summary { margin-bottom: 12px; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; }
td { padding: 10px 8px; border-top: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 0; }
td.n, th.n { font-family: var(--mono); text-align: right; }

.login { max-width: 400px; margin: 10vh auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 20px; }
.login img { background: #fff; padding: 8px; width: 200px; height: 200px; }
.demo { background: var(--line); color: var(--text); font-size: 13px; padding: 8px 16px; text-align: center; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; font-weight: 600; max-width: calc(100vw - 32px); display: none; z-index: 10; }
#toast.show { display: block; }
.chrono { background: var(--text); color: var(--bg); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chrono button { background: var(--surface); color: var(--text); border-color: var(--surface); }
