@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #171a1f;
  --muted: #626a76;
  --panel: #f8f9fb;
  --line: #d7dce3;
  --faint-line: #e9ecf1;
  --accent: #00d7dc;
  --link: #006b73;
  --button-fg: #171a1f;
  --success: #16825c;
  --warning: #9a6212;
  --error: #bb3f4f;
  --syn-keyword: #1a56c4;
  --syn-string: #0a7a3f;
  --syn-number: #9a6700;
  --syn-type: #0f766e;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d0f12;
  --fg: #e9ebef;
  --muted: #a3aab6;
  --panel: #171a1f;
  --line: #414752;
  --faint-line: #2a2f37;
  --accent: #00d7dc;
  --link: #5cdbdf;
  --success: #54cf8e;
  --warning: #f0c267;
  --error: #f47089;
  --syn-keyword: #5aa9e6;
  --syn-string: #79c98a;
  --syn-number: #e3b341;
  --syn-type: #4dd6c4;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.55; }
button { font: inherit; }
button[hidden] { display: none; }
a { color: var(--link); text-underline-offset: 4px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 2px; }
svg { flex: none; }
code { font-family: 'IBM Plex Mono', monospace; font-weight: 400; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; }
.wrap { width: min(100% - 80px, 1200px); margin-inline: auto; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 12px 16px; background: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--faint-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 24px; }
.brand-lockup { display: grid; flex: none; }
.brand-byline { display: flex; align-items: center; min-height: 24px; margin-inline-start: 34%; color: var(--muted); font-size: 11px; line-height: 14px; text-decoration: none; white-space: nowrap; }
.brand { display: inline-flex; flex: none; }
.brand img { height: 30px; width: auto; }
.brand .logo-dark, .icon-sun { display: none; }
[data-theme='dark'] .brand .logo-light, [data-theme='dark'] .icon-moon { display: none; }
[data-theme='dark'] .brand .logo-dark, [data-theme='dark'] .icon-sun { display: block; }
nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
nav a { color: var(--fg); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 6px; white-space: nowrap; }
.nav-icon { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; color: var(--muted); }
.nav-icon svg { width: 18px; height: 18px; }
.theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: 48px; align-items: start; padding: 88px 0 72px; }
.eyebrow { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
h1 { font-size: clamp(40px, 4.6vw, 60px); font-weight: 780; letter-spacing: -0.05em; line-height: 1.05; text-wrap: balance; }
.tagline { margin-top: 24px; font-size: clamp(20px, 2.2vw, 25px); font-weight: 600; letter-spacing: -0.015em; }
/* Each phrase stays on one line, so the tagline wraps between them. */
.tagline span { white-space: nowrap; }
.lede { font-size: 18px; line-height: 1.6; color: var(--muted); margin-top: 18px; max-width: 560px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* The install command takes its own row, with the buttons on the next. */
.actions-break { flex-basis: 100%; height: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 2px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--fg); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--button-fg); }
.command { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; font-size: 12px; line-height: 1.7; }
.command code { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.command code span { color: var(--muted); }
.install { font-size: 13px; min-height: 46px; width: fit-content; }
.copy { flex: none; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); padding: 4px 8px; color: var(--muted); font-family: Inter, sans-serif; font-size: 12px; cursor: pointer; }
/* Real sqt output. */
.terminal { margin: 0; padding: 22px 24px; background: var(--panel); color: var(--fg); font: 12px/1.7 'IBM Plex Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal .cmd { font-weight: 500; }
.terminal .cmd::before { content: '$ '; color: var(--muted); font-weight: 400; }
.terminal .dim, .terminal .cm, .terminal .prompt { color: var(--muted); }
.terminal .ok { color: var(--success); }
/* Output tokens, with the colours sqlload.io uses. Warn and bad are a shade darker in light mode
   so 12px text keeps 4.5:1 contrast on the panel. */
.terminal .strong { font-weight: 500; }
.terminal .kw { color: var(--syn-keyword); }
.terminal .str { color: var(--syn-string); }
.terminal .num { color: var(--syn-number); }
.terminal .ty { color: var(--syn-type); }
.terminal .arg { color: var(--link); }
.terminal .warn { color: var(--warning); }
.terminal .bad { color: var(--error); }
.hero-terminal { margin-top: 44px; border: 1px solid var(--line); border-radius: 2px; }
section { padding: 72px 0; border-top: 1px solid var(--faint-line); }
.section-head { max-width: 68ch; margin-bottom: 32px; }
.section-head p, .start .lede { margin-top: 12px; color: var(--muted); font-size: 17px; }
.problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 2px; }
.card h3, .step h3 { font-size: 18px; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.card .detail-link { margin-top: 14px; }
.steps { display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.step-text { padding: 28px; }
.step-number { display: block; margin-bottom: 12px; color: var(--link); font: 500 13px 'IBM Plex Mono', monospace; }
.step-text p { margin: 10px 0 14px; color: var(--muted); font-size: 15px; }
.step .terminal { border-left: 1px solid var(--faint-line); }
.step-text code, .card code, .caption code { padding: 1px 4px; border-radius: 2px; background: var(--panel); font-size: 0.86em; }
.detail-link { font-size: 14px; text-decoration: none; }
.caption { margin-top: 16px; color: var(--muted); font-size: 13px; }
.start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.start ul { margin: 20px 0 0; padding: 0; list-style: none; }
.start li { padding: 10px 0; border-top: 1px solid var(--faint-line); color: var(--muted); font-size: 15px; }
.start .terminal { border: 1px solid var(--line); border-radius: 2px; }
.closing { padding: 88px 0 96px; text-align: center; }
.closing h2 { max-width: 22ch; margin: 0 auto; }
.closing p { max-width: 56ch; margin: 16px auto 0; color: var(--muted); font-size: 17px; }
.closing .actions { justify-content: center; }
footer.wrap { padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-main, .sqlstack-family { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sqlstack-family { flex-wrap: wrap; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--faint-line); }
.sqlstack-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.sqlstack-brand img { width: 28px; height: auto; }
.sqlstack-dark, [data-theme='dark'] .sqlstack-light { display: none; }
[data-theme='dark'] .sqlstack-dark { display: block; }
footer nav { font-size: 13px; }
.sqlstack-family nav { flex-wrap: wrap; gap: 8px 20px; }
.sqlstack-family nav a { color: var(--muted); }
@media (hover: hover) {
  nav a:hover { text-decoration-color: var(--accent); }
  .brand-byline:hover, .sqlstack-brand:hover { color: var(--fg); text-decoration: underline; }
  .nav-icon:hover, .theme-toggle:hover { color: var(--fg); }
  .button:hover, .copy:hover { border-color: var(--link); }
  .primary:hover { background: var(--link); color: var(--bg); }
  .detail-link:hover { text-decoration: underline; }
}

/* Below 1100px the output moves under the hero text, and each step's output under its text. */
@media (max-width: 1099px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 64px; }
  .hero-terminal { margin-top: 0; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step .terminal { border-left: 0; border-top: 1px solid var(--faint-line); }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { gap: 16px; }
  .brand img { height: 26px; }
  nav { gap: 12px; }
  .nav-icon, .theme-toggle { width: 36px; height: 36px; }
  .hide-sm { display: none; }
  .hero { padding: 44px 0 48px; }
  h1 { font-size: clamp(40px, 10vw, 56px); }
  .eyebrow { margin-bottom: 18px; font-size: 13px; }
  .lede { font-size: 17px; }
  .actions { margin-top: 24px; }
  .terminal { padding: 18px; font-size: 11px; }
  section { padding: 52px 0; }
  .problems, .start { grid-template-columns: minmax(0, 1fr); }
  .step-text, .card { padding: 20px; }
  .closing { padding: 56px 0 64px; text-align: left; }
  .closing h2, .closing p { margin-left: 0; }
  .closing .actions { justify-content: flex-start; }
  footer nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
