/* ============================================================
   TronGuides.com — TRON Energy Education & Guides
   Shared stylesheet (light theme, SEO-friendly, responsive)
   ============================================================ */
:root {
  --bg: #f8fafc;
  --bg-alt: #eef2f7;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #1552f0;
  --primary-dark: #0e3fbd;
  --primary-soft: #e8efff;
  --accent: #0ea5e9;
  --green: #059669;
  --green-soft: #ecfdf5;
  --yellow: #b45309;
  --yellow-soft: #fffbeb;
  --orange: #ea580c;
  --red: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.brand-name { font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -0.3px; }
.brand-name span { color: var(--primary); }
.brand-sub { font-size: 11px; color: var(--text-muted); display: block; margin-top: -3px; font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--text-secondary); font-size: 14.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.nav-cta {
  background: var(--primary); color: #fff !important; border-radius: 8px; padding: 9px 16px !important;
  font-weight: 700;
}
.nav-cta:hover { background: var(--primary-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 18px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #eef4ff 0%, #f0f9ff 55%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 20px 48px;
}
.hero-inner { max-width: 1180px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(28px, 4.2vw, 44px); line-height: 1.2; font-weight: 800;
  letter-spacing: -0.8px; max-width: 820px;
}
.hero h1 span { color: var(--primary); }
.hero p.lead { font-size: 17.5px; color: var(--text-secondary); max-width: 760px; margin-top: 14px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px;
}
.hero-stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 20px; box-shadow: var(--shadow); min-width: 150px;
}
.hero-stat b { display: block; font-size: 22px; color: var(--primary); }
.hero-stat span { font-size: 12.5px; color: var(--text-muted); }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.hero-note a { color: var(--primary); }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.layout {
  display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 32px;
  padding: 32px 20px 56px; max-width: 1180px; margin: 0 auto;
}
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-2, .grid-4, .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(15,23,42,.09); }
.card h3 { font-size: 17px; line-height: 1.4; margin-bottom: 8px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); text-decoration: none; }
.card p { font-size: 14.5px; color: var(--text-secondary); flex-grow: 1; }
.card .card-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Section titles ---------- */
.sec-title { margin: 40px 0 18px; font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.sec-title small { display: block; font-size: 14px; font-weight: 500; color: var(--text-muted); margin-top: 4px; }
.sec-sub { color: var(--text-secondary); margin-bottom: 22px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13.5px; color: var(--text-muted); margin: 20px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #cbd5e1; }

/* ---------- Article ---------- */
.article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 36px 40px 40px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .article { padding: 22px 18px; } }
.article h1 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.25; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 14px; }
.article .lead { font-size: 17px; color: var(--text-secondary); margin-bottom: 18px; }
.byline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 22px; font-size: 13.5px; color: var(--text-muted);
}
.byline .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.byline .who { font-weight: 700; color: var(--text); }
.byline .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.byline .pill { background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.article h2 { font-size: 23px; font-weight: 800; margin: 36px 0 12px; letter-spacing: -0.3px; padding-top: 8px; }
.article h3 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; }
.article p { margin: 0 0 16px; color: #1e293b; }
.article ul, .article ol { margin: 0 0 18px 22px; color: #1e293b; }
.article li { margin-bottom: 7px; }
.article blockquote {
  border-left: 4px solid var(--primary); background: var(--primary-soft);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 18px; color: #1e293b;
}
.article blockquote p { margin: 0; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14.5px; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.article th { background: var(--bg-alt); font-weight: 700; }
.article tr:nth-child(even) td { background: #fafcff; }
.article code { background: var(--bg-alt); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; font-size: 13.5px; }
.article .toc {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; margin: 0 0 26px; font-size: 14.5px;
}
.article .toc b { display: block; margin-bottom: 8px; color: var(--text); }
.article .toc ol { margin: 0 0 0 20px; }
.article .toc a { color: var(--text-secondary); }
.article .toc a:hover { color: var(--primary); }

/* Quick answer box (GEO) */
.quick-answer {
  border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px;
  padding: 18px 20px; margin: 0 0 24px;
}
.quick-answer b { color: var(--primary); display: block; margin-bottom: 6px; font-size: 14px; letter-spacing: .3px; }
.quick-answer p { margin: 0 0 8px; color: #1e293b; }
.quick-answer p:last-child { margin-bottom: 0; }

/* Key takeaways */
.takeaways {
  background: var(--green-soft); border: 1px solid #a7f3d0; border-radius: 12px;
  padding: 18px 20px; margin: 0 0 26px;
}
.takeaways b { color: var(--green); display: block; margin-bottom: 8px; }
.takeaways ul { margin: 0 0 0 20px; }
.takeaways li { margin-bottom: 6px; color: #1e293b; }

/* Data widget */
.bf-widget {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  margin: 26px 0; box-shadow: var(--shadow); background: var(--card);
}
.bf-widget-head {
  background: linear-gradient(135deg, var(--primary), #3b6ef5);
  color: #fff; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.bf-widget-head b { font-size: 15.5px; }
.bf-widget-head .live { font-size: 11.5px; background: rgba(255,255,255,.18); padding: 2px 10px; border-radius: 20px; white-space: nowrap; }
.bf-widget-body { padding: 20px; }
.bf-widget .note { font-size: 12px; color: var(--text-muted); margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.kpi .k-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.kpi .k-value { font-size: 22px; font-weight: 800; color: var(--primary); margin-top: 2px; }
.kpi .k-sub { font-size: 12px; color: var(--text-muted); }
.kpi.green .k-value { color: var(--green); }
.kpi.yellow .k-value { color: var(--yellow); }
.kpi.red .k-value { color: var(--red); }
.meter { height: 8px; background: var(--bg-alt); border-radius: 20px; overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--green), #f59e0b, var(--red)); }
.meter-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }
.bf-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bf-table th { text-align: left; padding: 8px 10px; background: var(--bg-alt); border-bottom: 2px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.bf-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.bf-table tr.ours td { background: var(--primary-soft); font-weight: 600; }
.bf-table .best { color: var(--green); font-weight: 700; }

/* FAQ */
.faq-list { margin-top: 8px; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: var(--card); }
.faq-item summary {
  padding: 14px 18px; cursor: pointer; font-weight: 700; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--primary); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 18px 16px; color: #1e293b; font-size: 15px; }

/* Related / tags */
.tag-chip {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 700; padding: 4px 12px; border-radius: 20px; margin: 0 6px 8px 0;
}
.tag-chip:hover { background: var(--primary); color: #fff; text-decoration: none; }
.related-box { margin-top: 36px; }
.related-box h3 { font-size: 19px; margin-bottom: 14px; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 20px; }
.side-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.side-card h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; }
.side-card ul { list-style: none; }
.side-card li { margin-bottom: 9px; font-size: 14px; }
.side-card li a { color: var(--text-secondary); }
.side-card li a:hover { color: var(--primary); }
.cta-box {
  background: linear-gradient(135deg, var(--primary), #3b6ef5); color: #fff;
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.cta-box h4 { color: #fff; font-size: 17px; margin-bottom: 8px; text-transform: none; letter-spacing: 0; }
.cta-box p { font-size: 13.5px; color: rgba(255,255,255,.85); margin-bottom: 14px; }
.cta-box a {
  display: inline-block; background: #fff; color: var(--primary); font-weight: 800;
  padding: 10px 22px; border-radius: 8px; font-size: 14px;
}
.cta-box a:hover { text-decoration: none; background: #f1f5f9; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1220; color: #94a3b8; margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 44px 20px 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: #e2e8f0; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; font-size: 13.5px; }
.footer-grid a { color: #94a3b8; }
.footer-grid a:hover { color: #fff; }
.footer-about { font-size: 13.5px; line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid #1e293b; margin-top: 36px; padding: 16px 0 24px;
  font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
.footer-bottom a { color: #94a3b8; }

/* ---------- Misc ---------- */
.search-box { position: relative; }
.search-box input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--card); color: var(--text); outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.pill-list a {
  background: var(--card); border: 1px solid var(--border); color: var(--text-secondary);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 20px;
}
.pill-list a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font-size: 14px; color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.notice { background: var(--yellow-soft); border: 1px solid #fcd34d; color: #78350f; border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin: 16px 0; }
.notice a { color: var(--primary); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
