/* MTD ScopeCheck — mobile-first, print-friendly */

:root {
  --ink: #0b0c0c;
  --muted: #505a5f;
  --border: #b1b4b6;
  --surface: #ffffff;
  --page: #f3f2f1;
  --brand: #1d70b8;
  --brand-dark: #003078;
  --brand-light: #d2e2f1;
  --focus: #ffdd00;
  --ok: #00703c;
  --ok-bg: #cce2d8;
  --warn: #8a1538;
  --warn-bg: #f6d7de;
  --amber: #594d00;
  --amber-bg: #fff7bf;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --max: 40rem;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  background: var(--brand-dark);
  color: #fff;
  padding: 1rem 1.25rem;
}

.site-header__inner {
  max-width: 48rem;
  margin: 0 auto;
}

.site-header__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.site-header p {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  opacity: 0.95;
  max-width: 36rem;
}

main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.panel h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.lede {
  margin: 0 0 1rem;
  color: var(--muted);
}

.field {
  margin-bottom: 1.15rem;
}

.field label,
.field .label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0 0 0.4rem;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
}

input[type="number"],
select {
  width: 100%;
  max-width: 20rem;
  padding: 0.55rem 0.65rem;
  font: inherit;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
}

.input-prefix {
  display: flex;
  align-items: stretch;
  max-width: 20rem;
}

.input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  background: var(--page);
  border: 2px solid var(--ink);
  border-right: 0;
  font-weight: 600;
}

.input-prefix input {
  border-left: 0;
  max-width: none;
  flex: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 0.65rem 1.1rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--page);
}

.note-box {
  background: var(--brand-light);
  border-left: 5px solid var(--brand);
  padding: 0.85rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.975rem;
}

.note-box p {
  margin: 0.4rem 0;
}

.note-box p:first-child {
  margin-top: 0;
}

.note-box p:last-child {
  margin-bottom: 0;
}

#result {
  display: none;
}

#result.is-visible {
  display: block;
}

.result-banner {
  padding: 1rem 1.1rem;
  border-left: 5px solid;
  margin-bottom: 1.25rem;
}

.result-banner--in {
  background: var(--warn-bg);
  border-color: var(--warn);
}

.result-banner--out {
  background: var(--ok-bg);
  border-color: var(--ok);
}

.result-banner--partial {
  background: var(--amber-bg);
  border-color: var(--amber);
}

.result-banner__status {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.result-banner h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.35rem;
}

.result-banner p {
  margin: 0;
}

.meta-grid {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

@media (min-width: 36rem) {
  .meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.meta-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: #fafafa;
}

.meta-card dt {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.meta-card dd {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}


.affiliate {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}

.affiliate__kicker {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.affiliate h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.2rem;
}

.affiliate ul {
  margin: 0.4rem 0 0.75rem;
  padding-left: 1.2rem;
}

.affiliate__card {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
}

.affiliate__card p {
  margin: 0.35rem 0;
}

.affiliate__card p:first-child {
  margin-top: 0;
}

.affiliate__btn {
  display: inline-block;
  text-decoration: none;
  margin-top: 0.2rem;
}

.affiliate__disc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.disclaimer {
  background: #fff;
  border: 3px solid var(--warn);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}

.disclaimer strong {
  display: block;
  color: var(--warn);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.disclaimer p {
  margin: 0.4rem 0;
}

.disclaimer ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
  border-bottom: 0;
}

.checklist input {
  margin-top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.checklist label {
  font-weight: 400;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--page);
  font-weight: 600;
}

.sources {
  font-size: 0.9375rem;
}

.sources ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.sources li {
  margin-bottom: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer__inner {
  max-width: 48rem;
  margin: 0 auto;
}

.site-footer p {
  margin: 0.35rem 0;
}

.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;
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .no-print,
  .actions,
  .skip-link {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .panel {
    box-shadow: none;
    border: 1px solid #999;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #result {
    display: block !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #333;
    word-break: break-all;
  }

  .checklist input {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.site-header__brand {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.faq details {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.75rem 0;
}

.faq details:last-child {
  border-bottom: none;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 0.6rem 0 0.2rem;
}
