:root {
  --bg: #f4efe5;
  --ink: #1f1b17;
  --muted: #685e56;
  --card: rgba(255, 250, 240, 0.82);
  --line: rgba(31, 27, 23, 0.11);
  --accent: #106a5b;
  --accent-strong: #0a4d42;
  --accent-soft: #daf0e7;
  --shadow: 0 26px 72px rgba(74, 56, 40, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(16, 106, 91, 0.14), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(189, 116, 62, 0.14), transparent 18%),
    linear-gradient(180deg, #fbf7f1 0%, #f4efe5 48%, #ece3d4 100%);
}

.backdrop {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.46;
  pointer-events: none;
}

.left {
  left: -10rem;
  top: -10rem;
  background: rgba(63, 154, 130, 0.25);
}

.right {
  right: -10rem;
  bottom: -9rem;
  background: rgba(201, 109, 53, 0.22);
}

.shell-header,
.shell-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem;
}

.shell-header {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #53ab94);
  box-shadow: 0 0 0 8px rgba(16, 106, 91, 0.12);
}

.brand-label,
.eyebrow,
.panel-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}

.brand h1,
.hero h2,
.panel h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  letter-spacing: -0.03em;
}

.brand h1 {
  font-size: 1.45rem;
}

.badge {
  border: 1px solid rgba(16, 106, 91, 0.18);
  background: rgba(255, 255, 255, 0.66);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero,
.panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
}

.hero h2 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.94;
  max-width: 10ch;
}

.hero p {
  line-height: 1.75;
  color: var(--muted);
}

.hero-meta {
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.hero-meta div {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(18, 20, 18, 0.9);
  color: #f7f3eb;
}

.hero-meta dt {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(247, 243, 235, 0.62);
}

.hero-meta dd {
  margin: 0.45rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.panel-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.panel {
  padding: 1.5rem;
}

.panel-head {
  margin-bottom: 1rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric-card {
  padding: 1.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(218, 240, 231, 0.84), rgba(255, 255, 255, 0.75));
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.search-field {
  display: block;
}

.search-field span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-weight: 600;
}

.search-field input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  font: inherit;
  background: rgba(255, 255, 255, 0.72);
}

.dataset-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  max-height: 26rem;
  overflow: auto;
}

.dataset-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.dataset-card:hover,
.dataset-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(16, 106, 91, 0.36);
  background: rgba(218, 240, 231, 0.6);
}

.dataset-card h4,
.dataset-card p {
  margin: 0;
}

.dataset-card h4 {
  font-size: 1rem;
}

.dataset-meta {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dataset-meta span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 106, 91, 0.1);
  font-size: 0.78rem;
  color: var(--accent-strong);
}

.panel-preview {
  margin-top: 1.2rem;
}

.preview-description {
  margin-top: -0.2rem;
  color: var(--muted);
}

.preview-table {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.preview-table.empty {
  padding: 1.5rem;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

th,
td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

td {
  font-size: 0.95rem;
}

.empty-state {
  padding: 1rem 0;
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .shell-header {
    flex-direction: column;
    align-items: flex-start;
  }

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