:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #172126;
  --muted: #65717a;
  --line: #d9dfdf;
  --accent: #0f7b73;
  --accent-strong: #075e58;
  --accent-soft: #dff3ee;
  --warn: #a96800;
  --warn-soft: #fff2d4;
  --bad: #b73737;
  --bad-soft: #ffe2e2;
  --good: #267449;
  --good-soft: #ddf3e5;
  --shadow: 0 18px 60px rgba(23, 33, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(15, 123, 115, 0.08), transparent 34%),
    linear-gradient(310deg, rgba(169, 104, 0, 0.1), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.search-panel {
  display: grid;
  gap: 28px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.breadcrumb-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 800;
}

.breadcrumb-row a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb-row a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.breadcrumb-row a:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(15, 123, 115, 0.22);
  outline-offset: 4px;
}

.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
}

.breadcrumb-current {
  font-size: 18px;
}

.breadcrumb-separator {
  color: var(--muted);
  font-weight: 700;
}

.intro {
  max-width: 760px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro p {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.domain-form {
  display: grid;
  gap: 10px;
}

.domain-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="text"] {
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #bcc7c7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 123, 115, 0.14);
}

.input-row button {
  min-width: 140px;
  height: 54px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

#domain-help,
.section-heading p,
.empty-note,
.metadata {
  color: var(--muted);
  line-height: 1.5;
}

.utility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.status-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.status-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.status-panel.running .status-dot {
  background: var(--warn);
  animation: pulse 1s ease-in-out infinite;
}

.status-panel.complete .status-dot {
  background: var(--good);
}

.status-panel.error .status-dot {
  background: var(--bad);
}

.status-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-steps[hidden] {
  display: none;
}

.status-step {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.status-step::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b6c0c0;
}

.status-step.running::before {
  background: var(--warn);
  animation: pulse 1s ease-in-out infinite;
}

.status-step.done {
  color: var(--good);
}

.status-step.done::before {
  background: var(--good);
}

.status-step.failed {
  color: var(--bad);
}

.status-step.failed::before {
  background: var(--bad);
}

@keyframes pulse {
  50% {
    transform: scale(1.5);
    opacity: 0.55;
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.result-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.metric-card {
  min-height: 112px;
  padding: 18px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 12px;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.results-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-section {
  overflow: hidden;
}

.result-section.full-width {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: 20px;
}

.section-heading p {
  margin-top: 6px;
  font-size: 14px;
}

.section-status,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.section-status.good,
.badge.good {
  background: var(--good-soft);
  color: var(--good);
}

.section-status.warn,
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.section-status.bad,
.badge.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.section-status.neutral,
.badge.neutral {
  background: #edf1f2;
  color: #405057;
}

.section-body {
  padding: 18px;
}

.record-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.record-table th,
.record-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.record-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.record-table tr:last-child td {
  border-bottom: 0;
}

.record-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.stack-list,
.finding-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.owner-card {
  display: grid;
  gap: 10px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.owner-question {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-transform: uppercase;
}

.owner-card h3 {
  font-size: 22px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.finding-list li {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.finding-title {
  font-weight: 850;
}

.metadata {
  margin-top: 12px;
  font-size: 13px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.link-row a {
  color: var(--accent-strong);
  font-weight: 800;
}

.site-footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .search-panel {
    padding: 24px;
  }

  .input-row,
  .summary-grid,
  .results-layout,
  .owner-grid,
  .status-steps {
    grid-template-columns: 1fr;
  }

  .input-row button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .search-panel {
    gap: 22px;
    padding: 18px;
  }

  h1 {
    font-size: 42px;
  }

  .intro p {
    font-size: 16px;
  }

  .section-heading {
    display: grid;
  }
}
