/* Styles for the static content pages (about.html, 404.html). The editor itself uses styles.css. */
:root {
  --bg: #f4f5fa; --panel: #ffffff; --border: #dadfe7; --text: #1b2433; --muted: #5b6779;
  --accent: #7400e3; --accent-soft: rgba(116, 0, 227, .08);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0e16; --panel: #121826; --border: #243049; --text: #e7ebf3; --muted: #9aa6bd; --accent: #a875ff; --accent-soft: rgba(168, 117, 255, .14); }
  .logo-light { display: none !important; }
}
@media (prefers-color-scheme: light) { .logo-dark { display: none !important; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px max(20px, calc((100vw - 980px) / 2));
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.site-header .brand img { display: block; height: 34px; width: auto; }
.site-header nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.site-header nav a:hover { color: var(--accent); }

.cta {
  display: inline-block; padding: 11px 20px; border-radius: 10px;
  background: var(--accent); color: #fff !important; font-weight: 600; text-decoration: none;
}
.cta:hover { filter: brightness(1.08); }
.cta.small { padding: 8px 14px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 64px; }
.hero { padding: 56px 0 32px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 24px; }

section { margin-top: 44px; }
h2 { font-size: 26px; letter-spacing: -.01em; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 0 0 4px; }

.features, .templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.features li, .templates li, .symbols div, details {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
}
.features p, .templates p, .symbols dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.steps { counter-reset: s; padding: 0; list-style: none; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700;
}

.symbols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; margin: 0; }
.symbols div { margin: 0; }
.symbols dt { font-weight: 700; }

details { margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

.final { text-align: center; padding: 36px 20px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--border); }
.site-footer { border-top: 1px solid var(--border); padding: 24px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); }

/* 404 */
.plain { display: grid; place-items: center; min-height: 100vh; }
.notfound { text-align: center; padding: 24px; max-width: 520px; }
.notfound h1 { margin: 24px 0 8px; }
.notfound p { color: var(--muted); }

@media (max-width: 600px) {
  .site-header { padding: 10px 16px; gap: 10px; }
  .site-header nav { gap: 12px; margin-left: 0; width: 100%; }
  .hero { padding: 32px 0 20px; }
  .hero p { font-size: 16px; }
  h2 { font-size: 22px; }
  .wrap { padding: 0 16px 48px; }
  .steps li { padding-left: 52px; }
}

/* ---- tutorial & guide extras ---- */
html { scroll-padding-top: 84px; }
kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; text-align: center; white-space: nowrap;
  font: 600 .82em var(--font); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--panel);
}
.ui {
  display: inline-block; padding: 0 8px; border-radius: 999px; white-space: nowrap;
  font-weight: 600; font-size: .92em; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border);
}
.cta.ghost { background: transparent; color: var(--accent) !important; border: 1.5px solid var(--accent); margin-left: 8px; }
.cta.ghost:hover { background: var(--accent-soft); filter: none; }
.hero .cta, .final .cta { margin-top: 6px; }

.toc { margin: 8px 0 8px; padding: 18px 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.toc ol { margin: 10px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.note, .callout { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--accent-soft); margin: 16px 0; }
.note { color: var(--text); }
.callout h3 { margin: 0 0 4px; }
.callout p { margin: 0; color: var(--muted); }

.plain-list { margin: 10px 0 0; padding-left: 22px; }
.plain-list li { margin: 8px 0; }
.plain-list.numbered { list-style: decimal; }

.fig { margin: 18px 0; padding: 14px 14px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.fig svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.fig figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: 14px; }
.s-box { fill: var(--panel); stroke: var(--text); stroke-width: 2; }
.s-text { fill: var(--text); font: 600 14px var(--font); }
.s-muted { fill: var(--muted); font: 500 12px var(--font); }
.s-dot { fill: var(--accent); }
.s-acc { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.s-acc.dashed { stroke-dasharray: 6 5; }
.s-line { fill: none; stroke: var(--text); stroke-width: 2; }
.s-fill { fill: var(--text); }

.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
table.keys { width: 100%; border-collapse: collapse; font-size: 15px; }
table.keys th, table.keys td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.keys th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.keys tr:last-child td { border-bottom: 0; }
table.keys td:first-child { white-space: nowrap; font-weight: 600; }

@media (max-width: 600px) {
  .toc ol { columns: 1; }
  .cta.ghost { margin-left: 0; }
  table.keys td:first-child { white-space: normal; }
}
