/* EvSolver guide. Plain documentation styling: one typeface, neutral colours, thin rules, no shadows. */
:root {
  color-scheme: light;
  --bg: #fbfbf9; --fg: #1a1c20; --muted: #555b66; --faint: #7b818c;
  --rule: #dcdcd6; --wash: #f1f1ed; --accent: #1c2a4a; --link: #2456a6; --mark: #e5484d;
  --code-bg: #efefea;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121418; --fg: #e8eaee; --muted: #a3aab6; --faint: #7c8391;
  --rule: #2b303a; --wash: #1a1d23; --accent: #a9bdf0; --link: #8db2f0; --code-bg: #1f232b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121418; --fg: #e8eaee; --muted: #a3aab6; --faint: #7c8391;
    --rule: #2b303a; --wash: #1a1d23; --accent: #a9bdf0; --link: #8db2f0; --code-bg: #1f232b;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: .85em; background: var(--code-bg); border-radius: 3px; padding: 1px 5px; overflow-wrap: anywhere; }
b { font-weight: 600; }

/* header */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px; padding: 0 28px; height: 56px; background: var(--bg); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand b { font-weight: 800; }
.top-title { color: var(--faint); font-size: 14px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-actions a, .top-actions button, .top-actions select { color: var(--muted); font: inherit; font-size: 14px; text-decoration: none; background: none; border: 0; padding: 6px 10px; cursor: pointer; border-radius: 6px; }
.top-actions a:hover, .top-actions button:hover, .top-actions select:hover { color: var(--fg); background: var(--wash); }
select.lang-select { appearance: none; -webkit-appearance: none; border: 1px solid var(--border); padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 12px center, right 8px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.top-actions .open-app { color: var(--fg); font-weight: 600; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0 !important; }
.theme-btn svg { width: 17px; height: 17px; display: none; }
.theme-btn[data-mode="auto"] .i-auto, .theme-btn[data-mode="light"] .i-light, .theme-btn[data-mode="dark"] .i-dark { display: block; }

/* layout */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; max-width: 1120px; margin: 0 auto; padding: 40px 28px 72px; align-items: start; }
.toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14px; }
.toc summary { list-style: none; cursor: default; font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: .04em; margin-bottom: 8px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid var(--rule); color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a span { flex: none; min-width: 24px; color: var(--faint); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--fg); }
.toc a.on { color: var(--fg); border-left: 2px solid var(--accent); padding-left: 11px; font-weight: 600; }

main { min-width: 0; max-width: 760px; }
.hero { padding-bottom: 12px; }
h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.2; letter-spacing: -.025em; font-weight: 700; }
.hero p { margin: 0; font-size: 17px; color: var(--muted); }
section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rule); }
.hero + section { margin-top: 28px; }
h2 { margin: 0 0 14px; font-size: 24px; line-height: 1.3; letter-spacing: -.02em; font-weight: 700; }
h2 .num { color: var(--faint); font-weight: 600; margin-right: .5em; font-variant-numeric: tabular-nums; }
h2 .num::after { content: '.'; }
h3 .num { color: var(--faint); font-weight: 500; margin-right: .55em; font-variant-numeric: tabular-nums; }
h3 { margin: 30px 0 8px; font-size: 17px; line-height: 1.4; font-weight: 650; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 4px 0; }
li::marker { color: var(--faint); }

/* numbered steps */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; margin: 0; padding: 10px 0; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }

/* screenshots */
figure { margin: 22px 0 28px; }
figure .zoom { display: block; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--wash); text-align: center; padding: 8px; }
figure img { display: inline-block; max-width: 100%; height: auto; vertical-align: top; }
.img-dark { display: none; }
:root[data-theme="dark"] .img-light { display: none; }
:root[data-theme="dark"] .img-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .img-light { display: none; }
  :root:not([data-theme]) .img-dark { display: inline-block; }
}
figcaption { padding-top: 12px; }
.marks { list-style: none; margin: 0; padding: 0; counter-reset: mk; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 6px 28px; }
.marks li { counter-increment: mk; display: flex; gap: 9px; align-items: baseline; margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.marks li::before { content: counter(mk); flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--mark); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; transform: translateY(1px); }
.marks li b { color: var(--fg); }

/* notes */
.callout { margin: 18px 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--rule); }
.callout > b { display: block; font-size: 13px; color: var(--faint); font-weight: 600; margin-bottom: 2px; }
.callout p { margin-bottom: 10px; font-size: 15.5px; }
.callout.tip { border-left-color: var(--accent); }
.callout.tip > b { color: var(--accent); }

/* tables */
.table-wrap { overflow-x: auto; margin: 14px 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-size: 12px; font-weight: 600; color: var(--faint); border-bottom-color: var(--fg); }
tbody th { font-weight: 600; }

/* questions */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.faq details[open] summary { padding-bottom: 4px; }
.faq p { color: var(--muted); margin-bottom: 14px; }

.names { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 4px; }
.names span { padding: 3px 11px; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; color: var(--muted); }
.foot { border-top: 1px solid var(--rule); padding: 24px 28px 44px; text-align: center; font-size: 13px; color: var(--faint); }
.foot p { margin: 3px 0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 18px 56px; }
  .toc { position: static; max-height: none; border: 1px solid var(--rule); border-radius: 4px; padding: 10px 14px; }
  .toc summary { cursor: pointer; margin: 0; }
  .toc details[open] summary { margin-bottom: 8px; }
  .top { padding: 0 14px; gap: 10px; }
  .top-title { display: none; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .marks { grid-template-columns: minmax(0, 1fr); }
}
