/* =======================================================================
   SmartAdvisorOnline — CANONICAL CSS (iOS / Safari SAFE)
   Version: 2026-01-22
   ======================================================================= */

:root{
  --brand:#1f6feb;

  /* Dark shell */
  --bg:#0f1720;
  --text:#eaeaea;
  --muted:#9aa7b2;
  --line:#1b2432;
  --shadow:0 8px 24px rgba(0,0,0,.25);

  /* Article (white) */
  --articleBg:#ffffff;
  --articleText:#0b1220;
  --articleMuted:#334155;
  --articleBorder:#e5e7eb;
  --articleLink:#1f6feb;

  /* Accents */
  --accentDark:#071023;
  --accentDark2:#0b152b;
  --radius:16px;
}

/* =======================================================================
   BASE (iOS / Safari FIXES)
   ======================================================================= */
*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
}

/* Links (dark shell) */
a{color:#9ec4ff;text-underline-offset:2px}
a:hover{opacity:.96}
a:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:2px;
  border-radius:10px;
}

/* =======================================================================
   LAYOUT
   ======================================================================= */
.container{
  max-width:980px;
  margin:32px auto;
  padding:24px;
}

.card{
  border-radius:var(--radius);
  padding:24px;
  box-shadow:var(--shadow);
}

/* Article */
main.card{
  background:var(--articleBg);
  color:var(--articleText);
  border:1px solid var(--articleBorder);
  overflow-wrap:anywhere;
  word-break:break-word;
}

main.card .meta,
main.card .small{color:var(--articleMuted)}

main.card a{
  color:var(--articleLink);
  font-weight:700;
}

/* =======================================================================
   TYPOGRAPHY
   ======================================================================= */
h1{font-size:34px;margin:10px 0 14px;line-height:1.18}
h2{font-size:24px;margin:24px 0 10px}
h3{font-size:18px;margin:18px 0 8px}

.meta{font-size:14px;margin-bottom:16px}
.small{font-size:12px}

/* =======================================================================
   HERO
   ======================================================================= */
.hero{
  display:block;
  width:100%;
  height:min(56.25vw,420px);
  object-fit:cover;
  border-radius:12px;
  margin-bottom:16px;
  box-shadow:0 10px 26px rgba(0,0,0,.22);
}
@supports (aspect-ratio:1/1){
  .hero{height:auto;aspect-ratio:1200/630}
}

/* =======================================================================
   BUTTONS
   ======================================================================= */
.btn,.btn-cta{
  display:inline-block;
  padding:12px 18px;
  border-radius:10px;
  font-weight:800;
  color:#fff!important;
  text-decoration:none;
}

.btn{
  background:var(--brand);
  box-shadow:0 4px 12px rgba(31,111,235,.45);
}

.btn-cta{
  background:linear-gradient(90deg,#1f6feb,#3291ff);
  box-shadow:0 6px 16px rgba(31,111,235,.45);
}

/* =======================================================================
   CALLOUTS
   ======================================================================= */
.note,.tip,.warn{
  background:var(--accentDark);
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 16px;
  margin:16px 0;
  color:#eaeaea;
}

.warn{
  background:rgba(255,99,71,.1);
  border-color:rgba(255,99,71,.35);
  color:var(--articleText);
}

/* HARD iOS FIX */
.note,.tip,.warn,
.note *,.tip *,.warn *{
  opacity:1!important;
  filter:none!important;
  mix-blend-mode:normal!important;
}

/* =======================================================================
   TABLES — ALWAYS READABLE
   ======================================================================= */
.table-scroll{
  overflow-x:auto;
  background:#fff!important;
  border:1px solid var(--articleBorder);
  border-radius:14px;
}

.table-scroll table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  background:#fff!important;
  color:#000!important;
}

.table-scroll th{
  background:var(--accentDark)!important;
  color:#fff!important;
  font-weight:900;
}

.table-scroll td, .table-scroll th{
  border:1px solid #dbe3ef;
  padding:10px 12px;
}

/* =======================================================================
   SVG — HARD READABILITY FIX
   ======================================================================= */
.svg-card{
  background:#fff!important;
  border:1px solid var(--articleBorder);
  border-radius:12px;
  padding:12px;
}

.svg-scroll{
  overflow-x:auto;
}

.svg-scroll svg{
  max-width:100%;
  height:auto;
  color:#000!important;
}

.svg-scroll svg text{
  fill:#000!important;
  font-weight:800!important;
}

/* =======================================================================
   AUTHOR BOX — iOS FIXED
   ======================================================================= */
.author-box{
  display:flex;
  gap:16px;
  background:var(--accentDark2);
  padding:18px;
  border-radius:12px;
  color:#d0d8e0;
  box-shadow:0 10px 26px rgba(0,0,0,.22);
}

.author-box img{
  width:64px;
  height:64px;
  border-radius:50%;
  border:2px solid var(--brand);
}

.author-box h3{
  margin:0;
  color:#fff;
}

.author-box p{
  margin:6px 0 0;
  font-size:14px;
}

/* =======================================================================
   COOKIE BANNER
   ======================================================================= */
#cookie-banner{
  position:fixed;
  bottom:16px;
  left:16px;
  right:16px;
  max-width:520px;
  margin:auto;
  background:#fff;
  color:#000;
  border-radius:14px;
  padding:14px 16px;
  box-shadow:0 12px 32px rgba(0,0,0,.35);
  display:none;
  z-index:9999;
}

#cookie-banner.show{display:block}

#cookie-banner button{
  background:var(--brand);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:8px 14px;
  font-weight:900;
}