/* Altus — paper, ink, one cobalt accent. 8px grid, system fonts only. */
:root {
  --paper: #F7F7F4;
  --surface: #FFFFFF;
  --ink: #0E0F12;
  --ink-2: #3A3D45;
  --muted: #6B6F7A;
  --line: #E4E4DE;
  --line-2: #D5D5CD;
  --accent: #2F4BFF;
  --accent-ink: #1E35D6;
  --accent-soft: #ECEFFF;
  --ok: #0E9F6E;
  --ok-soft: #E6F6EF;
  --warn: #D97706;
  --warn-soft: #FDF3E4;
  --bad: #D92D20;
  --bad-soft: #FDECEA;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(14, 15, 18, .04), 0 4px 16px rgba(14, 15, 18, .05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 44px; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 650; }
h4 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
:not(pre) > code { background: #EEEEE8; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.hidden { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.row { display: flex; gap: 16px; align-items: center; }
.row.wrap-row { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; } .mt48 { margin-top: 48px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(247, 247, 244, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; height: 60px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--ink-2); font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--ink); text-decoration: none; }
.nav a.on { font-weight: 600; }
.top .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 500 14px/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { text-decoration: none; border-color: #BDBDB3; color: var(--ink); background: #FBFBF9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #24262C; border-color: #24262C; color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #EDEDE7; }
.btn.danger { color: var(--bad); }
.btn.lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.tight { padding: 16px; }
.card.raised { box-shadow: var(--shadow); }
.card h3 + p { margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 550; background: #EEEEE8; color: var(--ink-2); white-space: nowrap; }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.notice { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.notice.warn { border-color: #F3D9B1; background: var(--warn-soft); color: #8A4B05; }
.notice.ok { border-color: #BFE5D4; background: var(--ok-soft); color: #0A6B4B; }
.notice.bad { border-color: #F5C2BD; background: var(--bad-soft); color: #9A1F15; }
.notice.accent { border-color: #CDD5FF; background: var(--accent-soft); color: #1B2C9E; }

/* hero */
.hero { padding: 88px 0 56px; }
.hero .eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px 4px 6px; }
.hero .eyebrow .pill { height: 20px; }
.hero h1 { margin-top: 24px; max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 640px; }
.hero .cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }

/* code */
.code { background: #111216; color: #E7E8EC; border-radius: var(--radius); overflow: hidden; border: 1px solid #1F2128; }
.code .bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #23252D; font: 12px var(--sans); color: #9BA0AD; }
.code .bar .tabs { display: flex; gap: 4px; }
.code .bar button { background: transparent; border: 0; color: #9BA0AD; font: 500 12px var(--sans); padding: 4px 8px; border-radius: 4px; cursor: pointer; }
.code .bar button.on, .code .bar button:hover { background: #22242B; color: #fff; }
.code .bar .copy { margin-left: auto; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; line-height: 1.65; font-size: 13px; }
.code .k { color: #8FA3FF; } .code .s { color: #9FD8B5; } .code .c { color: #6E7380; } .code .v { color: #F2C77B; }
pre.plain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; margin: 0; line-height: 1.6; }

/* sections */
section.block { padding: 56px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin-top: 6px; }
.kicker { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* model cards */
.model-card { position: relative; display: flex; flex-direction: column; gap: 14px; }
.model-card .name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.model-card .tag { color: var(--muted); font-size: 13px; margin-top: 2px; }
.model-card .price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.model-card .price .lbl { font-size: 12px; color: var(--muted); }
.model-card .price .val { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.model-card .price .was { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-left: 4px; }
.model-card .mid { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

.feature h4 { display: flex; align-items: center; gap: 10px; }
.feature .ico { width: 28px; height: 28px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.feature p { color: var(--ink-2); margin-top: 8px; font-size: 14px; }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 44px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 650; font-size: 13px; background: var(--surface); }
.step p { color: var(--ink-2); margin-top: 4px; font-size: 14px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: #FBFBF9; text-transform: none; letter-spacing: .01em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .was { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-right: 6px; }
tr.featured td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.empty { padding: 32px; text-align: center; color: var(--muted); font-size: 14px; }

/* tiers */
.tier { display: flex; flex-direction: column; gap: 10px; cursor: default; transition: border-color .12s, box-shadow .12s; }
.tier.selectable { cursor: pointer; }
.tier.selectable:hover { border-color: #BDBDB3; }
.tier.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tier .label { font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.tier .pay { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tier .get { font-size: 14px; color: var(--ink-2); }
.tier .get b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tier .rate { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }

/* forms */
.auth { min-height: calc(100vh - 61px - 120px); display: grid; place-items: center; padding: 48px 16px; }
.auth .card { width: 100%; max-width: 400px; padding: 32px; }
.auth h2 { font-size: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=search], select, textarea {
  height: 40px; width: 100%; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface);
  font: 14px var(--sans); color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
.form-msg { font-size: 13px; min-height: 20px; }
.form-msg.bad { color: var(--bad); } .form-msg.ok { color: var(--ok); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }

/* console */
.console { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 32px 0 64px; }
.side { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; }
.side a:hover { background: #EDEDE7; color: var(--ink); text-decoration: none; }
.side a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.side .sep { height: 1px; background: var(--line); margin: 10px 4px; }
.side .who { padding: 4px 12px 12px; font-size: 13px; color: var(--muted); }
.side .who b { display: block; color: var(--ink); font-size: 14px; }
.panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.panel-head h2 { font-size: 22px; }
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 550; }
.stat .val { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 36px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .9; }
.bars .b span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.keybox { display: flex; gap: 8px; align-items: center; background: #111216; color: #E7E8EC; border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.keybox span { flex: 1; }

/* docs */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; padding: 40px 0 80px; }
.docs nav { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.docs nav a { color: var(--ink-2); padding: 5px 0; }
.docs nav a:hover { color: var(--ink); text-decoration: none; }
.docs nav .grp { font-size: 12px; font-weight: 650; color: var(--muted); margin-top: 14px; letter-spacing: .04em; }
.doc h2 { font-size: 24px; margin-top: 48px; padding-top: 8px; scroll-margin-top: 80px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 28px; scroll-margin-top: 80px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 12px 0 0; }
.doc li + li { margin-top: 4px; }
.doc .code, .doc .table-wrap, .doc .notice, .doc pre.plain { margin-top: 14px; }

/* footer */
footer.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 13px; }
footer.foot .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
footer.foot a { color: var(--muted); }
footer.foot a:hover { color: var(--ink); }

/* toast + modal */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 100; box-shadow: var(--shadow); }
.modal-bg { position: fixed; inset: 0; background: rgba(14, 15, 18, .36); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 480px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal h3 { margin-bottom: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .console, .docs { grid-template-columns: 1fr; }
  .side, .docs nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .side .who, .side .sep { display: none; }
}
@media (max-width: 640px) {
  h1 { font-size: 32px; }
  .hero { padding: 56px 0 40px; }
  .nav { display: none; }
  .g2, .g4, .g5 { grid-template-columns: 1fr; }
  .top .wrap { gap: 16px; }
}
