/* POLISCI 158 · Section hub
   Same tokens as the Section 1 workshop site: warm neutral ground,
   near-black text, Stanford Cardinal as a restricted accent. */

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --fg: #161719;
  --muted: #62666c;
  --line: #e8e1da;
  --accent: #8c1515;
  --accent-soft: #f3e6e6;
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font-body); }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.4rem; margin: 0 0 .5rem; }
h2 { font-size: 1.7rem; margin: 3rem 0 .75rem; }

.wrap { max-width: 50rem; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 .5rem;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 248, 244, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; }
.topbar .brand { font-family: var(--font-heading); font-weight: 600; margin-right: auto; color: var(--fg); text-decoration: none; }
.topbar nav { display: flex; gap: 1rem; font-size: .92rem; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 .5rem; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: .95rem;
  padding: .45rem 1rem; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn.small-btn { font-size: .85rem; padding: .25rem .7rem; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }

/* ---------- Featured card ---------- */
.featured {
  margin-top: 2rem; padding: 1.4rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.featured h2 { margin: 0 0 .4rem; font-size: 1.6rem; }
.featured .summary { margin: 0; max-width: 40rem; }

/* ---------- Section list ---------- */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.list-head span { font-size: .9rem; }
.sections { list-style: none; padding: 0; margin: 0; }
.row { display: flex; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row .num {
  flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--fg); font-family: var(--font-heading); font-weight: 700;
}
.row-body { flex: 1; min-width: 0; }
.row-head { display: flex; align-items: center; gap: .6rem; }
.row h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; margin: .1rem 0 .2rem; }
.row p { margin: 0; color: var(--muted); }
.row .btn-row { margin-top: .6rem; }
.tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 4px; padding: 0 .35rem; color: var(--muted);
}
.row.upcoming .num { border-color: var(--line); color: var(--muted); }
.row.upcoming h3 { color: var(--muted); font-weight: 400; }

/* ---------- Assignments ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--fg); }
td:first-child, th:first-child { width: 2.5rem; }

footer.site-footer { margin: 4rem 0 0; padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .topbar nav { display: none; }
  .row .num { width: 1.9rem; height: 1.9rem; font-size: .9rem; }
}
@media print {
  .topbar { position: static; }
  .btn-row { display: none; }
}


/* ---------- Course section (sits between hero and featured card) ---------- */
#course h2 { margin-top: 2rem; }
