/* Service Status Dashboard - shared styles. Native CSS, no build step. */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --line: #e4e4e7;
  --text: #18181b;
  --muted: #5b5b66;
  --accent: #15803d;
  --accent-soft: #e8f5ec;
  --accent-ink: #ffffff;
  --ok: #22a355;
  --minor: #d08a0b;
  --major: #d43b3b;
  --maint: #7c8594;
  --empty: #d9d9de;
  --code-bg: #18181b;
  --code-text: #e7e7ea;
  --code-muted: #8d8d98;
  --shadow: 0 1px 2px rgb(24 24 27 / .04), 0 12px 32px -12px rgb(24 24 27 / .12);
  --radius: 10px;
  --radius-sm: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #141417;
    --surface-2: #1b1b1f;
    --line: #2a2a30;
    --text: #ececef;
    --muted: #a0a0ab;
    --accent: #4cc27a;
    --accent-soft: #13261a;
    --accent-ink: #0c0c0e;
    --ok: #3fb56c;
    --minor: #e0a330;
    --major: #e26161;
    --maint: #8b94a3;
    --empty: #2c2c33;
    --code-bg: #101012;
    --code-text: #e7e7ea;
    --code-muted: #82828c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; }
code, pre, .mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.i { width: 1.15em; height: 1.15em; flex: none; }
/* Grid children may shrink below their content width, so long code lines scroll instead of widening the page. */
.hero-grid > *, .bento > *, .price-grid > *, .docs-grid > *, .steps > * { min-width: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 767px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 8px 10px; border-radius: var(--radius-sm); transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  font: 500 15px/1 "Geist", system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s cubic-bezier(.16,1,.3,1), background-color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.btn .i { transition: transform .2s cubic-bezier(.16,1,.3,1); }
.btn:hover .i { transform: translateX(2px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; max-width: 13ch; }
.hero .lead { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 44ch; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 899px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Status widget (real component, shared with /status) */
.widget {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.widget-head .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-head [data-updated] { white-space: nowrap; }
.widget-state { display: flex; align-items: center; gap: 10px; padding: 18px; font-weight: 600; }
.widget-state .i { color: var(--ok); width: 22px; height: 22px; }
.widget-list { list-style: none; margin: 0; padding: 0 18px 8px; }
.widget-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.widget-row .name { font-size: 14px; font-weight: 500; }
.widget-row .pct { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.widget-row .bars { grid-column: 1 / -1; }
.widget-foot { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.widget-foot a { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.widget-foot a:hover { color: var(--text); }

.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 28px; }
.bar { border-radius: 2px; background: var(--ok); opacity: .9; transition: opacity .15s, transform .15s; }
.bar:hover, .bar:focus-visible { opacity: 1; transform: scaleY(1.12); outline: none; }
.bar.minor { background: var(--minor); }
.bar.major { background: var(--major); }
.bar.maint { background: var(--maint); }
.bars-sm { height: 20px; gap: 2px; }
.skeleton .bar { background: var(--empty); }

/* Sections */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 58ch; }
@media (max-width: 767px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; min-height: 260px; }
.cell h3 { font-size: 20px; }
.cell p { color: var(--muted); max-width: 52ch; }
.cell-a { grid-column: span 4; background:
  radial-gradient(120% 140% at 100% 0%, var(--accent-soft) 0%, transparent 55%), var(--surface); }
.cell-b { grid-column: span 2; }
.cell-c { grid-column: span 3; background: var(--code-bg); border-color: var(--code-bg); color: var(--code-text); }
.cell-c p { color: var(--code-muted); }
.cell-d { grid-column: span 3; background:
  radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 14px 14px, var(--surface); }
.regions { list-style: none; margin: auto 0 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.regions li { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.regions span { font-size: 14px; font-weight: 500; }
.regions small { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .regions { grid-template-columns: repeat(2, 1fr); } }
.channels { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 8px; }
.channels li { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.channels .i { color: var(--accent); }
.code { margin: auto 0 0; padding: 16px; border-radius: var(--radius-sm); background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); font-size: 13px; line-height: 1.7; overflow-x: auto; color: var(--code-text); }
.code .c { color: var(--code-muted); }
.code .s { color: #8fd6a8; }
.dns { margin: auto 0 0; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-size: 13px; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
.dns dt { color: var(--muted); }
.dns dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .bento { grid-template-columns: 1fr; }
  .cell-a, .cell-b, .cell-c, .cell-d { grid-column: auto; }
  .cell { min-height: 0; padding: 22px; }
}

/* Timeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps::before { content: ""; position: absolute; top: 15px; left: 16px; right: 16px; height: 1px; background: var(--line); }
.step { position: relative; }
.step .dot-i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.step .dot-i .i { width: 16px; height: 16px; }
.step h3 { margin-top: 20px; font-size: 18px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; }
@media (max-width: 899px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 16px; bottom: 16px; left: 15px; right: auto; width: 1px; height: auto; }
  .step { padding-left: 52px; }
  .step .dot-i { position: absolute; left: 0; top: 0; }
  .step h3 { margin-top: 4px; }
}

/* Pricing + FAQ */
.price-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--surface); box-shadow: var(--shadow); }
.plan .amount { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 4px; }
.plan .amount strong { font-size: 48px; letter-spacing: -0.04em; font-weight: 600; }
.plan .amount span { color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li .i { color: var(--accent); margin-top: 3px; }
.plan .note { color: var(--muted); font-size: 14px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 20px; max-width: 62ch; }
@media (max-width: 899px) { .price-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Status page */
.status-top { padding: 48px 0 24px; }
.status-top h1 { font-size: clamp(28px, 3.6vw, 36px); }
.banner { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.banner strong { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.banner strong .i { color: var(--ok); width: 22px; height: 22px; }
.banner.is-minor { background: color-mix(in srgb, var(--minor) 12%, var(--surface)); border-color: color-mix(in srgb, var(--minor) 40%, transparent); }
.banner.is-minor strong .i { color: var(--minor); }
.banner small { color: var(--muted); font-size: 13px; }
.panel { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-row { padding: 20px; border-top: 1px solid var(--line); }
.panel-row:first-child { border-top: 0; }
.comp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.comp-head .name { font-weight: 500; }
.comp-head .note { color: var(--muted); font-size: 13px; }
.comp-head .state { font-size: 13px; color: var(--ok); white-space: nowrap; }
.axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.axis .pct { font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.axis .d60 { display: none; }
@media (max-width: 640px) { .bars-90 .bar:nth-child(-n+30) { display: none; } .axis .d90 { display: none; } .axis .d60 { display: inline; } }

.history { margin-top: 56px; }
.history h2 { font-size: 24px; }
.inc { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; }
.inc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.inc-head h3 { font-size: 17px; display: flex; gap: 8px; align-items: center; }
.inc-head h3 .i { width: 18px; height: 18px; }
.inc-head time { color: var(--muted); font-size: 13px; }
.inc.minor h3 .i { color: var(--minor); }
.inc.major h3 .i { color: var(--major); }
.inc.maint h3 .i { color: var(--maint); }
.updates { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.updates li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 15px; }
.updates b { font-weight: 600; }
.updates span { color: var(--muted); }
.updates small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 560px) { .updates li { grid-template-columns: 1fr; gap: 2px; } }

/* Docs */
.docs-grid { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding: 48px 0 96px; }
.docs-nav { position: sticky; top: 88px; align-self: start; display: grid; gap: 2px; font-size: 14px; }
.docs-nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: var(--radius-sm); }
.docs-nav a:hover { color: var(--text); background: var(--surface-2); }
.docs h1 { font-size: clamp(30px, 4vw, 40px); }
.docs h2 { font-size: 22px; margin-top: 56px; scroll-margin-top: 88px; }
.docs p { margin-top: 12px; color: var(--muted); max-width: 66ch; }
.docs p code, .docs td code { font-size: 14px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text); }
.endpoint { margin-top: 16px; display: inline-flex; gap: 10px; align-items: center; font-size: 14px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.endpoint .m { font-weight: 600; color: var(--accent); }
.docs pre { margin-top: 16px; padding: 18px; border-radius: var(--radius); background: var(--code-bg); color: var(--code-text); font-size: 13px; line-height: 1.7; overflow-x: auto; }
.docs pre .c { color: var(--code-muted); }
.docs table { margin-top: 16px; width: 100%; border-collapse: collapse; font-size: 14px; }
.docs th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.docs td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 899px) { .docs-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; } .docs-nav { position: static; display: flex; flex-wrap: wrap; } }

/* 404 */
.nf { min-height: calc(100dvh - 65px - 105px); display: grid; align-content: center; padding: 64px 0; }
.nf .code-num { font-size: 14px; color: var(--muted); }
.nf h1 { margin-top: 8px; font-size: clamp(30px, 4vw, 44px); }
.nf p { margin-top: 12px; color: var(--muted); }
.nf .actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Motion: entry and bar reveal. Only when the user has not asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--d, 0) * 80ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .bars.reveal .bar { animation: grow .5s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 6ms); transform-origin: bottom; }
  @keyframes grow { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: .9; } }
}
