:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #18202b; --muted: #5b6676; --line: #dde2e8;
  --accent: #1f6feb; --accent-ink: #ffffff; --ok: #1a7f37; --warn: #9a6700;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --surface: #161b22; --text: #e6edf3; --muted: #9aa5b1; --line: #2b3440;
    --accent: #4c8dff; --accent-ink: #0e1116; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #161b22; --text: #e6edf3; --muted: #9aa5b1; --line: #2b3440;
  --accent: #4c8dff; --accent-ink: #0e1116; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem;
  color: var(--text); text-decoration: none; margin-right: auto; }
#site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
#site-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
#site-nav a:hover { color: var(--text); background: var(--bg); }
#site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--bg); }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); padding: 8px 14px; }
button:hover { border-color: var(--accent); }
.nav-toggle { display: none; }

.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0; }
section { margin: 0 0 32px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; font-size: 1.15rem; }
.card ul { padding-left: 18px; margin: 0; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.wide { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 10px 18px;
  border-radius: 8px; text-decoration: none; font-weight: 600; }
.muted { color: var(--muted); }

.stepper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps { margin: 0; padding-left: 22px; }
.steps li { padding: 8px 10px; border-radius: 8px; color: var(--muted); transition: background .2s, color .2s; }
.steps li.active { background: var(--bg); color: var(--text); outline: 2px solid var(--accent); }
.stepper-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border-radius: 999px; padding: 6px 14px; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.agent[hidden] { display: none; }

.table-wrap { overflow-x: auto; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-size: .9rem; }

.contact { display: grid; gap: 12px; max-width: 520px; }
.contact label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.contact input, .contact textarea { font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.form-status { margin: 0; min-height: 1.6em; }
.form-status.ok { color: var(--ok); } .form-status.err { color: var(--warn); }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .9rem; margin-top: 48px; }

@media (max-width: 800px) {
  .grid.two, .grid.three, .split { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; order: 2; }
  .theme-toggle { order: 3; }
  .header-inner { flex-wrap: wrap; }
  #site-nav { order: 4; width: 100%; display: none; padding-bottom: 12px; }
  #site-nav.open { display: block; }
  #site-nav ul { flex-direction: column; }
}
