:root {
  --ink: #14201d; --muted: #62706c; --line: #dce4e1; --green: #087a5b;
  --green-dark: #075c47; --green-soft: #e5f5ef; --red: #bd342b;
  --red-soft: #fff0ee; --amber: #a86008; --amber-soft: #fff6df;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 8% 4%, #dff2eb, transparent 30rem), #f3f7f5; }
button, input { font: inherit; }
.shell { width: min(980px, calc(100% - 32px)); margin: auto; padding: 60px 0 32px; }
.hero { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.brand { display: grid; flex: 0 0 58px; height: 58px; place-items: center; border-radius: 18px; color: white; background: linear-gradient(145deg, #0a8d68, #075a47); box-shadow: 0 14px 30px #087a5b40; font-size: 27px; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 23px; }
h3 { margin-bottom: 5px; font-size: 17px; }
.subtitle, .signature-heading p, #status-copy { margin-bottom: 0; color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.panel, .results { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #fffffff5; box-shadow: 0 22px 60px #1c362e1a; }
.panel { padding: clamp(22px, 4vw, 36px); }
.panel-title, .summary, .selection, .signature-heading { display: flex; align-items: center; gap: 16px; }
.panel-title { justify-content: space-between; margin-bottom: 22px; }
.privacy, .badge, .mini-badge { padding: 7px 10px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 800; white-space: nowrap; }
.drop-zone { display: flex; min-height: 225px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; border: 1.5px dashed #9db8ae; border-radius: 18px; background: #f8fbfa; transition: .16s ease; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragging { border-color: var(--green); outline: 0; background: var(--green-soft); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone > span:last-child { margin-top: 7px; color: var(--muted); font-size: 14px; }
.upload-icon { display: grid; width: 50px; height: 50px; margin-bottom: 14px; place-items: center; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: 27px; }
.selection { min-height: 86px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.file-type { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 13px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 850; }
.file-info { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info small { margin-top: 4px; color: var(--muted); }
.primary, .secondary { border: 0; cursor: pointer; font-weight: 760; }
.primary { display: flex; width: 100%; min-height: 52px; margin-top: 18px; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; color: white; background: var(--green); }
.primary:disabled { cursor: not-allowed; opacity: .5; }
.secondary { padding: 9px 12px; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); }
.spinner { width: 18px; height: 18px; border: 2px solid #ffffff66; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; color: #8f211b; background: var(--red-soft); }
.results { margin-top: 24px; }
.summary { padding: clamp(22px, 4vw, 34px); border-bottom: 1px solid var(--line); }
.summary > div { flex: 1; }
.status-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; font-size: 24px; font-weight: 900; }
.summary.valid .status-icon, .summary.valid .badge { color: var(--green-dark); background: var(--green-soft); }
.summary.invalid .status-icon, .summary.invalid .badge { color: var(--red); background: var(--red-soft); }
.summary.warning .status-icon, .summary.warning .badge { color: var(--amber); background: var(--amber-soft); }
.metadata { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.metadata .detail { padding: 18px 22px; border-right: 1px solid var(--line); }
.metadata .detail:last-child { border-right: 0; }
.detail span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.detail strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.signature-list { padding: clamp(18px, 4vw, 30px); }
.signature { padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.signature + .signature { margin-top: 14px; }
.signature-heading > div { flex: 1; }
.signature-heading p { font-size: 13px; }
.mini-badge.valid { color: var(--green-dark); background: var(--green-soft); }
.mini-badge.invalid { color: var(--red); background: var(--red-soft); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-top: 18px; }
.certificate { margin-top: 16px; padding: 15px; border-radius: 12px; background: #f5f8f7; }
.certificate h4 { margin: 0; }
.warnings { margin: 14px 0 0; padding-left: 20px; color: var(--amber); font-size: 13px; }
details { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 30px; color: var(--green-dark); font-weight: 750; }
pre { max-height: 460px; margin: 0; overflow: auto; padding: 20px 30px; color: #d9f8ec; background: #10251f; font: 12px/1.65 ui-monospace, Consolas, monospace; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; color: var(--muted); font-size: 12px; }
footer code { color: var(--green-dark); }
.hidden { display: none !important; }
@media (max-width: 700px) {
  .shell { padding-top: 34px; } .summary { align-items: flex-start; flex-wrap: wrap; }
  .metadata { grid-template-columns: repeat(2, 1fr); } .detail-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 20px); } .brand { flex-basis: 48px; height: 48px; }
  .privacy { display: none; } .metadata { grid-template-columns: 1fr; }
  .metadata .detail { border-right: 0; border-bottom: 1px solid var(--line); }
}
