:root {
  --ink: #1c2430;
  --ink-soft: #4d5968;
  --paper: #f6f1e8;
  --paper-2: #efe6d8;
  --white: #fffdf9;
  --sea: #14332f;
  --sea-2: #1f524b;
  --coral: #d4654a;
  --coral-dark: #b84e36;
  --line: #e3d8c8;
  --gold: #a6843d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", "Avenir Next", "Trebuchet MS", sans-serif;
  --shadow: 0 18px 50px rgba(28, 36, 48, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(212, 101, 74, 0.12), transparent 55%),
    linear-gradient(180deg, #fbf7f1 0%, var(--paper) 280px);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--sea-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.4em; }
p { margin: 0 0 0.8em; }
button, input { font: inherit; }
.skip {
  position: absolute; left: 1rem; top: -4rem; background: var(--sea); color: white; padding: 0.5rem 0.8rem; z-index: 5;
}
.skip:focus { top: 0.5rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.site-header, .admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 6vw; position: sticky; top: 0; z-index: 4;
  background: rgba(246, 241, 232, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand span {
  font-family: var(--serif); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.92rem; font-weight: 600;
}
.site-nav, .admin-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }
.site-nav a, .admin-nav a, .text-link { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--coral-dark); }
.nav-invite, .button, button, .button-small {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--coral); color: white; border: 0; border-radius: 999px;
  padding: 0.75rem 1.15rem; text-decoration: none; cursor: pointer;
}
.button-small, .row-actions button, .table-wrap button { padding: 0.4rem 0.75rem; font-size: 0.92rem; }
button:hover, .button:hover, .nav-invite:hover { background: var(--coral-dark); }
.text-button { background: transparent; color: var(--ink); border-radius: 999px; }
.site-nav .nav-invite { color: white; }
main { padding: 1.5rem 6vw 4rem; }
.site-footer {
  display: grid; gap: 1.2rem; padding: 2rem 6vw 3rem; border-top: 1px solid var(--line);
  color: var(--ink-soft); background: #f3eee6;
}
.site-footer address { font-style: normal; font-size: 0.92rem; }
.fine { color: var(--ink-soft); font-size: 0.92rem; }
.eyebrow { color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82rem; font-weight: 700; }
.eyebrow span {
  display: inline-block; background: var(--sea); color: #f6f1e8; border-radius: 999px; padding: 0.15rem 0.55rem; margin-right: 0.4rem;
}
.lede { font-size: 1.25rem; max-width: 40rem; }

html:has(body.home) { overflow-x: hidden; }
body.home {
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  color: #f4f6f8;
  background:
    radial-gradient(820px 380px at 50% -8%, rgba(79, 142, 196, 0.22), transparent 60%),
    #090b10;
}
body.home main {
  flex: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 0 0;
}
body.home h1,
body.home h2,
body.home .holding-name {
  font-family: "Segoe UI", "Arial Black", Arial, sans-serif;
}
.holding { width: min(100% - 2.5rem, 46rem); text-align: center; }
.lockup { display: flex; align-items: center; justify-content: center; gap: 0.85rem; margin-bottom: 1.4rem; }
.holding-logo { width: 72px; height: 72px; }
.holding-name {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.holding h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.05rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.holding .lede { margin-left: auto; margin-right: auto; margin-bottom: 0.55rem; color: #c5ccd6; max-width: 40rem; }
.sectors {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.35rem 0 1.7rem;
  padding: 0;
}
.sectors li {
  border: 1px solid #4f8ec4;
  background: #0f1c2b;
  color: #d7e7f8;
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sectors li.sector-more {
  background: transparent;
  border-style: dashed;
  border-color: #6f8eab;
  color: #b7c9da;
}
.holding h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8eb8e0;
  margin-bottom: 0.55rem;
}
.holding .join { max-width: 34rem; margin: 0 auto; }
body.home .join input {
  background: #12161d;
  color: #f4f6f8;
  border-color: #2c3440;
}
body.home input:focus,
body.home button:focus,
body.home a:focus { outline-color: rgba(79, 142, 196, 0.8); }
body.home .join button {
  background: #2f6fad;
  color: #f7fafc;
  font-weight: 800;
}
body.home .join button:hover { background: #3d84c4; }
body.home .form-note { color: #12151b; }
.home-footer {
  padding: 1.5rem 1.25rem 1.7rem;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  margin: 0 0 0.55rem;
}
.footer-links a {
  color: #f4f6f8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 650;
}
.site-footer .footer-links a { color: var(--ink); }
.footer-links a:hover { color: #9ec0e6; }
body.legal main {
  display: block;
  padding: 2.8rem 0 1rem;
}
.legal {
  width: min(100% - 2.5rem, 40rem);
  margin: 0 auto;
  text-align: left;
}
.legal-kicker { margin: 0 0 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.legal-kicker a { color: #8eb8e0; text-decoration: none; }
.legal h1 { margin-bottom: 0.7rem; }
.legal h2 { margin: 1.4rem 0 0.35rem; font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: #f4f6f8; }
.legal p { color: #c5ccd6; }
.legal a { color: #9ec4e8; }
.brand-band {
  width: 100vw;
  max-width: 100vw;
  min-width: 0;
  margin: 0.15rem calc(50% - 50vw) 0.85rem;
  padding: 0;
  overflow: hidden;
}
.brand-marquee {
  overflow: hidden;
  width: 100%;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brand-marquee::-webkit-scrollbar { display: none; }
.brand-row {
  display: flex;
  width: max-content;
  animation: brand-scroll 36s linear infinite;
  will-change: transform;
}
.brand-marquee:hover .brand-row { animation-play-state: paused; }
.brand-track {
  display: flex;
  gap: 0.75rem;
  flex: 0 0 auto;
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 0 0;
}
.brand-track li { flex: 0 0 auto; }
.brand-logo {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f7f8f5;
  border-radius: 22px;
  padding: 0.7rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.brand-logo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}
.brand-fallback {
  color: #12151b;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}
.brand-fallback[hidden] { display: none; }
@keyframes brand-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr); gap: 3rem; align-items: center; padding: 2rem 0 1rem; }
.hero-copy { max-width: 42rem; }
.hero-panel { display: flex; justify-content: center; }
.ticket {
  width: min(100%, 380px); background: var(--sea); color: #f6f1e8; border-radius: 28px; padding: 1.6rem 1.5rem 1.2rem;
  box-shadow: var(--shadow); position: relative;
}
.ticket:before, .ticket:after {
  content: ""; position: absolute; width: 28px; height: 28px; background: var(--paper); border-radius: 50%; top: 46%;
}
.ticket:before { left: -14px; }
.ticket:after { right: -14px; }
.ticket-kicker { letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.75rem; color: #e7a08a; }
.ticket-title { font-family: var(--serif); font-size: 3rem; margin: 0.2rem 0 1rem; }
.ticket ul { list-style: none; margin: 0; padding: 0.8rem 0 0; border-top: 1px dashed rgba(246, 241, 232, 0.35); }
.ticket li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid rgba(246, 241, 232, 0.12); }
.ticket em { font-style: normal; color: rgba(246, 241, 232, 0.72); text-align: right; }

.join { margin-top: 1.4rem; }
.join label { display: block; font-weight: 650; margin-bottom: 0.35rem; }
.join-row, .search-bar, .inline-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.join-row input, .search-bar input, .inline-form input, .stack-form input, .auth-card input, .table-wrap input[type="number"] {
  flex: 1 1 220px; border: 1px solid var(--line); background: var(--white); border-radius: 14px; padding: 0.85rem 1rem; color: var(--ink);
}
input:focus, button:focus, a:focus { outline: 3px solid rgba(212, 101, 74, 0.45); outline-offset: 2px; }
.form-note { padding: 0.75rem 0.9rem; border-radius: 12px; background: white; }
.form-note.success { background: #e5f2ef; }
.form-note.error { background: #fde8e2; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2.5rem 0; }
.pillars article, .empty, .panel, .auth-card, .merchant-card {
  background: rgba(255, 253, 249, 0.86); border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem 1.2rem 1rem;
}
.num { color: var(--coral); font-family: var(--serif); font-size: 1.4rem; margin: 0; }
.band {
  display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
  background: var(--sea); color: #f6f1e8; border-radius: 28px; padding: 1.6rem;
}
.band p { color: rgba(246, 241, 232, 0.8); }
.band .button { background: #f6f1e8; color: var(--sea); flex: 0 0 auto; }

.page-intro { max-width: 44rem; }
.search-bar { margin: 1rem 0 1.2rem; }
.search-bar input { background: white; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.5rem; }
.chip {
  display: inline-flex; gap: 0.4rem; align-items: center; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: white; border-radius: 999px; padding: 0.35rem 0.75rem;
}
.chip span { color: var(--ink-soft); }
.chip.is-on { background: var(--sea); color: #f6f1e8; border-color: var(--sea); }
.chip.is-on span { color: rgba(246, 241, 232, 0.75); }
.block { margin: 1.6rem 0 2rem; }
.block-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.9rem; }
.merchant-card { padding: 0; overflow: hidden; }
.card-link { display: flex; flex-direction: column; gap: 0.25rem; height: 100%; padding: 1rem; color: inherit; text-decoration: none; }
.card-link:hover { background: #fff; }
.logo-slot {
  width: 84px; height: 52px; display: grid; place-items: center; background: var(--paper-2); border-radius: 12px; margin-bottom: 0.6rem;
}
.logo-slot.large { width: 120px; height: 78px; }
.logo-slot img { max-height: 42px; object-fit: contain; }
.logo-slot.large img { max-height: 64px; }
.initials { font-family: var(--serif); color: var(--sea); letter-spacing: 0.04em; }
.merchant-card h3 { font-size: 1.35rem; margin: 0; }
.domain, .card-cats { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.rate { margin-top: auto; font-family: var(--serif); font-size: 1.35rem; color: var(--sea); }
.rate.large { font-size: 2rem; }
.card-action { color: var(--coral-dark); font-weight: 650; }
.empty.tight { background: transparent; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.merchant { max-width: 860px; }
.merchant-top { display: grid; grid-template-columns: 120px 1fr; gap: 1.2rem; align-items: start; }
.boost { color: var(--coral-dark); font-weight: 650; }
.steps ol, .terms, .offers { padding: 0; margin: 0; }
.steps li, .terms li, .offers li { margin: 0 0 0.8rem; }
.terms { list-style: none; }
.terms li, .offers li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid var(--line);
}
.terms strong { display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; }
.facts div { background: white; border-radius: 14px; padding: 0.7rem 0.8rem; border: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); font-size: 0.85rem; }
.facts dd { margin: 0; font-family: var(--serif); }
.offers { list-style: none; }
.offers h3 { font-size: 1.2rem; margin: 0 0 0.2rem; }
code { background: var(--paper-2); padding: 0.1rem 0.35rem; border-radius: 6px; }
.narrow { max-width: 40rem; padding-top: 2rem; }

.admin-bar { background: var(--sea); color: #f6f1e8; }
.admin-bar .brand, .admin-nav a, .admin-bar .text-button { color: #f6f1e8; }
.admin-main { max-width: 1100px; }
.admin-head { margin-bottom: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.stat-grid article { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem; }
.stat-grid strong { display: block; font-family: var(--serif); font-size: 1.8rem; }
.panel { margin: 1rem 0; }
.stack-form, .auth-card form { display: grid; gap: 0.45rem; max-width: 420px; }
.auth-card { max-width: 520px; margin: 2rem auto; }
.sync-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feature-list, .plain { list-style: none; padding: 0; margin: 0; }
.feature-list li, .plain li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.8rem; vertical-align: top; border-bottom: 1px solid var(--line); }
td .fine { display: block; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 860px) {
  .hero, .pillars, .merchant-top, .split, .band { grid-template-columns: 1fr; display: grid; }
  .band { display: grid; }
  .site-header, .admin-bar { align-items: flex-start; flex-wrap: wrap; }
  main { padding-left: 1.1rem; padding-right: 1.1rem; }
  .site-header, .admin-bar, .site-footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  h1 { font-size: 2.4rem; }
}
@media (max-width: 520px) {
  .join-row { flex-direction: column; }
  .join-row button, .join-row input { width: 100%; flex: 0 0 auto; }
  .brand-logo { width: 78px; height: 78px; border-radius: 18px; padding: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
