:root {
  --bg: #0c1118;
  --panel: #141c28;
  --text: #e8edf5;
  --muted: #8b98ab;
  --accent: #e8a54b;
  --accent-dim: #b87a2a;
  --border: #243044;
  --error: #f08080;
  --flash: #7fdcc9;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2840 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 17, 24, 0.85);
  backdrop-filter: blur(8px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.foot {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  font-weight: 650;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.lede {
  margin-top: 0;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 24rem;
}

label {
  font-size: 0.875rem;
  color: var(--muted);
}

input[type="email"],
input[type="text"] {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0c1118;
  color: var(--text);
  font-size: 1rem;
}

button.primary,
a.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: linear-gradient(180deg, #f0b85c 0%, var(--accent) 100%);
  color: #1a1208;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
a.button:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

button.linkish {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
button.linkish:hover {
  text-decoration: underline;
}

form.inline {
  display: inline;
}

.flash {
  color: var(--flash);
  padding: 0.75rem 1rem;
  background: rgba(127, 220, 201, 0.08);
  border: 1px solid rgba(127, 220, 201, 0.35);
  border-radius: 8px;
}

.error {
  color: var(--error);
  padding: 0.75rem 1rem;
  background: rgba(240, 128, 128, 0.08);
  border: 1px solid rgba(240, 128, 128, 0.35);
  border-radius: 8px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.lbl {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.release-list,
.match-list,
.ticker-chips {
  list-style: none;
  padding: 0;
  margin: 0;
}

.release-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.release-list li:last-child {
  border-bottom: none;
}

.release-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.release-date {
  font-weight: 600;
}

.pill {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #1e2a3d;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.release-links {
  display: flex;
  gap: 1rem;
}

.match-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.ticker {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ticker-chips li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #1e2a3d;
  border: 1px solid var(--border);
  font-weight: 600;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-top: 1rem;
}

.inline-form input {
  min-width: 8rem;
}

code {
  font-size: 0.85em;
  color: #c9d4e8;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.hero-panel h1 {
  margin-bottom: 0.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

button.ghost,
a.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

a.button.ghost:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.bullet-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.bullet-list li {
  margin-bottom: 0.35rem;
}

.tier-banner {
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  border: 1px solid var(--border);
}

.tier-free {
  background: rgba(127, 220, 201, 0.06);
  border-color: rgba(127, 220, 201, 0.25);
}

.tier-pro {
  background: rgba(232, 165, 75, 0.08);
  border-color: rgba(232, 165, 75, 0.35);
}

.tier-premium {
  background: rgba(180, 130, 240, 0.10);
  border-color: rgba(180, 130, 240, 0.45);
}

.tier-past-due {
  background: rgba(240, 128, 128, 0.10);
  border-color: rgba(240, 128, 128, 0.45);
  margin-bottom: 0.75rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
}

.pricing-card .h3 {
  margin-top: 0;
}

.pricing-card .bullet-list {
  flex: 1;
}

.pricing-pro {
  border-color: rgba(232, 165, 75, 0.45);
}

.pricing-premium {
  border-color: rgba(180, 130, 240, 0.55);
}

.pricing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.link-row {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.h3 {
  font-size: 1rem;
  margin: 1rem 0 0.35rem;
  font-weight: 600;
}

.muted-panel {
  border-style: dashed;
}

.google-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.6rem;
  background: #fff !important;
  color: #3c4043 !important;
  border: 1px solid #dadce0 !important;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}
.google-btn:hover {
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  text-decoration: none !important;
  filter: none !important;
}
.google-icon {
  flex-shrink: 0;
}

.auth-option {
  margin-bottom: 1rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  max-width: 24rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* -----------------------------------------------------------
   Portal-native report rendering (/r/{slug})
   ----------------------------------------------------------- */

.report-header h1 {
  margin-top: 0.25rem;
  font-size: 1.6rem;
  line-height: 1.25;
}

.report-header .chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  margin-right: 0.25rem;
  border-radius: 999px;
  background: var(--chip-bg, rgba(99, 102, 241, 0.12));
  color: var(--chip-fg, #4338ca);
  font-size: 0.78rem;
  font-weight: 500;
}

.prose {
  line-height: 1.65;
  font-size: 1rem;
}

.prose p {
  margin: 0 0 0.85rem 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.report-body-gated {
  border: 1px dashed var(--border);
  background: rgba(234, 179, 8, 0.06);
}

.report-methodology .code-block {
  background: var(--code-bg, #0f172a);
  color: var(--code-fg, #e2e8f0);
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}

/* ---------------------------------------------------------------------------
 * Per-ticker pages (Phase 2 Track A slice 2)
 * ---------------------------------------------------------------------------*/

.breadcrumb {
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.ticker-header h1 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.5rem;
}

.ticker-header .ticker-symbol {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.ticker-header .ticker-company {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
}

.chip-link {
  color: var(--text);
  transition: border-color 120ms ease, color 120ms ease;
}

.chip-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.85rem 0.95rem;
}

.tile-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tile-value {
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0.35rem 0 0.1rem;
  font-variant-numeric: tabular-nums;
}

.tile-hint {
  margin: 0;
}

.si-chart-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 0.25rem;
}

.si-chart {
  width: 100%;
  height: auto;
  display: block;
}

.si-bar {
  fill: var(--accent);
  opacity: 0.85;
  transition: opacity 120ms ease;
}

.si-bar:hover {
  opacity: 1;
}

.si-gridline {
  stroke: var(--border);
  stroke-dasharray: 2 4;
  stroke-width: 1;
}

.si-axis-label {
  fill: var(--muted);
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.history-table th,
.history-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.history-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.history-table td.num,
.history-table th.num {
  text-align: right;
}

.history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.ticker-footer-links .link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Alert preferences (/account/alerts)                                     */
/* ---------------------------------------------------------------------- */

.page-head {
  margin: 1rem 0 1.5rem 0;
}

.page-head h1 {
  margin: 0 0 0.35rem 0;
}

.page-head .lede {
  margin: 0;
  color: #b3b3b3;
  max-width: 60ch;
}

.alert-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.alert-channels {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.alert-channel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  transition: border-color 120ms ease, background 120ms ease;
  background: rgba(255, 255, 255, 0.015);
}

.alert-channel:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.alert-channel.is-selected {
  border-color: rgba(88, 166, 255, 0.55);
  background: rgba(88, 166, 255, 0.05);
}

.alert-channel label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  row-gap: 0.2rem;
  cursor: pointer;
  margin: 0;
}

.alert-channel input[type="radio"] {
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 0.2rem;
}

.alert-channel .channel-label {
  font-weight: 600;
  color: #e6edf3;
}

.alert-channel .channel-desc {
  grid-column: 2;
  color: #b3b3b3;
}

.methodology {
  padding-left: 1.3rem;
  margin: 0.5rem 0 0.5rem 0;
}

.methodology li {
  margin-bottom: 0.55rem;
  line-height: 1.5;
  color: #d1d7de;
}

/* ---------------------------------------------------------------------- */
/* Options ticker page (/options/{ticker}) — chain tables + IV line chart */
/* ---------------------------------------------------------------------- */

.iv-line {
  stroke: var(--accent);
  stroke-width: 1.8;
  fill: none;
}

.iv-dot {
  fill: var(--accent);
  stroke: #0d1117;
  stroke-width: 1;
  transition: r 120ms ease;
}

.iv-dot:hover {
  r: 4;
}

.chain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 720px) {
  .chain-grid {
    grid-template-columns: 1fr;
  }
}

.chain-col h3 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chain-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.chain-table th,
.chain-table td {
  padding: 0.38rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.chain-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chain-table td.num,
.chain-table th.num {
  text-align: right;
}

.chain-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Featured release card */
.featured-release {
  border-left: 3px solid var(--accent);
}

.featured-release .release-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Ticker chip links (dashboard grids) */
.ticker-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chip-link-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.chip-link {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--border);
  border-radius: 4px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
}

.chip-link:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

.chip-link-secondary {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.2rem 0.35rem;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}

.chip-link-secondary:hover {
  background: var(--border);
  color: var(--accent);
  text-decoration: none;
}
