/* ==========================================================================
   Practical Signal Media - site.css
   Loaded after Bootstrap 5.3.3. Mobile-first: base rules target ~360px,
   wider layouts are layered on at 480 / 768 / 1024.
   Art direction: clean news-feature column, white page, teal-blue accents,
   uppercase headline, black masthead rule, black publisher footer.
   ========================================================================== */

:root {
  --ink: #000;
  --text: #212529;
  --muted: #565c63;
  --teal: #0b6f8e;
  --teal-dark: #08546d;
  --teal-tint: #eef5f8;
  --line: #d5dde2;
  --orange: #f2812f;
  --orange-ink: #b34e08;
  --navy: #14233c;
  --foot-bg: #0b0b0b;
  --foot-text: #bcc0c6;
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bs-body-font-family: var(--font);
  --bs-body-color: var(--text);
  --bs-body-bg: #fff;
  --bs-link-color: var(--teal);
  --bs-link-hover-color: var(--teal-dark);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  --bs-gutter-x: 2rem; /* 16px each side on mobile */
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  text-underline-offset: 0.15em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}

/* ---------- Masthead ---------- */
.masthead {
  background: #fff;
  border-bottom: 1px solid var(--ink);
}

.masthead .navbar {
  padding: 0.5rem 0;
}

.masthead .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--navy);
}

.brand__mark {
  flex: none;
  width: 38px;
  height: 38px;
}

.brand__word {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: lowercase;
}

.brand__sub {
  display: inline-block;
  margin-left: 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-ink);
  vertical-align: baseline;
}

.masthead__side {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tag-label {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  border-radius: 2px;
}

.masthead__toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.masthead__toggle:focus {
  box-shadow: none;
}

.masthead__toggle:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

.masthead .navbar-collapse {
  flex-basis: 100%;
}

.masthead .navbar-nav {
  padding: 0.5rem 0 0.75rem;
}

.masthead__link {
  display: block;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  color: var(--teal);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease;
}

.masthead__link:hover,
.masthead__link:focus-visible {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* ---------- Article column ---------- */
.article {
  padding: 1.75rem 0 2.5rem;
}

.article__kicker {
  margin: 0 0 0.6rem;
  color: var(--teal);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article__title {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.125rem);
  font-weight: 700;
  line-height: 1.17;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: auto;
}

.article__dek {
  margin: 0 0 1.5rem;
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.55;
}

.page__meta {
  margin: -0.25rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Prose ---------- */
.prose p {
  margin: 0 0 1.15rem;
}

.prose h2 {
  margin: 2.5rem 0 0.85rem;
  color: var(--ink);
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.prose h3 {
  margin: 1.75rem 0 0.6rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--teal);
  font-weight: 700;
}

.prose a:not(.cta) {
  color: var(--teal);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.prose a:not(.cta):hover {
  color: var(--teal-dark);
}

.prose strong {
  color: var(--ink);
}

.prose address {
  margin: 0 0 1.15rem;
  font-style: normal;
}

/* ---------- Media ---------- */
.media {
  margin: 1.5rem 0 2rem;
}

.media__frame {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 3);
  overflow: hidden;
  background: #e6edf0;
}

.media__frame img,
.media__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.media--hero {
  --ratio: 4 / 3;
  --focus: 82% 50%;
  margin-top: 0;
}

.media--photo {
  --ratio: 3 / 2;
  --focus: 50% 40%;
}

.media--portrait {
  --ratio: 4 / 5;
  --focus: 50% 55%;
  max-width: 18rem;
  margin: 0.5rem auto 0;
}

.media__caption {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

/* ---------- Call to action ---------- */
.cta-row {
  margin: 1.75rem 0 2rem;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  background: var(--teal);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cta::after {
  content: "\2192";
  content: "\2192" / "";
  transition: transform 0.15s ease;
}

.cta:hover {
  background: var(--teal-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(8, 84, 109, 0.28);
}

.cta:hover::after {
  transform: translateX(3px);
}

.cta:active {
  transform: translateY(1px);
}

.cta:focus-visible {
  color: #fff;
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

/* ---------- Cost table (stacked on mobile, table from 768) ---------- */
.cost {
  margin: 1.5rem 0 2rem;
}

.cost-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 1rem;
}

.cost-table caption {
  padding: 0 0 0.6rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.cost-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cost-table tbody,
.cost-table tr,
.cost-table th,
.cost-table td {
  display: block;
}

.cost-table tr {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.cost-table tbody tr:nth-child(odd) {
  background: var(--teal-tint);
}

.cost-table tbody tr:first-child {
  border-top: 3px solid var(--teal);
}

.cost-table td,
.cost-table tbody th {
  padding: 0.15rem 0;
  color: var(--text);
  font-weight: 400;
  text-align: left;
}

.cost-table tbody th {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
}

.cost-table td::before {
  content: attr(data-label);
  display: block;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Tiles (card grid) ---------- */
.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 1.5rem;
  margin: 1.5rem 0 0;
}

.tile {
  min-width: 0;
}

.tile__label {
  margin: 0 0 0.5rem;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tile__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e6edf0;
}

.tile__media img,
.tile__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.tile__title {
  margin: 0.8rem 0 0.4rem;
  color: var(--teal);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.tile__text {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- Split (text + portrait loop) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.split__text > :last-child {
  margin-bottom: 0;
}

/* ---------- Rule above footer ---------- */
.article-end {
  margin: 0 0 2.5rem;
  border: 0;
  border-top: 1px solid #b5bbc0;
  opacity: 1;
}

/* ---------- Footer (publisher imprint) ---------- */
.bottom {
  padding: 2.5rem 0 2.25rem;
  background: var(--foot-bg);
  color: var(--foot-text);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.bottom__imprint {
  margin: 0 auto;
  text-align: center;
}

.bottom__imprint p {
  margin: 0 0 0.35rem;
}

.bottom__imprint .imprint__name {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bottom__page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.25rem;
  margin: 1.25rem auto 0.75rem;
}

.bottom__page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease;
}

.bottom__page-links a:hover,
.bottom__page-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.bottom :focus-visible {
  outline-color: #fff;
}

.about-line {
  max-width: 44rem;
  margin: 0.5rem auto 0;
  color: var(--foot-text);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}

/* ==========================================================================
   >= 480px
   ========================================================================== */
@media (min-width: 480px) {
  .cta {
    display: inline-flex;
    padding-inline: 1.9rem;
  }

  .masthead__side {
    gap: 1rem;
  }

  .brand__word {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   >= 768px
   ========================================================================== */
@media (min-width: 768px) {
  body {
    font-size: 1.125rem;
  }

  .container {
    --bs-gutter-x: 3rem;
  }

  /* masthead: brand | centred links | label */
  .masthead .navbar {
    padding: 0.9rem 0;
  }

  .brand {
    order: 1;
    gap: 0.75rem;
  }

  .brand__mark {
    width: 48px;
    height: 48px;
  }

  .brand__word {
    font-size: 1.6rem;
  }

  .masthead .navbar-collapse {
    order: 2;
    flex-basis: auto;
    flex-grow: 1;
    justify-content: center;
  }

  .masthead__side {
    order: 3;
  }

  .masthead .navbar-nav {
    flex-direction: row;
    gap: 1.75rem;
    padding: 0;
  }

  .masthead__link {
    padding: 0.5rem 0;
    border-top: 0;
    font-size: 1.0625rem;
  }

  .article {
    padding: 3rem 0 3.5rem;
  }

  .article__dek {
    margin-bottom: 2rem;
    font-size: 1.25rem;
  }

  .prose h2 {
    margin-top: 3rem;
  }

  .media {
    margin-block: 2rem 2.5rem;
  }

  .media--hero {
    margin-top: 0;
  }

  /* table layout restored */
  .cost-table thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    display: table-header-group;
  }

  .cost-table tbody {
    display: table-row-group;
  }

  .cost-table tr {
    display: table-row;
    padding: 0;
  }

  .cost-table th,
  .cost-table td {
    display: table-cell;
    vertical-align: middle;
  }

  .cost-table thead th {
    padding: 0.9rem 1rem;
    background: var(--teal);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    text-align: center;
  }

  .cost-table tbody tr:first-child {
    border-top: 0;
  }

  .cost-table td,
  .cost-table tbody th {
    padding: 0.95rem 1rem;
    font-size: 1rem;
    text-align: center;
  }

  .cost-table tbody th {
    width: 24%;
    text-align: left;
  }

  .cost-table td + td,
  .cost-table th + td,
  .cost-table thead th + th {
    border-left: 1px solid var(--line);
  }

  .cost-table thead th + th {
    border-left-color: rgba(255, 255, 255, 0.28);
  }

  .cost-table td::before {
    content: none;
  }

  /* two-column tile grid */
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.75rem;
  }

  .split {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .media--portrait {
    max-width: none;
    margin: 0.35rem 0 0;
  }

  .bottom {
    padding: 3.25rem 0 2.75rem;
  }
}

/* ==========================================================================
   >= 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  /* equal-width side slots keep the centre links truly centred */
  .brand {
    flex: 0 0 12rem;
  }

  .masthead__side {
    flex: 0 0 12rem;
    justify-content: flex-end;
  }

  .masthead .navbar-nav {
    gap: 2.5rem;
  }

  .article {
    padding: 3.5rem 0 4rem;
  }

  .article__title {
    margin-bottom: 1.25rem;
  }

  .prose h2 {
    margin-top: 3.25rem;
  }
}

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

  .cta,
  .cta::after,
  .skip-link {
    transition: none;
  }
}
