:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #eef6f5;
  --text: #10201f;
  --muted: #62706d;
  --line: #d9e4e1;
  --brand: #0f766e;
  --brand-2: #0e9f6e;
  --accent: #c2410c;
  --danger: #b91c1c;
  --warn: #b45309;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 14px 20px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.logo {
  align-items: center;
  background: #0f766e;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav button,
.nav a,
.ghost,
.primary,
.danger,
.icon-btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
}

.nav button,
.nav a,
.ghost,
.icon-btn {
  background: transparent;
  color: var(--text);
}

.nav button.active,
.ghost:hover,
.icon-btn:hover {
  background: var(--panel-2);
  border-color: var(--line);
}

.primary {
  background: var(--brand);
  color: #fff;
}

.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--danger);
}

.main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 26px 20px 56px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  min-height: calc(100vh - 124px);
  padding: 40px 0 26px;
}

.hero-copy h1 {
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.98;
  margin: 0 0 18px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
  margin: 0 0 28px;
  max-width: 720px;
}

.hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-searches {
  display: grid;
  gap: 8px;
}

.sample {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

.metric {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.metric strong {
  font-size: 34px;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.split {
  display: grid;
  gap: 12px;
  grid-template-columns: 120px minmax(0, 1fr);
}

.tabs {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tabs button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 12px;
}

.tabs button.active {
  background: #fff;
  color: var(--brand);
}

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.pill {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  padding: 4px 8px;
}

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  padding: 12px;
}

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: var(--danger);
  padding: 12px;
}

.success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  padding: 12px;
}

.result-grid {
  display: grid;
  gap: 12px;
}

.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.result-card h3 {
  margin: 0 0 8px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

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

  .hero {
    min-height: auto;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

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