/* Hemetix Funding — bold minimalism: white, #f8f8f8, near-black */
:root {
  --bg: #f8f8f8; --panel: #ffffff; --ink: #0a0a0a; --ink2: #3a3a3a; --muted: #767676; --line: #e9e9e9; --line2: #d9d9d9;
  --good: #0f7a43; --warn: #9a5b00; --bad: #b42318; --info: #1d4ed8;
  --r: 14px; --pad: 24px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 10px; }
h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 16px; }
h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
code.key { display: inline-block; font-size: 15px; letter-spacing: 0.06em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badtext { color: var(--bad); font-weight: 600; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Header */
.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar { display: flex; align-items: center; gap: 28px; height: 68px; }
.who button { white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.logo { height: 23px; width: auto; max-width: 220px; display: block; }
.mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 900; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a.on { color: var(--ink); background: var(--bg); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 10px 10px 0 0; }
.who { margin-left: auto; display: flex; gap: 8px; }
.who form { margin: 0; }

/* Burger drawer (mobile) */
.burger { display: none; }
.burger > summary, .bell > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--ink); position: relative; }
.burger > summary::-webkit-details-marker, .bell > summary::-webkit-details-marker { display: none; }
.burger > summary:hover, .bell > summary:hover, .bell[open] > summary { background: var(--bg); }
.burger[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(10,10,10,.38); z-index: 20; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); background: var(--panel); z-index: 21; padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; box-shadow: 8px 0 30px rgba(0,0,0,.12); overflow-y: auto; }
.drawerhead { padding: 4px 8px 14px; border-bottom: 1px solid var(--line); }
.drawer nav { display: flex; flex-direction: column; gap: 2px; }
.drawer nav a, .drawersub > summary { display: block; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 16px; text-decoration: none; color: var(--ink); }
.drawer nav a.subl { font-weight: 500; font-size: 15px; padding-left: 24px; color: var(--ink2); }
.drawer nav a.on, .drawersub > summary.on { background: var(--bg); }
.drawer nav a.subl.on { color: var(--ink); font-weight: 700; }
.drawersub > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.drawersub > summary::-webkit-details-marker { display: none; }
.drawersub > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.drawersub[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.drawersub { display: flex; flex-direction: column; gap: 2px; }
.draweractions { margin-top: auto; display: flex; gap: 8px; }
.draweractions form { flex: 1; margin: 0; }
.draweractions button { width: 100%; }
body.locked { overflow: hidden; }

/* Bell */
.bell { position: relative; margin-left: auto; }
.bell .count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; border: 2px solid var(--panel); }
.bell .panel { position: absolute; right: 0; top: 50px; width: 360px; max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0,0,0,.14); z-index: 22; }
.panelhead { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.panelhead a { font-size: 13px; font-weight: 600; }
.bell ul { list-style: none; margin: 0; padding: 4px 0; }
.bell li a { display: block; padding: 12px 16px; text-decoration: none; border-top: 1px solid var(--line); }
.bell li:first-child a { border-top: 0; }
.bell li a:hover { background: var(--bg); }
.bell li.new a { box-shadow: inset 3px 0 0 var(--bad); }
.bell li b { display: block; font-size: 14px; line-height: 1.35; }
.bell li span { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px; }
.bell li em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }
.bell .empty { padding: 16px; margin: 0; }
.bell + .who { margin-left: 0; }

/* Settings tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -12px 0 28px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }

/* Alerts bar */
.alerts { background: var(--ink); color: #fff; }
.alerts .wrap { display: flex; gap: 18px; align-items: baseline; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.alerts strong { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; white-space: nowrap; }
.alerts ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 14px; }
.alerts a { color: #fff; text-decoration-color: rgba(255,255,255,.35); }
.alerts span { color: rgba(255,255,255,.65); }
.alerts li.hot span { color: #ffb4a8; font-weight: 600; }
.alerts em { font-style: normal; font-size: 11px; font-weight: 800; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 0 7px; margin-left: 4px; }

main { padding-top: 40px; padding-bottom: 56px; }
footer { color: var(--muted); font-size: 12px; padding-bottom: 32px; }
.head { margin-bottom: 28px; }
.back { margin: 0 0 18px; font-size: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; margin-bottom: 20px; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cardhead a { font-size: 14px; font-weight: 600; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.split.wide { grid-template-columns: 1.4fr 1fr; }
.split.three { grid-template-columns: repeat(3, 1fr); }
.split .card { margin-bottom: 0; }
.split + .card, .card + .split { margin-top: 20px; }

/* Forms */
form label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
textarea { resize: vertical; }
button, .button { display: inline-block; font: inherit; font-weight: 700; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 10px; padding: 10px 18px; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #2a2a2a; }
button.wide { width: 100%; padding: 12px; }
button.ghost { background: var(--panel); color: var(--ink); border-color: var(--line2); font-weight: 600; padding: 8px 14px; }
button.ghost:hover { border-color: var(--ink); }
button.danger { background: var(--bad); border-color: var(--bad); }
.linkbtn { background: none; border: 0; color: var(--bad); padding: 0 0 0 8px; font-weight: 600; font-size: 13px; }
.linkbtn:hover { background: none; text-decoration: underline; }
.ghostlink { color: var(--muted); padding: 10px 8px; font-weight: 600; }
form.inline { display: inline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card form + form { margin-top: 10px; }
fieldset { border: 0; padding: 0; margin: 4px 0 18px; }
legend { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
label.check input, label.tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
label.tick { display: inline-flex; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; margin-top: 20px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 22px; font-weight: 600; background: var(--panel); border: 1px solid var(--line); border-left-width: 4px; }
.flash.good { border-left-color: var(--good); }
.flash.bad { border-left-color: var(--bad); color: var(--bad); }
.flash.info { border-left-color: var(--ink); }

.login { max-width: 420px; margin: 32px auto; padding: 36px; }
.login.wide { max-width: 580px; }
.loginlogo { margin-bottom: 18px; }
.loginlogo .mark { width: 44px; height: 44px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; text-decoration: none; }
.stat:hover { border-color: var(--ink); }
.stat b { display: block; font-size: 42px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* Lists */
.soon { list-style: none; margin: 0; padding: 0; }
.soon li { display: grid; grid-template-columns: 150px 1fr auto; gap: 20px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.soon li:first-child { border-top: 0; padding-top: 4px; }
.soon .what a { font-weight: 700; font-size: 16px; text-decoration: none; }
.soon .what a:hover { text-decoration: underline; }
.date { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.left { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.left.soon { color: var(--warn); }
.left.urgent { color: var(--bad); }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 170px 1fr 28px; gap: 12px; align-items: center; font-size: 14px; }
.lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.fill { display: block; height: 100%; background: var(--ink); border-radius: 6px; }
.w0 { width: 4%; } .w1 { width: 10%; } .w2 { width: 20%; } .w3 { width: 30%; } .w4 { width: 40%; } .w5 { width: 50%; }
.w6 { width: 60%; } .w7 { width: 70%; } .w8 { width: 80%; } .w9 { width: 90%; } .w10 { width: 100%; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line2); color: var(--ink2); background: var(--panel); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.badge.good::before { background: var(--good); } .badge.warn::before { background: var(--warn); }
.badge.bad::before { background: var(--bad); } .badge.info::before { background: var(--info); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; margin: 4px 4px 0 0; background: var(--bg); border-radius: 6px; color: var(--ink2); white-space: nowrap; }

/* Filters */
.filterbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px; }
.filterbox > summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.filterbox > summary::-webkit-details-marker { display: none; }
.filterbox > summary::after { content: "+"; font-weight: 800; font-size: 18px; line-height: 1; }
.filterbox[open] > summary::after { content: "−"; }
.filterbox[open] > summary { border-bottom: 1px solid var(--line); }
.filterbox .filters { border: 0; margin: 0; border-radius: 0 0 var(--r) var(--r); }
.filters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 14px; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 20px 6px; margin-bottom: 18px; }
.filters .grow { grid-column: span 4; }
.filters .check { grid-column: span 4; margin-bottom: 14px; }
.filters .actions { grid-column: span 2; display: flex; justify-content: flex-end; align-items: center; margin-bottom: 14px; }

/* Tables */
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.tablewrap.flat { border: 0; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 700; }
td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfc; }
.pname { font-weight: 700; font-size: 15px; text-decoration: none; }
.pname:hover { text-decoration: underline; }
.score { font-size: 18px; font-weight: 800; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }

/* Application checklist */
.checklist .pct { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.checklist .progress { display: grid; gap: 8px; margin: 4px 0 10px; }
.checklist .progress .track { height: 10px; }
.checklist .legend { margin: 0 0 14px; }
.who { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; }
.who.you { background: var(--ink); color: #fff; }
.who.agent { background: var(--bg); color: var(--ink2); border: 1px solid var(--line2); }
.phase { border-top: 1px solid var(--line); }
.phase > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.phase > summary::-webkit-details-marker { display: none; }
.phase > summary .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 1.5px solid var(--line2); color: var(--muted); flex: none; }
.phase > summary .muted { margin-left: auto; }
.phase.current > summary .num { border-color: var(--ink); color: var(--ink); }
.phase.complete > summary .num { background: var(--ink); border-color: var(--ink); color: #fff; }
.phase.empty { opacity: .55; }
.steps-list { list-style: none; margin: 0 0 12px; padding: 0 0 0 38px; display: grid; gap: 4px; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.steps-list li.done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line2); }
.steps-list .tick input { margin-top: 2px; }
.stepbody { flex: 1; min-width: 0; }
.stepbody .more { margin-top: 2px; }
.stepbody .more > summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; }
.stepbody .more > summary::-webkit-details-marker { display: none; }
.stepbody .more[open] > summary { color: var(--ink); }
.noteform { display: flex; gap: 8px; margin: 8px 0 4px; }
.noteform input { margin: 0; }
.addstep { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.addstep input, .addstep select { margin: 0; }
@media (max-width: 680px) { .addstep { grid-template-columns: 1fr 1fr; } .addstep input, .addstep button { grid-column: span 2; } .steps-list { padding-left: 0; } }

dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 18px; margin: 0 0 20px; }
dt { color: var(--muted); font-size: 13px; font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }
.steps { padding-left: 18px; }
.steps li { margin-bottom: 6px; }
.log { list-style: none; padding: 0; margin: 0 0 12px; font-size: 14px; }
.log li { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.log li:first-child { border-top: 0; }

@media (max-width: 960px) {
  .split, .split.wide, .split.three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .grow, .filters .check, .filters .actions { grid-column: span 2; }
  .grid3 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 120px 1fr 24px; }
}
@media (max-width: 1023px) {   /* everything below desktop: pages live in the burger menu */
  .burger { display: block; margin-left: -8px; }
  .topbar .nav, .topbar .who, .tabs { display: none; }
  .topbar { gap: 8px; height: 60px; }
  .brand { gap: 8px; font-size: 16px; }
  .bell .panel { position: fixed; left: auto; right: 12px; top: 62px; width: min(380px, calc(100vw - 24px)); }
}
@media (max-width: 680px) {
  :root { --pad: 16px; }
  .logo { height: 18px; }
  main { padding-top: 26px; }
  .card { padding: 18px; }
  .soon li { grid-template-columns: 1fr; gap: 6px; }
  .soon .end { order: -1; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  td { border: 0; padding: 4px 16px; }
  td::before { content: attr(data-l); display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
  .matrix td { display: inline-block; width: auto; padding: 6px 12px 6px 16px; text-align: left; }
  .matrix td:first-child { display: block; width: 100%; }
  dl { grid-template-columns: 1fr; gap: 2px; }
  dd { margin-bottom: 10px; }
}
