/* PERTS Elevate Resource Library */

:root {
  --primary: #167bb1;
  --primary-hover: #12699a;
  --primary-dark: #061d2a;
  --primary-light: #acdbf4;
  --primary-tint: #eaf5fb;
  --primary-wash: #f4f9fd;
  --text: #2b3138;
  --text-muted: #5b6672;
  --border: #e2e8ee;
  --border-strong: #cdd6df;
  --surface: #ffffff;
  --bg: #f7f9fb;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(6, 29, 42, 0.06);
  --shadow: 0 1px 2px rgba(6, 29, 42, 0.05), 0 4px 16px rgba(6, 29, 42, 0.06);
  --shadow-hover: 0 2px 4px rgba(6, 29, 42, 0.06), 0 12px 28px rgba(6, 29, 42, 0.12);
  --header-h: 68px;
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  color: var(--primary-dark);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--primary-dark);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--primary-dark);
  min-width: 0;
}

.brand img {
  width: 126px;
  flex: none;
}

.brand-name {
  padding-left: 16px;
  border-left: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.site-nav a:hover {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

/* --------------------------------------------------------------- hero -- */

/* Kept short so the first practices show without scrolling. */
.hero {
  background:
    radial-gradient(900px 400px at 90% -10%, rgba(172, 219, 244, 0.55), transparent 60%),
    linear-gradient(180deg, var(--primary-wash) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 32px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

.hero .lede {
  font-size: 18px;
}

.lede a {
  color: var(--primary-hover);
}

.partners {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.partners p {
  margin: 0;
}

/* The logos keep their proportions: on the narrowest phones the second one
   wraps rather than both being squeezed. */
.partner-logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.partner-logos li {
  flex: none;
}

.partner-logos a {
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.partner-logos a:hover {
  opacity: 1;
}

.partner-logos img {
  width: auto;
}

/* Sized so the two names read at about the same height. WestEd's letters
   are 77% of its logo's height; the globe takes the rest. */
.partner-logo--wested {
  height: 22px;
}

.partner-logo--uchicago-consortium {
  height: 27px;
}

/* ---------------------------------------------------------- doc chips -- */

.hero-docs .side-title {
  margin-bottom: 8px;
}

.hero-docs .side-title:not(:first-child) {
  margin-top: 18px;
}

.doc-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.doc-chip {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-chip:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  color: inherit;
}

.doc-chip-thumb {
  display: block;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--primary-tint);
}

.doc-chip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.doc-chip-text {
  display: block;
  min-width: 0;
}

.doc-chip-title {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
}

.doc-chip:hover .doc-chip-title {
  color: var(--primary);
}

.doc-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.doc-title {
  display: block;
  margin-top: 2px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: var(--primary-dark);
}

/* --------------------------------------------------------------- tabs -- */

.tabs {
  display: flex;
  gap: 4px;
  margin: 32px 0 0;
  border-bottom: 1px solid var(--border);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.tab:hover {
  color: var(--primary-dark);
}

.tab[aria-selected='true'] {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.tab-count {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-muted);
}

.tab[aria-selected='true'] .tab-count {
  background: var(--primary-tint);
  color: var(--primary-hover);
}

.tab-panel {
  padding: 24px 0 72px;
}

/* ------------------------------------------------------------ filters -- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 24px;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.filter-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter select {
  appearance: none;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  padding: 9px 38px 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%235b6672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat right 10px center / 18px,
    var(--surface);
  cursor: pointer;
}

.filter select:hover {
  border-color: var(--primary);
}

.filter-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding-bottom: 9px;
  color: var(--text-muted);
  font-size: 14px;
}

.filter-status strong {
  color: var(--primary-dark);
}

.link-button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-hover);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

/* -------------------------------------------------------------- cards -- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  color: inherit;
}

.card[hidden] {
  display: none;
}

.practice-card {
  position: relative;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: inherit;
}

/* The title link covers the whole card. */
.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-link:focus-visible {
  outline: none;
}

.practice-card:has(.card-link:focus-visible) {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-media--video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-media--video img {
  transform: scale(1.03);
}

.card-media--icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(135deg, var(--primary-tint), #d6ecf8);
}

.card-media--icons img {
  width: 56px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(6, 29, 42, 0.12);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(6, 29, 42, 0.25);
  transition: transform 0.15s ease;
}

.play-badge svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}

.card:hover .play-badge,
.video-poster:hover .play-badge {
  transform: scale(1.08);
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(6, 29, 42, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-body {
  display: block;
  padding: 18px 20px 8px;
  flex: 1;
}

.card-title {
  display: block;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
}

.card-text {
  display: block;
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 20px 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  vertical-align: middle;
}

/* Grade and subject tags open the matching practices. They sit above a
   card's covering link. */
.tag--link {
  position: relative;
  z-index: 2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tag--link:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Learning condition cards */

.lc-card {
  position: relative;
  padding: 20px;
  gap: 12px;
}

/* Math learning conditions carry a ribbon across the top right corner, as
   they did in Copilot. White on --primary is 4.66:1. */
.ribbon {
  position: absolute;
  top: 17px;
  right: -36px;
  width: 136px;
  padding: 4px 0;
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: rotate(45deg);
  box-shadow: 0 2px 4px rgba(6, 29, 42, 0.18);
  pointer-events: none;
}

.lc-card[data-math="true"] .lc-card-head {
  padding-right: 36px;
}

.lc-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lc-card-head img {
  width: 56px;
  flex: none;
  border-radius: 12px;
}

.lc-card .card-text {
  margin: 0;
  flex: 1;
}

.lc-card .card-meta {
  padding: 4px 0 0;
}

.card-arrow {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.card-arrow svg {
  width: 16px;
  height: 16px;
}

.lc-card:hover .card-arrow {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

/* -------------------------------------------------------- page header -- */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 6px;
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.page-header {
  padding: 20px 0 32px;
}

.page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-header h1 .tag {
  font-size: 14px;
  letter-spacing: 0;
  margin-left: 6px;
  position: relative;
  top: -4px;
}

.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.page-tags .tag {
  font-size: 13px;
  padding: 4px 12px;
  background: var(--surface);
}

.page-header--lc {
  display: flex;
  gap: 28px;
  align-items: center;
}

.lc-hero-icon {
  width: 108px;
  flex: none;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------ practice page -- */

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
  padding-bottom: 80px;
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--primary-dark);
}

.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 29, 42, 0.35));
}

/* The poster fills the top of .article, which clips to its rounded corners, so
   the site-wide focus outline -- drawn outside the button -- was cut off on
   every side but the bottom. The ring is drawn inside instead, over the image:
   blue outside, white inside, so one of the two contrasts with any frame. Its
   top corners follow the article's inner radius. */
.video-poster:focus-visible {
  outline: none;
}

.video-poster:focus-visible::after {
  box-shadow: inset 0 0 0 3px var(--primary), inset 0 0 0 6px #fff;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.play-badge--large {
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  z-index: 1;
}

.play-badge--large svg {
  width: 34px;
  height: 34px;
}

.video .duration {
  z-index: 1;
  right: 16px;
  bottom: 16px;
  font-size: 13px;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Prose from Markdown */

.prose {
  padding: 36px 44px 44px;
  font-size: 17px;
  line-height: 1.7;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2em 0 0.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--border);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.prose h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin: 1.6em 0 0.4em;
  font-size: 20px;
  font-weight: 700;
}

.prose p {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.prose li {
  margin: 0.35em 0;
}

.prose li::marker {
  color: var(--primary);
}

/* Numbered steps */
.prose > ol {
  list-style: none;
  counter-reset: step;
  padding-left: 0;
}

.prose > ol > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin: 0 0 1.1em;
}

.prose > ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-dark);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}

.prose ul ul {
  list-style-type: circle;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--primary-light);
  background: var(--primary-wash);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.prose a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--primary-dark);
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2em 0;
  font-size: 15px;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.checklist ul {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 32px;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary);
  border-radius: 4px;
}

/* Sidebar */

/* The sidebar runs the article's full height, so the outline at its foot
   can stay in view while the article scrolls. */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.side-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.side-card .side-title:not(:first-child) {
  margin-top: 20px;
}

.resource-list,
.lc-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.resource:hover {
  border-color: var(--primary-light);
  background: var(--primary-wash);
  color: inherit;
}

.resource-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-tint);
  color: var(--primary);
}

.resource-icon svg {
  width: 20px;
  height: 20px;
}

.resource-name {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--primary-dark);
}

.resource-kind {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.lc-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 14.5px;
}

.lc-links a:hover {
  background: var(--primary-wash);
  color: var(--primary-hover);
}

.lc-links img {
  width: 30px;
  border-radius: 7px;
  flex: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--primary-hover);
  color: #fff;
}

.button svg {
  width: 18px;
  height: 18px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 4px 4px 4px 18px;
  border-left: 2px solid var(--border);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 4px 0;
  color: var(--text-muted);
  text-decoration: none;
}

.toc a:hover,
.toc a.is-current {
  color: var(--primary-hover);
}

.toc a.is-current {
  font-weight: 700;
}

/* -------------------------------------------- learning condition page -- */

.survey h2,
.doc-tiles h2,
.lc-practices h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
}

.survey + .doc-tiles {
  margin-top: 36px;
}

/* Survey items: what students are asked, one list per grade band. */
.survey-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px 48px;
}

.survey-group .doc-kicker {
  margin: 0 0 8px;
  color: var(--primary-hover);
}

.survey-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.survey-list li {
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
}

.survey-list li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-light);
}

.doc-tile-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 250px));
  gap: 16px;
}

.doc-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-tile:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

/* The top of the first page. */
.doc-tile-preview {
  position: relative;
  display: block;
  height: 128px;
  overflow: hidden;
  background: var(--primary-tint);
  border-bottom: 1px solid var(--border);
}

.doc-tile-preview img {
  width: 100%;
}

.doc-tile-preview::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85));
  pointer-events: none;
}

.doc-tile-text {
  display: block;
  padding: 10px 12px 12px;
  text-decoration: none;
  color: inherit;
}

.doc-tile-text:hover {
  color: inherit;
}

.doc-tile:hover .doc-title {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-tile .doc-title {
  font-size: 13.5px;
}

.lc-practices {
  padding: 48px 0 80px;
}

/* -------------------------------------------------------------- misc -- */

.not-found {
  padding: 96px 24px 120px;
  text-align: center;
}

.not-found .lede {
  margin: 0 auto 28px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

/* ------------------------------------------------------------ narrow -- */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
  }

  .practice-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .practice-layout {
    gap: 20px;
  }

  /* Key resources stay above the article; the rest follows it. */
  .sidebar {
    display: contents;
  }

  .side-card--resources {
    order: -1;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 760px) {
  /* Sides only: .wrap also carries the header, hero, and footer padding. */
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  :root {
    --header-h: 60px;
  }

  .brand img {
    width: 96px;
  }

  .brand {
    gap: 12px;
  }

  .brand-name {
    padding-left: 12px;
    font-size: 14px;
  }

  .site-nav {
    display: none;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .lede,
  .hero .lede {
    font-size: 16px;
  }

  .partners {
    margin-top: 12px;
    font-size: 13px;
  }

  /* Phones show the measures as three small tiles: the top of each
     document and its grade band. */
  .doc-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .doc-chip {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 6px 6px 8px;
  }

  .doc-chip-thumb {
    height: 40px;
  }

  .doc-chip .doc-kicker {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .doc-chip-type {
    display: none;
  }

  /* The titles stay for screen readers; the grade band names each tile. */
  .doc-chip-title,
  .filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .partner-logos {
    column-gap: 14px;
  }

  .partner-logo--wested {
    height: 18px;
  }

  .partner-logo--uchicago-consortium {
    height: 22px;
  }

  .tabs {
    margin-top: 16px;
  }

  .tab {
    padding: 12px 10px;
    font-size: 15px;
  }

  /* Two filters to a row; a lone filter takes the full width. */
  .filter {
    min-width: 0;
    flex: 1 1 140px;
  }

  .filter-status {
    margin-left: 0;
    padding-bottom: 0;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .prose {
    padding: 24px 20px 28px;
    font-size: 16px;
  }

  .prose h2 {
    font-size: 22px;
  }

  .prose > ol > li {
    padding-left: 42px;
  }

  .page-header--lc {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .lc-hero-icon {
    width: 80px;
    border-radius: 16px;
  }

  /* Phones list documents as rows: a small thumbnail beside the title. */
  .doc-tile-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .doc-tile {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
  }

  .doc-tile-preview {
    height: 76px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .doc-tile-preview::after {
    display: none;
  }

  .doc-tile-text {
    padding: 8px 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ------------------------------------------------- shared PERTS shell -- */

/* The library shares one shell with the other PERTS web apps: the same header,
   a faint field of PERTS marks behind every page, and the content in one
   near-opaque box over it. A value changed here has to change in all of them.

   This block comes last on purpose. It overrides the library's own hero wash,
   page padding and footer bar rather than editing them in place.

   Open Sans is served from /fonts/, so the library requests nothing from Google
   and the Wistia player is again its only third-party content (CLAUDE.md, rule
   4). Latin and Latin Extended, upright and italic; a browser fetches only the
   ranges a page uses. License in public/fonts/OFL.txt. */

@font-face { font-family:'Open Sans'; font-style:normal; font-weight:400 800; font-stretch:100%;
  font-display:swap; src:url(/fonts/open-sans-latin-ext-normal.woff2) format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family:'Open Sans'; font-style:normal; font-weight:400 800; font-stretch:100%;
  font-display:swap; src:url(/fonts/open-sans-latin-normal.woff2) format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family:'Open Sans'; font-style:italic; font-weight:400 800; font-stretch:100%;
  font-display:swap; src:url(/fonts/open-sans-latin-ext-italic.woff2) format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family:'Open Sans'; font-style:italic; font-weight:400 800; font-stretch:100%;
  font-display:swap; src:url(/fonts/open-sans-latin-italic.woff2) format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

body {
  background: #f4f9fc;
}

.bgfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.09;
}

.bgfield .pm {
  fill: #042744;
}

.sr {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Header: aligned to the content box's edges, so the logo sits over its left side. */
.header-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.plogo {
  width: 126px;
  height: auto;
  flex: none;
  display: block;
}

.plogo .pm,
.pmark-only .pm {
  fill: #1c9de3;
}

.plogo .lw {
  fill: #061d2a;
}

.pmark-only {
  display: none;
  width: 28px;
  height: auto;
  flex: none;
}

/* The content box: the marks show plainly in the margins and only whisper
   behind the text. */
main {
  width: min(1120px, calc(100% - 40px));
  margin: 26px auto 56px;
  padding: 28px 34px 48px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe6ee;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(6, 29, 42, 0.04), 0 14px 40px rgba(6, 29, 42, 0.07);
}

/* Inside the box, the page wrappers give up their own width and gutters, and
   the hero gives up its wash: the box is the frame now. */
main .wrap {
  max-width: none;
  padding: 0;
}

.hero {
  background: none;
  border-bottom: 0;
}

.hero-inner {
  padding-top: 0;
  padding-bottom: 0;
}

.tabs {
  margin-top: 28px;
}

.tab-panel {
  padding-bottom: 0;
}

.breadcrumbs ol {
  padding-top: 0;
}

.not-found {
  padding: 48px 24px 56px;
}

/* Footer: one line on the field under the box. */
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 50px;
  border-top: 0;
  background: none;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .plogo {
    width: 96px;
  }

  .hero-inner {
    padding-top: 0;
    padding-bottom: 0;
  }

  .tabs {
    margin-top: 16px;
  }
}

@media (max-width: 560px) {
  main {
    width: calc(100% - 24px);
    margin: 14px auto 36px;
    padding: 22px 18px 32px;
    border-radius: 16px;
  }

  .header-inner,
  .site-footer {
    width: calc(100% - 24px);
  }
}

/* The name keeps one line: on the narrowest phones the lockup shrinks, and below
   340px it gives way to the mark alone. Inside the box the two tabs are tighter,
   so they still fit a 375px phone. */
@media (max-width: 420px) {
  .tab {
    gap: 6px;
    padding: 12px 8px;
    font-size: 14px;
  }

  .tab-count {
    padding: 2px 6px;
    font-size: 11px;
  }

  .plogo {
    width: 74px;
  }

  .brand {
    gap: 10px;
  }

  .brand-name {
    padding-left: 10px;
    font-size: clamp(12px, 3.55vw, 14px);
  }
}

/* Tightened, the two tabs fit a 375px phone. Narrower than that they do not,
   so the strip scrolls under a fade instead of widening the page. */
@media (max-width: 370px) {
  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 0;
    box-shadow: inset 0 -1px 0 var(--border);
    padding-right: 24px;
    scroll-padding-inline: 28px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: none;
    margin-bottom: 0;
  }
}

@media (max-width: 340px) {
  .site-header .plogo {
    display: none;
  }

  .pmark-only {
    display: block;
  }

  .brand-name {
    font-size: clamp(11.5px, 4.2vw, 13px);
  }
}
