:root {
  --wine: #5f111a;
  --wine-dark: #35080e;
  --gold: #d7aa47;
  --gold-light: #f6e6bb;
  --ink: #17151a;
  --muted: #706b73;
  --paper: #fffdf9;
  --soft: #f6f1e8;
  --border: #e6ddd0;
  --success: #16784b;
  --danger: #bd2938;
  --shadow: 0 18px 50px rgba(64, 25, 18, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(53, 8, 14, 0.96);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #f1ce73, #b98527);
  color: var(--wine-dark); font-family: Georgia, serif; font-size: 26px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.brand strong { display: block; font-family: Georgia, serif; letter-spacing: .05em; font-size: 20px; }
.brand small { display: block; color: #dbcfd0; font-size: 11px; letter-spacing: .04em; }
.header-pill { color: #f9ead1; border: 1px solid rgba(215,170,71,.4); background: rgba(215,170,71,.1); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 800; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #64d99a; display: inline-block; margin-right: 7px; box-shadow: 0 0 0 4px rgba(100,217,154,.12); }

.announcement { background: var(--wine); color: #fff; border-bottom: 2px solid var(--gold); overflow: hidden; }
.announcement-inner { min-height: 38px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 14px; }
.announcement strong { color: var(--wine-dark); background: var(--gold); padding: 4px 8px; border-radius: 5px; font-size: 10px; letter-spacing: .1em; }
.ticker-window { overflow: hidden; white-space: nowrap; }
.ticker-window p { display: inline-block; margin: 0; padding-left: 100%; color: #f5e9eb; font-size: 12px; animation: ticker 22s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }

.hero { padding: 36px 0 18px; background: radial-gradient(circle at 85% 10%, rgba(215,170,71,.20), transparent 30%), linear-gradient(180deg, #fffaf0 0%, var(--paper) 100%); }
.hero-card { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 26px; padding: clamp(26px, 5vw, 58px); background: linear-gradient(135deg, #fff 0%, #fffaf0 60%, #f7e7bd 140%); box-shadow: var(--shadow); }
.hero-card::after { content: "7"; position: absolute; right: 4%; top: 50%; transform: translateY(-50%); font-family: Georgia, serif; font-size: clamp(140px, 22vw, 270px); line-height: .7; color: rgba(95,17,26,.045); font-weight: 900; pointer-events: none; }
.eyebrow { display: inline-block; color: var(--wine); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 900; }
.hero h1 { position: relative; z-index: 1; margin: 12px 0; max-width: 700px; font-family: Georgia, "Times New Roman", serif; color: var(--wine-dark); font-size: clamp(34px, 6vw, 64px); line-height: 1.02; letter-spacing: -.025em; }
.hero p { position: relative; z-index: 1; max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(14px, 2vw, 17px); }
.hero-facts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-facts span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 9px 13px; color: var(--wine); font-size: 12px; font-weight: 800; box-shadow: 0 5px 18px rgba(53,8,14,.06); }

.section { padding: 46px 0; }
.section-soft { background: var(--soft); border-block: 1px solid var(--border); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: clamp(27px, 4vw, 40px); color: var(--wine-dark); }
.section-heading > p { max-width: 340px; margin: 0; text-align: right; color: var(--muted); font-size: 13px; }
.market-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.market-card { border: 1px solid var(--border); border-radius: 20px; padding: 22px; background: #fff; box-shadow: 0 12px 36px rgba(64,25,18,.07); transition: transform .2s ease, box-shadow .2s ease; }
.market-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.market-card-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.market-card h3 { margin: 8px 0 0; color: var(--wine-dark); font-family: Georgia, serif; font-size: 25px; letter-spacing: .02em; }
.market-status { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; font-weight: 900; color: var(--muted); }
.market-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.market-status.live i, .market-status.open i { background: #2bb673; box-shadow: 0 0 0 4px rgba(43,182,115,.12); }
.market-status.closed i { background: var(--danger); }
.market-days { border-radius: 999px; background: var(--gold-light); color: var(--wine); padding: 7px 10px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.market-result { margin: 21px 0; padding: 18px 12px; border-radius: 15px; text-align: center; background: linear-gradient(135deg, var(--wine-dark), var(--wine)); color: #fff1d3; font-size: clamp(27px, 5vw, 40px); font-weight: 900; letter-spacing: .08em; font-variant-numeric: tabular-nums; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.market-result.waiting { color: #d9c9cc; font-size: 20px; letter-spacing: .14em; }
.market-meta { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.market-meta span { padding: 11px 12px; color: var(--muted); font-size: 12px; }
.market-meta span + span { border-left: 1px solid var(--border); }
.market-meta b { display: block; color: var(--ink); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.market-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.market-actions a { text-align: center; border: 1px solid var(--wine); border-radius: 10px; padding: 11px; color: var(--wine); font-size: 12px; font-weight: 900; transition: .18s ease; }
.market-actions a:hover { background: #fff5e6; }
.market-actions a.primary { background: var(--wine); color: #fff; }
.market-actions a.primary:hover { background: var(--wine-dark); }
.state-card { grid-column: 1 / -1; min-height: 160px; border: 1px dashed #cdbfae; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); background: rgba(255,255,255,.6); }
.state-card.compact { min-height: 90px; }
.state-card.error { color: var(--danger); }
.loader { width: 22px; height: 22px; border: 2px solid #e3d7c7; border-top-color: var(--wine); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chart-explainer { padding: 46px 0 56px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.feature-card { border-top: 3px solid var(--gold); padding: 22px 20px; border-radius: 0 0 16px 16px; background: #fff; box-shadow: 0 12px 30px rgba(64,25,18,.07); }
.feature-number { font-family: Georgia, serif; color: #b9954c; font-size: 13px; font-weight: 900; }
.feature-card h3 { margin: 14px 0 7px; color: var(--wine-dark); font-family: Georgia, serif; font-size: 22px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13px; }

.site-footer { padding: 30px 0; background: var(--wine-dark); color: #f8ecee; border-top: 3px solid var(--gold); }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; align-items: center; }
.footer-inner strong { font-family: Georgia, serif; letter-spacing: .05em; }
.footer-inner p { margin: 4px 0 0; color: #cdbdc0; font-size: 12px; }
.footer-inner .disclaimer { max-width: 520px; text-align: right; }

@media (max-width: 760px) {
  .shell { width: min(100% - 18px, 1120px); }
  .header-inner { min-height: 64px; }
  .header-pill { font-size: 10px; padding: 7px 9px; }
  .brand small { display: none; }
  .hero { padding-top: 20px; }
  .hero-card { border-radius: 20px; }
  .section { padding: 34px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 8px; text-align: left; }
  .market-list, .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { display: block; }
  .footer-inner .disclaimer { margin-top: 14px; text-align: left; }
}

@media (max-width: 430px) {
  .header-pill { display: none; }
  .brand strong { font-size: 18px; }
  .hero-card { padding: 25px 20px; }
  .market-card { padding: 17px; border-radius: 16px; }
  .market-card h3 { font-size: 22px; }
  .market-days { font-size: 9px; }
  .market-meta { grid-template-columns: 1fr; }
  .market-meta span + span { border-left: 0; border-top: 1px solid var(--border); }
}
