/* SQL Playground — styles.
 *
 * Extracted from the inline <style> in index.html (2026-11-16) so that the
 * guide and trust pages generated by scripts/gen-pages.mjs share one
 * stylesheet instead of each carrying a private copy.
 *
 * Token names match the other 18 sites in the fleet where they overlap
 * (--bg/--card/--ink/--muted/--line/--accent) so the shared adsense.css and
 * hub-nav resolve correctly.
 */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --card2: #eef1f5;
  --ink: #1c2430;
  --muted: #55606e;
  --line: #e2e8f0;
  --link: #1d4ed8;
  --cta: #1e3a8a;
  --accent: #1d4ed8;
  --ok-bg: #ecfdf5;
  --ok-edge: #047857;
  --stop-bg: #fef2f2;
  --stop-edge: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(28, 36, 48, .07), 0 8px 22px rgba(28, 36, 48, .05);
  --hub-ink: #475569;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 18px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration-thickness: 2px; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
}
code {
  background: var(--card2); border-radius: 4px; padding: 1px 5px;
}
kbd {
  background: #f1f5f9; border: 1px solid #cbd5e1; border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px;
}

/* ── header ─────────────────────────────────────────────────────────────── */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); }
.head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px; color: var(--ink);
  text-decoration: none; font-weight: 700;
}
.brand-mark { font-size: 22px; }
.brand small { color: var(--muted); font-weight: 400; font-size: 12px; display: block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--card2); }

/* The shared hub rail (rendered inline by _shared/site-config.mjs).
 * Only colour is set here: the component ships its own layout inline so it can
 * drop into any host. Overriding display or font-size in the host would fight
 * that inline style — measured 2026-11-16, a local `.hub{font-size:...}` left
 * the rail at 16px while every other site renders it at 13px. */
.hub a { color: var(--hub-ink); text-decoration: none; }
.hub a:hover { color: var(--ink); text-decoration: underline; }

/* ── layout ─────────────────────────────────────────────────────────────── */
main { padding: 8px 0 40px; }
.hero { padding: 20px 0 8px; }
.hero h1 {
  font-size: clamp(24px, 4.2vw, 34px); line-height: 1.2; margin: 0 0 10px;
  letter-spacing: -.02em;
}
.lede { color: var(--muted); font-size: 16px; margin: 0 0 16px; max-width: 62ch; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin: 16px 0;
}
.card h2 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.01em; }

/* The tool IS the product: give it a visual edge so it reads as the reason
 * for the page rather than another prose block. */
.tool-card { border-left: 4px solid var(--accent); }

/* ── the editor ─────────────────────────────────────────────────────────── */
.editor-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 768px) { .editor-wrap { grid-template-columns: 1fr 1fr; } }
textarea {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  resize: vertical; background: var(--card); color: var(--ink);
}
textarea:focus { outline: 2px solid var(--cta); }
button {
  display: inline-block; background: var(--cta); color: #fff; font-weight: 600;
  padding: 11px 18px; border-radius: 10px; font-size: 15px; border: none; cursor: pointer;
}
button:hover { filter: brightness(1.12); }
button.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover { background: var(--card2); }
.btn {
  display: inline-block; background: var(--cta); color: #fff; text-decoration: none;
  font-weight: 600; padding: 11px 18px; border-radius: 10px; font-size: 15px;
}
.btn:hover { filter: brightness(1.12); }

table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 0; }
table th, table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
table thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600;
}
.row-count { font-size: 13px; color: var(--muted); margin-top: 6px; }
.result-block { margin-bottom: 12px; }
.result-block:last-child { margin-bottom: 0; }
.result-title {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; margin: 2px 0 3px;
  background: var(--card2); border-radius: 999px; padding: 1px 8px;
}
.null-value { color: var(--muted); font-style: italic; }
.examples { margin-top: 16px; }
.examples-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; margin-bottom: 8px;
}
.example-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.example-button { font-size: 12.5px; padding: 7px 11px; }
.schema-card { margin-top: 14px; font-size: 13px; color: var(--muted); }
.schema-card summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.schema-card p { margin: 8px 0 0; }
.schema-tables { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.status {
  margin: 12px 0; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  background: var(--card); border: 1px solid var(--line);
}
.status.ok { color: var(--ok-edge); background: var(--ok-bg); }
.status.err { color: var(--stop-edge); background: var(--stop-bg); }

/* ── prose (guides + privacy section) ───────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: clamp(24px, 4vw, 32px); line-height: 1.2; letter-spacing: -.02em; }
.prose h2 { font-size: 21px; margin: 32px 0 10px; letter-spacing: -.01em; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 10px 0 16px; padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose code { background: var(--card2); }
.tagline { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.guide-cta { margin: 28px 0 14px; }
.fineprint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* Privacy architecture section — the selling point of every site in the fleet. */
.privacy-section { margin-top: 34px; padding-top: 24px; border-top: 2px solid var(--line); }
.privacy-section h2 { font-size: 1.35em; margin-bottom: 10px; }
.privacy-section h3 { font-size: 1.05em; margin: 20px 0 8px; }
.privacy-steps { margin: 10px 0 14px; padding-left: 22px; }
.privacy-steps li { margin-bottom: 8px; line-height: 1.6; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-foot {
  background: #0f172a; color: #cbd5e1; padding: 26px 0 24px; margin-top: 24px;
  font-size: 13.5px;
}
.site-foot a { color: #cbd5e1; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px;
}
.foot-grid h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; margin: 0 0 8px;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 4px 0; }
.foot-donate { margin: 16px 0 0; }
.btn-ko-fi {
  display: inline-block; background: #c2410c; color: #fff; font-weight: 600;
  padding: 9px 16px; border-radius: 10px; font-size: 14px;
}
.btn-ko-fi:hover { background: #9a3412; text-decoration: none; }
.built-by { margin: 14px auto 0; max-width: 1000px; font-size: 12px; color: #94a3b8; }

/* ── ad slots ───────────────────────────────────────────────────────────── */
/* Geometry lives in adsense.css; these are only fallbacks so a page that
 * somehow loads without it still reserves space rather than jumping. */
.ad-slot-bottom { margin: 26px 0 8px; min-height: 92px; }
.dummy-ad { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; background: var(--card); }
.dummy-ad__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 8px;
}
.dummy-ad__body { display: flex; gap: 12px; align-items: center; }
.dummy-ad__thumb { width: 54px; height: 54px; border-radius: 8px; background: var(--card2); flex: 0 0 auto; }
.dummy-ad__title { font-weight: 600; font-size: 14px; }
.dummy-ad__blurb { color: var(--muted); font-size: 13px; }

@media (max-width: 560px) { .card { padding: 15px 14px; } }
