/* StockMarketsSahiHai — themed to resemble IshaVasu.com (navy / gold / frost).
   Family resemblance, not a clone. Lightweight + mobile-first for Tier 2/3. */

:root {
  /* ---- IshaVasu-family palette ---- */
  --navy:        #1A3F6F;
  --navy-dark:   #0B2341;
  --gold:        #C89B3C;
  --gold-lt:     #fcb645;
  --blue:        #185FA5;
  --blue-deep:   #2B6CB8;
  --sky:         #a7e6ff;
  --frost:       #eef5ff;
  --surface:     #ffffff;

  /* ---- Semantic tokens (used across this stylesheet) ---- */
  --ink:         var(--navy-dark);
  --text:        var(--navy-dark);
  --muted:       #374962;
  --muted-light: #5A7080;
  --brand:       var(--navy);        /* primary */
  --brand-dark:  var(--navy-dark);
  --accent:      var(--gold);        /* gold accent */
  --bg:          var(--surface);
  --bg-soft:     var(--frost);
  --line:        #d7e3f2;            /* soft navy-tinted border */
  --warn-bg:     #fff7ed;            /* compliance box stays amber + distinct */
  --warn-line:   #f0c089;

  --radius:      16px;
  --radius-lg:   18px;
  --maxw:        1200px;
  --rail:        320px;

  --shadow-sm:   0 4px 6px rgba(11, 35, 65, 0.08);
  --shadow-md:   0 10px 20px rgba(11, 35, 65, 0.12);
  --shadow-lg:   0 20px 40px rgba(11, 35, 65, 0.16);
  --shadow-xl:   0 30px 60px rgba(11, 35, 65, 0.2);
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  line-height: 1.6;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Layout: main content + right rail */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 40px; align-items: start; padding: 8px 0; }
.layout--full { display: block; }
.content { min-width: 0; }
.prose { max-width: none; }                 /* articles & informational pages fill their column/width */
.narrow { max-width: 680px; margin: 0 auto; } /* for forms / focused content */
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 20px; }
.widget h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); border-left: 3px solid var(--gold); padding-left: 10px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.widget li:last-child { border-bottom: 0; }
.widget-links a { color: var(--navy-dark); }
.widget-links a:hover { color: var(--blue); }
.widget-promo { background: linear-gradient(180deg, var(--frost), var(--surface)); border-color: var(--gold); }
.widget-promo p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.ad-slot { background: var(--frost); border: 1px dashed #b9cbe2; border-radius: var(--radius); min-height: 250px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); font-size: 13px; text-align: center; }

/* Stack the rail under the content on tablet/mobile */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 28px; }
  .sidebar { position: static; }
}
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: var(--navy-dark); }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.note { background: var(--frost); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 8px; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 20; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy-dark); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-name { font-size: 18px; letter-spacing: -.2px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--navy-dark); font-size: 15px; padding-bottom: 4px; border-bottom: 2px solid transparent; transition: color var(--transition), border-color var(--transition); }
.site-nav a:hover { color: var(--blue); text-decoration: none; }
.site-nav a.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--gold); }
.nav-account { display: flex; gap: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; color: var(--navy); cursor: pointer; }

/* Hero & sections */
.hero { background: linear-gradient(180deg, var(--frost), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 48px 32px 36px; margin: 22px 0 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 12px; }
.hero h1::after { content: ""; display: block; width: 64px; height: 4px; background: var(--gold); border-radius: 2px; margin-top: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }
.page-head { padding: 28px 0 8px; }
.btn { display: inline-block; background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--radius); font-weight: 600; border: 0; cursor: pointer; box-shadow: var(--shadow-sm); transition: background var(--transition), box-shadow var(--transition), transform var(--transition); }
.btn:hover { background: var(--navy-dark); color: #fff; text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--navy); box-shadow: none; }
.btn.ghost:hover { background: var(--frost); color: var(--navy-dark); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.gold, .btn.publish { background: var(--gold); color: var(--navy-dark); }
.btn.gold:hover, .btn.publish:hover { background: var(--gold-lt); color: var(--navy-dark); }

/* Grids & cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.section-grid, .latest, .pillars { padding: 28px 0; }
.tile, .card { display: block; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition); }
.tile:hover, .card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.tile h3, .card h3 { margin: 0 0 6px; font-size: 18px; }
.card-meta { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gold); font-weight: 600; margin: 0 0 6px; }
.card-excerpt { color: var(--muted); font-size: 15px; }
.card-link { color: var(--blue); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; background: var(--frost); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; color: var(--navy); }

/* Article */
.article-body { font-size: 18px; }
.article-body h2 { margin-top: 1.6em; }
.byline { color: var(--muted); font-size: 14px; }
.facts { width: 100%; border-collapse: collapse; margin: 16px 0; }
.facts th, .facts td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.facts th { width: 38%; color: var(--muted); font-weight: 600; }
.framework { padding-left: 20px; } .framework li { margin: 8px 0; }
.sources { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.sources ul { padding-left: 18px; } .sources li { font-size: 14px; color: var(--muted); }
.article-disclaimers { margin-top: 24px; }
.illustration-disclaimer { font-size: 13px; color: var(--muted); font-style: italic; }

/* Article content helpers (re-themed navy/gold) */
.tag-category { display: inline-block; background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; margin-right: 8px; }
.tag-level { display: inline-block; background: var(--gold); color: var(--navy-dark); font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.analogy-box { background: var(--frost); border-radius: 10px; padding: 18px 22px; margin: 20px 0; font-size: 0.98rem; color: var(--navy-dark); border-left: 4px solid var(--gold); }
.steps-list { counter-reset: steps; list-style: none; padding: 0; }
.steps-list li { counter-increment: steps; display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; font-size: 1rem; color: var(--text); line-height: 1.7; }
.steps-list li::before { content: counter(steps); background: var(--navy); color: #fff; font-weight: 700; font-size: 0.9rem; min-width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.myth-item { margin-bottom: 18px; }
.myth-item .myth { color: #C0392B; font-weight: 600; }
.myth-item .reality { color: var(--navy); font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; }
th { background: var(--navy); color: #fff; padding: 10px 14px; text-align: left; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--frost); }
.disclaimer-box { background: var(--frost); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 6px; font-size: 0.9rem; color: var(--muted); margin: 24px 0; }
.disclaimer-box strong { color: var(--navy-dark); }
h2 { font-size: 1.35rem; color: var(--navy-dark); margin-top: 40px; margin-bottom: 12px; border-left: 4px solid var(--gold); padding-left: 12px; }
.brand-verdict { text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--gold); margin: 32px 0 8px; letter-spacing: 1px; }
hr { border: none; border-top: 2px solid var(--gold); margin: 36px 0; }

/* Compliance footer block (site-wide) — kept amber so it always stands out */
.compliance-footer { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; }
/* Scoped so the navy footer's light "p" colour can't override these (visibility fix) */
.compliance-footer .risk-warning { font-size: 13.5px; font-weight: 700; margin: 0 0 6px; color: var(--navy-dark); }
.compliance-footer .edu-disclaimer { font-size: 12.5px; line-height: 1.55; color: #5a4a2c; margin: 0; }

/* Site footer — navy for a strong brand anchor */
.site-footer { margin-top: 48px; background: var(--navy-dark); color: var(--frost); }
.site-footer .container { padding-top: 28px; padding-bottom: 36px; }
.site-footer strong { color: #fff; }
.site-footer p { color: var(--sky); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-cols nav { display: flex; flex-direction: column; gap: 6px; }
.footer-cols nav a { color: var(--sky); }
.footer-cols nav a:hover { color: #fff; }
.copyright { color: var(--muted-light); font-size: 13px; margin-top: 20px; }

/* Auth & forms */
.auth-card { max-width: 400px; margin: 40px auto; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
form label { display: block; margin: 12px 0; font-weight: 600; font-size: 14px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; margin-top: 4px; background: var(--surface); transition: border-color var(--transition), box-shadow var(--transition); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15); }
label.inline, label.check { font-weight: 400; display: flex; align-items: flex-start; gap: 8px; }
label.inline input, label.check input { width: auto; margin-top: 4px; }
.alert { padding: 10px 14px; border-radius: 8px; background: var(--frost); }
.alert.error { background: #fdecea; color: #8a1c10; }

/* Admin */
.admin .admin-bar { background: var(--navy-dark); color: #fff; box-shadow: var(--shadow-sm); }
.admin-bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 16px; flex-wrap: wrap; }
.admin-bar a { color: var(--sky); } .admin-bar a:hover { color: #fff; }
.admin-bar .brand-name { color: #fff; } .admin-bar .who { color: var(--muted-light); font-size: 13px; }
.admin-main { padding: 24px 16px 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; }
.stat-grid { display: flex; gap: 16px; margin: 18px 0; flex-wrap: wrap; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; min-width: 120px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat .num { display: block; font-size: 28px; font-weight: 700; color: var(--navy); }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.admin-table th { background: var(--navy); color: #fff; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--frost); }
.pill-published { background: #def7ec; color: #03543f; }
.pill-review { background: #fef3c7; color: #92400e; }
.pill-draft { background: #eef2f7; color: #475569; }
.article-form .row { display: flex; gap: 16px; flex-wrap: wrap; }
.article-form .row label { flex: 1; min-width: 180px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; padding: 14px 16px; }
fieldset.gate { background: var(--warn-bg); border-color: var(--warn-line); }
fieldset legend { font-weight: 700; padding: 0 6px; color: var(--navy-dark); }
.form-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

/* Mobile nav */
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 8px 16px 16px; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .site-nav a.active { border-bottom-color: transparent; }
  .nav-account { border-left: 0; padding: 12px 0 0; }
  .hero { padding: 36px 22px 28px; }
}
