/* Springboard 2 knowledge base. Mobile first, system fonts, white background.
   Brand colours come from the Springboard 2 logo. The logo pink and blue are
   about 3.7:1 on white: fine for borders, rules and large type, too light for
   body text and links. The "-text" shades are the same hues, darkened to pass
   WCAG AA (4.5:1 or better). */

:root {
  --pink: #e043b4;        /* logo pink: accents, borders */
  --pink-text: #b0278a;   /* 6.0:1 on white: small pink text */
  --pink-tint: #fcebf6;
  --blue: #0e8fbf;        /* logo blue: accents, borders */
  --blue-text: #086a91;   /* 6.0:1 on white: links */
  --blue-tint: #e6f4fa;
  --text: #1d1d1f;
  --muted: #55555c;
  --bg: #ffffff;
  --surface: #f6f6f8;
  --line: #e1e1e6;
  --link: var(--blue-text);
  --accent: var(--pink-text);
  --next: var(--blue-tint);
  --next-line: var(--blue);
  --thin: #fdf4e3;
  --thin-line: #b8730d;
  --focus: #f2b400;
  --measure: 38rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

main, .site-header, .site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

main { padding-top: 1rem; padding-bottom: 2rem; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.75rem; margin: 0.25rem 0 0.75rem; }
h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.4rem;
  background: var(--pink);
}
h2 { font-size: 1.35rem; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; margin-top: 1.75rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--bg);
  padding: 0.5rem 0.75rem;
}
.skip-link:focus { left: 0.5rem; }

.site-header {
  padding-top: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--pink);
}
.site-name {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-name img { display: block; width: 200px; height: auto; }

.lede { font-size: 1.125rem; color: var(--muted); }

/* Module list on the home page */
.module-list { list-style: none; padding: 0; margin: 0; }
.module-card {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.module-card p { margin: 0.25rem 0; }
.module-card-title { font-weight: 650; font-size: 1.1rem; }
.module-number {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Status is written out in words, never shown by colour alone. */
.status {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.status-draft, .status-ready { border-color: var(--blue); color: var(--blue-text); }
.status-outline { border-color: var(--pink); color: var(--pink-text); }

.module-kicker {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.placeholder {
  background: var(--surface);
  padding: 1rem;
  border-radius: 6px;
}

/* Boxes */
.box {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--line);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
}
.box > :last-child { margin-bottom: 0.25rem; }
.box-title { font-weight: 700; margin: 0 0 0.5rem; }
.box-barriers { background: var(--pink-tint); border-left-color: var(--pink); }
.box-next-step { background: var(--next); border-left-color: var(--next-line); }
.box-evidence-thin { background: var(--thin); border-left-color: var(--thin-line); }

.module-nav { padding-bottom: 1.5rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  padding-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@media print {
  .site-header, .site-footer .eu ~ p, .module-nav, .skip-link { display: none; }
  body { font-size: 11pt; }
  .box { break-inside: avoid; }
}

/* Copy link to section */
.section-link {
  margin-left: 0.25rem;
  padding: 0 0.25rem;
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}
.section-link:hover, .section-link:focus-visible { color: var(--pink-text); }
.section-link.copied { color: var(--blue-text); }
.status-message {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9rem;
}
.status-message:empty { display: none; }

/* Go deeper */
.deeper {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 1rem;
}
.deeper summary {
  cursor: pointer;
  padding: 0.75rem 0;
  font-weight: 600;
  color: var(--blue-text);
}
.deeper[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }
@media print {
  .section-link, .status-message { display: none; }
  .deeper { border: 0; padding: 0; }
}

/* Tap-to-define terms */
.term {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  border-bottom: 2px dotted var(--blue);
  cursor: pointer;
}
.term:hover { color: var(--blue-text); }
.term-pop {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  margin: 0 auto;
  width: auto;
  max-width: 28rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.15);
  line-height: 1.5;
}
.term-pop strong { display: block; margin-bottom: 0.25rem; }
.term-close {
  display: block;
  margin-top: 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--blue-text);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  cursor: pointer;
}

/* Scenario cards */
.scenario {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: 0 6px 6px 0;
  padding: 0 1rem;
}
.scenario summary { cursor: pointer; padding: 0.75rem 0; font-weight: 600; }
.scenario-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pink-text);
}
.scenario[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }

/* Calculators */
.calc {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--bg);
}
.calc-title { font-weight: 700; margin: 0; }
.calc-note { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0.75rem; }
.calc-fields, .calc-months { display: grid; gap: 0.75rem; }
.calc-months { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; padding: 0; margin: 1rem 0 0; }
.calc-months legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.calc label { display: grid; gap: 0.25rem; font-size: 0.95rem; }
.calc input, .calc select {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid #b9b9c2;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
.calc input:focus-visible, .calc select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.calc-result {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--blue-tint);
  border-radius: 4px;
  font-weight: 600;
}
.calc-table { overflow-x: auto; margin-top: 1rem; }
.calc-table table, .module table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td, .module th, .module td {
  text-align: right;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
/* Numbers stay on one line in the calculator tables, which scroll sideways on a phone.
   Text tables in the modules wrap instead, so they never push the page wider. */
.calc-table th, .calc-table td { white-space: nowrap; }
.calc-table { max-width: 100%; }
.module td, .module th { overflow-wrap: break-word; }
/* Text tables (only the Module 8 "ten careers" table today) read left to right,
   and on a phone each row becomes a small stacked block with its labels. */
.deeper th, .deeper td { text-align: left; vertical-align: top; }
@media (max-width: 40rem) {
  .deeper thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .deeper table, .deeper tbody, .deeper tr, .deeper td { display: block; width: 100%; }
  .deeper tr { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .deeper td { border: 0; padding: 0.1rem 0; }
  .deeper td:first-child { font-weight: 700; }
  .deeper td:nth-child(2)::before { content: "From: "; color: var(--muted); }
  .deeper td:nth-child(3)::before { content: "To: "; color: var(--muted); }
  .deeper td:nth-child(4)::before { content: "What set it off: "; color: var(--muted); }
}
/* Long web addresses (DOIs in the source lists) wrap rather than widen the page. */
main a { overflow-wrap: anywhere; }
.calc-table th:first-child, .calc-table td:first-child, .module th:first-child, .module td:first-child { text-align: left; }
.calc-table th, .module th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.negative { color: #b42318; font-weight: 600; }
@media (min-width: 40rem) {
  .calc-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
}
@media print {
  .calc, .term-close { display: none; }
  .term { border: 0; }
  .scenario { border: 0; padding: 0; }
}

/* Funding types, most control to least */
.control-scale {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.25rem 0 0.25rem;
}
.control-scale a {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}
.control-scale a:hover { border-color: var(--blue); }
.control-scale-key {
  display: flex;
  justify-content: space-between;
  margin: 0.25rem 0 1.5rem;
  padding-top: 0.4rem;
  border-top: 4px solid;
  border-image: linear-gradient(to right, var(--blue), var(--pink)) 1;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Glossary lists */
.glossary-list dt { font-weight: 700; margin-top: 0.75rem; }
.glossary-list dd { margin: 0.15rem 0 0; }

/* Printable worksheets */
.worksheet h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.worksheet h2::after { display: none; }
.worksheet-intro { color: var(--muted); }
.ws-table { width: 100%; border-collapse: collapse; }
.ws-table th, .ws-table td { border: 1px solid var(--line); padding: 0.5rem; text-align: left; vertical-align: top; }
.ws-table th[scope="row"] { font-weight: 500; width: 60%; }
.ws-blank, .ws-grid td { height: 2.25rem; }
.ws-grid th[scope="row"] { width: 30%; }
.ws-sum { margin: 0.75rem 0 0; }
.ws-line { display: inline-block; min-width: 4.5rem; border-bottom: 1px solid var(--text); }
.ws-long { display: block; min-width: 0; width: 100%; height: 1.75rem; }
@media print {
  @page { size: A4; margin: 14mm; }
  .worksheet-intro a, .site-footer p:first-child { display: none; }
  .worksheet h1 { font-size: 16pt; }
  .worksheet h2 { font-size: 12pt; margin-top: 10pt; }
  .ws-blank, .ws-grid td { height: 20pt; }
}

/* Skill cards */
.skill-card {
  margin: 0.5rem 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 1rem;
}
.skill-card summary { cursor: pointer; padding: 0.6rem 0; font-weight: 600; }
.skill-card[open] { border-color: var(--blue); }
.skill-card[open] summary { color: var(--blue-text); }

/* Chip navigation (for example the sports tech areas) */
.chip-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1rem 0 1.5rem; }
.chip-nav a {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}
.chip-nav a:hover { border-color: var(--pink); }

/* Lean format: In 2 minutes, In short, Try this, The evidence */
.box-two-minutes { background: var(--pink-tint); border-left-color: var(--pink); }
.box-two-minutes ul { margin: 0.25rem 0 0.5rem; padding-left: 1.2rem; }
.box-try { background: var(--bg); border: 1px dashed var(--blue); border-left: 4px solid var(--blue); }
.in-short {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0.5rem 0 1rem;
}
.in-short { font-weight: 600; }
.box-research { background: var(--bg); border: 1px solid var(--blue); border-left: 4px solid var(--blue); }
.evidence {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue-tint);
  font-size: 0.95rem;
}
.evidence summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  padding: 0.6rem 0.9rem;
}
.evidence summary::-webkit-details-marker { display: none; }
.evidence-action { font-weight: 700; color: var(--blue-text); }
.evidence .when-open, .evidence[open] .when-closed { display: none; }
.evidence[open] .when-open { display: inline; }
.evidence-label { color: var(--muted); font-size: 0.85rem; }
.evidence[open] { background: var(--bg); }
.evidence > :not(summary) { padding: 0 0.9rem; }
.evidence > :last-child { margin-bottom: 0.75rem; }

/* Option cards (for example funding types) */
.option-card {
  margin: 0.5rem 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 1rem;
  scroll-margin-top: 1rem;
}
.option-card summary { cursor: pointer; padding: 0.7rem 0; }
.card-title { font-weight: 700; }
.card-teaser { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.1rem; }
.option-card[open] { border-color: var(--pink); }
.option-card[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }
@media print { .evidence, .option-card { border: 0; background: none; } }

/* Business model canvas: nine blocks, two columns on wider screens */
.canvas-grid { display: grid; gap: 0.5rem; margin: 1rem 0; }
.canvas-grid .option-card { margin: 0; }
@media (min-width: 40rem) { .canvas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }

/* EU emblem in the footer (added by the website team in the published package). */
.eu-emblem { display: block; height: 3rem; width: auto; margin: 0 0 0.5rem; }
