:root {
  --canvas: #f2eee7;
  --surface: #fbf9f5;
  --surface-deep: #e9e1d7;
  --ink: #282725;
  --muted: #6e6962;
  --line: #d9d0c5;
  --leather: #76513c;
  --leather-dark: #543929;
  --moss: #596356;
  --white: #fff;
  --critical: #7d2927;
  --high: #9a4931;
  --medium: #9a6b30;
  --low: #65705d;
  --info: #66717b;
  --shadow: 0 14px 38px rgba(52, 42, 34, 0.07);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
}

a {
  color: var(--leather-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(118, 81, 60, 0.16);
  background: rgba(242, 238, 231, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner,
.page-shell,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.priority-pages,
.detail-finding {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.priority-pages > a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.priority-pages > a:last-child { border: 0; }
.priority-pages strong, .priority-pages small { display: block; }
.priority-pages small { color: var(--muted); font-size: 11px; }

.page-score {
  display: inline-grid;
  min-width: 44px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #e8eee6;
  color: var(--moss);
  font-weight: 800;
  text-decoration: none;
}
.score-poor { background: #f5e6e4; color: var(--critical); }
.score-watch { background: #f6eddc; color: #81571f; }

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.opportunity-grid a {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.opportunity-grid h3 { margin: 15px 0 7px; font-family: Georgia, serif; font-weight: 500; }
.opportunity-grid p, .opportunity-grid small { color: var(--muted); font-size: 12px; }

.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.checklist span { padding: 9px 11px; border-radius: 7px; font-size: 12px; }
.checklist .present { background: #e8eee6; color: var(--moss); }
.checklist .missing { background: #f6eddc; color: #81571f; }
.link-list { max-height: 320px; overflow: auto; padding-left: 20px; font-size: 12px; }
.detail-finding { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; color: var(--ink); text-decoration: none; }
.audit-summary-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.audit-summary-list span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; }

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--leather);
  border-radius: 50%;
  color: var(--leather-dark);
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 6px;
  min-width: 0;
}

nav a {
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

nav a[aria-current="page"] {
  background: var(--surface-deep);
  color: var(--ink);
}

.logout-form {
  margin: 0;
}

.logout-form button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.login-shell {
  min-height: calc(100vh - 300px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 480px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: clamp(32px, 6vw, 46px);
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.login-form label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-form button {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.login-form input {
  min-height: 44px;
}

.page-shell {
  min-height: calc(100vh - 156px);
  overflow-x: clip;
  padding: 64px 0 80px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.overview-heading {
  align-items: center;
  margin-bottom: 28px;
}

.scan-command {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  overflow: hidden;
  margin-bottom: 42px;
  padding: 30px 32px;
  border: 1px solid rgba(118, 81, 60, 0.4);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 12%, rgba(118, 81, 60, 0.16), transparent 36%),
    linear-gradient(135deg, #eee4d8, #f8f4ed 58%);
  box-shadow: 0 20px 50px rgba(52, 42, 34, 0.1);
}

.scan-command::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--leather);
  content: "";
}

.scan-command-intro {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.scan-command h2 {
  font-size: clamp(27px, 4vw, 38px);
}

.scan-command p:not(.eyebrow) {
  max-width: 650px;
  margin: 9px 0 0;
  color: var(--muted);
}

.scan-command form {
  margin: 0;
}

.scan-safety-note {
  grid-column: 1 / -1;
  margin: -20px 0 0 !important;
  font-size: 11px;
}

.scan-button {
  min-width: 235px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 26px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(84, 57, 41, 0.2);
  font-size: 17px;
}

.scan-button small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.76;
}

.scan-command-active {
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 8% 18%, rgba(89, 99, 86, 0.16), transparent 34%),
    linear-gradient(135deg, #eef0e9, #f8f5ef);
}

.scan-command-active::before {
  background: var(--moss);
}

.scan-pulse {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 7px;
  border: 3px solid rgba(89, 99, 86, 0.22);
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 7px rgba(89, 99, 86, 0.08);
}

.scan-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(89, 99, 86, 0.2);
  border-radius: 12px;
  background: rgba(251, 249, 245, 0.74);
}

.scan-progress-grid > div {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid rgba(89, 99, 86, 0.18);
  border-bottom: 1px solid rgba(89, 99, 86, 0.18);
}

.scan-progress-grid > div:nth-child(3n) { border-right: 0; }
.scan-progress-grid > div:nth-child(n + 4) { border-bottom: 0; }

.scan-progress-grid span,
.scan-progress-grid strong {
  display: block;
}

.scan-progress-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scan-progress-grid strong {
  overflow: hidden;
  margin-top: 7px;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  text-overflow: ellipsis;
}

.scan-progress-grid small {
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
}

.scan-command-active .scan-button {
  min-height: 48px;
  justify-self: start;
  box-shadow: none;
}

button:disabled {
  border-color: var(--line);
  background: var(--surface-deep);
  color: var(--muted);
  cursor: not-allowed;
}

.coverage-summary {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.coverage-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.coverage-heading > small {
  color: var(--muted);
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.coverage-grid > div {
  padding: 15px 17px;
  border-radius: 10px;
  background: var(--canvas);
}

.coverage-grid span,
.coverage-grid strong {
  display: block;
}

.coverage-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.coverage-grid strong {
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}

.coverage-summary .notice {
  margin: 18px 0 0;
}

.crawl-summary {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.crawl-breakdown {
  margin-top: 20px;
}

.crawl-breakdown summary {
  cursor: pointer;
  font-weight: 700;
}

.classification-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.classification-grid a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
}

.classification-grid span {
  color: var(--muted);
  font-size: 12px;
}

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

.url-table {
  min-width: 1180px;
}

.url-table td {
  max-width: 290px;
  vertical-align: top;
}

.url-table small,
.url-value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.eyebrow,
.empty-kicker {
  margin: 0 0 9px;
  color: var(--leather);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.heading-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status-text {
  color: var(--moss);
  font-weight: 650;
}

.score-card {
  min-width: 340px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.score-ring {
  width: 104px;
  height: 104px;
  display: grid;
  place-content: center;
  border: 7px solid var(--surface-deep);
  border-top-color: var(--leather);
  border-radius: 50%;
  text-align: center;
}

.score-ring strong {
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 1;
}

.score-ring span {
  color: var(--muted);
  font-size: 11px;
}

.score-card p,
.score-card small {
  margin: 0;
  color: var(--muted);
}

.score-card h2 {
  margin: 3px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 56px;
}

.metric-card {
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 249, 245, 0.72);
}

.metric-card.feature {
  border-color: rgba(118, 81, 60, 0.34);
  background: #e9dfd3;
}

.metric-card > span,
.metric-card > small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card > strong {
  display: block;
  overflow: hidden;
  margin: 10px 0 5px;
  font-family: Georgia, serif;
  font-size: 35px;
  font-weight: 500;
  line-height: 1;
  text-overflow: ellipsis;
}

.metric-card .metric-word {
  font-size: 26px;
}

.metric-card .unit {
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
}

.section-block {
  margin-top: 56px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.text-link,
.back-link {
  font-size: 14px;
  font-weight: 650;
}

.severity-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.severity-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--info);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.severity-card:hover {
  box-shadow: var(--shadow);
  color: var(--ink);
}

.severity-card strong {
  display: block;
  margin: 18px 0 2px;
  font-family: Georgia, serif;
  font-size: 31px;
  font-weight: 500;
}

.severity-card small {
  color: var(--muted);
}

.severity-critical { border-top-color: var(--critical); }
.severity-high { border-top-color: var(--high); }
.severity-medium { border-top-color: var(--medium); }
.severity-low { border-top-color: var(--low); }
.severity-informational { border-top-color: var(--info); }

.badge,
.status-chip,
.category-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge {
  border: 1px solid currentColor;
  padding: 6px 8px;
}

.badge-critical { color: var(--critical); background: #f5e6e4; }
.badge-high { color: var(--high); background: #f4e9e2; }
.badge-medium { color: #81571f; background: #f6eddc; }
.badge-low { color: var(--low); background: #ebeee8; }
.badge-informational { color: var(--info); background: #e9edf0; }

.status-chip {
  padding: 6px 8px;
  background: var(--surface-deep);
  color: var(--muted);
}

.category-label {
  color: var(--leather);
}

.movement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.movement-grid article {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.movement-grid article:last-child {
  border: 0;
}

.movement-grid span,
.movement-grid p {
  color: var(--muted);
}

.movement-grid span {
  font-size: 12px;
  font-weight: 650;
}

.movement-grid strong {
  display: block;
  margin: 9px 0;
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}

.movement-grid p {
  margin: 0;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-panel label {
  min-width: 0;
}

.filter-panel label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

input {
  padding: 9px 11px;
}

select {
  padding: 8px 32px 8px 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--leather);
  box-shadow: 0 0 0 3px rgba(118, 81, 60, 0.12);
}

textarea {
  padding: 10px 11px;
  resize: vertical;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

button,
.button-primary,
.button-secondary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--leather-dark);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

.button-secondary {
  background: transparent;
  color: var(--leather-dark);
}

.filter-actions a {
  padding: 10px 0;
  font-size: 13px;
}

.finding-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.finding-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.finding-row:last-child {
  border-bottom: 0;
}

.finding-priority {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 23px 18px;
  background: rgba(233, 225, 215, 0.45);
}

.finding-main {
  min-width: 0;
  padding: 22px 24px;
}

.finding-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.finding-title-line h2 {
  margin-top: 5px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
}

.finding-title-line h2 a {
  color: var(--ink);
  text-decoration: none;
}

.finding-id {
  color: var(--muted);
  font-size: 12px;
}

.finding-main > p {
  max-width: 850px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.finding-main .recommendation {
  padding-left: 12px;
  border-left: 2px solid var(--surface-deep);
  color: var(--ink);
}

.url-stack {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.url-stack a {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-stack span {
  display: inline-block;
  width: 52px;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
}

.finding-dates {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.pagination div {
  display: flex;
  gap: 10px;
}

.pagination a {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-decoration: none;
}

.category-summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 249, 245, 0.72);
}

.category-summary h2 {
  font-size: 20px;
}

.category-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-summary-grid a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
}

.category-summary-grid strong {
  color: var(--leather);
  font-size: 14px;
}

.score-breakdown {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.score-line:last-child {
  border: 0;
}

.score-line span {
  font-size: 13px;
  font-weight: 650;
}

.score-line small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.score-line strong {
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
}

.score-start,
.score-final {
  background: var(--surface-deep);
}

.score-final strong {
  color: var(--leather-dark);
  font-size: 24px;
}

.detail-hero {
  margin: 20px 0 34px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.detail-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.detail-description {
  max-width: 850px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.content-card,
.metadata-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-card h2 {
  margin-top: 32px;
  font-size: 20px;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.detail-list,
.metadata-card dl {
  margin: 16px 0 0;
}

.detail-list div,
.metadata-card dl div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.fingerprint dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.monospace {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.image-evidence {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.manual-status {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.manual-status h2 {
  font-size: 20px;
}

.manual-status p {
  color: var(--muted);
  font-size: 12px;
}

.manual-status label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 13px 0;
}

.confirm-check input {
  width: 16px;
  min-height: 16px;
  margin: 1px 0 0;
}

.confirm-check span {
  margin: 0 !important;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-actions button {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 11px;
}

.audit-filters {
  grid-template-columns: repeat(4, 1fr);
}

.audit-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.audit-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.audit-row:last-child {
  border: 0;
}

.audit-thumbnail {
  display: grid;
  width: 150px;
  height: 128px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    linear-gradient(45deg, #eee8df 25%, transparent 25%),
    linear-gradient(-45deg, #eee8df 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee8df 75%),
    linear-gradient(-45deg, transparent 75%, #eee8df 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.audit-thumbnail.large {
  width: 180px;
  height: 180px;
}

.audit-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.audit-content {
  min-width: 0;
}

.audit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.audit-heading > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.audit-heading > strong {
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
}

.audit-content > p {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.audit-urls {
  display: grid;
  gap: 4px;
}

.audit-urls a {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-urls span {
  display: inline-block;
  width: 45px;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
}

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

.audit-metadata div {
  min-width: 0;
}

.audit-metadata dt,
.audit-metadata dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-shell,
.table-wrap {
  width: 100%;
  max-width: 100%;
  contain: inline-size;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.evidence-json {
  max-width: 100%;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-deep);
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(233, 225, 215, 0.55);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

td a {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-link {
  font-weight: 700;
}

.scan-heading {
  align-items: center;
  margin-top: 18px;
}

.compact-severity .severity-card strong {
  margin-top: 14px;
}

.mini-finding-list {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mini-finding-list > a {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.mini-finding-list > a:last-child {
  border: 0;
}

.mini-finding-list strong,
.mini-finding-list small {
  display: block;
}

.mini-finding-list small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 380px;
  place-content: center;
  padding: 46px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state.compact {
  min-height: 230px;
  margin-top: 18px;
}

.empty-state h2,
.error-state h1 {
  margin: 0;
}

.empty-state p,
.error-state p,
.muted {
  color: var(--muted);
}

.empty-state code {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--surface-deep);
}

.error-state strong {
  color: var(--leather);
  font-family: Georgia, serif;
  font-size: 82px;
  font-weight: 500;
}

.error-state .button-primary {
  justify-self: center;
  margin-top: 16px;
}

.site-footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .overview-heading,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-card {
    width: 100%;
    min-width: 0;
  }

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

  .scan-command {
    grid-template-columns: 1fr;
  }

  .scan-safety-note {
    margin-top: -12px !important;
  }

  .scan-command form,
  .scan-command:not(.scan-command-active) .scan-button {
    width: 100%;
  }

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

  .scan-progress-grid > div:nth-child(2) {
    border-right: 0;
  }

  .scan-progress-grid > div:nth-child(3n) { border-right: 1px solid rgba(89, 99, 86, 0.18); }
  .scan-progress-grid > div:nth-child(2n) { border-right: 0; }
  .scan-progress-grid > div:nth-child(n + 4) { border-bottom: 1px solid rgba(89, 99, 86, 0.18); }
  .scan-progress-grid > div:nth-child(n + 5) { border-bottom: 0; }

  .severity-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .search-field {
    grid-column: 1 / -1;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 620px) {
  .header-inner,
  .page-shell,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  nav a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    text-align: center;
  }

  .logout-form {
    flex: 0 0 auto;
  }

  .logout-form button {
    min-height: 44px;
  }

  .page-shell {
    padding: 36px 0 56px;
  }

  h1 {
    font-size: clamp(30px, 10vw, 36px);
  }

  .section-heading,
  .finding-title-line,
  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-actions,
  .filter-actions button,
  .filter-actions .button-primary,
  .filter-actions .button-secondary {
    width: 100%;
  }

  .content-card,
  .metadata-card,
  .detail-hero {
    padding: 20px;
  }

  .login-shell {
    min-height: calc(100vh - 240px);
  }

  .login-card {
    padding: 26px 20px;
  }

  .metrics-grid,
  .severity-grid,
  .movement-grid,
  .filter-panel,
  .coverage-grid {
    grid-template-columns: 1fr;
  }

  .coverage-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-command {
    gap: 24px;
    padding: 24px 20px;
  }

  .scan-progress-grid {
    grid-template-columns: 1fr;
  }

  .scan-progress-grid > div:nth-child(n) {
    border-right: 0;
    border-bottom: 1px solid rgba(89, 99, 86, 0.18);
  }

  .scan-progress-grid > div:last-child {
    border-bottom: 0;
  }

  .scan-command-active .scan-button {
    width: 100%;
  }

  .category-summary,
  .image-evidence,
  .audit-row {
    grid-template-columns: 1fr;
  }

  .opportunity-grid, .checklist { grid-template-columns: 1fr; }

  .classification-grid {
    grid-template-columns: 1fr;
  }

  .audit-thumbnail,
  .audit-thumbnail.large {
    width: 100%;
    height: 190px;
  }

  .audit-heading {
    flex-direction: column;
  }

  .audit-metadata {
    grid-template-columns: 1fr;
  }

  .movement-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .finding-row {
    grid-template-columns: 1fr;
  }

  .finding-priority {
    align-items: center;
    flex-direction: row;
    padding: 14px 18px;
  }

  .finding-main {
    padding: 18px;
  }

  .finding-dates {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .detail-list div,
  .metadata-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .mini-finding-list > a {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}
/* Weighted store score and verification surfaces */
.component-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.component-score-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.component-score-grid a {
  color: inherit;
  text-decoration: none;
}

.component-score {
  display: block;
  margin: .45rem 0;
  font-size: 2.5rem;
  line-height: 1;
}

.notice {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border, #d8d4ca);
  border-radius: .75rem;
}

.notice.warning {
  background: #fff8e6;
  border-color: #dfc777;
  color: #594715;
}

.detail-list.compact {
  margin-top: 1rem;
}

.login-form input,
.login-form button {
  min-height: 44px;
}

.performance-score-pair,
.performance-action-card,
.configuration-grid,
.performance-progress-stats {
  display: grid;
  gap: 1rem;
}

.performance-score-pair {
  grid-template-columns: repeat(2, minmax(15rem, 1fr));
}

.performance-action-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid rgba(170, 132, 68, 0.35);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(27, 44, 37, 0.98), rgba(45, 68, 56, 0.94));
  color: var(--surface);
  box-shadow: var(--shadow);
}

.performance-action-card-ready {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.performance-action-card h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
}

.performance-action-card p {
  max-width: 48rem;
  color: rgba(251, 249, 245, 0.88);
}

.performance-action-description {
  margin: 0.8rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
}

.performance-audit-benefits {
  display: grid;
  gap: 0.55rem;
  margin: 1.35rem 0 0;
  padding: 0;
  color: rgba(251, 249, 245, 0.88);
  list-style: none;
}

.performance-audit-benefits li {
  position: relative;
  padding-left: 1.35rem;
}

.performance-audit-benefits li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: #d7bd91;
  content: "•";
  font-weight: 800;
}

.performance-latest-job {
  margin: 1.25rem 0 0;
  color: rgba(251, 249, 245, 0.72) !important;
  font-size: 0.85rem;
}

.performance-run-form {
  display: flex;
  align-items: end;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.performance-run-form label {
  width: min(22rem, 100%);
}

.performance-run-form label > span {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(251, 249, 245, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.performance-run-form select,
.performance-run-form button {
  min-height: 50px;
  border-radius: 10px;
}

.performance-run-form select {
  border-color: rgba(251, 249, 245, 0.5);
  background-color: var(--surface);
  color: var(--ink);
}

.performance-run-form select:focus-visible {
  border-color: #d7bd91;
  box-shadow: 0 0 0 4px rgba(215, 189, 145, 0.28);
}

.performance-run-form button {
  padding: 12px 24px;
  border-color: var(--leather-dark);
  box-shadow: 0 8px 20px rgba(15, 24, 20, 0.25);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.performance-run-form button:not(:disabled):hover {
  background: var(--leather);
  box-shadow: 0 10px 24px rgba(15, 24, 20, 0.32);
  transform: translateY(-1px);
}

.performance-run-form button:focus-visible {
  outline: 3px solid #f1dfbf;
  outline-offset: 3px;
}

.performance-run-form button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.performance-progress-stats {
  grid-template-columns: repeat(2, minmax(5rem, 1fr));
}

.performance-progress-stats span {
  padding: 0.7rem;
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.08);
}

.performance-progress-stats strong {
  display: block;
  font-size: 1.2rem;
}

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

.configuration-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.configuration-grid span,
.configuration-grid strong {
  display: block;
}

.configuration-grid strong {
  margin: 0.25rem 0;
}

.representative-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 760px) {
  .performance-score-pair,
  .performance-action-card,
  .configuration-grid {
    grid-template-columns: 1fr;
  }

  .performance-run-form {
    align-items: stretch;
    flex-direction: column;
  }

  .performance-run-form label {
    width: 100%;
  }
}

.performance-summary {
  margin-bottom: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.performance-summary h2 {
  margin: 0.25rem 0 0.65rem;
}

.fix-first-list,
.metric-analysis-grid {
  display: grid;
  gap: 1rem;
}

.fix-first-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.fix-first-card,
.metric-analysis-grid article {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.fix-first-card h3 {
  margin: 0.7rem 0 0.4rem;
}

.fix-first-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.metric-analysis-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}

.metric-analysis-grid span,
.metric-analysis-grid strong {
  display: block;
}

.metric-analysis-grid strong {
  margin: 0.35rem 0;
  font-size: 1.35rem;
}

details {
  margin-top: 0.75rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
}
