/* Base look every page loads. Colours come only from tokens.css.
   Functional surface (form, plan, panel): system font stack, per the Design Rules ruling of
   2026-10-28. Anton and Barlow Condensed appear only where the brand speaks (page titles, numbers),
   the same interim choice as the FEBRACA site while the Knockout web licence is undecided. */

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

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--ui-font-system);
  font-size: var(--fs-300);
  line-height: 1.55;
  color: var(--brand-navy);
  background: var(--ui-surface-1);
}

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

h1,
h2,
h3,
p,
ul,
ol,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--brand-navy);
  outline-offset: 3px;
}

/* A title that receives focus by script (a new block, a new view) is read aloud without a ring. */
[tabindex='-1']:focus {
  outline: none;
}

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

.container {
  width: 100%;
  max-width: var(--ui-content-width);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.container--wide {
  max-width: var(--ui-wide-width);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -6rem;
  z-index: 30;
  padding: var(--sp-3) var(--sp-4);
  background: var(--brand-navy);
  color: var(--brand-white);
  font-weight: 600;
  border-radius: var(--ui-radius-small);
}

.skip-link:focus {
  top: var(--sp-3);
}

/* ---------- pilot strip ---------- */

.pilot-strip {
  background: var(--ui-surface-2);
  border-bottom: 1px solid var(--ui-border);
  font-size: var(--fs-100);
  text-align: center;
  padding: var(--sp-2) var(--sp-4);
}

/* ---------- top bar ---------- */

.topbar {
  --logo-height: 2.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--brand-white);
  border-bottom: 1px solid var(--ui-border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 4rem;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  /* Clear space of the logo: 20% of its rendered height on the four sides (Design Rules, Clear space). */
  padding: calc(var(--logo-height) * 0.2);
  margin-left: calc(var(--logo-height) * -0.2);
}

.topbar__logo {
  height: var(--logo-height);
  width: auto;
}

.topbar__title {
  font-family: var(--ui-font-heading);
  font-weight: 600;
  font-size: var(--fs-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: var(--sp-3);
  border-left: 3px solid var(--brand-orange);
  line-height: 1.1;
}

.topbar__status {
  font-size: var(--fs-100);
  color: var(--ui-text-secondary);
  text-align: right;
}

.topbar__status[data-state='saved'] {
  color: var(--sem-success);
  font-weight: 600;
}

.topbar__status[data-state='offline'] {
  color: var(--sem-warning);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .topbar {
    --logo-height: 2.75rem;
  }
}

@media (max-width: 30rem) {
  .topbar__title {
    display: none;
  }
}

/* ---------- titles ---------- */

.display-title {
  font-family: var(--ui-font-display);
  font-weight: 400;
  font-size: clamp(var(--fs-600), 6vw, var(--fs-800));
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.section-title {
  font-size: var(--fs-500);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

/* The orange rule of the logo, above a title. Never text, never the only edge of a control. */
.rule {
  width: 3.5rem;
  height: 4px;
  background: var(--brand-orange);
  border-radius: 2px;
}

.lead {
  font-size: var(--fs-400);
  line-height: 1.5;
}

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

.small {
  font-size: var(--fs-200);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 3rem;
  padding: var(--sp-3) var(--sp-6);
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--fs-300);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ui-motion), box-shadow var(--ui-motion), background-color var(--ui-motion);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--ui-shadow-soft);
}

.button--primary {
  background: var(--brand-navy);
  color: var(--brand-white);
}

.button--primary:hover {
  background: var(--brand-royal);
}

/* Orange button: navy text (6.11:1). Orange is never text on white. */
.button--accent {
  background: var(--brand-orange);
  color: var(--brand-navy);
}

.button--ghost {
  background: var(--brand-white);
  color: var(--brand-navy);
  border-color: var(--brand-navy);
}

.button--quiet {
  background: transparent;
  color: var(--brand-navy);
  padding-inline: var(--sp-3);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.button--quiet:hover {
  box-shadow: none;
  transform: none;
}

.button--small {
  min-height: 2.25rem;
  padding: var(--sp-1) var(--sp-4);
  font-size: var(--fs-200);
}

.button[disabled],
.button[aria-busy='true'] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .option,
  .progress__bar {
    transition: none;
  }
}

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

.card {
  background: var(--brand-white);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-soft);
  padding: var(--sp-5);
}

@media (min-width: 40rem) {
  .card {
    padding: var(--sp-6);
  }
}

.stack {
  display: grid;
  gap: var(--sp-4);
}

.stack--loose {
  gap: var(--sp-6);
}

.stack--tight {
  gap: var(--sp-2);
}

/* ---------- outcome box. The tone follows what the reader should do next (Interface Guides). ---------- */

.callout {
  padding: var(--sp-4);
  border: 1px solid var(--ui-border);
  border-left: 6px solid var(--brand-navy);
  border-radius: var(--ui-radius-small);
  background: var(--brand-white);
}

.callout[data-tone='success'] {
  border-left-color: var(--sem-success);
}

.callout[data-tone='warning'] {
  border-left-color: var(--sem-warning);
}

.callout[data-tone='error'] {
  border-left-color: var(--sem-error);
}

.callout__title {
  font-weight: 700;
}

/* ---------- footer ---------- */

.footer {
  padding: var(--sp-6) 0 var(--sp-7);
  font-size: var(--fs-100);
  color: var(--ui-text-secondary);
  text-align: center;
}

.footer a {
  color: var(--brand-navy);
}
