:root {
  --bg: #f4efe6;
  --bg-strong: #eaddc9;
  --ink: #18212f;
  --muted: #667085;
  --line: rgba(24, 33, 47, 0.12);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --field: #f8f4ee;
  --brand: #0f4c5c;
  --brand-strong: #0a3440;
  --accent: #b98239;
  --danger: #a8384a;
  --warning: #8b5e1a;
  --shadow: 0 24px 60px rgba(20, 29, 42, 0.12);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(185, 130, 57, 0.18), transparent 26%),
    radial-gradient(circle at right 15%, rgba(15, 76, 92, 0.16), transparent 30%),
    linear-gradient(180deg, #f7f2ea 0%, #efe6d7 100%);
}

h1,
h2 {
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero-panel,
.feature-strip,
.control-surface,
.saved-profiles,
.results-area,
.intro {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 22px;
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero-panel::before {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -70px;
  background: rgba(15, 76, 92, 0.08);
}

.hero-panel::after {
  width: 220px;
  height: 220px;
  left: -80px;
  bottom: -100px;
  background: rgba(185, 130, 57, 0.12);
}

.topbar,
.hero-grid,
.feature-strip,
.workspace {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 6px 26px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topnav a,
.site-footer nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.topnav a[aria-current="page"],
.topnav a:hover,
.site-footer nav a:hover {
  background: rgba(15, 76, 92, 0.08);
  color: var(--brand);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-kicker,
.topbar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  gap: 22px;
}

.hero-copy,
.hero-aside {
  border-radius: 30px;
}

.hero-copy {
  padding: clamp(22px, 4vw, 38px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.92));
}

.hero-eyebrow,
.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  letter-spacing: 0.09em;
}

.hero-title {
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  line-height: 1.02;
  max-width: 15ch;
}

.hero-lede,
.lede,
.status-message,
.result-text {
  color: var(--muted);
}

.hero-lede {
  max-width: 48ch;
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  padding: 11px 18px;
}

.hero-hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-aside {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(160deg, rgba(15, 76, 92, 0.92), rgba(10, 52, 64, 0.96));
  color: #edf5f7;
}

.hero-figure {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 0;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-figure img {
  width: min(100%, 190px);
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.hero-ad-slot {
  min-height: 180px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  align-content: center;
}

.hero-ad-slot strong {
  display: block;
  font-size: 1rem;
}

.ad-banner,
.legal-card,
.consult-highlight,
.results-showcase {
  margin-top: 22px;
}

.ad-banner,
.ad-box,
.legal-card,
.consult-highlight,
.results-showcase {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.consult-highlight,
.results-showcase {
  padding: 24px;
}

.consult-highlight {
  display: grid;
  gap: 18px;
}

.consult-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.consult-intro p:last-child {
  max-width: 48ch;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.consult-surface {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.92);
}

.consult-profiles {
  padding: 20px;
}

.results-showcase {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: start;
}

.results-main {
  min-width: 0;
}

.ad-rail {
  display: grid;
  gap: 20px;
}

.ad-box {
  min-height: 180px;
}

.ad-box.tall {
  min-height: 320px;
}

.ad-banner {
  padding: 24px 26px;
}

.ad-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-banner strong,
.ad-box p,
.site-footer strong {
  display: block;
}

.ad-banner p,
.info-card p,
.content-card p,
.ad-box p,
.site-footer p,
.legal-card p {
  color: var(--muted);
  line-height: 1.7;
}

.ad-box,
.legal-card {
  padding: 24px;
}

.site-footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 22px 8px 0;
}

.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-shell {
  padding-bottom: 40px;
}

.compact-hero {
  padding-bottom: 28px;
}

.legal-hero-copy {
  max-width: 760px;
  padding: 8px 8px 6px;
}

.workspace {
  margin-top: 22px;
  gap: 20px;
}

.intro {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.intro > div {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.92));
}

.control-surface,
.saved-profiles,
.results-area {
  border-radius: 24px;
}

input,
select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(24, 33, 47, 0.1);
  background: var(--field);
}

button {
  border-radius: 999px;
  background: var(--brand);
  border-color: var(--brand);
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

button:hover,
.hero-button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.secondary {
  color: var(--brand);
}

.status-pill {
  border-color: rgba(15, 76, 92, 0.12);
  background: rgba(15, 76, 92, 0.08);
  color: var(--brand);
}

.status-pill.error {
  color: var(--danger);
  background: rgba(168, 56, 74, 0.08);
  border-color: rgba(168, 56, 74, 0.15);
}

.status-pill.loading {
  color: var(--warning);
  background: rgba(139, 94, 26, 0.1);
  border-color: rgba(139, 94, 26, 0.15);
}

.profile-card,
.result-card,
.publication-details div,
.empty-state {
  border-radius: var(--radius-md);
}

.profile-card,
.result-card {
  background: var(--surface-strong);
  border-color: rgba(24, 33, 47, 0.08);
}

.publication-details div {
  background: var(--field);
}

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

  .consult-intro {
    display: grid;
    align-items: start;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 10px;
  }

  .topbar,
  .site-footer,
  .ad-rail {
    grid-template-columns: 1fr;
  }

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

  .consult-highlight,
  .results-showcase {
    padding: 18px;
  }

  .site-footer {
    display: grid;
    padding-top: 8px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}
