:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --border: #e5e7eb;
  --header: #0f172a;
  --header-text: #f8fafc;
  --max: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  font-size: 17px;
}

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header and navigation */
.site-header { background: var(--header); color: var(--header-text); }
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { color: var(--header-text); font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.logo span { color: #f59e0b; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; }
.site-nav a { color: #cbd5e1; text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #ffffff; }

/* Hero */
.hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 64px 0; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.25; margin-bottom: 16px; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 640px; }
.button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 22px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.button:hover { background: #92400e; }

/* Sections */
main { padding: 48px 0; }
section + section { margin-top: 48px; }
h1, h2, h3 { line-height: 1.3; color: #111827; }
h2 { font-size: 1.6rem; margin-bottom: 16px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }
p + p, p + ul, ul + p, p + ol, ol + p { margin-top: 16px; }
main ul, main ol { padding-left: 24px; }
main li + li { margin-top: 6px; }

/* Article cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.card p { color: var(--muted); flex: 1; }
.card .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.card a.more { margin-top: 16px; font-weight: 600; }

/* Article pages */
.article { max-width: 720px; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); margin-bottom: 8px; }
.article .meta { color: var(--muted); margin-bottom: 32px; }
.article h2 { margin-top: 40px; font-size: 1.4rem; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--muted); }
.note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 6px;
  margin: 24px 0;
}
code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  word-break: break-word;
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 0.9rem;
}
pre code { background: none; border: none; padding: 0; color: inherit; }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--muted); }
