/* /kalshi/ — page-specific rules on top of /styles.css (tokens, header, hero, sections, cards, footer come from there). */

.kalshi-hero {
  padding-bottom: clamp(28px, 4vw, 48px);
}

.kalshi-hero h1 {
  max-width: 18ch;
}

.inline-link {
  color: var(--accent);
  font-weight: 600;
}

.inline-link:hover {
  color: var(--accent-ink);
}

/* ---------- notices ---------- */

.notice-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.notice {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid var(--amber);
  border-radius: 10px;
  background: #fff4e5;
  font-size: 0.95rem;
}

.notice.error {
  border-color: #d63a39;
  background: #fdeeee;
}

/* ---------- the dark book panel (same treatment as the AI-usage section) ---------- */

.kalshi-book .usage-inner {
  padding-top: clamp(44px, 7vw, 80px);
  padding-bottom: clamp(44px, 7vw, 80px);
}

.kalshi-book .big-number {
  font-size: clamp(3rem, 6.6vw, 4.9rem);   /* a dollar figure with cents is wider than the token count on the home page */
}

.kalshi-book .big-caption {
  font-weight: 600;
}

.kalshi-book .big-caption.pos { color: #7fd48a; }
.kalshi-book .big-caption.neg { color: #ff8a80; }

.book-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
  margin: 0;
}

.book-rows > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(43, 47, 57, 0.7);
}

.book-rows dt {
  color: var(--on-dark-muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.book-rows dd {
  margin: 0;
  color: var(--on-dark);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.book-rows dd.pos { color: #7fd48a; }
.book-rows dd.neg { color: #ff8a80; }

.book-rows dt .sub {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.76rem;
}

/* ---------- light sections ---------- */

.section.tight {
  padding-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(20px, 3vw, 32px);
}

.section-head.slim {
  margin-bottom: 22px;
}

.section-head.slim .kicker {
  margin-bottom: 8px;
}

.section-head.slim h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

.section-head.slim .section-lede {
  margin-top: 8px;
  font-size: 0.98rem;
}

.k-card {
  padding: clamp(16px, 2.4vw, 24px);
  overflow: visible;
}

.k-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.k-card-title {
  color: var(--muted);
  font-size: 0.92rem;
}

.button.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.86rem;
}

/* ---------- equity chart ---------- */

.chart-wrap {
  position: relative;
}

.k-chart {
  width: 100%;
  height: 260px;
  outline-offset: 6px;
}

.k-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.k-chart .grid { stroke: var(--line); stroke-width: 1; }
.k-chart .baseline { stroke: var(--faint); stroke-width: 1; }
.k-chart .axis { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.k-chart .area { fill: rgba(47, 83, 216, 0.1); }
.k-chart .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.k-chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.k-chart .cross { stroke: var(--faint); stroke-width: 1; }
.k-chart .hit { fill: transparent; cursor: crosshair; }
.k-chart .empty { fill: var(--faint); font-size: 13px; }

.tip {
  position: absolute;
  top: 8px;
  pointer-events: none;
  padding: 7px 11px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(23, 24, 28, 0.18);
}

.tip strong {
  display: block;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.tip span {
  color: #c9cad2;
}

/* ---------- tables (light counterpart of the usage breakdown table) ---------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.k-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.k-table th,
.k-table td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  border-top: 1px solid var(--line);
}

.k-table thead th {
  border-top: 0;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.k-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.k-table td.market {
  white-space: normal;
  min-width: 240px;
  max-width: 440px;
  font-weight: 550;
}

.k-table td.market .ticker {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.side {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.side.yes { color: var(--accent); border-color: rgba(47, 83, 216, 0.35); }
.side.no { color: var(--muted); }

.pos { color: #1b7f2a; }
.neg { color: #d63a39; }
.dim { color: var(--faint); }

.empty-row td {
  padding: 26px 10px;
  color: var(--faint);
  text-align: center;
  white-space: normal;
}

/* ---------- method ---------- */

.bullets.how {
  max-width: 76ch;
  font-size: 1rem;
  gap: 10px;
}

.fine {
  max-width: 76ch;
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .book-rows {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .k-chart {
    height: 210px;
  }

  .k-table th,
  .k-table td {
    padding: 9px 8px;
  }

  .k-table td.market {
    min-width: 200px;
  }
}
