:root {
  color-scheme: dark;
  --ink: #f2f6ee;
  --muted: #a7b2a8;
  --quiet: #222a2e;
  --paper: #111518;
  --panel: #181e21;
  --panel-2: #20272b;
  --line: rgba(218, 231, 220, 0.14);
  --green: #2ee884;
  --green-2: #0f7a55;
  --blue: #1e6cff;
  --blue-2: #0d2744;
  --acid: #a3ff12;
  --rust: #62d5ff;
  --sky: #00e5ff;
  --violet: #8f5bff;
  --gold: #ffee32;
  --font-display: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #111518;
  color: var(--ink);
  font-family: var(--font-body);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(135deg, rgba(30, 108, 255, 0.22), transparent 31%),
    linear-gradient(315deg, rgba(15, 122, 85, 0.34), transparent 36%),
    radial-gradient(circle at 52% 8%, rgba(46, 232, 132, 0.12), transparent 28%),
    #111518;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1417;
  color: var(--ink);
  outline: 0;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 232, 132, 0.18);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
}

.admin-shell {
  min-height: 100vh;
  padding: 24px clamp(16px, 4vw, 48px) 64px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 42px;
}

.admin-hero {
  max-width: 960px;
  margin-bottom: 28px;
}

.admin-hero h1 {
  max-width: 920px;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
}

.admin-hero p:not(.eyebrow) {
  max-width: 720px;
  color: #c0c9bf;
  font-size: 1.08rem;
  line-height: 1.55;
}

.admin-import {
  margin: 0 0 34px;
}

.admin-preview {
  padding-top: 20px;
}

.admin-deal-card {
  min-height: auto;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.admin-card-actions button {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
}

.admin-card-actions button:first-child {
  border-color: rgba(46, 232, 132, 0.34);
  background: linear-gradient(135deg, rgba(15, 122, 85, 0.9), rgba(13, 39, 68, 0.9));
}

.admin-edit-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-edit-form h3 {
  margin-bottom: 2px;
}

.admin-edit-form textarea {
  min-height: 130px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(218, 231, 220, 0.1);
  background: rgba(17, 21, 24, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #132a37, #163820);
  color: var(--acid);
  box-shadow: 0 0 22px rgba(46, 232, 132, 0.24);
}

.brand-mark svg {
  width: 38px;
  height: 30px;
  overflow: visible;
}

.brand-mark path {
  stroke: var(--acid);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(163, 255, 18, 0.7));
}

.brand-mark .bird-silhouette {
  fill: rgba(163, 255, 18, 0.1);
  stroke-width: 4.2;
}

.brand-mark .bird-detail {
  fill: none;
  stroke-width: 2.6;
  opacity: 0.92;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  line-height: 1;
  font-size: 1.12rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2.8vw, 30px);
  color: #d4ded3;
  font-size: 0.9rem;
  font-weight: 800;
}

.main-nav a {
  padding: 9px 0;
}

.main-nav a:hover {
  color: var(--sky);
}

.primary-button,
.secondary-button,
.ghost-button,
.view-toggle button,
.category-tab,
.close-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--green-2), var(--blue));
  color: #fff;
  box-shadow: 0 12px 32px rgba(30, 108, 255, 0.22);
}

.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.secondary-button {
  padding: 0 16px;
}

.ghost-button {
  padding: 0 14px;
}

.hero-band,
.category-band,
.deals-band,
.workspace-band,
.feed-band {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 48px);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.62fr);
  align-items: center;
  gap: clamp(26px, 5vw, 68px);
  min-height: auto;
  padding-bottom: clamp(28px, 4vw, 48px);
}

.hero-copy {
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: var(--font-display);
  max-width: 970px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-family: var(--font-display);
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  font-family: var(--font-display);
  margin-bottom: 18px;
  font-size: 1.1rem;
}

.hero-copy p:not(.eyebrow) {
  max-width: 690px;
  color: #c0c9bf;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.55;
}

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

.radar-panel {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(16, 21, 17, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 39, 68, 0.82), rgba(16, 56, 32, 0.86)),
    #101511;
  color: #f7fbef;
  box-shadow: var(--shadow);
}

.radar-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #dfead9;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 7px rgba(216, 244, 95, 0.16);
}

.radar-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.radar-grid div {
  display: grid;
  gap: 7px;
  min-height: 88px;
  align-content: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.radar-grid strong {
  color: var(--acid);
  font-size: 1.7rem;
  line-height: 1;
}

.radar-grid span {
  color: #cbd8c5;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.radar-sweep {
  position: absolute;
  left: 50%;
  bottom: -190px;
  width: 430px;
  height: 430px;
  transform: translateX(-50%);
  border: 1px solid rgba(216, 244, 95, 0.18);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 46px, rgba(216, 244, 95, 0.1) 47px 48px),
    radial-gradient(circle, rgba(216, 244, 95, 0.14), transparent 62%);
}

.radar-sweep span {
  position: absolute;
  inset: 50% 50% auto auto;
  width: 46%;
  height: 2px;
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, var(--acid));
  animation: sweep 4.5s linear infinite;
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: end;
  margin: 0 clamp(18px, 4vw, 48px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 30, 33, 0.9);
  box-shadow: var(--shadow);
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101518;
}

.view-toggle button {
  min-width: 70px;
  min-height: 34px;
  background: transparent;
  color: var(--muted);
}

.view-toggle button.is-active {
  background: linear-gradient(135deg, var(--green-2), var(--blue-2));
  color: #fff;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading.split {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.board-status {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.category-rail {
  display: grid;
  grid-template-columns: repeat(9, minmax(172px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.category-card {
  position: relative;
  display: grid;
  min-height: 166px;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--category-accent) 52%, transparent);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--category-accent) 24%, transparent), transparent 58%),
    linear-gradient(135deg, #171d20, #101416);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--category-accent) 16%, transparent),
    0 0 34px color-mix(in srgb, var(--category-accent) 28%, transparent),
    var(--shadow);
}

.category-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 26% 18%, color-mix(in srgb, var(--category-accent) 44%, transparent), transparent 34%),
    linear-gradient(90deg, color-mix(in srgb, var(--category-accent) 28%, transparent), transparent 36%);
  opacity: 0.78;
}

.category-card > * {
  position: relative;
}

.category-card strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.category-card p {
  margin: 7px 0 0;
  color: #d4ddd3;
  font-size: 0.88rem;
  line-height: 1.4;
}

.category-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--category-accent);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 16px;
}

.category-tab {
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #d7e1d7;
}

.category-tab.is-active {
  border-color: var(--green);
  background: linear-gradient(135deg, #123f2e, #0d2744);
  color: #f7fff1;
  box-shadow: 0 0 24px rgba(46, 232, 132, 0.24);
}

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

.deal-grid.is-list {
  grid-template-columns: 1fr;
}

.deal-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.deal-grid.is-list .deal-card {
  grid-template-columns: 210px 1fr auto;
  grid-template-rows: auto;
  min-height: 190px;
}

.image-slot {
  display: grid;
  min-height: 160px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(30, 108, 255, 0.28), rgba(46, 232, 132, 0.12)),
    repeating-linear-gradient(45deg, #151b1e 0 12px, #20272b 12px 24px);
  color: #b9c6bb;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-slot img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: contain;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.deal-grid.is-list .image-slot {
  min-height: auto;
}

.deal-body {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px 16px 16px;
}

.deal-kicker,
.deal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(46, 232, 132, 0.12);
  color: #d8ffe5;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pill.hot {
  background: rgba(255, 238, 50, 0.18);
  color: #fff59a;
}

.deal-title {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.18;
}

.deal-title.placeholder {
  color: #f3f7ef;
}

.field-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 8px;
}

.field {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.field strong {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
}

.price-field strong {
  display: inline-block;
  margin-right: 10px;
  font-size: 1.25rem;
  color: #f7fff1;
}

.price-field del {
  display: inline-block;
  color: #ff6b6b;
  font-size: 0.95rem;
  font-weight: 950;
  text-decoration-thickness: 2px;
}

.deal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.deal-actions button,
.deal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 11px;
  background: #0f1417;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.deal-link {
  border: 1px solid rgba(46, 232, 132, 0.34);
  background: linear-gradient(135deg, var(--green-2), var(--blue-2));
  white-space: nowrap;
}

.deal-actions button:disabled,
.affiliate-import button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.deal-actions span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-band {
  background:
    linear-gradient(135deg, rgba(13, 39, 68, 0.62), transparent),
    #101416;
  color: #f8fbf2;
}

.watch-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: 34px;
  align-items: start;
}

.watch-panel p:not(.eyebrow) {
  max-width: 680px;
  color: #d0dacd;
  line-height: 1.55;
}

.watch-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.watch-form label {
  color: #d0dacd;
}

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

.watch-item {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.watch-item strong {
  display: block;
  margin-bottom: 6px;
}

.watch-item span {
  color: #c4d2c0;
  font-size: 0.84rem;
}

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

.affiliate-import {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr) minmax(130px, 0.42fr) minmax(180px, 0.5fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(46, 232, 132, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 108, 255, 0.16), rgba(46, 232, 132, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
}

.affiliate-import h3 {
  margin-bottom: 8px;
}

.affiliate-import p {
  margin-bottom: 0;
  color: #c7d2c7;
  line-height: 1.45;
}

.import-status {
  grid-column: 2 / -1;
  min-height: 20px;
  color: var(--sky);
  font-size: 0.82rem;
  font-weight: 850;
}

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

.schema-list,
.pipeline-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schema-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.schema-list span {
  color: var(--green);
  font-weight: 950;
}

.schema-list strong {
  text-align: right;
  color: var(--muted);
  font-size: 0.88rem;
}

.pipeline-list {
  counter-reset: step;
}

.pipeline-list li {
  position: relative;
  min-height: 48px;
  padding: 12px 12px 12px 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #dce6dc;
  line-height: 1.42;
}

.pipeline-list li::before {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  counter-increment: step;
  content: counter(step);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-2), var(--blue));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 950;
}

.source-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  background: var(--panel);
  color: var(--ink);
}

.source-dialog::backdrop {
  background: rgba(16, 21, 17, 0.54);
}

.source-dialog form {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
}

.source-dialog h2 {
  font-size: 2rem;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  min-height: 36px;
  background: var(--quiet);
  color: var(--ink);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero-band,
  .watch-panel,
  .feed-layout,
  .affiliate-import {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
  }

  .control-strip {
    grid-template-columns: 1fr 1fr;
  }

  .search-field,
  .view-toggle {
    grid-column: 1 / -1;
  }

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

@media (max-width: 680px) {
  .site-header {
    gap: 12px;
  }

  .brand small,
  .ghost-button {
    display: none;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.85rem);
  }

  .hero-band,
  .category-band,
  .deals-band,
  .workspace-band,
  .feed-band {
    padding: 36px 16px;
  }

  .radar-panel {
    min-height: 340px;
  }

  .control-strip {
    grid-template-columns: 1fr;
    margin: 0 16px;
  }

  .control-strip > * {
    grid-column: 1;
  }

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

  .deal-grid,
  .deal-grid.is-list,
  .watch-list {
    grid-template-columns: 1fr;
  }

  .deal-grid.is-list .deal-card {
    grid-template-columns: 1fr;
  }

  .deal-grid.is-list .image-slot {
    min-height: 150px;
  }

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

  .schema-list li {
    display: grid;
  }

  .schema-list strong {
    text-align: left;
  }

  .import-status {
    grid-column: 1;
  }
}
