/* ==========================================================================
   Secondary school: a guide for parents and carers
   Plain public-service style: slim header, content first, one blue accent,
   white and pale grey bands, Inter, left-border callouts.
   ========================================================================== */

:root {
  --blue: #1d4f91;
  --blue-dark: #143966;
  --text: #212b32;
  --text-secondary: #4c6272;
  --grey-dark: #425563;
  --grey-mid: #768692;
  --grey-pale: #f0f4f5;
  --border: #d8dde0;
  --border-strong: #aeb7bd;
  --white: #ffffff;
  --green: #007f3b;
  --green-tint: #eaf5ee;
  --focus: #ffeb3b;

  --font: 'Inter', Arial, sans-serif;
  --page-width: 960px;
  --measure: 44rem;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.5rem, 1.35rem + 0.7vw, 1.875rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 12px;
}

p {
  margin: 0 0 20px;
}

ul,
ol {
  margin: 0 0 20px;
  padding-left: 1.25em;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--blue-dark);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 4px solid transparent;
  background-color: var(--focus);
  color: var(--text);
  box-shadow: 0 -2px var(--focus), 0 4px var(--text);
  text-decoration: none;
}

/* Layout
   ========================================================================== */

.wrap {
  max-width: calc(var(--page-width) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.measure {
  max-width: var(--measure);
}

.band {
  padding: 48px 0;
}

.band--grey {
  background: var(--grey-pale);
}

section[id],
h3[id] {
  scroll-margin-top: 16px;
}

.subhead {
  margin-top: 48px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  background: var(--focus);
  color: var(--text);
  padding: 8px 16px;
  font-weight: 600;
}

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

/* Header (slim): charity name, strapline and page menu
   ========================================================================== */

.site-header {
  background: var(--blue);
  color: var(--white);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 0;
}

.site-header__brand {
  display: flex;
  flex-direction: column;
  color: var(--white);
  line-height: 1.3;
  text-decoration: none;
}

.site-header__brand:hover {
  color: var(--white);
}

.site-header__brand:hover .site-header__name {
  text-decoration: underline;
}

.site-header__name {
  font-size: 1.125rem;
  font-weight: 700;
}

.site-header__strapline {
  font-size: 0.8125rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--white);
}

.site-nav a:focus-visible {
  color: var(--text);
  border-bottom-color: transparent;
}

/* Page introduction and the three themes
   ========================================================================== */

.intro {
  padding: 40px 0 48px;
}

.themes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 28px 0 24px;
  padding: 0;
}

.theme {
  background: var(--grey-pale);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0;
}

.theme h2 {
  font-size: 1.1875rem;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.theme p {
  margin: 0;
  font-size: 1.0625rem;
}

.also {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Buttons
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 8px 14px;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  background: var(--blue);
  color: var(--white);
}

.button:focus-visible {
  outline: 4px solid transparent;
  background: var(--focus);
  color: var(--text);
  border-color: var(--text);
}

/* Callouts
   ========================================================================== */

.inset {
  border-left: 4px solid var(--blue);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
}

.inset > :last-child,
.panel > :last-child {
  margin-bottom: 0;
}

.inset__title {
  font-weight: 600;
  margin-bottom: 8px;
}

.panel {
  background: var(--grey-pale);
  border-left: 4px solid var(--blue);
  padding: 24px 28px;
  margin-top: 32px;
}

/* School and home comparison
   ========================================================================== */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 28px 0;
}

.compare__col {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--grey-mid);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.compare__col--home {
  border-top-color: var(--blue);
}

.compare__col h2 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.compare__col ul {
  margin-bottom: 0;
  font-size: 1.0625rem;
}

/* Trade-off table
   ========================================================================== */

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 1.0625rem;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 20px 12px 0;
  border-bottom: 1px solid var(--border-strong);
}

.table thead th {
  font-weight: 600;
  border-bottom: 2px solid var(--text);
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

/* Illustrated items
   ========================================================================== */

.step {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 40px 0;
  border-top: 1px solid var(--border-strong);
}

.step:last-child {
  padding-bottom: 0;
}

.step__figure {
  margin: 0;
}

.step__figure img,
.step__figure svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step__figure figcaption {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.step h3 {
  font-size: 1.375rem;
  font-weight: 700;
}

.step__facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-strong);
  font-size: 1rem;
}

.step__facts dt {
  font-weight: 600;
}

.step__facts dd {
  margin: 0;
}

/* Parents' evening questions
   ========================================================================== */

.question-list {
  list-style: none;
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
}

.question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  padding: 20px 24px;
  margin: 0;
}

.question__text {
  grid-column: 1;
  margin: 0;
  font-weight: 600;
}

.question__why {
  grid-column: 1;
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.question .button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

/* Checklist
   ========================================================================== */

.checklist {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  margin-top: 28px;
  overflow: hidden;
}

.checklist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}

.checklist__status {
  margin: 0;
  font-weight: 600;
}

.checklist__bar {
  height: 6px;
  background: var(--border);
}

.checklist__bar-fill {
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 0.25s ease;
}

.checklist__group {
  margin: 0;
  padding: 10px 24px;
  background: var(--grey-pale);
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.checklist__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist__item {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.checklist__item label {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.checklist__item label:hover {
  background: var(--grey-pale);
}

.checklist__item.is-checked label {
  background: var(--green-tint);
}

.checklist__item input {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 3px 0 0;
  accent-color: var(--green);
  cursor: pointer;
}

.checklist__item input:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}

.checklist__feedback {
  margin: 0;
  padding: 16px 24px;
}

/* Resources
   ========================================================================== */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 28px;
}

.resource-group p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.resource-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.0625rem;
}

/* Item tables, text pages and video
   ========================================================================== */

.table--items td:first-child {
  width: 38%;
  font-weight: 600;
}

.prose h2 {
  margin-top: 40px;
}

/* For later: a short vertical video can take the place of any illustration */
.video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: var(--radius);
  background: var(--text);
}

/* Footer
   ========================================================================== */

.site-footer {
  background: var(--grey-dark);
  color: var(--white);
  padding: 32px 0;
  font-size: 1rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:focus-visible {
  color: var(--text);
}

.site-footer__main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
}

.site-footer__about {
  max-width: 34rem;
}

.site-footer__about p:last-child {
  margin-bottom: 0;
}

.site-footer__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li {
  margin-bottom: 8px;
}

/* Smaller screens
   ========================================================================== */

@media (max-width: 800px) {
  .themes,
  .resource-grid,
  .compare {
    grid-template-columns: 1fr;
  }

  .themes {
    gap: 12px;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step__figure {
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.0625rem;
  }

  .band {
    padding: 36px 0;
  }

  .intro {
    padding: 28px 0 36px;
  }

  .question {
    grid-template-columns: 1fr;
  }

  .question .button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 8px;
  }

  .step__facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .step__facts dd {
    margin-bottom: 10px;
  }

  .panel {
    padding: 20px;
  }
}

/* Reduced motion and print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .also,
  .site-nav,
  .button {
    display: none !important;
  }

  .band {
    padding: 20px 0;
  }
}
