:root {
  --navy: #0c1a2e;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --text: #152033;
  --text-muted: #5a6778;
  --line: #e2e8f0;
  --bg: #f4f6f9;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Instrument Sans", "Inter", system-ui, sans-serif;
  --header-h: 68px;
  --drawer-w: min(400px, 100vw);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
.container { width: min(1180px, 100% - 2rem); margin: 0 auto; }

/* —— Header — white —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.brand img { height: 36px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--navy); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue-dark);
  filter: none;
}
.btn-ghost {
  background: var(--white);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 13px; }
.btn-block { width: 100%; }

/* —— Layout: listings first —— */
.layout-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}
@media (min-width: 1100px) {
  .layout-main.has-board {
    grid-template-columns: 1fr var(--drawer-w);
  }
}

.board-wrap {
  padding: 1.25rem 1.25rem 3rem;
  min-width: 0;
}

.board-empty {
  max-width: 520px;
  padding: 2rem 0 1rem;
}
.board-empty h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy);
}
.board-empty p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.listing-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.12s;
}
.listing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.listing-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.listing-rank {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.92);
  color: var(--blue);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.listing-cover {
  height: 100px;
  background: var(--bg) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.listing-cover--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  background: linear-gradient(135deg, var(--blue-soft), #fff);
}
.listing-body {
  padding: 0.75rem 0.85rem 0.85rem;
  flex: 1;
}
.listing-company {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.listing-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-bid {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  margin-top: 0.45rem;
}
.listing-fav-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.listing-fav {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.board-intro {
  margin-bottom: 1.75rem;
  max-width: 640px;
}
.board-intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--navy);
}
.board-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.tier-section { margin-bottom: 2.25rem; }
.tier-head {
  margin-bottom: 0.85rem;
}
.tier-head h2 {
  margin: 0 0 0.2rem;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--blue);
}
.tier-head .tier-blurb {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

/* Filled listing cards */
.slot-card {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.12s;
  min-height: 0;
}
.slot-card.is-filled:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.slot-card.is-filled a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.slot-cover {
  height: 100px;
  background: var(--bg) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.slot-cover--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  background: linear-gradient(135deg, var(--blue-soft), #fff);
}
.slot-body {
  padding: 0.75rem 0.85rem 0.85rem;
  flex: 1;
}
.slot-company {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.slot-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slot-fav-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.slot-fav {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Open slots */
.slot-card.is-open {
  cursor: pointer;
  border-style: dashed;
  border-color: #c7d2e0;
  background: #fafbfc;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
}
.slot-card.is-open:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.slot-open-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}
.slot-open-price {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.slot-card.is-pending {
  opacity: 0.5;
  border-style: dotted;
  padding: 1rem;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Hide old slot meta on marketing view */
.slot-meta { display: none; }

/* —— Claim sidebar —— */
@media (max-width: 1099px) {
  .claim-drawer--rail {
    position: fixed;
    top: 0;
    right: 0;
    width: min(400px, 100vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 90;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    visibility: hidden;
  }
  .claim-drawer--rail.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .claim-drawer--rail .drawer-head {
    border-bottom: 1px solid var(--line);
    background: var(--white);
  }
  .fab-claim {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 30;
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 1100px) {
  .claim-drawer--rail {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    border-left: 1px solid var(--line);
    background: var(--white);
    overflow-y: auto;
    z-index: 1;
  }
  .claim-drawer--rail .drawer-head {
    padding: 1.25rem 1.25rem 0;
    border: none;
    position: static;
    background: transparent;
  }
  .claim-drawer--rail .drawer-head h2 {
    font-size: 1.1rem;
    color: var(--navy);
  }
  .claim-drawer--rail .drawer-body { padding: 0.75rem 1.25rem 1.25rem; }
  .claim-drawer--rail .drawer-close { display: none; }
  .fab-claim { display: none; }
  .drawer-backdrop { display: none !important; }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.drawer-head h2 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.drawer-body { padding: 1.25rem; }

.claim-lead {
  margin: 0 0 1rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.claim-fields .sub {
  margin: 0 0 1rem;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.claim-fields label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.claim-fields input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  margin-bottom: 0.75rem;
}
.claim-fields input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.bid-field { margin: 0.75rem 0 0.5rem; }
.bid-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--navy);
}
.bid-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem;
}
.bid-step {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--blue);
}
.bid-step:disabled { opacity: 0.35; cursor: not-allowed; }
.bid-display {
  flex: 1;
  text-align: center;
  font-size: 1.35rem;
}
.bid-display span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.bid-hint { font-size: 12px; margin: 0.35rem 0 0; }
.tier-tab {
  flex: 1;
  padding: 0.45rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
}
.tier-tab.is-active {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
}

.mini-slot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}
.mini-slot {
  font-size: 10px;
  padding: 0.35rem 0.2rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
}
.mini-slot.is-open { border-color: #93c5fd; color: var(--blue); }
.mini-slot.is-selected { background: var(--blue); color: #fff; border-color: var(--blue); }
.mini-slot:disabled { opacity: 0.35; cursor: not-allowed; }

.preview-chip {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: var(--bg);
}
.preview-chip.is-visible { display: flex; }
.preview-chip img { width: 32px; height: 32px; border-radius: 6px; }
.preview-chip strong { display: block; font-size: 13px; color: var(--navy); }
.preview-chip span { font-size: 11px; color: var(--text-muted); }
.preview-shot {
  margin-top: 0.65rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}
.preview-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: cover;
  object-position: top;
}
.bid-tie-note { font-size: 11px; font-weight: 400; }

.claim-summary {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  margin-bottom: 0.75rem;
  font-size: 13px;
}
.claim-summary strong { color: var(--blue-dark); }
.form-error { color: #dc2626; font-size: 13px; margin: 0 0 0.75rem; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 80;
}
.drawer-backdrop[hidden],
.checkout-overlay[hidden] { display: none !important; }

body.drawer-open { overflow: hidden; }

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  padding: 1rem;
}
.checkout-sheet {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  color: #111;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
}
.checkout-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.checkout-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; }

.site-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer nav { display: flex; gap: 1rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--blue); }

.db-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin: 1rem 1.25rem 0;
}

.muted { color: var(--text-muted); font-size: 12px; }

/* Profile & secondary pages */
.profile-page { padding: 1.5rem 1.25rem 4rem; max-width: 760px; margin: 0 auto; }
.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.profile-card--rich { padding: 0; box-shadow: var(--shadow-md); overflow: hidden; }
.profile-hero {
  height: 220px;
  background: var(--bg) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.profile-hero--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--blue);
  background: linear-gradient(135deg, var(--blue-soft), #fff);
}
.profile-inner { padding: 1.5rem 1.5rem 1.75rem; }
.profile-kicker {
  margin: 0 0 0.75rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.profile-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.profile-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.profile-head h1 { margin: 0; font-size: 1.65rem; color: var(--navy); letter-spacing: -0.02em; }
.profile-tagline {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.profile-desc { color: var(--text-muted); margin: 0 0 1.5rem; line-height: 1.6; font-size: 1rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1.25rem; }
.profile-foot { margin: 0; font-size: 13px; }
.profile-foot a { color: var(--blue); }

.board-seo {
  max-width: 640px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.board-seo h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}
.board-seo p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}
.board-seo p:last-child { margin-bottom: 0; }

.page-thanks .thanks-main,
.page-manage .manage-main {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.thanks-card, .manage-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.page-manage .manage-card { text-align: left; }
.manage-kicker {
  margin: 0 0 0.35rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.manage-meta { margin: 0 0 1rem; }
.manage-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.manage-success { color: #2d8a4e; margin: 0 0 1rem; }
.manage-links { margin: 0 0 1rem; }
.manage-raise {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.manage-raise h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--navy);
}
.thanks-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}

.page-admin .admin-main { padding: 2rem 1.25rem 4rem; max-width: 1100px; margin: 0 auto; }
.admin-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--white); }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
}
.admin-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.admin-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  background: var(--white);
  min-width: 100px;
}
.admin-login { max-width: 320px; }
.admin-login input {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.badge-pending { color: #d97706; font-size: 11px; font-weight: 600; }
.badge-seed { color: #059669; font-size: 11px; font-weight: 600; }

.manage-upgrade-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  text-align: left;
}
.manage-upgrade-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.legal-page { max-width: 680px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.legal-page h1 { color: var(--navy); }
.legal-page p, .legal-page li { color: var(--text-muted); }
