:root {
  --bg: #081a1d;
  --bg-alt: #10282d;
  --panel: rgba(250, 245, 235, 0.94);
  --panel-strong: #f7f1e6;
  --ink: #132428;
  --ink-soft: #4d6769;
  --line: rgba(20, 52, 58, 0.12);
  --accent: #0f8f83;
  --accent-strong: #0a6a61;
  --accent-warm: #c66b2f;
  --accent-warm-soft: rgba(198, 107, 47, 0.16);
  --danger: #8b2f2f;
  --shadow: 0 24px 60px rgba(4, 22, 24, 0.22);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  color: #f6efe4;
  background:
    radial-gradient(circle at top left, rgba(231, 163, 86, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 143, 131, 0.2), transparent 30%),
    linear-gradient(145deg, #071517 0%, #0c2226 42%, #133238 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
}

.page-shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.hero-panel,
.search-card,
.results-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px 34px 32px;
  background:
    linear-gradient(135deg, rgba(250, 245, 235, 0.08), rgba(250, 245, 235, 0.02)),
    linear-gradient(120deg, rgba(15, 143, 131, 0.3), rgba(198, 107, 47, 0.18));
}

.hero-copy::after,
.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(247, 241, 230, 0.22), transparent 72%);
}

.hero-panel {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(8, 30, 34, 0.9), rgba(9, 26, 29, 0.88)),
    linear-gradient(160deg, rgba(198, 107, 47, 0.26), transparent 42%);
}

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f0c59f;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.35rem, 4vw, 4.6rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 54ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(246, 239, 228, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ghost-pill,
.primary-button,
.secondary-button {
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.ghost-pill {
  padding: 11px 14px;
  border-radius: 999px;
  color: #fff6ea;
  background: rgba(247, 241, 230, 0.08);
  border: 1px solid rgba(247, 241, 230, 0.14);
}

.ghost-pill:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.hero-stats article {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(247, 241, 230, 0.08);
  border: 1px solid rgba(247, 241, 230, 0.1);
}

.hero-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.hero-stats span {
  color: rgba(246, 239, 228, 0.72);
  font-size: 0.94rem;
  line-height: 1.55;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
}

.search-card,
.results-card {
  background: var(--panel);
  color: var(--ink);
  padding: 28px;
}

.search-card::before,
.results-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head .eyebrow {
  color: var(--accent-strong);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 2vw, 2.2rem);
}

.section-note {
  max-width: 28ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.quick-guide {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(16, 40, 45, 0.07), rgba(16, 40, 45, 0.03)),
    linear-gradient(120deg, rgba(15, 143, 131, 0.12), rgba(198, 107, 47, 0.1));
  border: 1px solid rgba(8, 43, 47, 0.08);
}

.quick-guide-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.quick-guide-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(8, 43, 47, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.search-form:not(.is-advanced) .field-advanced {
  display: none;
}

.field-primary input {
  min-height: 56px;
  font-size: 1rem;
}

.field,
.toggle {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span,
.toggle span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(8, 43, 47, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(15, 143, 131, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 143, 131, 0.12);
}

.advanced-toggle {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px dashed rgba(8, 43, 47, 0.18);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.toggle {
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 143, 131, 0.06);
  border: 1px solid rgba(15, 143, 131, 0.09);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.support-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(8, 43, 47, 0.08);
}

.support-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.support-head .eyebrow {
  margin-bottom: 8px;
}

.support-head h3,
.comparison-head h3,
.analytics-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.28rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.support-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 143, 131, 0.12);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  color: var(--ink-soft);
  line-height: 1.6;
}

.mini-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 143, 131, 0.05);
  border: 1px solid rgba(15, 143, 131, 0.08);
}

.mini-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.mini-item strong {
  display: block;
  color: var(--ink);
}

.mini-item small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(8, 43, 47, 0.12);
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.mini-button.delete {
  color: var(--danger);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 800;
}

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

.secondary-button {
  background: white;
  color: var(--ink);
  border: 1px solid rgba(8, 43, 47, 0.12);
}

.secondary-button:disabled,
.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.results-actions {
  display: flex;
  gap: 12px;
}

.results-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.toolbar-field span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar-field select {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(8, 43, 47, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.toolbar-field select:focus {
  border-color: rgba(15, 143, 131, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 143, 131, 0.12);
}

.results-meta {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.toolbar-toggle.is-active {
  background: var(--ink);
  color: white;
}

.status-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 143, 131, 0.12), rgba(198, 107, 47, 0.09));
  color: var(--ink);
  border: 1px solid rgba(15, 143, 131, 0.18);
}

.status-banner.is-hidden {
  display: none;
}

.warning-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.warning-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(198, 107, 47, 0.1);
  border: 1px solid rgba(198, 107, 47, 0.18);
  color: #6d4017;
  font-size: 0.95rem;
}

.assistant-panel {
  margin-bottom: 18px;
}

.assistant-panel.is-hidden {
  display: none;
}

.assistant-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(198, 107, 47, 0.1), rgba(198, 107, 47, 0.03)),
    rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(198, 107, 47, 0.18);
}

.assistant-copy h3 {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.assistant-copy p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.assistant-notes {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #6d4017;
  line-height: 1.6;
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-button {
  min-height: 40px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(16, 40, 45, 0.05), rgba(16, 40, 45, 0.02)),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(8, 43, 47, 0.08);
}

.summary-card span,
.summary-card small {
  display: block;
}

.summary-card span {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.summary-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.summary-card small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.active-query {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.query-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 143, 131, 0.1);
  color: var(--accent-strong);
  border: 1px solid rgba(15, 143, 131, 0.16);
  font-size: 0.9rem;
  font-weight: 700;
}

.comparison-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(165deg, rgba(9, 39, 44, 0.92), rgba(18, 54, 60, 0.9)),
    linear-gradient(120deg, rgba(198, 107, 47, 0.22), transparent 45%);
  color: #f6efe4;
}

.comparison-panel.is-hidden {
  display: none;
}

.comparison-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.comparison-note {
  margin: 0;
  max-width: 34ch;
  color: rgba(246, 239, 228, 0.74);
  line-height: 1.6;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.comparison-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(247, 241, 230, 0.08);
  border: 1px solid rgba(247, 241, 230, 0.1);
}

.comparison-card h4 {
  margin: 0;
  font-size: 1rem;
}

.comparison-meta {
  display: grid;
  gap: 8px;
}

.comparison-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: rgba(246, 239, 228, 0.84);
  font-size: 0.92rem;
}

.comparison-metric strong {
  font-size: 1.25rem;
  color: white;
}

.analytics-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.analytics-panel.is-hidden {
  display: none;
}

.analytics-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.analytics-note {
  margin: 0;
  max-width: 40ch;
  color: var(--ink-soft);
  line-height: 1.6;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.analytics-kpi {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(240, 236, 227, 0.9)),
    linear-gradient(120deg, rgba(15, 143, 131, 0.1), rgba(198, 107, 47, 0.08));
  border: 1px solid rgba(8, 43, 47, 0.08);
}

.analytics-kpi span {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-kpi strong {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.analytics-kpi small {
  color: var(--ink-soft);
  line-height: 1.55;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.analytics-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(8, 43, 47, 0.08);
}

.analytics-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.analytics-card-head h4 {
  margin: 6px 0 0;
  font-family: "Fraunces", serif;
  font-size: 1.22rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.analytics-card-head small {
  color: var(--ink-soft);
  max-width: 34ch;
  line-height: 1.55;
}

.analytics-groups,
.analytics-theme-groups {
  display: grid;
  gap: 12px;
}

.analytics-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(240, 236, 227, 0.72);
  border: 1px solid rgba(8, 43, 47, 0.06);
}

.analytics-group-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.analytics-group-head h5 {
  margin: 0;
  font-size: 1rem;
}

.analytics-group-head small {
  color: var(--ink-soft);
  line-height: 1.55;
}

.analytics-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(198, 107, 47, 0.12);
  color: #8b4c1d;
  font-size: 0.8rem;
  font-weight: 800;
}

.analytics-bars {
  display: grid;
  gap: 10px;
}

.analytics-bar-row {
  display: grid;
  gap: 8px;
}

.analytics-bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.analytics-bar-meta strong {
  font-size: 0.94rem;
}

.analytics-bar-meta span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  white-space: nowrap;
}

.analytics-bar-track {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(8, 43, 47, 0.08);
}

.analytics-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-size, 0%);
  min-width: 0;
  border-radius: inherit;
}

.analytics-bar-fill.status {
  background: linear-gradient(90deg, rgba(15, 143, 131, 0.95), rgba(90, 181, 162, 0.92));
}

.analytics-bar-fill.type {
  background: linear-gradient(90deg, rgba(198, 107, 47, 0.96), rgba(228, 169, 93, 0.92));
}

.analytics-empty {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

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

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 143, 131, 0.08);
  border: 1px solid rgba(15, 143, 131, 0.09);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.theme-chip small {
  color: var(--accent-warm);
  font-size: 0.78rem;
  font-weight: 900;
}

.table-shell {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(8, 43, 47, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.table-panel {
  display: grid;
  gap: 14px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.results-table th,
.results-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.results-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0ece3;
  color: var(--ink-soft);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.results-table tbody tr {
  animation: row-enter 280ms ease both;
}

.results-table tbody tr.result-row {
  cursor: pointer;
  transition: background-color 180ms ease;
}

.results-table tbody tr.result-row:hover {
  background: rgba(15, 143, 131, 0.05);
}

.results-table tbody tr.result-row.is-selected {
  background: rgba(15, 143, 131, 0.1);
  box-shadow: inset 4px 0 0 var(--accent);
}

@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.camara {
  background: rgba(15, 143, 131, 0.12);
  color: var(--accent-strong);
}

.badge.senado {
  background: rgba(198, 107, 47, 0.14);
  color: #8b4c1d;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(8, 43, 47, 0.06);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.item-title {
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--ink);
}

.item-meta,
.item-copy,
.item-links {
  display: grid;
  gap: 8px;
}

.item-meta small,
.item-copy small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.item-copy details {
  border-radius: 12px;
  background: rgba(15, 143, 131, 0.05);
  border: 1px solid rgba(15, 143, 131, 0.09);
  padding: 10px 12px;
}

.item-copy summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-strong);
}

.item-copy p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.item-links a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.item-links a:hover {
  text-decoration: underline;
}

.detail-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(15, 143, 131, 0.1);
  color: var(--accent-strong);
  border: 1px solid rgba(15, 143, 131, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
}

.favorite-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(198, 107, 47, 0.1);
  color: #8b4c1d;
  border: 1px solid rgba(198, 107, 47, 0.2);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.favorite-trigger.is-active {
  background: rgba(198, 107, 47, 0.18);
}

.detail-trigger:hover {
  background: rgba(15, 143, 131, 0.16);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination .secondary-button {
  min-height: 46px;
}

.pagination-info {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(242, 236, 225, 0.95)),
    linear-gradient(180deg, rgba(15, 143, 131, 0.06), rgba(198, 107, 47, 0.07));
  border: 1px solid rgba(8, 43, 47, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.detail-empty h3,
.detail-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.detail-empty p:last-child,
.detail-summary,
.detail-copy,
.detail-meta-value {
  color: var(--ink-soft);
  line-height: 1.65;
}

.detail-content {
  display: grid;
  gap: 18px;
}

.detail-header {
  display: grid;
  gap: 14px;
}

.detail-badges,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(8, 43, 47, 0.06);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.detail-chip.warm {
  background: rgba(198, 107, 47, 0.12);
  color: #8b4c1d;
}

.detail-chip.strong {
  background: rgba(15, 143, 131, 0.12);
  color: var(--accent-strong);
}

.detail-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.detail-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(8, 43, 47, 0.08);
}

.detail-section h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.detail-section p {
  margin: 0;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-metric {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 143, 131, 0.06);
}

.detail-meta-label {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-meta-value {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.detail-link.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid rgba(8, 43, 47, 0.12);
}

.empty-row td {
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-soft);
}

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

  .analytics-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .search-card,
  .results-card {
    border-radius: 22px;
  }

  .hero-copy,
  .search-card,
  .results-card {
    padding: 22px;
  }

  .search-form,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

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

  .results-toolbar,
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-group {
    width: 100%;
    flex-direction: column;
  }

  .toolbar-field {
    min-width: 0;
  }

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

  .analytics-head,
  .analytics-card-head,
  .analytics-group-head,
  .comparison-head,
  .support-head {
    flex-direction: column;
    align-items: start;
  }

  .results-table {
    min-width: 760px;
  }
}

/* Editorial refresh */

:root {
  --bg: #f4ecdf;
  --bg-alt: #eadbc6;
  --panel: rgba(255, 251, 245, 0.92);
  --panel-strong: #fffdf8;
  --ink: #1b252c;
  --ink-soft: #5e6e74;
  --line: rgba(27, 37, 44, 0.08);
  --accent: #b4492d;
  --accent-strong: #91361c;
  --accent-warm: #d88b3a;
  --accent-warm-soft: rgba(216, 139, 58, 0.12);
  --shadow: 0 22px 64px rgba(79, 49, 19, 0.12);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(180, 73, 45, 0.12), transparent 22%),
    radial-gradient(circle at 85% 15%, rgba(24, 122, 107, 0.1), transparent 25%),
    linear-gradient(180deg, #f7f0e5 0%, #f1e5d4 52%, #efe9dc 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(27, 37, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 37, 44, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  padding: 26px 0 56px;
}

.layout {
  grid-template-columns: 1fr;
  gap: 22px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(27, 37, 44, 0.9);
  color: #f8efe1;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-chip-muted {
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.search-card,
.results-card {
  border: 1px solid rgba(27, 37, 44, 0.08);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
  padding: 34px;
  color: #fff7eb;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(135deg, #1b252c 0%, #223641 52%, #335060 100%);
}

.hero-copy::after,
.hero-panel::after,
.search-card::before,
.results-card::before {
  display: none;
}

.hero-panel {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(216, 139, 58, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 243, 0.94));
}

.eyebrow,
.panel-kicker,
.section-head .eyebrow,
.support-head .eyebrow {
  color: var(--accent);
  letter-spacing: 0.16em;
}

.hero h1,
.section-head h2,
.support-head h3,
.comparison-head h3,
.analytics-head h3,
.quick-guide-head h3,
.hero-panel h2,
.workbench-head h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(2.8rem, 4.2vw, 5rem);
  line-height: 0.92;
}

.hero-text {
  max-width: 58ch;
  margin-top: 18px;
  color: rgba(255, 247, 235, 0.78);
  font-size: 1.02rem;
}

.hero-actions {
  margin-top: 26px;
}

.ghost-pill {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 235, 0.12);
  background: rgba(255, 247, 235, 0.09);
  color: #fff8ef;
  font-weight: 700;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.hero-point {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 247, 235, 0.07);
  border: 1px solid rgba(255, 247, 235, 0.08);
}

.hero-point strong {
  font-size: 1rem;
}

.hero-point span {
  color: rgba(255, 247, 235, 0.78);
  line-height: 1.6;
  font-size: 0.92rem;
}

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

.hero-panel-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  line-height: 0.96;
}

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

.scenario-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.scenario-card strong {
  font-size: 1rem;
  line-height: 1.4;
}

.scenario-card span,
.hero-panel-footer p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.94rem;
}

.hero-panel-footer {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(180, 73, 45, 0.08);
  border: 1px solid rgba(180, 73, 45, 0.12);
}

.hero-mini-label {
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-card,
.results-card {
  padding: 30px;
  background: rgba(255, 252, 247, 0.86);
  backdrop-filter: blur(8px);
}

.search-card-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.search-story,
.search-workbench {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.search-story {
  background:
    radial-gradient(circle at top left, rgba(216, 139, 58, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 247, 235, 0.92), rgba(250, 240, 226, 0.88));
}

.search-workbench {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 244, 236, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.section-head-compact {
  margin-bottom: 0;
}

.section-head h2 {
  font-size: clamp(1.7rem, 2vw, 2.35rem);
}

.section-note,
.search-story-copy,
.quick-guide-copy,
.workbench-note {
  color: var(--ink-soft);
  line-height: 1.7;
}

.section-note {
  max-width: 34ch;
}

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

.story-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.story-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(180, 73, 45, 0.1);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

.story-card strong {
  font-size: 1rem;
}

.story-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.93rem;
}

.quick-guide {
  gap: 14px;
  margin-bottom: 0;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(27, 37, 44, 0.94), rgba(35, 53, 62, 0.95)),
    linear-gradient(135deg, rgba(216, 139, 58, 0.16), transparent);
  border: 1px solid rgba(27, 37, 44, 0.1);
}

.quick-guide .eyebrow,
.quick-guide-copy,
.quick-guide-head h3 {
  color: #fff7eb;
}

.quick-guide-copy {
  color: rgba(255, 247, 235, 0.7);
}

.quick-pill {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 247, 235, 0.1);
  background: rgba(255, 247, 235, 0.08);
  color: #fff7eb;
  font-weight: 700;
}

.quick-pill:hover,
.quick-pill:focus-visible {
  background: rgba(255, 247, 235, 0.14);
}

.workbench-head {
  display: grid;
  gap: 8px;
}

.workbench-head h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
}

.search-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field span,
.toggle span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.field input,
.field select {
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(27, 37, 44, 0.1);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 16px;
  font-size: 0.98rem;
}

.field input::placeholder {
  color: rgba(94, 110, 116, 0.88);
}

.field input:focus,
.field select:focus {
  border-color: rgba(180, 73, 45, 0.34);
  box-shadow: 0 0 0 4px rgba(180, 73, 45, 0.1);
}

.field-primary input {
  min-height: 60px;
  font-size: 1.02rem;
}

.advanced-toggle {
  min-height: 48px;
  border-radius: 16px;
  border: 1px dashed rgba(27, 37, 44, 0.18);
  background: rgba(244, 236, 223, 0.74);
  color: var(--ink-soft);
  font-weight: 800;
}

.toggle {
  min-height: 58px;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(180, 73, 45, 0.06);
  border: 1px solid rgba(180, 73, 45, 0.12);
}

.toggle input {
  margin: 0;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  font-weight: 800;
}

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

.secondary-button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.support-grid {
  margin-top: 18px;
  gap: 16px;
}

.support-card {
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(27, 37, 44, 0.08);
}

.support-head h3 {
  font-size: 1.18rem;
}

.support-counter {
  min-width: 38px;
  min-height: 38px;
  border-radius: 14px;
  background: rgba(27, 37, 44, 0.08);
  color: var(--ink);
}

.results-card {
  background: rgba(255, 253, 248, 0.92);
}

.summary-card,
.analytics-card,
.comparison-card,
.table-shell,
.detail-panel,
.assistant-card {
  border-radius: 22px;
}

@media (max-width: 1180px) {
  .hero-main,
  .search-card-shell {
    grid-template-columns: 1fr;
  }

  .hero-points,
  .story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .search-card,
  .results-card,
  .search-story,
  .search-workbench {
    padding: 22px;
    border-radius: 24px;
  }

  .search-form,
  .summary-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: clamp(2.3rem, 10vw, 3.5rem);
  }
}
