/* Stay in the Market — shared layout. Colours, fonts and shape come from the design file (design-a / design-b). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body-size)/1.65 var(--font-body); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--paper); padding: 8px; z-index: 9; }

.strip { background: var(--tint); border-bottom: 1px solid var(--rule); font: 12.5px/1 var(--font-body); color: var(--muted); }
.strip .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 12px; }
.strip a { color: inherit; }
.strip .tools { display: flex; align-items: center; gap: 8px; }
.lang a, .theme { font: 700 12px/1 var(--font-body); letter-spacing: .06em; text-decoration: none; border: 1px solid var(--rule); padding: 5px 9px; border-radius: var(--radius); color: var(--ink); background: var(--paper); cursor: pointer; }
.theme:hover, .lang a:hover { border-color: var(--accent); }

.masthead { text-align: center; padding-top: 22px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-block; font: var(--brand-weight) clamp(28px, 5.4vw, 46px)/1.05 var(--font-head); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.tag { margin: 6px 0 14px; font: 13px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; padding-top: 8px; padding-bottom: 8px; font: 700 13px/1.2 var(--font-body); letter-spacing: .05em; text-transform: uppercase; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--accent); }

main { padding: 30px 0 60px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1.18; letter-spacing: -.01em; }
.kicker { font: 800 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.dek { font-size: 1.08em; color: var(--muted); }
.meta, .byline, .small { font: 13.5px/1.4 var(--font-body); color: var(--muted); }

.art { max-width: 760px; }
.art-head { border-bottom: 1px solid var(--rule); margin-bottom: 22px; padding-bottom: 6px; }
.art-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 12px; }
.prose h2 { font-size: 1.55em; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 1.2em; margin: 1.5em 0 .4em; }
.prose p, .prose li { max-width: 68ch; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; margin: 1.2em 0; }
.prose th, .prose td { text-align: left; padding: 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.keypoints { background: var(--tint); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 4px 20px; margin: 1.4em 0; font-size: .96em; }
.keypoints h2 { font: 800 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; margin: 14px 0 8px; }

.risk { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 11px 14px; font: 14px/1.5 var(--font-body); }
.note, .author { border-top: 1px solid var(--rule); margin-top: 34px; padding-top: 6px; font-size: 15.5px; }
.note h2, .author h2 { font: 800 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.cta { border: 1px solid var(--ink); border-radius: var(--radius); padding: 22px 24px; margin: 34px 0 0; background: var(--tint); }
.cta h2 { margin: 0 0 8px; font-size: 1.35em; }
.cta .logo { margin: 14px 0 6px; }
.cta .logo a { display: inline-block; line-height: 0; border-radius: 4px; overflow: hidden; }
.cta .logo img { display: block; width: 260px; max-width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.cta .aff { font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 0; }
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); font: 800 15px/1 var(--font-body); padding: 14px 22px; border-radius: var(--btn-radius); text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }

.portrait { float: right; width: 200px; height: 200px; border-radius: 50%; margin: 4px 0 14px 22px; }
@media (max-width: 560px) { .portrait { float: none; display: block; margin: 0 auto 16px; } }

/* Home */
.home .intro { max-width: 800px; margin: 0 auto 28px; text-align: center; }
.home .intro h1 { font-size: clamp(28px, 4.8vw, 44px); margin: 0 0 10px; }
.home .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; border-top: 1px solid var(--rule); padding-top: 24px; }
.card { border-bottom: 1px solid var(--rule); padding-bottom: 16px; margin-bottom: 18px; }
.card h3 { margin: 0 0 8px; font-size: 1.25em; }
.card h3 a { color: var(--ink); text-decoration: none; } .card h3 a:hover { text-decoration: underline; }
.card .dek { font-size: .94em; margin: 0 0 6px; }
.card.lead { grid-column: 1 / -1; padding-bottom: 22px; }
.card.lead h3 { font-size: clamp(26px, 4vw, 38px); }
.card.lead .dek { font-size: 1.1em; max-width: 70ch; }
.home .about { border-top: 1px solid var(--rule); margin-top: 26px; padding-top: 10px; max-width: 760px; }

/* Calculator */
.calc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font: 700 14px/1.3 var(--font-body); }
.calc input { font: 17px var(--font-body); padding: 11px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; }
#calc-out { font: 16px/1.5 var(--font-body); background: var(--tint); padding: 14px 16px; border-left: 4px solid var(--accent); margin: 12px 0; }
#calc-out:empty { display: none; }

.foot { border-top: 1px solid var(--rule); padding: 24px 0 44px; font: 14px/1.55 var(--font-body); color: var(--muted); background: var(--tint); }
.foot a { color: var(--muted); }

@media (max-width: 820px) { .home .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { :root { --body-size: 17px; } .home .grid { grid-template-columns: 1fr; } .strip .wrap { font-size: 11.5px; } }

/* Featured images */
.hero-img { margin: 0 0 26px; }
.hero-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--img-radius, 6px); background: var(--tint); }
.hero-img figcaption { font: 12.5px/1.4 var(--font-body); color: var(--muted); margin-top: 7px; }
.home .hero-img { margin-bottom: 30px; }
.card .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--img-radius, 6px) - 4px); margin-bottom: 14px; background: var(--tint); }
@media (min-width: 821px) {
  .card.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
  .card.lead .thumb { order: 2; margin: 0; }
}
.home .hero-img img { max-height: 440px; }

/* Design B — "Friendly": modern fintech feel. Figtree, blue accent, soft cards, big headline.
   Deliberately NOT eToro's black/neon-green palette (contract art. 4.9: the site must not look like eToro). */
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 900; font-style: normal; font-display: swap; src: url("/assets/fonts/figtree-latin-900-normal.woff2") format("woff2"); }

:root {
  --img-radius: 22px;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --body-size: 18px; --head-weight: 800; --brand-weight: 900;
  --radius: 14px; --btn-radius: 999px;
  --ink: #12162b; --muted: #5a607a; --rule: #e6e8f2; --paper: #ffffff; --tint: #f3f5fd;
  --accent: #2347d6; --on-accent: #ffffff; --link: #2347d6;
  --warn-bg: #fff7e0; --warn-ink: #5c4300; --warn-line: #f1d58a;
  --shadow: 0 1px 2px rgba(18, 22, 43, .06), 0 8px 24px rgba(18, 22, 43, .06);
}
:root[data-theme="dark"] {
  --ink: #eef0fb; --muted: #a9afc9; --rule: #2a2f4a; --paper: #0e1122; --tint: #161a33;
  --accent: #8ea4ff; --on-accent: #0c1030; --link: #a6b6ff;
  --warn-bg: #2a2208; --warn-ink: #f3dfa6; --warn-line: #5c4a14;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

/* header: left-aligned brand, pill navigation */
.masthead { text-align: left; border-bottom: 0; padding-top: 22px; }
.brand { font-size: clamp(26px, 4.4vw, 36px); }
.tag { text-transform: none; letter-spacing: 0; font-size: 15px; margin-bottom: 10px; }
.nav { justify-content: flex-start; gap: 8px; padding-bottom: 14px; text-transform: none; letter-spacing: 0; font-size: 15px; }
.nav a { border: 1px solid var(--rule); border-radius: 999px; padding: 8px 15px; background: var(--paper); }
.nav a:hover { border-color: var(--accent); }
.nav a[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.kicker { display: inline-block; background: var(--tint); color: var(--accent); padding: 6px 11px; border-radius: 999px; letter-spacing: .08em; }

/* home hero */
.home .intro { max-width: none; text-align: left; margin: 0 0 30px; padding: 44px 32px; border-radius: 24px; background: linear-gradient(135deg, var(--tint) 0%, var(--paper) 100%); border: 1px solid var(--rule); }
.home .intro h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; max-width: 17ch; margin-bottom: 14px; }
.home .intro .dek { font-size: 1.2em; max-width: 52ch; }
.home .grid { border-top: 0; padding-top: 0; gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 22px; margin: 0; box-shadow: var(--shadow); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card.lead { background: var(--accent); border-color: var(--accent); padding: 30px; }
.card.lead .kicker { background: rgba(255, 255, 255, .18); color: var(--on-accent); }
.card.lead h3 a, .card.lead .dek, .card.lead .meta { color: var(--on-accent); }
.card.lead .dek, .card.lead .meta { opacity: .9; }
.home .about { border: 1px solid var(--rule); border-radius: 18px; background: var(--tint); padding: 8px 26px 12px; max-width: none; }

/* articles & blocks */
.art-head { border-bottom: 0; }
.keypoints { border-left: 0; border: 1px solid var(--rule); border-radius: 16px; background: var(--tint); }
.prose table { border: 1px solid var(--rule); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.prose th, .prose td { padding: 12px 14px; }
.prose th { border-bottom: 1px solid var(--rule); background: var(--tint); }
.cta { border: 0; border-radius: 22px; background: linear-gradient(135deg, var(--tint), var(--paper)); box-shadow: var(--shadow); padding: 28px; outline: 1px solid var(--rule); }
.cta h2 { font-size: 1.5em; }
.btn { padding: 16px 28px; box-shadow: 0 6px 16px rgba(35, 71, 214, .28); }
.risk { border-radius: 12px; }
.foot { background: var(--tint); }
.calc input { border-radius: 12px; }
#calc-out { border-left: 0; border-radius: 14px; background: var(--tint); border: 1px solid var(--rule); }
.portrait { box-shadow: var(--shadow); }
