/*
 * FASI theme. Colours and fonts come from docs/fasi/brand/FASI-BRAND.md and are defined once here.
 * Contrast rules: never use yellow or orange for text on white; olive only for large or bold text.
 * Desktop first for now (from slice 11): the brand refresh at the end is designed for wide screens.
 */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/roboto-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/roboto-latin-700-normal.woff2") format("woff2");
}

/* Bricolage Grotesque, the heading font (SIL Open Font License, see fonts/BricolageGrotesque-OFL.txt) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-semibold.woff2") format("woff2");
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-bold.woff2") format("woff2");
}

:root {
  /* Brand colours */
  --fasi-yellow: #fac21e;
  --fasi-burgundy: #4d102f;
  --fasi-olive: #728537;
  --fasi-rust: #bd4327;
  --fasi-orange: #e98724;
  --fasi-black: #231f20;
  --fasi-white: #ffffff;

  /* Neutrals: tints of burgundy (the guide defines no greys) */
  --tint-panel: #f7f0f3;
  --tint-line: #e4d6dc;
  --border-control: #8a6477; /* 5:1 on white, so controls are easy to see */
  --text-muted: #6b4a5a; /* 7:1 on white */

  /* Type: Bricolage Grotesque for headings, Roboto for everything else */
  --font-heading: "Bricolage Grotesque", "Roboto", Arial, Helvetica, sans-serif;
  --font-body: "Roboto", Arial, Helvetica, sans-serif;
  --heading-weight: 600;

  --radius: 8px; /* one slightly rounded corner for every box, button, field, tab and label */
  --gutter: 16px;
  --page-width: 46rem;
  --frame-width: 72rem; /* header, footer and photography line up to this */

  /* Brand photography and the logo patterns from the Mini CI Illustrator file */
  --pattern-strip: url("/img/patterns/strip.svg");
  --tint-paper: #f7f2f4;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--fasi-black);
  background: var(--fasi-white);
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  margin: 0 0 0.5rem;
  color: var(--fasi-burgundy);
}

h1 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.875rem; /* 30px on a phone */
  line-height: 1.2;
}

h2 {
  font-weight: 400;
  font-size: 1.5rem; /* 24px */
  line-height: 1.25;
}

h3 {
  font-weight: 400;
  font-size: 1.125rem; /* 18px */
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--fasi-burgundy);
  text-underline-offset: 3px;
}

.lead {
  font-size: 1.125rem;
  color: var(--fasi-black);
}

.muted {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- Page frame ---------- */

.site-header {
  background: var(--fasi-burgundy);
}

.site-header__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  min-height: 64px;
}

.site-header__logo {
  display: inline-flex;
  line-height: 0;
}

.site-header__logo img {
  height: 56px;
  width: auto;
}

.page {
  flex: 1;
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}

.site-footer {
  background: var(--fasi-burgundy);
  color: var(--fasi-white);
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 16px var(--gutter);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px;
  border: 2px solid var(--fasi-yellow);
  border-radius: var(--radius);
  background: var(--fasi-yellow);
  color: var(--fasi-burgundy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn--secondary {
  background: var(--fasi-white);
  border-color: var(--fasi-burgundy);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--fasi-burgundy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--fasi-burgundy);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

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

.field {
  margin-bottom: 24px;
}

.field > label,
.field > .label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.field input[type="email"],
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--fasi-white);
  font: inherit;
  color: var(--fasi-black);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field--error input,
.field--error select {
  border-color: var(--fasi-rust);
}

.error {
  margin: 8px 0 0;
  color: var(--fasi-rust);
  font-weight: 700;
  font-size: 0.9375rem;
}

/* Choice cards: employee bands and the 0 to 4 levels. The real control is a visually hidden radio or a button. */

.band-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.band {
  position: relative;
}

.band input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.band span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 2px solid var(--border-control);
  border-radius: var(--radius);
  font-weight: 700;
  color: var(--fasi-burgundy);
  background: var(--fasi-white);
}

.band input:checked + span {
  background: var(--fasi-burgundy);
  border-color: var(--fasi-burgundy);
  color: var(--fasi-white);
}

.band input:focus-visible + span {
  outline: 3px solid var(--fasi-burgundy);
  outline-offset: 2px;
}

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

.level {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border: 2px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--fasi-white);
  font: inherit;
  text-align: left;
  color: var(--fasi-black);
  cursor: pointer;
}

/* On a phone the five answers should fit with less scrolling */
@media (max-width: 40rem) {
  .levels {
    gap: 6px;
  }

  .level {
    min-height: 48px;
    gap: 10px;
    padding: 8px 10px;
  }

  .level__num {
    width: 32px;
    height: 32px;
  }

  .level__meaning {
    font-size: 0.875rem;
    line-height: 1.35;
  }
}

.level:hover {
  background: var(--tint-panel);
}

.level__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tint-panel);
  border: 2px solid var(--fasi-burgundy);
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.level__label {
  display: block;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.level__meaning {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.level--selected {
  border-color: var(--fasi-burgundy);
  background: var(--tint-panel);
  box-shadow: inset 0 0 0 1px var(--fasi-burgundy);
}

.level--selected .level__num {
  background: var(--fasi-burgundy);
  color: var(--fasi-white);
}

.level__chosen {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

/* ---------- Panels, banners, progress ---------- */

.panel {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--tint-panel);
  border: 1px solid var(--tint-line);
}

.panel--note {
  border-left: 4px solid var(--fasi-orange);
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.area-card {
  padding: 12px 8px;
  border-radius: var(--radius);
  background: var(--fasi-burgundy);
  color: var(--fasi-white);
  text-align: center;
}

.area-card__count {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--fasi-yellow);
}

.area-card__name {
  display: block;
  font-size: 0.875rem;
}

.progress {
  height: 10px;
  margin: 8px 0 20px;
  border-radius: var(--radius);
  background: var(--tint-line);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: var(--fasi-burgundy);
}

.hint {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--tint-panel);
  border-left: 4px solid var(--fasi-orange);
  font-size: 0.9375rem;
}

.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Starting Line: ring, area bars, stage strip, cards ---------- */

.ring-wrap {
  margin: 24px 0;
  text-align: center;
}

.ring {
  --pct: 0%;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--fasi-burgundy) var(--pct), var(--tint-line) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring__inner {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: var(--fasi-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring__num {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--fasi-burgundy);
}

.ring__of {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stage-name {
  margin: 16px 0 0;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.5rem;
  color: var(--fasi-burgundy);
}

.label-line {
  margin: 0 0 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--tint-panel);
  border: 1px solid var(--tint-line);
  font-size: 0.9375rem;
}

.disclaimer {
  margin: 24px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.areas {
  margin: 8px 0 24px;
}

.area-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 3.75rem;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.area-row__label {
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.area-row__bar {
  display: block;
  height: 14px;
  border-radius: var(--radius);
  background: var(--tint-line);
  overflow: hidden;
}

.area-row__fill {
  display: block;
  height: 100%;
  background: var(--fasi-burgundy);
}

.area-row__value {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.callouts {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.callout {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--fasi-white);
  border: 1px solid var(--tint-line);
  border-left-width: 4px;
}

.callout--strong {
  border-left-color: var(--fasi-olive);
}

.callout--opportunity {
  border-left-color: var(--fasi-orange);
}

.callout__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.callout__name {
  margin: 4px 0;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.5rem;
  color: var(--fasi-burgundy);
}

.callout .muted {
  margin: 0;
}

.card {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  background: var(--fasi-white);
}

.card__title {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.stages li {
  padding: 10px 4px;
  border-radius: var(--radius);
  border: 2px solid var(--tint-line);
  background: var(--fasi-white);
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-muted);
}

.stages .stages__item--current {
  border-color: var(--fasi-burgundy);
  background: var(--fasi-burgundy);
  color: var(--fasi-white);
  font-weight: 700;
}

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

.locked-card {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px dashed var(--border-control);
  background: var(--tint-panel);
}

.locked-card__title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.locked-card .muted {
  margin: 0;
}

/* ---------- Admin ---------- */

.page--wide {
  max-width: 60rem;
}

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

.admin-item {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  background: var(--fasi-white);
}

.admin-item p {
  margin: 0 0 6px;
}

.admin-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-item__title {
  font-weight: 700;
  font-size: 1.125rem;
}

.admin-item--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.facts--compact {
  grid-template-columns: max-content 1fr;
  margin: 0;
  font-size: 0.9375rem;
}

.facts--stack {
  display: block;
}

.facts--stack dt {
  margin-top: 10px;
}

.facts--stack dd {
  margin: 2px 0 0;
}

.status--full {
  border-color: var(--fasi-olive);
  border-width: 3px;
}

.status--asked {
  border-color: var(--fasi-orange);
  background: var(--tint-panel);
}

.review-card {
  margin: 0 0 16px;
}

.review-card__company {
  margin: 0 0 8px;
  font-weight: 700;
}

.review-card summary {
  cursor: pointer;
}

.admin-evidence {
  padding: 8px 0;
  border-bottom: 1px solid var(--tint-line);
}

.admin-files {
  margin: 0 0 8px;
  padding-left: 20px;
}

.feedback-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- Menu, footer links, Feedback button, Settings, plain pages ---------- */

.site-header__inner {
  justify-content: space-between;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0 12px;
}

/* Menu links have no underline; only the page you are on is underlined, in yellow */
.site-nav a,
.site-menu a,
.site-nav__button {
  color: var(--fasi-white);
  font: inherit;
  font-weight: 700;
  padding: 8px 4px;
  text-decoration: none;
}

.site-nav a:hover,
.site-menu a:hover,
.site-nav__button:hover {
  text-decoration: underline;
  text-decoration-color: var(--fasi-white);
  text-underline-offset: 6px;
}

.site-nav a[aria-current="page"],
.site-menu a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--fasi-yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.site-nav__signout {
  margin: 0;
}

.site-nav__button {
  border: 0;
  background: none;
  cursor: pointer;
}

.site-nav__button:focus-visible,
.site-menu summary:focus-visible {
  outline: 3px solid var(--fasi-yellow);
  outline-offset: 2px;
}

/* The phone menu: a Menu button that opens the same links as a list */
.site-menu {
  display: none;
}

.site-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border: 2px solid var(--fasi-white);
  border-radius: var(--radius);
  color: var(--fasi-white);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}

.site-menu summary::after {
  content: "\25BE"; /* a small down arrow */
  margin-left: 8px;
}

.site-menu[open] summary::after {
  content: "\25B4"; /* a small up arrow */
}

.site-menu__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 8px 0 12px;
}

.site-menu__list a,
.site-menu__list .site-nav__button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 4px;
  text-align: left;
}

@media (max-width: 40rem) {
  .site-header__inner {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 8px;
  }

  .site-nav {
    display: none;
  }

  .site-menu {
    display: block;
  }

  /* The open menu drops down over the page, so the logo and the Menu button stay where they are */
  .site-header {
    position: relative;
  }

  .site-menu__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    padding: 8px var(--gutter) 16px;
    background: var(--fasi-burgundy);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  }
}

/* Links that are actions rather than reading: no underline, an arrow instead */
.link-quiet,
.todo-list a {
  font-weight: 700;
  text-decoration: none;
}

.link-quiet::after,
.todo-list a::after {
  content: "\00a0\2192"; /* a right arrow that stays with the last word */
}

.link-quiet:hover,
.todo-list a:hover {
  text-decoration: underline;
}

.site-header a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--fasi-yellow);
}

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

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

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



.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 24px;
}

.tab {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 2px solid var(--border-control);
  color: var(--fasi-burgundy);
  font-weight: 700;
  text-decoration: none;
  background: var(--fasi-white);
}

.tab--active {
  background: var(--fasi-burgundy);
  border-color: var(--fasi-burgundy);
  color: var(--fasi-white);
}

/* Certifications and commitments (Settings): one card per entry */
.entry-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.entry__title {
  color: var(--fasi-burgundy);
}

.entry__tags {
  margin: 6px 0;
}

.entry__meta {
  margin: 4px 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.entry__detail {
  margin: 4px 0 8px;
}

.evidence-group__progress {
  display: block;
  font-size: 0.9375rem;
  font-weight: 400;
}

.todo-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.todo-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.todo__state {
  flex: none;
  padding: 2px 10px;
  border-radius: var(--radius);
  border: 2px solid var(--border-control);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fasi-burgundy);
  background: var(--fasi-white);
}

.todo--done .todo__state {
  border-color: var(--fasi-olive);
  border-width: 3px;
}

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

.milestones li {
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid var(--fasi-orange);
  border-radius: var(--radius);
}

.entry__proof {
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--tint-panel);
}

.entry__proof-title {
  margin: 0 0 8px;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fasi-burgundy);
}

.proof-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.proof-list li {
  margin-bottom: 12px;
}

.proof-list form {
  display: inline;
}

.entry__actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.entry__actions form {
  margin: 0;
}

.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--fasi-white);
  font: inherit;
  color: var(--fasi-black);
  resize: vertical;
}

.field input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--fasi-white);
  font: inherit;
  color: var(--fasi-black);
}

.field--error textarea,
.field--error input[type="text"] {
  border-color: var(--fasi-rust);
}

.band-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.band-grid--five {
  grid-template-columns: repeat(5, 1fr);
}

.band .band__text {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-weight: 700;
}

.band__hint {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
}

.card--danger {
  border: 1px solid var(--fasi-rust);
}

.btn--danger {
  background: var(--fasi-rust);
  border-color: var(--fasi-rust);
  color: var(--fasi-white);
}

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

.prose ul {
  padding-left: 22px;
}

.plain-table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
}

.plain-table th,
.plain-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--tint-line);
  text-align: left;
  vertical-align: top;
}

.plain-table th {
  color: var(--fasi-burgundy);
}

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

/* ---------- FASI Score, action plan, full dashboard ---------- */

.score-facts {
  margin: 0 0 8px;
  text-align: center;
}

.area-block {
  margin-bottom: 16px;
}

.area-block .area-row {
  margin-bottom: 4px;
}

.area-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.area-meta .muted {
  font-size: 0.875rem;
}

#history-title,
#held-title {
  margin-top: 32px;
}

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

.held {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  border-left: 4px solid var(--fasi-orange);
  background: var(--fasi-white);
}

.held p {
  margin: 4px 0 0;
}

.held a {
  font-weight: 700;
}

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

.history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--tint-panel);
}

.history__when {
  color: var(--text-muted);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 0 0 12px;
}

.facts dt {
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.facts dd {
  margin: 0;
}

/* The business in one line, under the action plan heading */
.plan-context {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--tint-line);
}

.plan-context__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  font-size: 0.9375rem;
}

.plan-context__facts div {
  display: flex;
  gap: 6px;
}

.plan-context__facts dt {
  color: var(--text-muted);
}

.plan-context__facts dt::after {
  content: ":";
}

.plan-context__facts dd {
  margin: 0;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.priority-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.priority-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 2px solid var(--tint-line);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.priority-chip--high {
  border-color: var(--fasi-rust);
}

/* Each area's colour, as a small dot next to its name */
.area-dot {
  display: inline-block;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.area-dot--governance { background: var(--fasi-burgundy); }
.area-dot--environment { background: var(--fasi-olive); }
.area-dot--social { background: var(--fasi-orange); }
.area-dot--ethics { background: var(--fasi-rust); }
.area-dot--strategy { background: var(--fasi-yellow); }

/* How many actions, jump links, and the main button */
.plan-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 32px;
}

.plan-summary__counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  margin: 0;
  font-size: 0.9375rem;
}

.plan-summary__counts a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--tint-line);
}

.plan-summary__counts a:hover {
  border-bottom-color: var(--fasi-burgundy);
}

.plan-group {
  margin: 0 0 36px;
  scroll-margin-top: 16px;
}

.plan-group__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
}

.plan-group__head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.5rem;
}

.plan-group__head span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

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

/* One action: rank, then what it is and the next step, then points and a button on the right */
.plan-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 168px;
  gap: 4px 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  background: var(--fasi-white);
}

.plan-item:hover {
  border-color: var(--border-control);
}

.plan-item__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint-panel);
  color: var(--fasi-burgundy);
  font-weight: 700;
  font-size: 0.875rem;
}

.plan-item > .plan-item__rank {
  grid-row: 1 / span 4;
}

.plan-item__meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  font-size: 0.8125rem;
}

.area-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

/* Why it is on the plan: soft tints of the brand colours, dark text for contrast */
.plan-status {
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
}

.plan-status--no_evidence { background: #fbe9e3; color: #8f2f19; }
.plan-status--waiting { background: #fff4d2; color: #6b4a00; }
.plan-status--held_back { background: #fdeedd; color: #8a4a0c; }
.plan-status--room_to_grow { background: #edf1e3; color: #46521f; }

.plan-item__question {
  grid-column: 2;
  margin: 4px 0 0;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fasi-burgundy);
}

.plan-item__question a {
  text-decoration: none;
}

.plan-item__question a:hover {
  text-decoration: underline;
}

.plan-item__next {
  grid-column: 2;
  margin: 8px 0 0;
}

.plan-item__next strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fasi-olive);
}

.plan-item__why {
  grid-column: 2;
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.plan-item__side {
  grid-column: 3;
  grid-row: 1 / span 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  text-align: right;
}

/* Points: a number you can compare by running your eye down the right-hand edge */
.plan-item__points {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.1;
  color: var(--text-muted);
}

.plan-item__points strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.75rem;
  color: var(--fasi-olive);
}

.btn--small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Today's 3 wins on the dashboard: the top of the plan as a short ranked list */
.wins {
  display: grid;
  margin: 4px 0 12px;
  padding: 0;
  list-style: none;
}

.wins li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--tint-line);
}

.wins li:last-child {
  border-bottom: 1px solid var(--tint-line);
}

.wins__question {
  font-weight: 700;
  text-decoration: none;
}

.wins__question:hover {
  text-decoration: underline;
}

.wins .plan-item__points {
  text-align: right;
}

.wins .plan-item__points strong {
  font-size: 1.375rem;
}

/* The evidence list's jump links */
.evidence-jump {
  margin: 0 0 24px;
}

.evidence-group {
  scroll-margin-top: 16px;
}

@media (max-width: 639px) {
  .plan-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .plan-item__side {
    grid-column: 2;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
}

/* ---------- Evidence questions ---------- */

.evidence-group {
  margin: 24px 0;
}

.evidence-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.evidence-group__head .card__title {
  margin: 0;
}

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

.evidence-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border-control);
  background: var(--fasi-white);
  color: var(--fasi-black);
  text-decoration: none;
}

.evidence-item:hover {
  background: var(--tint-panel);
}

.evidence-item__text {
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.status {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: var(--radius);
  border: 2px solid var(--border-control);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fasi-burgundy);
  background: var(--fasi-white);
}

.status--waiting {
  border-color: var(--fasi-orange);
  background: var(--tint-panel);
}

.status--reviewed {
  border-color: var(--fasi-olive);
  border-width: 3px;
}

.status--answered {
  background: var(--tint-panel);
}

.replaces {
  margin: 16px 0 24px;
}

.replaces__title {
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.replaces__question {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.replaces .muted {
  margin: 0;
}

.warning {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--fasi-rust);
  border-left-width: 4px;
  background: var(--fasi-white);
}

.warning p {
  margin: 0;
}

.errors {
  margin: 16px 0;
}

.errors .error {
  margin: 0 0 6px;
}

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

.file {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  background: var(--fasi-white);
}

.file__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.file__name {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  color: var(--fasi-burgundy);
}

.file__head .muted {
  margin: 0;
}

.file__status {
  margin: 8px 0;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.rubric {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.rubric li {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.rubric__met {
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.rubric__missed {
  color: var(--text-muted);
}

.upload {
  margin: 16px 0 24px;
  padding: 16px;
  border-radius: var(--radius);
  border: 2px dashed var(--border-control);
  background: var(--tint-panel);
}

.upload__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.upload input[type="file"] {
  max-width: 100%;
  margin-bottom: 8px;
}

.reviewer-tick {
  display: block;
  margin-bottom: 8px;
}

/* ---------- About your business ---------- */

.question-block {
  margin: 0 0 28px;
}

.question-block legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.band-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

.band-grid--stack {
  grid-template-columns: 1fr;
}

.band-grid--stack .band span {
  justify-content: flex-start;
  padding: 8px 14px;
  text-align: left;
}

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

.priority-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  background: var(--fasi-white);
}

.priority-row__area {
  font-weight: 700;
  color: var(--fasi-burgundy);
}

.pill {
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--fasi-burgundy);
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--fasi-burgundy);
  background: var(--fasi-white);
}

.pill--high {
  background: var(--fasi-burgundy);
  color: var(--fasi-white);
}

.pill--medium {
  background: var(--tint-panel);
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 24px auto;
  border: 5px solid var(--tint-line);
  border-top-color: var(--fasi-burgundy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  h1 {
    font-size: 2.5rem; /* 40px */
  }

  h2 {
    font-size: 2rem; /* 32px */
  }

  .page {
    padding-top: 40px;
  }

  .actions {
    flex-direction: row;
  }

  .band-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .band-grid--two {
    grid-template-columns: repeat(2, 1fr);
  }

  .band-grid--five {
    grid-template-columns: repeat(5, 1fr);
  }

  .band-grid--three {
    grid-template-columns: repeat(3, 1fr);
  }

  .band-grid--stack {
    grid-template-columns: 1fr 1fr;
  }

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

  .stages {
    grid-template-columns: repeat(6, 1fr);
  }

  .area-row {
    grid-template-columns: 8rem 1fr 4rem;
  }
}

/* Question headings are long sentences, so they stay smaller than a normal Heading 1 */
.question-title {
  font-size: 1.5rem;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .question-title {
    font-size: 1.75rem;
  }
}


/* =====================================================================
 * Brand refresh (slices 11 and 16). Designed for desktop first; phones get a simple fallback.
 * Rules (docs/fasi/brand/FASI-BRAND.md sections 4 and 5):
 *   - A page uses a photograph OR the pattern, never both.
 *   - Photographs are thin full-width strips, top and bottom. No fades or colour over them.
 *   - The pattern appears only as the strip along the footer. Headings and data stand on their own, with no boxes.
 *   - Every box, button, field, tab, label and bar has the same slightly rounded corner (--radius).
 *   - Outlines: 1px for cards and panels, 2px for anything you click or type into, 4px for a coloured side edge.
 *   - Burgundy and yellow lead; olive, orange and rust carry data and secondary actions.
 * ===================================================================== */

.photo--soil { background-image: url("/img/photos/soil.jpg"); }
.photo--protea { background-image: url("/img/photos/protea.jpg"); }
.photo--aloe { background-image: url("/img/photos/aloe.jpg"); }
.photo--baobab { background-image: url("/img/photos/baobab.jpg"); }
.photo--strata { background-image: url("/img/photos/strata.jpg"); }
.photo--fern { background-image: url("/img/photos/fern.jpg"); }
.photo--veins { background-image: url("/img/photos/veins.jpg"); }

/* ---------- Type ---------- */

h1 {
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3,
.eyebrow {
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fasi-rust);
}

/* A short orange rule leads each eyebrow */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 3px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--fasi-orange);
}

.question-title {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
}

.ring__num,
.area-card__count {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
}

/* ---------- Header, page and footer ---------- */

.site-header__inner,
.site-footer__inner {
  max-width: var(--frame-width);
}

/* Menu and footer links in small capitals; slice 14's underline rules still mark the current page */
.site-nav a,
.site-nav__button,
.site-footer__links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer__links a {
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--fasi-yellow);
  text-underline-offset: 6px;
}

.page {
  padding-top: 48px;
}

/* The CI's border strip closes the page, as in the guide; pages with a photograph close with the photograph instead */
.site-footer {
  position: relative;
  padding-top: 40px;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 40px;
  background: var(--pattern-strip) repeat-x left top / auto 40px;
}

.photo-strip--bottom + .site-footer {
  padding-top: 0;
}

.photo-strip--bottom + .site-footer::before {
  display: none;
}

.site-footer__inner {
  padding-top: 24px;
  padding-bottom: 28px;
}

/* ---------- Photograph strips ---------- */

.photo-strip {
  height: 112px;
  background-position: center;
  background-size: cover;
}

.photo-strip--bottom {
  height: 72px;
}

/* ---------- Data in the wider palette ---------- */

.ring {
  background: conic-gradient(var(--fasi-olive) var(--pct), var(--tint-line) 0);
}

.progress {
  height: 8px;
}

.progress__fill {
  border-radius: var(--radius);
  background: var(--fasi-olive);
}

/* Each of the five areas keeps its own colour wherever it appears as a bar */
.area-row__fill {
  border-radius: var(--radius);
}

.area--governance .area-row__fill { background: var(--fasi-burgundy); }
.area--environment .area-row__fill { background: var(--fasi-olive); }
.area--social .area-row__fill { background: var(--fasi-orange); }
.area--ethics .area-row__fill { background: var(--fasi-rust); }
.area--strategy .area-row__fill { background: var(--fasi-yellow); }

/* The Quick Check's five area tiles, one brand colour each (text colours keep at least 4.5:1) */
.area-card {
  padding: 18px 8px 16px;
}

.area-card__count {
  font-size: 2rem;
  line-height: 1;
}

.area-card__name {
  margin-top: 6px;
  font-weight: 700;
}

.area-card:nth-child(2) { background: var(--fasi-olive); }
.area-card:nth-child(2) .area-card__count { color: var(--fasi-white); }
.area-card:nth-child(3) { background: var(--fasi-orange); color: var(--fasi-burgundy); }
.area-card:nth-child(3) .area-card__count { color: var(--fasi-burgundy); }
.area-card:nth-child(4) { background: var(--fasi-rust); }
.area-card:nth-child(4) .area-card__count { color: var(--fasi-white); }
.area-card:nth-child(5) { background: var(--fasi-yellow); color: var(--fasi-burgundy); }
.area-card:nth-child(5) .area-card__count { color: var(--fasi-burgundy); }

.pill {
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

.pill--high {
  border-color: var(--fasi-rust);
  background: var(--fasi-rust);
}

.pill--medium {
  border-color: var(--fasi-olive);
  background: var(--fasi-white);
}

.stages .stages__item--current {
  border-color: var(--fasi-olive);
  background: var(--fasi-olive);
}

.spinner {
  border-top-color: var(--fasi-olive);
}

/* ---------- Feedback: a small outlined button at the end of the menu ---------- */

.site-nav .site-nav__feedback,
.site-menu .site-nav__feedback {
  padding: 6px 14px;
  border: 2px solid var(--fasi-yellow);
  border-radius: var(--radius);
  color: var(--fasi-yellow);
  text-decoration: none;
}

.site-nav .site-nav__feedback:hover,
.site-menu .site-nav__feedback:hover {
  background: var(--fasi-yellow);
  color: var(--fasi-burgundy);
  text-decoration: none;
}

/* ---------- Reading comfort and click areas ---------- */

/* Running text stops at about 70 characters a line; cards, lists and forms keep the full width */
.page > p,
.page > .lead,
.prose p {
  max-width: 70ch;
}

/* A card straight after a row of buttons keeps its distance */
.actions + .card {
  margin-top: 24px;
}

/* Footer links get a click area of at least 24px (WCAG 2.2 target size) */
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

/* All five Settings tabs fit on one row on desktop */
.tab {
  padding: 6px 12px;
  font-size: 0.875rem;
}

/* ---------- Titles: one look per role ---------- */

/* Card titles look the same whether they are an h2 or an h3 */
.card__title,
h3.card__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fasi-burgundy);
}

/* Small labels (priority, status) share one size */
.pill,
.status {
  font-size: 0.8125rem;
}

/* Every text box looks the same, inside a form field or not (for example the review note in admin) */
input[type="text"],
input[type="email"],
select,
textarea {
  border: 2px solid var(--border-control);
  border-radius: var(--radius);
  background: var(--fasi-white);
  font: inherit;
}

input[type="text"],
input[type="email"] {
  padding: 8px 12px;
}

/* ---------- Controls and cards: rounded and flat ---------- */

.btn {
  min-height: 52px;
  padding: 12px 28px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn:hover {
  filter: none;
  background: var(--fasi-burgundy);
  border-color: var(--fasi-burgundy);
  color: var(--fasi-white);
}

/* Secondary actions in olive */
.btn--secondary {
  background: transparent;
  border-color: var(--fasi-olive);
  color: var(--fasi-burgundy);
}

.btn--secondary:hover {
  background: var(--fasi-olive);
  border-color: var(--fasi-olive);
}

.card,
.locked-card,
.admin-item,
.callout {
  box-shadow: none;
}

.panel--note {
  border: 0;
}


/* ---------- Phones: a simple fallback until the mobile pass ---------- */

@media (max-width: 639px) {
  h1 {
    font-size: 2.125rem;
  }

  .page {
    padding-top: 28px;
  }

  .photo-strip {
    height: 72px;
  }

  .photo-strip--bottom {
    height: 48px;
  }

}
