:root {
  --bg: #f5efe3;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: #ffffff;
  --ink: #1f2937;
  --muted: #596579;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --line: rgba(15, 118, 110, 0.18);
  --shadow: 0 22px 60px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 26%),
    linear-gradient(135deg, #f8f4ea, #efe4d1);
  font-family: Georgia, "Times New Roman", serif;
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-copy,
.hero-card,
.panel,
.subpanel,
.metric-card {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2rem;
}

.hero-card {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  align-content: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
}

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

h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.95;
  margin-bottom: 1rem;
}

.hero-text {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.hero-pills,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-pills span,
.inline-link,
.ghost-button,
.primary-button {
  border-radius: 999px;
}

.hero-pills span {
  padding: 0.45rem 0.8rem;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 2px dashed rgba(15, 118, 110, 0.3);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  text-align: center;
  padding: 2rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.dropzone input {
  display: none;
}

#csvFile {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dropzone.drag-active {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.65);
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.dropzone-subtitle,
.status-text,
.metric-label {
  color: var(--muted);
}

.primary-button,
.ghost-button {
  border: 0;
  padding: 0.9rem 1.2rem;
  font-size: 0.96rem;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.ghost-button,
.inline-link {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  padding: 0.75rem 1rem;
}

.results-grid,
.metrics-grid {
  display: grid;
  gap: 1rem;
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 1rem;
}

.metric-card {
  padding: 1rem;
}

.metric-card strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 0.35rem;
}

.results-grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
}

.subpanel {
  padding: 1.2rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.8rem;
  border-bottom: 1px solid rgba(89, 101, 121, 0.18);
  text-align: left;
  white-space: nowrap;
}

th {
  background: rgba(15, 118, 110, 0.1);
}

.metric {
  border-bottom: 1px solid rgba(89, 101, 121, 0.16);
  padding-bottom: 1rem;
}

.metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .hero,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
