/* NS Education Agency, sister site to NS Employment Agency.
   Same system, harbour navy instead of spruce green as the main colour;
   the oilskin-orange buttons are shared so the two read as one company. Body type is a plain, open sans at a generous size
   because many readers are working in their second language. */

/* Fonts are self-hosted (SIL Open Font License, licences in /fonts), so no
   visitor's IP address goes to a font service. Built by _work/make_fonts.py. */
@font-face { font-family: "Work Sans"; src: url("../fonts/WorkSans-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --fog: #f2f4f1;
  --paper: #ffffff;
  --ink: #17262b;
  --ink-soft: #46555a;
  --line: #d5dbd6;
  --primary: #1f4560;
  --primary-deep: #15324a;
  --harbour: #24506b;
  --oilskin: #c2501b;
  --oilskin-deep: #a2410f;
  --barrens: #2f3e7c;
  --field: #6d8a3a;

  --display: "Work Sans", "Arial", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
}

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

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

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--barrens); text-underline-offset: 0.18em; }
a:hover { color: var(--primary); }

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

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.6vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; font-stretch: 105%; }

p { margin: 0 0 1em; max-width: 64ch; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0.5rem; }

/* Labels: small caps in the mono face, used only where a thing is being named. */
.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

/* ---------- Header ---------- */

.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand-name {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
  display: block;
}
.brand-legal {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
/* On phones the legal name switches to the narrower text face so it stays on one line. */
@media (max-width: 520px) {
  .brand-legal { font-family: var(--body); font-size: 0.78rem; letter-spacing: 0; }
}

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 700;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.8rem;
  color: var(--ink);
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
}
.site-nav a:hover { background: var(--fog); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); border-radius: 0; }
.site-nav .nav-cta a {
  background: var(--oilskin);
  color: #fff;
  margin-left: 0.4rem;
}
.site-nav .nav-cta a:hover { background: var(--oilskin-deep); color: #fff; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgb(23 38 43 / 0.08);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { padding: 0.75rem 0.5rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--primary); padding-left: 0.9rem; }
  .site-nav .nav-cta a { margin: 0.5rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--oilskin); color: #fff; }
.btn-primary:hover { background: var(--oilskin-deep); color: #fff; }
/* An orange ring on an orange button just looks like a thicker border. */
.btn-primary:focus-visible, .site-nav .nav-cta a:focus-visible { outline-color: var(--ink); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-deep); color: #fff; }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { border-color: #fff; color: #fff; background: transparent; }
.btn-light:hover { background: #fff; color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row-gap { margin-top: 2.25rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(88vh, 46rem);
  display: flex;
  /* Text block sits in the vertical middle, on the left over the open harbour. */
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--primary-deep);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The students walk in the right half of the frame; keep them clear of the headline. */
  object-position: 92% 50%;
}
/* Darkens only the open harbour on the left, where the words sit, so the students keep their colour. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(13 27 40 / 0.78) 0%, rgb(13 27 40 / 0.55) 38%, rgb(13 27 40 / 0) 68%),
    linear-gradient(0deg, rgb(13 27 40 / 0.55) 0%, rgb(13 27 40 / 0) 45%);
}
.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.hero h1 { max-width: 15ch; margin-bottom: 0.4em; }
.hero p { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 40ch; color: #eef3f7; }
.hero .label { color: #cddbe7; }

@media (max-width: 700px) {
  .hero { min-height: 36rem; }
  .hero-img { object-position: 78% 50%; }
  .hero::after {
    /* Even darkening on phones, since the centred text covers the middle of the photo. */
    background: linear-gradient(0deg, rgb(13 27 40 / 0.8) 0%, rgb(13 27 40 / 0.62) 50%, rgb(13 27 40 / 0.4) 100%);
  }
}

/* Inner-page header with a photo strip */
.page-head {
  position: relative;
  color: #fff;
  background: var(--primary-deep);
  overflow: hidden;
}
.page-head img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* For photos whose subject's face sits near the top of the frame. */
.page-head-top img { object-position: 50% 6%; }

/* Keep anchored sections clear of the sticky header. */
[id] { scroll-margin-top: 5rem; }
/* The same for a form field the browser jumps to with "Please fill in this
   field": checkboxes have no id, so without this one landed under the header. */
/* 7rem, not 5: the label above the field must clear the sticky header too. */
input, select, textarea { scroll-margin-top: 7rem; }
/* The orange focus ring is about 2:1 on the navy and dark areas; white is 10:1. */
.hero :focus-visible, .page-head :focus-visible, .section-dark :focus-visible,
.site-foot :focus-visible { outline-color: #fff; }
.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(13 27 40 / 0.85) 0%, rgb(13 27 40 / 0.5) 55%, rgb(13 27 40 / 0.2) 100%);
}
.page-head .wrap {
  position: relative;
  z-index: 1;
  padding-top: clamp(3.5rem, 9vw, 6.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.page-head h1 { max-width: 18ch; }
.page-head p { max-width: 46ch; font-size: 1.15rem; color: #eef3f7; }
.page-head .label { color: #cddbe7; }

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-paper { background: var(--paper); }
.section-dark { background: var(--primary); color: #fff; }
.section-dark a { color: #fff; }
.section-dark .label { color: #cddbe7; }

.section-intro { margin-bottom: 2.25rem; }
.section-intro p { color: var(--ink-soft); font-size: 1.1rem; }
.section-dark .section-intro p { color: #dbe5ee; }

/* Two doors: employers and workers */
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.door {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.door img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.door-body { padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; flex: 1; }
.door-body ul { margin: 0 0 1.5rem; padding-left: 1.2rem; }
.door-body li { margin-bottom: 0.35rem; }
.door-body .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } }

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

.sector-group + .sector-group { margin-top: 3rem; }
.sector-group-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.sector-group-head h2,
.sector-group-head h3 { margin: 0; font-size: 1.35rem; }
.sector-group-head p { margin: 0 0 0 auto; color: var(--ink-soft); font-size: 0.95rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-body h4 {
  font-family: var(--display);
  font-stretch: 105%;
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}
.card-body p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.5; }

/* ---------- Season calendar (the signature) ---------- */

.season {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.75rem);
}
.season-grid {
  display: grid;
  grid-template-columns: minmax(7.5rem, 13rem) repeat(12, minmax(0, 1fr));
  column-gap: 2px;
  row-gap: 0;
  align-items: center;
}
.season-grid .m {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: center;
  color: var(--ink-soft);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.season-grid .m-short { display: none; }
.season-head,
.season-row { display: contents; }
.season-row .name {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem 0.55rem 0;
  line-height: 1.25;
  border-bottom: 1px solid var(--line);
  align-self: stretch;
  display: flex;
  align-items: center;
}
.season-row .c {
  height: 100%;
  min-height: 2.6rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
/* Each cell is one month. Two strengths: some hiring, and peak hiring. */
.season-row .c::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0.9rem;
  transform: translateY(-50%);
}
/* "Some hiring" is a pale fill with a full-colour outline, so it still reads at 3:1 against white. */
.season-row .c.on::before { background: color-mix(in srgb, var(--row-colour) 20%, #fff); box-shadow: inset 0 0 0 1.5px var(--row-colour); }
.season-row .c.peak::before { background: var(--row-colour); }
.season-row.farm { --row-colour: var(--field); }
.season-row.water { --row-colour: var(--harbour); }
.season-row.town { --row-colour: var(--oilskin); }

.season-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.season-key span { display: inline-flex; align-items: center; gap: 0.45rem; }
.season-key i { display: inline-block; width: 1.6rem; height: 0.7rem; background: var(--ink); }
.season-key .k-on { background: color-mix(in srgb, var(--ink) 15%, #fff); box-shadow: inset 0 0 0 1.5px var(--ink); }
.season-key .k-farm { background: var(--field); }
.season-key .k-water { background: var(--harbour); }
.season-key .k-town { background: var(--oilskin); }
.season-note { margin: 1rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  .season-grid { grid-template-columns: 6.6rem repeat(12, minmax(0, 1fr)); column-gap: 1px; }
  .season-grid .m-long { display: none; }
  .season-grid .m-short { display: inline; }
  .season-row .name { font-size: 0.82rem; padding-right: 0.4rem; }
  .season-row .c::before { height: 0.75rem; }
}

/* ---------- Steps (a real sequence, so they are numbered) ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 3px solid currentColor;
  padding-top: 1rem;
}
.steps li::before {
  content: "Step " counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  opacity: 0.8;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; font-size: 0.98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Split rows (text beside a photo) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.split img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split.flip > :first-child { order: 2; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: 0.55rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.5em;
  width: 0.75rem;
  height: 0.42rem;
  border-left: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  transform: rotate(-45deg);
}
.section-dark .ticks li::before { border-color: #fff; }

/* Notice panel for rules people need to know (fees, licences) */
.notice {
  border-left: 5px solid var(--oilskin);
  background: var(--paper);
  padding: 1.1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.notice h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.notice-gap { margin-top: 2.5rem; }
/* Where the school lists come from: closed by default, opens to a plain list. */
.sources summary { cursor: pointer; font-weight: 600; color: var(--primary); padding: 0.35rem 0; }
.sources ul { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; line-height: 1.45; }
.sources li { margin-bottom: 0.4rem; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Industry detail (industries page) ---------- */

.industry {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.sector-group-head + .industry { border-top: 0; padding-top: 0.75rem; }
.industry img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.industry h3 { font-size: 1.4rem; }
.industry .roles { font-size: 0.98rem; color: var(--ink-soft); }
.industry .roles strong { color: var(--ink); }
@media (max-width: 760px) {
  .industry { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem 0; }
  .industry img { aspect-ratio: 16 / 9; }
}

/* ---------- Forms ---------- */

.form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field label,
.field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
  padding: 0;
}
.field .hint { display: block; font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); margin-top: -0.15rem; margin-bottom: 0.35rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #78847f;
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  min-height: 3rem;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid var(--oilskin); outline-offset: 1px; border-color: var(--ink); }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.35rem 1rem;
}
.checks label,
.consent label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-weight: 400;
  margin: 0;
}
.checks input,
.consent input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: 0.2rem; flex: none; accent-color: var(--primary); }
.req { color: var(--oilskin-deep); }
.form-foot { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.form-foot p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); flex: 1 1 18rem; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status:empty { display: none; }
/* Phones: full-width send button and roomier checkbox rows, for thumbs. */
@media (max-width: 520px) {
  .form-foot .btn { width: 100%; }
  .checks label { padding: 0.25rem 0; }
}

/* ---------- Contact strip and footer ---------- */

.contact-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.contact-strip div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.contact-strip p { margin: 0; }
@media (max-width: 760px) { .contact-strip { grid-template-columns: 1fr; } }

.site-foot {
  background: var(--ink);
  color: #d6dfdb;
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
}
.site-foot a { color: #fff; }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.foot-grid h2 { font-size: 1rem; font-stretch: 105%; color: #fff; margin-bottom: 0.75rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 0.25rem; }
.foot-grid li a { display: inline-block; padding: 0.25rem 0; }
.foot-legal {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  font-size: 0.85rem;
  color: #aebbb5;
}
.foot-legal p { max-width: none; margin-bottom: 0.4rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* Prose pages (privacy) */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* Every photo is AI-generated and says so on the photo itself. */
.photo { position: relative; display: block; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- School directory ---------- */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.filters .field { margin: 0; }
.filters .field input,
.filters .field select { min-height: 2.75rem; }
@media (max-width: 760px) { .filters { grid-template-columns: 1fr; } }

.result-count { font-weight: 700; margin: 0 0 1.5rem; }

.school-group { margin-bottom: 2.5rem; }
.school-group[hidden] { display: none; }
.school-group h2 { font-size: 1.35rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.45rem; margin-bottom: 1rem; }
/* Inline, so on a long heading that wraps the count follows the last word. */
.school-group h2 .n { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); margin-left: 0.5rem; white-space: nowrap; }

.school-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.75rem;
}
.school {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.school[hidden] { display: none; }
.school h3 { font-family: var(--body); font-size: 1rem; font-weight: 700; margin: 0 0 0.2rem; line-height: 1.3; }
.school h3 a { color: var(--ink); text-decoration: none; }
.school h3 a:hover { color: var(--primary); text-decoration: underline; }
.school .meta { margin: 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.school .tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.45rem; }
/* Phones: the elementary list is 112 schools long, so each card gives back a little height. */
@media (max-width: 520px) {
  .school-list { gap: 0.5rem; }
  .school { padding: 0.7rem 0.85rem; }
  .school .tags { margin-top: 0.35rem; }
}
.tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.12rem 0.35rem;
  color: var(--ink-soft);
  background: var(--fog);
}

/* Level overview on the home page: count + label, linking into the directory. */
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1000px) { .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.levels-more { margin: 1.25rem 0 0; color: var(--ink-soft); }
.levels-more a { white-space: nowrap; }
.level-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.level-card:hover { border-color: var(--primary); }
.level-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.level-card .card-body { padding: 1rem 1.1rem 1.2rem; }
.level-card .count { font-family: var(--display); font-size: 2rem; line-height: 1; margin: 0 0 0.25rem; color: var(--primary); }
.level-card h2, .level-card h3 { font-size: 1.1rem; margin: 0 0 0.3rem; }
.level-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
/* Phones: two across, and an odd last card takes the full row instead of sitting alone. */
@media (max-width: 640px) {
  .levels { gap: 0.75rem; }
  .level-card .card-body { padding: 0.75rem 0.8rem 0.9rem; }
  .level-card .count { font-size: 1.6rem; }
  .level-card h2, .level-card h3 { font-size: 0.98rem; }
  .level-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .level-card:last-child:nth-child(odd) img { aspect-ratio: 2 / 1; }
}

/* ---------- Schools dropdown in the header ---------- */

.site-nav .has-menu { position: relative; }
.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.menu-toggle:hover { background: var(--fog); }
.has-menu.is-current > .menu-toggle { color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); border-radius: 0; }
.caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}
.menu-toggle[aria-expanded="true"] .caret { transform: translateY(1px) rotate(-135deg); }

.site-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  min-width: 15rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgb(23 38 43 / 0.12);
}
.site-nav .has-menu.open .submenu { display: flex; }
.site-nav .submenu a { padding: 0.55rem 0.75rem; }
.site-nav .submenu a[aria-current="page"] { color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); border-radius: 0; }

@media (max-width: 900px) {
  .menu-toggle { width: 100%; justify-content: space-between; padding: 0.75rem 0.5rem; }
  .has-menu.is-current > .menu-toggle { box-shadow: inset 3px 0 0 var(--primary); padding-left: 0.9rem; }
  .site-nav .submenu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0 0 0.5rem 1rem;
    border: 0;
    box-shadow: none;
  }
}

/* ---------- Tabs to switch between school types ---------- */

/* Wraps rather than scrolls, so every type, including the current one, stays in view on a phone. */
.type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.type-tabs a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.type-tabs a:hover { border-color: var(--primary); color: var(--primary); }
.type-tabs a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.type-tabs .n { font-family: var(--mono); font-size: 0.75rem; opacity: 0.85; }
/* Phones: a little smaller, so the five types fit in three rows instead of four. */
@media (max-width: 520px) {
  .type-tabs { gap: 0.4rem; }
  .type-tabs a { font-size: 0.9rem; padding: 0.5rem 0.8rem; gap: 0.35rem; }
}

.notice-tight { margin-bottom: 1.25rem; padding: 0.85rem 1.1rem; }

/* ---------- Review fixes, 28 Oct 2026 ---------- */

p { text-wrap: pretty; }
.notice { max-width: 48rem; }
.lead-line { font-size: 1.15rem; max-width: 60ch; margin: 0; }
.small { font-size: 0.9rem; }
.rules { max-width: 46rem; }

/* Directory: the search box and the area menu the same height, a line when a
   search finds nothing, and NSCC's one DLI number under its heading. */
.filters .field input, .filters .field select { height: 2.9rem; min-height: 0; }
.no-results { margin: -0.75rem 0 1.5rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.school-group h2 .group-note { display: block; margin-top: 0.25rem; font-family: var(--body); font-size: 0.92rem; font-weight: 400; color: var(--ink-soft); }

/* Contact: the student is on the left, under the words; mirrored, she is on the
   right. The photo has no lettering, so the mirror does not show. */
.page-head-contact img { transform: scaleX(-1); }

/* Header between 901 and 1200 px: with the larger text, the legal name made the
   menu wrap onto two lines. It is in the footer of every page. */
.site-nav a, .menu-toggle { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1200px) {
  .brand-legal { display: none; }
  .site-nav a, .menu-toggle { padding-left: 0.55rem; padding-right: 0.55rem; }
}
/* Phone menu held sideways: the open menu scrolls instead of running off the screen. */
@media (max-width: 900px) {
  .site-nav.open { max-height: calc(100vh - 4.5rem); overflow-y: auto; }
}

/* Very wide screens: a taller hero, so the students' heads clear the header. */
@media (min-width: 1800px) {
  .hero { min-height: min(88vh, 56rem); }
  .hero-img { object-position: 92% 30%; }
}

/* Phones and tablets: the photo above the words, not behind them, so no
   headline crosses a face. The same for the inner page banners. */
@media (max-width: 900px) {
  .hero { display: block; min-height: 0; }
  .hero-img { position: relative; inset: auto; height: auto; aspect-ratio: 3 / 2; object-position: 80% 30%; }
  .hero::after { display: none; }
  .hero .wrap { padding-top: 1.75rem; padding-bottom: 2.25rem; }
  .page-head img { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 9; }
  .page-head::after { display: none; }
  .page-head .wrap { padding-top: 1.5rem; padding-bottom: 1.75rem; }
  .hero .photo-tag-corner, .page-head }

/* ---------- Easy to read for anyone, older visitors included (Karl, 28 Oct 2026) ----------
   As on the employment site: 18px text and nothing under 16px, plain labels
   instead of typewriter capitals, bigger things to tap, one strong button
   colour, and lines of about 70 characters at most. */
body { font-size: 1.125rem; }
main p, main li { max-width: 68ch; }

.label, .steps li::before, .season-grid .m, .brand-legal, .tag, .type-tabs .n, .school-group h2 .n {
  font-family: var(--body); letter-spacing: 0; text-transform: none; }
.label { font-size: 1rem; font-weight: 700; color: inherit; }
.brand-name { font-size: 1.2rem; }
.brand-legal { font-size: 1rem; }
/* At 16px the legal name would wrap under the name on a phone; the footer has it. */
@media (max-width: 520px) { .brand-legal { display: none; } }

/* Nothing under 16px. */
.sector-group-head p, .card-body p, .season-row .name, .season-key, .season-note, .season-grid .m,
.steps li::before, .steps p, .sources ul, .industry .roles, .field .hint, .form-foot p, .site-foot,
.foot-legal, .school .meta, .tag, .level-card p, .type-tabs a, .type-tabs .n, .small,
.school-group h2 .group-note, .school-group h2 .n { font-size: 1rem; }
.level-card h2, .level-card h3 { font-size: 1.15rem; }
@media (max-width: 640px) { .level-card h2, .level-card h3 { font-size: 1.05rem; } }
.tag { padding: 0.15rem 0.5rem; }

/* Bigger things to tap: 48px menu links and buttons, 26px checkboxes, and
   footer and other stand-alone links at least 44px tall. */
.site-nav a, .menu-toggle { min-height: 3rem; display: flex; align-items: center; }
.nav-toggle { min-height: 3rem; padding: 0.6rem 1rem; }
.checks input, .consent input { width: 1.625rem; height: 1.625rem; margin-top: 0; flex: none; }
.checks label { min-height: 2.75rem; align-items: center; }
.foot-grid li { margin-bottom: 0; }
.foot-grid li a { display: inline-block; padding: 0.6rem 0; }
.type-tabs a { min-height: 2.75rem; }
.sources > summary { padding: 0.6rem 0; }
.link-button { padding: 0.6rem 0; }

/* One button colour everywhere: the deeper orange, which white text reads on
   at 6.4:1. No outline-only buttons. */
.btn-primary, .btn-dark, .btn-ghost, .btn-light, .site-nav .nav-cta a {
  background: var(--oilskin-deep); border-color: var(--oilskin-deep); color: #fff; }
.btn-primary:hover, .btn-dark:hover, .btn-ghost:hover, .btn-light:hover, .site-nav .nav-cta a:hover {
  background: #7f330b; border-color: #7f330b; color: #fff; }

/* ---------- Every screen size (Karl, 28 Oct 2026) ----------
   Wider than the 1536px laptop the design was made on, the page grows with the
   window: the root size follows the width, half of it fixed so browser zoom
   (Ctrl +) still makes text bigger, and never so much that the top of the page
   overflows a short window. The home photo keeps its laptop framing, and the
   page banners keep at least their laptop shape. */
@media (min-width: 1537px) {
  html { font-size: clamp(100%, min(calc(50% + 100vw / 192), calc(100vh / 36)), 2.5rem); }
  .hero { min-height: min(88vh, calc(100vw / 2.1)); }
  .hero-img { object-position: 92% 35%; }
  .page-head { display: flex; flex-direction: column; justify-content: center; min-height: 20.8vw; }
}
@media (max-width: 700px) { .hero-img { aspect-ratio: 4 / 3; } }
