/* Shared course stylesheet for 美国政治基础 lessons and references. */
:root {
  --paper: #fbfaf7;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d8d2c4;
  --accent: #1f4e79;
  --accent-soft: #e8f0f7;
  --ok: #176c3a;
  --warn: #8a4b00;
  font-family: ui-serif, Georgia, 'Noto Serif SC', 'Songti SC', serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 18px;
}
main {
  width: min(880px, calc(100% - 40px));
  margin: 48px auto 80px;
}
h1, h2, h3 {
  line-height: 1.2;
  color: #111827;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: 0.2em; }
h2 { margin-top: 2.2em; border-top: 1px solid var(--line); padding-top: 1em; }
a { color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
.subtitle { color: var(--muted); font-size: 1.1rem; max-width: 64ch; }
.card, .quiz, .note {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 1px 0 rgba(16,24,40,0.04);
}
.note { background: var(--accent-soft); border-color: #c6d8e8; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
button {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: white;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}
button:hover { background: var(--accent-soft); }
.small { font-size: 0.9rem; color: var(--muted); }
@media print {
  body { background: white; font-size: 12pt; }
  main { width: auto; margin: 0; }
  button { display: none; }
  .card, .quiz, .note { box-shadow: none; }
}


/* Site chrome added around teach-generated lessons */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 30;
  background: var(--ink);
  color: white;
  padding: 10px 12px;
  border-radius: 12px;
}
.skip-link:focus { top: 16px; }
.course-topbar {
  width: min(900px, calc(100% - 44px));
  margin: 18px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .94rem;
}
.course-topbar a,
.lesson-bottom-nav a {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: 8px 12px;
}
.course-topbar a:hover,
.lesson-bottom-nav a:hover { background: var(--accent-soft); }
.lesson-bottom-nav {
  width: min(900px, calc(100% - 44px));
  margin: -48px auto 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.lesson-bottom-nav a { text-align: center; }
.lesson-bottom-nav .next { justify-self: end; }
.lesson-bottom-nav .prev { justify-self: start; }
@media (max-width: 700px) {
  body { font-size: 17px; }
  main { width: calc(100% - 28px); margin: 28px auto 74px; padding-left: 0; padding-right: 0; }
  article { padding: 24px 18px; border-radius: 20px; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .card, .quiz, .note { border-radius: 16px; padding: 1rem; }
  .course-topbar { width: calc(100% - 28px); font-size: .9rem; }
  .course-topbar span { display: none; }
  .lesson-bottom-nav {
    position: sticky;
    bottom: 10px;
    z-index: 20;
    width: calc(100% - 20px);
    margin: -54px auto 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(251,250,247,.88);
    backdrop-filter: blur(16px);
    padding: 6px;
    box-shadow: 0 14px 38px rgba(31, 41, 51, 0.14);
  }
  .lesson-bottom-nav a { padding: 9px 10px; font-size: .9rem; background: #fff; }
  button { display: block; width: 100%; text-align: left; border-radius: 16px; margin: 8px 0; }
}
@media print {
  .course-topbar, .lesson-bottom-nav, .skip-link { display: none !important; }
}
