/* Buffered ETF Screener website. Brand Guidelines v1 (Nov 2026): Ledger system. */
:root {
  --color-page: #fafbf9;
  --color-panel: #ffffff;
  --color-tint: #edf1f0;
  --color-line: #dfe5e1;
  --color-ink: #24302e;
  --color-muted: #5f6b68;
  --color-brand: #163a3f;
  --color-action: #2e7d6f;
  --color-action-hover: #256a5e;
  --color-mark: #b8862b;
  --color-caution: #92400e;
  --color-caution-bg: #fdf3e3;
  --color-loss: #b91c1c;
  --color-unavailable: #9aa39f;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --radius-card: 10px;
  --radius-control: 7px;
  --shadow-float: 0 8px 24px rgba(22, 58, 63, 0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--color-brand); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--color-action); outline-offset: 2px; }
img { max-width: 100%; }

/* Header */
.site-header { background: var(--color-panel); border-bottom: 1px solid var(--color-line); }
.site-header .inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.wordmark { font-weight: 700; font-size: 18px; color: var(--color-brand); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark span { color: var(--color-action); }
.beta { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--color-line); background: var(--color-tint); color: var(--color-brand); font-size: 10px; font-weight: 700; vertical-align: middle; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--color-muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 18px 10px 16px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--color-ink); }
.site-nav a[aria-current="page"] { color: var(--color-brand); font-weight: 600; border-bottom-color: var(--color-brand); }
.open-app { margin-left: auto; background: var(--color-action); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: var(--radius-control); white-space: nowrap; }
.open-app:hover { background: var(--color-action-hover); }

/* Page */
main { flex: 1; width: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.wrap.wide { max-width: 1080px; }
h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(32px, 5vw, 44px); line-height: 1.08; color: var(--color-brand); margin: 0 0 16px; letter-spacing: -0.005em; text-wrap: balance; }
h2 { font-family: var(--font-serif); font-weight: 500; font-size: 24px; color: var(--color-brand); margin: 40px 0 10px; text-wrap: balance; }
h3 { font-size: 16px; font-weight: 600; margin: 24px 0 6px; }
p { margin: 0 0 14px; max-width: 68ch; }
.lede { font-size: 19px; color: var(--color-ink); max-width: 60ch; }
.muted { color: var(--color-muted); }
.small { font-size: 14px; color: var(--color-muted); }
ul, ol { margin: 0 0 14px; padding-left: 22px; max-width: 68ch; }
li { margin-bottom: 6px; }
blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--color-mark); font-family: var(--font-serif); font-size: 20px; line-height: 1.4; color: var(--color-brand); max-width: 56ch; }
blockquote cite { display: block; margin-top: 8px; font-family: var(--font-sans); font-style: normal; font-size: 14px; color: var(--color-muted); }
.btn { display: inline-block; background: var(--color-action); color: #fff; text-decoration: none; font-weight: 600; padding: 12px 20px; border-radius: var(--radius-control); font-size: 16px; }
.btn:hover { background: var(--color-action-hover); }
.btn.secondary { background: var(--color-panel); color: var(--color-brand); border: 1px solid var(--color-line); }
.btn.secondary:hover { background: var(--color-tint); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }

/* Home */
.hero { padding: 56px 24px 40px; max-width: 760px; margin: 0 auto; }
.hero-figure { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 32px 0 8px; }
.hero-figure .cell { background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 14px 16px; }
.hero-figure .lbl { font-size: 12px; color: var(--color-muted); }
.hero-figure .val { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-brand); margin-top: 2px; }
.hero-figure .sub { font-size: 12px; color: var(--color-muted); margin-top: 2px; }
@media (max-width: 640px) { .hero-figure { grid-template-columns: 1fr; } }
.band { background: var(--color-panel); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.band .wrap { padding-top: 40px; padding-bottom: 40px; }
.band h2:first-child, .wrap > h2:first-child { margin-top: 0; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .three { grid-template-columns: 1fr; } }
.three h3 { margin-top: 0; }
.three p { font-size: 15px; }

/* FAQ */
.toc { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; margin-bottom: 8px; }
.toc a { text-decoration: none; border-bottom: 1px solid var(--color-line); }
details { border-bottom: 1px solid var(--color-line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--color-muted); font-weight: 400; flex: none; }
details[open] summary::after { content: "\2212"; }
details .answer { padding-top: 10px; }
details .answer p { font-size: 15px; }
details .answer ul { font-size: 15px; }

/* This week */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.tab { font: inherit; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--color-line); background: var(--color-panel); color: var(--color-ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }
.screen[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius-card); overflow: hidden; table-layout: fixed; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--color-muted); padding: 10px 12px; border-bottom: 1px solid var(--color-line); background: var(--color-tint); }
td { padding: 12px; border-bottom: 1px solid var(--color-line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 18%; }
.rankcol { width: 40px; color: var(--color-unavailable); font-weight: 600; }
.ticker { font-weight: 700; color: var(--color-brand); text-decoration: none; }
.fund { font-size: 12px; color: var(--color-muted); }
.score { font-weight: 700; color: var(--color-brand); }
.rank-link { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: none; }
.rank-link:hover { text-decoration: underline; }
@media (max-width: 640px) { table { table-layout: auto; font-size: 14px; } th, td { padding: 10px 6px; } .rankcol { display: none; } th { white-space: normal; } .num { width: auto; } th:nth-child(6), td:nth-child(6) { display: none; } }

/* Methodology table */
.weights th:first-child, .weights td:first-child { width: 28%; }
.weights td { font-size: 15px; }
.weights .w { text-align: right; font-variant-numeric: tabular-nums; width: 12%; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-line); padding: 18px 24px 28px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--color-muted); }
.site-footer a { color: var(--color-muted); }
.site-footer .links { margin-top: 6px; }
.site-footer .links a { margin: 0 8px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
