:root {
  --paper: #f3f0e8;
  --field: #faf8f4;
  --ink: #1f1c17;
  --muted: #5e584e;
  --line: #ddd6c8;
  --accent: #8f3d12;
  --accent-ink: #faf8f4;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body, p, h1 { margin: 0; }

main {
  max-width: 68rem;
  margin-inline: auto;
  padding: 3.5rem 1.5rem 5rem;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1.2;
}

.lead { margin-bottom: 0.5rem; }

.resolver-note {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

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

#domains-help {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

textarea {
  display: block;
  width: 100%;
  min-height: 12rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  resize: vertical;
  border: 1px solid var(--muted);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-family: var(--mono);
}

textarea::placeholder { color: var(--muted); }

button {
  min-height: 2.75rem;
  padding: 0.65rem 1.35rem;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button[aria-disabled="true"] {
  background: color-mix(in srgb, var(--accent) 45%, var(--paper));
  color: color-mix(in srgb, var(--accent-ink) 45%, var(--paper));
  cursor: default;
}

:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#result:has(> :not(.progress:empty)) { margin-top: 2.5rem; }

#result > * + *, .skipped p + p, #notes p + p { margin-top: 0.75rem; }

.skipped { overflow-wrap: anywhere; }
.progress, .missing, .error, #notes { color: var(--muted); }
.visually-hidden, .progress:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.error { font-style: italic; }

.outage {
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--field);
}

.outage [role="alert"] { font-weight: 600; }
.outage p + p, .outage p + button { margin-top: 0.75rem; }

.over-limit {
  color: var(--accent);
  font-weight: 600;
}

.table-scroll {
  max-height: 100vh;
  overflow: auto;
}

/* Measure the space inside the scroller after accounting for its scrollbar. */
.table-width { container-type: inline-size; }

table {
  width: 100%;
  min-width: 44rem;
  border-collapse: separate;
  border-spacing: 0;
}

caption {
  padding-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 650;
  text-align: left;
}

caption:focus { outline-offset: -3px; }

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

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

th:first-child, td:first-child {
  position: sticky;
  left: 0;
}

th:first-child { z-index: 3; }

td:first-child {
  z-index: 1;
  max-width: min(16rem, 45vw);
  overflow-wrap: anywhere;
  background: var(--field);
  font-family: var(--mono);
}

th:nth-child(3), td:nth-child(3) { text-align: right; }

td:nth-child(3) {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

tbody tr:hover > td { background: #ebe6dc; }

#notes:not(:empty) {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

@media (max-width: 816px) {
  button { width: 100%; }
}

@container (width < 44rem) {
  table {
    min-width: 0;
    table-layout: fixed;
  }

  th, td {
    padding-inline: 0.2rem;
    overflow-wrap: anywhere;
    font-size: 0.85rem;
  }

  th:first-child { width: 25%; }
  th:nth-child(2) { width: 15%; }
  th:nth-child(3) { width: 23%; }
  td:nth-child(3) { font-size: 0.8rem; }
}

@media print {
  :root { --paper: white; }
  .table-scroll {
    max-height: none;
    overflow: visible;
  }
  table { min-width: 0; }
  th, th:first-child, td:first-child { position: static; }
  .over-limit { print-color-adjust: exact; }
}
