:root {
  color-scheme: light;
  --ink: #0b1720;
  --muted: #5f6f77;
  --line: #d8e1df;
  --surface: rgba(248, 251, 249, 0.88);
  --teal: #0d8b78;
  --teal-dark: #066558;
  --lime: #c8ff67;
  --orange: #ff7d45;
  --red: #d84747;
  --shadow: 0 28px 70px rgba(21, 48, 44, 0.12);
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html { min-width: 320px; background: #edf3ef; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background:
    linear-gradient(rgba(13, 139, 120, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 139, 120, 0.035) 1px, transparent 1px),
    #edf3ef;
  background-size: 42px 42px;
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}
.ambient-one { width: 440px; height: 440px; right: -120px; top: 70px; background: rgba(200, 255, 103, 0.2); }
.ambient-two { width: 390px; height: 390px; left: -170px; top: 520px; background: rgba(35, 174, 155, 0.13); }

.topbar {
  width: min(1180px, calc(100% - 40px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(11, 23, 32, 0.12);
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 38px; height: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: skew(-10deg); }
.brand-mark i { background: var(--ink); border-radius: 2px; }
.brand-mark i:nth-child(2) { background: var(--teal); }
.brand-mark i:nth-child(3) { background: var(--lime); }
.brand strong { display: block; font-size: 15px; letter-spacing: 0.13em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: 0.21em; }

.topbar nav { display: flex; align-items: center; gap: 26px; font-size: 13px; }
.topbar nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.health { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.health i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(13, 139, 120, 0.12); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero { padding: 74px 0 56px; max-width: 930px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--teal-dark); font-size: 12px; font-weight: 800; letter-spacing: 0.16em; }
.eyebrow b { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--teal); border-radius: 50%; font-size: 9px; }
.hero h1 { margin: 24px 0 22px; font-size: clamp(50px, 7vw, 88px); line-height: 0.98; letter-spacing: -0.065em; font-weight: 760; }
.hero h1 em { color: var(--teal); font-style: normal; }
.hero > p { max-width: 710px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.guardrails { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.guardrails span { border: 1px solid rgba(11, 23, 32, 0.15); border-radius: 999px; padding: 8px 12px; background: rgba(255, 255, 255, 0.45); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }

.workspace { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; align-items: stretch; }
.upload-card, .result-card { position: relative; min-height: 620px; padding: 34px; border: 1px solid rgba(11, 23, 32, 0.12); background: var(--surface); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.result-card { background: #0c2928; color: #f2f8f5; overflow: hidden; }
.result-card::after { content: ""; position: absolute; width: 330px; height: 330px; right: -180px; top: -170px; border: 1px solid rgba(200, 255, 103, 0.25); border-radius: 50%; box-shadow: 0 0 0 50px rgba(200, 255, 103, 0.025), 0 0 0 100px rgba(200, 255, 103, 0.018); }
.section-number { position: relative; z-index: 1; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: 0.16em; }
.result-card .section-number { color: var(--lime); }
.card-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 28px 0 24px; }
.card-heading span { color: var(--muted); font-size: 12px; }
.card-heading h2 { margin: 5px 0 0; font-size: 30px; }
.card-heading > b { color: var(--muted); font-size: 11px; letter-spacing: 0.07em; }

.dropzone { min-height: 260px; border: 1px dashed #9eb0aa; background: rgba(255, 255, 255, 0.45); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: 180ms ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--teal); background: rgba(13, 139, 120, 0.06); transform: translateY(-2px); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { width: 54px; height: 54px; border: 1px solid var(--teal); border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.upload-icon i { position: relative; width: 17px; height: 18px; border-bottom: 2px solid var(--teal); }
.upload-icon i::before { content: ""; position: absolute; left: 7px; top: 0; height: 13px; border-left: 2px solid var(--teal); }
.upload-icon i::after { content: ""; position: absolute; left: 3px; top: 0; width: 8px; height: 8px; border-left: 2px solid var(--teal); border-top: 2px solid var(--teal); transform: rotate(45deg); }
.dropzone strong { font-size: 18px; }
.dropzone p { max-width: 330px; margin: 9px 20px 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dropzone small { color: var(--teal-dark); font-size: 9px; font-weight: 800; letter-spacing: 0.09em; }

.selected-file { display: grid; grid-template-columns: 52px 1fr 34px; gap: 13px; align-items: center; margin-top: 14px; padding: 12px; border: 1px solid var(--line); background: white; }
.file-symbol { display: grid; place-items: center; height: 46px; background: var(--ink); color: var(--lime); font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.selected-file strong, .selected-file span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file strong { font-size: 14px; }
.selected-file span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.selected-file button { border: 0; background: transparent; color: var(--muted); font-size: 24px; }

.primary-button, .secondary-button { min-height: 56px; border: 0; padding: 0 21px; font-weight: 800; transition: 160ms ease; }
.primary-button { width: 100%; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: white; }
.primary-button b { color: var(--lime); font-size: 20px; }
.primary-button:hover:not(:disabled) { background: var(--teal-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: 0.35; cursor: not-allowed; }
.primary-button.compact { width: auto; justify-content: center; }
.secondary-button { border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: white; }

.empty-result, .progress-result { position: relative; z-index: 1; min-height: 510px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-result h2, .progress-result h2 { margin: 24px 0 8px; font-size: 30px; }
.empty-result p, .progress-result p { max-width: 390px; color: #abc1bc; line-height: 1.65; }
.radar { position: relative; width: 140px; height: 140px; border: 1px solid rgba(200, 255, 103, 0.22); border-radius: 50%; box-shadow: inset 0 0 0 28px rgba(200, 255, 103, 0.025), inset 0 0 0 55px rgba(200, 255, 103, 0.02); }
.radar i { position: absolute; background: rgba(200, 255, 103, 0.35); }
.radar i:first-child { width: 1px; height: 100%; left: 50%; }
.radar i:nth-child(2) { width: 100%; height: 1px; top: 50%; }
.radar i:last-child { width: 48%; height: 48%; left: 50%; top: 50%; transform-origin: left top; background: linear-gradient(45deg, rgba(200, 255, 103, 0.35), transparent 70%); animation: sweep 3s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

.scanner-animation { position: relative; width: 180px; height: 126px; border: 1px solid rgba(200, 255, 103, 0.22); background: rgba(255, 255, 255, 0.025); overflow: hidden; }
.scanner-animation::before { content: "FILE"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.12); font-size: 30px; font-weight: 900; letter-spacing: 0.15em; }
.scanner-animation i { position: absolute; left: 0; right: 0; height: 2px; background: var(--lime); box-shadow: 0 0 20px var(--lime); animation: scan 1.8s ease-in-out infinite alternate; }
@keyframes scan { from { top: 7px; } to { top: 117px; } }
.progress-result > span { margin-top: 24px; color: var(--lime); font-size: 10px; font-weight: 900; letter-spacing: 0.16em; }
.progress-track { width: min(360px, 80%); height: 3px; margin-top: 24px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress-track i { display: block; width: 15%; height: 100%; background: var(--lime); transition: width 300ms ease; }

.final-result { position: relative; z-index: 1; padding-top: 27px; }
.verdict-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.verdict-head span { color: var(--lime); font-size: 10px; font-weight: 900; letter-spacing: 0.14em; }
.verdict-head h2 { margin: 7px 0 0; font-size: 34px; }
.verdict-badge { padding: 9px 12px; border: 1px solid var(--lime); color: var(--lime); font-size: 11px; letter-spacing: 0.08em; }
.final-result[data-tone="danger"] .verdict-badge { border-color: #ff8b8b; color: #ff8b8b; }
.final-result[data-tone="warning"] .verdict-badge { border-color: #ffc067; color: #ffc067; }
.verdict-description { color: #abc1bc; line-height: 1.6; }
.report-facts { margin: 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.report-facts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 15px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.report-facts dt { color: #86a09a; font-size: 12px; }
.report-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-size: 13px; }
.check-heading { display: flex; justify-content: space-between; color: #86a09a; font-size: 11px; letter-spacing: 0.1em; }
.check-list { margin-top: 10px; max-height: 230px; overflow: auto; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.check-item { display: grid; grid-template-columns: 115px 54px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); align-items: start; }
.check-item strong { font-size: 12px; }
.check-item b { color: var(--lime); font-size: 10px; }
.check-item[data-status="FAIL"] b { color: #ff8b8b; }
.check-item[data-status="WARN"] b, .check-item[data-status="SKIP"] b { color: #ffc067; }
.check-item span { color: #abc1bc; font-size: 12px; line-height: 1.45; }
.notice { color: #86a09a; font-size: 11px; line-height: 1.5; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }

.explanation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 44px 0 70px; border: 1px solid rgba(11, 23, 32, 0.12); background: rgba(11, 23, 32, 0.12); }
.explanation > div { padding: 28px; background: #edf3ef; }
.explanation span { color: var(--teal); font-size: 11px; font-weight: 900; }
.explanation strong { display: block; margin-top: 30px; font-size: 18px; }
.explanation p { color: var(--muted); font-size: 13px; line-height: 1.65; }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 35px; border-top: 1px solid rgba(11, 23, 32, 0.12); display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; color: var(--muted); font-size: 11px; }
footer strong { color: var(--ink); letter-spacing: 0.12em; }
footer p { margin: 0; text-align: center; }
footer span { text-align: right; }

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .upload-card, .result-card { min-height: auto; }
  .explanation { grid-template-columns: 1fr; }
  .hero { padding-top: 52px; }
  .hero h1 { font-size: clamp(46px, 13vw, 72px); }
  footer { grid-template-columns: 1fr; text-align: left; }
  footer p, footer span { text-align: left; }
}

@media (max-width: 560px) {
  .topbar { width: min(100% - 24px, 1180px); height: 72px; }
  .topbar nav a { display: none; }
  .health { font-size: 0; }
  main, footer { width: min(100% - 24px, 1180px); }
  .hero { padding-bottom: 38px; }
  .hero > p { font-size: 16px; }
  .upload-card, .result-card { padding: 24px; }
  .verdict-head { align-items: flex-start; flex-direction: column; }
  .report-facts > div { grid-template-columns: 90px 1fr; }
  .check-item { grid-template-columns: 92px 45px 1fr; }
  .result-actions { flex-direction: column; }
}
