:root {
  --bg: #eef7ff;
  --surface: #ffffff;
  --surface-soft: #f2f8ff;
  --line: #cfe0f2;
  --line-strong: #a9c5df;
  --text: #1f3248;
  --muted: #60758b;
  --accent: #1f79c9;
  --accent-strong: #155fa6;
  --sky: #7cc4ff;
  --ink: #0f1f33;
  --shadow: 0 16px 40px rgba(29, 83, 135, 0.12);
  --radius: 8px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #e6f5ff 0%, var(--bg) 40%, #f8fbff 100%);
  color: var(--text);
  font-family: var(--sans);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.home-link {
  color: var(--accent);
  background: #fff;
}

.button {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button.secondary {
  color: var(--accent);
  background: #fff;
}

.button:hover {
  background: var(--accent-strong);
}

.button.secondary:hover,
.home-link:hover {
  color: #fff;
  background: var(--accent);
}

.masthead {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sky);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow,
.card-kicker {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.08;
}

.masthead p,
.topic-copy p,
.card p,
.note {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.card {
  display: grid;
  min-height: 204px;
  gap: 12px;
  align-content: start;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sky);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card h2,
.topic-copy h2 {
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.25;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.metric-row span {
  padding: 6px 8px;
  color: var(--accent);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 800;
}

.topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  margin-top: 14px;
}

.topic-copy,
.side-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.55;
}

footer {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (max-width: 840px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .grid,
  .topic-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.65rem;
  }
}
