/* Dipper: ink on white, one cold star colour. Shared by the homepage, docs,
   sign-in, dashboard and admin pages. See docs/DESIGN.md. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/geist-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/geist-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/geist-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/geist-mono-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #FFFFFF;
  --paper-2: #F5F6FA;
  --ink: #0F1A33;
  --ink-2: #57617A;
  --ink-3: #7A8399;
  --line: rgba(15, 26, 51, .1);
  --glass: rgba(255, 255, 255, .72);
  --star: #2E6BFF;
  --star-ink: #1F4FCC;
  --danger: #C2362B;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg, canvas { display: block; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--star); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: relative; z-index: 3; }
.site-header.over { position: absolute; inset: 0 0 auto; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -.02em; text-decoration: none; flex-shrink: 0; }
.brand svg { width: 38px; height: auto; }
.nav { display: flex; align-items: center; gap: 2px; font-size: 14.5px; }
.nav a, .nav button { white-space: nowrap; text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover { color: var(--ink); background: rgba(15, 26, 51, .05); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav .key { color: #fff; background: var(--ink); font-weight: 500; margin-left: 6px; }
.nav .key:hover { color: #fff; background: #1E2C52; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s; color: var(--ink); background: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 8px 24px -10px rgba(15, 26, 51, .55); }
.btn.primary:hover { background: #1E2C52; }
.btn.ghost { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px rgba(15, 26, 51, .25); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14.5px; }
.btn.danger { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(194, 54, 43, .3); }
.btn svg { width: 18px; height: 18px; }

/* Hero (homepage) */
.hero { position: relative; min-height: max(680px, 100vh); display: flex; align-items: flex-end; overflow: hidden; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 200px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: 88px; pointer-events: none; }
.hero .wrap > * { pointer-events: auto; }
.hero h1 { margin: 0; font-weight: 600; font-size: clamp(46px, 7vw, 92px); line-height: 1; letter-spacing: -.045em; max-width: 8.6em; }
.hero h1:lang(zh) { letter-spacing: -.02em; line-height: 1.12; max-width: 9em; }
.hero .sub { margin: 22px 0 0; font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 27em; }
.hero .cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.hero .free { margin: 16px 0 0; font-size: 14.5px; color: var(--ink-2); }

/* Code panels */
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px 0 0; }
.panel { border-radius: 20px; background: var(--paper-2); padding: 26px 28px; position: relative; overflow: hidden; min-width: 0; }
.panel h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.panel > p { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; }
.panel .copy { position: absolute; top: 22px; right: 22px; }
pre { margin: 0; font: 13.5px/1.75 var(--mono); color: var(--ink); overflow-x: auto; }
pre .s { color: var(--star-ink); }
pre .c { color: var(--ink-3); }
.result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 18px; font: 13px var(--mono); color: var(--ink-2); flex-wrap: wrap; }
.result b { color: var(--ink); font-weight: 500; }
.result .hit b { color: var(--star-ink); }
.panel .nokey { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.panel .nokey code { background: var(--paper); }
.copy { font: 500 13px var(--sans); color: var(--ink-2); background: var(--paper); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.copy:hover { color: var(--ink); }

/* Pricing sentence */
.prices { padding: 120px 0 20px; }
.prices .line { margin: 0; font-size: clamp(28px, 3.8vw, 48px); line-height: 1.2; letter-spacing: -.035em; color: var(--ink-2); max-width: 20em; font-weight: 500; }
.prices .line:lang(zh) { letter-spacing: -.01em; line-height: 1.3; }
.prices .line b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.prices .line .promo b { background: linear-gradient(transparent 70%, rgba(46, 107, 255, .28) 70%); }
.fine { margin: 22px 0 0; font-size: 15px; color: var(--ink-2); max-width: 46em; }
.fine code, p code, li code, td code { font-size: .88em; background: var(--paper-2); padding: 1px 5px; border-radius: 5px; }

/* Footer */
.site-footer { margin-top: 120px; border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 14px; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .disclosure { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; }

/* Forms */
.field { display: block; margin: 0 0 14px; }
.field span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.input { width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); font: 16px var(--sans); color: var(--ink); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--star); }
.note { font-size: 14px; color: var(--ink-2); }
.error { color: var(--danger); font-size: 14px; }
.ok { color: var(--star-ink); font-size: 14px; }

/* Sign-in card (login page) */
.auth { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 24px 16px 72px; position: relative; }
.auth .card { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.auth h1 { font-size: 34px; letter-spacing: -.035em; font-weight: 600; margin: 0 0 8px; line-height: 1.1; }
.auth .lede { margin: 0 0 28px; color: var(--ink-2); }
.auth .providers { display: grid; gap: 10px; }
.auth .providers .btn { width: 100%; }
.auth .or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 22px 0; }
.auth .or::before, .auth .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth form .btn { width: 100%; }
.auth .terms { margin-top: 22px; font-size: 13px; color: var(--ink-3); }

/* App shell (dashboard, admin) */
.app-main { padding: 24px 0 0; }
.app-main h1 { font-size: 32px; letter-spacing: -.035em; font-weight: 600; margin: 0; line-height: 1.15; }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.app-head p { margin: 6px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.app-head > div { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--paper-2); border-radius: 18px; padding: 20px 22px; min-width: 0; }
.stat .k { font-size: 14px; color: var(--ink-2); }
.stat .v { font-size: 30px; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .d { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.block { margin-top: 40px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.block h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; color: var(--ink-2); font-size: 13.5px; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .muted, .muted { color: var(--ink-3); }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); font-size: 14.5px; }
.badge { display: inline-block; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.badge.on { background: rgba(46, 107, 255, .1); color: var(--star-ink); }
.badge.off { background: rgba(194, 54, 43, .08); color: var(--danger); }
.chart { height: 160px; display: flex; align-items: flex-end; gap: 3px; padding: 16px 0 0; border-bottom: 1px solid var(--line); }
.chart .bar { flex: 1; min-width: 2px; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; }
.chart .bar i { display: block; background: var(--ink); opacity: .82; }
.chart .bar i.hit { background: var(--star); opacity: 1; }
.chart-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.chart-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--ink); opacity: .82; }
.chart-legend span.hit::before { background: var(--star); opacity: 1; }
.secret { display: flex; gap: 8px; align-items: center; background: rgba(46, 107, 255, .07); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.secret code { font-size: 14px; word-break: break-all; flex: 1; min-width: 0; }
.callout { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--paper-2); border-radius: 18px; padding: 18px 22px; margin-top: 16px; }
.callout p { margin: 0; color: var(--ink-2); font-size: 15px; }
.callout b { color: var(--ink); font-weight: 600; }
.row-actions { display: flex; gap: 8px; }
dialog { border: 0; border-radius: 20px; padding: 26px 28px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 30px 80px -20px rgba(15, 26, 51, .4); }
dialog::backdrop { background: rgba(15, 26, 51, .3); }
dialog h3 { margin: 0 0 14px; font-size: 19px; font-weight: 600; }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* Docs */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; padding: 24px 0 0; }
.docs-nav { position: sticky; top: 24px; align-self: start; font-size: 14.5px; }
.docs-nav p { margin: 18px 0 6px; font-size: 13px; color: var(--ink-3); }
.docs-nav p:first-child { margin-top: 0; }
.docs-nav a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); }
.prose { max-width: 760px; }
.legal { padding-top: 40px; }
.legal .note { margin-top: 48px; color: var(--ink-3); }
.legal .prose td:first-child { white-space: normal; width: 55%; }
.prose h1 { font-size: 42px; letter-spacing: -.04em; font-weight: 600; margin: 0 0 12px; line-height: 1.1; }
.prose h2 { font-size: 26px; letter-spacing: -.03em; font-weight: 600; margin: 64px 0 14px; line-height: 1.2; scroll-margin-top: 24px; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 32px 0 8px; scroll-margin-top: 24px; }
.prose p, .prose li { color: #2B3550; }
.prose .lede { font-size: 19px; color: var(--ink-2); margin: 0 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose pre { background: var(--paper-2); border-radius: 16px; padding: 18px 20px; margin: 16px 0; }
.prose .table-wrap { margin: 16px 0; }
.prose td { white-space: normal; vertical-align: top; }
.prose td:first-child { white-space: nowrap; }

/* Scroll-in reveal (homepage only) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .docs-nav p { display: none; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .hide-sm { display: none; }
  .nav a, .nav button { padding: 8px 9px; }
  .hero { min-height: 640px; }
  .hero .wrap { padding-bottom: 56px; }
  .hero .sub { font-size: 18px; }
  .try { grid-template-columns: 1fr; }
  .panel { padding: 22px 20px; }
  .prices { padding-top: 88px; }
  .site-footer { margin-top: 88px; }
  .prose h1 { font-size: 34px; }
}
@media (max-width: 480px) {
  .brand { font-size: 17px; gap: 8px; }
  .brand svg { width: 32px; }
  .nav { font-size: 14px; }
  .nav a, .nav button { padding: 8px 7px; }
  .nav .key { padding: 8px 12px; margin-left: 2px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .stat .v { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

