/* PROBABILITY PLAYER: site stylesheet
   Instrument-panel aesthetic. Dark, restrained, calibrated. */

:root {
  --bg: #0d0e11;
  --bg-alt: #14161a;
  --panel: #191c21;
  --panel-border: #2b2e34;
  --hairline: #33373e;
  --text: #e7e3da;
  --text-dim: #a7abb3;
  --text-muted: #8b9099;
  --accent: #c9a24b;
  --accent-soft: rgba(201, 162, 75, 0.14);
  --danger: #b3543f;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1080px;
}

/* Light theme: same "Calibrated Instrument" system, different surface.
   Toggled via [data-theme="light"] on <html>, set by assets/js/theme.js. */
[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-alt: #ebe7dd;
  --panel: #ffffff;
  --panel-border: #d8d3c5;
  --hairline: #cfc9ba;
  --text: #1c1d1f;
  --text-dim: #4a4d52;
  --text-muted: #6b6f76;
  --accent: #9c7a2e;
  --accent-soft: rgba(156, 122, 46, 0.12);
  --danger: #8f3b28;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45; /* tightened below the ~1.6 default */
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Logo swap: two <img> tags per header, one per theme, toggled by CSS. */
.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* Theme toggle control */
.theme-toggle {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  cursor: pointer;
  position: relative;
  padding: 0;
  flex: 0 0 auto;
}

.theme-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transition: left 0.15s ease;
}

[data-theme="light"] .theme-toggle-dot { left: 22px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15; /* tightened heading leading */
  margin: 0 0 0.5em 0;
  color: var(--text);
  letter-spacing: 0.01em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em 0; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--panel-border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 34px;
  width: 34px;
  display: block;
}

.brand-text {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--accent);
  text-decoration: none;
}

.menu-toggle { display: none; }

/* Hero */
.hero {
  padding: 92px 0 72px;
  border-bottom: 1px solid var(--panel-border);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(201,162,75,0.08), transparent 60%),
    var(--bg);
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 18px;
}

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

.hero .lede {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-top: 18px;
}

.hero .cta-row {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 2px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: background 0.15s ease, color 0.15s ease;
}

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

.btn.solid {
  background: var(--accent);
  color: var(--bg);
}

.btn.solid:hover {
  background: transparent;
  color: var(--accent);
}

.btn.ghost {
  border-color: var(--panel-border);
  color: var(--text-muted);
}

.btn.ghost:hover {
  border-color: var(--text-muted);
  background: transparent;
  color: var(--text);
}

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Cards / grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 30px;
  border-radius: 3px;
}

.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.card p { color: var(--text-muted); }

.card .meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--panel-border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Book detail rows */
.book-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  padding: 44px 0;
  border-bottom: 1px solid var(--panel-border);
  align-items: start;
}

.book-row:last-child { border-bottom: none; }

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #1c1f25, #101216);
  border: 1px solid var(--panel-border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
}

.book-cover .cover-label {
  font-family: var(--serif);
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.book-row .num {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.book-row .status {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--panel-border);
  padding: 22px 0;
}

.faq-item h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.faq-item p { color: var(--text-muted); margin-bottom: 0; }

/* Forms */
form.contact-form, form.newsletter {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

label {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
  border-radius: 2px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { min-height: 130px; resize: vertical; }

/* Legal / fine-print text (used on disclaimer.html) */
.legal-text, .legal-text p, .legal-text li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.legal-text h2 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}

/* Waiver box */
.notice {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent);
  padding: 22px 26px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.notice.warn { border-left-color: var(--danger); }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 48px 0 32px;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-grid h4 {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--panel-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom a { color: var(--text-muted); }

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85rem; color: var(--text-muted); }
.divider { height: 1px; background: var(--panel-border); margin: 40px 0; border: none; }

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .book-row { grid-template-columns: 140px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.main-nav ul { gap: 16px; flex-wrap: wrap; }
  h1 { font-size: 2.1rem; }
}

@media (max-width: 560px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .book-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
   