:root {
  color-scheme: light;
  --bg: #fff;
  --panel: #fff;
  --panel-2: #f6f8f7;
  --line: #dfe6e2;
  --text: #172b24;
  --muted: #52615d;
  --accent: #0e8a5f;
  --accent-strong: #0b7a53;
  --accent-soft: #edf8f2;
  --accent-ink: #fff;
  --warn: #855713;
  --bad: #b42332;
  --radius: 12px;
  --shadow: 0 2px 4px rgb(23 43 36 / 3%), 0 8px 24px rgb(23 43 36 / 3%);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
::selection { color: var(--text); background: #d7f1e3; }
a { color: var(--accent-strong); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 4px; }
svg { display: block; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
header.top { background: var(--bg); border-bottom: 1px solid var(--line); }
header.top .wrap { min-height: 84px; display: flex; align-items: center; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 36px; height: 36px; color: var(--accent); flex: none; }
.brand span { font-size: 23px; font-weight: 800; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.brand em { font-style: normal; font-weight: 500; color: var(--accent-strong); letter-spacing: -.035em; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin-left: auto; font-size: 14px; font-weight: 500; }
nav a { color: var(--muted); }
nav a:hover { color: var(--accent-strong); text-decoration: none; }
nav > a:not(.btn) { padding: 8px 0; }
nav form { margin: 0; }
main { flex: 1; min-width: 0; padding: 40px 0 72px; }
footer { border-top: 1px solid var(--line); color: var(--muted); padding: 28px 0; font-size: 13px; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.footer-info { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.footer-info span:first-child { color: var(--text); font-weight: 600; }
footer a { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(28px, 3vw, 34px); letter-spacing: -.035em; margin: 0 0 16px; }
h2 { font-size: 23px; letter-spacing: -.025em; margin: 32px 0 16px; }
h3 { font-size: 19px; letter-spacing: -.02em; }
p { margin: 0 0 18px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }

/* Public storefront */
.hero { padding: 44px 0 56px; }
.eyebrow { margin: 0 0 20px; color: var(--accent-strong); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); }
.hero h1 { max-width: 800px; margin-bottom: 24px; font-size: clamp(40px, 5vw, 66px); font-weight: 650; letter-spacing: -.055em; line-height: 1.08; }
.hero h1 span { display: block; color: var(--accent-strong); }
.hero .hero-copy { max-width: 620px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.hero .form-actions { margin-top: 28px; gap: 12px; }
.hero .btn { min-height: 48px; padding: 11px 22px; }
.hero-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.hero-note span { padding: 0 7px; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 72px; }
.feature { min-width: 0; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 9px; }
.feature-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature b { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 650; }
.feature .muted { display: block; font-size: 14px; line-height: 1.7; }
.plans-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 28px; }
.plans-heading .eyebrow { margin-bottom: 10px; }
.plans-heading h2 { margin: 0; font-size: clamp(26px, 3vw, 32px); letter-spacing: -.035em; }
.plans-heading > p { margin: 0; font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { min-width: 0; display: flex; flex-direction: column; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.plan h3 { margin: 0; font-size: 19px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin: 16px 0 0; font-size: 38px; font-weight: 650; line-height: 1.25; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.price small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 24px 0; flex: 1; }
.plan li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #edf0ee; font-size: 14px; }
.plan li:last-child { border-bottom: 0; }
.plan li span { color: var(--muted); }
.plan li strong { text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }
.plan > .btn { width: 100%; }

/* Shared controls and account pages */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 10px 18px; border: 1px solid #c8d2cc; border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--panel-2); border-color: #97a89e; text-decoration: none; }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); box-shadow: 0 1px 2px rgb(23 43 36 / 8%); }
.btn.primary:hover { background: #096645; border-color: #096645; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: var(--panel); }
.btn.danger:hover { background: #fff1f2; }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.btn[disabled], .btn[disabled]:hover { color: var(--muted); background: var(--panel-2); border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.inline { display: inline; }
.card { min-width: 0; padding: 26px; margin-bottom: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.narrow { max-width: 460px; margin: 24px auto 0; padding: 32px; }
.narrow > .muted { margin-top: 24px; font-size: 14px; }
label { display: block; margin: 18px 0 7px; color: var(--text); font-size: 13px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  background: var(--bg); color: var(--text); border: 1px solid #879a8e;
  border-radius: 7px; font: inherit; line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 112px; resize: vertical; font-family: var(--mono); font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-color: var(--accent-strong); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: middle; accent-color: var(--accent-strong); }
.check { display: block; color: var(--text); font-weight: 400; line-height: 1.8; }
.check a { text-decoration: underline; }
.form-actions { margin-top: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.narrow .form-actions > .btn { width: 100%; }
.alert { padding: 14px 18px; margin-bottom: 22px; border: 1px solid #bbdcca; border-radius: 8px; color: #205b40; background: var(--accent-soft); }
.alert.error { border-color: #eab8bf; color: var(--bad); background: #fff1f2; }
.alert.secret { border-color: #dec795; color: #684713; background: #fff8e9; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: 14px; overflow-wrap: normal; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
td.actions { display: table-cell; }
td.actions form + form { margin-top: 6px; }
.badge { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: 0; white-space: nowrap; vertical-align: middle; }
.badge.active, .badge.running, .badge.done, .badge.online { color: var(--accent-strong); border-color: #bbdcca; background: var(--accent-soft); }
.badge.provisioning, .badge.pending_payment, .badge.pending_approval, .badge.queued, .badge.terminating { color: var(--warn); border-color: #e8d4ad; background: #fff8e9; }
.badge.error, .badge.failed, .badge.suspended, .badge.offline, .badge.crashed { color: var(--bad); border-color: #eab8bf; background: #fff1f2; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.grid2 > * { min-width: 0; }
dl.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions > * { min-width: 0; max-width: 100%; }
.meter { height: 6px; background: #e5ece7; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--accent); }

@media (max-width: 900px) {
  header.top .wrap { flex-wrap: wrap; }
  nav { gap: 10px 20px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { padding-right: 20px; padding-left: 20px; }
  header.top .wrap { gap: 18px; padding-top: 20px; padding-bottom: 16px; }
  nav { width: 100%; margin-left: 0; gap: 10px 20px; }
  main { padding: 28px 0 48px; }
  .hero { padding: 28px 0 36px; }
  .hero h1 { margin-bottom: 20px; }
  .hero .hero-copy { font-size: 16px; }
  .hero .form-actions { gap: 10px; }
  .hero .btn { padding-right: 16px; padding-left: 16px; }
  .hero-note { font-size: 12px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 48px; }
  .feature { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 16px; padding: 20px; }
  .feature-icon { grid-row: span 2; margin: 0; }
  .feature b { margin-bottom: 5px; }
  .plans-heading { margin-bottom: 24px; }
  .plans { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plan { padding: 24px; }
  .card { padding: 20px; }
  .narrow { margin-top: 8px; padding: 24px; }
  input[type=text], input[type=email], input[type=password], input[type=number], select, textarea { font-size: 16px; }
  .table-wrap { padding: 10px; }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  dl.kv dd { margin-bottom: 12px; }
  footer { padding: 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
