html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
}

.checker-shell,
.checker-panel,
.results-toolbar {
  min-width: 0;
}

.checker-shell {
  max-width: 1040px;
  margin: 0 auto;
}

.checker-panel {
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 32px rgba(12, 27, 46, 0.06);
}

.checker-panel > h2,
.results-head h2 {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.2;
}

.checker-panel > h2:focus {
  outline: 3px solid rgba(201, 168, 76, 0.45);
  outline-offset: 4px;
  border-radius: 2px;
}

#resultsHeading:focus {
  outline: none;
}

.checker-intro {
  margin-bottom: 1.5rem;
  color: var(--slate);
  line-height: 1.7;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.checker-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.checker-field.full {
  grid-column: 1 / -1;
}

.checker-field label,
.choice-fieldset legend,
.filter-field label,
.search-field label {
  margin-bottom: 0.45rem;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
}

.filter-field label,
.search-field label {
  display: block;
  font-size: 0.82rem;
}

.checker-field select,
.checker-field input,
.working-note,
.filter-field select,
.search-field input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  color: var(--navy);
  font: inherit;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.checker-field select:focus,
.checker-field input:focus,
.working-note:focus,
.filter-field select:focus,
.search-field input:focus {
  outline: 3px solid rgba(201, 168, 76, 0.28);
  border-color: var(--gold);
}

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

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.choice-option {
  position: relative;
}

.choice-option input {
  position: absolute;
  opacity: 0;
}

.choice-option label {
  display: block;
  height: 100%;
  padding: 1.15rem;
  color: var(--navy);
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.choice-option label strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

.choice-option label span {
  display: block;
  color: var(--slate);
  font-size: 0.84rem;
  line-height: 1.5;
}

.choice-option label:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(12, 27, 46, 0.06);
  transform: translateY(-2px);
}

.choice-option input:checked + label {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.choice-option input:focus-visible + label {
  outline: 3px solid rgba(201, 168, 76, 0.4);
  outline-offset: 2px;
}

.field-hint {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.field-hint a,
.checker-intro a {
  color: var(--gold);
  text-underline-offset: 3px;
}

.browser-note {
  padding: 1rem 1.1rem;
  margin: 1.4rem 0 0;
  color: var(--slate);
  font-size: 0.88rem;
  line-height: 1.55;
  background: var(--light);
  border-left: 3px solid var(--gold);
}

.browser-note strong {
  color: var(--navy);
}

.checker-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.checker-actions .btn-primary,
.checker-actions .btn-outline,
.text-button {
  font-family: var(--font-body);
}

.checker-actions .btn-outline,
.text-button {
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
}

.text-button {
  min-height: 44px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-radius: var(--radius);
}

.text-button:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.form-error {
  min-height: 1.4rem;
  margin-top: 0.8rem;
  color: #9f2424;
  font-size: 0.9rem;
  font-weight: 500;
}

.storage-status {
  min-height: 1.3rem;
  margin-top: 0.55rem;
  color: var(--slate);
  font-size: 0.82rem;
}

.results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.results-head p {
  color: var(--slate);
  line-height: 1.6;
}

.summary-progress {
  margin: 1.25rem 0;
}

.summary-progress label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-weight: 500;
}

.summary-progress progress {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: var(--gold);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 1.4rem;
}

.summary-card {
  padding: 0.9rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.summary-card strong {
  display: block;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.summary-card span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.section-nav {
  margin: 1.4rem 0;
}

.section-nav h3 {
  margin-bottom: 0.65rem;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 500;
}

.section-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.section-link {
  display: block;
  padding: 0.75rem 0.85rem;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.section-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.results-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 1.4rem 0;
}

.results-toolbar .checker-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.disclosure-list {
  display: grid;
  gap: 1.25rem;
}

.checklist-section {
  overflow: hidden;
  scroll-margin-top: 90px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.checklist-section[data-section-status="not_applicable"] {
  background: var(--light);
}

.checklist-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.section-heading-wrap {
  flex: 1;
  min-width: 0;
}

.checklist-section-head h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
}

.section-number {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-description {
  margin: 0.45rem 0 0;
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.55;
}

.section-progress {
  margin: 0.55rem 0 0;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
}

.section-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
  max-width: 390px;
}

.section-applicability {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.section-status-button,
.section-toggle {
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  color: var(--navy);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-status-button:hover,
.section-toggle:hover:not(:disabled) {
  border-color: var(--gold);
}

.section-status-button[aria-pressed="true"] {
  font-weight: 500;
  background: var(--gold);
  border-color: var(--gold);
}

.section-status-button[data-section-status="not_applicable"][aria-pressed="true"] {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.section-toggle:disabled {
  color: var(--muted);
  cursor: not-allowed;
  background: var(--light);
}

.section-state-label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.section-body {
  background: var(--white);
}

.requirement-group > h3 {
  padding: 1.2rem 1.35rem 0.55rem;
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
}

.requirement-group + .requirement-group {
  border-top: 1px solid var(--border);
}

.disclosure-item {
  padding: 1rem 1.35rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.disclosure-item:last-child {
  border-bottom: 0;
}

.disclosure-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.requirement-type {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  color: var(--navy);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  background: var(--gold-pale);
  border-radius: 999px;
}

.requirement-type-consider {
  background: var(--light);
}

.requirement-type-judgement {
  background: var(--white);
  border: 1px solid var(--border);
}

.status-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.status-unassessed {
  color: var(--slate);
  background: var(--white);
}

.status-done,
.status-needs_review {
  color: var(--navy);
  background: var(--gold-pale);
  border-color: rgba(201, 168, 76, 0.55);
}

.status-not_applicable {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.requirement-copy {
  margin: 0.65rem 0 0;
  color: var(--navy);
  line-height: 1.65;
}

.status-group {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.75rem;
}

.status-button {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  color: var(--slate);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.status-button:hover {
  border-color: var(--gold);
}

.status-button[aria-pressed="true"] {
  color: var(--navy);
  font-weight: 500;
  background: var(--gold);
  border-color: var(--gold);
}

.status-button[data-item-status="not_applicable"][aria-pressed="true"] {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.status-button:focus-visible,
.section-status-button:focus-visible,
.section-toggle:focus-visible,
.section-link:focus-visible {
  outline: 3px solid rgba(201, 168, 76, 0.5);
  outline-offset: 2px;
}

.note-details {
  margin-top: 0.35rem;
}

.note-details summary {
  display: inline-block;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-underline-offset: 3px;
}

.note-details[open] summary {
  margin-bottom: 0.65rem;
}

.note-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 500;
}

.working-note {
  min-height: 70px;
  line-height: 1.5;
  resize: vertical;
}

.empty-results {
  padding: 2rem;
  color: var(--slate);
  text-align: center;
  background: var(--light);
  border-radius: var(--radius);
}

.guide-grid,
.related-grid,
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.guide-card,
.related-card,
.source-card {
  padding: 1.3rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.guide-card h3,
.related-card h3 {
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

.guide-card p,
.related-card p,
.source-card {
  color: var(--slate);
  line-height: 1.65;
}

.related-card,
.source-card {
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.related-card:hover,
.source-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.related-card span {
  display: block;
  margin-top: 0.7rem;
  color: var(--gold);
  font-weight: 500;
}

.source-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.source-note {
  max-width: 860px;
  margin: 1.25rem auto 0;
  color: var(--slate);
  line-height: 1.65;
  text-align: center;
}

.faq-accordion {
  display: grid;
  max-width: 880px;
  gap: 0.8rem;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.faq-item summary {
  padding: 1.1rem 1.25rem;
  color: var(--navy);
  font-weight: 500;
  cursor: pointer;
}

.faq-item p {
  padding: 0 1.25rem 1.2rem;
  color: var(--slate);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .guide-grid,
  .related-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .results-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .results-toolbar .checker-actions {
    grid-column: 1 / -1;
  }

  .checklist-section-head {
    display: block;
  }

  .section-controls {
    justify-content: flex-start;
    max-width: none;
    margin-top: 1rem;
  }

  .section-status-button,
  .section-toggle {
    flex: 1;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .service-body {
    padding: 3rem 0;
  }

  .checker-panel {
    padding: 1.15rem;
  }

  .profile-grid,
  .choice-grid,
  .section-links {
    grid-template-columns: 1fr;
  }

  .checker-field.full {
    grid-column: auto;
  }

  .results-head,
  .disclosure-item-header {
    display: block;
  }

  .results-head .checker-actions {
    margin-top: 1rem;
  }

  .status-badge {
    display: inline-block;
    margin-top: 0.55rem;
  }

  .checker-actions .btn-primary,
  .checker-actions .btn-outline,
  .checker-actions .text-button {
    width: 100%;
    justify-content: center;
  }

  .page-hero {
    padding: 3rem 0 2.5rem;
  }
}

@media (max-width: 520px) {
  .results-toolbar {
    grid-template-columns: 1fr;
  }

  .results-toolbar .checker-actions {
    grid-column: auto;
  }

  .section-applicability {
    width: 100%;
  }

  .section-toggle {
    width: 100%;
    flex-basis: 100%;
  }

  .disclosure-item,
  .requirement-group > h3 {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .status-button {
    flex: 1;
    min-width: calc(50% - 0.3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .choice-option label,
  .section-link,
  .related-card,
  .source-card {
    transition: none;
  }
}

@media print {
  nav,
  footer,
  .page-hero,
  .tool-alert,
  .checker-actions,
  .results-toolbar,
  .status-group,
  .section-nav,
  .section-applicability,
  .section-toggle,
  .what-next,
  .guide-section,
  .related-section,
  .faq-section,
  .analytics-consent-panel,
  .cookie-settings-button {
    display: none !important;
  }

  .source-section {
    display: block !important;
  }

  .service-body {
    padding: 0;
  }

  .checker-shell {
    max-width: none;
  }

  .checker-panel {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .checker-panel[hidden] {
    display: none !important;
  }

  #resultsPanel {
    display: block !important;
  }

  .checklist-section[data-section-status="unselected"] {
    display: none !important;
  }

  .checklist-section[data-section-status="not_applicable"] .section-body {
    display: none !important;
  }

  .checklist-section[data-section-status="applicable"] .section-body,
  .disclosure-item[hidden] {
    display: block !important;
  }

  .checklist-section,
  .disclosure-item,
  .source-card {
    break-inside: avoid;
  }

  .working-note {
    min-height: 44px;
    border: 1px solid #999;
  }

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

  .source-grid {
    grid-template-columns: 1fr !important;
  }

  .section-description {
    color: #333;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .results-head {
    display: block;
  }
}
