:root {
  --ivory: #f4f0e6;
  --paper: #fffdf8;
  --paper-tint: #edf2ed;
  --charcoal: #222b28;
  --muted: #5b6863;
  --forest: #183f32;
  --forest-2: #245b47;
  --petrol: #145f68;
  --line: #cbd3cc;
  --warning: #8a5b14;
  --risk: #9d3f34;
  --shadow: 0 12px 32px rgb(28 50 41 / 8%);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--charcoal);
  background:
    linear-gradient(90deg, rgb(24 63 50 / 3%) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgb(20 95 104 / 3%) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--ivory);
  font: 16px/1.6 "Trebuchet MS", "Gill Sans", sans-serif;
}

a { color: var(--petrol); }
a:visited { color: #5a496d; }
button, input, select { font: inherit; }
button, select, input { min-height: 46px; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #d89a31; outline-offset: 3px; }
.skip-link {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 20; width: auto; height: auto;
  margin: 0; padding: .65rem 1rem; overflow: visible; clip: auto; background: var(--paper);
}

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 1180px; margin: 0 auto; padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgb(24 63 50 / 18%);
}
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--charcoal); text-decoration: none; }
.brand:visited { color: var(--charcoal); }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--forest); color: white; font: 700 1.4rem Georgia, serif;
}
.brand strong, .brand small { display: block; }
.brand small, .method { color: var(--muted); font-size: .78rem; letter-spacing: .03em; }

main { max-width: 1080px; margin: 0 auto; padding: 4rem 1.5rem 6rem; }
.hero { max-width: 820px; margin-bottom: 3rem; }
.eyebrow, .step { color: var(--petrol); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; }
h1, h2, h3 { color: var(--forest); font-family: Georgia, "Times New Roman", serif; line-height: 1.18; text-wrap: balance; }
h1 { max-width: 760px; margin: .5rem 0 1rem; font-size: clamp(2.25rem, 5vw, 3.7rem); font-weight: 500; }
h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { margin-top: 2.5rem; font-size: 1.35rem; }
.lede { max-width: 660px; margin: 0; color: var(--muted); font-size: 1.15rem; }

.scan-panel, .progress-section, .error-section, article {
  background: rgb(255 253 248 / 96%); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(1.25rem, 4vw, 2.5rem);
}
.panel-heading { display: flex; gap: 1.5rem; align-items: baseline; margin-bottom: 2rem; }
.panel-heading p { margin: 0; }
.panel-heading div p { color: var(--muted); }
label, legend { display: block; margin-bottom: .5rem; color: var(--forest); font-weight: 700; }
.url-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; }
input, select {
  width: 100%; border: 1px solid #9eaaa3; border-radius: 7px; background: white;
  color: var(--charcoal); padding: .72rem .85rem;
}
button {
  border: 1px solid var(--forest); border-radius: 7px; padding: .72rem 1.2rem;
  background: var(--forest); color: white; font-weight: 700;
  transition: background-color 160ms ease-out, transform 120ms ease-out;
}
button:hover { background: var(--forest-2); }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .58; }
.secondary-button { background: transparent; color: var(--forest); }
.secondary-button:hover { background: var(--paper-tint); }
.field-help, .legal-note { color: var(--muted); font-size: .88rem; }
.legal-note { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1rem; }
fieldset { border: 0; padding: 0; margin: 1.6rem 0; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.mode-option {
  display: flex; align-items: center; gap: .75rem; min-height: 68px; margin: 0;
  border: 1px solid var(--line); border-radius: 7px; padding: .8rem; background: white; cursor: pointer;
}
.mode-option:has(input:checked) { border-color: var(--forest); background: var(--paper-tint); }
.mode-option input { width: 20px; min-height: 20px; }
.mode-option strong, .mode-option small { display: block; }
.mode-option small { color: var(--muted); font-weight: 400; }

.progress-section, .error-section, article { margin-top: 2rem; }
.progress-track { height: 8px; overflow: hidden; background: #dce3de; border-radius: 4px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--petrol); transition: width 220ms ease-out; }
.progress-steps { display: flex; justify-content: space-between; gap: 1rem; padding: 0; list-style: none; color: var(--muted); font-size: .88rem; }
.progress-steps .active { color: var(--forest); font-weight: 700; }
.error-section { border-color: rgb(157 63 52 / 35%); }

.results-header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.results-header p:last-child { color: var(--muted); }
.reliability { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric { background: var(--paper); padding: 1rem; }
.metric strong { display: block; color: var(--forest); font: 500 1.5rem Georgia, serif; }
.metric span { color: var(--muted); font-size: .85rem; }
.score-section { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.score-section h3 { margin: 0; }
.score-section p { margin: .25rem 0 0; color: var(--muted); }
.global-score { color: var(--forest); font: 500 clamp(2.6rem, 8vw, 5.2rem)/1 Georgia, serif; text-align: right; }
.global-score small { display: block; margin-top: .45rem; color: var(--muted); font: 700 .85rem "Trebuchet MS", sans-serif; text-transform: uppercase; }
.axis-list { border-top: 1px solid var(--line); }
.axis-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) .65fr .65fr 1fr; gap: 1rem; align-items: center; min-height: 70px; border-bottom: 1px solid var(--line); }
.axis-row.profile-highlight { background: linear-gradient(90deg, var(--paper-tint), transparent); }
.axis-row strong { color: var(--forest); }
.axis-score { font: 500 1.35rem Georgia, serif; }
.status { display: inline-flex; align-items: center; width: fit-content; min-height: 28px; padding: .2rem .55rem; border-radius: 999px; background: #e2ebe4; color: var(--forest); font-size: .78rem; font-weight: 700; }
.status.risk { background: #f6e4df; color: var(--risk); }
.status.watch, .status.insufficient { background: #f4ead5; color: var(--warning); }
.status.error { background: #eee; color: #555; }
.issue-list, .recommendation-list, .limit-list { padding-left: 1.2rem; }
.issue-list li, .recommendation-list li, .limit-list li { margin-bottom: .65rem; }
.detail-list details { border-top: 1px solid var(--line); padding: .85rem 0; }
.detail-list details:last-child { border-bottom: 1px solid var(--line); }
.detail-list summary { color: var(--forest); cursor: pointer; font-weight: 700; }
.detail-list code { display: block; overflow-wrap: anywhere; background: #edf1ed; padding: .65rem; font-size: .8rem; }
.downloads { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 2.5rem 0 1.5rem; padding: 1.25rem; background: var(--paper-tint); border: 1px solid var(--line); }
.downloads h3 { margin: 0; }
.downloads p { margin: .25rem 0 0; color: var(--muted); }
.downloads a { display: inline-flex; min-height: 44px; align-items: center; margin: .25rem; padding: .55rem .75rem; border: 1px solid var(--petrol); border-radius: 6px; text-decoration: none; font-weight: 700; }

footer { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
footer p { margin: .2rem 0; }

@media (max-width: 720px) {
  .method { display: none; }
  main { padding-top: 2.5rem; }
  .url-row, .mode-options { grid-template-columns: 1fr; }
  .panel-heading { align-items: flex-start; }
  .reliability { grid-template-columns: 1fr; }
  .score-section, .downloads { align-items: flex-start; flex-direction: column; }
  .global-score { text-align: left; }
  .axis-row { grid-template-columns: 1fr 1fr; padding: .8rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
