:root {
  --bg: #f4f7f6;
  --ink: #1d2430;
  --muted: #687381;
  --panel: #ffffff;
  --panel-strong: #292b3f;
  --line: #dce5e3;
  --accent: #58b783;
  --accent-dark: #359765;
  --warning: #b63f35;
  --shadow: 0 24px 70px rgba(28, 36, 48, 0.18);
  --soft-shadow: 0 18px 50px rgba(31, 60, 67, 0.1);
  --radius: 8px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ui-font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", Arial, sans-serif;
  --mono-font: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-family: var(--ui-font);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-family: var(--ui-font);
  background:
    linear-gradient(135deg, rgba(88, 183, 131, 0.14), transparent 28%),
    linear-gradient(315deg, rgba(41, 43, 63, 0.08), transparent 26%),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(29, 36, 48, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 36, 48, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  padding: 10px 14px;
  color: #fff;
  background: var(--panel-strong);
  border-radius: 6px;
  transition: top 180ms var(--ease);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: var(--panel-strong);
  border-radius: 7px;
  box-shadow: 6px 6px 0 rgba(88, 183, 131, 0.32);
}

.brand-kicker,
.brand-name,
.site-footer p {
  margin: 0;
}

.brand-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-name {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 800;
}

.status-pill,
.top-nav a {
  padding: 9px 14px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
  background: rgba(88, 183, 131, 0.12);
  border: 1px solid rgba(88, 183, 131, 0.28);
  border-radius: 999px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.top-nav a {
  text-decoration: none;
}

.top-nav a[aria-current="page"] {
  color: #fff;
  background: var(--panel-strong);
  border-color: var(--panel-strong);
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 58px auto 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: 34px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 8px 11px;
  color: var(--panel-strong);
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

h1 {
  max-width: 670px;
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.search-panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(220, 229, 227, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  color: var(--ink);
  background: #f9fbfb;
  border: 1px solid #cfdad8;
  border-radius: 6px;
  outline: none;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.search-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(88, 183, 131, 0.16);
}

.search-row button,
.confirm-button,
.wide-button,
.download-button {
  min-height: 48px;
  color: #fff;
  font-weight: 800;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  transition: transform 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}

.search-row button:hover,
.confirm-button:hover,
.wide-button:hover,
.download-button:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 28px rgba(53, 151, 101, 0.24);
  transform: translateY(-1px);
}

.query-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--warning);
  font-size: 14px;
  font-weight: 700;
}

.query-message.success {
  color: var(--accent-dark);
}

.sample-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
}

.sample-codes span {
  color: var(--muted);
  font-size: 13px;
}

.sample-codes button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--panel-strong);
  font-size: 12px;
  font-weight: 800;
  background: #eef5f2;
  border: 1px solid rgba(88, 183, 131, 0.28);
  border-radius: 999px;
}

.sample-codes button:hover,
.sample-codes button:focus-visible {
  color: #fff;
  background: var(--panel-strong);
  outline: none;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 54px 0 56px;
}

.info-grid article {
  min-width: 0;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-index {
  color: var(--accent-dark);
  font-weight: 900;
}

.info-grid h2 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 28, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.result-modal {
  width: min(598px, 100%);
  overflow: hidden;
  background: var(--panel);
  border-radius: 4px;
  box-shadow: var(--shadow);
  animation: modal-in 220ms var(--ease);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 24px;
  color: #fff;
  background: var(--panel-strong);
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
}

.close-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 4px;
}

.close-button:hover,
.close-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.modal-body {
  padding: 38px 30px 52px;
  text-align: center;
}

.success-title {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: clamp(23px, 5vw, 28px);
  font-weight: 800;
}

.report-fields {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 10px;
  width: min(420px, 100%);
  margin: 0 auto 28px;
  color: #5d6470;
  text-align: left;
}

.report-fields dt {
  font-weight: 400;
}

.report-fields dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.confirm-button {
  width: min(204px, 100%);
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

body:has(.report-workspace) {
  background:
    linear-gradient(90deg, rgba(22, 22, 22, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(22, 22, 22, 0.035) 1px, transparent 1px),
    #f4f4f4;
  background-size: 64px 64px;
}

body:has(.report-workspace)::before {
  display: none;
}

body:has(.report-workspace) .site-header {
  max-width: 1280px;
  padding: 24px 24px 0;
}

body:has(.report-workspace) .brand-mark,
body:has(.report-workspace) .top-nav a,
body:has(.report-workspace) .wide-button,
body:has(.report-workspace) .download-button,
body:has(.report-workspace) .text-input,
body:has(.report-workspace) .upload-card,
body:has(.report-workspace) .paper-report,
body:has(.report-workspace) .scan-card,
body:has(.report-workspace) .summary-strip article {
  border-radius: 0;
  box-shadow: none;
}

body:has(.report-workspace) .brand-mark {
  background: #161616;
  box-shadow: 6px 6px 0 #24a148;
}

body:has(.report-workspace) .top-nav a {
  background: #ffffff;
  border-color: #c6c6c6;
  color: #161616;
}

body:has(.report-workspace) .top-nav a[aria-current="page"] {
  background: #161616;
  border-color: #161616;
  color: #ffffff;
}

.report-workspace {
  width: min(1280px, calc(100% - 48px));
  margin: 52px auto 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(560px, 1.22fr);
  gap: 36px;
  align-items: start;
}

.workspace-copy h1 {
  max-width: 560px;
  margin: 0;
  color: #161616;
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  text-wrap: balance;
}

.workspace-copy h1 span {
  display: block;
}

.workspace-copy > p:not(.section-label) {
  max-width: 520px;
  margin: 22px 0 28px;
  color: #525252;
  font-size: 17px;
  line-height: 1.7;
}

.section-label {
  margin: 0 0 14px;
  color: #525252;
  font-size: 14px;
}

.upload-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #c6c6c6;
}

.upload-card fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.upload-card legend,
.upload-card label:not(.drop-zone) {
  display: block;
  margin: 0 0 10px;
  color: #161616;
  font-weight: 600;
}

.drop-zone {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px 14px;
  min-height: 122px;
  padding: 20px;
  background: #f4f4f4;
  border: 1px dashed #8d8d8d;
  cursor: pointer;
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}

.drop-zone:hover,
.drop-zone:focus-within {
  background: #ffffff;
  border-color: #24a148;
}

.file-symbol {
  grid-row: span 2;
  width: 28px;
  height: 36px;
  border: 2px solid #161616;
  border-top: 8px solid #161616;
}

.drop-zone strong {
  align-self: end;
  color: #161616;
}

.drop-zone small {
  color: #525252;
  line-height: 1.5;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body:has(.report-workspace) .text-input {
  min-height: 48px;
  background: #f4f4f4;
  border: 0;
  border-bottom: 2px solid #8d8d8d;
}

body:has(.report-workspace) .text-input:focus {
  border-color: #24a148;
  box-shadow: none;
}

body:has(.report-workspace) .wide-button,
body:has(.report-workspace) .download-button {
  background: #24a148;
}

body:has(.report-workspace) .wide-button:hover,
body:has(.report-workspace) .download-button:hover {
  background: #198038;
  box-shadow: none;
}

.download-button:disabled {
  color: #8d8d8d;
  background: #e0e0e0 !important;
  cursor: not-allowed;
  transform: none !important;
}

.report-preview {
  margin: 0;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin: 0 0 16px;
}

.report-toolbar h2 {
  margin: 0;
  color: #161616;
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 400;
}

body:has(.report-workspace) .paper-report {
  width: 100%;
  min-height: 690px;
  padding: 34px 54px 42px;
  background: #ffffff;
  border: 1px solid #c6c6c6;
}

body:has(.report-workspace) .paper-report h3 {
  margin-top: 44px;
  font-size: 28px;
}

body:has(.report-workspace) .print-subtitle {
  margin-bottom: 28px;
}

body:has(.report-workspace) .print-fields {
  width: min(520px, 100%);
}

.is-idle .paper-report {
  opacity: 0.92;
}

.is-idle .bar-chart span {
  background: #8d8d8d;
}

body:has(.report-workspace) .scan-card {
  width: min(480px, 100%);
  margin: 22px 0 0;
  background: #ffffff;
  border: 1px solid #c6c6c6;
}

.scan-meter {
  position: relative;
  width: 64px;
  height: 10px;
  flex: 0 0 auto;
  overflow: hidden;
  background: #e0e0e0;
}

.scan-meter::before {
  position: absolute;
  inset: 0;
  width: 36%;
  content: "";
  background: #24a148;
  animation: scan-meter 880ms ease-in-out infinite alternate;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 28px;
}

.summary-strip article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #c6c6c6;
}

.summary-strip p,
.summary-strip small {
  margin: 0;
  color: #525252;
}

.summary-strip strong {
  display: block;
  margin: 4px 0;
  color: #161616;
  font-size: 18px;
}

.summary-mark {
  width: 42px;
  height: 42px;
  background:
    linear-gradient(90deg, #24a148 0 8px, transparent 8px),
    linear-gradient(#161616 0 0);
}

.summary-report {
  background:
    linear-gradient(#24a148 0 0) left bottom / 8px 20px no-repeat,
    linear-gradient(#161616 0 0) center bottom / 8px 34px no-repeat,
    linear-gradient(#8d8d8d 0 0) right bottom / 8px 13px no-repeat;
}

.utility-page {
  width: min(1180px, calc(100% - 48px));
  margin: 58px auto 0;
}

.utility-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}

.utility-hero h1 {
  margin: 0;
  color: #161616;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
}

.utility-hero p:last-child {
  margin: 0;
  color: #525252;
  font-size: 17px;
  line-height: 1.75;
}

.sample-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}

.sample-paper {
  min-height: 780px;
}

.side-panel,
.notice-panel,
.guide-grid article {
  background: #ffffff;
  border: 1px solid #c6c6c6;
  border-radius: 0;
  box-shadow: none;
}

.side-panel {
  position: sticky;
  top: 24px;
  padding: 24px;
}

.side-panel h2,
.notice-panel h2,
.guide-grid h2 {
  margin: 0 0 14px;
  color: #161616;
  font-size: 22px;
}

.side-panel ul {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding-left: 18px;
  color: #525252;
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  background: #161616;
}

.text-link:hover,
.text-link:focus-visible {
  background: #24a148;
  outline: none;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  padding: 24px;
}

.guide-number {
  color: #24a148;
  font-family: var(--mono-font);
  font-weight: 800;
}

.guide-grid p,
.notice-panel p {
  margin: 0;
  color: #525252;
  line-height: 1.75;
}

.notice-panel {
  margin-top: 16px;
  padding: 24px;
}

.upload-shell {
  margin-top: 48px;
}

.upload-hero {
  align-items: start;
}

.upload-panel {
  display: grid;
  gap: 12px;
}

.file-input,
.text-input {
  width: 100%;
  min-height: 48px;
  min-width: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: #f9fbfb;
  border: 1px solid #cfdad8;
  border-radius: 6px;
  outline: none;
}

.file-input:focus,
.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(88, 183, 131, 0.16);
}

.wide-button {
  width: 100%;
  margin-top: 6px;
}

.scan-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 34px 0 0;
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.scan-card[hidden],
.report-preview[hidden] {
  display: none;
}

.scan-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.scan-card p {
  margin: 0;
  color: var(--muted);
}

.spinner {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 5px solid rgba(88, 183, 131, 0.2);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 780ms linear infinite;
}

.report-preview {
  margin: 40px 0 56px;
}

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

.report-toolbar h2 {
  margin: 0;
  font-size: 28px;
}

.download-button {
  min-width: 132px;
  padding: 0 20px;
}

.paper-report {
  width: min(760px, 100%);
  min-height: 940px;
  margin: 0 auto;
  padding: 38px 58px 48px;
  color: #111;
  background: #fff;
  border: 1px solid #d6d6d6;
  box-shadow: var(--soft-shadow);
  font-family: var(--ui-font);
}

.paper-report-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  font-size: 14px;
  border-bottom: 1px solid #111;
}

.muted-logo {
  color: #aaa;
  font-weight: 700;
}

.paper-report h3 {
  margin: 56px 0 10px;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}

.print-subtitle {
  margin: 0 0 34px;
  font-size: 25px;
  text-align: center;
}

.print-fields {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 7px 12px;
  width: min(520px, 100%);
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.print-fields dt {
  font-weight: 700;
}

.print-fields dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 28px;
  width: min(520px, 100%);
  height: 58px;
  margin: 36px auto 28px;
  border-bottom: 1px solid #111;
  border-left: 1px solid #111;
}

.bar-chart span {
  width: 10px;
  background: #111;
}

.report-note {
  width: min(520px, 100%);
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.7;
}

body:has(.report-workspace) .report-preview {
  margin: 0;
}

body:has(.report-workspace) .report-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin: 0 0 16px;
}

body:has(.report-workspace) .report-toolbar h2 {
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 800;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes scan-meter {
  from {
    transform: translateX(-30%);
  }

  to {
    transform: translateX(210%);
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    padding-inline: 18px;
  }

  .status-pill {
    display: none;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .top-nav a {
    min-height: 40px;
  }

  .report-workspace {
    width: min(100% - 28px, 680px);
    margin-top: 34px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .workspace-copy h1 {
    font-size: 44px;
  }

  .page-shell {
    width: min(100% - 28px, 680px);
    margin-top: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .lead {
    font-size: 16px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .report-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .utility-page {
    width: min(100% - 28px, 680px);
    margin-top: 34px;
  }

  .utility-hero,
  .sample-report-layout,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .download-button {
    width: 100%;
  }

  .paper-report {
    padding: 28px 22px 36px;
  }

  body:has(.report-workspace) .paper-report {
    min-height: 620px;
    padding: 28px 20px 34px;
  }

  .paper-report-head {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 16px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.12;
  }

  .workspace-copy h1,
  .utility-hero h1 {
    font-size: 38px;
  }

  .site-header {
    gap: 16px;
  }

  .search-panel {
    padding: 20px;
  }

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

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

  .modal-backdrop {
    align-items: start;
    padding: 18px 12px;
  }

  .modal-head {
    padding: 0 16px;
  }

  .modal-body {
    padding: 34px 20px 42px;
  }

  .report-fields {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .report-fields dd {
    margin-bottom: 9px;
  }

  .print-fields {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .print-fields dd {
    margin-bottom: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.detector-body {
  background:
    linear-gradient(135deg, rgba(36, 161, 72, 0.1), transparent 26%),
    linear-gradient(315deg, rgba(22, 22, 22, 0.06), transparent 30%),
    #f6f8f7;
}

.detector-body::before {
  background-size: 44px 44px;
  opacity: 0.72;
}

.detector-body .site-header {
  max-width: 1180px;
}

.detector-page {
  width: min(1180px, calc(100% - 48px));
  margin: 48px auto 0;
}

.detector-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: end;
  margin-bottom: 28px;
}

.detector-hero h1 {
  max-width: 740px;
  color: #111;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 900;
  line-height: 1.06;
}

.detector-lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.85;
}

.detector-aside,
.detector-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d5ddda;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(28, 36, 48, 0.08);
  backdrop-filter: blur(10px);
}

.detector-aside {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.detector-aside p {
  grid-column: 1 / -1;
  margin: 0;
  color: #687381;
  line-height: 1.7;
}

.aside-stat {
  padding: 14px;
  background: #f3f7f5;
  border: 1px solid #dce5e3;
  border-radius: 6px;
}

.aside-stat span,
.result-metric span {
  display: block;
  color: #687381;
  font-size: 13px;
}

.aside-stat strong {
  display: block;
  margin-top: 6px;
  color: #111;
  font-size: 22px;
}

.detector-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.detector-panel {
  padding: 24px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  color: #111;
  font-size: 26px;
}

.detector-panel.upload-card {
  border-radius: 8px;
}

.detector-panel .drop-zone {
  min-height: 136px;
  background: #f7faf9;
  border-color: #b8c7c2;
  border-radius: 8px;
}

.detector-panel .drop-zone:hover {
  border-color: var(--accent);
}

.detector-panel .text-input {
  background: #fbfdfc;
  border: 1px solid #cfdad8;
  border-radius: 6px;
}

.detector-panel .wide-button,
.result-panel .download-button {
  border-radius: 6px;
}

.process-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.status-board {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: #111;
  border-radius: 8px;
}

.status-board strong {
  display: block;
  color: #fff;
  font-size: 24px;
}

.status-board p {
  margin: 4px 0 0;
  color: #b8c7c2;
}

.status-icon {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 42px;
}

.status-icon span {
  width: 9px;
  background: #58b783;
  border-radius: 2px;
}

.status-icon span:nth-child(1) {
  height: 18px;
}

.status-icon span:nth-child(2) {
  height: 32px;
}

.status-icon span:nth-child(3) {
  height: 24px;
  background: #c7d9d1;
}

.process-panel .scan-card {
  margin: 0;
  background: #f7faf9;
  box-shadow: none;
}

.process-panel .scan-card h3 {
  margin: 0 0 6px;
  color: #111;
  font-size: 18px;
}

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

.detector-steps li {
  padding: 14px;
  color: #344054;
  background: #f7faf9;
  border: 1px solid #dce5e3;
  border-radius: 6px;
  font-weight: 700;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 20px;
  align-items: start;
  margin: 20px 0 34px;
  padding: 24px;
}

.result-panel[hidden] {
  display: none;
}

.result-summary h2 {
  margin: 0;
  color: #111;
  font-size: 30px;
}

.result-summary p:not(.section-label) {
  margin: 8px 0 0;
  color: #687381;
}

.result-metric {
  padding: 18px;
  text-align: right;
  background: #eaf6ef;
  border: 1px solid rgba(88, 183, 131, 0.32);
  border-radius: 8px;
}

.result-metric strong {
  display: block;
  margin-top: 6px;
  color: #1f8f55;
  font-size: 36px;
  line-height: 1;
}

.result-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.result-details div {
  min-width: 0;
  padding: 14px;
  background: #f7faf9;
  border: 1px solid #dce5e3;
  border-radius: 6px;
}

.result-details dt {
  color: #687381;
  font-size: 13px;
}

.result-details dd {
  margin: 5px 0 0;
  color: #111;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.result-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.ghost-button {
  min-height: 48px;
  padding: 0 20px;
  color: #111;
  font-weight: 800;
  background: #fff;
  border: 1px solid #b8c7c2;
  border-radius: 6px;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: #111;
  outline: none;
}

@media (max-width: 860px) {
  .detector-page {
    width: min(100% - 28px, 680px);
    margin-top: 34px;
  }

  .detector-hero,
  .detector-grid,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .detector-aside {
    grid-template-columns: 1fr 1fr;
  }

  .result-details {
    grid-template-columns: 1fr 1fr;
  }

  .result-metric {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .detector-hero h1 {
    font-size: 38px;
  }

  .detector-aside,
  .detector-steps,
  .result-details {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }
}
