/* svg2drawio.runlocal.dev — hand-rolled, no framework, no JS dependencies. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --surface: #ffffff;
  --border: #dfe5ee;
  --text: #16202e;
  --text-dim: #5a6779;
  --accent: #f08705;          /* draw.io orange */
  --accent-strong: #c96e00;
  --accent-soft: #fff3e0;
  --code-bg: #131a24;
  --code-text: #e7edf5;
  --shadow: 0 1px 2px rgba(16, 26, 40, .06), 0 8px 24px rgba(16, 26, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151d;
    --bg-alt: #141c26;
    --surface: #18212d;
    --border: #27313f;
    --text: #e8eef6;
    --text-dim: #9aa8bb;
    --accent: #ffa029;
    --accent-strong: #ffb959;
    --accent-soft: #2a2015;
    --code-bg: #0a0f16;
    --code-text: #e7edf5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); }
@media (prefers-color-scheme: dark) { a { color: var(--accent); } }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
}

.brand svg { display: block; }

nav.site { margin-left: auto; display: flex; gap: 20px; }

nav.site a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

nav.site a:hover { color: var(--text); }

@media (max-width: 620px) {
  nav.site a.hide-sm { display: none; }
}

/* ── Hero ───────────────────────────────────────────────── */

.hero { padding: 72px 0 56px; }

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.hero h1 .accent { color: var(--accent); }

.hero p.lede {
  margin: 0 0 28px;
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--text-dim);
  max-width: 62ch;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: #241703; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover { border-color: var(--accent); }

/* ── Code blocks ────────────────────────────────────────── */

pre {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

pre .c { color: #8fa3ba; }   /* comment */
pre .p { color: var(--accent); } /* prompt / command name */

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* ── Sections ───────────────────────────────────────────── */

section { padding: 56px 0; border-top: 1px solid var(--border); }
section.alt { background: var(--bg-alt); }

section h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -.02em;
}

section p.sub {
  margin: 0 0 28px;
  color: var(--text-dim);
  max-width: 62ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -.01em;
}

.card p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* ── Mapping table ──────────────────────────────────────── */

table.map {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

table.map th, table.map td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}

table.map thead th {
  background: var(--accent-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
}

table.map tbody tr:last-child td { border-bottom: 0; }

/* ── Figure ─────────────────────────────────────────────── */

figure.flow {
  margin: 0 0 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

figure.flow svg { display: block; width: 100%; height: auto; }

figure.flow figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-dim);
  text-align: center;
}

/* ── FAQ ────────────────────────────────────────────────── */

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

details p { color: var(--text-dim); margin: 10px 0 0; font-size: 14.5px; }

/* ── Footer ─────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--text-dim);
  font-size: 14px;
}

footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
footer.site a { color: var(--text-dim); }
footer.site .spacer { margin-left: auto; }

/* ── 404 ────────────────────────────────────────────────── */

.center-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}
