:root {
  --ink: #18211d;
  --muted: #5d6a63;
  --soft: #f5f1e8;
  --paper: #fffdf8;
  --line: #ded8ca;
  --green: #1f7a4f;
  --green-2: #dff2d9;
  --blue: #245a80;
  --blue-2: #dcecf5;
  --gold: #d49a2a;
  --coral: #d7664d;
  --shadow: 0 20px 60px rgba(38, 45, 39, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

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

.app {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 253, 248, 0.9);
  border-bottom: 1px solid rgba(222, 216, 202, 0.78);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.status-strip {
  background: #eef6e9;
  border-bottom: 1px solid #d7e5ce;
  color: #31563d;
  font-size: 13px;
  font-weight: 720;
  padding: 8px 40px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 11px;
  font-weight: 840;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: var(--paper);
  display: grid;
  height: 34px;
  justify-items: center;
  width: 34px;
}

.brand-mark svg,
.icon {
  height: 18px;
  width: 18px;
}

.btn svg {
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.nav {
  align-items: center;
  display: flex;
  gap: 6px;
}

.nav button,
.link-button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  padding: 10px 12px;
  transition: background 180ms ease, color 180ms ease;
}

.nav button.active,
.nav button:hover,
.link-button:hover {
  background: #eee9dc;
  color: var(--ink);
}

.user-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.points-pill {
  align-items: center;
  background: var(--green-2);
  border: 1px solid #c4e4bb;
  border-radius: 999px;
  color: #245b38;
  display: flex;
  font-size: 13px;
  font-weight: 760;
  gap: 7px;
  padding: 9px 12px;
  white-space: nowrap;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 760;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  min-width: max-content;
  padding: 0 15px;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--ink);
  color: var(--paper);
}

.btn.secondary {
  background: #fffaf0;
  border-color: var(--line);
  color: var(--ink);
}

.btn.green {
  background: var(--green);
  color: white;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.main {
  overflow: hidden;
}

.section {
  padding: 78px 40px;
}

.inner {
  margin: 0 auto;
  max-width: 1180px;
}

.hero {
  background:
    radial-gradient(circle at 10% 18%, rgba(223, 242, 217, 0.95), transparent 28%),
    linear-gradient(110deg, #fffdf8 0%, #f4efe4 52%, #e9f1eb 100%);
  padding-bottom: 48px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
  min-height: calc(100vh - 120px);
}

.hero h1 {
  font-size: clamp(44px, 6.2vw, 76px);
  letter-spacing: 0;
  line-height: 0.93;
  margin: 0 0 24px;
  max-width: 780px;
}

.hero-copy {
  color: #435047;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.54;
  margin: 0 0 30px;
  max-width: 670px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.trust-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 14px;
}

.trust-row span {
  align-items: center;
  display: flex;
  gap: 7px;
}

.trust-row svg {
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.visual-stack {
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
  position: relative;
}

.phone-shell {
  background: #17211c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin-left: auto;
  max-width: 410px;
  padding: 14px;
  width: 100%;
}

.phone-screen {
  background: #fffaf0;
  border-radius: 20px;
  overflow: hidden;
}

.screen-top {
  align-items: center;
  border-bottom: 1px solid #e5dfd1;
  display: flex;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.avatar-row {
  display: flex;
  margin-left: 5px;
}

.avatar {
  align-items: center;
  background: var(--blue-2);
  border: 2px solid #fffaf0;
  border-radius: 999px;
  color: var(--blue);
  display: grid;
  font-size: 12px;
  font-weight: 820;
  height: 34px;
  justify-items: center;
  margin-left: -5px;
  width: 34px;
}

.pact-preview {
  padding: 18px;
}

.route-card {
  background:
    linear-gradient(160deg, rgba(31, 122, 79, 0.12), rgba(36, 90, 128, 0.14)),
    #faf4e8;
  border: 1px solid #e2dac9;
  border-radius: 8px;
  min-height: 178px;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.route-card svg {
  height: 120px;
  margin-top: 18px;
  width: 100%;
}

.route-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.route-label strong {
  font-size: 19px;
}

.market-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.market-tile {
  background: white;
  border: 1px solid #e7dfd1;
  border-radius: 8px;
  padding: 12px;
}

.market-tile span,
.tiny-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 720;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.market-tile strong {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.probability-bar {
  background: #e8e1d3;
  border-radius: 999px;
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
}

.probability-fill {
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: inherit;
  height: 100%;
}

.float-note {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(31, 39, 34, 0.13);
  display: flex;
  gap: 12px;
  max-width: 280px;
  padding: 14px;
  position: absolute;
  bottom: -2px;
  right: 18px;
  top: auto;
}

.float-note svg {
  flex: 0 0 auto;
  height: 54px;
  width: 54px;
}

.float-note strong {
  display: block;
  font-size: 14px;
}

.float-note span {
  color: var(--muted);
  font-size: 13px;
}

.band {
  background: var(--ink);
  color: var(--paper);
}

.band .muted,
.band p {
  color: #dbe2dd;
}

.split {
  display: grid;
  gap: 46px;
  grid-template-columns: 0.88fr 1.12fr;
}

.section h2,
.page-title {
  font-size: clamp(34px, 4.8vw, 58px);
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0 0 18px;
}

.section-lede,
.muted {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.steps {
  display: grid;
  gap: 14px;
}

.step {
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 14px;
  grid-template-columns: 42px 1fr;
  padding: 18px 0;
}

.step-number {
  align-items: center;
  background: #e9ffdb;
  border-radius: 8px;
  color: #23462d;
  display: grid;
  font-weight: 850;
  height: 42px;
  justify-items: center;
}

.step h3,
.feature h3,
.pact-card h3,
.detail-title,
.profile-block h3 {
  margin: 0 0 7px;
}

.step p,
.feature p,
.pact-card p,
.profile-block p {
  color: inherit;
  line-height: 1.5;
  margin: 0;
  opacity: 0.78;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.feature,
.pact-card,
.profile-block,
.detail-panel,
.predictor,
.create-panel {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(38, 45, 39, 0.06);
}

.feature {
  padding: 22px;
}

.feature-icon {
  align-items: center;
  background: var(--blue-2);
  border-radius: 8px;
  color: var(--blue);
  display: grid;
  height: 42px;
  justify-items: center;
  margin-bottom: 18px;
  width: 42px;
}

.page-shell {
  padding: 46px 40px 84px;
}

.page-head {
  align-items: end;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-head .section-lede {
  margin: 0;
  max-width: 720px;
}

.filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.filter {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  padding: 10px 14px;
}

.filter.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

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

.pact-card {
  display: flex;
  flex-direction: column;
  min-height: 324px;
  overflow: hidden;
  padding: 18px;
}

.pact-card:hover {
  border-color: #b9ae9c;
}

.card-top {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.category-dot {
  border-radius: 999px;
  height: 11px;
  width: 11px;
}

.tagline {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.card-meta {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 14px;
  margin: 18px 0;
}

.meta-line {
  align-items: center;
  display: flex;
  gap: 8px;
}

.meta-line svg,
.points-pill svg,
.feature-icon svg,
.stake-input svg {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.card-bottom {
  margin-top: auto;
}

.odds-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.odds-row strong {
  font-size: 30px;
}

.stake-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
}

.detail-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.detail-panel {
  padding: 28px;
}

.detail-title {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.detail-meta {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
}

.detail-meta div {
  padding: 18px 16px;
}

.detail-meta div + div {
  border-left: 1px solid var(--line);
}

.detail-meta span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 780;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.update {
  border-left: 3px solid var(--green);
  padding-left: 14px;
}

.update strong {
  display: block;
  margin-bottom: 4px;
}

.predictor {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 94px;
}

.slider-wrap {
  margin: 22px 0;
}

.slider-head {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.slider-head strong {
  font-size: 44px;
  line-height: 1;
}

input[type="range"] {
  accent-color: var(--green);
  width: 100%;
}

.stake-input {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 0 12px;
}

.stake-input input {
  border: 0;
  min-height: 46px;
  outline: none;
  width: 100%;
}

.payout-box {
  background: #eef6e9;
  border: 1px solid #cfdfc7;
  border-radius: 8px;
  color: #244d31;
  font-size: 14px;
  line-height: 1.45;
  padding: 14px;
}

.guest-lock {
  background: #fff7e5;
  border: 1px solid #ead7a8;
  border-radius: 8px;
  color: #6f4b0d;
  margin-top: 14px;
  padding: 14px;
}

.profile-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 330px 1fr;
}

.profile-block {
  padding: 22px;
}

.score {
  font-size: 52px;
  font-weight: 860;
  line-height: 1;
  margin: 12px 0 8px;
}

.summary-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.summary-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.table-row {
  align-items: center;
  background: #fffaf0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.3fr 0.7fr 0.7fr 0.7fr;
  padding: 14px 16px;
}

.table-row + .table-row {
  border-top: 1px solid var(--line);
}

.table-row.header {
  background: #eee8dc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.create-panel {
  margin-top: 28px;
  padding: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.field input,
.field select,
.field textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  outline: none;
  padding: 11px 12px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 22px;
  box-shadow: var(--shadow);
  color: var(--paper);
  left: 50%;
  padding: 14px 18px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 40;
}

.modal-backdrop {
  align-items: center;
  background: rgba(24, 33, 29, 0.34);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 50;
}

.auth-modal {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

.auth-modal h3 {
  font-size: 28px;
  margin: 0;
}

.empty-state {
  background: #f4efe4;
  border: 1px dashed #cfc5b4;
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px 22px;
    position: relative;
  }

  .nav,
  .user-actions {
    width: 100%;
  }

  .nav {
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .user-actions {
    justify-content: space-between;
  }

  .hero-grid,
  .split,
  .detail-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

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

  .hero h1 {
    max-width: 720px;
  }

  .phone-shell {
    margin: 0;
  }

  .float-note,
  .predictor {
    position: static;
  }

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

@media (max-width: 680px) {
  .section,
  .page-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid,
  .pact-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .detail-meta div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .table-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .table-row.header {
    display: none;
  }

  .hero h1 {
    font-size: 44px;
  }
}
