/* Brand palette mirrored from ewtrader/ewedge/ewedge_api/theme.py (the source of truth). */
:root {
  --page: #E9E9E7;
  --surface: #EFEFEC;
  --card: #F5F5F3;
  --line: #DBDBD8;
  --ink: #181818;
  --muted: #6B6B6B;
  --faint: #A6A6A3;
  --accent: #FFA700;
  --accent-ink: #1A1300;
  --nav-active: #181818;
  --focus: #181818;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0C0C0C;
    --surface: #161616;
    --card: #1A1A1A;
    --line: #2A2A2A;
    --ink: #F2F2F2;
    --muted: #8A8A8A;
    --faint: #5E5E5E;
    --nav-active: #FFA700;
    --focus: #FFA700;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.65 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

header { border-bottom: 1px solid var(--line); }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}
.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
nav { display: flex; gap: 26px; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--nav-active);
}
a { color: var(--ink); text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

main { flex: 1; padding-bottom: 72px; }

.hero { padding: 88px 0 24px; }
.hero h1, .page-head h1 {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}
.hero h1 { font-size: clamp(2.5rem, 7vw, 3.6rem); }
.page-head { padding: 72px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.4rem); }
.lede {
  margin: 24px 0 0;
  max-width: 34em;
  font-size: 1.2rem;
  line-height: 1.6;
}
.meta { margin: 14px 0 0; color: var(--muted); font-size: .95rem; }

section, article.entry { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 3.2vw, 1.6rem);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
h3 { margin: 32px 0 10px; font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 14px; max-width: 38em; }
.entry .note { margin: -8px 0 12px; color: var(--muted); font-size: .95rem; }
.prose section { border-top: 0; padding-top: 0; margin-top: 36px; }

.cta-row { display: flex; align-items: center; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 3px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }

code, pre {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: .88em;
}
:not(pre) > code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}
pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 18px;
}
blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: 3px;
  color: var(--muted);
}
blockquote p { margin: 0; }
.shots { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 18px; }
.shots img { width: 185px; height: auto; border-radius: 3px; }

footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  font-size: .9rem;
  color: var(--muted);
}
footer .shell { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--muted); }
