/* Publications page (2026): page-specific layer on top of teaching-redesign.css (same system, body.teach-v3) */
body.teach-v3 { font-family: 'Roboto', Arial, sans-serif; }
body.teach-v3 main { max-width: 1240px; margin: clamp(32px, 5vw, 64px) auto 0; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
body.teach-v3 main section { margin-bottom: clamp(48px, 7vw, 88px); }
body.teach-v3 .publications-story .page-story__media img { object-position: 50% 58% !important; }

/* Status snapshot: three plain cards under the hero */
body.teach-v3 .publication-snapshot {
  width: min(1208px, calc(100% - 32px)); margin: clamp(28px, 4vw, 48px) auto 0 !important; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none;
}
body.teach-v3 .publication-snapshot li {
  padding: 22px 24px; background: #fff !important; border: 1.5px solid var(--ink) !important; border-top: 5px solid var(--carnelian) !important;
  border-radius: 14px !important; box-shadow: none !important;
}
body.teach-v3 .publication-snapshot strong { display: block; color: var(--carnelian) !important; font: 800 1rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
body.teach-v3 .publication-snapshot span { display: block; margin-top: 8px; color: var(--ink) !important; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.45; }

/* Year groups */
body.teach-v3 .year-section { margin: 34px 0 0; padding: 0 !important; border: 0 !important; }
body.teach-v3 .year-heading {
  display: flex; align-items: center; gap: 18px; margin: 0 0 18px !important;
  font: 800 clamp(1.4rem, 2.4vw, 1.9rem) var(--display) !important; letter-spacing: .04em !important; color: var(--carnelian) !important;
}
body.teach-v3 .year-heading::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: .25; }

/* Cards */
body.teach-v3 .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
body.teach-v3 .card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0 !important;
  background: #fff !important; color: var(--ink) !important;
  border: 1.5px solid var(--line) !important; border-radius: 18px !important; box-shadow: none !important;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .25s;
}
body.teach-v3 .card:hover { transform: translateY(-5px); border-color: var(--carnelian) !important; }
body.teach-v3 .card > a:first-child { display: block; background: #f5f2ec; border-bottom: 1.5px solid var(--line); }
body.teach-v3 .card img {
  display: block; width: 100% !important; height: 260px; object-fit: contain; padding: 14px;
  border-radius: 0 !important; box-shadow: none !important; background: #f5f2ec;
}
body.teach-v3 .card > div { padding: 22px 24px 26px; font-size: clamp(1.02rem, 1.25vw, 1.12rem); line-height: 1.62; color: var(--ink) !important; }
body.teach-v3 .card b { font-weight: 700; }
body.teach-v3 .card a { color: var(--carnelian) !important; font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
body.teach-v3 .card > a:first-child { text-decoration: none; }
body.teach-v3 .card > div a { display: inline-block; margin: 6px 14px 0 0; }
body.teach-v3 .pub-status {
  display: inline-block; margin-top: 12px; padding: 4px 12px; color: var(--carnelian) !important;
  border: 1.5px solid var(--carnelian); border-radius: 999px; font-size: .92rem; font-weight: 700; line-height: 1.4;
}

/* Teaching invitation */
body.teach-v3 .teaching-invitation {
  max-width: 1240px; margin: 0 auto clamp(48px, 7vw, 88px) !important; padding: clamp(26px, 4vw, 44px) !important;
  background: #fff !important; border: 1.5px solid var(--ink) !important; border-left: 8px solid var(--carnelian) !important;
  border-radius: 18px !important; box-shadow: none !important; text-align: left !important;
}
body.teach-v3 .teaching-invitation h3 { font: 800 clamp(1.5rem, 3vw, 2.3rem) var(--display) !important; text-transform: uppercase; color: var(--ink) !important; margin: 0 0 12px !important; }
body.teach-v3 .teaching-invitation p { max-width: 60ch; font-size: clamp(1.05rem, 1.4vw, 1.2rem) !important; line-height: 1.6; color: #333 !important; margin: 0 0 22px !important; }
body.teach-v3 .teaching-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; background: var(--carnelian) !important; color: #fff !important;
  border-radius: 14px !important; font: 800 1rem var(--display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none !important;
  box-shadow: none !important; transition: background .25s, transform .3s;
}
body.teach-v3 .teaching-cta:hover { background: var(--ink) !important; transform: translateY(-3px); }
body.teach-v3 .teaching-cta svg { fill: #fff; stroke: none; }

@media (max-width: 900px) {
  body.teach-v3 .card-grid { grid-template-columns: minmax(0, 1fr); }
  body.teach-v3 .publication-snapshot { grid-template-columns: minmax(0, 1fr); }
  body.teach-v3 .card img { height: 220px; }
}

/* A year with one entry: lay the card out wide instead of leaving half the row empty */
@media (min-width: 901px) {
  body.teach-v3 .card-grid:has(> .card:only-child) { grid-template-columns: minmax(0, 1fr); }
  body.teach-v3 .card:only-child { flex-direction: row; }
  body.teach-v3 .card:only-child > a:first-child,
  body.teach-v3 .card:only-child > img { flex: 0 0 34%; border-bottom: 0; border-right: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; }
  body.teach-v3 .card:only-child img { height: 300px; min-height: 0; }
  body.teach-v3 .card:only-child > div { flex: 1; align-self: center; padding: 28px 34px; }
}

/* Covers: sit on white inside the card's own border (no tinted box, no divider) */
body.teach-v3 .card > a:first-child { background: #fff; border-bottom: 0; }
body.teach-v3 .card img { background: #fff; padding: 18px 18px 0; height: 250px; border-bottom: 0; }
@media (min-width: 901px) {
  body.teach-v3 .card:only-child > a:first-child, body.teach-v3 .card:only-child > img { border-right: 0; }
}
body.teach-v3 .card img { box-sizing: border-box; width: 100% !important; height: 240px !important; padding: 20px !important; object-fit: contain; }
@media (min-width: 901px) {
  body.teach-v3 .card:only-child img { height: 300px !important; padding: 24px !important; }
  body.teach-v3 .card:only-child > a:first-child, body.teach-v3 .card:only-child > img { align-self: center; }
}
