:root {
  --accent: #0b66c3;
  --accent-dark: #084c92;
  --text: #1c1e21;
  --text-muted: #5a6270;
  --bg: #ffffff;
  --surface: #f7f9fc;
  --border: #e3e7ec;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

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

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

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

a:hover,
a:focus {
  text-decoration: underline;
  color: var(--accent-dark);
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2rem;
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

ul, ol {
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.35rem;
}

code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.93em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

.brand .brand-accent {
  color: var(--accent);
}

nav.primary {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

nav.primary a {
  color: var(--text-muted);
  font-size: 0.97rem;
}

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

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: -0.25rem;
  margin-bottom: 2rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

/* Featured article cards on homepage */
.featured {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.35rem;
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(11, 102, 195, 0.07);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.card h3 a {
  color: var(--text);
}

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

.card p {
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
}

.card .byline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

/* Contact form */
form.contact {
  margin: 1.5rem 0;
  display: grid;
  gap: 0.85rem;
  max-width: 520px;
}

form.contact label {
  display: block;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

form.contact input,
form.contact textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
}

form.contact input:focus,
form.contact textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 102, 195, 0.15);
}

form.contact textarea {
  min-height: 140px;
  resize: vertical;
}

form.contact button {
  justify-self: start;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.65rem 1.2rem;
  font: inherit;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
}

form.contact button:hover {
  background: var(--accent-dark);
}

.form-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Byline / author attribution */
.byline-block {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 2rem;
}

.site-footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer nav a {
  color: var(--text-muted);
}

.site-footer nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Small screens */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 1.65rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  .site-header .container {
    padding: 0.85rem 1rem;
  }
  nav.primary {
    gap: 0.9rem;
  }
  main {
    padding: 1.75rem 1rem 2.5rem;
  }
}
