/* public/assets/styles.css
 *
 * Consolidated from what was ~150-200 lines of near-identical embedded
 * <style> blocks duplicated across index.html, dashboard.html, faq.html,
 * privacy.html, and terms.html. One shared file now, which also means the
 * netlify.toml Content-Security-Policy can drop 'unsafe-inline' for
 * style-src — inline <style> blocks were the reason it was needed before.
 */

:root {
  --paper: #EAE7DD;
  --paper-raised: #F2F0E8;
  --ink: #1B1B1E;
  --ink-soft: #4A4842;
  --navy: #1F3A5F;
  --navy-deep: #16293F;
  --brass: #C9A227;
  --cold: #9C9581;
  --rule: #C9C2B2;
  --danger: #7A3B12;
  --danger-bg: #FCEFD9;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-sans); line-height: 1.5; }
a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.wrap.medium { max-width: 960px; }

/* Accessible-but-invisible labels (e.g. the sign-in email input) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Disclaimer strip ─────────────────────────────────────────────── */
.disclaimer-strip {
  background: var(--navy-deep);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 8px 16px;
}

/* ── Data-quality banner (shown whenever draw_results contains
   scrape-results.ts dry-run placeholder rows) ────────────────────── */
.mock-banner {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #E0B27A;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 20px 0;
  text-align: center;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
}
.wordmark span { color: var(--brass); }

nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  margin-left: 24px;
  color: var(--ink-soft);
}
nav a:hover { color: var(--navy); }
nav a.current { color: var(--navy); font-weight: 600; }

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--navy); color: var(--paper); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-solid { background: var(--navy); color: var(--paper); }
.btn-solid:hover { background: var(--navy-deep); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 56px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--brass); border-radius: 50%; }

h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 760px;
  margin-bottom: 20px;
}
.page-head h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 12px; }

.hero-sub { font-size: 17px; color: var(--ink-soft); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; margin-bottom: 56px; }

/* ── Result boards (signature element) ────────────────────────────── */
.boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.board { background: var(--navy-deep); border-radius: 4px; padding: 20px; color: var(--paper); }
.board-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #A9BCCF; margin-bottom: 4px; }
.board-caption { font-family: var(--font-mono); font-size: 10px; color: #6E869E; margin-bottom: 14px; }
.digits { display: flex; gap: 6px; }
.digit-tile {
  flex: 1; aspect-ratio: 3 / 4; background: #0F1E30; border: 1px solid #2C4A6B; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 26px; color: var(--brass);
  overflow: hidden; position: relative;
}
.digit-tile span { display: inline-block; animation: settle 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.digit-tile:nth-child(2) span { animation-delay: 0.08s; }
.digit-tile:nth-child(3) span { animation-delay: 0.16s; }
.digit-tile:nth-child(4) span { animation-delay: 0.24s; }
@keyframes settle {
  0% { transform: translateY(-140%); opacity: 0; }
  60% { transform: translateY(8%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .digit-tile span { animation: none; } }

/* ── Perforation divider ───────────────────────────────────────────── */
.perforation {
  height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 6px, transparent 6px 12px);
  margin: 0;
}

section { padding: 64px 0; }
section.on-raised { background: var(--paper-raised); }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 26px; font-weight: 600; margin-bottom: 8px; }
.section-head p { color: var(--ink-soft); max-width: 520px; }

/* ── How it works ──────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-num { font-family: var(--font-mono); font-size: 12px; color: var(--brass); margin-bottom: 10px; }
.step h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-soft); }

/* ── Operator preview cards ────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.card-head { padding: 16px 18px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: baseline; }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head span { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); text-transform: uppercase; }
.card-body { padding: 18px; }

.num-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--rule); font-family: var(--font-mono); }
.num-row:last-of-type { border-bottom: none; }
.num-row .num { font-weight: 700; font-size: 15px; }
.num-row .count { font-size: 12px; color: var(--ink-soft); }

.locked-rows {
  margin-top: 8px; padding: 14px;
  background: repeating-linear-gradient(135deg, var(--paper) 0 8px, #E2DFD3 8px 16px);
  border-radius: 3px; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft);
}

/* ── Pricing (ticket stubs) ────────────────────────────────────────── */
.stubs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.stub { padding: 32px; position: relative; }
.stub:not(:last-child) { border-right: 1px dashed var(--rule); }
.stub-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); margin-bottom: 10px; }
.stub h3 { font-size: 20px; margin-bottom: 6px; }
.price { font-family: var(--font-mono); font-size: 32px; font-weight: 700; margin: 14px 0; }
.price small { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.stub ul { list-style: none; margin: 18px 0 24px; font-size: 14px; color: var(--ink-soft); }
.stub li { padding: 5px 0; }
.stub li::before { content: '— '; color: var(--rule); }

/* ── Sign-in ───────────────────────────────────────────────────────── */
.signin { background: var(--navy-deep); color: var(--paper); border-radius: 4px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.signin h2 { font-size: 22px; margin-bottom: 6px; }
.signin p { color: #A9BCCF; font-size: 14px; max-width: 380px; }
.signin-form { display: flex; gap: 10px; flex: 1; min-width: 280px; max-width: 420px; }
.signin-form input {
  flex: 1; padding: 12px 14px; border: 1px solid #2C4A6B; background: #0F1E30; color: var(--paper);
  font-family: var(--font-sans); font-size: 14px; border-radius: 3px;
}
.signin-form input::placeholder { color: #6E869E; }
.signin-form button {
  background: var(--brass); color: var(--navy-deep); border: none; font-family: var(--font-mono);
  font-weight: 700; font-size: 13px; text-transform: uppercase; padding: 0 18px; border-radius: 3px; cursor: pointer;
}
.form-msg { font-family: var(--font-mono); font-size: 12px; margin-top: 10px; min-height: 16px; }

/* ── Footer ────────────────────────────────────────────────────────── */
footer { padding: 40px 0 60px; font-size: 12px; color: var(--ink-soft); }
footer .legal { max-width: 640px; margin-bottom: 16px; line-height: 1.6; }
footer .copyright { font-family: var(--font-mono); font-size: 11px; }
footer .foot-links { margin-bottom: 12px; }
footer .foot-links a { color: var(--ink-soft); margin-right: 16px; text-decoration: none; }
footer .foot-links a:hover { color: var(--navy); }

/* ── Legal pages (privacy.html / terms.html) ──────────────────────── */
.updated { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-bottom: 36px; }
main section { margin-bottom: 32px; padding: 0; }
main h2 { font-size: 18px; font-weight: 600; margin-bottom: 10px; padding-top: 4px; }
main p { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
main ul { margin: 10px 0 10px 20px; }
main li { font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
main strong { color: var(--ink); }

.table-box { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 20px; margin: 12px 0; }
.table-box .row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--rule); font-size: 13px; }
.table-box .row:last-child { border-bottom: none; }
.table-box .row .who { font-family: var(--font-mono); font-weight: 600; color: var(--ink); flex-shrink: 0; }

.highlight-box { background: var(--paper-raised); border-left: 3px solid var(--brass); border-radius: 0 4px 4px 0; padding: 16px 20px; margin: 12px 0; font-size: 14px; color: var(--ink-soft); }
.price-table { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 20px; margin: 12px 0; }
.price-table .row { display: flex; justify-content: space-between; padding: 6px 0; font-family: var(--font-mono); font-size: 13px; }

/* ── FAQ page ──────────────────────────────────────────────────────── */
.page-head { margin-bottom: 40px; }
.page-head p { color: var(--ink-soft); max-width: 560px; }
.faq-group { margin-bottom: 36px; }
.faq-group-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-bottom: 12px; }
details { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; margin-bottom: 10px; overflow: hidden; }
summary { font-family: var(--font-sans); font-weight: 600; font-size: 15px; padding: 16px 20px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-family: var(--font-mono); font-size: 18px; color: var(--brass); flex-shrink: 0; margin-left: 16px; transition: transform 0.15s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--rule); }
.faq-answer { padding: 16px 20px 20px; font-size: 14px; color: var(--ink-soft); }
.faq-answer p + p { margin-top: 10px; }
.faq-answer strong { color: var(--ink); }
.not-yet { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; background: var(--cold); color: white; padding: 2px 8px; border-radius: 10px; margin-bottom: 8px; }
.cta-block { margin-top: 48px; background: var(--navy-deep); color: var(--paper); border-radius: 4px; padding: 32px; text-align: center; }
.cta-block p { color: #A9BCCF; font-size: 14px; margin-bottom: 18px; }

/* ── Dashboard-only ────────────────────────────────────────────────── */
.account { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 12px; }
.tier-pill { padding: 3px 10px; border-radius: 20px; font-size: 11px; text-transform: uppercase; background: var(--cold); color: white; }
.tier-pill.active { background: var(--brass); color: var(--navy-deep); }
#logout-btn { background: none; border: 1px solid var(--rule); font-family: var(--font-mono); font-size: 11px; padding: 6px 10px; cursor: pointer; color: var(--ink-soft); }

.dash-main { padding: 40px 0 80px; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; }
.tab { font-family: var(--font-mono); font-size: 13px; padding: 10px 18px; background: var(--paper-raised); border: 1px solid var(--rule); border-bottom: none; cursor: pointer; color: var(--ink-soft); }
.tab.active { background: white; color: var(--ink); font-weight: 600; }
.panel { background: white; border: 1px solid var(--rule); border-radius: 0 4px 4px 4px; padding: 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.panel-head h2 { font-size: 20px; }
.panel-head span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); text-transform: uppercase; }
.report-date-line { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin: -8px 0 16px; }
.free-list { margin-bottom: 24px; }

.locked-block { background: repeating-linear-gradient(135deg, var(--paper) 0 8px, #E2DFD3 8px 16px); border-radius: 4px; padding: 24px; text-align: center; }
.locked-block p { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.locked-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }

.full-report { display: none; }
.full-report.visible { display: block; }
.full-report .num-row .count { color: var(--brass); }

.narrative { margin-top: 20px; padding: 16px; background: var(--paper-raised); border-left: 3px solid var(--brass); font-size: 14px; color: var(--ink-soft); }
.narrative-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; letter-spacing: 0.05em; }
.archived-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: var(--cold); margin-top: 4px; }

#paypal-order-container { margin-top: 12px; }
.pdf-download-row { margin-top: 20px; }

.permute-btn { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; background: none; border: 1px solid var(--rule); color: var(--navy); padding: 2px 8px; margin-left: 8px; cursor: pointer; border-radius: 3px; }
.permute-btn:hover { background: var(--paper-raised); }
.permute-result { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); padding: 0 0 8px; word-break: break-word; }
.permute-result .perm-count { color: var(--brass); font-weight: 600; }

.policy-note { margin-top: 14px; font-size: 11px; color: var(--cold); line-height: 1.5; }
.subscription-status-banner { margin-bottom: 20px; padding: 12px 16px; background: var(--paper-raised); border-left: 3px solid var(--brass); font-family: var(--font-mono); font-size: 12px; }

.loading-state, .error-state { text-align: center; padding: 60px 20px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.signed-out-gate { text-align: center; padding: 80px 20px; }
.signed-out-gate h2 { margin-bottom: 12px; }
.signed-out-gate p { color: var(--ink-soft); margin-bottom: 24px; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .boards, .steps, .cards, .stubs { grid-template-columns: 1fr; }
  .stub:not(:last-child) { border-right: none; border-bottom: 1px dashed var(--rule); }
  header nav { display: none; }
}
@media (max-width: 600px) {
  nav { display: none; }
}
