/* Shared stylesheet for English Small Talk lessons */
:root {
  --bg: #fbfaf7;
  --paper: #fffefb;
  --ink: #1f2933;
  --muted: #697386;
  --line: #e7e1d4;
  --accent: #245c7a;
  --accent-soft: #e8f2f6;
  --good: #1f7a4d;
  --warn: #9a5b13;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, #eef7f8, var(--bg) 42%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
  line-height: 1.62;
}
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 22px 80px;
}
article {
  background: rgba(255, 254, 251, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 40px;
}
h1, h2, h3 { line-height: 1.18; margin: 0 0 14px; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.04em; }
h2 { font-size: 1.55rem; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 28px; }
h3 { font-size: 1.08rem; margin-top: 24px; color: var(--accent); }
p, ul, ol { margin-top: 0; }
a { color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; }
.lede { font-size: 1.18rem; color: #334155; max-width: 68ch; }
.card, .practice, .dialogue, .quiz, .note {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: #fff;
  margin: 18px 0;
}
.note { background: var(--accent-soft); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.phrase {
  display: block;
  font-size: 1.04rem;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: #f8fbfc;
  margin: 10px 0;
}
.bad { border-left-color: var(--warn); background: #fff8ed; }
.good { border-left-color: var(--good); background: #f0fbf5; }
.small { color: var(--muted); font-size: .92rem; }
button {
  appearance: none;
  border: 1px solid #b9c8d0;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  margin: 5px 6px 5px 0;
  cursor: pointer;
  font: inherit;
}
button:hover { background: var(--accent-soft); }
button.correct { border-color: var(--good); background: #e9f8ef; }
button.incorrect { border-color: var(--warn); background: #fff1dc; }
.feedback { font-weight: 700; margin-top: 10px; }
footer { margin-top: 34px; color: var(--muted); font-size: .95rem; }
@media print {
  body { background: #fff; }
  main { padding: 0; }
  article { box-shadow: none; border: none; }
  button { display: 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; }
}
