:root {
  --ink: #0c1f24;
  --ink-soft: #243a40;
  --paper: #f3efe6;
  --paper-2: #e7e1d4;
  --lime: #c6f04d;
  --lime-deep: #9bc428;
  --mist: rgba(255, 255, 255, 0.08);
  --line: rgba(12, 31, 36, 0.12);
  --shadow: 0 24px 60px rgba(12, 31, 36, 0.18);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --radius: 18px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% -10%, #d8f08a 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 0%, #7eb8c9 0%, transparent 50%),
    linear-gradient(160deg, #f7f3ea 0%, #e8f0ea 45%, #dfe8e4 100%);
  background-attachment: fixed;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

#app {
  min-height: 100vh;
}

.shell {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ????????? Nav ????????? */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 0;
  animation: rise 0.7s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, var(--lime), #2f6b5a, #1f4e79, var(--lime));
  box-shadow: inset 0 0 0 3px var(--paper);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 35% 46% 20% 46%;
  background: var(--ink);
  border-radius: 2px;
  transform: rotate(-18deg);
  transform-origin: 50% 0%;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ghost-link {
  opacity: 0.7;
  font-weight: 500;
  font-size: 0.95rem;
}

.ghost-link:hover {
  opacity: 1;
}

/* ????????? Hero ????????? */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: end;
  min-height: calc(100vh - 5.5rem);
  padding: 2.5rem 0 3rem;
}

.hero-copy {
  animation: rise 0.8s 0.08s ease both;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero h1 em {
  font-style: italic;
  color: #1f5c4a;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--ink);
  color: var(--lime);
  box-shadow: 0 12px 30px rgba(12, 31, 36, 0.25);
}

.btn-primary:hover {
  background: #163038;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.hero-visual {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  animation: rise 0.9s 0.16s ease both;
  box-shadow: var(--shadow);
}

.hero-visual-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(12, 31, 36, 0.15), rgba(12, 31, 36, 0.55)),
    url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1400&q=80")
      center / cover;
  transform: scale(1.04);
  animation: drift 18s ease-in-out infinite alternate;
}

.hero-visual-panel {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: rgba(243, 239, 230, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.hero-visual-panel strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.hero-visual-panel span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ????????? Sections ????????? */
.section {
  padding: 1rem 0 4rem;
  animation: rise 0.55s ease both;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  max-width: 36rem;
}

.crumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.crumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ????????? Category grid ????????? */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cat-tile {
  display: block;
  padding: 1.4rem 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}

.cat-tile::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 140px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cat-accent, #2f6b5a) 35%, transparent);
  filter: blur(18px);
  pointer-events: none;
}

.cat-tile:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(12, 31, 36, 0.22);
}

.cat-tile h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.cat-tile p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 16rem;
}

.cat-meta {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cat-accent, #2f6b5a);
}

/* ????????? Offers ????????? */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
}

.chip.is-active {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.offer {
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.offer.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 70%, transparent);
}

.offer-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.offer-type {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.offer h3 {
  margin: 0.2rem 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.offer-tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.offer-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.offer-price small {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.offer-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 1rem;
  margin: 0;
}

.offer-stats div {
  display: grid;
  gap: 0.1rem;
}

.offer-stats dt {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.offer-stats dd {
  margin: 0;
  font-weight: 600;
}

.offer-actions {
  display: flex;
  gap: 0.5rem;
}

.compare-bar {
  position: sticky;
  bottom: 1rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  animation: rise 0.35s ease both;
}

.compare-bar .btn-primary {
  background: var(--lime);
  color: var(--ink);
}

.compare-bar .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ????????? Compare table ????????? */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare-table thead th {
  background: rgba(12, 31, 36, 0.04);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.compare-table tbody th {
  width: 10rem;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.bool-yes {
  color: #1f5c4a;
  font-weight: 700;
}

.bool-no {
  color: #8a3b2a;
  font-weight: 600;
}

.winner {
  background: color-mix(in srgb, var(--lime) 22%, transparent);
}

.footer {
  padding: 2rem 0 3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-2%, -1%, 0);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.5rem;
  }

  .hero-visual {
    min-height: 280px;
    order: -1;
  }

  .cat-grid,
  .offer-grid {
    grid-template-columns: 1fr;
  }
}

/* ??? Auth ??? */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  animation: rise 0.55s ease both;
}

.auth-card {
  width: min(100%, 420px);
  padding: 2rem 1.75rem 1.6rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.auth-brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.auth-lead {
  margin: 0 0 1.35rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-form input {
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.85);
}

.auth-form input:focus {
  outline: 2px solid color-mix(in srgb, var(--lime) 70%, var(--ink));
  outline-offset: 1px;
}

.auth-submit {
  width: 100%;
  margin-top: 0.25rem;
  justify-content: center;
}

.auth-error {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #f3d5cd;
  color: #6b2a1c;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-hint {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.auth-hint code {
  font-family: ui-monospace, Consolas, monospace;
  background: rgba(12, 31, 36, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.user-pill {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}

@media (max-width: 700px) {
  .nav-actions .ghost-link:not(:last-child) {
    display: none;
  }
}

/* ??? Dossiers ??? */
.dossier-save {
  margin-top: 1.5rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}

.dossier-save h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.dossier-save > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dossier-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dossier-save input,
.dossier-save textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.85);
}

.dossier-save-row input {
  flex: 1 1 220px;
}

.dossier-flash {
  margin: 0;
  font-weight: 600;
  color: #1f5c4a;
}

.dossier-list {
  display: grid;
  gap: 0.85rem;
}

.dossier-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.dossier-card h3 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.dossier-notes {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dossier-date {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--ink-soft);
}

.dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-danger {
  background: #6b2a1c;
  color: #f8e9e4;
  box-shadow: none;
}

.btn-danger:hover {
  background: #542218;
}

.empty-state {
  padding: 1.5rem;
 