/* OptionsWizard — shared stylesheet
   Dark finance theme: deep navy background, green + gold accents.
   Vanilla CSS, no frameworks. */

:root {
  --bg: #0b0e14;
  --bg2: #0f1420;
  --card: #141b29;
  --card2: #182032;
  --border: #243044;
  --text: #e8edf6;
  --muted: #98a2b6;
  --green: #2fbf71;
  --green-dim: #1d7a49;
  --gold: #d9a62e;
  --gold-dim: #8a6a1c;
  --red: #e5484d;
  --blue: #5aa2f7;
  --radius: 12px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand {
  font-weight: 800; font-size: 1.25rem; letter-spacing: 0.5px;
  color: var(--text); display: flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; color: #0b0e14; font-size: 1rem;
}
.brand em { font-style: normal; color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--muted); padding: 8px 12px; border-radius: 8px;
  font-size: 0.95rem; font-weight: 600; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.main-nav a.active { color: var(--gold); background: rgba(217, 166, 46, 0.1); }

.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden; margin-left: 10px; font-size: 0.82rem; font-weight: 700;
}
.lang-switch a { padding: 6px 12px; color: var(--muted); }
.lang-switch a:hover { text-decoration: none; color: var(--text); }
.lang-switch a.on { background: var(--green); color: #0b0e14; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 8px 11px;
  font-size: 1.1rem; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 20% -60px, rgba(47, 191, 113, 0.16), transparent 60%),
    radial-gradient(800px 380px at 85% -40px, rgba(217, 166, 46, 0.13), transparent 60%),
    var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 60px;
}
.hero h1 {
  font-size: 2.9rem; line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--gold); }
.tagline {
  font-size: 1.35rem; color: var(--green); font-weight: 700; margin: 0 0 14px;
}
.hero p.lead { font-size: 1.08rem; color: var(--muted); max-width: 760px; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 24px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; border: 1px solid transparent;
  transition: transform 0.08s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #0b0e14; }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--card); }

.page-hero { padding: 52px 0 36px; background: var(--bg2); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: 2.2rem; margin: 0 0 8px; }
.page-hero p { color: var(--muted); margin: 0; max-width: 800px; font-size: 1.05rem; }

/* ---------- Sections / cards ---------- */
section.block { padding: 48px 0; }
section.block h2 {
  font-size: 1.7rem; margin: 0 0 6px;
  display: flex; align-items: center; gap: 10px;
}
section.block h2 .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); flex: 0 0 10px;
}
.section-sub { color: var(--muted); margin: 0 0 26px; max-width: 820px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 0 0 10px; font-size: 1.18rem; }
.card h3 .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800;
  background: rgba(217, 166, 46, 0.14); color: var(--gold);
  border: 1px solid rgba(217, 166, 46, 0.35);
  padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-left: 8px;
}
.card p { color: var(--muted); margin: 0 0 10px; font-size: 0.97rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.96rem; }
.card li { margin-bottom: 6px; }
.card li strong, .card p strong { color: var(--text); }

.strategy-card { border-left: 3px solid var(--green); }
.strategy-card.flagship { border-left-color: var(--gold); background: linear-gradient(180deg, rgba(217,166,46,0.07), var(--card)); }

.spec-row {
  display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px;
  padding: 7px 0; border-top: 1px dashed var(--border); font-size: 0.95rem;
}
.spec-row:first-of-type { border-top: none; }
.spec-row dt { color: var(--gold); font-weight: 700; }
.spec-row dd { margin: 0; color: var(--muted); }
.spec-row dd strong { color: var(--text); }

/* ---------- Formula strip ---------- */
.formula {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin: 26px 0;
}
.formula .step { padding: 22px 16px; text-align: center; position: relative; }
.formula .step + .step { border-left: 1px solid var(--border); }
.formula .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(47, 191, 113, 0.15); color: var(--green);
  font-weight: 800; margin-bottom: 10px;
}
.formula .val { font-size: 1.35rem; font-weight: 800; color: var(--gold); font-family: var(--mono); }
.formula .lbl { font-size: 0.85rem; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ---------- Callouts / tables ---------- */
.callout {
  border-radius: var(--radius); padding: 20px 22px; margin: 24px 0;
  border: 1px solid var(--border); background: var(--card2); font-size: 0.98rem;
}
.callout.warn { border-left: 4px solid var(--red); }
.callout.tip { border-left: 4px solid var(--green); }
.callout.gold { border-left: 4px solid var(--gold); }
.callout strong.k { color: var(--gold); }

table.data {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; font-size: 0.97rem;
}
table.data th, table.data td { padding: 12px 16px; text-align: left; }
table.data thead th {
  background: var(--card2); color: var(--gold); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
table.data tbody tr + tr td { border-top: 1px solid var(--border); }
table.data td.mono, .mono { font-family: var(--mono); }

ol.rules { counter-reset: rule; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
ol.rules > li {
  counter-increment: rule; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px 20px 76px; position: relative;
}
ol.rules > li::before {
  content: counter(rule); position: absolute; left: 22px; top: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(217, 166, 46, 0.13); color: var(--gold);
  border: 1px solid rgba(217, 166, 46, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
}
ol.rules h3 { margin: 0 0 8px; font-size: 1.12rem; }
ol.rules p { margin: 0; color: var(--muted); font-size: 0.97rem; }
ol.rules p strong { color: var(--text); }

.metric-def { font-family: var(--mono); background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; display: inline-block; margin: 8px 0; color: var(--green); }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border); background: var(--bg2);
  padding: 36px 0 46px; margin-top: 20px;
}
.disclaimer {
  font-size: 0.85rem; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px; line-height: 1.65;
}
.disclaimer strong { color: var(--gold); }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.9rem; margin-bottom: 14px; }
.footer-nav a { color: var(--muted); }
.copy { font-size: 0.82rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .formula { grid-template-columns: repeat(2, 1fr); }
  .formula .step + .step { border-left: none; border-top: 1px solid var(--border); }
  .formula .step:nth-child(odd) { border-left: none; }
  .formula .step:nth-child(even) { border-left: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 10px 20px 16px; gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 8px; }
  .lang-switch { margin: 10px 0 0; align-self: flex-start; }
  .hero h1 { font-size: 2.1rem; }
  .tagline { font-size: 1.1rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .formula { grid-template-columns: 1fr; }
  .formula .step:nth-child(even) { border-left: none; }
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
  ol.rules > li { padding: 18px 18px 18px 68px; }
}

/* ---------- Ad slots (Google AdSense placeholders) ---------- */
/* display:none-safe: when hidden (no ad code yet, or an ad blocker),
   the slot collapses cleanly without breaking the layout. */
.ad-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--muted);
  margin: 28px auto;
  padding: 20px;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}
.ad-slot .ad-label { display: block; margin-bottom: 4px; }
.ad-slot .ad-unit { min-height: 0; }
.ad-leaderboard { min-height: 110px; max-width: 970px; }
.ad-inarticle { min-height: 280px; max-width: 728px; }
.ad-slot.hidden { display: none; }

/* ---- House ad: bottom banner, high-visibility ---- */
.house-ad {
  margin: 40px auto 8px;
  max-width: 970px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f5b942, #e8930c);
  color: #1a1206;
  padding: 22px 28px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(232, 147, 12, 0.25);
}
.house-ad-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.7;
  margin-bottom: 8px;
}
.house-ad-link {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1206;
  text-decoration: none;
  border-bottom: 2px solid rgba(26, 18, 6, 0.4);
}
.house-ad-link:hover { border-bottom-color: #1a1206; }

/* ---- Live market ticker strip ---- */
.ticker-strip {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ticker-inner {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  min-width: max-content;
  align-items: stretch;
}
.tick {
  flex: 0 0 auto;
  min-width: 118px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--mono);
}
.tick .t-sym { font-size: 0.72rem; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }
.tick .t-name { font-size: 0.68rem; color: var(--muted); font-family: var(--sans); white-space: nowrap; }
.tick .t-price { font-size: 1.02rem; font-weight: 800; margin-top: 2px; }
.tick .t-chg { font-size: 0.74rem; font-weight: 700; }
.tick .up { color: var(--green); }
.tick .down { color: var(--red); }
.tick .flat { color: var(--muted); }
.ticker-note {
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0 16px 8px;
  font-family: var(--sans);
}
.ticker-note .live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin-right: 6px;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Book cards: image-left + abstract-right */
.book-card{display:flex;gap:22px;align-items:flex-start;background:var(--card,#fff);border:1px solid var(--border);border-radius:14px;padding:22px;margin-bottom:18px}
.book-cover{width:130px;flex-shrink:0;border-radius:8px;box-shadow:0 3px 10px rgba(0,0,0,.18)}
.book-info{flex:1;min-width:0}
.book-info h3{margin:0 0 4px;font-size:1.15rem}
.book-author{color:var(--muted);font-size:.88rem;margin:0 0 10px;font-style:italic}
.book-info p{margin:0 0 12px;line-height:1.6}
.book-info a{font-weight:700}
@media(max-width:640px){.book-card{flex-direction:column;gap:14px}.book-cover{width:110px}}
