:root {
  --hamburger-w: 44px;      /* icon width/height */
  --hamburger-gap: 30px;    /* space between burger and logos */
}

body {
    background-color: #051e3d; /* Darker blue (was: #000F47) */
    color: #FFFFFF;
    font-family: Verdana, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 20px; /* Increase font size for body text */
}

/* Visible keyboard focus – accessibility */
:focus-visible {
  outline: 2px solid #abce5b;  /* Pine Tree Key green accent */
  outline-offset: 2px;
}

#content {
    border: 2.5px solid #FFFFFF; /* Maintain border weight at 2.5px */
    border-radius: 8px; /* Elegant rounded corners */
    margin: 20px auto; /* Center the frame horizontally */
    padding: 20px;
    height: auto; /* Allow content to determine height */
    box-sizing: border-box;
    max-width: calc(30px + 10px + 250px + 20px + 800px + 260px); /* Hamburger (30px + 10px padding) + Coat of Arms (250px max) + Margin (20px) + Logo (650px max) + Buffer (260px) */
    min-width: 930px; /* Enforce minimum width to support table */
    width: 100%; /* Allow full width up to max-width */
    overflow-x: hidden;
    overflow-y: visible;
    /* WAS: overflow: visible; */ /* Ensure content is visible */ 
    min-height: 700px; /* Consistent height to match candidate-comparison */
    display: flex;
    flex-direction: column;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #051e3d; /* Match body background for consistency (was: #000F47) */
    color: #FFFFFF;
    font-size: 14px; /* base size */
}

footer .legal {
  font-size: 12px; /* smaller font for legal disclaimer */
}

footer .footer-updates {
  margin-top: 6px;
}

/* Footer disclaimer link styling */
footer .legal a {
  color: #abce5b; /* Pine Tree Key green accent */
  text-decoration: underline;
  transition: color 0.3s ease;
}

footer .legal a:hover {
  color: #cbe97a; /* Slightly lighter green for hover */
  text-decoration: underline;
}

.header-container {
    display: flex;
    flex-direction: column; /* Default to column for mobile */
    align-items: flex-start; /* Align items to the left on mobile */
    padding: 0;
    position: relative; /* For positioning the hamburger */
    width: 100%; /* Full width within #content */
    max-width: 100%; /* Ensure header doesn’t exceed content width */
    margin-bottom: 50px; /* Creates space for the separator line */
}

.header-container::after {
    content: '';
    position: absolute;
    bottom: -35px; /* Positions the line below the header */
    left: -20px; /* Aligns with the padding of the parent #content */
    width: calc(100% + 40px); /* Extends the line to cover the full width, including padding */
    height: 20px; /* Sets the thickness of the separator line */
    background-color: #CCCCCC; /* White color for the line */
    z-index: 1; /* Ensures the line appears above other elements if needed */
}

.logo-group {
    display: flex;
    align-items: center; /* Vertically center */
    justify-content: flex-start; /* Align to left */
    gap: 20px; /* Space between coat of arms and logo */
    margin-left: 170px; /* Shift right to avoid hamburger */
    max-width: calc(250px + 40px + 800px); /* Coat of Arms + Gap + Logo */
}

.coat-of-arms {
    height: 200px; /* Fixed height for coat of arms */
    max-width: 250px; /* Limit width to prevent overflow */
    width: auto; /* Let width scale to maintain aspect ratio */
    object-fit: contain; /* Maintain aspect ratio */
    margin-right: 20px; /* Space between coat of arms and logo */
}

.logo {
    height: 200px; /* Fixed height for logo */
    max-width: 800px; /* Limit width to prevent overflow */
    width: auto; /* Let width scale to maintain aspect ratio */
    object-fit: contain; /* Maintain aspect ratio */
}

nav {
    position: absolute;
    top: 20px; /* Position at the top */
    left: 20px; /* Position in the top-left corner */
    width: auto; /* Allow nav to fit content */
    z-index: 1001; /* Ensure hamburger stays above content */
}

/* Bigger, higher-contrast hamburger */
.hamburger {
  cursor: pointer;
  width: var(--hamburger-w);
  height: var(--hamburger-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;                  /* keeps a good tap target */
  border-radius: 10px;
  background: rgba(255,255,255,0.18);   /* subtle contrast pill */
  transition: background 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border: none;
  position: relative; /* make sure the label is positioned relative to the button */
}

.hamburger:hover,
.hamburger:focus-visible {
  background: rgba(255,255,255,0.28);
}

.hamburger:active {
  transform: scale(0.98);
}

.hamburger span {
  width: 100%;
  height: 4px;                    /* thicker bars (was 3px) */
  border-radius: 2px;
  background-color: #FFFFFF;
  transition: all 0.3s ease;
}

/* Keep logos pushed right the correct amount */
.logo-group {
  margin-left: calc(20px + var(--hamburger-w) + var(--hamburger-gap));
}

/* Mobile keeps the larger icon too; no change needed to your existing transforms */
@media (max-width: 768px) {
  .logo-group { margin-left: 0; } 
}

.hamburger::after {
  content: "Menu";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);      /* a little gap below the icon */
  transform: translateX(-50%);
  font-size: 14px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  white-space: nowrap;
}
.hamburger:hover::after,
.hamburger:focus-visible::after { opacity: .9; }

.nav-menu {
    display: none; /* Hidden by default, controlled by JS (.active) */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFFFFF; /* White background for the menu (desktop) */
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    list-style: none;
    margin: 0;
    z-index: 1000; /* Ensure it’s above content */
}

/* honor [hidden] from JS for assistive tech + CSS */
[hidden] { display: none !important; }

.nav-menu li {
    margin: 5px 0;
}

.nav-menu li a {
    color: #001F5F; /* Dark blue text in menu */
    text-decoration: none;
    display: block; /* Ensure each item is on a separate line */
    padding: 10px 20px; /* Add padding for better click area */
}

.nav-menu li a:hover {
    background-color: #001F5F; /* Dark blue background on hover */
    color: #FFFFFF; /* White text on hover */
}

main {
    flex: 1; /* Allow main to grow and fill remaining space in #content */
}

main p {
    margin-bottom: 15px; /* Reduce from 25px to match the natural flow of Terms/Privacy */
}

.share-buttons {
    position: absolute;
    bottom: 20px; /* Distance from the bottom of the frame */
    right: 20px; /* Distance from the right of the frame */
    display: flex;
    gap: 15px; /* Space between buttons */
    z-index: 10; /* Ensures buttons stay above other content */
    font-size: 16px; /* Adjust this value to your preferred size */
    font-weight: bold;
}

.share-link {
    padding: 10px 10px;
    border-radius: 5px;
    text-decoration: none;
    color: #FFFFFF;
    transition: background-color 0.3s ease; /* Smooth hover effect */
}

.share-link.twitter {
    background-color: #1DA1F2; /* Twitter blue */
}

.share-link.twitter:hover {
    background-color: #0d8cdb; /* Darker blue on hover */
}

.share-link.facebook {
    background-color: #4267B2; /* Facebook blue */
}

.share-link.facebook:hover {
    background-color: #365899; /* Darker blue on hover */
}

/* Container to position the button on the left */
.bmc-container {
    position: absolute;
    bottom: 20px; /* Matches .share-buttons */
    left: 20px; /* Positions it on the left side */
    z-index: 10; /* Matches .share-buttons z-index */
}

/* Style the Buy me a coffee button */
.bmc-button {
    padding: 10px 10px; /* Matches .share-link padding */
    font-size: 16px; /* Matches .share-link font-size */
    font-weight: bold; /* Matches .share-link font-weight */
    background-color: #abce5b; /* Green color, 100% of my other buttons */
    color: #001F5F; /* Blue color, matching the FAQ buttons */
    text-decoration: none;
    border-radius: 5px; /* Matches .share-link */
    transition: background-color 0.3s ease; /* Matches .share-link */
    display: inline-block; /* Ensures proper sizing */
    line-height: 16px; /* Aligns text vertically, matches font-size */
    box-sizing: border-box; /* Ensures padding doesn’t increase size */
}

/* Hover effect */
.bmc-button:hover {
    background-color: #45a049; /* Darker green, similar to .share-link hover */
    color: #FFFFFF;
    text-decoration: none;
}

/* User & Candidate Comparison, Summary, and Results */
.comparison-container {
    max-width: 930px; /* Limit maximum width but allow overflow */
    margin: 0 auto; /* Center it */
    padding: 0; /* No padding, let wrapper handle spacing */
    background-color: #051e3d; /* Match background */
    border: 1px solid #8f8d8d; /* Grey frame border */
    box-sizing: border-box;
    width: 100%; /* Allow full width up to max-width */
    border-radius: 8px; /* Apply rounded corners */
    overflow: hidden; /* Clip the inner content to the rounded edges */
    min-height: 400px; /* Ensure consistent height with white background */
    position: relative; /* For absolute positioning of background */
}

.comparison-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FFFFFF; /* White background to fill space */
    z-index: 0; /* Behind content */
}

/* Tap/keyboard explainer overlay (replaces mobile title-tooltip behavior) */
.ptk-toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.88);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  pointer-events: none; /* don’t block taps */
}

/* Keyboard focus ring without changing row height */
.percentage-cell[data-expl]:focus-visible,
.comparison-match-meta[data-expl]:focus-visible {
  outline: 2px solid #abce5b;
  outline-offset: 1px;
}

/* Optional: keep your % bold but NOT the “Based on…” details */
.results-grid .grid-cell.percentage-cell { font-weight: 400; }
.results-grid .grid-cell.percentage-cell .pct-main { font-weight: 700; }
.results-grid .grid-cell.percentage-cell .pct-sub  { font-weight: 400; }

/* Results page: allow "Awaiting response" to wrap at all sizes */
.results-page .grid-cell.percentage-cell.match-pending{
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-align: left;
}

/* Candidate Comparison page: When the comparison region (table area) has keyboard focus */
.candidate-comparison-page .comparison-container:focus-within {
  border-color: #abce5b; /* PTK green */
  box-shadow: 0 0 0 3px rgba(171, 206, 91, 0.7);
}

/* Results page: highlight the results region when it has keyboard focus */
.results-page .comparison-container:focus-within {
  border-color: #abce5b; /* PTK green */
  box-shadow: 0 0 0 3px rgba(171, 206, 91, 0.7);
}

/* Summary page: highlight the summary region when it has keyboard focus*/
.summary-page .comparison-container:focus-within {
  border-color: #abce5b; /* PTK green */
  box-shadow: 0 0 0 3px rgba(171, 206, 91, 0.7);
}

/* Style for the inner wrapper to handle scrolling */
.comparison-wrapper {
    min-height: 0; /* Allow it to shrink to content height */
    overflow-y: auto; /* Enable vertical scrolling only if needed */
    overflow-x: hidden; /* Prevent horizontal scrolling within wrapper */
    width: 100%;
    height: 100%; /* Fill the container */
    box-sizing: border-box;
    position: relative; /* Ensure content is above background */
    z-index: 1; /* Above the white background */
    /* Custom scrollbar styles */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #8f8d8d #051e3d; /* Updated thumb color to #8f8d8d */
}

.comparison-wrapper::-webkit-scrollbar {
    width: 8px; /* Vertical scrollbar width */
}

.comparison-wrapper::-webkit-scrollbar-track {
    background: #051e3d; /* Match background color */
}

.comparison-wrapper::-webkit-scrollbar-thumb {
    background: #8f8d8d; /* Match thumb color */
    border-radius: 4px;
}

.comparison-wrapper::-webkit-scrollbar-thumb:hover {
    background: #7a7777; /* Lighter shade on hover */
}

/* Table wrapper for consistent height and scroll behavior */
.table-wrapper {
    width: 100%;
    height: auto; /* Ensure it fills the container */
    box-sizing: border-box; /* Ensure padding and borders are included */
}

/* Shared table styling for comparison and summary (default) */
#comparisonTable, #summaryTable {
    width: 100%; /* Fit to .comparison-container width */
    border-collapse: collapse;
    font-size: 16px;
    background-color: #fff; /* Default background: white */
    margin: 0; /* Remove any default margins */
    border-radius: 8px; /* Elegant rounded corners */
    table-layout: fixed; /* Force fixed table layout to respect column widths */
    overflow: hidden; /* Ensure content stays within bounds */
}

/* Specific styles for candidate-comparison.html */
.candidate-comparison-page .comparison-wrapper {
  overflow-x: auto;
  max-width: 100%;
}

/* Specific styles for candidate-comparison.html when using keyboard to focus on comparison table */
.candidate-comparison-page .comparison-wrapper:focus-visible {
  outline: 3px solid #abce5b;    /* your PTK green */
  outline-offset: 0;              /* keep it on the border */
  box-shadow: 0 0 0 3px rgba(171, 206, 91, 0.35);
}

/* Make it look clickable even without "blue link" styling */
.candidate-comparison-page #comparisonTable th a.comparison-header-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Always-visible subtle cue (you can remove if you prefer hover-only) */
.candidate-comparison-page #comparisonTable th a.comparison-header-link {
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
}

/* Stronger cue on hover/focus */
.candidate-comparison-page #comparisonTable th a.comparison-header-link:hover,
.candidate-comparison-page #comparisonTable th a.comparison-header-link:focus-visible {
  border-bottom-style: solid;
}

/* The little icon */
.candidate-comparison-page #comparisonTable th .external-link-icon {
  margin-left: 0.35em;
  font-size: 0.85em;
  opacity: 0.85;
}

/* Match meta under candidate names (Comparison header) — compact, single-line */
.candidate-comparison-page #comparisonTable th .comparison-match-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 500;
  opacity: 0.85;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Base table layout (only affects candidate-comparison page) */
.candidate-comparison-page #comparisonTable {
  border-collapse: separate !important;
  border-spacing: 0;
  width: auto;
  min-width: 100%;
  table-layout: fixed;
}

/* Make widths predictable */
.candidate-comparison-page #comparisonTable th,
.candidate-comparison-page #comparisonTable td {
  box-sizing: border-box;
  min-width: 120px;
  word-wrap: break-word;
}

/* Fixed pixel widths for the first two columns (Statement | Your Response)
   Candidate columns follow, all same width */
.candidate-comparison-page {
  --cmp-stmt: 340px;  /* Statement (Category + Statement) */
  --cmp-col: 120px;   /* Your Response + each candidate column */
}

.candidate-comparison-page #comparisonTable th:nth-child(1),
.candidate-comparison-page #comparisonTable td:nth-child(1) {
  min-width: var(--cmp-stmt);
  max-width: var(--cmp-stmt);
}

.candidate-comparison-page #comparisonTable th:nth-child(2),
.candidate-comparison-page #comparisonTable td:nth-child(2) {
  min-width: var(--cmp-col);
  max-width: var(--cmp-col);
}

.candidate-comparison-page #comparisonTable th:nth-child(n+3),
.candidate-comparison-page #comparisonTable td:nth-child(n+3) {
  min-width: var(--cmp-col);
  max-width: var(--cmp-col);
}

/* Sticky header + sticky first two columns (desktop) */
@media (min-width: 900px) {
  .candidate-comparison-page #comparisonTable thead th {
    position: sticky;
    top: 0;
    z-index: 4;
  }

  .candidate-comparison-page #comparisonTable th:nth-child(1),
  .candidate-comparison-page #comparisonTable td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 3;
    background-color: #ffffff;
  }

  .candidate-comparison-page #comparisonTable th:nth-child(2),
  .candidate-comparison-page #comparisonTable td:nth-child(2) {
    position: sticky;
    left: var(--cmp-stmt);
    z-index: 3;
    background-color: #cce5ff;
  }

  .candidate-comparison-page #comparisonTable thead th:nth-child(1),
  .candidate-comparison-page #comparisonTable thead th:nth-child(2) {
    z-index: 5;
  }
}

/* Mobile landscape (touch devices): keep Statement + Your Response sticky while you scroll sideways */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  /* In landscape, keep the Statement column from eating the whole screen */
  .candidate-comparison-page {
    --cmp-stmt: clamp(240px, 35vw, 320px);
  }

  /* Statement */
  .candidate-comparison-page #comparisonTable th:nth-child(1),
  .candidate-comparison-page #comparisonTable td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 3;
    background-color: #ffffff;
  }

  /* Your Response */
  .candidate-comparison-page #comparisonTable th:nth-child(2),
  .candidate-comparison-page #comparisonTable td:nth-child(2) {
    position: sticky;
    left: var(--cmp-stmt);
    z-index: 3;
    background-color: #cce5ff;
    box-shadow: 2px 0 0 #ddd; /* subtle divider */
  }

  /* Keep the header cells above the body cells */
  .candidate-comparison-page #comparisonTable thead th:nth-child(1),
  .candidate-comparison-page #comparisonTable thead th:nth-child(2) {
    z-index: 5;
  }
}

/* Mobile: narrow Statement so users see a “peek” of column 2 */
@media (max-width: 899px) {
  .candidate-comparison-page {
    --cmp-stmt: min(72vw, 320px);
    --cmp-col: 120px;
  }
}

/* Restore results-grid for results.html */
.results-grid {
    width: 930px; /* Fixed width to match container */
    min-width: 930px; /* Prevent collapse */
    font-size: 16px;
    background-color: #fff;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 558px 372px; /* Explicit column widths */
    border-collapse: collapse;
}

/* Short note under the results table (was underneath the results heading) */
.results-page .content-wrapper p.results-notice {
  font-size: 12px;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  font-style: italic;
  color: #CCCCCC;
  text-align: center;   /* center it */
  text-shadow: none;
}

/* Extra safety: if it’s empty, don’t render spacing */
.results-page .results-notice:empty {
  display: none;
}

/* Styling for candidates who haven't responded yet */
.results-grid .match-pending {
    background: #f5f5f5;
    color: #555 !important;
    font-style: italic;
}

.grid-row {
    display: contents; /* Allows child elements to participate in the grid */
}

.grid-header {
    background: linear-gradient(90deg, #f2f2f2 0%, #e0e0e0 100%);
    position: sticky;
    top: 0;
    z-index: 2;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grid-cell {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    color: #001F5F !important;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Allow wrapping */
    box-sizing: border-box;
}

.grid-cell.candidate-cell {
    width: 100%;
}

.grid-cell.percentage-cell {
    width: 100%;
    background-color: #e0e0ff;
    color: #003087 !important;
    font-weight: bold;
}

.results-grid .match-high {
    background: linear-gradient(90deg, #d4edda 0%, #a3d7a9 100%); /* Green gradient for 80%+ */
    color: #155724 !important; /* Dark green text */
}

.results-grid .match-medium {
    background: linear-gradient(90deg, #fff3cd 0%, #ffeeba 100%); /* Yellow gradient for 50-79% */
    color: #856404 !important; /* Dark yellow text */
}

.results-grid .match-low {
    background: linear-gradient(90deg, #f8d7da 0%, #f5c6cb 100%); /* Red gradient for <50% */
    color: #721c24 !important; /* Dark red text */
}

/* ---- Results controls (sort UI) ---- */
.results-controls {
  max-width: 930px;
  margin: 0 auto 6px;          /* centered; small gap above grid */
  display: flex;
  justify-content: flex-end;   /* right-align the control */
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;                  /* above the white background layer */
}

/* Sticky variant */
.results-controls--sticky {
  position: sticky;
  top: 0;                        /* stick to top of the scrollable area */
  background: #FFFFFF;           /* match the white card */
  padding: 8px 12px;             /* cozy */
  border-bottom: 1px solid #ddd; /* subtle separator from the grid header */
}

.results-page .results-controls label {
  color: #001F5F;              /* Use FFFFFF for it to be readable on dark bg */
  font-size: 14px;
  text-shadow: none;           /* Use text-shadow: 0 1px 1px rgba(0,0,0,0.2); on dark bg*/
}

.results-page .results-controls select {
  font-size: 14px;
  padding: 6px 8px;
  background: #FFFFFF;         /* readable control */
  color: #001F5F;              /* your dark blue */
  border: 1px solid #8f8d8d;   /* match your borders */
  border-radius: 6px;
  cursor: pointer;
}

/* When no percentage is computable */
.percentage-cell.match-none {
  color: #666 !important;
  font-style: italic;
}

/* Optional: screen-reader only utility (if you decide to visually hide labels) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.mobile-tip {
  display: none;
  background: rgba(171, 206, 91, 0.12);
  border-left: 4px solid #abce5b;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 14px;
  color: #FFFFFF;
  text-shadow: none;
}

@media (max-width: 930px) {
  .mobile-tip { display: block; }
    /* Results page: prevent the 930px-wide grid from being clipped on “in-between” widths */
  .results-page .comparison-wrapper {
    overflow-x: auto; /* scroll as a fallback */
  }

  .results-page .results-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr 200px;
  }
}

/* Optional: style when no percentage can be computed (dup guard retained) */
.percentage-cell.match-none {
  color: #666 !important;
  font-style: italic;
}

/* Adjust column widths for #summaryTable (3 columns: Statement | Your Choice | Weight) */
#summaryTable {
    width: 100%;
    table-layout: fixed;
}

#summaryTable th:nth-child(1), #summaryTable td:nth-child(1) {
    width: auto;
}

#summaryTable th:nth-child(2), #summaryTable td:nth-child(2) {
    width: 170px;
    text-align: center;
}

#summaryTable th:nth-child(3), #summaryTable td:nth-child(3) {
    width: 86px;
    min-width: 86px;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

#summaryTable th:nth-child(3) {
    white-space: nowrap; /* keeps “Weight” on one line */
}

#comparisonTable th, #summaryTable th {
    background: linear-gradient(90deg, #f2f2f2 0%, #e0e0e0 100%); /* Subtle gradient for headers */
    position: sticky;
    top: 0; /* Stick to top of container */
    z-index: 2; /* Ensure header stays above tbody */
    font-weight: 600; /* Slightly bolder for emphasis */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Reinforce specific colors for headers and cells */
#comparisonTable th, #comparisonTable td,
#summaryTable th, #summaryTable td {
    border: 1px solid #ddd;
    padding: 12px 15px; /* Increased padding for elegance */
    text-align: left;
    color: #001F5F !important; /* Force dark blue text */
    font-size: 16px;
    white-space: normal; /* Allow wrapping */
    overflow: hidden;
    overflow-wrap: break-word; /* Ensure long words break */
    box-sizing: border-box;
}

/* Adjust column-specific colors for consistency */
#comparisonTable th:nth-child(2), #summaryTable th:nth-child(2) {
    background-color: #cce5ff; /* Light blue background */
    color: #003087 !important; /* Darker blue text for contrast */
    font-weight: bold; /* Bold for header only */
}

#comparisonTable td:nth-child(2), #summaryTable td:nth-child(2) {
    background-color: #cce5ff; /* Light blue background */
    color: #003087 !important; /* Darker blue text for contrast */
    font-weight: normal; /* Regular weight for cells */
}

#comparisonTable td.match {
    background-color: #d4edda; /* Light green */
    color: #155724 !important; /* Dark green text for contrast */
}

#comparisonTable td.mismatch {
    background-color: #f8d7da; /* Light red */
    color: #721c24 !important; /* Dark red text for contrast */
}

/* Custom Checkbox Styling for Weight Column */
#summaryTable td:nth-child(3) {
    padding: 8px;
    text-align: center;
}

#summaryTable input[type="checkbox"] {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    margin: 0;
}

#summaryTable .checkbox-label {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #ffffff !important;
    border: 2px solid #003087 !important;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#summaryTable input[type="checkbox"]:checked + .checkbox-label {
    background-color: #d4edda !important;
    border-color: #155724 !important;
}

#summaryTable input[type="checkbox"]:checked + .checkbox-label::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #155724 !important;
    font-size: 14px;
    font-weight: bold;
}

#summaryTable .checkbox-label:hover {
    background-color: #e0e0ff !important;
}

/* Summary table: category label inside the statement cell (hidden on desktop) */
.summary-page #summaryTable .mobile-category,
.candidate-comparison-page #comparisonTable .mobile-category {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.85;
}

/* Survey Page Styling for Category and Statement */
#question-container {
    max-width: 930px; /* Match comparison-container width */
    margin: 0 auto; /* Center it */
    padding: 0;
    background-color: #f5f5f5; /* Very light grey */
    border: 1px solid #8f8d8d; /* Grey frame border */
    border-radius: 8px; /* Rounded corners */
    overflow: hidden; /* Clip content to rounded edges */
    box-sizing: border-box;
    min-height: 400px; /* Match comparison-container height */
    position: relative; /* For positioning buttons */
    display: flex;
    flex-direction: column; /* Stack children vertically */
}

#question-container h2 { /* Category */
    width: 100%; /* Full width across the top */
    padding: 12px 15px;
    margin: 0;
    background: linear-gradient(90deg, #d0d0d0 0%, #a0a0a0 100%); /* darker grey gradient */
    color: #001F5F !important;
    font-size: 20px; /* Your chosen size */
    font-weight: 600;
    border-bottom: 1px solid #ddd; /* Separate from content below */
    box-sizing: border-box;
    text-align: center; /* Center the category text */
}

#question-container p { /* Statement */
    width: 100%; /* Full width below category */
    padding: 12px 15px 12px 30px; /* Top: 12px, Right: 15px, Bottom: 12px, Left: 30px */
    margin: 0;
    background-color: #f5f5f5; /* Very light grey to match container*/
    color: #001F5F !important;
    font-size: 24px; /* Your chosen size, larger than Category */
    font-weight: normal; /* Regular weight for statement */
    box-sizing: border-box;
    flex-grow: 1; /* Allow statement to take available space */
    text-align: left; /* Explicitly keep statement left-aligned */
}

#question-container .response-buttons {
    width: 100%; /* Full width for buttons */
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f5f5f5; /* Very light grey to match container*/
    position: absolute;
    bottom: 20px; /* Keep buttons at the bottom */
    left: 0;
}

/* Buttons on index.html */
.survey-buttons {
    display: flex;
    justify-content: center; /* Center the group of buttons horizontally */
    gap: 20px; /* Space between the two buttons */
    margin: 20px 0; /* Vertical spacing above and below the button group */
}

/* Center buttons on summary.html, results.html, and candidate-comparison.html */
.summary-page .content-wrapper button,
.results-page .content-wrapper button,
.candidate-comparison-page .content-wrapper button {
    display: block; /* Ensure the button behaves as a block element */
    margin: 20px auto; /* Center horizontally with top/bottom spacing */
    width: fit-content; /* Ensure the button width adjusts to its content */
}

/* Candidate comparison: keep the bottom action buttons side-by-side */
.candidate-comparison-page .comparison-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px auto; /* replaces the per-button margin */
}

/* Override the "display:block" rule inside the button group */
.candidate-comparison-page .content-wrapper .comparison-actions button {
  display: inline-block;
  margin: 0;
  width: auto;
}

/* FAQ Container Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto; /* Remove top and bottom margins, center only horizontally */
    padding: 0; /* Ensure no padding here */
    background-color: #051e3d; /* Match background */
    border: 1px solid #8f8d8d; /* Grey frame border */
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px; /* Apply rounded corners */
    overflow: hidden; /* Clip the inner content to the rounded edges */
}

/* Ensure all answers start closed and clip overflow (prevents overlay) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #051e3d; /* Match the page background color */
    font-size: 18px; /* Increased font size for better readability */
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9); /* Subtle shadow for better visibility */
    padding: 0; /* Remove horizontal padding from the container */
    width: 100%; /* Ensure it matches the question’s width */
    box-sizing: border-box;
    word-wrap: break-word; /* Ensure long text wraps */
    overflow-wrap: break-word; /* Fallback for older browsers */
    white-space: normal; /* Prevent text from staying on one line */
}

/* When a question is active, allow full expansion (CSS fallback) */
.faq-question.active + .faq-answer {
    max-height: 9999px;
}

/* Style for the inner wrapper to handle scrolling */
.faq-wrapper {
    min-height: 0; /* Allow it to shrink to content height */
    overflow-y: auto; /* Enable vertical scrolling only if needed */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    box-sizing: border-box;
    /* Custom scrollbar styles */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #8f8d8d #051e3d; /* Updated thumb color to #8f8d8d */
}

.faq-wrapper::-webkit-scrollbar {
    width: 8px; /* Vertical scrollbar width */
}

.faq-wrapper::-webkit-scrollbar-track {
    background: #051e3d; /* Match background color */
}

.faq-wrapper::-webkit-scrollbar-thumb {
    background: #8f8d8d; /* Match thumb color */
    border-radius: 4px;
}

.faq-wrapper::-webkit-scrollbar-thumb:hover {
    background: #7a7777; /* Lighter shade on hover */
}

.faq-item {
    padding: 0;
    margin-bottom: 0; /* Ensure no extra margin */
}

.faq-question {
    width: 100%;
    padding: 15px; /* Consistent padding */
    text-align: left;
    background-color: #f1f1f1;
    border: none;
    cursor: pointer;
    font-size: 16px;
    outline: none;
    color: #001F5F; /* Match your site’s dark blue text */
    box-sizing: border-box;
    word-wrap: break-word; /* Ensure long text wraps */
    overflow-wrap: break-word; /* Fallback for older browsers */
    white-space: normal; /* Prevent text from staying on one line */
}

.faq-question:hover {
    background-color: #ddd;
}

.faq-answer p, .faq-answer ul, .faq-answer li {
    margin: 15px; /* Apply margin to paragraphs and lists for consistency */
    padding: 0; /* No padding on paragraphs, lists, or list items */
    color: #FFFFFF; /* White text for contrast */
    font-size: 16px; /* default scale restored */
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* Subtle shadow for better visibility */
    word-wrap: break-word; /* Ensure long words break and wrap */
    overflow-wrap: break-word; /* Fallback for older browsers */
    list-style-position: inside; /* Keep bullets inside the content area */
}

.faq-answer ul {
    padding-left: 0; /* Remove default padding on unordered lists */
}

.faq-answer li {
    margin-bottom: 10px; /* Space between bullet points */
}

.faq-answer strong {
    font-weight: bold; /* Ensure bold is applied */
}

.faq-answer a {
    color: #FFFFFF; /* Ensure links are white to match text */
    text-decoration: underline; /* Add underline for visibility */
    transition: color 0.3s ease; /* Smooth hover transition */
}

.faq-answer a:hover {
    color: #CCCCCC; /* Lighter white on hover for contrast */
    text-decoration: underline; /* Keep underline on hover */
}

/*Wrapper for homepage without buttons*/
.home-page .content-wrapper {
    padding-top: 4rem;
    padding-bottom: 5.7rem;
}

/*Wrapper for homepage with buttons*/
.home-page-active .content-wrapper {
    padding-top: 2rem;
    padding-bottom: 1.95rem;
}

.home-page-active .survey-buttons {
    margin-top: 4rem;  /* space between survey button and text on "live" index page */
}

.home-page-active .share-buttons {
    margin-top: 1rem;
}

.home-page-active .content-wrapper p {
    margin-top: 1rem;     /* space before */
    margin-bottom: 1rem;  /* space after */
    line-height: 1.6;     /* optional: makes paragraphs easier to read */
}

.candidates-page .content-wrapper {
    padding-bottom: 3rem;   /* extra space before the footer */
}

/* Terms & Conditions, Data Privacy, About, and Candidates Styles */
.content-wrapper {
    max-width: 930px;
    min-width: 930px; /* Enforce minimum width */
    margin: 0 auto;
    padding: 20px 20px 0; /* Remove bottom padding to align with FAQ */
    box-sizing: border-box;
    color: #FFFFFF; /* White text to match FAQ answers */
    background-color: #051e3d; /* Dark blue background */
    position: relative; /* For positioning buttons */
}

.content-wrapper h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.content-wrapper h2 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 10px;
}

.content-wrapper h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

.content-wrapper p {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* Subtle shadow for readability */
}

.content-wrapper #lastUpdated {
    font-size: 16px; /* Match paragraph text size */
    margin-bottom: 15px; /* Match margin of other paragraphs */
    color: #FFFFFF; /* Match text color */
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* Match subtle shadow */
}

.content-wrapper ul, .content-wrapper ol {
    margin: 10px 0 15px 20px; /* Indent lists */
    padding-left: 0; /* Remove default padding */
}

.content-wrapper li {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.5;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    list-style-position: inside; /* Keep bullets inside */
}

.content-wrapper a {
    color: #FFFFFF;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.content-wrapper a:hover {
    color: #CCCCCC;
    text-decoration: underline;
}

/* Scrollable Section for Terms & Conditions, Data Privacy, About, and Candidates */
.scrollable-section {
    max-width: 800px; /* Match FAQ container width */
    margin: 0 auto; /* Center it */
    padding: 0; /* Remove padding from outer container */
    background-color: #051e3d; /* Ensure background matches */
    border: 1px solid #8f8d8d; /* Match FAQ border (grey frame) */
    box-sizing: border-box;
    border-radius: 8px; /* Apply rounded corners */
    overflow: hidden; /* Clip the inner content to the rounded edges */
}

.scrollable-wrapper {
    min-height: 0; /* Allow it to shrink to content height */
    overflow-y: auto; /* Enable vertical scrolling only if needed */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    padding: 20px; /* Add spacing between frame and text */
    box-sizing: border-box;
    /* Custom scrollbar styles */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #8f8d8d #051e3d; /* Updated thumb color to #8f8d8d */
}

.scrollable-wrapper::-webkit-scrollbar {
    width: 8px; /* Vertical scrollbar width */
}

.scrollable-wrapper::-webkit-scrollbar-track {
    background: #051e3d; /* Match background color */
}

.scrollable-wrapper::-webkit-scrollbar-thumb {
    background: #8f8d8d; /* Match thumb color */
    border-radius: 4px;
}

.scrollable-wrapper::-webkit-scrollbar-thumb:hover {
    background: #7a7777; /* Lighter shade on hover */
}

.scrollable-section.candidate-section {
  max-height: none; /* Allows for space at the bottom of the scrollable candidate cards by letting the frame grow */
}

.scrollable-section.candidate-section .scrollable-wrapper {
  padding-bottom: 20px; /* keep top/side padding as-is, just give a bit more room at the bottom */
}

/* Candidate detail: statement block – always fully open, white card */
.candidates-page .candidate-statements-section {
  max-width: 960px;                   /* a bit wider to match other content */
  margin: 0 auto 0.75rem auto;        /* smaller gap under the box */
  background-color: #FFFFFF;
  border: 1px solid #8f8d8d;
  border-radius: 8px;

  /* Important: override the generic .scrollable-section overflow */
  overflow: visible;
}

/* Inner wrapper: let page handle vertical scroll, allow horizontal scroll */
.candidates-page .candidate-statements-section .scrollable-wrapper {
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  background-color: #FFFFFF;

  overflow-x: auto;    /* horizontal scroll when table is wider than screen */
  overflow-y: visible; /* no inner vertical scrollbar; use page scroll */
}

/* Candidate Grid and Card Styles */
.candidate-grid {
    display: grid;
    /* Slightly narrower cards so they feel smaller */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* A bit more space between cards */
    gap: 4px;
    /* Extra space around the whole grid inside the section */
    margin: 16px 8px 16px;
}

.candidate-card {
    background-color: #073763;
    border: 1px solid #8f8d8d;
    border-radius: 8px;
    /* Slightly tighter inside = visually smaller card */
    padding: 12px;
    /* Space around each card (top, right, bottom, left) */
    margin: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.candidate-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Deeper shadow on hover */
}

.candidate-image {
    width: 100%;
    height: auto;
    max-height: 200px; /* Limit image height */
    object-fit: cover; /* Maintain aspect ratio */
    border-radius: 4px; /* Slight rounding on images */
    margin-bottom: 10px;
}

.party {
    font-size: 14px;
    color: #CCCCCC; /* Lighter text for party affiliation */
    margin: 5px 0;
}

.candidate-link {
    display: block;
    margin: 5px 0;
    color: #FFFFFF;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.candidate-link:hover {
    color: #E0E0E0; /* Slightly brighter white on hover */
}

.candidate-link--archived {
  opacity: 0.92;
  text-decoration: none;     /* don’t underline the badge */
  display: flex;             /* badge + text on one line */
  align-items: baseline;
  gap: 10px;                 /* creates gab between text and badge; overwritten by candidate-link-badge and --archived below */
  flex-wrap: wrap;           /* if it must wrap, it wraps cleanly */
}

.candidate-link--archived {
  width: 100%;
}

.candidate-link--archived .candidate-link-badge {
  margin-left: auto;
}

.candidate-link--archived .candidate-link-text {
  text-decoration: underline; /* underline only the text */
}

/* Tiny “Archived” pill */
.candidate-link-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;

  background: rgba(171, 206, 91, 0.16);
  border: 1px solid rgba(171, 206, 91, 0.55);
  color: #abce5b;
}

/* Slightly smaller link text when responses are archived */
.candidate-link--archived {
  opacity: 0.85;
  font-size: 0.9em;
  line-height: 1.25;
}

.candidate-archive-notice {
  margin: 0.6rem auto 0.8rem;
  max-width: 980px;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(171, 206, 91, 0.40);
  background: rgba(171, 206, 91, 0.06);
  border-radius: 8px;
  font-weight: 500;
  font-size: clamp(0.64rem, 0.7vw, 0.70rem);
  opacity: 0.85;
  line-height: 1.35;
  text-align: center;
}

.candidate-detail-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.candidate-detail-title #candidateArchivedBadge {
  margin-left: 0; /* gap handles spacing now */
}

/* Candidate meta + status line */
.candidate-name {
  margin-top: 0;
  margin-bottom: 6px;
}

.candidate-meta {
  font-size: 14px;
  color: #CCCCCC;
  margin: 2px 0 4px;
}

.candidate-meta .meta-label {
  font-weight: 600;
  margin-right: 4px;
}

.candidate-meta .meta-value {
  font-weight: normal;
}

.candidate-scope-note {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #dddddd;
}

.candidate-sources {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.candidate-sources > summary {
  cursor: pointer;
  font-weight: 600;
}

.candidate-sources[open] {
  margin-bottom: 16px;
}

.candidate-sources p,
.candidate-sources ul {
  margin-top: 6px;
}

.election-status-note {
  margin: 12px 0 14px;
  padding: 10px 12px;
  border-left: 4px solid #abce5b;
  background: rgba(171, 206, 91, 0.12);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.45;
}

.election-status-note strong {
  color: #abce5b;
}

.election-status-note--dynamic {
  max-width: 930px;
  margin: 0.5rem auto 0.75rem;
}

.election-status-note--home {
  margin-top: 0.75rem;
}

/* Row with the “Status” badges – uses the same .badge pill style as on Statements */
.candidate-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Optional: tighten spacing so the gap handles layout instead of the default margin */
.candidate-status-line .badge {
  margin-left: 0;
}

/* Wrapper for the candidate sections (Gov, Senate, later US House) */
.candidate-sections {
  max-width: 800px;
  margin: 20px auto 0;
}

/* Header bar inside the scrollable frame */
.scrollable-header {
  padding: 12px 20px;
  border-bottom: 1px solid #8f8d8d;
  background-color: #051e3d;
}

/* Candidate section header: title on the left, chevron button on the right */
.candidate-section-header {
  padding: 12px 20px;
  border-bottom: 1px solid #8f8d8d;
  background-color: #051e3d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.candidate-section-header h2 {
  margin: 0;
}

/* Override global button styles for these header toggles */
.candidate-section-toggle {
  all: unset; /* strip gradient, borders, etc. from the global button rule */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

/* Keyboard focus outline */
.candidate-section-toggle:focus-visible {
  outline: 2px solid #abce5b;
  outline-offset: 2px;
}

/* Chevron indicator – closed by default */
.candidate-section-toggle::after {
  content: "▸";
  font-size: 18px;
  margin-left: 8px;
}

/* Chevron when the section is open */
.candidate-section.is-expanded .candidate-section-toggle::after {
  content: "▾";
}

/* Collapsible body area: height controlled via JS */
.candidate-section-body {
  max-height: 31px;     /* peek height when collapsed */
  overflow-y: auto;    /* allow vertical scrolling */
  overflow-x: hidden;  /* prevent horizontal scroll */
  transition: max-height 0.3s ease;
}

/* Some space between the frames */
.candidate-sections .scrollable-section + .scrollable-section {
  margin-top: 20px;
}

/* (From previous answer – meta + status line) */
.candidate-name {
  margin-top: 0;
  margin-bottom: 6px;
}

.candidate-meta {
  font-size: 14px;
  color: #CCCCCC;
  margin: 2px 0 4px;
}

.candidate-meta .meta-label {
  font-weight: 600;
  margin-right: 4px;
}

.candidate-meta .meta-value {
  font-weight: normal;
}

.candidate-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.candidate-status-line .badge {
  margin-left: 0;
}


/* Elegant Button Styling */
button {
    background: linear-gradient(90deg, #e2e7d0 0%, #abce5b 100%); /* Subtle gradient */
    color: #001F5F;
    border: none;
    padding: 12px 24px; /* Increased padding for better touch area */
    font-size: 18px; /* Slightly larger font */
    font-weight: 600; /* Slightly bolder */
    cursor: pointer;
    margin: 10px 5px; /* Adjusted margin for spacing */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: all 0.3s ease; /* Smooth transitions for hover effects */
    display: inline-block; /* Ensure buttons align properly */
}

@media (hover: hover) and (pointer: fine) {
  button:hover {
    background: linear-gradient(90deg, #b3b3ff 0%, #8080ff 100%); /* Darker gradient on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Deeper shadow on hover */
  }
}

/* Tap/commit feedback for survey buttons (BLUE flash) */
.response-btn.tapped {
    background: linear-gradient(90deg, #b3b3ff 0%, #8080ff 100%);
    transform: scale(0.97);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

/* Finger-held feedback on touch devices */
.response-btn.pressed {
    background: linear-gradient(90deg, #b3b3ff 0%, #8080ff 100%);
    transform: scale(0.98);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Prevent unwanted focus/highlight styles */
.response-btn:focus,
.response-btn:active {
    background: linear-gradient(90deg, #e2e7d0 0%, #abce5b 100%); /* Reset to default */
    outline: none; /* Remove focus outline */
    transform: none; /* Reset transform */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Reset shadow */
}

/* Desktop (PC) Styles */
@media (min-width: 769px) {
    .close-btn {
        display: none; /* Hide close button on desktop */
    }

    .nav-menu {
        width: 300px; /* Fixed width for desktop menu */
        display: none; /* Hidden by default */
    }

    /* NOTE: removed hover-to-open behavior to avoid accidental open in narrow desktop windows */
    /* The menu opens only when JS adds .active */
    .nav-menu.active {
        display: block; /* Visible when active (clicked) */
    }

    /* No transform or opacity animations on desktop */
    .hamburger.active span:nth-child(1),
    .hamburger.active span:nth-child(2),
    .hamburger.active span:nth-child(3) {
        transform: none; /* Reset animations on desktop */
        opacity: 1;
    }

    .header-container {
        flex-direction: row; /* Side-by-side layout on desktop */
        align-items: center; /* Center vertically on desktop */
        justify-content: flex-start; /* Align to left for hamburger + logos */
    }

    .logo-group {
        flex-direction: row; /* Side-by-side logos on desktop */
        justify-content: flex-start; /* Align logos to the left */
        margin-bottom: 0; /* Remove margin below logos on desktop */
    }

    .content-wrapper {
        max-width: 930px; /* Restore content width limit on desktop */
        min-width: 930px; /* Enforce minimum width */
        margin: 0 auto; /* Center the content */
        padding: 20px;
        box-sizing: border-box;
    }

    .faq-container {
        max-height: 400px; /* Ensure consistent height */
        min-height: 0; /* Allow it to shrink to content height */
        overflow: hidden; /* Clip content to rounded corners */
    }

    .faq-wrapper {
        max-height: 400px; /* Ensure consistent height */
        min-height: 0; /* Allow it to shrink to content height */
        overflow-y: auto; /* Keep vertical scrolling */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    /* Webkit (Chrome, Edge, Safari) scrollbar styling */
    .faq-container::-webkit-scrollbar,
    .faq-wrapper::-webkit-scrollbar {
        width: 8px; /* Scrollbar width */
    }

    .faq-container::-webkit-scrollbar-track,
    .faq-wrapper::-webkit-scrollbar-track {
        background: #051e3d; /* Match background color */
    }

    .faq-container::-webkit-scrollbar-thumb,
    .faq-wrapper::-webkit-scrollbar-thumb {
        background: #FFFFFF; /* White scrollbar thumb */
        border-radius: 4px;
    }

    .faq-container::-webkit-scrollbar-thumb:hover,
    .faq-wrapper::-webkit-scrollbar-thumb:hover {
        background: #CCCCCC; /* Lighter white on hover */
    }

    .scrollable-section {
        max-height: 400px; /* Ensure consistent height */
        min-height: 0; /* Allow it to shrink to content height */
        overflow: hidden; /* Clip content to rounded corners */
    }

    .scrollable-wrapper {
        max-height: 400px; /* Ensure consistent height */
        min-height: 0; /* Allow it to shrink to content height */
        overflow-y: auto; /* Keep vertical scrolling */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    .scrollable-section::-webkit-scrollbar,
    .scrollable-wrapper::-webkit-scrollbar {
        width: 8px; /* Scrollbar width */
    }

    .scrollable-section::-webkit-scrollbar-track,
    .scrollable-wrapper::-webkit-scrollbar-track {
        background: #051e3d; /* Match background color */
    }

    .scrollable-section::-webkit-scrollbar-thumb,
    .scrollable-wrapper::-webkit-scrollbar-thumb {
        background: #FFFFFF; /* White scrollbar thumb */
        border-radius: 4px;
    }

    .scrollable-section::-webkit-scrollbar-thumb:hover,
    .scrollable-wrapper::-webkit-scrollbar-thumb:hover {
        background: #CCCCCC; /* Lighter white on hover */
    }

    .comparison-container {
        max-height: 400px; /* Match .faq-container and .scrollable-section */
        min-height: 400px; /* Ensure consistent height */
        overflow: hidden; /* Clip content to rounded corners */
    }

    .comparison-wrapper {
        max-height: 400px; /* Ensure consistent height */
        min-height: 0; /* Allow it to shrink to content height */
        overflow-y: auto; /* Keep vertical scrolling */
        overflow-x: hidden; /* Prevent horizontal scrolling within wrapper */
    }

    .candidate-comparison-page .comparison-wrapper {
        overflow-x: auto; /* Enable horizontal scrolling for the table */
    }

    .candidate-comparison-page #comparisonTable {
        width: auto; /* Allow table to expand with columns */
        min-width: 100%; /* Ensure it fills the container at minimum */
        display: table; /* Revert to table layout for alignment */
        overflow: visible; /* Allow table to expand */
    }

    .candidate-comparison-page #comparisonTable th,
    .candidate-comparison-page #comparisonTable td {
        min-width: 100px; /* Minimum width for readability */
        box-sizing: border-box; /* Ensure padding doesn’t affect width */
    }

    .candidate-comparison-page #comparisonTable th:nth-child(1),
    .candidate-comparison-page #comparisonTable td:nth-child(1) {
        width: 15%; /* Match Category width from summaryTable */
    }
    
    button {
        padding: 12px 24px; /* Maintain larger padding on desktop */
        font-size: 18px; /* Maintain font size for buttons */
    }
}

/* Small screens + phone landscape: undo desktop min-width behavior */
@media (max-width: 930px) {
  #content {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 10px;
  }

  .content-wrapper {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding: 20px 10px 0;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-group {
    flex-direction: column;
    margin-left: 0;
    width: 100%;
    gap: 20px;
    margin-bottom: 40px;
  }

  .coat-of-arms {
    max-width: 150px;
    width: 100%;
    height: auto;
  }

  .logo {
    max-width: 350px;
    width: 100%;
    height: auto;
  }
}

/* Narrow desktop + landscape tablet/phone: prevent header/logo overflow */
@media (max-width: 1240px) and (min-width: 769px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-group {
    flex-direction: column;
    margin-left: 0;     /* key: stop the right-shift */
    width: 100%;
    max-width: 100%;
    gap: 20px;
    margin-bottom: 40px;
  }

  .coat-of-arms {
    max-width: 150px;
    width: 100%;
    height: auto;
    margin-right: 0;
  }

  .logo {
    max-width: 600px;   /* adjust if you want bigger/smaller */
    width: 100%;
    height: auto;
  }
}

/* Mobile Behavior */
@media (max-width: 768px) {
    #content {
        min-width: 0; /* Allow shrinking on mobile */
        min-height: auto; /* Flexible height for mobile */
        width: 100%;
        max-width: 100%;
        margin: 0;        /* removes the outer “floating frame” gutter */
        padding: 10px;    /* smaller inner gutter (try 0 if you want edge-to-edge) */
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left on mobile */
    }

      /* Because this line was tuned for 20px padding, re-tune it for 10px */
  .header-container::after {
    left: -10px;
    width: calc(100% + 20px);
  }

    .logo-group {
        flex-direction: column;
        margin-left: 0; /* Reset for mobile */
        gap: 20px; /* Smaller gap */
        width: 100%;
        margin-bottom: 40px; /* Gap between header images and separator line */
    }

    .coat-of-arms {
        max-width: 150px; /* Smaller for mobile */
        width: 100%;
        height: auto;
    }

    .logo {
        max-width: 350px; /* Smaller for mobile */
        width: 100%;
        height: auto;
    }

    nav {
        position: absolute;
        top: 20px; /* Keep in top-left corner */
        left: 20px; /* Keep in top-left corner */
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(13px) rotate(45deg); /* Top bar becomes \ */
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0; /* Middle bar disappears */
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-13px) rotate(-45deg); /* Bottom bar becomes / */
    }

    .nav-menu {
        display: none; /* Hidden by default */
        width: 100%;
        height: 100%; /* Full height of viewport */
        background-color: rgba(5, 30, 61, 0.95); /* Semi-transparent dark blue */
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000; /* Above all content */
        padding: 0; /* No padding on container */
        margin: 0; /* No margin */
        box-sizing: border-box; /* Ensure padding doesn’t affect size */
    }

    .nav-menu.active {
        display: flex; /* Show as flexbox when active */
        flex-direction: column; /* Stack items vertically */
        justify-content: center; /* Center vertically */
        align-items: center; /* Center horizontally */
    }

    .nav-menu ul {
        list-style: none; /* Remove default list styling */
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
        justify-content: center; /* Center items vertically within ul */
    }

    .nav-menu li {
        margin: 15px 0; /* Vertical spacing between items */
        padding: 0; /* No extra padding */
        width: auto; /* Fit content */
        text-align: center; /* Center text within each item */
    }

    .nav-menu li a {
        color: #FFFFFF; /* White text for contrast */
        text-decoration: none;
        display: block;
        padding: 15px 20px; /* Larger tap area */
        font-size: 18px; /* Larger text */
        transition: background-color 0.3s ease;
    }

    .nav-menu li a:hover,
    .nav-menu li a:active {
        background-color: #001F5F; /* Dark blue on hover/tap */
    }

    .nav-menu li.close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 0; /* Override margin for close button */
        padding: 0; /* No padding */
    }

    .close {
        background: none;
        border: none;
        font-size: 36px; /* Larger X */
        color: #FFFFFF; /* White X */
        padding: 10px;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .close:hover,
    .close:active {
        color: #FF0000; /* Red on hover/tap */
    }

    button {
        padding: 10px 20px; /* Slightly smaller padding on mobile */
        font-size: 16px; /* Slightly smaller font on mobile */
    }

    .response-btn.tapped {
        background: linear-gradient(90deg, #a1b56b 0%, #7a9e3d 100%);
        transform: scale(0.95);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
    }

    .response-btn:focus,
    .response-btn:active {
        background: linear-gradient(90deg, #e2e7d0 0%, #abce5b 100%);
        outline: none;
        transform: none;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    /* Checkbox styles for mobile */
    #summaryTable td:nth-child(3) {
        padding: 8px;
        text-align: center;
    }

    #summaryTable input[type="checkbox"] {
        width: 0;
        height: 0;
        opacity: 0;
        position: absolute;
        margin: 0;
    }

    #summaryTable .checkbox-label {
        display: inline-block;
        width: 20px;
        height: 20px;
        background-color: #ffffff !important;
        border: 2px solid #003087 !important;
        border-radius: 4px;
        cursor: pointer;
        position: relative;
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    #summaryTable .checkbox-label:hover {
        background-color: #ffffff !important; /* Disable hover on mobile */
    }

    #summaryTable input[type="checkbox"]:checked + .checkbox-label {
        background-color: #d4edda !important;
        border-color: #155724 !important;
    }

    #summaryTable input[type="checkbox"]:checked + .checkbox-label::after {
        content: "✓";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #155724 !important;
        font-size: 14px;
        font-weight: bold;
    }

    /* Results Grid Adjustments (mobile) */
    .results-page .results-grid{
      width: 100% !important;
      max-width: 100%;
      min-width: 0;
      /* Give the right column a stable width so it doesn’t get “skinny” */
      grid-template-columns: minmax(0, 1fr) 120px;
      font-size: 14px;
    }

    .results-page .grid-cell{
      padding: 8px 10px;
      /* Don’t break words mid-word by default */
      overflow-wrap: normal;
      word-break: normal;
    }

    /* Candidate names can wrap normally */
    .results-page .grid-cell.candidate-cell{
      white-space: normal;
    }

    /* Keep the percentage on one line (prevents 94.87 + % wrap) */
    .results-page .grid-cell.percentage-cell{
      white-space: nowrap;
      text-align: center;
    }

    /* Match % + basis line (Results page) — keep rows tight */
    .results-page .grid-cell.percentage-cell .pct-main {
      display: block;
      line-height: 1.1;
    }

    .results-page .grid-cell.percentage-cell .pct-sub {
      display: block;
      margin-top: 2px;
      font-size: 11px;
      line-height: 1.1;
      opacity: 0.85;

      /* prevents wrapping into multiple lines (biggest source of row-height growth) */
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* On wider screens, slightly reduce vertical padding to offset the added line */
    @media (min-width: 769px) {
      .results-page .grid-cell.percentage-cell {
        padding-top: 10px;  /* grid-cell is 12px by default */
        padding-bottom: 10px;
      }
    }

    /* Mobile: keep it readable, but still compact */
    @media (max-width: 768px) {
      .results-page .grid-cell.percentage-cell .pct-sub {
        font-size: 10px;
        margin-top: 1px;
      }
    }

    /* Let “Awaiting response” wrap only at the space, not inside words */
    .results-page .grid-cell.match-pending{
      white-space: normal;
      overflow-wrap: normal;
      word-break: normal;
      text-align: center;
    }

    /* Results controls on mobile - Sticky toolbar*/
    .results-controls {
      max-width: 100%;
      padding: 0 10px;            /* align with your mobile content padding */
      justify-content: flex-end;  /* keep right-aligned */
    }

    .results-page .results-controls label,
    .results-page .results-controls select {
      font-size: 14px;            /* consistent with your mobile text scale */
    }

    #content {
        position: relative; /* Ensure content can be covered by menu */
        z-index: 1; /* Below the menu z-index */
    }

    .content-wrapper {
        min-width: 0; /* Allow shrinking on mobile */
        padding: 10px;
    }

    .bmc-container {
        position: static; /* Remove absolute positioning on mobile */
        margin: 10px auto; /* Center it with spacing */
        text-align: center; /* Center the button */
    }

    .share-buttons {
        position: static; /* Matches mobile behavior */
        margin: 10px auto; /* Center with spacing */
        flex-direction: row; /* Keep horizontal */
        justify-content: center; /* Center the buttons */
        gap: 10px; /* Slightly smaller gap on mobile */
    }

    .share-buttons a {
        font-size: 14px; /* Smaller font on mobile */
    }

    .faq-container {
        max-width: 100%; /* Allow full width on mobile */
        margin: 10px auto; /* Reduce margin for smaller screens */
        padding: 0 10px; /* Add minimal padding to prevent cutoff */
        max-height: none; /* No fixed height on mobile */
        overflow: hidden; /* Clip content to rounded corners */
    }

    .faq-wrapper {
        max-height: none; /* No fixed height on mobile */
        overflow-y: visible; /* No vertical scrolling on mobile */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    .faq-question {
        padding: 10px; /* Reduce padding for mobile */
        font-size: 14px; /* Smaller font size for mobile */
    }

    .faq-answer {
        padding: 0; /* Ensure no extra padding */
    }

    .faq-answer p, .faq-answer ul, .faq-answer li {
        margin: 10px; /* Reduce margin for mobile */
        font-size: 16px; /* Slightly smaller font size for mobile to prevent cutoff */
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); /* Lighter shadow on mobile */
    }

    .faq-answer ul {
        padding-left: 0; /* Ensure no default padding on mobile */
    }

    .faq-answer li {
        margin-bottom: 8px; /* Slightly less space between bullet points on mobile */
    }

    .faq-answer strong {
        font-weight: bold; /* Ensure bold is applied on mobile */
    }

    .faq-answer a {
        color: #FFFFFF; /* Ensure links are white on mobile */
        text-decoration: underline; /* Keep underline for visibility */
    }

    .faq-answer a:hover {
        color: #CCCCCC; /* Lighter white on hover for mobile */
        text-decoration: underline; /* Keep underline on hover */
    }

    .content-wrapper h1 {
        font-size: 20px;
    }

    .content-wrapper h2 {
        font-size: 18px;
    }

    .content-wrapper h3 {
        font-size: 16px;
    }

    .content-wrapper p, .content-wrapper #lastUpdated, .content-wrapper li {
        font-size: 14px;
    }

    .content-wrapper ul, .content-wrapper ol {
        margin-left: 10px;
    }

    .candidate-grid {
        grid-template-columns: 1fr; /* Stack cards vertically on mobile */
    }

    .candidate-card {
        margin: 8px 6px 20px; /* top, sides, bottom */
    }

    .candidate-image {
        max-height: 150px; /* Smaller images on mobile */
    }

    .scrollable-section {
        max-width: 100%; /* Full width on mobile */
        padding: 0; /* Adjust padding for mobile */
        max-height: none; /* No fixed height on mobile */
        overflow: hidden; /* Clip content to rounded corners */
        border: none; /* Remove border on mobile for seamless look */
    }

    .scrollable-wrapper {
        max-height: none; /* No fixed height on mobile */
        overflow-y: visible; /* No vertical scrolling on mobile */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        padding: 10px; /* Adjust padding for mobile */
    }

    .comparison-container {
        min-width: 0; /* Allow shrinking on mobile */
        max-height: none; /* No fixed height on mobile */
        overflow: hidden; /* Clip content to rounded corners */
        border: none; /* Remove border on mobile for seamless look */
    }

    .comparison-wrapper {
        max-height: none; /* No fixed height on mobile */
        overflow-y: visible; /* No vertical scrolling on mobile */
        overflow-x: hidden; /* Prevent horizontal scrolling within wrapper */
    }

    .candidate-comparison-page .comparison-wrapper {
        overflow-x: auto; /* Enable horizontal scrolling on mobile */
    }

    .candidate-comparison-page #comparisonTable {
        width: auto; /* Allow table to expand with columns */
        display: table; /* Revert to table layout for alignment */
        overflow: visible; /* Allow table to expand */
    }

    .candidate-comparison-page #comparisonTable th,
    .candidate-comparison-page #comparisonTable td {
        min-width: 100px; /* Minimum width for readability */
        box-sizing: border-box; /* Ensure padding doesn’t affect width */
    }

    .candidate-comparison-page #comparisonTable th:nth-child(1),
    .candidate-comparison-page #comparisonTable td:nth-child(1) {
        width: 15%; /* Match Category width from summaryTable */
    }

    .candidate-comparison-page #comparisonTable th:nth-child(2),
    .candidate-comparison-page #comparisonTable td:nth-child(2) {
        width: 54%; /* Match Statement width from summaryTable */
    }

    .candidate-comparison-page #comparisonTable th:nth-child(3),
    .candidate-comparison-page #comparisonTable td:nth-child(3) {
        width: 15%; /* Match Your Response width from summaryTable */
    }

    #question-container {
        min-height: 300px; /* Adjust based on longest statement */
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Keeps buttons at bottom */
    }

    #question-container h2 { /* Category on mobile */
        width: 100%; /* Full width on mobile */
        font-size: 18px; /* Slightly smaller than desktop for mobile readability */
        text-align: center; /* Center the category text on mobile */
    }

    #question-container p { /* Statement on mobile */
        width: 100%; /* Full width on mobile */
        font-size: 20px; /* Slightly smaller than desktop, still larger than Category */
        text-align: left; /* Explicitly keep statement left-aligned on mobile */
        padding: 12px 15px 12px 30px; /* Consistent padding */
    }

    #question-container .response-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 8px; /* Smaller gap for mobile */
        padding: 10px; /* Adjust padding for mobile */
        position: relative; /* Remove absolute positioning for better flow */
        bottom: auto;
    }
}

table {
    width: 100%; /* Full width within content-wrapper */
    margin: 20px 0;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border: 1px solid #FFFFFF;
}

/* Statements controls bar */
/* Always-stack layout: selector → buttons → search */
.statements-controls {
  display: grid;
  grid-template-areas:
    "toggle"
    "actions"
    "search";
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  margin: 10px 0 15px;
}

.dataset-toggle { 
  grid-area: toggle; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px; 
  border: 1px solid #8f8d8d; 
  border-radius: 8px; 
  padding: 8px 10px; 
  color: #FFFFFF;
  min-width: 0;
}
.dataset-toggle label { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  white-space: nowrap;  /* keep radio + text together */
}
.dataset-toggle input { margin: 0; }

.statements-actions { 
  grid-area: actions; 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  justify-content: flex-end; 
}

.statements-search { grid-area: search; display: grid; gap: 6px; }
.statements-search label { color: #FFFFFF; font-size: 16px; }

#statementsSearch {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #8f8d8d;
  background: #FFFFFF;
  color: #001F5F;
  font-size: 14px;
}

.badge {
  display: inline-block;
  min-width: 24px;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: #abce5b;
  color: #001F5F;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.badge--active {
  background: #abce5b;
  color: #001F5F;
  border: 1px solid rgba(171, 206, 91, 0.55);
}

.badge--pending {
  background: #d9e4f2;
  color: #1f4263;
  border: 1px solid rgba(120, 145, 175, 0.45);
}

.badge--neutral {
  background: #dfe5ec;
  color: #23384f;
  border: 1px solid rgba(140, 155, 173, 0.45);
}

.badge--archived {
  background: #f5e2a3;
  color: #5a4300;
  border: 1px solid rgba(201, 161, 67, 0.55);
}

.badge--district {
  background: #d7e8ef;
  color: #204a62;
  border: 1px solid rgba(105, 145, 160, 0.45);
}

.badge--cd1 {
  background: #dbeafe;
  color: #0f3d75;
  border: 1px solid rgba(59, 130, 246, 0.45);
  font-weight: 700;
}

.badge--cd2 {
  background: #f3e8ff;
  color: #6b2c91;
  border: 1px solid rgba(168, 85, 247, 0.40);
  font-weight: 700;
}

.badge--cd1::before,
.badge--cd2::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  margin-right: 0.42rem;
  vertical-align: middle;
}

.badge--cd1::before {
  background: #2563eb;
}

.badge--cd2::before {
  background: #9333ea;
}

.badge--na {
  background: #eceff3;
  color: #4a5a6a;
  border: 1px solid rgba(140, 155, 173, 0.35);
}

/* Optional: hide subcategory tags if you want only the statement text */
.sub-tag { display: none; }

/* Statement list inside an answer */
.statement-list {
  margin: 15px 20px;
  padding-left: 0;
  list-style: disc inside;
}
.statement-list li {
  margin-bottom: 10px;
  position: relative;
  color: #FFFFFF;
}
.source-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: #073763;
  color: #FFFFFF;
  padding: 2px 6px;
  border-radius: 6px;
  margin-right: 8px;
}
.permalink {
  margin-left: 8px;
  text-decoration: none;
  color: #FFFFFF;
  opacity: 0.8;
}
.permalink:hover { opacity: 1; }

.sub-label {
  font-weight: 700;
  color: #FFFFFF;          /* matches your white text */
  margin-right: 4px;
}

/* Mobile tweak: stack controls */
@media (max-width: 768px) {
  .statements-controls {
    grid-template-areas:
      "toggle"
      "actions"
      "search";
    grid-template-columns: 1fr;
  }
}

/* ===== Statements page: compact layout (scoped) ===== */
#statementsRoot { --statementsPaneH: 304px; }  /* tweak this to 300/350/etc. */

#statementsRoot h1 { margin-bottom: 8px; }
#statementsRoot #lastUpdated { margin-bottom: 10px; }

/* Controls: stack and tighten spacing */
#statementsRoot .statements-controls {
  display: grid;
  grid-template-areas:
    "toggle"
    "actions"
    "search";
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 8px 0 10px;
  align-items: start;
}

/* Smaller dataset toggle */
#statementsRoot .dataset-toggle {
  grid-area: toggle;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #8f8d8d;
  color: #fff;
  font-size: 14px;
}
#statementsRoot .dataset-toggle label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#statementsRoot .dataset-toggle input { margin: 0; }

/* Smaller buttons */
#statementsRoot .statements-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#statementsRoot .statements-actions button {
  padding: 8px 12px;     /* was 12px 24px */
  font-size: 14px;       /* was 18px */
  border-radius: 6px;    /* a bit tighter */
  margin: 0;             /* remove extra margins */
}

/* Compact search block */
#statementsRoot .statements-search { grid-area: search; display: grid; gap: 4px; }
#statementsRoot .statements-search label { color: #fff; font-size: 13px; }
#statementsRoot #statementsSearch {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 6px;
}

/* Set the scrollable accordion height (like FAQ) */
#statementsRoot .faq-container,
#statementsRoot .faq-wrapper {
  max-height: var(--statementsPaneH);  /* desktop fixed height */
}

/* Slightly tighter group header + badge */
#statementsRoot .faq-question {
  padding: 10px;         /* was 15px */
  font-size: 15px;       /* was 16px */
}
#statementsRoot .badge {
  padding: 1px 6px;
  font-size: 11px;
}

/* Slightly tighter list items */
#statementsRoot .statement-list { margin: 12px 16px; }
#statementsRoot .statement-list li { margin-bottom: 8px; }

/* Mobile: leave heights fluid (no fixed panel) */
@media (max-width: 768px) {
  #statementsRoot .faq-container,
  #statementsRoot .faq-wrapper {
    max-height: none;    /* let it grow on small screens */
  }
}

/* Site-wide default widths for accordions (outside Statements page) */
:not(#statementsRoot) .faq-container,
:not(#statementsRoot) .scrollable-section {
  max-width: 800px;
  width: 100%;
}

/* When printing, show everything and simplify styling */
@media print {
  /* Hide chrome */
  nav, .hamburger, .nav-menu, .statements-controls,
  .share-buttons, .bmc-container, footer, .header-container::after {
    display: none !important;
  }

  body, #content, .content-wrapper {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Remove fixed heights / scrollbars */
  .faq-container, .faq-wrapper,
  .comparison-container, .comparison-wrapper,
  #question-container, #resultsTable, #summaryTable {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Accordion answers fully open */
  .faq-answer {
    max-height: none !important;
    overflow: visible !important;
  }

  /* Cleaner print look */
  .permalink { display: none !important; }
  .badge, .source-tag { background: #eee !important; color: #000 !important; }
  .faq-question { background: #f2f2f2 !important; color: #000 !important; }

  /* Avoid breaking a category across pages */
  .faq-item { break-inside: avoid; page-break-inside: avoid; }
}

/* Fallback for some print preview implementations (e.g., Safari) */
html.printing-statements .faq-container,
html.printing-statements .faq-wrapper,
html.printing-statements .faq-answer {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* clickable link-chain, only on hover/focus */
.statement-list li { position: relative; padding-right: 24px; }
.permalink {
  position: absolute; right: 0; top: 0;
  width: 18px; height: 18px;
  text-decoration: none;
  opacity: 0; transition: opacity .2s;
}
.statement-list li:hover .permalink,
.permalink:focus { opacity: .8; outline: none; }

/* show 🔗 via CSS, keep DOM text empty */
.permalink::before { content: "🔗"; line-height: 18px; font-size: 16px; }
@media print { .permalink { display: none !important; } }

/* ---------- Global skip link (works on all pages where it's present) ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -9999px;               /* park it far above the viewport */
  opacity: 0;                 /* visually hidden by default */
  background: #ffffff;
  color: #001F5F !important;
  padding: 8px 12px;
  border-radius: 6px;
  border: 2px solid #001F5F; /* optional: stronger outline so it doesn't just look like a blank pill */
  text-decoration: none;
  font-size: 14px;
  z-index: 2000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 10px;
  opacity: 1;                 /* and make it visible */
}

/* ---------- Press page layout ---------- */
.press-page .content-wrapper {
  max-width: 930px;
  margin: 0 auto;
}

.press-lede {
  font-size: 16px;
  margin-bottom: 20px;
}

/* Press page: tighter spacing above the tiles */
.press-page .press-lede {
  margin-bottom: 10px;   /* was 20px */
}

.press-page .press-card-grid {
  margin-top: 10px;      /* was 20px */
  margin-bottom: 8px;    /* was 10px */
}

/* Slightly tighter spacing around the "Latest press release" section */
.press-page .press-section {
  margin-top: 22px;      /* was 30px */
  margin-bottom: 16px;
}

/* Top cards */
.press-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 10px;
}

.press-card {
  display: block;
  background-color: #051e3d;
  border-radius: 16px;
  border: 1px solid #ffffff;
  padding: 18px;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.press-card:hover,
.press-card:focus-visible {
  background-color: #073763;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.4);
  outline: none;
}

.press-card-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.press-card-text {
  margin: 0;
  font-size: 14px;
}

/* Flip-style content swap inside press cards */

/* Base faces */
.press-card-front,
.press-card-back {
  transition: opacity 0.2s ease, max-height 0.2s ease;
}

/* Desktop / larger screens: show front by default, back on hover/focus */
@media (min-width: 769px) {
  .press-card-back {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }

  .press-card:hover,
  .press-card:focus-within {
    background-color: #073763; /* keep your existing hover feel */
  }

  .press-card:hover .press-card-front,
  .press-card:focus-within .press-card-front {
    opacity: 0;
    max-height: 0;
    pointer-events: none;           /* NEW: don’t intercept clicks when hidden */
  }

  .press-card:hover .press-card-back,
  .press-card:focus-within .press-card-back {
    opacity: 1;
    max-height: 500px;              /* big enough to show contents */
    pointer-events: auto;           /* NEW: make the back clickable */
  }

}

/* On mobile: just show everything (no flip, simpler + no hover) */
@media (max-width: 768px) {
  .press-card-front,
  .press-card-back {
    opacity: 1;
    max-height: none;
  }
}

/* --- Press tiles: more compact default height --- */

.press-section {
  margin-top: 15px;
  margin-bottom: 16px; /* a little tighter above/below the grid */
}

.press-card-grid {
  gap: 14px;           /* slightly smaller gaps between tiles */
}

/* Compact press cards */
.press-card {
  padding: 6px 10px;  /* less top/bottom padding than before */
  min-height: 80px;   /* lower floor so cards start shorter */
}

/* Slightly tighter title + text spacing */
.press-card-title {
  margin-top: 0;
  margin-bottom: 6px;  /* was larger; this pulls content up a bit */
  font-size: 18px;     /* still readable but a touch more compact */
}

.press-card-text {
  margin: 4px 0 6px;   /* reduce blank space between lines/paragraphs */
  font-size: 15px;
}


/* Sections */
.press-section {
  margin-top: 30px;
}

/* Contact list */
.press-contact-list {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}
.press-contact-list li {
  margin-bottom: 6px;
}

/* Assets list */
.press-assets-list {
  list-style: disc inside;
  margin: 10px 0 5px 0;
  padding-left: 0;
}
.press-asset-note {
  display: inline-block;
  font-size: 14px;
  margin-left: 4px;
  color: #CCCCCC;
}
.press-small-note {
  font-size: 14px;
}

/* Latest press release block */
.press-meta {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #CCCCCC;
}

/* Links below the scrollable release */
.press-links-below {
  margin-top: 10px;
  font-size: 14px;
}

/* Keep press links clearly underlined */
.press-page .content-wrapper a {
  text-decoration: underline;
}

/* Latest press release block meta text */
.press-meta {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #CCCCCC;
}

/* Main scrollable card for the press page */
.press-main-scroll {
  max-width: 800px;  /* matches About/FAQ cards */
  margin: 0 auto;
}

/* mmm */

/* Press Page Frame */
.press-page #content {
  min-height: 0;          /* no forced 700px floor */
  padding-bottom: 4px;    /* already small, keep it tight */
}

/* Slightly tighter padding for the main text area on this page */
.press-page .content-wrapper {
  padding-top: 12px;      /* was 20px */
  padding-bottom: 8px;    /* was 20px */
}

/* Tighten spacing around headings/sections */
.press-page .content-wrapper h1 {
  margin-top: 10px;       /* was 20px */
  margin-bottom: 10px;    /* was 20px */
}

.press-page .press-lede {
  margin-bottom: 8px;     /* was 10–20px in various rules */
}

/* Tiles: slightly smaller and closer together */
.press-page .press-card-grid {
  margin-top: 6px;        /* was 10px */
  margin-bottom: 6px;     /* was 8–10px */
  gap: 10px;              /* was 14–16px */
}

.press-page .press-card {
  padding: 6px 8px;       /* was 6px 10px */
  min-height: 70px;       /* was 80px */
}

/* “Latest press release” section spacing */
.press-page .press-section {
  margin-top: 18px;       /* was 22–30px */
  margin-bottom: 12px;    /* was 16px */
}

.press-page .press-meta {
  margin-bottom: 6px;     /* was 10px */
}

/* === Latest press release: collapsible white card (desktop expands on hover/click) === */

.press-page .press-release-scroll {
  max-width: 800px;                 /* align with About/FAQ width */
  margin: 0 auto;
  background-color: #FFFFFF;        /* white card */
  border: 1px solid #8f8d8d;
  border-radius: 8px;

  /* Collapsed height on desktop – matches other 400px frames */
  max-height: 170px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Inner wrapper: no scroll limit here; the outer card handles the animation */
.press-page .press-release-scroll .scrollable-wrapper {
  max-height: none;
  overflow: visible;
  padding: 1.25rem 1.5rem;          /* same padding you had before */
  box-sizing: border-box;
}

/* Expand on hover or keyboard focus – desktop only */
@media (min-width: 769px) {
  .press-page .press-release-scroll:hover,
  .press-page .press-release-scroll:focus-within {
    max-height: 2000px;             /* big enough to show the whole release */
  }
}

/* On mobile, just show the full release (no hover behavior) */
@media (max-width: 768px) {
  .press-page .press-release-scroll {
    max-height: none;
    overflow: visible;
  }
}

/* Typography inside the release card: dark text on white, no shadow */

.press-page .press-release-scroll h3,
.press-page .press-release-scroll h4,
.press-page .press-release-scroll p,
.press-page .press-release-scroll li {
  color: #001F5F;                   /* dark blue text */
  text-shadow: none;
  font-size: 16px;
}

.press-page .press-release-scroll h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 10px;
}

.press-page .press-release-scroll h4 {
  font-size: 16px;
  margin-top: 16px;
  margin-bottom: 6px;
}

/* Desktop: compact latest press release card,
   expands on hover for mouse, and fully on focus for keyboard */
@media (min-width: 769px) {
  .press-page .press-release-scroll {
    max-height: 170px;       /* your compact height */
    overflow: hidden;        /* hide the rest of the text */
    transition: max-height 0.25s ease;
  }


  /* Keyboard / screen reader users: full text when focused */
  .press-page .press-release-scroll:focus-within {
    max-height: none;        /* let it grow to full height */
  }
}

/* Links inside the release: dark + underlined */

.press-page .press-release-scroll a {
  color: #001F5F;
  text-decoration: underline;
}

.press-page .press-release-scroll a:hover {
  color: #003087;
}

/* Candidate detail: statement block behaves like the press release card */
.candidates-page .candidate-statements-section {
    max-width: 800px;                 /* align with FAQ / press width */
    margin: 0 auto 1.5rem auto;
    background-color: #FFFFFF;
    border: 1px solid #8f8d8d;
    border-radius: 8px;

    /* collapsed height on desktop */
    max-height: 170px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Inner wrapper: white background, no extra scroll-limit here */
.candidates-page .candidate-statements-section .scrollable-wrapper {
    background-color: #FFFFFF;
    max-height: none;
    overflow-y: auto;
    padding: 20px;
}

/* On desktop: expand on hover or focus */
@media (min-width: 769px) {
    .candidates-page .candidate-statements-section:hover,
    .candidates-page .candidate-statements-section:focus-within {
        max-height: 2000px;   /* big enough to show the full table */
    }
}

/* On mobile: just show the full block, no hover behavior */
@media (max-width: 768px) {
    .candidates-page .candidate-statements-section {
        max-height: none;
        overflow: visible;
    }
}



/* Inner wrapper handles scrolling; no height animation */
/*
.press-page .press-release-scroll .scrollable-wrapper {
  max-height: 170px;
  overflow-y: auto;
}
*/  

/* No hover expansion – keep the same height */
/*
@media (min-width: 769px) {
  .press-page .press-release-scroll:hover,
  .press-page .press-release-scroll:focus-within {
    max-height: 170px;
  }
} 
*/

/* --- Candidate detail page (per-candidate statements) --- */

.candidate-detail-page .content-wrapper {
  max-width: 960px;
}

/* Lede under the H1 */
.candidate-detail-lede {
  margin-bottom: 1.2rem;
}

/* Reuse press-card grid but allow wrapping nicely on smaller widths */
.candidate-detail-page .candidate-meta-grid {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.candidate-detail-page .candidate-meta-card {
  cursor: default;
}

.candidate-detail-page .candidate-meta-body {
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

/* Slightly softer note + disclaimer text */
.candidate-detail-note,
.candidate-disclaimer-text {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* White box around the statement table – visually similar to press release card */
.candidate-detail-page .candidate-statements-block {
  margin-top: 1.5rem;
}

.candidate-detail-page .candidate-statements-intro {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* Statement-level source links on candidate detail pages */
.candidate-detail-page .candidate-statement-source {
  margin-top: 0.25rem;
  padding: 0.35rem 0.75rem;
  border-left: 3px solid #abce5b;
  border-radius: 4px;
  background: rgba(171, 206, 91, 0.08);
  font-size: 0.85rem;
  line-height: 1.35;
}

.candidate-detail-page .candidate-statement-source strong {
  font-weight: 700;
}

.candidate-detail-page .candidate-statement-source a {
  color: #001F5F;
  font-weight: 700;
  text-decoration: underline;
}

.candidate-detail-page .candidate-statement-source a::after {
  content: " ↗";
  font-size: 0.85em;
}

/* White block around statement table – behaves like press release card */
/* Candidate Statements Detail – white box always fully open */
.candidate-detail-page .candidate-statements-scroll {
  max-width: 960px;
  margin: 0 auto 0.75rem auto;
  background-color: #ffffff;
  border: 1px solid #8f8d8d;
  border-radius: 8px;

  /* No height limit, no clipping */
  max-height: none;
  overflow: visible;
}

/* Inner wrapper: padding only; let the page handle scrolling */
.candidate-detail-page .candidate-statements-scroll .scrollable-wrapper {
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  background-color: #ffffff;
  max-height: none;
  overflow: visible;
}

/* Desktop: no hover animation – keep it fully open */
@media (min-width: 769px) {
  .candidate-detail-page .candidate-statements-scroll:hover,
  .candidate-detail-page .candidate-statements-scroll:focus-within {
    max-height: none;
  }
}

/* Mobile: unchanged – card is open and uses page scroll */
@media (max-width: 768px) {
  .candidate-detail-page .candidate-statements-scroll {
    max-height: none;
    overflow: visible;
  }
}

/* Notes column: allow a bit more width on larger screens */
.candidate-detail-page #candidateStatementsTable th:nth-child(4),
.candidate-detail-page #candidateStatementsTable td:nth-child(4) {
  min-width: 220px;
}

/* Make long notes wrap nicely */
.candidate-notes-cell {
  white-space: normal;
  word-break: break-word;
}

/* Candidate detail: make the statement table readable */
.candidate-detail-page #candidateStatementsTable th,
.candidate-detail-page #candidateStatementsTable td {
    color: #001F5F !important;      /* PTK dark blue text */
    background-color: #FFFFFF;
    border-color: #8f8d8d;          /* soften the white border */
}

.candidate-detail-page #candidateStatementsTable th {
    font-weight: 600;
}

/* Zebra striping for readability */
.candidate-detail-page #candidateStatementsTable tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Candidate Statements Detail – rounded white block */
.candidate-detail-page .candidate-statements-scroll {
  border-radius: 8px;      /* adjust to 8px / 16px if you prefer */
  overflow: hidden;         /* clip inner content to the rounded corners */
}

/* Make sure the inner wrapper doesn't visually square the corners */
.candidate-detail-page .candidate-statements-scroll .scrollable-wrapper {
  border-radius: 8px;
}



/* Layout for archive cards (always one per row) */
.press-archive-grid {
    display: grid;
    gap: 1.75rem;
    margin-top: 2rem;
    grid-template-columns: 1fr;          /* one card per line on all widths */
}

/* Card styling – match FAQ frame, dark text on light background */
.press-release-card {
    background-color: #FFFFFF;           /* white card on dark page */
    border: 1px solid #8f8d8d;           /* same grey as FAQ frames */
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    color: #001F5F;                      /* dark blue text inside the card */
}

/* Title + toggle button */
.press-card-title {
    margin: 0 0 0.5rem;
}

/* Full-width green toggle button (override global button gradient) */
.press-toggle {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;

    /* Use background, not background-color, to kill the gradient */
    background: #abce5b;                 /* Pine Tree Key green */
    color: #001F5F;                      /* dark blue text for contrast */
    border: 1px solid #8f8d8d;
    border-radius: 6px;

    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

/* + / – indicator on the right */
.press-toggle::after {
    content: "+";
    float: right;
    font-size: 1.1em;
}

.press-toggle[aria-expanded="true"]::after {
    content: "–";
}

/* Focus outline for keyboard users */
.press-toggle:focus-visible {
    outline: 2px solid #abce5b;
    outline-offset: 2px;
}

/* Meta line under the heading (location, “For immediate release”, etc.) */
.press-archive-grid .press-meta {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.9rem;
    color: #4b5563;                      /* medium grey, readable on white */
}

/* Body text inside the press cards */
.press-card-body {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #001F5F;                      /* make sure it’s dark, not inherited white */
}

.press-card-body p + p {
    margin-top: 0.75rem;
}

/* Links inside archive cards: dark and underlined */
.press-release-card a {
    color: #001F5F;
    text-decoration: underline;
}

.press-release-card a:hover {
    color: #003087;
}

/* Candidate detail: table styling on candidate-statements.html */
.candidates-page #candidateStatementsTable {
  border-collapse: collapse;
  width: 100%;
}

/* Base cell styling: make text visible and slightly smaller than body */
.candidates-page #candidateStatementsTable th,
.candidates-page #candidateStatementsTable td {
  color: #001F5F !important;  /* PTK dark blue */
  background-color: #FFFFFF;
  border: 1px solid #8f8d8d;
  font-size: 18px;            /* regular table text */
  line-height: 1.4;
}

/* Column headers: same size as your h2 (e.g. "Candidate profile", "Statement responses") */
.candidates-page #candidateStatementsTable thead th {
  font-size: 20px;
  font-weight: 600;
}

/* Zebra striping – apply to the cells, not just the row */
.candidates-page #candidateStatementsTable tbody tr:nth-child(even) td {
  background-color: #f7f9ff;  /* light blue; adjust if you want */
}

/* Notes column: a bit wider and allowed to wrap nicely */
.candidates-page #candidateStatementsTable td:nth-child(4),
.candidates-page #candidateStatementsTable th:nth-child(4) {
  min-width: 220px;
}

.candidates-page .candidate-notes-cell {
  white-space: normal;
  word-break: break-word;
}


/* --- Press archive: keep cards white on hover/click --- */

.press-release-card {
  background-color: #FFFFFF;   /* default: white */
  color: #001F5F;              /* dark blue text */
}

.press-release-card:hover,
.press-release-card:focus-within,
.press-release-card:active {
  background-color: #FFFFFF;   /* stay white on hover/click */
  color: #001F5F;              /* keep text dark */
}

/* Links below the release: keep compact */
.press-page .press-links-below {
  margin-top: 4px;        /* was 6–10px */
  font-size: 13px;
}

.press-links-below {
  margin: 6px auto 0;          /* small top margin; center the whole strip */
  font-size: 13px;             /* smaller than body text */
  display: flex;
  justify-content: flex-start; /* links aligned left within the strip */
  align-items: center;
  gap: 8px;                    /* spacing between elements */
  width: fit-content;          /* shrink to content so it can be centered */
  text-align: left;
}

.press-links-separator {
  opacity: 0.8;
}

.press-link {
  white-space: nowrap;         /* keeps each link on one line where possible */
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .press-card-grid {
    grid-template-columns: 1fr;
  }

  .press-card {
    padding: 14px;
  }

  .press-card-title {
    font-size: 16px;
  }

  .press-card-text,
  .press-lede,
  .press-small-note,
  .press-meta,
  .press-links-below {
    font-size: 14px;
  }

    /* Let the press release expand fully on mobile */
  .press-page .press-release-scroll,
  .press-page .press-release-scroll .scrollable-wrapper {
    max-height: none;
  }

  /* Re-add the border just for the press release card on mobile */
  .press-page .press-release-scroll {
    border: 1px solid #8f8d8d;
  }

    .press-links-below {
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;  /* stack the two links */
    text-align: center;
  }

  .press-link {
    white-space: normal;     /* allow normal wrapping on mobile */
  }
}
/* Press page: let the white frame hug the content a bit more */
.press-page #content {
  min-height: 0;        /* remove the 700px floor for this page */
  padding-bottom: 6px; /* slightly tighter bottom padding */
}
.press-page .content-wrapper {
  padding-bottom: 6px;  /* instead of 20px */
  margin-bottom: 0;
}

/* Links below the release: make them sit closer to the bottom */
.press-page .press-links-below {
  margin: 4px auto 0;      /* was 4px or 6px */
  font-size: 13px;
}

/* === Candidate Statements Page Overrides (candidate-statements.html) === */

/* White card around the statement table – similar to press page */
.candidates-page .candidate-statements-section {
  max-width: 960px;
  margin: 0 auto 0.75rem auto;  /* smaller gap under the box */
  background-color: #ffffff;
  border: 1px solid #8f8d8d;
  border-radius: 8px;

  /* collapsed height on desktop */
  max-height: 170px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Inner wrapper: padding + plain white background */
.candidates-page .candidate-statements-section .scrollable-wrapper {
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

/* Desktop: expand card on hover / focus, like press-release block */
@media (min-width: 769px) {
  .candidates-page .candidate-statements-section:hover,
  .candidates-page .candidate-statements-section:focus-within {
    max-height: 2000px; /* big enough for full table */
  }
}

/* Mobile: no collapsing; always show full content */
@media (max-width: 768px) {
  .candidates-page .candidate-statements-section {
    max-height: none;
    overflow: visible;
  }
}

/* Table styling on candidate-statements page */
#candidateStatementsTable {
  border-collapse: collapse;
  width: 100%;
}

/* Cells: dark blue text, light borders, slightly smaller than body text */
#candidateStatementsTable th,
#candidateStatementsTable td {
  color: #001F5F !important;
  background-color: #ffffff;
  border: 1px solid #8f8d8d;
  font-size: 18px;      /* regular table text (body is 20px) */
  line-height: 1.4;
}

/* Column headers: same size as h2 (20px) and bold */
#candidateStatementsTable thead th {
  font-size: 20px;
  font-weight: 600;
}

/* Zebra striping – apply to the cells so it’s actually visible */
#candidateStatementsTable tbody tr:nth-child(even) td {
  background-color: #f7f9ff !important;  /* soft light blue */
}

/* Notes column: slightly wider and allow wrapping */
#candidateStatementsTable th:nth-child(4),
#candidateStatementsTable td:nth-child(4) {
  min-width: 220px;
}

.candidate-notes-cell {
  white-space: normal;
  word-break: break-word;
}

/* Mobile tweaks for candidate statements table */
@media (max-width: 768px) {
  #candidateStatementsTable {
    display: block;          /* helps horizontal scrolling behave consistently */
    overflow-x: auto;
  }

  #candidateStatementsTable thead th {
    font-size: 16px;         /* smaller header text on mobile */
  }

  #candidateStatementsTable tbody td {
    font-size: 14px;         /* smaller body text on mobile */
  }
}

/* === Candidate Statements Page – stacked layout === */

/* White card around the statement list */
.candidates-page .candidate-statements-section {
  max-width: 960px;
  margin: 0 auto 1rem auto;
  background-color: #ffffff;
  border: 1px solid #8f8d8d;
  border-radius: 8px;

  /* Override the generic .scrollable-section clipping */
  overflow: visible;
}

/* Inner wrapper: just padding; let the page scroll normally */
.candidates-page .candidate-statements-section .scrollable-wrapper {
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  background-color: #ffffff;
  overflow: visible;
}

/* List container */
.candidate-statements-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* One block per statement */
.candidate-statement-row {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #d0d0d0;
}

/* Zebra striping on the blocks */
.candidate-statement-row:nth-child(even) {
  background-color: #f7f9ff;
}

/* Typography inside each block */
.candidate-statement-text {
  margin: 0 0 0.25rem 0;
}

.candidate-statement-category {
  font-weight: 600;
}

.candidate-statement-body {
  font-weight: 400;
}

.candidate-statement-stance,
.candidate-statement-note {
  margin: 0;
  font-size: 0.95em;  /* a bit smaller than body text */
}

.candidate-statement-note {
  margin-top: 0.15rem;
}

/* Additional info box under the statement list */
.candidate-additional-info {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 6px;
  border: 1px solid #b0b9e0;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  font-size: 0.95em;
}

.candidate-additional-info h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1em;
  font-weight: 600;
  color: #001f5f;
}

.candidate-additional-info p {
  margin: 0;
  white-space: pre-wrap; /* preserve line breaks from the CSV */
}

/* Intro under "Statement responses" – outside the white box */
.candidate-statements-intro {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* Candidate statements explainer under the heading – blue text outside the box */
.candidate-detail-page .candidate-statements-intro {
  color: #ffffff;   /* white text on blue blue */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* optional, for readability */
}

/* Short divider between statement text and candidate stance */
.candidate-detail-page .candidate-statement-stance {
  margin-top: 0.5rem;      /* add a bit more space above the stance */
  padding-top: 0.4rem;     /* space between the divider and the text */
  text-align: left;        /* keeps the text itself aligned left */
}

.candidate-detail-page .candidate-statement-stance::before {
  content: "";
  display: block;
  width: 70px;                        /* adjust width as desired */
  margin: 0.4rem auto 0.5rem auto;    /* centers the line */
  border-top: 4px dotted #84aaf5;     /* dotted divider in your blue */
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .candidate-statement-row {
    padding: 0.75rem 0.25rem;
  }

  .candidate-statement-text,
  .candidate-statement-stance,
  .candidate-statement-note {
    font-size: 0.9em;
  }
}

/* === Candidate detail – refined statement cards === */

/* Slightly more space between cards on this page */
.candidate-detail-page .candidate-statements-list {
  gap: 1rem;
}

/* Card styling for each statement + response */
.candidate-detail-page .candidate-statement-row {
  padding: 0.9rem 1rem 0.95rem;
  border-radius: 6px;
  border: 1px solid #b0b9e0;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Turn off zebra striping inside the detail view */
.candidate-detail-page .candidate-statement-row:nth-child(even) {
  background-color: #ffffff;
}

/* Statement text at the top of each card */
.candidate-detail-page .candidate-statement-text {
  margin: 0 0 0.45rem 0;
}

.candidate-detail-page .candidate-statement-category {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.candidate-detail-page .candidate-statement-body {
  font-weight: 400;
}

/* Candidate response block */
.candidate-detail-page .candidate-statement-stance,
.candidate-detail-page .candidate-statement-note {
  margin: 0;
  font-size: 0.9em; /*Use 0.95 for slightly larger candidate stance and note font*/
}

/* Main stance: light blue panel with a colored accent bar */
.candidate-detail-page .candidate-statement-stance {
  margin-top: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 4px;
  background-color: #eef3ff;
  border-left: 3px solid #558af3;
}

/* Remove the old dotted divider here */
.candidate-detail-page .candidate-statement-stance::before {
  content: none;
}

/* Optional note: slightly lighter panel, same accent */
.candidate-detail-page .candidate-statement-note {
  margin-top: 0.25rem;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  background-color: #f7fbff;
  border-left: 3px solid #558af3;
}

.candidate-detail-page .candidate-statement-stance strong,
.candidate-detail-page .candidate-statement-note strong {
  font-weight: 600;
}


/* === Candidate Statements Detail Page – stacked layout === */

/* === Candidate Statements Detail Page – always fully open === */

.candidates-page .candidate-statements-shell {
  max-width: 960px;
  margin: 1.5rem auto;
}

.candidates-page .candidate-statements-shell h2 {
  margin: 0 0 0.5rem 0;
}

/* White card around the list */
.candidates-page .candidate-statements-section {
  max-width: 960px;
  margin: 0 auto 0.75rem auto;
  background-color: #ffffff;
  border: 1px solid #8f8d8d;
  border-radius: 8px;

  /* Important: no height limits, no clipping */
  max-height: none;
  overflow: visible;
}

/* Inner wrapper: padding + plain white background; no inner scroll */
.candidates-page .candidate-statements-section .scrollable-wrapper {
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  background-color: #ffffff;
  max-height: none;
  overflow: visible;
}

/* Statement list container */
.candidate-statements-list {
  display: flex;
  flex-direction: column;
}

/* One block per statement */
.candidate-statement-row {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #d0d0d0;
  color: #001F5F;              /* text in PTK dark blue */
  background-color: #ffffff;   /* default row background */
}

/* Zebra striping: every second row gets a light blue background */
.candidate-statement-row:nth-child(even) {
  background-color: #c5cff1;
}

/* Mobile tweaks: slightly smaller text + tighter padding */
@media (max-width: 768px) {
  .candidate-statement-row {
    padding: 0.75rem 0.25rem;
  }

  .candidate-statement-text,
  .candidate-statement-stance,
  .candidate-statement-note {
    font-size: 0.9em;
  }
}


/* Text lines inside each block */
.candidate-statement-text {
  margin: 0 0 0.25rem 0;
}

.candidate-statement-category {
  font-weight: 600;
}

.candidate-statement-body {
  font-weight: 400;
}

.candidate-statement-stance,
.candidate-statement-note {
  margin: 0;
  font-size: 0.95em;  /* slightly smaller than body text */
}

.candidate-statement-note {
  margin-top: 0.15rem;
}

/* Candidate statements: always fully open on desktop + mobile */
.candidates-page .candidate-statements-section {
  max-height: none !important;
  overflow: visible !important;
}

.candidates-page .candidate-statements-section .scrollable-wrapper {
  max-height: none !important;
  overflow: visible !important;
}

/* Ensure keyboard focus is clearly visible on the summary page */
.summary-page a:focus-visible,
.summary-page button:focus-visible,
.summary-page .hamburger:focus-visible {
  outline: 2px solid #abce5b;  /* PTK green */
  outline-offset: 2px;
}

/* Optional: make focused weight checkboxes visually obvious */
.summary-page input[type="checkbox"]:focus-visible + .checkbox-label {
  outline: 2px solid #abce5b;
  outline-offset: 2px;
}

/* Mobile tweaks: slightly smaller text + tighter padding */
@media (max-width: 768px) {
  .candidate-statement-row {
    padding: 0.75rem 0.25rem;
  }

  .candidate-statement-text,
  .candidate-statement-stance,
  .candidate-statement-note {
    font-size: 0.9em;
  }
}

/* Back link under candidate detail */
.candidate-back-link {
  max-width: 800px;
  margin: 0 auto 0.5rem auto;
  text-align: right;
}

.candidate-back-link a {
  color: #abce5b;              /* PTK green */
  text-decoration: underline;
}

.candidate-back-link a:hover,
.candidate-back-link a:focus {
  text-decoration: none;
}

/* Last Updated on Candidates Page */
.candidate-last-updated {
  max-width: 960px;
  margin: 0.5rem auto 0.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #ffffff;
}

/* Candidate detail: ensure text in the white statements block is dark blue */
.candidate-detail-page .candidate-statements-scroll p,
.candidate-detail-page .candidate-statements-scroll li {
  color: #001F5F;  /* dark PTK blue on white background */
}

/* Response source labels: Candidate Provided / Publicly Sourced */
.response-source-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.response-source-badge--candidate-provided {
  background: #abce5b;
  color: #001F5F;
  border: 1px solid rgba(171, 206, 91, 0.55);
}

.response-source-badge--publicly-sourced {
  background: #d9e4f2;
  color: #1f4263;
  border: 1px solid rgba(120, 145, 175, 0.45);
}

/* Results page: source label under candidate name */
.results-page .candidate-cell .response-source-badge {
  margin-top: 3px;
}

/* Candidate comparison page: source label under candidate name */
.candidate-comparison-page #comparisonTable th .comparison-source-meta {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  opacity: 0.9;
  white-space: nowrap;
}

.candidate-comparison-page #comparisonTable th .comparison-source-meta--candidate-provided {
  color: #155724;
}

.candidate-comparison-page #comparisonTable th .comparison-source-meta--publicly-sourced {
  color: #1f4263;
}

/* Results page match cell: keep compact + make subline not bold */
/* .results-page .grid-cell.percentage-cell { }
  /* keep your existing center/nowrap behavior, but don’t let inner lines get weird */
*/

.results-page .grid-cell.percentage-cell .pct-main {
  font-weight: 700;      /* keep % bold */
  line-height: 1.1;
}

.results-page .grid-cell.percentage-cell .pct-sub {
  display: block;
  font-weight: 400;      /* NOT bold */
  font-size: 12px;
  line-height: 1.1;
  opacity: 0.85;

  white-space: nowrap;   /* one line */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fix: allow "Awaiting response" to wrap naturally while keeping it centered */
.results-page .grid-cell.percentage-cell.match-pending {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}

/* Comparison header meta: compact + must NOT expand column width */
.candidate-comparison-page #comparisonTable th {
  overflow: hidden; /* important: allow clipping instead of widening */
}

.candidate-comparison-page #comparisonTable th .comparison-match-meta {
  display: block;
  margin-top: 2px;
  font-size: 10px;       /* smaller so headers stay tight */
  line-height: 1.05;
  font-weight: 500;
  opacity: 0.85;

  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Mobile: remove the outer “floating frame” gutter so content lines up */
@media (max-width: 768px) {
  #content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;      /* removes outside whitespace */
    padding: 10px !important;  /* keep a small inner gutter (use 0 for edge-to-edge) */
    box-sizing: border-box;
  }

  /* Ensure the results/summary white card uses the full available width */
  .comparison-container,
  #resultsTable {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
}

/* Candidate statements: always fully open on desktop */
@media (min-width: 769px) {
  .candidates-page .candidate-statements-section {
    max-height: none !important;
    overflow: visible !important;
  }

  .candidates-page .candidate-statements-section .scrollable-wrapper {
    max-height: none !important;       /* <-- add this line */
    overflow-y: visible !important;
  }

  .candidates-page .candidate-statements-section:hover,
  .candidates-page .candidate-statements-section:focus-within {
    max-height: none !important;
  }
}

/* === FINAL mobile override: align summary/white box === */
@media (max-width: 768px) {
  #content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    box-sizing: border-box;
  }

  .summary-page .content-wrapper,
  .summary-page #summaryTable,
  .summary-page .comparison-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  /* Summary page: Category shown above the statement on all screen sizes */
  .summary-page #summaryTable .mobile-category {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.85;
  }

  /* Summary table (mobile): improve header wrapping + column widths */
  .summary-page #summaryTable {
    width: 100%;
    table-layout: fixed;
  }

  .summary-page #summaryTable th:nth-child(1),
  .summary-page #summaryTable td:nth-child(1) {
    width: auto;
  }

  .summary-page #summaryTable th:nth-child(2),
  .summary-page #summaryTable td:nth-child(2) {
    width: 110px;
    text-align: center;
  }

.summary-page #summaryTable th:nth-child(3),
.summary-page #summaryTable td:nth-child(3) {
  width: 82px;
  min-width: 82px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.summary-page #summaryTable th:nth-child(3) {
  white-space: nowrap; /* keep “Weight” on one line */
}

.summary-page #summaryTable th:nth-child(2),
.summary-page #summaryTable th:nth-child(3) {
  line-height: 1.15;
  padding: 10px 8px;
}

.summary-page #summaryTable td:nth-child(2) {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

    .comparison-wrapper {
    overflow-y: visible !important;
    max-height: none !important;
  }

  /* =========================================================
   2025-12-16: Final table sizing tweaks (Summary + Comparison)
   (Placed at end of file to override earlier, legacy column rules.)
   ========================================================= */

/* ---------- Summary (summary.html) ---------- */
/* Columns: 1=Statement, 2=Your Choice, 3=Weight */

/* Prevent "Weight" from splitting into two lines (all screen sizes) */
.summary-page #summaryTable th:nth-child(3) {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* Desktop/tablet: keep the two right columns stable now that we only have 3 */
@media (min-width: 769px) {
  .summary-page #summaryTable {
    table-layout: fixed;
    width: 100%;
  }

  .summary-page #summaryTable th:nth-child(2),
  .summary-page #summaryTable td:nth-child(2) {
    width: 170px;            /* Your Choice */
    text-align: center;
  }

  .summary-page #summaryTable th:nth-child(3),
  .summary-page #summaryTable td:nth-child(3) {
    width: 86px;             /* Weight */
    min-width: 86px;
    text-align: center;
  }

  .summary-page #summaryTable td:nth-child(3) {
    padding: 8px 6px;
  }
}

/* ---------- Candidate comparison (candidate-comparison.html) ---------- */
/* Adjusted widths for better balance and equal column sizing */
.candidate-comparison-page {
  --cmp-stmt: 300px;   /* Statement (Category+Statement merged) */
  --cmp-col: 150px;    /* Your Response + each candidate column */
}

/* Mobile: leave a “peek” of column 2 so users notice horizontal scrolling */
@media (max-width: 899px) {
  .candidate-comparison-page {
    --cmp-stmt: min(72vw, 320px);
    --cmp-col: 140px;
  }
}

/* Force all columns (Your Response + all candidates) to use identical width */
.candidate-comparison-page #comparisonTable th:nth-child(n+2),
.candidate-comparison-page #comparisonTable td:nth-child(n+2) {
  width: var(--cmp-col);
  min-width: var(--cmp-col);
  max-width: var(--cmp-col);
}

.candidate-comparison-page #comparisonTable {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

/* Statement column */
.candidate-comparison-page #comparisonTable th:nth-child(1),
.candidate-comparison-page #comparisonTable td:nth-child(1) {
  width: var(--cmp-stmt);
  min-width: var(--cmp-stmt);
  max-width: var(--cmp-stmt);
}

/* Your Response + ALL candidate columns (force identical widths) */
.candidate-comparison-page #comparisonTable th:nth-child(n+2),
.candidate-comparison-page #comparisonTable td:nth-child(n+2) {
  width: var(--cmp-col);
  min-width: var(--cmp-col);
  max-width: var(--cmp-col);
}

/* Keep header wrapping clean (avoid breaking inside words when possible) */
.candidate-comparison-page #comparisonTable thead th,
.candidate-comparison-page #comparisonTable thead th a {
  white-space: normal;
  overflow-wrap: normal !important;
  word-break: normal !important;
}


/* Mobile: make Statement narrower so a slice of "Your Response" is visible (scroll hint) */
@media (max-width: 899px) {
  .candidate-comparison-page {
    --cmp-stmt: min(72vw, 320px);
    --cmp-col: 125px;
  }
}

  .results-controls,
  .results-grid {
    width: 97% !important;
    max-width: none !important;
  }

    /* =========================================================
    2025-12-16: Candidate-comparison desktop width + header wrap fixes
    Goal: keep long names to ~≤3 lines without changing mobile behavior.
    ========================================================= */

  @media (min-width: 1100px) {
    .candidate-comparison-page .comparison-container {
      max-width: 1120px;
    }

    .candidate-comparison-page {
      --cmp-stmt: 380px;
      --cmp-col: 180px;
    }
  }

  /* Ensure "Your Response" and ALL candidate columns are identical widths */
  .candidate-comparison-page #comparisonTable th:nth-child(1),
  .candidate-comparison-page #comparisonTable td:nth-child(1) {
    width: var(--cmp-stmt);
    min-width: var(--cmp-stmt);
    max-width: var(--cmp-stmt);
  }

  .candidate-comparison-page #comparisonTable th:nth-child(n+2),
  .candidate-comparison-page #comparisonTable td:nth-child(n+2) {
    width: var(--cmp-col);
    min-width: var(--cmp-col);
    max-width: var(--cmp-col);
  }

  /* Prevent awkward mid-word breaks in candidate header names */
  .candidate-comparison-page #comparisonTable thead th,
  .candidate-comparison-page #comparisonTable thead th a {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
}

/* =========================================================
   FINAL OVERRIDES (desktop header wrapping + in-between results)
   ========================================================= */

/* ---------- Results page: “in-between sizes” (769px–930px) ---------- */
@media (max-width: 930px) and (min-width: 769px) {
  /* stop clipping the fixed 930px grid */
  .results-page .comparison-wrapper { overflow-x: auto; }

  /* make the grid responsive in this range */
  .results-page .results-grid{
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) 130px !important;
  }

  .results-page .grid-cell{
    overflow: visible;
    text-overflow: clip;
  }

  /* allow “Awaiting response” to wrap cleanly */
  .results-page .grid-cell.percentage-cell.match-pending{
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
  }
}

/* ---------- Candidate comparison: stop mid-word breaks + widen desktop cols ---------- */
/* merged structure: 1=Statement, 2=Your Response, 3+=Candidates */
.candidate-comparison-page{
  --cc-stmt: 360px;
  --cc-col: 140px;  /* bump this to 180/190 if you still want wider */
}

/* widen the white box on real desktops */
@media (min-width: 1100px){
  .candidate-comparison-page .comparison-container{
    max-width: 1120px !important;
  }
}

/* widths: col2 + all candidates identical */
.candidate-comparison-page #comparisonTable th:nth-child(1),
.candidate-comparison-page #comparisonTable td:nth-child(1){
  width: var(--cc-stmt) !important;
  min-width: var(--cc-stmt) !important;
  max-width: var(--cc-stmt) !important;
}

.candidate-comparison-page #comparisonTable th:nth-child(n+2),
.candidate-comparison-page #comparisonTable td:nth-child(n+2){
  width: var(--cc-col) !important;
  min-width: var(--cc-col) !important;
  max-width: var(--cc-col) !important;
}

/* THIS is what fixes “Murchiso / n” and “Alexande / r” */
.candidate-comparison-page #comparisonTable thead th,
.candidate-comparison-page #comparisonTable thead th a{
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

/* 2026 archive update */
.archive-ribbon {
  background: #e8f2f2;
  color: #163b43;
  border-left: 4px solid #a9cd5e;
  border-radius: 12px;
  padding: 12px 18px;
  margin: 0 0 18px;
  max-width: 1080px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.archive-ribbon a {color:#175766;text-decoration:underline;}
.archive-button {display:inline-block;background:#175967;color:white!important;text-decoration:none;padding:13px 22px;border-radius:7px;font-weight:600;text-align:center;}
.archive-button:hover,.archive-button:focus-visible {background:#0f3e49;}


/* Archive landing page refinements — 2026-11-03 */
.archive-landing .election-status-note {
  border-radius: 10px;
}
.archive-landing .survey-buttons {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
.archive-landing nav.archive-navigation {
  /* Override the site's global absolutely positioned hamburger nav. */
  position: static;
  inset: auto;
  width: 100%;
  box-sizing: border-box;
  z-index: auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 1.25rem;
}
.archive-landing nav.archive-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 12px;
  font-size: 15px;
  line-height: 1.25;
  border: 1px solid #87a9ae;
  border-radius: 9px;
  background: #173a50;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: background .2s ease, border-color .2s ease;
}
.archive-landing nav.archive-navigation a:hover,
.archive-landing nav.archive-navigation a:focus-visible {
  background: #25536b;
  border-color: #b3d76d;
}
.archive-landing nav.archive-navigation a:focus-visible {
  outline: 3px solid #c6df89;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .archive-landing nav.archive-navigation { flex-direction: column; }
  .archive-landing nav.archive-navigation a { width: 100%; box-sizing: border-box; }
}
