:root {
  --ink: #17231d;
  --muted: #5b6b62;
  --line: #d7e2d9;
  --canvas: #f6f8f4;
  --paper: #ffffff;
  --leaf: #287a48;
  --leaf-dark: #175b34;
  --leaf-soft: #e7f4e9;
  --pass: #18723e;
  --pass-soft: #e8f5ec;
  --warning: #8b5b00;
  --warning-soft: #fff4d6;
  --failure: #ac2b2b;
  --failure-soft: #fdeaea;
  --unknown: #596776;
  --unknown-soft: #edf0f3;
  --shadow: 0 18px 50px rgb(24 50 34 / 8%);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 10% -10%, #e5f4dc 0, transparent 32rem),
    var(--canvas);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: var(--leaf-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--leaf);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #68a9ff;
  outline-offset: 3px;
}

.shell {
  width: min(1360px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 0.4rem;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid rgb(31 89 52 / 16%);
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 760;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand > span {
  color: var(--leaf);
}

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

main.shell {
  padding-block: 2.25rem 4rem;
}

.tool-header {
  max-width: 64rem;
  margin-bottom: 1.2rem;
}

.tool-header h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
}

.tool-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--leaf-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lookup-form {
  max-width: 64rem;
  padding: 1.25rem;
}

.lookup-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.86rem;
  font-weight: 750;
}

.input-row {
  display: flex;
  gap: 0.65rem;
}

input[type="text"] {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #a8b9ad;
  border-radius: 0.55rem;
  background: white;
  color: var(--ink);
}

input[type="text"]:hover {
  border-color: #718d7b;
}

.button {
  display: inline-flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.15rem;
  border: 0;
  border-radius: 0.55rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.input-row .button {
  flex: 0 0 auto;
}

.button-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.is-loading .button-spinner {
  display: inline-block;
}

.is-loading .button-primary {
  background: #416a50;
  cursor: wait;
}

.submit-status {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.button-primary {
  background: var(--leaf-dark);
  color: white;
}

.button-primary:hover {
  background: var(--leaf);
  color: white;
}

.form-options {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

summary {
  color: var(--leaf-dark);
  font-weight: 700;
  cursor: pointer;
}

.form-options[open] summary {
  margin-bottom: 0.9rem;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.7rem;
}

.section-heading > p {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.history-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--paper);
}

.history {
  max-width: 64rem;
  margin-top: 2.5rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
}

.history-item + .history-item {
  border-top: 1px solid var(--line);
}

.history-item:hover {
  background: #f2f8f2;
}

.history-item strong,
.history-item small {
  display: block;
}

.history-item small {
  margin-top: 0.2rem;
  color: var(--muted);
}

.history-counts,
.section-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.chip.pass {
  background: var(--pass-soft);
  color: var(--pass);
}

.chip.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.chip.failure {
  background: var(--failure-soft);
  color: var(--failure);
}

.chip.indeterminate,
.chip.neutral {
  background: var(--unknown-soft);
  color: var(--unknown);
}

.report-header {
  margin-bottom: 1.5rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.report-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.report-title-row h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(2.2rem, 6vw, 4.3rem);
  overflow-wrap: anywhere;
}

.ascii-domain {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.summary-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  gap: 0.45rem;
}

.summary-number {
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  background: white;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.summary-number strong {
  margin-right: 0.28rem;
  color: var(--ink);
  font-size: 1.08rem;
}

.summary-number.failure {
  border-left: 3px solid var(--failure);
}

.summary-number.warning {
  border-left: 3px solid var(--warning);
}

.summary-number.pass {
  border-left: 3px solid var(--pass);
}

.summary-number.indeterminate {
  border-left: 3px solid var(--unknown);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 2rem;
  margin: 1.7rem 0 0.9rem;
  padding: 0;
}

.report-meta div {
  display: flex;
  gap: 0.42rem;
}

.report-meta dt {
  color: var(--muted);
}

.report-meta dd {
  margin: 0;
  font-weight: 650;
}

.test-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.3rem;
  font-size: 0.87rem;
}

.test-actions form {
  display: inline;
}

.link-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--leaf-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.danger-link {
  color: var(--failure);
}

.notice {
  max-width: 62rem;
  margin: 0.85rem 0 0;
  padding: 0.72rem 0.9rem;
  border-left: 3px solid var(--unknown);
  background: var(--unknown-soft);
  font-size: 0.85rem;
}

.notice-warning {
  border-color: var(--warning);
  background: var(--warning-soft);
}

.section-nav {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  overflow-x: auto;
  gap: 0.35rem;
  margin: 2rem -0.5rem 1rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgb(246 248 244 / 94%);
  backdrop-filter: blur(10px);
}

.section-nav a {
  flex: 0 0 auto;
  padding: 0.5rem 0.72rem;
  border-radius: 0.45rem;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.section-nav a:hover {
  background: white;
}

.report-sections {
  display: grid;
  gap: 1.15rem;
}

.report-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 0.8rem;
  background: var(--paper);
  box-shadow: 0 7px 28px rgb(24 50 34 / 5%);
  scroll-margin-top: 5rem;
}

.status-border-failure {
  border-left-color: var(--failure);
}

.status-border-warning {
  border-left-color: var(--warning);
}

.status-border-pass {
  border-left-color: var(--pass);
}

.status-border-indeterminate,
.status-border-info {
  border-left-color: var(--unknown);
}

.section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.35rem 1.45rem;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.section-number {
  margin: 0 0 0.35rem;
  color: #789081;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.section-header h2 {
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.section-header p:last-child {
  max-width: 62rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.findings {
  display: grid;
}

.finding {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.75rem;
  padding: 0.95rem 1.45rem;
  border-bottom: 1px solid #e7ece8;
}

.status-icon {
  width: 0.68rem;
  height: 0.68rem;
  margin-top: 0.38rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.status-pass .status-icon {
  background: var(--pass);
  color: var(--pass);
  box-shadow: inset 0 0 0 2px white;
}

.status-warning .status-icon {
  border-radius: 2px;
  background: var(--warning);
  color: var(--warning);
  transform: rotate(45deg);
}

.status-failure .status-icon {
  background: var(--failure);
  color: var(--failure);
}

.status-indeterminate .status-icon,
.status-info .status-icon {
  color: var(--unknown);
}

.finding-summary {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 690;
}

.finding-detail,
.remediation {
  max-width: 78rem;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.89rem;
}

.evidence {
  margin-top: 0.5rem;
  font-size: 0.84rem;
}

.evidence ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.evidence li + li {
  margin-top: 0.25rem;
}

code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.data-block {
  padding: 1.2rem 1.45rem 1.45rem;
}

.data-block + .data-block {
  border-top: 1px solid var(--line);
}

.data-block h3 {
  margin-bottom: 0.65rem;
  font-size: 1rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

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

th {
  background: #edf3eb;
  color: #3f5446;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td {
  max-width: 34rem;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: #fafbf9;
}

.empty-state {
  padding: 1.2rem 1.45rem;
  color: var(--muted);
}

.error-panel {
  max-width: 42rem;
  margin: 3rem auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.error-panel h1 {
  margin-bottom: 0;
  font-size: 4rem;
}

.error-panel .button {
  margin-top: 1rem;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 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 (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    max-width: 18ch;
  }

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

  .report-title-row {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 1.2rem, 1360px);
  }

  .tagline {
    display: none;
  }

  main.shell {
    padding-block: 2rem 3.5rem;
  }

  .hero {
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .input-row {
    flex-direction: column;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
  }

  .section-heading,
  .history-item,
  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .section-heading > p {
    text-align: left;
  }

  .history-counts,
  .section-counts {
    justify-content: flex-start;
  }

  .summary-counts {
    width: 100%;
  }

  .report-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-nav {
    margin-top: 1.2rem;
  }

  .section-header,
  .finding,
  .data-block {
    padding-inline: 1rem;
  }

  .table-scroll {
    overflow: visible;
    border: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  tbody {
    display: grid;
    gap: 0.7rem;
  }

  tbody tr {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: white;
  }

  td {
    display: grid;
    grid-template-columns: minmax(5.5rem, 0.38fr) 1fr;
    gap: 0.55rem;
    max-width: none;
    padding: 0.38rem 0;
  }

  td::before {
    color: var(--muted);
    content: attr(data-label);
    font-family: Inter, ui-sans-serif, sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

@media print {
  :root {
    background: white;
  }

  body {
    background: white;
    font-size: 10pt;
  }

  .site-header,
  .site-footer,
  .test-actions,
  .section-nav {
    display: none;
  }

  main.shell {
    width: 100%;
    padding: 0;
  }

  .report-section {
    break-inside: avoid;
    box-shadow: none;
  }

  details {
    display: block;
  }

  details > * {
    display: block;
  }
}
