/* The same look as the documentation at docs.xabcloud.com: white, one warm accent,
   and a dark mode that trades the accent for a pale blue. */
:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #fff;
  --surface-soft: #f8f9fa;
  --navbar: rgba(255, 255, 255, .95);
  --text: #1d2d35;
  --muted: #6c757d;
  --line: #e9ecef;
  --line-strong: #ced4da;
  --primary: #e55235;
  --primary-strong: #c3462d;
  --primary-soft: rgba(229, 82, 53, .08);
  --on-primary: #fff;
  --info: #2f7fc1;
  --ok: #198754;
  --warn: #b26a00;
  --danger: #b02a37;
  --terminal: #212529;
  --terminal-text: #dee2e6;
  --shadow: 0 1rem 3rem rgba(29, 45, 53, .12);
  --radius-l: .5rem;
  --radius-m: .375rem;
  --radius-s: .25rem;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #212529;
  --surface: #212529;
  --surface-soft: #1b1f22;
  --navbar: rgba(33, 37, 41, .975);
  --text: #dee2e6;
  --muted: #9aa3ab;
  --line: #2b3035;
  --line-strong: #495057;
  --primary: #8ed6fb;
  --primary-strong: #b0e2fc;
  --primary-soft: rgba(142, 214, 251, .1);
  --on-primary: #212529;
  --info: #8ed6fb;
  --ok: #4cc38a;
  --warn: #e0a84a;
  --danger: #f0776b;
  --terminal: #1b1f22;
  --shadow: 0 1rem 3rem rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 5rem; scrollbar-gutter: stable; }
body { min-width: 320px; min-height: 100dvh; margin: 0; padding-top: 3.5rem; display: flex; flex-direction: column; color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.dialog-open { overflow: hidden; }
main { flex: 1; }
button, input, textarea, select { font: inherit; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin-top: 0; font-weight: 700; letter-spacing: -.03em; }
p { margin-top: 0; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .875em; color: #d63384; overflow-wrap: anywhere; }
::selection { background: rgba(249, 106, 40, .2); }
.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.danger-text { color: var(--danger); }

.shell { width: min(1272px, calc(100% - 3rem)); margin: 0 auto; }

/* ---------- header and footer ---------- */
.header-bar { position: fixed; z-index: 19; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #e55235, #8ed6fb 50%, #d32e9d); }
.navbar { position: fixed; z-index: 20; inset: 0 0 auto; border-bottom: 1px solid var(--line); background: var(--navbar); }
.home .navbar { border-bottom-color: transparent; }
.navbar .shell { display: flex; align-items: center; gap: 1.5rem; min-height: 3.5rem; }
.brand { color: var(--text); font-family: var(--serif); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.nav-main { display: flex; gap: 1.25rem; margin-right: auto; }
.nav-main a { color: var(--text); }
.brand:hover, .nav-main a:hover { color: var(--primary); text-decoration: none; }
.nav-tools { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.mode-toggle { display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: var(--radius-m); background: none; cursor: pointer; }
.mode-toggle:hover { background: var(--surface-soft); }
.mode-toggle svg { width: 1.25rem; height: 1.25rem; }
.toggle-light, html[data-theme="dark"] .toggle-dark { display: none; }
html[data-theme="dark"] .toggle-light { display: block; }

.footer { margin-top: 4rem; padding: 1.125rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.footer a { margin-left: 1.25rem; color: inherit; }
.footer a:first-child { margin-left: 0; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.375rem; padding: .375rem .9rem; border: 1px solid transparent; border-radius: var(--radius-s); font-size: 1rem; font-weight: 500; letter-spacing: -.02em; cursor: pointer; background: none; white-space: nowrap; transition: color .15s, background-color .15s, border-color .15s; }
.button:hover { text-decoration: none; }
.button-primary { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.button-primary:hover:not(:disabled) { background: var(--primary-strong); border-color: var(--primary-strong); }
.button-outline { color: var(--primary); border-color: var(--primary); }
.button-outline:hover:not(:disabled) { color: var(--on-primary); background: var(--primary); }
.button-quiet { color: var(--text); border-color: var(--line-strong); }
.button-quiet:hover:not(:disabled) { background: var(--surface-soft); }
.button-danger { color: var(--danger); border-color: var(--line-strong); }
.button-danger:hover:not(:disabled) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.button-small { min-height: 1.9rem; padding: .2rem .65rem; font-size: .875rem; }
.button-large { min-height: 3rem; padding: .5rem 1.5rem; font-size: 1.125rem; }
.button-wide { width: 100%; }
.button:focus-visible, a:focus-visible, summary:focus-visible, .mode-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.terminal { margin: 0; padding: 1.25rem 1.5rem; border-radius: var(--radius-m); color: var(--terminal-text); background: var(--terminal); font-size: .875rem; line-height: 1.7; text-align: left; overflow-x: auto; }
.terminal .dim { color: #8b949e; }
.terminal .hi { color: #8ed6fb; }

/* ---------- the front page ---------- */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero-mark { width: 11rem; height: auto; margin-bottom: 1.5rem; stroke-width: 2.25; }
.hero h1 { margin-bottom: 1rem; font-family: var(--serif); font-size: calc(1.875rem + 1.5vw); letter-spacing: -.03em; }
.lead { color: var(--text); font-size: 1.2rem; text-wrap: balance; }
.hero .lead { margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; padding: 2rem 0 3rem; text-align: center; }
.features h2 { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: 1.5rem; }
.features svg { width: 1.25rem; height: 1.25rem; flex: none; }
.features p { margin: 0; text-wrap: balance; }

.section { padding: 4rem 0 1rem; text-align: center; }
.section > h2 { margin-bottom: .75rem; font-size: 2rem; }
.section > .lead { margin-bottom: 2rem; color: var(--muted); font-size: 1.1rem; }
.section .terminal { max-width: 46rem; margin: 0 auto; }

.period-switch { display: inline-flex; margin-bottom: 2rem; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; }
.period-switch button { padding: .3rem 1.25rem; border: 0; background: none; cursor: pointer; }
.period-switch button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; text-align: left; }
.plan { display: flex; flex-direction: column; padding: 1.5rem; transition: border-color .15s; }
.plan:hover { border-color: var(--primary); }
.plan h3 { margin: 0; font-size: 1.1rem; }
.plan .price { margin: .5rem 0 1rem; font-size: 2.25rem; font-weight: 700; letter-spacing: -.04em; }
.plan .price small { margin-left: .25rem; color: var(--muted); font-size: .875rem; font-weight: 400; letter-spacing: 0; }
.plan ul { flex: 1; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.plan li { padding: .4rem 0; border-top: 1px solid var(--line); font-size: .95rem; }

.not-found { padding: 6rem 0; text-align: center; }
.not-found h1 { margin-bottom: .5rem; font-size: 4rem; }
.not-found .lead { margin-bottom: 1.5rem; color: var(--muted); }

@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero { padding-top: 2.5rem; }
  .hero-mark { width: 8rem; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 2rem); }
  .navbar .shell { gap: 1rem; }
  .nav-main { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
