/* ============================================================
   DividendSmart - Swiss / International Typographic Style
   Paper, ink, one red. Hairlines. Tabular numerals. No noise.
   ============================================================ */

:root {
  --paper: #FCFCFB;
  --paper2: #F4F4F1;
  --ink: #111110;
  --ink2: #55554F;
  --ink3: #8A8A82;
  --hair: #E2E2DC;
  --hair2: #CFCFC7;
  --red: #DA291C;
  --blue: #2456A4;
  --ochre: #B98500;
  --up: #1E7F3C;
  --down: #C0261B;
  --focus: #111110;
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'ss01';
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }
img, svg { max-width: 100%; display: block; }

.num, td.n, .stat b, .bignum { font-variant-numeric: tabular-nums; }

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

/* ---------- micro label (the Swiss caption) ---------- */
.lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink2);
}
.lbl .sq { color: var(--red); }

/* ---------- header ---------- */
header.site {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  gap: 28px;
  height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.logo .mark { width: 13px; height: 13px; background: var(--red); flex: 0 0 13px; }
.logo span { color: var(--red); }
nav.main { display: flex; align-items: stretch; }
nav.main a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
nav.main a:hover { color: var(--ink); }
nav.main a.on { color: var(--ink); border-bottom-color: var(--red); }

/* header search */
.hsearch { margin-left: auto; display: flex; align-items: center; position: relative; }
.hsearch input {
  width: 210px;
  border: 1px solid var(--hair2);
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  padding: 7px 10px 7px 30px;
  color: var(--ink);
}
.hsearch input:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.hsearch .ico {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; pointer-events: none; color: var(--ink3);
}
.burger { display: none; }

/* search dropdown (shared) */
.sdrop {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--ink);
  z-index: 200;
  max-height: 330px;
  overflow-y: auto;
  display: none;
}
.sdrop.open { display: block; }
.sdrop a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--hair);
}
.sdrop a:last-child { border-bottom: 0; }
.sdrop a:hover, .sdrop a.sel { background: var(--paper2); }
.sdrop .sym { font-weight: 700; min-width: 52px; }
.sdrop .nm { color: var(--ink2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdrop .yl { color: var(--red); font-weight: 600; font-variant-numeric: tabular-nums; }
.sdrop .none { padding: 12px; font-size: 13px; color: var(--ink3); }

/* ---------- page scaffolding ---------- */
main { min-height: 60vh; }
.crumbs { padding: 14px 0 0; font-size: 12px; color: var(--ink3); }
.crumbs a { color: var(--ink3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { margin: 0 6px; }

.hero { padding: 34px 0 26px; border-bottom: 1px solid var(--hair); }
.hero h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  max-width: 20ch;
}
.hero .sub { margin-top: 12px; font-size: 16px; color: var(--ink2); max-width: 62ch; }
.hero .lbl { margin-bottom: 14px; }

.updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.updated .dot { width: 7px; height: 7px; background: var(--up); }

section.band { padding: 40px 0; border-bottom: 1px solid var(--hair); }
.band-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.band-head .no { font-size: 12px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.band-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.band-head .aside { margin-left: auto; font-size: 12px; color: var(--ink3); }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--hair); border-right: 0; }
.stat { padding: 14px 16px 12px; border-right: 1px solid var(--hair); background: var(--paper); }
.stat .lbl { display: block; margin-bottom: 5px; }
.stat b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.stat small { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 3px; }
.stat b .unit { font-size: 13px; color: var(--ink3); font-weight: 600; }
.stat b.accent { color: var(--red); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- calculator layout ---------- */
.calc-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 0; border: 1px solid var(--ink); }
.calc-in { padding: 22px; border-right: 1px solid var(--ink); }
.calc-out { padding: 22px; background: var(--paper); position: relative; }
.calc-in .lbl.head, .calc-out .lbl.head { display: block; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }

.field { margin-bottom: 15px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.field label .hint { font-weight: 400; color: var(--ink3); font-size: 11.5px; }
.iwrap { position: relative; display: flex; }
.iwrap .pre, .iwrap .suf {
  display: flex; align-items: center; padding: 0 10px;
  border: 1px solid var(--hair2); background: var(--paper2);
  font-size: 13px; color: var(--ink2); font-weight: 600;
}
.iwrap .pre { border-right: 0; }
.iwrap .suf { border-left: 0; }
.field input[type=number], .field input[type=text], .field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  padding: 8px 10px;
  border: 1px solid var(--hair2);
  background: var(--paper);
  color: var(--ink);
  appearance: none;
  border-radius: 0;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23111110'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.field input:focus, .field select:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* toggle */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hair); }
.toggle .tl { font-size: 13px; font-weight: 600; }
.toggle .tl small { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink3); }
.tswitch { position: relative; width: 40px; height: 22px; flex: 0 0 40px; cursor: pointer; }
.tswitch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; z-index: 2; }
.tswitch .tk { position: absolute; inset: 0; background: var(--hair2); transition: background .15s; }
.tswitch .tk::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--paper); transition: left .15s; }
.tswitch input:checked + .tk { background: var(--ink); }
.tswitch input:checked + .tk::after { left: 21px; }
.tswitch input:focus-visible + .tk { outline: 2px solid var(--focus); outline-offset: 2px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 700;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .01em;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.sm { padding: 7px 14px; font-size: 12.5px; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }

/* results */
.res-big { padding: 4px 0 14px; border-bottom: 1px solid var(--hair); margin-bottom: 14px; }
.res-big .lbl { margin-bottom: 4px; }
.res-big b { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.res-big small { font-size: 13px; color: var(--ink2); margin-left: 8px; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.res-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.res-row .k { color: var(--ink2); }
.res-row .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-row .v.accent { color: var(--red); }

/* ---------- charts (SVG) ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; font-family: inherit; }
.chart .axis text { font-size: 10.5px; fill: var(--ink3); font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--hair); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axline { stroke: var(--ink); stroke-width: 1; shape-rendering: crispEdges; }
.ctip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
  line-height: 1.5;
  padding: 7px 10px;
  white-space: nowrap;
  z-index: 50;
  display: none;
  font-variant-numeric: tabular-nums;
}
.ctip .t { color: #B5B5AD; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink2); }
.legend i { width: 10px; height: 10px; display: inline-block; }
.legend .dash { width: 14px; height: 0; border-top: 2px dashed var(--ink3); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--hair); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: right;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink2);
  padding: 9px 12px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  white-space: nowrap;
  position: sticky; top: 0;
}
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--hair); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr:hover td { background: var(--paper2); }
.tbl td.l { text-align: left; }
.tbl .est td { color: var(--ink3); }
.tbl-note { font-size: 11.5px; color: var(--ink3); margin-top: 8px; }

/* ---------- cards / listing grids ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--hair); border-right: 0; border-bottom: 0; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--hair); border-right: 0; border-bottom: 0; }
.cell {
  padding: 16px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  display: block;
  background: var(--paper);
}
a.cell:hover { background: var(--paper2); }
a.cell:hover .cell-t { color: var(--red); }
.cell-t { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; }
.cell-d { font-size: 12.5px; color: var(--ink2); margin-top: 4px; line-height: 1.45; }
.cell .meta { display: flex; gap: 12px; margin-top: 8px; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.cell .meta b { color: var(--ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--hair); }
.faq details:first-child { border-top: 1px solid var(--hair); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 34px 15px 0;
  font-weight: 600;
  font-size: 15px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 19px; font-weight: 400; color: var(--red);
}
.faq details[open] summary::after { content: '\2212'; }
.faq .fa-body { padding: 0 0 16px; font-size: 14px; color: var(--ink2); max-width: 72ch; }
.faq .fa-body p + p { margin-top: 8px; }

/* ---------- prose ---------- */
.prose { max-width: 72ch; font-size: 15px; color: var(--ink); }
.prose p { margin-bottom: 12px; color: var(--ink2); }
.prose h3 { font-size: 17px; font-weight: 700; margin: 22px 0 8px; letter-spacing: -0.01em; }
.prose ul, .prose ol { margin: 0 0 12px 20px; color: var(--ink2); }
.prose li { margin-bottom: 4px; }
.prose a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.prose a:hover { color: var(--red); }
.prose .formula {
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--hair);
  background: var(--paper2);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 12px;
}

/* ---------- two-col band ---------- */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* ---------- footer ---------- */
footer.site {
  border-top: 2px solid var(--ink);
  margin-top: 60px;
  background: var(--paper);
}
.f-grid {
  max-width: var(--max); margin: 0 auto; padding: 36px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px;
}
.f-brand .logo { margin-bottom: 10px; }
.f-brand p { font-size: 12.5px; color: var(--ink2); max-width: 34ch; }
.f-col .lbl { display: block; margin-bottom: 10px; }
.f-col a { display: block; font-size: 13px; color: var(--ink2); text-decoration: none; padding: 3px 0; }
.f-col a:hover { color: var(--red); }
.f-legal {
  border-top: 1px solid var(--hair);
}
.f-legal-in {
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: 11.5px; color: var(--ink3);
}
.f-legal-in a { color: var(--ink3); text-decoration: none; }
.f-legal-in a:hover { color: var(--ink); }
.f-legal-in .r { margin-left: auto; }
.f-disc { max-width: var(--max); margin: 0 auto; padding: 0 24px 18px; font-size: 11px; color: var(--ink3); line-height: 1.5; }

/* ---------- 404 ---------- */
.err404 { padding: 90px 0; text-align: left; }
.err404 .code { font-size: 120px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--red); }

/* ---------- comparison ---------- */
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; padding: 30px 0; }
.vs-head .vs { font-size: 15px; font-weight: 800; color: var(--red); }
.vs-head .side h1, .vs-head .side .t { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.vs-head .side .n { font-size: 13px; color: var(--ink2); }
.tbl .win { background: rgba(30,127,60,.07); font-weight: 700; }

/* ---------- inline note ---------- */
.note { border: 1px solid var(--hair); background: var(--paper2); padding: 12px 16px; font-size: 13px; color: var(--ink2); }
.note b { color: var(--ink); }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--hair); border-right: 0; border-bottom: 0; }
.news-card {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  text-decoration: none; background: var(--paper);
}
.news-card:hover { background: var(--paper2); }
.news-card:hover .nct { color: var(--red); }
.news-card.lead { grid-column: span 3; flex-direction: row; }
.news-card.lead .ncimg { flex: 0 0 46%; max-height: 320px; }
.ncimg { display: block; overflow: hidden; border-bottom: 1px solid var(--hair); aspect-ratio: 1200/630; }
.news-card.lead .ncimg { border-bottom: 0; border-right: 1px solid var(--hair); aspect-ratio: auto; }
.ncimg img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92); }
.ncbody { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px 17px; }
.news-card.lead .ncbody { justify-content: center; padding: 26px; }
.nct { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.news-card.lead .nct { font-size: 22px; }
.ncd { font-size: 12.5px; color: var(--ink2); line-height: 1.45; }
.ncticks { display: flex; gap: 6px; margin-top: 2px; }
.ncticks b { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border: 1px solid var(--hair2); color: var(--ink2); font-variant-numeric: tabular-nums; }

/* article page */
.art-hero { border: 1px solid var(--hair); margin: 6px 0 26px; }
.art-hero img { width: 100%; max-height: 430px; object-fit: cover; display: block; }
.art-cols { display: grid; grid-template-columns: minmax(0, 7fr) 3fr; gap: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--hair); }
.art-body { font-size: 16px; }
.art-body h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 26px 0 10px; }
.art-body p { margin-bottom: 13px; color: var(--ink2); }
.art-body ul { margin: 0 0 13px 20px; color: var(--ink2); }
.art-body a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.art-body a:hover { color: var(--red); }
.art-side { display: flex; flex-direction: column; gap: 18px; }
.side-card { border: 1px solid var(--hair); padding: 16px; position: sticky; top: 76px; }
.art-side .side-card + .side-card { position: static; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--ink); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .cols2 { grid-template-columns: 1fr; }
  .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) and (min-width: 721px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card.lead { grid-column: span 2; }
  .art-cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card.lead { grid-column: span 1; flex-direction: column; }
  .news-card.lead .ncimg { border-right: 0; border-bottom: 1px solid var(--hair); }
  .art-cols { grid-template-columns: 1fr; }
  .side-card { position: static; }
  nav.main { display: none; position: absolute; top: 58px; left: 0; right: 0; background: var(--paper); border-bottom: 2px solid var(--ink); flex-direction: column; }
  nav.main.open { display: flex; }
  nav.main a { padding: 13px 24px; border-bottom: 1px solid var(--hair); margin: 0; }
  .burger { display: flex; align-items: center; justify-content: center; background: none; border: 0; width: 42px; cursor: pointer; font-size: 20px; color: var(--ink); }
  .hsearch input { width: 130px; }
  .grid3 { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .vs-head { grid-template-columns: 1fr; gap: 6px; }
  .vs-head .vs { padding: 4px 0; }
}
