:root {
  --navy: #0d315f;
  --blue: #1758a8;
  --orange: #e85c3a;
  --paper: #fbf8f1;
  --paper-2: #f2ede3;
  --white: #fffdf8;
  --ink: #17324d;
  --muted: #5b6f86;
  --line: #d9d0c1;
  --green: #1d7257;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.68 var(--sans); }
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--orange); }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 999; padding: 10px 14px; background: var(--navy); color: #fff; }
.skip-link:focus { top: 12px; }

.resource-header {
  position: sticky; top: 0; z-index: 50; display: flex; min-height: 76px; align-items: center; justify-content: space-between;
  gap: 24px; padding: 12px max(24px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: rgba(251,248,241,.96); backdrop-filter: blur(12px);
}
.resource-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font: 700 22px/1 var(--serif); text-decoration: none; }
.resource-brand img { width: 42px; height: 42px; object-fit: contain; }
.resource-header nav { display: flex; align-items: center; gap: 22px; }
.resource-header nav a { color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.resource-header .resource-login { padding: 10px 15px; border-radius: 5px; background: var(--navy); color: #fff; }

.resource-hub { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.hub-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: 58px; min-height: 570px; padding: 68px 0; border-bottom: 1px solid var(--line); }
.hub-hero h1 { max-width: 850px; margin: 14px 0 20px; color: var(--navy); font: 700 clamp(42px, 6vw, 76px)/1.02 var(--serif); letter-spacing: -.04em; }
.hub-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 20px; }
.hub-hero img { width: 100%; max-height: 390px; object-fit: contain; }
.resource-kicker, .section-heading > p { color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hub-actions a { padding: 12px 17px; border: 1px solid var(--navy); border-radius: 5px; font-weight: 800; text-decoration: none; }
.hub-actions a:first-child { background: var(--navy); color: #fff; }

.resource-section { padding: 58px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 5px 24px; margin-bottom: 25px; }
.section-heading > p { grid-column: 1 / -1; margin: 0; }
.section-heading h2 { margin: 0; color: var(--navy); font: 700 clamp(30px, 4vw, 46px)/1.1 var(--serif); }
.section-heading > span { color: var(--muted); font-size: 14px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.resource-card { display: flex; min-width: 0; min-height: 250px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.resource-card:hover { transform: translateY(-3px); border-color: #9f8e74; box-shadow: 0 16px 34px rgba(13,49,95,.08); color: var(--ink); }
.resource-card > span { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.resource-card h2, .resource-card h3 { margin: 14px 0 10px; color: var(--navy); font: 700 24px/1.18 var(--serif); }
.resource-card p { flex: 1; margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.resource-card > strong { color: var(--blue); font-size: 14px; }

.resource-layout { display: grid; grid-template-columns: minmax(0, 820px) 250px; justify-content: center; gap: 68px; width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 86px; }
.resource-article { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px 9px; margin-bottom: 38px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--muted); }
.article-hero { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-hero h1, .transparency-page h1 { margin: 12px 0 18px; color: var(--navy); font: 700 clamp(38px, 5.3vw, 62px)/1.05 var(--serif); letter-spacing: -.03em; }
.article-hero > p, .transparency-page header > p { margin: 0; color: var(--muted); font-size: 21px; line-height: 1.55; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 23px; color: var(--muted); font-size: 13px; }
.learning-objective { margin: 30px 0; padding: 21px 24px; border-left: 4px solid var(--blue); background: #eef4fb; }
.learning-objective strong { color: var(--navy); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.learning-objective p { margin: 5px 0 0; }
.resource-article section, .article-content { margin: 42px 0; }
.resource-article h2, .transparency-page h2 { margin: 38px 0 13px; color: var(--navy); font: 700 29px/1.22 var(--serif); }
.resource-article h3 { color: var(--navy); font: 700 21px/1.3 var(--serif); }
.resource-article p { margin: 0 0 17px; }
.article-lead { margin: 30px 0 38px !important; color: var(--ink); font-size: 20px; line-height: 1.7; }
.worked-example, .data-case, .worksheet { margin: 22px 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.worksheet { border-left: 4px solid var(--blue); }
.revision-note { margin: 42px 0; padding: 20px 22px; border-left: 4px solid var(--orange); background: #fff7ef; }
.revision-note p { margin: 5px 0 0; }
.source-section { padding-top: 30px; border-top: 1px solid var(--line); }
.editorial-table { width: 100%; margin: 20px 0; border-collapse: collapse; background: var(--white); font-size: 15px; }
.editorial-table th, .editorial-table td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.editorial-table th { background: var(--paper-2); color: var(--navy); }
.timeline, .diagnostic-list { display: grid; gap: 12px; padding-left: 24px; }
.resource-list, .example-list { display: grid; gap: 10px; padding-left: 25px; }
.example-list li { padding: 11px 14px; border-left: 3px solid var(--line); background: var(--white); }
.resource-list--warnings li::marker { color: var(--orange); }
.practice-list { display: grid; gap: 14px; padding: 0; list-style: none; }
.practice-list > li { padding: 18px 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.practice-list p { margin: 0 0 10px; }
details { border-top: 1px solid var(--line); padding-top: 10px; }
summary { color: var(--blue); font-weight: 800; cursor: pointer; }
details[open] summary { margin-bottom: 10px; }
.resource-audio audio { width: 100%; margin-top: 10px; }
.teacher-note, .editorial-box { padding: 24px; border: 1px solid var(--line); background: var(--paper-2); }
.teacher-note { border-top: 4px solid var(--green); }
.editorial-box { border-top: 4px solid var(--orange); }
.teacher-note h2, .editorial-box h2 { margin-top: 0; }
.resource-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resource-card--compact { min-height: 220px; padding: 18px; }
.resource-card--compact h3 { font-size: 19px; }

.resource-sidebar { position: sticky; top: 108px; align-self: start; display: grid; gap: 9px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 14px; }
.resource-sidebar > strong { padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--navy); }
.resource-sidebar > p { margin: 0 0 5px; color: var(--muted); line-height: 1.5; }
.resource-sidebar > a { color: var(--muted); text-decoration: none; }
.resource-sidebar .sidebar-cta { margin-top: 10px; padding: 10px; border-radius: 4px; background: var(--navy); color: #fff; text-align: center; font-weight: 800; }
.resource-sidebar small { color: var(--muted); line-height: 1.45; }

.transparency-page { width: min(840px, calc(100% - 40px)); min-height: 70vh; margin: 0 auto; padding: 48px 0 90px; }
.transparency-page header { padding: 25px 0 34px; border-bottom: 1px solid var(--line); }
.transparency-page article { padding-top: 12px; }
.transparency-page p, .transparency-page li { font-size: 18px; }
.contact-panel { margin: 28px 0; padding: 24px; border: 1px solid var(--line); border-left: 4px solid var(--orange); background: var(--white); }

.resource-footer { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 42px; padding: 48px max(24px, calc((100vw - 1240px) / 2)) 25px; border-top: 1px solid var(--line); background: #f0eadf; }
.resource-footer > div { display: grid; align-content: start; gap: 8px; }
.resource-footer p { max-width: 390px; margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.resource-footer strong { color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.resource-footer a:not(.resource-brand) { color: var(--muted); font-size: 14px; text-decoration: none; }
.resource-footer-bottom { grid-column: 1 / -1; display: flex !important; flex-direction: row; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.resource-footer-bottom button { border: 0; background: none; color: var(--blue); cursor: pointer; }

@media (max-width: 980px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-layout { grid-template-columns: minmax(0, 780px); }
  .resource-sidebar { position: static; grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-sidebar > strong, .resource-sidebar > small { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .resource-header { position: static; align-items: flex-start; padding: 13px 16px; }
  .resource-brand span { display: none; }
  .resource-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 9px 14px; }
  .resource-header nav a { font-size: 13px; }
  .resource-header nav a:nth-child(2), .resource-header nav a:nth-child(3) { display: none; }
  .resource-hub, .resource-layout, .transparency-page { width: min(100% - 28px, 680px); }
  .hub-hero { grid-template-columns: 1fr; min-height: 0; gap: 25px; padding: 50px 0; }
  .hub-hero h1 { min-width: 0; overflow-wrap: anywhere; font-size: clamp(38px, 12vw, 58px); }
  .hub-hero p { font-size: 18px; }
  .hub-hero img { max-height: 260px; }
  .resource-grid, .resource-grid--related { grid-template-columns: 1fr; }
  .resource-card { min-height: 0; }
  .section-heading { grid-template-columns: 1fr; }
  .resource-layout { padding-top: 26px; }
  .article-hero h1, .transparency-page h1 { min-width: 0; overflow-wrap: anywhere; font-size: clamp(35px, 11vw, 51px); }
  .article-hero > p, .transparency-page header > p { font-size: 18px; }
  .resource-sidebar { grid-template-columns: 1fr; }
  .resource-sidebar { grid-row: auto; }
  .resource-sidebar > strong, .resource-sidebar > small { grid-column: auto; }
  .resource-footer { grid-template-columns: 1fr; padding: 36px 18px 22px; }
  .resource-footer .resource-brand span { display: inline; }
  .resource-footer-bottom { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .editorial-table { display: block; overflow-x: auto; }
}

@media (max-width: 280px) {
  .resource-header { gap: 8px; padding-inline: 10px; }
  .resource-header nav { gap: 7px; }
  .resource-header .resource-login { padding: 8px 10px; }
  .resource-hub, .resource-layout, .transparency-page { width: calc(100% - 20px); }
  .hub-hero h1 { font-size: 31px; }
  .article-hero h1, .transparency-page h1 { font-size: 30px; }
  .resource-footer .resource-brand span { display: none; }
}

@media print {
  .resource-header, .resource-footer, .resource-sidebar, .hub-actions, .consent-banner { display: none !important; }
  body { background: #fff; color: #111; font-size: 12pt; }
  .resource-layout { display: block; width: 100%; padding: 0; }
  .resource-article a { color: #111; }
}
