/* ═══════════════════════════════════════════════════════════════
   OPAAC - Ontario Police Arbitration and Adjudication Commission
   Shared Stylesheet
   ═══════════════════════════════════════════════════════════════*/

/* ═══════════════════════════════════════════
       CSS CUSTOM PROPERTIES
       ═══════════════════════════════════════════*/
:root {
  --content-width: 1200px;
  --content-padding: 0 24px;

  /* Surfaces */
  --deep-surface: #102A43;
  --deep-primary: #054B72;
  --dark-background: #1F2933;
  --light-surface: #f5f7fa;
  --main-background: #ffffff;
  --soft-primary: #dbe9f5;

  /* Brand */
  --primary-accent: #047bc1;
  --secondary-accent: #d69513;
  --soft-secondary-accent: #f0e7cc;

  /* Text */
  --primary-text: #1f2933;
  --secondary-text: #52606d;

  /* Borders */
  --borders-dividers: #d9e2ec;

  /* Semantic */
  --color-utility-bg: var(--deep-surface);
  --color-utility-fg: #ffffff;
  --color-identity-bg: var(--deep-primary);
  --color-identity-fg: #ffffff;
  --color-menu-bg: var(--light-surface);
  --color-menu-fg: var(--primary-text);
  --color-menu-border: var(--borders-dividers);
  --color-body-bg: var(--main-background);
  --color-body-fg: var(--primary-text);
  --color-hero-bg: var(--main-background);
  --color-hero-fg: var(--primary-text);
  --color-footer-bg: var(--deep-surface);
  --color-footer-fg: #C8D8E8;
  --color-footer-bot-bg: #091C2D;
  --color-footer-bot-fg: #8AAFC8;

  /* ── Functional colours (Ontario visual identity) ── */
  --color-info: #047BC1;
  --color-info-bg: #dbeeff;
  --color-success: #00A54C;
  --color-success-bg: #d6f5e3;
  --color-warning: #F15A22;
  --color-warning-bg: #fde8df;
  --color-error: #ED1C24;
  --color-error-bg: #fde0e1;

  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Nav dropdown timing */
  --dropdown-dur: 200ms;
}

/* ═══════════════════════════════════════════
       RESET / BASE
       ═══════════════════════════════════════════*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-body-fg);
  background: var(--color-body-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--primary-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
  font-weight: bold;
}

/* ═══════════════════════════════════════════
       INNER WRAPPER
       ═══════════════════════════════════════════*/
.inner {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: var(--content-padding);
}

/* ═══════════════════════════════════════════
       HEADER SHELL
       ═══════════════════════════════════════════*/
#site-header {
  width: 100%;
  position: static;
  box-shadow: 0 1px 0 var(--borders-dividers), 0 2px 8px rgba(5, 20, 40, 0.08);
}

/* ═══════════════════════════════════════════
       BACK TO TOP BUTTON
       ═══════════════════════════════════════════*/
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--deep-primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 20, 40, 0.25);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease, bottom 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Lift clear of the footer's bottom band (where the Ontario
       logo sits) instead of overlapping it - stays visible and
       clickable, just repositioned higher up the page */
.back-to-top.is-above-footer {
  bottom: 96px;
}

.back-to-top:hover {
  background: var(--primary-accent);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }

  .back-to-top.is-above-footer {
    bottom: 110px;
  }
}

/* ───────────────────────────────────────────
BAND 1 - UTILITY
───────────────────────────────────────────*/
.header-utility {
  background: var(--color-utility-bg);
  color: var(--color-utility-fg);
}

.header-utility .inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 38px;
  gap: 0;
}

.util-nav {
  display: flex;
  align-items: stretch;
  list-style: none;
}

.util-nav li {
  display: flex;
  align-items: center;
}

.util-nav a {
  display: flex;
  align-items: center;
  color: var(--color-utility-fg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0 16px;
  height: 38px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.util-nav a:hover {
  text-decoration: underline;
}

.util-nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
  text-decoration: underline;
}

/* Font sizer - no boxes, just the letters and symbols */
.font-sizer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
}

.font-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 30px;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
  transition: opacity 0.15s;
  border-radius: 3px;
}

.font-btn:hover:not(:disabled) {
  opacity: 0.8;
}

.font-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.font-btn:disabled {
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

/* Decrease: small "−A" pair */
.font-btn--decrease .btn-inner {
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.font-btn--decrease .btn-sym {
  font-size: 11px;
  font-weight: 300;
  font-family: var(--font-body);
  line-height: 1;
  margin-bottom: 1px;
}

.font-btn--decrease .btn-a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

/* Increase: large "A+" pair  */
.font-btn--increase .btn-inner {
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.font-btn--increase .btn-a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
}

.font-btn--increase .btn-sym {
  font-size: 12px;
  font-weight: 300;
  font-family: var(--font-body);
  line-height: 1;
  margin-bottom: 3px;
}

/* ───────────────────────────────────────────
  BAND 2 - IDENTITY
  ───────────────────────────────────────────*/

.header-identity {
  background: var(--color-identity-bg);
  color: var(--color-identity-fg);
  min-height: 130px;
  background-color: var(--deep-primary);
  background-image: url('../images/bg_identity.png');
  background-repeat: no-repeat;
  background-position: calc(50% + 310px) center;
  background-size: auto 100%;
}

.header-identity .inner {
  display: flex;
  align-items: flex-start;
  padding-block: 18px;
  gap: 20px;
  height: 100%;
  display: flex;
}

.identity-logo {
  flex-shrink: 0;
}

.coat-of-arms {
  height: 80px;
  display: flex;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.4);
  padding: 6px;
}

.identity-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wordmark-acronym {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 48px;
  /* was 3rem; */
  line-height: 1;
  color: #ffffff;
  letter-spacing: 0.01em;
  display: block;
  text-decoration: none;
}

.wordmark-acronym:hover {
  text-decoration: none;
}

.wordmark-fullname {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16.8px;
  /* was 1.05rem; */
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.88);
}

.wordmark-fullname .line {
  display: inline;
  white-space: nowrap;
}

.header-utility {
  background-color: var(--deep-surface);
  background-image: url('../images/bg_utility.png');
  background-repeat: no-repeat;
  background-position: calc(50% + 310px) center;
  background-size: auto 100%;
}

@media (max-width: 900px) {

  /* Hamburger lives in the identity band on mobile */
  .header-identity .inner {
    position: relative;
  }
}

@media (max-width: 768px) {
  :root {
    --content-padding: 0 16px;
  }

  .header-identity {
    min-height: 110px;
  }

  .header-identity .inner {
    gap: 12px;
    padding-block: 16px;
  }

  .wordmark-acronym {
    font-size: 35.2px;
  }

  .wordmark-fullname {
    font-size: 14.4px;
  }

  .coat-of-arms {
    height: 64px;
  }
}


@media (max-width: 540px) {
  .header-identity {
    background-position: calc(50% + 340px) center;
  }
}

@media (max-width: 480px) {

  .header-identity {
    min-height: 96px;
  }

  .wordmark-acronym {
    font-size: 29.6px;
  }

  .wordmark-fullname {
    font-size: 12.8px;
  }

  .coat-of-arms {
    height: 54px;
  }
}

/* ───────────────────────────────────────────
BAND 3 - MAIN NAV
───────────────────────────────────────────*/
.header-menu {
  background: var(--color-menu-bg);
  color: var(--color-menu-fg);
  border-bottom: 2px solid var(--color-menu-border);
  position: relative;
}

.header-menu .inner {
  display: flex;
  align-items: stretch;
  min-height: 52px;
  position: relative;
}

/* Primary nav list */
.primary-nav {
  display: flex;
  align-items: stretch;
  list-style: none;
  gap: 0;
  height: 100%;
}

/* Each top-level item */
.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Top-level link / button */
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-menu-fg);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s;
  /* Gold active/hover bar via pseudo-element at the bottom */
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
  transform-origin: left;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-item:hover>.nav-link,
.nav-item.is-open>.nav-link {
  color: var(--deep-primary);
  background: rgba(4, 123, 193, 0.06);
  text-decoration: none;
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-item:hover>.nav-link::after,
.nav-item.is-open>.nav-link::after {
  transform: scaleX(1);
}

/* Active page - gold bar always visible */
.nav-item.is-active>.nav-link {
  color: var(--deep-primary);
}

.nav-item.is-active>.nav-link::after {
  transform: scaleX(1);
  background: var(--secondary-accent);
}

/* Dropdown chevron */
.nav-chevron {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-item.is-open>.nav-link .nav-chevron,
.nav-item:hover>.nav-link .nav-chevron {
  transform: rotate(180deg);
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -2px;
}

/* ── Dropdown panel ── */
.nav-dropdown {
  position: absolute;
  top: 100%;
  /* clears the bottom border */
  left: 0;
  min-width: 260px;
  background: var(--main-background);
  border: 1px solid var(--borders-dividers);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 6px 20px rgba(5, 20, 40, 0.12);
  list-style: none;
  z-index: 300;


  opacity: 0;
  visibility: hidden;
  /* changed */
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity var(--dropdown-dur) ease,
    transform var(--dropdown-dur) ease,
    visibility 0s linear var(--dropdown-dur);
  /* changed */
}

/* Open state - triggered by hover OR .is-open class (keyboard) */
.nav-item:hover>.nav-dropdown,
.nav-item.is-open>.nav-dropdown {
  opacity: 1;
  visibility: visible;
  /* changed */
  transform: translateY(0);
  pointer-events: auto;
  transition:
    /* changed - whole group */
    opacity var(--dropdown-dur) ease,
    transform var(--dropdown-dur) ease,
    visibility 0s linear 0s;
}

/* Dropdown items */
.nav-dropdown li {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.845rem;
  font-weight: 400;
  color: var(--primary-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: var(--soft-primary);
  color: var(--primary-accent);
  border-left-color: var(--primary-accent);
  text-decoration: none;
}

.nav-dropdown a:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -2px;
}

.nav-dropdown li+li {
  border-top: 1px solid var(--borders-dividers);
}

/* Mobile hamburger (hidden on desktop) */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 44px;
  height: 52px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-text);
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-hamburger:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.ham-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Hamburger → X when open */
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════
       MAIN BODY
       ═══════════════════════════════════════════*/
#site-main {
  flex: 1;
  width: 100%;
}

.content-section {
  width: 100%;
  background: var(--color-body-bg);
}

.content-section .inner {
  padding-block: 3rem;
}

.content-body .inner-top {
  padding-block-start: 3rem !important;
  padding-block-end: 0 !important;
}

.content-body .inner-btm {
  padding-block-start: 0 !important;
  padding-block-end: 3rem !important;
}

/* ═══════════════════════════════════════════
       QUICK-LINKS CARD GRID
       ═══════════════════════════════════════════*/
.quicklinks-section {
  width: 100%;
  background: var(--soft-primary);
  border-top: none;
  border-bottom: 1px solid #c2d8ee;
}

.quicklinks-section .inner {
  padding-block: 56px 64px;
}

.quicklinks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  list-style: none;
  width: 90%;
  margin-inline: auto;
}

.ql-card {
  background: var(--main-background);
  border: 1px solid var(--borders-dividers);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(5, 20, 40, 0.05), 0 6px 16px rgba(5, 20, 40, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
}

.ql-card:hover {
  border-color: var(--primary-accent);
  box-shadow: 0 4px 8px rgba(4, 123, 193, 0.1), 0 12px 28px rgba(4, 123, 193, 0.1);
  transform: translateY(-3px);
}

.ql-card-link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 22px;
  padding: 32px 30px 28px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  border-radius: 10px;
  outline-offset: -3px;
}

.ql-card-link:hover {
  text-decoration: none;
}

.ql-card-link:focus-visible {
  outline: 2px solid var(--primary-accent);
}

/* Icon - gold, heavier stroke */
.ql-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  color: var(--secondary-accent);
  /* gold: #d69513 */
  margin-top: 1px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ql-card:hover .ql-icon {
  color: #b87d0f;
  /* slightly deeper gold on hover for contrast/feedback */
  transform: scale(1.08);
}

.ql-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.ql-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--primary-text);
}

.ql-desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--secondary-text);
  flex: 1;
}

.ql-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--deep-primary);
  transition: gap 0.15s ease, color 0.15s ease;
}

.ql-card:hover .ql-cta {
  color: var(--primary-accent);
  gap: 9px;
}

.ql-cta svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.ql-card:hover .ql-cta svg {
  transform: translateX(3px);
}

@media (max-width: 780px) {
  .quicklinks-grid {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 20px;
  }

  .ql-card-link {
    padding: 24px 22px 22px;
  }

  .quicklinks-section .inner {
    padding-block: 24px;
  }
}

.hero-section {
  width: 100%;
  background: var(--main-background);
  color: var(--primary-text);
  border-bottom: 1px solid var(--borders-dividers);
}

.hero-section .inner {
  padding-block: 40px 48px;
}

.hero-content {
  max-width: 68%;
}

.hero-lead {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.4;
  color: var(--primary-text);
  /* #1f2933 on #ffffff = 16.1:1 ✓ AAA */
  margin-bottom: 1.4rem;
}

.hero-body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--secondary-text);
  /* #52606d on #ffffff = 7.4:1 ✓ AA */
  margin-bottom: 1.4rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-primary);
  /* #054B72 on #ffffff = 10.7:1 ✓ AAA */
  text-decoration: none;
  border-bottom: 1.5px solid rgba(5, 75, 114, 0.3);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s, gap 0.15s;
}

.hero-link:hover {
  color: var(--primary-accent);
  border-color: rgba(4, 123, 193, 0.5);
  gap: 12px;
  text-decoration: none;
}

.hero-link:focus-visible {
  outline: 2px solid var(--deep-primary);
  outline-offset: 3px;
  border-radius: 1px;
}

.hero-link svg {
  flex-shrink: 0;
  transition: transform 0.15s;
}

.hero-link:hover svg {
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .hero-content {
    max-width: 85%;
  }

  .hero-lead {
    font-size: 1.55rem;
  }
}

@media (max-width: 600px) {
  .hero-content {
    max-width: 100%;
  }

  .hero-section .inner {
    padding-block: 36px 44px;
  }

  .hero-lead {
    font-size: 1.3rem;
  }

  .hero-body {
    font-size: 0.95rem;
  }
}

/* ═══════════════════════════════════════════
       FOOTER
       ═══════════════════════════════════════════*/
#site-footer {
  width: 100%;
}

/* ── Main footer band ── */
.footer-main {
  background: var(--color-footer-bg);
  /* --deep-surface #102A43 */
  color: var(--color-footer-fg);
}

.footer-main .inner {
  padding-block: 44px 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

/* Column headings */
.footer-col-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary-accent);
  /* gold on #102A43 - used as a subtle label accent */
  margin-bottom: 16px;
  display: block;
}

/* ── Col 1: Identity ── */
.footer-identity {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-org-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  color: #ffffff;
  margin-bottom: 4px;
  text-decoration: none;
  display: inline-block;
}

.footer-org-name:hover {
  text-decoration: none;
}

.footer-org-fullname {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.87rem;
  line-height: 1.45;
  color: var(--color-footer-fg);
  /* #C8D8E8 on #102A43 = 7.2:1 ✓ AA */
  margin-bottom: 20px;
}

.footer-org-fullname .line {
  display: inline;
  white-space: nowrap;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--soft-primary);
  /* #dbe9f5 on #102A43 = 8.6:1 ✓ AAA */
  text-decoration: none;
  transition: color 0.15s;
}

.footer-contact-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-contact-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ── Col 2 & 3: Link lists ── */
.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-link-list a {
  display: block;
  padding: 4px 0;
  font-family: var(--font-body);
  font-size: 0.845rem;
  font-weight: 400;
  color: var(--color-footer-fg);
  text-decoration: none;
  transition: color 0.15s, padding-left 0.15s;
}

.footer-link-list a:hover {
  color: #ffffff;
  padding-left: 6px;
  text-decoration: none;
}

.footer-link-list a:focus-visible {
  outline: 2px solid var(--soft-primary);
  outline-offset: 2px;
}

/* External link indicator 
.footer-link-list a[target="_blank"]::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M4 2H2a1 1 0 00-1 1v5a1 1 0 001 1h5a1 1 0 001-1V6' stroke='%23C8D8E8' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M6 1h3v3' stroke='%23C8D8E8' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 1L5 5' stroke='%23C8D8E8' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
  vertical-align: middle;
  flex-shrink: 0;
}
*/
.external-link::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 5px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M4 2H2a1 1 0 00-1 1v5a1 1 0 001 1h5a1 1 0 001-1V6' stroke='white' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M6 1h3v3' stroke='white' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 1L5 5' stroke='white' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M4 2H2a1 1 0 00-1 1v5a1 1 0 001 1h5a1 1 0 001-1V6' stroke='white' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M6 1h3v3' stroke='white' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 1L5 5' stroke='white' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Footer bottom band ── */
.footer-bottom {
  background: var(--color-footer-bot-bg);
  color: var(--color-footer-bot-fg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}

.footer-bottom-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-bottom-text p {
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-footer-bot-fg);
  /* #8AAFC8 on #091C2D = 5.1:1 ✓ AA */
  margin: 0;
}

.footer-bottom-text a {
  color: var(--color-footer-bot-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.footer-bottom-text a:hover {
  color: #ffffff;
}

.footer-bottom-text a:focus-visible {
  outline: 2px solid var(--soft-primary);
  outline-offset: 2px;
}

/* Ontario logo placeholder */
.footer-ontario-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ontario-logo-placeholder {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 540px) {
  .footer-bottom .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-ontario-logo {
    align-self: center;
  }
}

/* ── Footer responsive ── */
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  /* Identity spans full width on tablet */
  .footer-identity {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-identity {
    grid-column: auto;
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-bottom .inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Mobile-only utility nav items - hidden on desktop */
.nav-mobile-util {
  display: none;
}

@media (max-width: 900px) {
  .nav-mobile-util {
    display: flex;
    border-top: 2px solid var(--borders-dividers);
  }

  .nav-mobile-util:first-of-type {
    margin-top: 4px;
  }

  .nav-mobile-util .nav-link {
    font-style: normal;
    color: var(--secondary-text);
    font-weight: 400;
  }
}

/* Touch-friendly active states for mobile (replaces hover) */
@media (hover: none) {
  .ql-card:active {
    border-color: var(--primary-accent);
    box-shadow: 0 2px 8px rgba(4, 123, 193, 0.12);
    transform: scale(0.99);
  }

  .nav-link:active {
    background: var(--soft-primary);
    color: var(--primary-accent);
  }

  .footer-link-list a:active {
    color: #ffffff;
  }

  .hero-link:active {
    color: var(--primary-accent);
  }
}

/* ═══════════════════════════════════════════
       PLACEHOLDER LABELS
       ═══════════════════════════════════════════*/
.band-label {
  font-size: 0.72rem;
  font-family: monospace;
  letter-spacing: 0.08em;
  opacity: 0.5;
  border: 1px dashed currentColor;
  padding: 4px 10px;
  border-radius: 3px;
}

/* ═══════════════════════════════════════════
       RESPONSIVE - NAV (desktop handled above)
       ═══════════════════════════════════════════*/




@media (max-width: 900px) {

  /* Hide utility bar entirely on mobile - its links move into the nav menu */
  .header-utility {
    display: none;
  }



  .nav-hamburger {
    display: flex;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    height: 44px;
    width: 44px;
  }

  /* Strip the menu band visually on mobile - keep it in DOM so nav works */
  .header-menu {
    background: transparent;
    border-bottom: none;
    min-height: 0;
    padding: 0;
  }

  .header-menu .inner {
    min-height: 0;
    padding: 0;
  }

  /* Hide desktop nav list; JS shows it as fixed overlay when open */
  .primary-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--main-background);
    z-index: 400;
    box-shadow: 0 8px 24px rgba(5, 20, 40, 0.16);
    border-top: 2px solid var(--primary-accent);
    overflow-y: auto;
  }

  .primary-nav.is-open {
    display: flex;
  }

  body:has(.primary-nav.is-open) {
    overflow: hidden;
  }

  body:has(.primary-nav.is-open) .notification-banner {
    display: none;
  }

  .nav-item {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: 14px 20px;
    border-bottom: 1px solid var(--borders-dividers);
    justify-content: space-between;
    width: 100%;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-item:hover>.nav-link {
    background: var(--soft-primary);
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    border-top: none;
    border-radius: 0;
    border-left: 3px solid var(--primary-accent);
    background: var(--light-surface);
    display: none;
  }

  .nav-item.is-open>.nav-dropdown {
    display: block;
  }

  .nav-dropdown a {
    padding: 11px 20px 11px 26px;
  }
}





/* ═══════════════════════════════════════════
   INTERIOR PAGE - SHARED CONTENT LAYOUT
   Applies to all non-homepage content pages.
   ═══════════════════════════════════════════*/

/* ── Page title band ── */
.page-title-band {
  width: 100%;
  background: var(--main-background);
  border-bottom: 3px solid var(--soft-primary);
}

.page-title-band .inner {
  padding-block: 28px 24px;
}

/* Page H1 */
.page-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--deep-primary);
  /* #054B72 on #f5f7fa = 8.0:1 ✓ AAA */
  margin: 0;
}

/* ── Content body ── */
.content-body {
  width: 100%;
  background: var(--main-background);
}

.content-body .inner {
  padding-block: 48px 64px;
}

/* ════════════════════════════════════════
   PROSE - default full-width content
   Used by: OPAAC's Role, Legislative Authority,
   Agency Accountability, and most content pages.
   Content editors write standard HTML inside .prose.
   ════════════════════════════════════════*/
.prose {
  /* No max-width - fills the content column naturally.
     At 1200px container with 24px padding each side,
     the line length is comfortable without being excessive. */
}

.prose h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--deep-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--soft-primary);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-text);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--borders-dividers);
  margin: 2.5rem 0;
}

/* Collapsible section - for long, self-contained blocks of
   content (e.g. historical/legacy records) the reader can open
   on demand. Native <details>/<summary>, no JS, fully keyboard
   and screen-reader accessible out of the box. */
.prose details {
  border: 1px solid var(--borders-dividers);
  border-radius: 6px;
  margin: 1.5rem 0;
  padding: 0;
}

.prose details[open] {
  padding-bottom: 4px;
}

.prose summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--deep-primary);
}

.prose summary::-webkit-details-marker {
  display: none;
}

.prose summary:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.prose summary::before {
  content: '';
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--deep-primary);
  border-bottom: 2px solid var(--deep-primary);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-top: -2px;
}

.prose details[open] summary::before {
  transform: rotate(45deg);
  margin-top: 2px;
}

.prose details>.details-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--borders-dividers);
  padding-top: 16px;
}

.prose p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--primary-text);
  margin-bottom: 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 600;
  color: var(--primary-text);
}

.prose em {
  font-style: italic;
}

.prose a {
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--deep-primary);
}

.prose ol,
.prose ul {
  margin: 0.5rem 0 1.25rem;
  padding-left: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--primary-text);
  counter-reset: prose-ol;
}

.prose li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.3rem;
}

.prose li:last-child {
  margin-bottom: 0;
}

/* Numbered list markers - own counter, consistent width, real gap from text */
.prose ol li {
  counter-increment: prose-ol;
}

.prose ol li::before {
  content: counter(prose-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  color: var(--primary-text);
  text-align: right;
}

/* Bulleted list markers - plain neutral dot, no accent color */
.prose ul li::before {
  content: '•';
  position: absolute;
  left: 0.65rem;
  top: 0;
  color: var(--primary-text);
}

/* Notice/callout - for important highlighted text blocks */
.prose .notice {
  margin: 1.5rem 0;
  padding: 16px 20px;
  background: var(--soft-secondary-accent);
  border-left: 4px solid var(--secondary-accent);
  border-radius: 0 4px 4px 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.prose .notice p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.prose .notice p:last-child {
  margin-bottom: 0;
}

/* ════════════════════════════════════════
   DOC-LIST - styled downloadable document links
   Used by: Application Forms, Agency Accountability.
   Each item is a PDF or external doc link.
   ════════════════════════════════════════*/
.doc-list {
  list-style: none;
  margin: 0.5rem 0 1.5rem;
  padding: 0;
}

.prose .doc-list li {
  position: static;
  /* cancel .prose li's relative positioning */
  padding-left: 0;
  /* cancel .prose li's marker indent */
  margin-bottom: 0.5rem;
}

.doc-list li:last-child {
  margin-bottom: 0;
}

.prose ul.doc-list li::before {
  content: none;
}

/* cancel inherited bullet from .prose ul - matches .prose ul li::before specificity exactly */

.doc-list li a {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-list li a:hover {
  color: var(--deep-primary);
}

.doc-list li a:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

/* Simple document/page icon - plain rectangle with folded corner
   and a couple of lines, the standard "file" glyph */
.doc-list li a::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 12px;
  height: 14px;
  margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14' fill='none'%3E%3Cpath d='M1.5 1.5h6l3 3v8a.5.5 0 01-.5.5h-8a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5z' stroke='%23047bc1' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M7.5 1.5v3h3' stroke='%23047bc1' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.75;
}

/* Status line - same shape as a doc-list link, used when there is
   no document to link to (e.g. "No Expenses" for a given quarter).
   Keeps every item in the list visually consistent. */
.doc-list li .doc-list-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--secondary-text);
}

.doc-list li .doc-list-status::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 12px;
  height: 14px;
  margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14' fill='none'%3E%3Cpath d='M1.5 1.5h6l3 3v8a.5.5 0 01-.5.5h-8a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5z' stroke='%2352606d' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpath d='M7.5 1.5v3h3' stroke='%2352606d' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
}

.doc-list li a.external-link::after {
  align-self: center;
  margin-left: 0;
}

/* ════════════════════════════════════════
   CONTACT LAYOUT - contact page only
   Two columns on desktop: prose left, info cards right.
   Stacks in correct reading order on mobile.
   ════════════════════════════════════════*/
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto;
  gap: 56px;
  align-items: start;
}

/* Named grid areas so mobile reorder is explicit */
.contact-layout .contact-prose {
  grid-area: prose;
}

.contact-layout .contact-aside {
  grid-area: aside;
}

.contact-layout {
  grid-template-areas: "prose aside";
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background: var(--light-surface);
  border: 1px solid var(--borders-dividers);
  border-top: 3px solid var(--deep-primary);
  border-radius: 0 0 6px 6px;
  padding: 22px 24px;
}

.contact-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--deep-primary);
  margin-bottom: 14px;
}

.contact-card p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--primary-text);
  margin-bottom: 0.5rem;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-card a {
  color: var(--deep-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-card a:hover {
  color: var(--deep-primary);
}

/* Inline cards (mobile only) - match prose vertical rhythm */
.contact-card--inline {
  margin: 1.25rem 0;
}

/* Mobile: stack in correct reading order
   Para 1-3 → mailing address → para 4 → hours → rest of prose */
@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "prose"
      "aside";
    gap: 0;
  }

  /* Hide the desktop-only aside; show inline cards within prose */
  .contact-aside {
    display: none;
  }

  .contact-card--inline {
    display: block;
  }

  .contact-aside {
    gap: 16px;
    margin-bottom: 2rem;
  }
}

/* Desktop: show aside, hide inline cards within prose */
@media (min-width: 861px) {
  .contact-card--inline {
    display: none;
  }
}

/* ════════════════════════════════════════
   RESPONSIVE - interior pages
   ════════════════════════════════════════*/
@media (max-width: 768px) {
  .page-title {
    font-size: 1.6rem;
  }

  .prose h2 {
    font-size: 1.2rem;
  }

  .prose h3 {
    font-size: 1rem;
  }

  .content-body .inner {
    padding-block: 2rem 3rem;
  }

  .content-body .inner-top {
    padding-block-start: 2rem !important;
    padding-block-end: 0 !important;
  }

  .content-body .inner-btm {
    padding-block-start: 0 !important;
    padding-block-end: 3rem !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   HEARINGS PAGE
   A continuous list that reads as a table, not a stack of cards.
   One outer container; rows separated by hairline dividers only.
   Same row/detail structure is reused on mobile - no second
   layout system to keep in sync.
   ════════════════════════════════════════════════════════════════*/

/* ── Filter ── */
.hearings-filter {
  background: var(--light-surface);
  border: 1px solid var(--borders-dividers);
  border-radius: 6px;
  padding: 22px 24px;
  margin-bottom: 32px;
}

.hearings-filter-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-text);
  margin-bottom: 4px;
  display: block;
}

.hearings-filter-hint {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--secondary-text);
  margin-bottom: 14px;
}

.hearings-filter-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.hearings-filter-input-group {
  flex: 1 1 auto;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.hearings-filter-input.has-error {
  border-color: var(--color-error);
}

.hearings-filter-input.has-error:focus {
  box-shadow: 0 0 0 3px rgba(161, 58, 58, 0.15);
}

.hearings-filter-error {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-error);
  /* 5.2:1 on white ✓ AA */
}

.hearings-active-filter {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--borders-dividers);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--primary-text);
  display: none;
}

.hearings-active-filter.is-visible {
  display: block;
}

.hearings-active-filter strong {
  color: var(--deep-primary);
}

/* ── Results summary ── */
.hearings-results-summary {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--secondary-text);
  margin-bottom: 14px;
}

/* ── Mobile-only sort dropdown ── */
.hearings-sort-row {
  display: none;
}

/* ════════════════════════════════════════
   LIST - one continuous container
   ════════════════════════════════════════*/
.hearings-list-wrap {
  border: 1px solid var(--borders-dividers);
  border-radius: 6px;
  overflow: hidden;
}

/* Column header row - desktop only */
.hearings-list-header {
  display: grid;
  grid-template-columns: 40px 2.4fr 1.3fr 1fr 1fr;
  background: var(--light-surface);
  border-bottom: 2px solid var(--borders-dividers);
}

.hearings-sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 13px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-text);
  text-align: left;
  transition: color 0.15s, background 0.15s;
}

.hearings-sort-btn:hover {
  color: var(--primary-accent);
  background: var(--soft-primary);
}

.hearings-sort-btn:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -2px;
}

.hearings-sort-icon {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  color: var(--secondary-text);
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}

[role="columnheader"][aria-sort="ascending"] .hearings-sort-icon,
[role="columnheader"][aria-sort="descending"] .hearings-sort-icon {
  opacity: 1;
  color: var(--primary-accent);
}

[role="columnheader"][aria-sort="descending"] .hearings-sort-icon {
  transform: rotate(180deg);
}

/* Each hearing is a row: a clickable summary strip plus, when open,
   a full-width detail block. No card border, no margin between
   rows - only a hairline top divider, so the whole thing reads
   as one continuous list. */
.hearing-row+.hearing-row {
  border-top: 1px solid var(--borders-dividers);
}

.hearing-summary {
  display: grid;
  grid-template-columns: 40px 2.4fr 1.3fr 1fr 1fr;
  align-items: start;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.hearing-summary:hover {
  background: var(--soft-primary);
}

.hearing-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 14px;
  margin-top: 14px;
  padding: 0;
  background: none;
  cursor: pointer;
  border: 1.5px solid var(--primary-accent);
  border-radius: 50%;
  color: var(--primary-accent);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.hearing-toggle-icon:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.hearing-toggle-icon svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.hearing-toggle-icon[aria-expanded="true"] {
  background: var(--deep-primary);
  border-color: var(--deep-primary);
  color: #ffffff;
}

.hearing-toggle-icon[aria-expanded="true"] svg {
  transform: rotate(45deg);
}

.hearing-field {
  padding: 14px;
  min-width: 0;
}

.hearing-field-label {
  display: none;
}

/* mobile only */

.hearing-filename-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.45;
}

.hearing-field-value {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.45;
}

.hearing-date-value {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hearing-cancelled-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-error-bg);
  /* slightly deeper red tint for more separation from text */
  color: #A6141A;
  /* darker red - 6.4:1 on var(--color-error-bg), much crisper than before */
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  width: fit-content;
}

.hearing-cancelled-tag svg {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

/* ── Expanded detail - full width, same horizontal gap on all sides ── */
.hearing-detail {
  display: none;
}

.hearing-detail.is-open {
  display: block;
}

.hearing-detail-inner {
  background: var(--light-surface);
  border-radius: 8px;
  margin: 0 14px 14px 14px;
  /* same gap left/right/bottom; top handled by parent spacing */
  padding: 18px 20px;
}

.hearing-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}

.hearing-detail-grid+.hearing-detail-grid {
  margin-top: 16px;
}

.hearing-detail-grid--single {
  grid-template-columns: 1fr;
}

.hearing-detail-grid--access {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.hearing-detail-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-text);
  margin-bottom: 4px;
  display: block;
}

.hearing-detail-value {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.5;
}

.hearing-detail-value a {
  color: var(--deep-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hearing-format-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  width: fit-content;
}

.hearing-format-badge--virtual {
  background: #cfe3f3;
  /* deeper blue tint for separation */
  color: var(--deep-primary);
  /* #054B72 on #cfe3f3 = 7.1:1 - crisp */
}

.hearing-format-badge--inperson {
  background: #efddb0;
  /* deeper gold tint for separation */
  color: #6b4d0c;
  /* darker gold-brown - 6.8:1, much crisper than before */
}

.hearing-format-badge--caseconference {
  background: #e8e1f3;
  color: #553c7b;
}

.hearing-format-badge svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.hearing-format-badge--prehearing {
  background: var(--color-warning-bg);
  color: #8a3412;
}

mark {
  background: var(--soft-secondary-accent);
  color: var(--primary-text);
  padding: 0 2px;
  border-radius: 2px;
}

/* ── Footer row ── */
.hearings-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hearings-results-summary--bottom {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--secondary-text);
  margin: 0;
}

.hearings-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-text);
  background: var(--main-background);
  border: 1.5px solid var(--borders-dividers);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

.page-btn:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 1px;
}

.page-btn[aria-current="true"] {
  background: var(--deep-primary);
  border-color: var(--deep-primary);
  color: #ffffff;
  cursor: default;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn--nav svg {
  width: 14px;
  height: 14px;
}

.page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 38px;
  color: var(--secondary-text);
  font-size: 0.875rem;
}

/* ── No results ── */
.hearings-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--secondary-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.hearings-empty strong {
  color: var(--primary-text);
}

/* ════════════════════════════════════════════════════════════════
   FORM DOWNLOAD MODAL — "Before you download" warning
   Used by: Application Forms. Shared by all 3 form links; content
   is filled in via JS, so there's one modal in the DOM.
   ════════════════════════════════════════════════════════════════*/
/* ════════════════════════════════════════════════════════════════
   FORM DOWNLOAD MODAL
   ════════════════════════════════════════════════════════════════*/
#formModalOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 20, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#formModalOverlay[hidden] {
  display: none;
}

.modal-dialog {
  background: var(--main-background);
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(5, 20, 40, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--deep-primary);
  border-radius: 10px 10px 0 0;
}

.modal-header-icon {
  flex-shrink: 0;
  display: flex;
  color: var(--secondary-accent);
}

.modal-title {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  color: #ffffff !important;
  margin: 0 !important;
}

.modal-steps {
  list-style: none !important;
  counter-reset: modal-step;
  padding: 0 !important;
  margin: 0 0 18px !important;
}

.modal-steps li {
  position: relative !important;
  padding-left: 2.4rem !important;
  margin-bottom: 12px !important;
  font-family: var(--font-body);
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  color: var(--primary-text) !important;
}

.modal-steps li:last-child {
  margin-bottom: 0;
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--primary-text);
  margin-bottom: 14px;
}

.modal-body .modal-warning {
  margin-bottom: 18px;
}

.modal-steps li::before {
  counter-increment: modal-step;
  content: counter(modal-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--deep-primary);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-steps li:nth-child(3)::before {
  padding-top: 1px;
}

.prose .modal-title {
  border-bottom: none;
  padding-bottom: 0;
}

.prose ol.modal-steps li::before {
  content: counter(modal-step);
  color: #ffffff;
  text-align: center;
}

.prose ol.modal-steps {
  counter-reset: modal-step;
}

@media (min-width: 769px) {
  .modal-steps li:nth-child(3)::before {
    padding-top: 2px;
  }
}

.modal-steps a {
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-warning {
  background: #fdf3e2;
  border: 1px solid #f0d9a8;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #6b4d0c;
  margin-bottom: 18px;
}

.modal-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-text);
  cursor: pointer;
}

.modal-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--deep-primary);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid var(--borders-dividers);
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.modal-btn--cancel {
  background: var(--main-background);
  border: 1.5px solid var(--borders-dividers);
  color: var(--primary-text);
}

.modal-btn--cancel:hover {
  border-color: var(--secondary-text);
}

.modal-btn--download {
  background: var(--borders-dividers);
  color: var(--secondary-text);
  pointer-events: none;
}

.modal-btn--download.is-enabled {
  background: var(--deep-primary);
  color: #ffffff;
  pointer-events: auto;
}

.modal-btn--download.is-enabled:hover {
  background: var(--primary-accent);
}

@media (max-width: 600px) {
  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-btn {
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════════
   404 - PAGE NOT FOUND
   ════════════════════════════════════════════════════════════════*/
.error-404 {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 24px 0 16px;
}

.error-404-code {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--soft-primary);
  margin-bottom: 8px;
}

.error-404-message {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--secondary-text);
  margin-bottom: 32px;
}

.error-404-actions {
  margin-bottom: 48px;
}

.error-404-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--deep-primary);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
}

.error-404-home-link:hover {
  background: var(--primary-accent);
}

.error-404-home-link:focus-visible {
  outline: 2px solid var(--deep-primary);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .error-404-code {
    font-size: 3.5rem;
  }

  .error-404-message {
    font-size: 0.95rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   SEARCH RECORDS - landing page index cards
   Each row links out to one of the four detailed search pages.
   ════════════════════════════════════════════════════════════════*/
.search-record-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prose li.search-record-card {
  margin: 0;
  position: static;
  /* cancel .prose li's relative positioning */
  padding-left: 0;
  /* cancel .prose li's marker indent */
}

.prose ul.search-record-list li::before {
  content: none;
}

/* cancel inherited bullet from .prose ul - matches .prose ul li::before specificity exactly */

.prose a.search-record-link {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  background: var(--main-background);
  border: 1px solid var(--borders-dividers);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(5, 20, 40, 0.05), 0 6px 16px rgba(5, 20, 40, 0.06);
  text-decoration: none;
  /* override .prose a's underline - this is a card, not an inline text link */
  color: inherit;
  /* override .prose a's accent color - title/desc set their own colors */
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.prose a.search-record-link:hover {
  border-color: var(--primary-accent);
  box-shadow: 0 4px 8px rgba(4, 123, 193, 0.1), 0 12px 28px rgba(4, 123, 193, 0.1);
  transform: translateY(-3px);
  text-decoration: none;
}

.search-record-link:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -3px;
}

.search-record-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--secondary-accent);
  /* gold, matching homepage quick-links */
  transition: color 0.2s ease, transform 0.2s ease;
}

.search-record-link:hover .search-record-icon {
  color: #b87d0f;
  transform: scale(1.08);
}

.search-record-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-record-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-text);
}

.search-record-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--secondary-text);
  line-height: 1.5;
}

.search-record-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--deep-primary);
  white-space: nowrap;
  transition: gap 0.15s ease, color 0.15s ease;
}

.search-record-link:hover .search-record-cta {
  color: var(--primary-accent);
  gap: 9px;
}

.search-record-cta svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.search-record-link:hover .search-record-cta svg {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .search-record-link {
    flex-wrap: wrap;
    padding: 20px 22px;
  }

  .search-record-icon {
    width: 34px;
    height: 34px;
  }

  .search-record-title {
    font-size: 1.05rem;
  }

  .search-record-cta {
    margin-left: 56px;
    /* clears icon column on its own line */
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE - Hearings page
   Same row + full-width-detail structure as desktop. Only the
   internal grid collapses from 5 columns to 1, and the column
   header row is replaced by a sort dropdown.
   ════════════════════════════════════════════════════════════════*/
@media (max-width: 860px) {

  .hearings-filter-form {
    flex-wrap: wrap;
  }

  .hearings-filter-input-group {
    flex: 1 1 100%;
    min-width: 0;
  }

  .hearings-filter-submit {
    flex: 1 1 100%;
  }

  /* Show the sort dropdown, hide the column header row */
  .hearings-sort-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .hearings-sort-row label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--secondary-text);
    flex-shrink: 0;
  }

  .hearings-sort-row select {
    flex: 1;
    height: 42px;
    box-sizing: border-box;
    padding: 0 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--primary-text);
    background: var(--main-background);
    border: 1.5px solid var(--borders-dividers);
    border-radius: 4px;
  }

  .hearings-sort-row select:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(4, 123, 193, 0.15);
  }

  .hearings-list-header {
    display: none;
  }

  /* Row collapses to a single column. Switching to flex (rather
     than grid) avoids CSS grid auto-placement wrapping multiple
     field spans into the same cell, which was causing adjacent
     labels/values to visually collide on top of each other. */
  .hearing-summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }

  .hearing-toggle-icon {
    margin-left: 0;
    margin-top: 1px;
    flex-shrink: 0;
  }

  /* Content column: toggle icon needs a sibling wrapper to flex
     against, but the markup has the icon + 4 field spans as
     direct flex children. Flex-wrap plus 100%-width fields
     forces each field onto its own line cleanly. */
  .hearing-summary {
    flex-wrap: wrap;
  }

  .hearing-field {
    display: block;
    width: 100%;
    padding: 0;
  }

  .hearing-field+.hearing-field {
    margin-top: 6px;
  }

  .hearing-field-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-text);
    margin-right: 5px;
  }

  .hearing-detail-inner {
    margin: 0 14px 14px 14px;
  }

  .hearing-detail-grid,
  .hearing-detail-grid--access {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hearings-footer-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .hearings-results-summary--bottom {
    text-align: center;
  }
}

/* ════════════════════════════════════════════════════════════════
   SEARCH PAGES
   Shared across: Arbitration Awards, Adjudication Decisions,
   Police Services Act Appeal Decisions, Collective Agreements.
   All four pages use the same filter panel, result card, and
   pagination components - only the field content differs.
   ════════════════════════════════════════════════════════════════*/

/* ── Page intro text ── */
.page-intro {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary-text);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 680px;
}

/* ── Info callout (used on Collective Agreements) ── */
.search-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--soft-primary);
  border: 1px solid #b8d4ec;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--deep-primary);
}

.search-callout svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.search-callout a {
  color: var(--deep-primary);
  font-weight: 600;
}

/* ── Filter panel ── */
.search-filter-panel {
  background: var(--light-surface);
  border: 1px solid var(--borders-dividers);
  border-radius: 8px;
  margin-bottom: 28px;
  overflow: hidden;
}

/* Mobile toggle button - hidden on desktop */
.filter-toggle-btn {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--deep-primary);
  background: var(--light-surface);
  border: none;
  border-bottom: 1px solid var(--borders-dividers);
  cursor: pointer;
  text-align: left;
}

.filter-toggle-btn svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.filter-toggle-btn[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

.filter-toggle-btn:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -2px;
}

.filter-body {
  padding: 20px 22px 0;
}

.filter-body.collapsed {
  display: none;
}

/* Direct-lookup section (the ##-### number field) */
.filter-direct {
  padding-bottom: 20px;
  margin-bottom: 8px;
}

/* "- or -" divider between direct lookup and general filters */
.filter-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-body);
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.filter-or-divider::before,
.filter-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--borders-dividers);
}

/* Field grid */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.filter-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-field.span-2 {
  grid-column: 1 / -1;
}

.field-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-text);
}

.field-error {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-error);
  display: none;
  margin-top: 2px;
}

.field-error.is-visible {
  display: block;
}

.filter-input,
.filter-select {
  height: 40px;
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary-text);
  background: var(--main-background);
  border: 1.5px solid var(--borders-dividers);
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
}

.filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2352606d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(4, 123, 193, 0.15);
}

.filter-input.has-error {
  border-color: var(--color-error);
}

.filter-input.has-error:focus {
  box-shadow: 0 0 0 3px rgba(161, 58, 58, 0.15);
}

/* Date range pair (From / To month+year or year-only) */
.date-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.date-half {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date-sub-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-text);
}

.date-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* Checkbox multiselect list */
.checkbox-list {
  border: 1.5px solid var(--borders-dividers);
  border-radius: 4px;
  background: var(--main-background);
  max-height: 148px;
  overflow-y: auto;
  padding: 4px 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--primary-text);
  cursor: pointer;
  line-height: 1.4;
  user-select: none;
}

.checkbox-item:hover {
  background: var(--soft-primary);
}

.checkbox-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--deep-primary);
  cursor: pointer;
  margin: 0;
}

/* Filter actions (Search + Clear) - inside filter-body so they
   collapse with the panel on mobile */
.filter-actions {
  display: flex;
  gap: 10px;
  padding: 18px 0 20px;
  margin-top: 18px;
  border-top: 1px solid var(--borders-dividers);
  align-items: center;
}

/* Shared button styles for search pages */
.btn-primary {
  height: 40px;
  padding: 0 26px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--deep-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--primary-accent);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--deep-primary);
  outline-offset: 2px;
}

.btn-secondary {
  height: 40px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary-text);
  background: var(--main-background);
  border: 1.5px solid var(--borders-dividers);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--secondary-text);
  color: var(--primary-text);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--primary-accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus {
  color: var(--primary-accent);
  text-decoration-thickness: 2px;
}

/* ── Results ── */
.search-results {
  display: none;
}

.search-results.is-visible {
  display: block;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.results-count {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--secondary-text);
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-row label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-text);
  white-space: nowrap;
}

.sort-row select {
  height: 36px;
  padding: 0 28px 0 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--primary-text);
  background: var(--main-background);
  border: 1.5px solid var(--borders-dividers);
  border-radius: 4px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2352606d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.sort-row select:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(4, 123, 193, 0.15);
}

/* ── Result cards ── */
.results-list {
  border: 1px solid var(--borders-dividers);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.result-card {
  border-top: 1px solid var(--borders-dividers);
}

.result-card:first-child {
  border-top: none;
}

.result-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--main-background);
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}

.result-summary:hover {
  background: var(--soft-primary);
}

.result-summary[aria-expanded="true"] {
  background: var(--light-surface);
}

.result-summary:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -2px;
}

.result-toggle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--primary-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-accent);
  margin-top: 2px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.result-summary[aria-expanded="true"] .result-toggle {
  background: var(--deep-primary);
  border-color: var(--deep-primary);
  color: #ffffff;
}

.result-toggle svg {
  transition: transform 0.2s ease;
}

.result-summary[aria-expanded="true"] .result-toggle svg {
  transform: rotate(45deg);
}

.result-primary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-id-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.result-id {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--deep-primary);
}

.result-date {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--secondary-text);
}

.result-filename {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary-text);
  line-height: 1.4;
}

/* Expanded detail panel */
.result-detail {
  display: none;
  padding: 14px 18px 16px 56px;
  background: var(--light-surface);
  border-top: 1px solid var(--borders-dividers);
}

.result-detail.is-open {
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
}

.detail-field.full {
  grid-column: 1 / -1;
}

.detail-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-text);
  display: block;
  margin-bottom: 3px;
}

.detail-value {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.5;
}

.detail-value a {
  color: var(--deep-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Results footer (count + pagination) ── */
.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════
   RESPONSIVE - Search pages
   ════════════════════════════════════════*/
@media (max-width: 720px) {

  /* Show the mobile toggle, hide nothing else */
  .filter-toggle-btn {
    display: flex;
  }

  .filter-grid,
  .filter-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .filter-field.span-2 {
    grid-column: 1;
  }

  .date-pair {
    grid-template-columns: 1fr;
  }

  .date-selects {
    grid-template-columns: 1fr 1fr;
  }

  .results-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-detail {
    padding-left: 18px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-field.full {
    grid-column: 1;
  }

  .results-footer {
    flex-direction: column;
    align-items: center;
  }
}

/* ── Collapsible info section ──

   For supplementary notices (e.g. Translation Policy) that should
   be available but shouldn't compete with the search form for
   attention. Same open/close interaction as .prose details, just
   styled to sit naturally among the search page components.
*/

.info-section {
  border: 1px solid var(--borders-dividers);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.info-section[open] {
  padding-bottom: 0.125rem;
}

.info-section>summary {
  list-style: none;
  cursor: pointer;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--deep-primary);
  background: var(--main-background);
}

.info-section>summary::-webkit-details-marker {
  display: none;
}

.info-section>summary:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: -2px;
}

.info-section>summary::before {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--deep-primary);
  border-bottom: 2px solid var(--deep-primary);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-top: -2px;
}

.info-section[open]>summary::before {
  transform: rotate(45deg);
  margin-top: 2px;
}

.info-section>summary h2 {
  font: inherit;
}

.info-section-body {
  padding: 1rem 1.25rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--primary-text);
}

.info-section-body p {
  margin: 0 0 0.75rem;
}

.info-section-body p:last-child {
  margin-bottom: 0;
}

.info-section-body h3 {
  margin: 1.25rem 0 0.5rem;
}

.info-section-body h3:first-child {
  margin-top: 0;
}

.info-section-body h4 {
  margin: 1rem 0 0.5rem;
}

.info-section-body ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.5rem;
}

.info-section-body li {
  margin-bottom: 0.375rem;
}

.info-section-body li:last-child {
  margin-bottom: 0;
}

.info-section-body a {
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-sections {
  margin-top: 1rem;
}

.upcoming-hearings {
  margin-top: 2rem;
  margin-bottom: 1rem;
}


.info-section-body .legal-indent-1 {
  margin-left: 1.5rem;
}

.info-section-body .legal-indent-2 {
  margin-left: 1.5rem;
}

.info-section-body .legal-indent-1 p {
  margin-bottom: 0.5rem;
}

.info-section-body .legal-indent-2 p {
  margin-bottom: 0.35rem;
}

.info-section-body .legal-indent-2 p:last-child {
  margin-bottom: 0.5rem;
}

/* popup defs */
.def-wrap {
  display: inline-flex;
  align-items: center;
}

.def-icon-wrap {
  position: relative;
  display: inline-flex;
}

.def-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--secondary-text);
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.def-trigger:hover {
  color: var(--primary-accent);
}

.def-trigger:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.def-trigger[aria-expanded="true"] {
  color: var(--primary-accent);
  background: var(--soft-primary);
}

.def-trigger svg {
  pointer-events: none;
}

.def-popover {
  display: none;
  position: fixed;
  z-index: 500;
  width: 260px;
  max-width: calc(100vw - 48px);
  background: var(--main-background);
  border: 1px solid var(--borders-dividers);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(5, 20, 40, 0.15);
  padding: 12px 14px;
}

.def-popover.is-open {
  display: block;
}

.def-popover-term {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--deep-primary);
  margin-bottom: 4px;
}

.def-popover-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--primary-text);
}

.def-popover-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  filter: drop-shadow(0 2px 1px rgba(5, 20, 40, 0.06));
}

.def-popover-arrow.arrow-down {
  top: 100%;
  border-top-color: var(--main-background);
}

.def-popover-arrow.arrow-up {
  bottom: 100%;
  border-bottom-color: var(--main-background);
}


@media (max-width: 480px) {
  .def-popover {
    width: 220px;
  }
}

/* paging */

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn.current {
  background: var(--deep-primary);
  border-color: var(--deep-primary);
  color: #ffffff;
  cursor: default;
}

/* award/decision */

.filter-direct {
  padding-bottom: 20px;
  margin-bottom: 8px;
  max-width: 50%;
}

@media (max-width: 720px) {
  .filter-direct {
    max-width: 100%;
  }
}

/* or divider */

.filter-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--secondary-text);
  width: fit-content;
  font-style: italic;
  /* key — doesn't stretch full width on desktop */
}

.filter-or-divider::before,
.filter-or-divider::after {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--borders-dividers);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .filter-or-divider {
    width: 100%;
    justify-content: center;
  }

  .filter-or-divider::before,
  .filter-or-divider::after {
    flex: 1;
    width: auto;
  }
}


/* ── Skip to main content ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--deep-primary);
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--secondary-accent);
  outline-offset: 2px;
}

/* ── Notification banner ── */
.notification-banner {
  background: #fbbfc1;
  color: var(--primary-text);
  width: 100%;
}

/* ── Notification banner ── */
.notification-banner {
  background: #fbbfc1;
  color: #7a0c0e;
  width: 100%;
}

.notification-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.notification-banner-content {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: left;
}

.notification-banner-content p {
  margin: 0;
  color: #7a0c0e;
}

.notification-banner-content hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  margin: 8px 0;
}

.notification-banner-content a {
  color: #7a0c0e;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.notification-banner-content a:hover {
  text-decoration-style: solid;
}

.notification-banner-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1.5px solid #7a0c0e;
  border-radius: 4px;
  color: #7a0c0e;
  cursor: pointer;
  transition: opacity 0.15s;
  opacity: 0.5;
}

.notification-banner-close:hover {
  opacity: 1;
}

.notification-banner-close:focus-visible {
  outline: 2px solid #7a0c0e;
  outline-offset: 2px;
}

.notification-banner.is-dismissed {
  display: none;
}

.nav-link--split {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link--split a {
  color: inherit;
  text-decoration: none;
}

.nav-link--split a:hover {
  color: inherit;
}

.nav-chevron-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
  color: inherit;
}

.nav-chevron-btn:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}


/* ── Search No results ── */
.search-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--secondary-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-empty strong {
  color: var(--primary-text);
}