:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f6f8fb;
}

* {
  box-sizing: border-box;
}

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

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 32px;
}

.hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(15, 91, 107, 0.9), rgba(24, 49, 83, 0.88)),
    url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 310px;
  padding: 42px;
}

.hero-copy {
  align-self: end;
  max-width: 760px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 18px;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.55;
  max-width: 690px;
}

.score-panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: grid;
  gap: 4px;
  padding: 22px;
}

.score-panel span,
.score-panel small {
  color: rgba(255, 255, 255, 0.78);
}

.score-panel strong {
  font-size: 54px;
  line-height: 1;
}

.workspace {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  margin-top: 24px;
}

.tabs {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce5ee;
  box-shadow: 0 14px 36px rgba(30, 48, 86, 0.08);
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding: 10px;
  width: fit-content;
}

.tab-button {
  appearance: none;
  -webkit-appearance: none;
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #d7e1ec;
  color: #53627a;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  min-width: 150px;
  padding: 0 22px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.tab-button:hover {
  background: #eaf2f5;
  border-color: #b9c9d8;
  color: #1f2f4d;
  transform: translateY(-1px);
}

.tab-button.is-active {
  background: linear-gradient(135deg, #126b72, #27906d);
  border-color: #126b72;
  box-shadow: 0 10px 22px rgba(18, 107, 114, 0.24);
  color: #ffffff;
}

.upload-area,
.status-panel,
.details {
  background: #ffffff;
  border: 1px solid #dde4ee;
  box-shadow: 0 16px 45px rgba(30, 48, 86, 0.08);
}

.dropzone {
  align-items: center;
  border: 2px dashed #9fb0c7;
  display: grid;
  justify-items: center;
  margin: 18px;
  min-height: 300px;
  padding: 32px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone.is-dragging {
  background: #effaf8;
  border-color: #148c7e;
}

.upload-icon {
  align-items: center;
  background: #effaf8;
  color: #126b72;
  display: flex;
  font-size: 36px;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  width: 64px;
}

.dropzone h2 {
  font-size: 26px;
  margin: 12px 0 8px;
}

.dropzone p {
  color: #617089;
  line-height: 1.5;
  max-width: 520px;
}

.primary-button,
.file-row button,
.download-grid button {
  align-items: center;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.primary-button {
  background: #126b72;
  color: white;
  min-height: 44px;
  padding: 0 18px;
}

.file-row {
  align-items: center;
  border-top: 1px solid #e3e9f2;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 16px 20px;
}

.file-icon {
  color: #126b72;
  font-size: 24px;
}

.file-row strong,
.file-row span {
  display: block;
  overflow-wrap: anywhere;
}

.file-row span {
  color: #687890;
  font-size: 13px;
}

.file-row button {
  background: #1f2f4d;
  color: #fff;
  min-height: 40px;
  padding: 0 18px;
}

.file-row button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.status-panel {
  padding: 24px;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.panel-heading span {
  color: #126b72;
  font-size: 28px;
  font-weight: 800;
}

.progress-track {
  background: #e8edf4;
  height: 13px;
  margin: 22px 0 14px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #126b72, #38a169);
  height: 100%;
  transition: width 240ms ease;
  width: 0;
}

.status-message {
  color: #64728a;
  min-height: 28px;
}

.status-message.done {
  color: #16724a;
}

.status-message.error {
  color: #b42318;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
}

.metric {
  background: #f5f7fb;
  border: 1px solid #e1e8f1;
  padding: 14px;
}

.metric span {
  color: #64728a;
  display: block;
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 6px;
}

.metric.good strong {
  color: #16724a;
}

.metric.bad strong {
  color: #b42318;
}

.download-grid {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.download-grid button {
  background: #ffffff;
  border: 1px solid #cfd9e7;
  color: #1d2b45;
  min-height: 42px;
}

.details {
  display: grid;
  gap: 24px;
  grid-template-columns: 260px 1fr;
  margin-top: 22px;
  padding: 22px;
}

.details h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.details p {
  color: #126b72;
  font-weight: 800;
  margin-bottom: 0;
}

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.domain-list span {
  background: #eef4f7;
  color: #2d3a50;
  display: inline-flex;
  gap: 8px;
  padding: 8px 10px;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 14px;
  }

  .hero,
  .workspace,
  .details {
    grid-template-columns: 1fr;
  }

  .tabs {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .tab-button {
    width: 100%;
  }

  .hero {
    padding: 28px;
  }

  .score-panel {
    align-self: start;
  }

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

  .file-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-row button {
    grid-column: 1 / -1;
  }
}
