:root {
  --ground: #F5F6F1; --surface: #FFFFFF; --ink: #12202B; --muted: #4B5A66; --line: #E2E5DD; --line-strong: #C9CFC4;
  --green: #0B6B5A; --green-dark: #074A3E; --green-soft: #E3F1EC; --mint: #3DDC97;
  --amber: #9A5B00; --amber-ink: #6B3F00; --amber-soft: #FBF1DC; --gold: #F2B544;
  --warn-soft: #FCE9DF; --warn-ink: #8A3108; --gray-soft: #EEF0EA;
  --display: 'Bricolage Grotesque', Georgia, serif; --body: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; }
a { color: var(--green); } a:hover { color: var(--green-dark); }
h1, h2 { font-family: var(--display); margin: 0; }
h2 { font-size: 22px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.main { padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 22px; }
.foot { padding-bottom: 32px; color: var(--muted); font-size: 13px; }

/* Header */
.top { background: var(--ink); color: #fff; }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-dark, .brand-dark:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--mint); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 18px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 18px; }
.pill-green { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--mint); padding: 3px 10px; border-radius: 999px; }
.me { display: flex; align-items: center; gap: 14px; }
.me-text { text-align: right; }
.me-name { font-weight: 700; }
.me-sub { font-size: 13px; color: #C9D3DA; }
.link-light { background: none; border: 1px solid #4B5A66; color: #DCE4E9; border-radius: 10px; padding: 8px 12px; min-height: 40px; font: inherit; cursor: pointer; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 10px; }
.tab { color: #DCE4E9; text-decoration: none; padding: 10px 14px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.tab.active { background: #fff; color: var(--ink); font-weight: 700; }

/* Layout helpers */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.align-start { align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gap-6 { gap: 6px; }
.row-between { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.grow { flex: 1 1 220px; }
.narrow { max-width: 720px; }
.center { text-align: center; }

/* Type */
.display { font-size: clamp(30px, 5vw, 42px); font-weight: 800; line-height: 1.1; }
.display-sm { font-size: clamp(26px, 4vw, 34px); font-weight: 800; line-height: 1.15; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.lead-light { font-size: 17px; max-width: 720px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; } .xsmall { font-size: 12.5px; }
.strong { font-weight: 700; }
.big-text { font-size: 17px; }
.light { color: #DCE4E9; }
.eyebrow { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.eyebrow.light { color: #C9D3DA; }
.green { color: var(--green); } .amber { color: var(--amber); } .mint { color: var(--mint); } .gold { color: var(--gold); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi-num { font-family: var(--display); font-weight: 800; font-size: 34px; margin-top: 4px; line-height: 1.15; }
.kpi-num.big { font-size: 42px; } .kpi-num.huge { font-size: 54px; }
.focus-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ground); }
.hero { padding: 30px; }
.tier-name { font-family: var(--display); font-weight: 800; font-size: 22px; }
.perks { margin: 4px 0 0; padding-left: 18px; }
.perks li { margin: 4px 0; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 18px; min-height: 48px; font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--green); color: #fff; } .btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); } .btn-ghost:hover { color: var(--ink); background: var(--gray-soft); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); align-self: flex-start; } .btn-gold:hover { color: var(--ink); }
.btn-lg { min-height: 56px; font-size: 17px; }
.btn-small { min-height: 40px; padding: 8px 12px; font-size: 14px; background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn[disabled] { opacity: .6; cursor: progress; }
.label { font-weight: 700; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
textarea.input { resize: vertical; }
.input:focus, .btn:focus-visible, .tab:focus-visible, .pill:focus-visible { outline: 3px solid #7FB7FF; outline-offset: 2px; }
.file { padding: 12px; border: 1px dashed #9AA59A; border-radius: 12px; background: var(--ground); min-height: 48px; width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 6px; }
.check-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; min-height: 44px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; cursor: pointer; }
.choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); }
.choice:has(input:checked) { border: 2px solid var(--green); background: var(--green-soft); padding: 13px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; }
.pill { text-decoration: none; color: var(--ink); border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 8px 16px; min-height: 44px; display: inline-flex; align-items: center; }
.pill-active { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.pill-active:hover { color: #fff; }
.seg { display: inline-flex; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { border: 1px solid #4B5A66; color: #fff; border-radius: 999px; padding: 8px 16px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }
.seg input:checked + span { background: var(--mint); color: var(--ink); border-color: var(--mint); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid #7FB7FF; outline-offset: 2px; }
.range { width: 100%; accent-color: var(--mint); min-height: 44px; }
.sim { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: center; }

/* Chips, badges, alerts */
.chip { display: inline-block; white-space: nowrap; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.chip-green { background: var(--green-soft); color: var(--green-dark); }
.chip-amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip-gray { background: var(--gray-soft); color: #33424D; }
.badge { padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.badge-on { background: var(--amber-soft); color: var(--amber-ink); }
.badge-off { background: #F0F2EC; color: #5C6A74; font-weight: 500; border: 1px dashed var(--line-strong); }
.alert { padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.alert-ok { background: var(--green-soft); color: var(--green-dark); }
.alert-warn { background: var(--amber-soft); color: var(--amber-ink); }
.alert-error { background: var(--warn-soft); color: var(--warn-ink); }
#check-result:empty { display: none; }

/* Progress */
.bar { height: 16px; border-radius: 999px; background: #E9ECE4; overflow: hidden; }
.bar-dark { background: #2A3A47; height: 20px; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--green); }
.mint-bg { background: var(--mint); }

/* Kanban */
.kanban-scroll { overflow-x: auto; padding-bottom: 6px; }
.kanban { display: flex; gap: 12px; min-width: 1180px; }
.kanban-col { flex: 1 1 0; min-width: 160px; background: #ECEFE7; border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 0; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }

/* Table */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 680px; margin-top: 10px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid #EEF0EA; vertical-align: top; }

/* Login */
.login { max-width: 460px; margin: 6vh auto 0; display: flex; flex-direction: column; gap: 22px; }
.login-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; }

/* Prose */
.prose h2 { font-size: 20px; margin-top: 18px; }
.prose p, .prose li { font-size: 16px; }
.prose { display: flex; flex-direction: column; gap: 8px; }

/* Agreement & account */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.agreement-text h2:first-child { margin-top: 0; }
@media (min-width: 900px) { .sticky { position: sticky; top: 16px; } }
@media print {
  .top, .no-print, #print-btn, .foot, .alert { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
  .card.dark { color: var(--ink); background: #fff; }
  .card.dark .light { color: var(--ink); }
  .grid-2 { display: block; }
}
.agreement-text p { margin: 0 0 6px; }
.choice input { flex-shrink: 0; }
.alert.row-between { flex-wrap: wrap; }
.alert .btn { white-space: nowrap; }
