:root {
  --ink: #12261c; --ink-2: #3f5a4c; --muted: #6b7f74; --line: #dfe8e2; --bg: #f6f8f5; --card: #ffffff;
  --brand: #0b5d3b; --brand-2: #0e7a4e; --accent: #b8f56b; --soft: #e8f3ec;
  --good: #137a47; --good-bg: #e2f5ea; --warn: #8a5a00; --warn-bg: #fff3d6; --bad: #b42318; --bad-bg: #fde8e6;
  --info: #1d5fa8; --info-bg: #e6f0fb; --mute-bg: #eef1ef;
  --r: 12px; --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 4px 16px rgba(16, 40, 28, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  body.app {
    --ink: #e7efe9; --ink-2: #b9c8bf; --muted: #8fa298; --line: #24352c; --bg: #0f1814; --card: #15211b;
    --soft: #183026; --good-bg: #14321f; --warn-bg: #3a2c0b; --bad-bg: #3b1714; --info-bg: #13263b; --mute-bg: #1c2a23;
    --good: #6fdc9d; --warn: #f2c264; --bad: #ff8a80; --info: #8ab8f0; --brand: #2fa36b; --brand-2: #3dbb7d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); } h2 { font-size: 1.25rem; } h3, .h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.warn-text { color: var(--warn); } .bad-text { color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .62em 1.1em; border-radius: 10px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-2); } .btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.sm { padding: .38em .75em; font-size: .85rem; border-radius: 8px; }
.btn.lg { padding: .8em 1.4em; font-size: 1.02rem; }
.btn.block { display: flex; width: 100%; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: var(--bad-bg); }
button.link { background: none; border: 0; color: var(--brand-2); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; flex-wrap: wrap; }
label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .6em .75em; border: 1px solid var(--line); border-radius: 9px;
  font: 400 .95rem var(--font); color: var(--ink); background: var(--card); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); outline: 2px solid color-mix(in srgb, var(--brand-2) 25%, transparent); }
form.inline input, form.inline select { display: inline-block; width: auto; margin: 0; padding: .35em .5em; font-size: .85rem; }
.w-xs { width: 4.5em !important; } .w-sm { width: 6.5em !important; } .w-md { width: 11em !important; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.stack { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem 1rem; align-items: end; }
.form-grid .span2 { grid-column: 1 / -1; }
.affix { display: flex; align-items: stretch; margin-top: .3rem; }
.affix input { margin: 0; border-radius: 9px 0 0 9px; }
.affix i { font-style: normal; padding: .6em .7em; background: var(--soft); border: 1px solid var(--line); border-left: 0; border-radius: 0 9px 9px 0; color: var(--muted); white-space: nowrap; font-weight: 400; }
input.otp { font: 600 1.5rem var(--mono); letter-spacing: .4em; text-align: center; }
.mini-forms { display: grid; gap: .6rem; }
.inline-form { display: flex; gap: .5rem; margin-top: 1rem; } .inline-form input { margin: 0; max-width: 280px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem; }

/* ---------- Pills, flash, cards, tables ---------- */
.pill { display: inline-block; padding: .12em .6em; border-radius: 99px; font-size: .78rem; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.mute { background: var(--mute-bg); color: var(--muted); }
.flash { padding: .75em 1em; border-radius: 10px; margin: 0 0 1rem; font-weight: 500; overflow-wrap: anywhere; }
.flash.ok { background: var(--good-bg); color: var(--good); } .flash.err { background: var(--bad-bg); color: var(--bad); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.card.flush { padding: 0; overflow-x: auto; } .card.narrow { max-width: 560px; } .pad { padding: 1.2rem; }
.card h2 { font-size: 1.05rem; } .card h3 { font-size: .95rem; margin-top: 1.2rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 50%, var(--card)); }
.tbl td { padding: .65rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; } .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0 0 1rem; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 0 1.2rem; }
.grid2 > *, .content { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.stat span { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat b { display: block; font-size: 1.6rem; margin: .2rem 0; font-variant-numeric: tabular-nums; } .stat b a { text-decoration: none; }
.stat small { color: var(--muted); }
.meter { margin-bottom: .9rem; } .meter-top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: .3rem; }
.bar { height: 8px; background: var(--mute-bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; } .bar i.hot { background: var(--bad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tile { display: grid; gap: .1rem; padding: .7rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--mute-bg); border-left: 4px solid var(--muted); }
.tile b { overflow: hidden; text-overflow: ellipsis; } .tile span { font-size: .78rem; text-transform: lowercase; } .tile small { font-size: .72rem; color: var(--muted); }
.tile.running { background: var(--good-bg); border-color: var(--good); } .tile.error, .tile.suspended { background: var(--bad-bg); border-color: var(--bad); }
.tile.stopped { border-color: var(--warn); } .tile.creating { background: var(--info-bg); border-color: var(--info); }
.toolbar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.search { display: flex; gap: .5rem; flex: 1; max-width: 520px; } .search input { margin: 0; }
pre.logs, pre.mail { background: #0d1611; color: #cfe8d8; padding: 1rem; border-radius: 10px; overflow: auto; max-height: 70vh; font: .8rem/1.5 var(--mono); white-space: pre-wrap; }
pre.mail { background: var(--soft); color: var(--ink); max-height: none; }
details.tpl { border-top: 1px solid var(--line); padding: .7rem 0; } details.tpl summary { cursor: pointer; font-weight: 600; }
details.tpl form { margin-top: .8rem; }
.plan-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.plan-row > input { width: 11em; margin: 0; } .plan-row label.mini { display: flex; align-items: center; gap: .3rem; font-weight: 500; }
.plan-row label.mini input { width: 6em; margin: 0; }
.crumbs { margin: -.6rem 0 1rem; font-size: .88rem; color: var(--muted); }

/* ---------- App shell ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-size: 1.12rem; letter-spacing: -.01em; }
.brand b { color: var(--brand-2); } .logo-mark { width: 30px; height: 30px; color: var(--brand); flex: none; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 1.1rem .8rem; display: flex; flex-direction: column; gap: .3rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 0 .5rem .6rem; }
.side-tag { display: inline-block; margin: 0 .5rem .6rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); background: var(--warn-bg); padding: .15em .55em; border-radius: 6px; }
.side nav { display: grid; gap: 2px; }
.side nav a { padding: .5rem .7rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .92rem; }
.side nav a:hover { background: var(--soft); } .side nav a.on { background: var(--soft); color: var(--brand-2); font-weight: 650; }
.side-foot { margin-top: auto; padding: .8rem .5rem 0; border-top: 1px solid var(--line); display: grid; gap: .2rem; overflow-wrap: anywhere; }
.content { padding: 1.6rem 2rem 3rem; max-width: 1200px; width: 100%; }
.page-title { font-size: 1.6rem; margin-bottom: 1.2rem; }
.hero-card { border-left: 5px solid var(--brand-2); } .hero-card.warn { border-left-color: var(--warn); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(1200px 500px at 10% -10%, var(--soft), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 680px; margin: 0 auto; } .auth-card h1 { font-size: 1.45rem; margin: 1rem 0 1.2rem; }
.hint { background: var(--info-bg); color: var(--info); padding: .6em .8em; border-radius: 8px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .7rem 1rem; }
  .side nav { display: flex; overflow-x: auto; width: 100%; scrollbar-width: none; } .side nav a { white-space: nowrap; }
  .side-foot { margin: 0; border: 0; padding: 0; display: flex; gap: .6rem; align-items: center; }
  .content { padding: 1.1rem 1rem 2.5rem; } .grid2 { grid-template-columns: 1fr; }
}

/* ---------- Public site ---------- */
body.public { background: #fbfcfa; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.row { display: flex; align-items: center; gap: 1.5rem; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251, 252, 250, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .row { height: 64px; }
.site-nav { display: flex; gap: 1.3rem; margin-left: auto; } .site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--brand-2); }
.header-cta { display: flex; gap: .5rem; }
.hero { background: radial-gradient(900px 420px at 85% 0%, #dff4e6, transparent), radial-gradient(700px 400px at 0% 100%, #f1fbe4, transparent); padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.025em; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--brand-2); background: var(--soft); padding: .25em .7em; border-radius: 99px; font-size: .82rem; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; } .lede.center { margin-inline: auto; }
.mock { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(11, 93, 59, .14); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; align-items: center; padding: .6rem .8rem; background: #f1f5f2; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d6ddd8; } .mock-bar span { margin-left: .6rem; font-size: .75rem; color: var(--muted); font-family: var(--mono); }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; padding: .9rem; background: #e9efe7; min-height: 270px; }
.kanban .col { display: grid; gap: .5rem; align-content: start; } .kanban .col b { font-size: .72rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.kcard { background: #fff; border-radius: 8px; padding: .55rem; display: grid; grid-template-columns: 22px 1fr; gap: 4px 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kcard .av { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: #bfe3cc; }
.kcard .ln { height: 6px; border-radius: 4px; background: #dfe7e1; } .kcard .ln.short { width: 60%; }
.kcard .tag { grid-column: 2; width: 40%; height: 8px; border-radius: 4px; background: var(--accent); }
.section { padding: 4rem 1.25rem; } .narrow-text { max-width: 760px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 2rem 0; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; }
.feature h3, .feature .h3 { color: var(--brand); } .feature p { color: var(--ink-2); margin: 0; }
.band { background: var(--brand); color: #eaf7ef; padding: 3.5rem 0; }
.steps h2 { color: #fff; } .steps ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: .3rem; } .steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.steps li b { font-size: 1.1rem; color: #fff; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand-2); } .plan.current { outline: 2px solid var(--accent); }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; } .plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan .btn { margin-top: auto; }
.ribbon { position: absolute; top: -12px; right: 16px; background: var(--accent); color: var(--brand); font-size: .75rem; font-weight: 800; padding: .2em .7em; border-radius: 99px; }
.ticks { list-style: none; padding: 0; margin: .5rem 0 1.2rem; display: grid; gap: .35rem; }
.ticks li::before { content: "✓"; color: var(--brand-2); font-weight: 800; margin-right: .5rem; }
.coupon { display: flex; align-items: center; gap: .6rem; max-width: 380px; } .coupon input { margin: 0; }
details.faq { border-bottom: 1px solid var(--line); padding: 1rem 0; } details.faq summary { cursor: pointer; font-weight: 650; list-style-position: outside; }
details.faq summary h2 { display: inline; font-size: 1.05rem; } details.faq p { margin: .7rem 0 0; color: var(--ink-2); }
.post-card { padding: 1.2rem 0; border-bottom: 1px solid var(--line); } .post-card h2 a { color: var(--ink); text-decoration: none; } .post-card h2 a:hover { color: var(--brand-2); }
.prose h2 { margin-top: 2rem; } .prose p, .prose li { color: var(--ink-2); font-size: 1.04rem; }
.cta-box { margin-top: 2.5rem; padding: 1.2rem; background: var(--soft); border-radius: var(--r); display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid a:not(.brand) { display: block; color: var(--ink-2); text-decoration: none; margin: .3rem 0; }
.fine { margin-top: 2rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 860px) {
  .site-nav { display: none; } .header-cta { margin-left: auto; } .header-cta .ghost { display: none; }
  .hero { padding: 2.5rem 0; } .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .kanban { grid-template-columns: repeat(2, 1fr); } .footer-grid { grid-template-columns: 1fr 1fr; } .section { padding: 2.5rem 1.25rem; }
}
