:root {
  --brand: #4b62ab;
  --brand-dark: #3a4d87;
  --accent: #ffb310;
  --bg: #ffffff;
  --fg: #1c1e21;
  --muted: #5c6270;
  --border: #e2e5ea;
  --card: #f7f8fa;
  --code-bg: #f2f4f7;
  --link: #3452a4;
  --maxw: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7488d0;
    --brand-dark: #5f74c0;
    --accent: #ffc23d;
    --bg: #16181d;
    --fg: #e6e8ec;
    --muted: #9aa1af;
    --border: #2b2f38;
    --card: #1e2128;
    --code-bg: #22262e;
    --link: #93a7ee;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header / nav ---- */
.site-header {
  background: var(--brand);
  border-bottom: 3px solid var(--accent);
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.site-header img {
  height: 40px;
  width: auto;
  display: block;
  background: #fff;
  padding: 5px 9px;
  border-radius: 8px;
}
.site-header .title {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  margin-right: auto;
}
.site-header .title a { color: #fff; }
.site-nav {
  display: flex;
  gap: 0.25rem 1.1rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: #eef1fb;
  font-size: 0.95rem;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }

/* ---- Layout ---- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
}
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; color: var(--brand); }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.4rem; }
li { margin: 0.25rem 0; }

.lead { font-size: 1.1rem; color: var(--muted); }

/* ---- Code ---- */
code {
  background: var(--code-bg);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.45;
}
pre code { background: none; padding: 0; font-size: 0.88rem; }

/* ---- Cards / callouts ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1rem 0;
}
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }

/* ---- News list ---- */
.news-item {
  border-left: 3px solid var(--border);
  padding: 0.1rem 0 0.1rem 1.1rem;
  margin: 1.4rem 0;
}
.news-item.featured {
  border-left-color: var(--accent);
  background: var(--card);
  border-radius: 0 10px 10px 0;
  padding: 0.6rem 1.1rem 0.8rem;
}
.news-date {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.news-item h3 { margin: 0.15rem 0 0.5rem; font-size: 1.15rem; }
.news-item h3 a { color: inherit; }
.news-item p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ---- Footer ---- */
.site-footer {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer img { height: 40px; width: auto; display: block; }
.site-footer .spacer { margin-left: auto; }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-header .title { font-size: 1rem; width: 100%; margin-bottom: 0.35rem; }
}
