/* Lantern — design system aligned with fintrens.com. Brand tokens (colours, fonts, logo) are injected as CSS
   variables at build time from brand.json; the values below are the defaults and the derived aliases. */
:root {
  --ink: #12211E; --bg: #F3F6F5; --surface: #FFFFFF; --surface-2: #EAF0EE; --line: #D6E0DD; --muted: #5C6C69;
  --primary: #0369A1; --primary-soft: #E0F0FA; --accent: #B0711C; --accent-soft: #FBEDD6;
  --positive: #157F5B; --positive-soft: #DDF3E9; --negative: #BE3A3A; --negative-soft: #F9E0E0;
  --gold: #8A6A1F; --gold-soft: #F6EFDD; --gold-line: #E2D9C3;
  --display: "Manrope", "IBM Plex Sans", system-ui, sans-serif;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px; --shadow: 0 1px 2px rgba(18,33,30,.06), 0 8px 24px -12px rgba(18,33,30,.18);
  --max: 1360px;
}
/* aliases used throughout */
:root { --text: var(--ink); --bg-soft: var(--surface-2); --bg-elev: var(--surface); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #E8EFEC; --bg: #0F1917; --surface: #15221F; --surface-2: #1C2B28; --line: #2A3B37; --muted: #9DB0AB; --primary-soft: #0F2F44; --accent-soft: #3A2A12; --positive-soft: #10302A; --negative-soft: #3A1C1C; --gold-soft: #2E2716; --gold-line: #4A3F27; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); }
}
:root[data-theme="dark"] { --ink: #E8EFEC; --bg: #0F1917; --surface: #15221F; --surface-2: #1C2B28; --line: #2A3B37; --muted: #9DB0AB; --primary-soft: #0F2F44; --accent-soft: #3A2A12; --positive-soft: #10302A; --negative-soft: #3A1C1C; --gold-soft: #2E2716; --gold-line: #4A3F27; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; }
a { color: inherit; text-decoration: none; }
p a, li a, dd a, td a { color: var(--primary); }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.pos { color: var(--positive); } .neg { color: var(--negative); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header (fintrens.com-style: details/summary dropdowns, mega panels, ghost + primary CTAs) */
.site-top { position: sticky; top: 0; z-index: 50; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.sn-in { position: relative; display: flex; align-items: center; gap: 8px; height: 64px; }
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; margin-right: .4rem; }
.brand:hover { text-decoration: none; }
.brand .logo { display: grid; place-items: center; line-height: 0; flex: none; }
.brand { min-width: 0; }
.brand .logo svg, .brand .logo img { width: 26px; height: 26px; }
.brand .wordmark { color: var(--ink); }
.brand .by { color: var(--primary); font-weight: 600; font-size: .95rem; letter-spacing: 0; padding-left: .5rem; border-left: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--line); }
.pill-demo { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.brand .pill-demo { font-size: .56rem; padding: .08rem .4rem; letter-spacing: .06em; align-self: center; }
.pill-sponsored { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.pill-risk { text-transform: none; letter-spacing: 0; font-weight: 600; }
.pill-risk.low { background: var(--positive-soft); color: var(--positive); border-color: transparent }
.pill-risk.moderate { background: var(--primary-soft); color: var(--primary); border-color: transparent }
.pill-risk.high { background: var(--accent-soft); color: var(--accent); border-color: transparent }
.pill-risk.very-high { background: var(--negative-soft); color: var(--negative); border-color: transparent }
/* Header: direct links, one Resources dropdown, auth-aware (html[data-auth="in"] is set by auth.js before paint) */
html[data-auth="in"] [data-signed-out-only] { display: none !important; }
html:not([data-auth="in"]) [data-signed-in-only] { display: none !important; }
.sn-nav { display: flex; align-items: center; gap: 2px; margin-left: .6rem; }
.sn-link { position: relative; display: inline-flex; align-items: center; gap: 5px; list-style: none; cursor: pointer; font-size: 14.5px; font-weight: 600; color: color-mix(in srgb, var(--ink) 78%, var(--surface)); padding: 8px 11px; border-radius: 8px; white-space: nowrap; user-select: none; }
.sn-link::-webkit-details-marker { display: none; }
.sn-link:hover, .sn-more[open] > .sn-link { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.sn-link[aria-current="page"] { color: var(--primary); }
.sn-link[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -14px; height: 2px; border-radius: 2px; background: var(--primary); }
.sn-link .chev { transition: transform .15s; opacity: .7; }
.sn-more[open] > .sn-link .chev { transform: rotate(180deg); }
.sn-more { position: relative; }
.sn-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.sn-menu a { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 9px; color: var(--ink); line-height: 1.3; }
.sn-menu a:hover { background: var(--surface-2); text-decoration: none; }
.sn-menu a b { font-size: 14.5px; font-weight: 700; }
.sn-menu a span { font-size: 12.5px; color: var(--muted); }
.sn-mobile-cta { display: none; }
.sn-cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sn-cta .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 10px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); text-decoration: none; }
.sn-login { font-size: 14.5px; font-weight: 600; color: var(--ink); padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.sn-login:hover { background: var(--surface-2); text-decoration: none; }
.sn-burger { display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 9px; color: var(--ink); line-height: 0; cursor: pointer; }
.sn-burger .b-close, .sn-burger[aria-expanded="true"] .b-open { display: none; }
.sn-burger[aria-expanded="true"] .b-close { display: inline; }
/* Account menu (signed in) */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 2px 6px 2px 2px; border-radius: 999px; border: 1.5px solid transparent; color: var(--muted); }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: var(--surface-2); border-color: var(--line); }
.user-menu[open] > summary .chev { transform: rotate(180deg); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; max-width: calc(100vw - 32px); max-height: calc(100vh - var(--top-offset, 100px) - 16px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 60; display: flex; flex-direction: column; }
.user-menu .menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu .menu-head .avatar { width: 36px; height: 36px; font-size: .85rem; flex: none; }
.user-menu .menu-head div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-menu .menu-head b, .user-menu .menu-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu .menu-head span { font-size: 12.5px; color: var(--muted); }
.user-menu .menu-head em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--positive); }
.user-menu .menu-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 3px; }
.user-menu .menu a, .user-menu .menu button { text-align: left; padding: 7px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); background: none; border: none; cursor: pointer; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--surface-2); text-decoration: none; }
.user-menu .menu a[aria-current="page"] { color: var(--primary); font-weight: 700; background: var(--primary-soft); }
.user-menu .menu .menu-foot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; display: flex; flex-direction: column; }
.user-menu .menu button[data-logout] { color: var(--negative); }
@media (max-width: 1240px) { .sn-cta .sn-create { padding: 8px 10px; } .sn-cta .sn-create .sn-create-label { display: none; } }
@media (max-width: 1120px) {
  .sn-burger { display: inline-flex; }
  .sn-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: .4rem 16px 1rem; box-shadow: var(--shadow); max-height: calc(100vh - var(--top-offset, 100px)); overflow-y: auto; }
  .sn-nav.open { display: flex; }
  .sn-link { padding: 12px 10px; font-size: 15.5px; border-radius: 10px; }
  .sn-link[aria-current="page"] { background: var(--primary-soft); }
  .sn-link[aria-current="page"]::after { display: none; }
  .sn-more > .sn-link { width: 100%; justify-content: space-between; }
  .sn-menu { position: static; width: auto; box-shadow: none; border: none; padding: 0 0 .4rem .6rem; }
  .sn-mobile-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: .8rem; margin-top: .4rem; border-top: 1px solid var(--line); }
  .sn-mobile-cta .btn { justify-content: center; }
  .sn-cta .sn-login { display: none; }
}
@media (max-width: 349px) { .site-header .brand .pill-demo { display: none; } }
@media (max-width: 560px) { .sn-cta .sn-start, .brand .by { display: none; } .user-menu .menu { position: fixed; left: 12px; right: 12px; top: calc(var(--top-offset, 100px) + 6px); width: auto; max-width: none; } }
.nav-open .bot-fab, .nav-open .bot, .nav-open .tray { display: none !important; }
.demo-banner { background: var(--accent-soft); border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); font-size: .8rem; color: var(--accent); }
.demo-banner .wrap { display: flex; align-items: center; justify-content: center; text-align: center; padding-top: .35rem; padding-bottom: .35rem; min-height: 0; }
.demo-banner span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .demo-banner span { white-space: normal; } }
.demo-banner .dismiss { flex: none; background: none; border: none; color: var(--accent); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: .1rem .3rem; border-radius: 6px; }
.demo-banner .dismiss:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.demo-banner[hidden] { display: none; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 10px; padding: .6rem 1rem; font-weight: 600; font-size: .95rem; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); cursor: pointer; transition: transform .08s, background .15s; }
.btn:hover { text-decoration: none; background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, #000); }
.btn-accent { background: var(--positive); color: #fff; border-color: var(--positive); }
.btn-accent:hover { background: color-mix(in srgb, var(--positive) 88%, #000); }
.btn-sm { padding: .4rem .7rem; font-size: .85rem; border-radius: 8px; }
/* Buttons keep their own colours wherever they sit (nav, lists, tables, cards) */
a.btn, button.btn, .site-nav a.btn, p a.btn, li a.btn, td a.btn, dd a.btn { color: var(--text); background: var(--bg-elev); }
a.btn:hover, button.btn:hover, .site-nav a.btn:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
a.btn-primary, button.btn-primary, .site-nav a.btn-primary, p a.btn-primary, li a.btn-primary, td a.btn-primary, dd a.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
a.btn-primary:hover, button.btn-primary:hover, .site-nav a.btn-primary:hover { color: #fff; background: color-mix(in srgb, var(--primary) 88%, #000); }
a.btn-accent, button.btn-accent { color: #fff; background: var(--positive); border-color: var(--positive); }
a.btn-accent:hover, button.btn-accent:hover { color: #fff; background: color-mix(in srgb, var(--positive) 88%, #000); }
.site-nav a.btn { padding: .4rem .75rem; }
.btn-block { width: 100%; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; width: 100%; min-height: 42px; -webkit-appearance: none; appearance: none; }
select { padding-right: 2.2rem; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C6C69' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right .8rem center; cursor: pointer; }
select:disabled { opacity: .6; cursor: default; }
input[type="search"] { padding-left: 2.2rem; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235C6C69' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>"); background-repeat: no-repeat; background-position: .8rem center; }
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
input[type="checkbox"], input[type="radio"], input[type="file"] { -webkit-appearance: auto; appearance: auto; min-height: 0; width: auto; }
input[type="number"] { -moz-appearance: textfield; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 1px; border-color: var(--primary); }
label { font-size: .85rem; font-weight: 600; display: block; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.switch { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 500; cursor: pointer; }
.switch input { width: auto; accent-color: var(--primary); }

/* Layout blocks */
.hero { padding: 3rem 0 2rem; }
.hero h1 { max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.section { padding: 2rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card.sponsored { border-color: var(--gold-line); background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface)); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stat { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); }
.stat .k { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .v { font-size: 1.35rem; font-weight: 700; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.stat .s { font-size: .8rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); }

/* Marketplace toolbar & cards */
.toolbar { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr auto; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.toolbar > div { min-width: 0; }
.toolbar .switch { height: 42px; align-items: center; margin: 0; white-space: nowrap; }
@media (max-width: 900px) { .toolbar { grid-template-columns: 1fr 1fr; } .toolbar .search { grid-column: 1 / -1; } }
.algo-card { display: flex; flex-direction: column; gap: .6rem; position: relative; padding: .9rem 1rem; }
.algo-card h3 { margin: 0; font-size: 1rem; line-height: 1.25; min-height: 2.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.algo-card h3 a::after { content: ""; position: absolute; inset: 0; }
.algo-card .provider { font-size: .78rem; color: var(--muted); }
.algo-card .top { display: flex; align-items: flex-start; gap: .5rem; justify-content: space-between; }
.algo-card .top .pill-sponsored { font-size: .6rem; padding: .1rem .45rem; flex: none; }
.algo-card .tags { gap: .3rem; align-items: center; flex-wrap: nowrap; overflow: hidden; }
.algo-card .tags > * { flex: none; white-space: nowrap; }
.algo-card .tags .tag { overflow: hidden; text-overflow: ellipsis; max-width: 48%; flex: 0 1 auto; }
.algo-card .tag { font-size: .7rem; padding: .1rem .5rem; }
.algo-card .pill-risk { font-size: .66rem; padding: .1rem .5rem; }
.algo-card .metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.algo-card .metrics div { background: var(--bg-soft); border-radius: 8px; padding: .4rem .5rem; min-width: 0; overflow: hidden; }
.algo-card .metrics .k { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; line-height: 1.2; }
.algo-card .metrics .v { font-weight: 700; font-size: .98rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Narrow cards (small phones, four columns on desktop): smaller figures so values like +66.7% are never cut off */
.algo-card { container-type: inline-size; }
@container (max-width: 300px) { .algo-card .metrics { gap: .25rem; } .algo-card .metrics div { padding: .35rem .4rem; } .algo-card .metrics .v { font-size: .86rem; } }
.algo-card .minor { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .76rem; color: var(--muted); }
.algo-card .minor b { color: var(--ink); font-variant-numeric: tabular-nums; }
.algo-card .foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .76rem; position: relative; z-index: 1; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--line); }
.algo-card .foot .price { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.algo-card .foot .price b { font-size: .95rem; color: var(--ink); }
.algo-card .foot .btn-sm { padding: .3rem .6rem; font-size: .78rem; white-space: nowrap; flex: none; }
.algo-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }
@media (max-width: 900px) { .algo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .algo-grid { grid-template-columns: minmax(0, 1fr); } }
.algo-grid > * { min-width: 0; }
.empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Compare table */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--bg-elev); }
th, td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
th button.sort { all: unset; cursor: pointer; }
th button.sort::after { content: " ↕"; opacity: .4; }
th[aria-sort="descending"] button.sort::after { content: " ↓"; opacity: 1; }
th[aria-sort="ascending"] button.sort::after { content: " ↑"; opacity: 1; }

/* Account overview: returns and investments */
.ov-kpis { margin: 0 0 1.25rem !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 1px; background: var(--line); }
@media (min-width: 1360px) { .ov-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.ov-kpis > div { background: var(--surface); border: none !important; }
.ov-kpis dd { white-space: nowrap; }
.ov-kpis dd small { white-space: normal; }

.ov-kpis .ov-best-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ov-card { margin-bottom: 1.25rem; min-width: 0; padding: 1.25rem 1.4rem; }
#account-body, #vendor-body { margin-top: .9rem; }
.ov-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ov-head h2 { font-size: 1.15rem; margin: 0 0 .2rem; }
.ov-head p { margin: 0; max-width: 680px; }
.ov-note { margin: .4rem 0 0; }
.ov-hm table { font-size: .76rem; }
.ov-hm th, .ov-hm td { padding: .45rem .35rem; }
.ov-hm thead th { font-size: .66rem; letter-spacing: .02em; }
.ov-hm tbody th, .ov-hm tfoot th { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink); background: var(--surface); text-align: left; position: sticky; left: 0; z-index: 1; min-width: 150px; max-width: 190px; padding-left: .7rem; }
.ov-hm tbody th a { display: block; font-weight: 600; color: var(--ink); white-space: normal; }
.ov-hm tbody th span { display: block; font-weight: 400; }
.ov-hm td.hm { background: color-mix(in srgb, var(--positive) calc(var(--hm) * 100%), var(--surface)); }
.ov-hm td.hm[data-sign="neg"] { background: color-mix(in srgb, var(--negative) calc(var(--hm) * 100%), var(--surface)); }
.ov-hm td.hm-pre { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--surface) 70%, transparent) 5px 8px); color: var(--muted); }
.ov-hm td.hm-na { color: var(--muted); }
.ov-hm tfoot td, .ov-hm tfoot th { font-weight: 700; border-top: 2px solid var(--line); background: var(--surface-2); }
.ov-hm .ov-tot { font-weight: 700; background: var(--surface); }
.hm-key { display: inline-block; width: 22px; height: 10px; border-radius: 3px; vertical-align: middle; background: repeating-linear-gradient(135deg, var(--positive-soft) 0 4px, var(--surface) 4px 7px); border: 1px solid var(--line); }
.ov-inv { font-size: .84rem; }
.ov-inv th, .ov-inv td { padding: .55rem .5rem; white-space: nowrap; }
.ov-inv th { font-size: .68rem; letter-spacing: .02em; }
.ov-w { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.ov-w i { display: block; height: 100%; background: var(--primary); }
.subs-billing { margin-bottom: 1rem; }
.subs-list { display: grid; gap: .6rem; }
.sub-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) auto minmax(0, 2fr) auto; gap: .6rem 1.4rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.sub-row > * { min-width: 0; }
.sub-main a { font-weight: 700; color: var(--ink); }
.sub-main .badge { margin-top: .35rem; display: inline-block; }
.sub-mult { text-align: center; }
.sub-mult .small { margin-top: .3rem; white-space: nowrap; }
.sub-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem 1rem; margin: 0; }
.sub-figs dt { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sub-figs dd { margin: .1rem 0 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub-figs dd small { display: block; font-size: .78rem; color: var(--muted); }
.sub-act { display: flex; gap: .4rem; justify-content: flex-end; }
.sub-act .btn { min-width: 5.25rem; justify-content: center; }
@media (max-width: 1180px) {
  .sub-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sub-figs { grid-column: 1 / -1; order: 3; border-top: 1px solid var(--line); padding-top: .7rem; }
  .sub-act { grid-column: 1 / -1; order: 4; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .sub-row { grid-template-columns: minmax(0, 1fr); }
  .sub-mult { text-align: left; }
  .sub-mult .stepper { margin: 0; }
  .sub-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.subs-billing h3 { margin-top: 0; }
.subs-plan { display: flex; align-items: baseline; gap: .6rem; }
.subs-plan b { font-family: var(--display); font-size: 1.3rem; }
.subs-plan span { color: var(--muted); }

/* Publisher: per-subscriber account view */
.sub-back { margin: 0 0 .6rem; font-size: .9rem; }
.sub-back a { color: var(--primary); font-weight: 600; }
.sub-head { margin-bottom: 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.sub-id { display: flex; gap: .8rem; align-items: center; }
.sub-id h2 { margin: 0; font-size: 1.25rem; }
.sub-id p { margin: .1rem 0 0; }
.sub-privacy { max-width: 420px; margin: 0; }
.sub-legs { white-space: normal !important; font-family: var(--mono); font-size: .74rem; line-height: 1.7; min-width: 300px; }
.sub-legs .side.B { color: var(--positive); font-weight: 700; } .sub-legs .side.S { color: var(--negative); font-weight: 700; }

/* My strategies: saved strategy cards (same layout as listing cards) */
.vs-heading { font-size: 1.05rem; margin: .4rem 0 .7rem; display: flex; align-items: baseline; gap: .5rem; }
.vs-card { margin-bottom: .8rem; }
.vs-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.vs-top h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.vs-stats { margin-top: .8rem; }
.vs-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

/* Create a strategy: method choice, rule builder, results, save and deploy */
.step-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0 0; }
.tpl-cols { margin: .6rem 0 1rem; }
.tpl-cols summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.tpl-cols .table-wrap { margin-top: .6rem; }
.tpl-cols td { white-space: normal; font-size: .84rem; }
.notice.error { background: var(--negative-soft); border-color: transparent; color: var(--ink); }
.notice ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.bt-head, .saved-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bt-head h2, .saved-card h2 { margin: .1rem 0 .2rem; font-size: 1.4rem; }
.bt-head p, .saved-card p { margin: 0; }
.bt-kpis { background: var(--surface); }
.bt-trades td { vertical-align: top; }
.bt-trades .bt-legs { white-space: normal; font-family: var(--mono); font-size: .76rem; line-height: 1.7; min-width: 320px; }
.bt-trades .side.B { color: var(--positive); font-weight: 700; } .bt-trades .side.S { color: var(--negative); font-weight: 700; }
.saved-card { border-top: 3px solid var(--positive); }
.saved-kpis { display: flex; gap: 1.4rem; margin: 0; flex-wrap: wrap; }
.saved-kpis dt { font-size: .75rem; color: var(--muted); }
.saved-kpis dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.deploy-card { display: flex; flex-direction: column; gap: .6rem; }
.deploy-card h3 { margin: 0; font-size: 1.15rem; }
.deploy-card p { margin: 0; }
.deploy-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.deploy-row select { width: auto; flex: 1; min-width: 120px; }
.dep-cap { margin-left: auto; font-variant-numeric: tabular-nums; }
.deploy-card .btn-block { margin-top: auto; }
.dep-status { margin: 0; } .dep-status[hidden] { display: none; }
.dep-status a { color: var(--primary); }
.publish-box { padding: 0; }
.publish-box > summary { list-style: none; cursor: pointer; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.publish-box > summary::-webkit-details-marker { display: none; }
.publish-box > summary::after { content: "+"; font-size: 1.4rem; color: var(--muted); }
.publish-box[open] > summary::after { content: "−"; }
.publish-box > summary > span { display: flex; flex-direction: column; gap: .1rem; }
.publish-box[open] { padding-bottom: 1rem; }
.publish-box > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }

/* Create a strategy: instrument search (index from scripts/instruments.js) */
.inst-search { display: flex; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.inst-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.inst-search select { flex: none; width: auto; border: none; border-right: 1px solid var(--line); border-radius: 10px 0 0 10px; background-color: var(--surface-2); font-size: .85rem; box-shadow: none; }
.inst-combo { position: relative; flex: 1; min-width: 0; }
.inst-combo input { border: none; box-shadow: none; outline: none; width: 100%; background: transparent; }
.inst-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: -1px; right: -1px; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow-y: auto; }
@media (max-width: 700px) { .inst-list { left: auto; width: calc(100vw - 64px); right: -1px; } }
.inst-list li[role="option"] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; padding: .5rem .6rem; border-radius: 8px; cursor: pointer; }
.inst-list li[aria-selected="true"] { background: var(--primary-soft); }
.io-main { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.io-main b { font-family: var(--mono); font-size: .9rem; }
.io-main span { color: var(--muted); font-size: .8rem; margin-left: .4rem; }
.io-meta { grid-column: 1 / -1; font-size: .76rem; color: var(--muted); }
.io-seg { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 6px; background: var(--surface-2); color: var(--muted); align-self: start; white-space: nowrap; }
.io-fo { background: var(--primary-soft); color: var(--primary); }
.io-eq { background: var(--positive-soft); color: var(--positive); }
.io-com { background: var(--accent-soft); color: var(--accent); }
.io-cur, .io-idx { background: var(--surface-2); color: var(--ink); }
.io-none { padding: .6rem; color: var(--muted); font-size: .86rem; }
.inst-picked { margin-top: .6rem; border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 10px; padding: .7rem .9rem; background: var(--bg); font-size: .88rem; position: relative; }
.inst-picked b { font-family: var(--mono); }
.inst-picked ul { margin: .35rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.inst-picked li { margin: .1rem 0; }
.inst-picked li b { color: var(--ink); font-family: var(--font); }
.inst-picked [data-inst-change] { position: absolute; top: .55rem; right: .6rem; }
.inst-picked[hidden] { display: none; }

/* Combine page: searchable algo picker */
.picker-card { margin-bottom: 1rem; }
.picker-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.picker-head h2 { font-size: 1.05rem; margin: 0 0 .1rem; }
.picker-head p { margin: 0; }
.picker-search { display: flex; align-items: center; gap: .5rem; flex: 0 1 380px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 0 .75rem; background: var(--surface); color: var(--muted); }
.picker-search:focus-within { border-color: var(--primary); }
.picker-search input { border: none; outline: none; box-shadow: none; background: transparent; padding: .55rem 0; width: 100%; min-width: 0; font: inherit; color: var(--ink); }
@media (max-width: 600px) { .picker-search { flex-basis: 100%; } }
.picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem; }
.picker-item { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .65rem; transition: border-color .12s, background .12s; }
.picker-item:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.picker-item.on { border-color: var(--primary); background: var(--primary-soft); }
.picker-item[hidden] { display: none; }
.picker-item input { margin-top: .2rem; }
.picker-item b { display: block; font-weight: 600; font-size: .9rem; }
.picker-item small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; }
#picker-empty { margin: .4rem 0 0; }
#picker-empty[hidden] { display: none; }

/* Combine tray */
.tray { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: min(1100px, calc(100% - 32px)); background: var(--ink); color: #fff; border-radius: 999px; padding: .4rem .45rem .4rem 1rem; display: none; align-items: center; gap: .7rem; box-shadow: 0 12px 32px -12px rgba(0,0,0,.55); z-index: 60; }
.tray.show { display: flex; }
.tray-count { flex: none; white-space: nowrap; font-size: .85rem; color: rgba(255,255,255,.7); }
.tray-count b { color: #fff; font-size: 1rem; margin-right: .15rem; }
.tray-chips { list-style: none; margin: 0; padding: 0; display: flex; gap: .35rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tray-chips::-webkit-scrollbar { display: none; }
.tray-chips li { flex: none; display: inline-flex; align-items: center; gap: .15rem; background: rgba(255,255,255,.12); border-radius: 999px; padding: .2rem .25rem .2rem .7rem; font-size: .8rem; max-width: 168px; }
.tray-chips li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-chips button { flex: none; width: 20px; height: 20px; border: none; border-radius: 50%; background: transparent; color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1; cursor: pointer; }
.tray-chips button:hover { background: rgba(255,255,255,.18); color: #fff; }
.tray-go { flex: none; white-space: nowrap; background: var(--positive); color: #fff; font-weight: 700; font-size: .88rem; padding: .5rem 1rem; border-radius: 999px; }
.tray-go:hover { text-decoration: none; background: color-mix(in srgb, var(--positive) 88%, #000); }
.tray-clear { flex: none; border: none; background: none; color: rgba(255,255,255,.75); font: inherit; font-size: .85rem; padding: .5rem .7rem .5rem .2rem; cursor: pointer; }
.tray-clear:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) { .tray { left: 16px; right: 16px; transform: none; width: auto; max-width: none; justify-content: space-between; } .tray-chips { display: none; } }
body.tray-on .bot-fab { bottom: 84px; }
body.tray-on { padding-bottom: 80px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .tick { font-size: 11px; fill: var(--muted); }
.chart .axis { font-size: 12px; fill: var(--muted); font-weight: 600; }
.chart .pt-label { font-size: 11px; fill: var(--ink); }
.chart rect.pos { fill: var(--positive); } .chart rect.neg { fill: var(--negative); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
.dist { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.dist li { display: grid; grid-template-columns: 150px 1fr 90px; gap: .6rem; align-items: center; font-size: .85rem; }
.dist-bar { height: 12px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 6px; }
.dist-bar i.pos { background: var(--positive); } .dist-bar i.neg { background: var(--negative); }
.dist-count { color: var(--muted); text-align: right; }
.corr th, .corr td { text-align: center; }
.corr td { font-variant-numeric: tabular-nums; }
.corr td.pos { background: color-mix(in srgb, var(--negative) calc(var(--a) * 45%), transparent); }
.corr td.neg { background: color-mix(in srgb, var(--positive) calc(var(--a) * 45%), transparent); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cal .dow { font-size: .72rem; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.cal .d { min-height: 54px; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .4rem; font-size: .75rem; color: var(--muted); background: var(--bg-elev); }
.cal .d.pos { background: var(--positive-soft); border-color: color-mix(in srgb, var(--positive) 40%, var(--line)); }
.cal .d.neg { background: var(--negative-soft); border-color: color-mix(in srgb, var(--negative) 40%, var(--line)); }
.cal .d b { display: block; font-size: .85rem; color: var(--text); margin-top: .15rem; font-variant-numeric: tabular-nums; }
.cal .d.off { opacity: .35; }

/* Detail page */
.hero-kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin-bottom: .6rem; }
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; padding-top: 1.5rem; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: calc(var(--top-offset, 60px) + 16px); }
.subnav { position: sticky; top: var(--top-offset, 60px); z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav ul { display: flex; gap: .2rem; list-style: none; padding: 0; margin: 0; }
.subnav a { display: block; padding: .7rem .8rem; font-size: .9rem; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.block { padding: 1.4rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-offset, 60px) + 50px); }
.block:last-child { border-bottom: none; }
.block h2 { font-size: 1.2rem; margin-bottom: .9rem; }
/* Strategy page (dp-*): hero with headline figures, sticky section bar with scroll-spy, panels, sticky subscribe column */
.dp-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1.6rem 0 1.8rem; }
.dp-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); margin-bottom: .4rem; }
.dp-byline a { color: var(--primary); font-weight: 600; }
.dp-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -.03em; margin-bottom: .4rem; }
.dp-summary { font-size: 1.08rem; color: var(--muted); max-width: 760px; margin-bottom: .8rem; }
.dp-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.3rem; }
.dp-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; }
.dp-kpis > div { padding: .85rem 1rem; border-left: 1px solid var(--line); min-width: 0; }
.dp-kpis > div:first-child { border-left: none; }
.dp-kpis dt { font-size: .78rem; color: var(--muted); }
.dp-kpis dt a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.dp-kpis dd { margin: .15rem 0 0; font-family: var(--display); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dp-kpis dd small { display: block; font-family: var(--font); font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
@media (max-width: 900px) { .dp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dp-kpis > div:nth-child(4) { border-left: none; } .dp-kpis > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .dp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dp-kpis > div { border-left: none; border-top: 1px solid var(--line); } .dp-kpis > div:nth-child(even) { border-left: 1px solid var(--line); } .dp-kpis > div:nth-child(-n+2) { border-top: none; } }

.dp-nav { overflow: visible; box-shadow: 0 1px 0 var(--line); border-bottom: none; }
.dp-nav .wrap { display: flex; align-items: center; gap: 1rem; }
.dp-nav ul { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dp-nav ul::-webkit-scrollbar { display: none; }
.dp-nav a { padding: .85rem .8rem; font-weight: 600; font-size: .9rem; }
.dp-nav a[aria-current="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.dp-nav a.dp-nav-cta { display: none; flex: none; padding: .4rem .8rem; color: #fff; border-bottom: none; }
@media (max-width: 960px) { .dp-nav a.dp-nav-cta { display: inline-flex; } }

.dp-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 1.6rem; padding-top: 1.6rem; padding-bottom: 2.5rem; }
@media (max-width: 960px) { .dp-layout { grid-template-columns: minmax(0, 1fr); } .dp-aside { position: static; } }
.dp-main { display: grid; gap: 1.2rem; min-width: 0; }
.detail-layout[hidden], .subnav[hidden], #private-gate[hidden] { display: none; }
.dp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.5rem; scroll-margin-top: calc(var(--top-offset, 60px) + 64px); min-width: 0; }
@media (max-width: 600px) { .dp-panel { padding: 1.1rem 1rem; } }
.dp-head { margin-bottom: 1.1rem; }
.dp-head h2 { font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: .2rem; }
.dp-head p { color: var(--muted); font-size: .92rem; margin: 0; max-width: 760px; }
.dp-panel h3 { font-size: 1rem; margin-bottom: .6rem; }
.dp-sub { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--top-offset, 60px) + 64px); }
.dp-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
@media (max-width: 760px) { .dp-two { grid-template-columns: minmax(0, 1fr); } }

.dp-returns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.dp-returns div { background: var(--bg); border-radius: 10px; padding: .55rem .4rem; text-align: center; }
.dp-returns span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.dp-returns b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .dp-returns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dp-chars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.2rem; margin: 0; }
@media (max-width: 760px) { .dp-chars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dp-chars dt { font-size: .76rem; color: var(--muted); }
.dp-chars dd { margin: .1rem 0 0; font-weight: 600; font-size: .95rem; }
.dp-chars dd a { color: var(--primary); }

.dp-spec { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; font-size: .9rem; }
.dp-spec dt, .dp-spec dd { padding: .5rem 0; border-top: 1px solid var(--line); margin: 0; }
.dp-spec dt:first-of-type, .dp-spec dt:first-of-type + dd { border-top: none; }
.dp-spec dt { color: var(--muted); padding-right: .8rem; }
.dp-spec dt a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.dp-spec dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.dp-table td, .dp-table th { white-space: nowrap; }
.dp-panel .table-wrap { border-radius: 10px; }

.dp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 600px) { .dp-stats { grid-template-columns: minmax(0, 1fr); } }
.dp-stats div { background: var(--bg); border-radius: 12px; padding: .8rem 1rem; }
.dp-stats span { display: block; font-size: .78rem; color: var(--muted); }
.dp-stats b { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dp-stats small { color: var(--muted); font-size: .78rem; }
.dp-grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .dp-grid4 { grid-template-columns: minmax(0, 1fr); } }
.dp-card { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem .4rem; }
.dp-card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: .2rem; }

/* trade calendar: month switcher, clickable days, month summary, day detail */
.tc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
@media (max-width: 860px) { .tc { grid-template-columns: minmax(0, 1fr); } }
.tc-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tc-step { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.tc-step:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.tc-step:disabled { opacity: .35; cursor: default; }
.tc-month { width: auto; min-width: 0; padding-top: .45rem; padding-bottom: .45rem; font-weight: 700; font-family: var(--display); }
.tc-total { margin-left: auto; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tc-total span { font-weight: 600; font-size: .9rem; }
.tc-note { font-size: .84rem; color: var(--muted); margin: .5rem 0 .8rem; }
.tc-grid button.d { font: inherit; font-size: .75rem; text-align: left; color: var(--muted); cursor: pointer; transition: box-shadow .12s, transform .12s; }
.tc-grid button.d:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }
.tc-grid button.d.sel { box-shadow: 0 0 0 2px var(--primary); border-color: var(--primary); }
.tc-grid button.d:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: .9rem 0 0; }
@media (max-width: 480px) { .tc-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tc-sum div { background: var(--bg); border-radius: 10px; padding: .5rem .65rem; }
.tc-sum dt { font-size: .72rem; color: var(--muted); }
.tc-sum dd { margin: 0; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tc-day { background: var(--bg); border-radius: 14px; padding: 1rem; min-height: 100%; }
.tc-day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: .6rem; margin-bottom: .8rem; }
.tc-day-head h3 { margin: 0; font-size: 1.1rem; }
.tc-day-head > b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tc-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.tc-day .signal { background: var(--surface); }
.tc-day .signal:last-child { margin-bottom: 0; }
.tc-empty p { color: var(--muted); margin: .3rem 0 0; }
.signal .sig-top { display: flex; justify-content: space-between; gap: 1rem; }
.signal .sig-top span { font-weight: 700; font-variant-numeric: tabular-nums; }
.signal .legs .lh { font-family: var(--font); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.signal .sig-foot { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 520px) { .tc-day .signal .legs { grid-template-columns: auto minmax(0, 1fr); font-size: .76rem; gap: .1rem .6rem; } .tc-day .signal .legs .lh { display: none; } .tc-day .signal .legs .sym { overflow-wrap: anywhere; } .tc-day .signal .legs .side { margin-top: .45rem; } .tc-day .signal .legs .sym { margin-top: .45rem; } .tc-day .signal .legs .q { grid-column: 2; color: var(--muted); } .tc-day .signal .legs .x { grid-column: 2; color: var(--muted); } .tc-day .signal .legs .x::before { content: "exit "; } }
.dp-desc { font-size: 1rem; line-height: 1.65; max-width: 820px; margin-bottom: 1.3rem; }
.dp-steps { margin: 0 0 .8rem; padding-left: 1.2rem; display: grid; gap: .45rem; }
.dp-steps li::marker { color: var(--primary); font-weight: 700; }
.dp-note { background: var(--accent-soft); border-radius: 10px; padding: .85rem 1rem; font-size: .92rem; line-height: 1.55; }
.dp-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.dp-similar h2 { font-size: 1.25rem; margin: .6rem 0 .8rem; }
.dp-similar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .dp-similar-grid { grid-template-columns: minmax(0, 1fr); } }

.dp-aside { display: grid; gap: 1rem; top: calc(var(--top-offset, 60px) + 66px); }
.dp-buy { border-top: 3px solid var(--primary); }
.dp-price b { font-family: var(--display); font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.dp-price span { color: var(--muted); }
.dp-buy > p.small { margin: 0 0 .6rem; }
.dp-buy .dp-spec { margin-bottom: 1rem; }
.dp-vendor h3 { font-size: 1.05rem; margin: .2rem 0 .1rem; }
.dp-vendor h3 a { color: var(--ink); }
.dp-vendor > p.small { margin: 0 0 .5rem; }
.dp-vendor .dp-spec { margin-bottom: .8rem; }
.dp-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }

.signal { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .6rem; }
.signal .legs { display: grid; grid-template-columns: auto 1fr auto auto; gap: .3rem .8rem; font-size: .85rem; font-family: var(--mono); margin-top: .5rem; }
.signal .side { font-weight: 700; } .signal .side.S { color: var(--negative); } .signal .side.B { color: var(--positive); }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.1rem; margin-bottom: .5rem; transition: border-color .15s, box-shadow .15s; }
details.faq:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
details.faq[open] { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow); }
details.faq summary { list-style: none; cursor: pointer; font-weight: 600; font-size: .98rem; padding: .95rem 2rem .95rem 0; position: relative; color: var(--ink); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: ""; position: absolute; right: .1rem; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s, border-color .2s; }
details.faq[open] summary::after { transform: translateY(-30%) rotate(225deg); border-color: var(--primary); }
details.faq[open] summary { color: var(--primary); }
details.faq p { margin: 0 0 1rem; color: var(--muted); line-height: 1.6; max-width: 70ch; }
details.faq summary:focus { outline: none; }
details.faq summary:focus-visible { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--primary); }
.disclosure { font-size: .8rem; color: var(--muted); background: var(--bg-soft); border-radius: var(--radius); padding: 1rem 1.2rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .3rem; opacity: .6; }

/* Steps (create flow) */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: 1.5rem; counter-reset: s; }
.steps li { list-style: none; font-size: .8rem; color: var(--muted); border-top: 3px solid var(--line); padding-top: .4rem; }
.steps li.active { border-color: var(--primary); color: var(--text); font-weight: 600; }
.steps li.done { border-color: var(--primary); }
.code { white-space: pre; background: var(--ink); color: #E8EFEC; border-radius: 10px; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--mono); font-size: .82rem; line-height: 1.5; margin: 0 0 1rem; }
:root[data-theme="dark"] .code, .code { border: 1px solid var(--line); }
.endpoint { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; font-family: var(--mono); font-size: .85rem; margin-bottom: .5rem; }
.endpoint > span { min-width: 0; overflow-wrap: anywhere; }
p code, li code, dd code, td code { overflow-wrap: anywhere; }
.endpoint .m { font-weight: 700; padding: .1rem .5rem; border-radius: 6px; font-size: .75rem; }
.endpoint .m.get { background: var(--primary-soft); color: var(--primary); } .endpoint .m.post { background: var(--positive-soft); color: var(--positive); } .endpoint .m.put { background: var(--accent-soft); color: var(--accent); } .endpoint .m.delete { background: var(--negative-soft); color: var(--negative); }
.toc { position: sticky; top: calc(var(--top-offset, 60px) + 16px); font-size: .9rem; }
.toc a { display: block; padding: .25rem 0; color: var(--muted); }

/* Multiplier stepper and subscribe dialog */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; flex: none; }
.stepper button { width: 34px; height: 36px; border: none; background: transparent; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--surface-2); color: var(--primary); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input { width: 2.6rem; border: none; border-left: 1px solid var(--line); border-radius: 0; padding: 0; height: 36px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent; box-shadow: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper span { padding: 0 .45rem 0 .1rem; font-weight: 700; border-right: 1px solid var(--line); height: 36px; line-height: 36px; }
.stepper input:focus { outline: none; }
.stepper:focus-within { border-color: var(--primary); }
.stepper-sm { border-radius: 8px; height: 31px; }
.stepper-sm button { width: 26px; height: 29px; font-size: .95rem; }
.stepper-sm input { height: 29px; min-height: 0; width: 1.9rem; padding: 0; font-size: .85rem; }
.stepper-sm span { height: 29px; line-height: 29px; font-size: .85rem; padding: 0 .35rem 0 .05rem; }
td .stepper + .small { margin-top: .2rem; }
dialog.sm { border: none; padding: 0; border-radius: 18px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(18,33,30,.45); }
dialog.sm::backdrop { background: rgba(18,33,30,.45); }
.sm-box { padding: 1.3rem 1.4rem 1.2rem; }
.sm-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.sm-top h2 { font-size: 1.25rem; margin: 0; }
.sm-x { border: none; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 .2rem; }
.sm-lead { color: var(--muted); font-size: .92rem; margin: .4rem 0 1rem; }
.sm-all { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.sm-rows { border: 1px solid var(--line); border-radius: 12px; }
.sm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 110px; gap: .9rem; align-items: center; padding: .75rem .9rem; border-top: 1px solid var(--line); }
.sm-row:first-child { border-top: none; }
.sm-name a { font-weight: 700; color: var(--ink); }
.sm-name > span:last-child { display: block; font-size: .78rem; color: var(--muted); margin-top: .1rem; }
.sm-cap { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .sm-row { grid-template-columns: minmax(0, 1fr) auto; } .sm-name { grid-column: 1 / -1; } .sm-cap { align-self: center; } }
.sm-total { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .6rem; margin: 1rem 0 0; }
.sm-total div { background: var(--bg); border-radius: 12px; padding: .65rem .8rem; }
.sm-total dt { font-size: .75rem; color: var(--muted); }
.sm-total dd { margin: .1rem 0 0; font-family: var(--display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.sm-total div:first-child dd { color: var(--primary); font-size: 1.35rem; }
@media (max-width: 480px) { .sm-total { grid-template-columns: 1fr 1fr; } .sm-total div:first-child { grid-column: 1 / -1; } }
.sm-warn { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: .6rem .8rem; font-size: .86rem; margin: .8rem 0 0; }
.sm-warn[hidden] { display: none; }
.sm-warn a { color: var(--primary); }
.sm-note { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }
.sm-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }

/* Pricing */
.ps-head { margin-bottom: 1.2rem; }
.ps-head h2 { margin-bottom: .2rem; }
.ps-head p { margin: 0; }
.ps-rules { list-style: none; counter-reset: ps; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 1000px) { .ps-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ps-rules { grid-template-columns: minmax(0, 1fr); } }
.ps-rules li { counter-increment: ps; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.ps-rules li::before { content: counter(ps); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-family: var(--display); font-weight: 800; font-size: .85rem; margin-bottom: .6rem; }
.ps-rules b { display: block; font-family: var(--display); font-size: 1.02rem; margin-bottom: .2rem; }
.ps-rules span { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.ps-rules a { color: var(--primary); }
.ps-example { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem 1.4rem; }
@media (max-width: 820px) { .ps-example { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; } }
.ps-example h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.ps-example > div > p { margin-bottom: .9rem; }
.ps-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-bottom: .9rem; }
.ps-bar span { display: block; height: 100%; }
.ps-bar .keep, .ps-legend i.keep { background: var(--positive); }
.ps-bar .share, .ps-legend i.share { background: var(--primary); }
.ps-bar .sub, .ps-legend i.sub { background: var(--accent); }
.ps-legend { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.ps-legend li { display: flex; align-items: center; gap: .55rem; padding: .4rem 0; color: var(--muted); }
.ps-legend li b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.ps-legend li b.pos { color: var(--positive); }
.ps-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ps-legend .total { border-top: 1px solid var(--line); margin-top: .2rem; padding-top: .6rem; padding-left: calc(10px + .55rem); }
.ps-months { list-style: none; padding: 0; margin: .7rem 0 0; position: relative; }
.ps-months li { display: grid; grid-template-columns: 74px auto; column-gap: .8rem; padding: 0 0 1rem 1.3rem; position: relative; }
.ps-months li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.ps-months li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 1rem; bottom: 0; width: 1px; background: var(--line); }
.ps-months .m { font-size: .82rem; color: var(--muted); }
.ps-months b { font-variant-numeric: tabular-nums; }
.ps-months li > span:last-child { grid-column: 2; color: var(--muted); font-size: .86rem; }

.price-card { position: relative; }
.price-card.featured { border-color: var(--primary); box-shadow: var(--shadow); background: var(--surface); }
.price-card .amount { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; }
.price-card ul { padding-left: 1.1rem; margin: .8rem 0 1rem; }
.price-card li { margin: .25rem 0; font-size: .92rem; }

/* Assistant bot */
.bot-fab { position: fixed; right: 16px; bottom: 16px; z-index: 70; border-radius: 999px; padding: .7rem 1rem; font-family: var(--font); background: var(--primary); color: #fff; border: none; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); cursor: pointer; display: flex; gap: .5rem; align-items: center; }
.bot { position: fixed; right: 16px; bottom: 76px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px)); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); display: none; flex-direction: column; z-index: 70; overflow: hidden; }
.bot.open { display: flex; }
.bot header { padding: .8rem 1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.bot header button { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.bot .log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.bot .msg { max-width: 88%; padding: .55rem .8rem; border-radius: 12px; font-size: .9rem; line-height: 1.45; }
.bot .msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bot .msg.reply { align-self: flex-start; background: var(--bg-soft); border-bottom-left-radius: 4px; }
.bot .msg a { text-decoration: underline; }
.bot .chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 1rem .5rem; }
.bot .chips button { font-size: .75rem; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: .25rem .6rem; cursor: pointer; color: var(--text); }
.bot .chips:empty { display: none; }
.bot .chips button:hover { border-color: var(--primary); color: var(--primary); }
.bot .msg.reply { max-width: 94%; }
.bot .msg p { margin: .35rem 0 0; } .bot .msg p:first-child { margin-top: 0; }
.bot .msg ol, .bot .msg ul { margin: .35rem 0 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.bot .msg .muted { color: var(--muted); }
.bot .msg .small { font-size: .78rem; }
.bot-table-wrap { overflow-x: auto; margin-top: .2rem; }
.bot-table { border-collapse: collapse; width: 100%; font-size: .78rem; font-variant-numeric: tabular-nums; }
.bot-table th, .bot-table td { text-transform: none; letter-spacing: 0; background: none; position: static; font-size: .78rem; }
.bot-table th, .bot-table td { padding: .25rem .35rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.bot-table th:first-child { text-align: left; font-weight: 600; color: var(--muted); white-space: nowrap; }
.bot-table thead th { text-align: right; font-weight: 700; color: var(--ink); }
.bot-table td.best { color: var(--positive); font-weight: 700; }
.bot .typing { display: inline-flex; gap: 3px; } .bot .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bt 1s infinite ease-in-out; }
.bot .typing i:nth-child(2) { animation-delay: .15s; } .bot .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bt { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.bot form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); }
.bot form input { border-radius: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 3rem; padding: 2rem 0 5rem; font-size: .88rem; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1.5rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer .ft-h { font-family: var(--font); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0 0 .5rem; }
.site-footer .ft-social { margin: .4rem 0 0; }
.site-footer .ft-link { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.site-footer .ft-link:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { margin: .25rem 0; }
.site-footer .fine { margin-top: 1.5rem; font-size: .78rem; }
@media print { .site-header, .bot-fab, .bot, .tray, .subnav { display: none !important; } }

/* Recommended for me */
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.segmented { display: inline-flex; max-width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmented button { border: none; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .85rem; padding: .4rem .9rem; border-radius: 999px; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
@media (max-width: 400px) { .segmented button { padding: .4rem .6rem; font-size: .8rem; } }
.rec-why { margin: 0 0 .8rem; }
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 900px) { .rec-grid { grid-template-columns: 1fr; } }
.pick { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .8rem; }
.pick.sponsored { border-color: var(--gold-line); background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface)); }
.pick-top { display: flex; align-items: flex-start; gap: .6rem; }
.pick-top .rank { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: .8rem; display: grid; place-items: center; margin-top: .1rem; }
.pick-title { flex: 1; min-width: 0; }
.pick-title h3 { font-size: 1rem; margin: 0; }
.pick-title h3 a { color: var(--ink); }
.pick-top .pill { flex: none; }
.pick-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.pick-metrics div { background: var(--surface-2); border-radius: 8px; padding: .45rem .6rem; }
.pick.sponsored .pick-metrics div { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.pick-metrics .k { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pick-metrics b { font-variant-numeric: tabular-nums; }
.pick-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; }
.rec-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.rec-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.rec-stats .k { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rec-stats b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.rec-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Auth slot, user menu */
.auth-slot { display: flex; gap: .4rem; margin-left: .6rem; padding-left: .6rem; border-left: 1px solid var(--line); align-items: center; }
@media (max-width: 900px) { .auth-slot { border: none; padding: .5rem 0 0; margin: 0; } }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: .75rem; letter-spacing: .02em; }

/* Login */
.auth-wrap { min-height: 60vh; display: flex; align-items: center; }
.auth-card { max-width: 440px; margin: 0 auto; padding: 1.6rem; }
.auth-card .segmented { display: flex; } .auth-card .segmented button { flex: 1; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; margin: 1rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Account area */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .account-layout { grid-template-columns: 1fr; } }
.account-nav { padding: 1rem; position: sticky; top: calc(var(--top-offset, 60px) + 16px); }
.account-user { display: flex; gap: .6rem; align-items: center; padding-bottom: .8rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }
.account-user .avatar { width: 36px; height: 36px; font-size: .85rem; }
.account-user .avatar { flex: none; align-self: flex-start; }
.au-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.au-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-line { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-line[hidden] { display: none; }
.account-user:has(+ .au-badge) { border-bottom: none; padding-bottom: .55rem; margin-bottom: 0; }
.au-badge { padding-bottom: .8rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }
.provider-badge { display: inline-flex; align-items: center; white-space: nowrap; font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.provider-badge.ok { background: var(--positive-soft); color: var(--positive); }
.provider-badge.wait { background: var(--accent-soft); color: var(--accent); }
.account-nav nav { display: flex; flex-direction: column; gap: .1rem; }
.account-nav nav a, .account-nav nav button { padding: .5rem .7rem; border-radius: 8px; font-size: .92rem; color: var(--muted); background: none; border: none; text-align: left; font: inherit; cursor: pointer; }
.account-nav nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.account-nav nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.account-nav .nav-group { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .8rem .7rem .3rem; }
.account-nav .nav-group:first-child { padding-top: .2rem; }
.account-nav nav .logout { color: var(--negative); margin-top: .4rem; border-top: 1px solid var(--line); border-radius: 0; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; }
.badge.live { background: var(--positive-soft); color: var(--positive); }
.badge.paused { background: var(--accent-soft); color: var(--accent); }
.badge.paper { background: var(--primary-soft); color: var(--primary); }
.notice { padding: .7rem 1rem; border-radius: 10px; background: var(--positive-soft); color: var(--positive); font-size: .9rem; margin-bottom: 1rem; }
.notice.info { background: var(--primary-soft); color: var(--primary); }
.notice.warn { background: var(--accent-soft); color: var(--ink); }
.notice a { text-decoration: underline; }
.add-row { display: flex; gap: .5rem; } .add-row select, .add-row input { flex: 1; }
@media (max-width: 600px) { .add-row { flex-direction: column; } }
ul.plain { list-style: none; padding: 0; margin: 0 0 .8rem; } ul.plain li { padding: .3rem 0; }
.card.danger { border-color: color-mix(in srgb, var(--negative) 35%, var(--line)); }
td.actions { white-space: nowrap; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: .6rem; font-family: var(--display); }
.site-footer .cols-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .site-footer .cols-5 { grid-template-columns: 1fr 1fr; } }

/* Vendors, visibility, private gating */
.verified { color: var(--positive); font-weight: 700; font-size: .85em; }
.pill-private { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.pill-public { background: var(--positive-soft); color: var(--positive); border-color: transparent; }
.vendor-head { display: flex; gap: .9rem; align-items: center; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
.vendor-tile { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; }
.vendor-tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.vendor-tile b { color: var(--ink); }
.algo-card .provider a { color: var(--muted); } .algo-card .provider a:hover { color: var(--primary); }
.algo-card .minor .subs b { color: var(--primary); }
.algo-card.locked { background: repeating-linear-gradient(135deg, var(--surface) 0 12px, var(--surface-2) 12px 13px); }
.lock-body { display: flex; gap: .6rem; align-items: flex-start; background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: .6rem .7rem; }
.lock-icon { font-size: 1.1rem; line-height: 1; }
.gate { display: flex; gap: 1rem; align-items: flex-start; margin: 1.5rem auto; border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.gate-icon { font-size: 2rem; line-height: 1; }
.vis-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.vis-toggle button { border: none; background: var(--surface); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; padding: .3rem .7rem; cursor: pointer; }
.vis-toggle button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.share-panel { background: var(--surface-2); border-radius: 10px; padding: .9rem 1rem; margin-top: .6rem; }
.share-panel .add-row input { background: var(--surface); }
.chip-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.chip-list span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; }
.chip-list span button { border: none; background: none; color: var(--muted); cursor: pointer; margin-left: .2rem; font-size: .9rem; }

/* Ranked bars (dashboard) */
.chart .quad { font-size: 11px; fill: var(--positive); font-weight: 600; }
.ranked { display: grid; gap: .35rem; }
.ranked-head, .ranked-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) 1fr 1fr 70px; gap: .8rem; align-items: center; }
.ranked-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 0 .2rem .3rem; border-bottom: 1px solid var(--line); }
.ranked-head .num, .ranked-row .num { text-align: right; }
.ranked-row { padding: .35rem .2rem; border-radius: 8px; }
.ranked-row:hover { background: var(--surface-2); }
.ranked-name { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .9rem; }
.ranked-name a { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranked-name .rank { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.ranked-name .pill-risk { flex: none; }
.ranked .bar { position: relative; height: 22px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.ranked .bar i { display: block; height: 100%; border-radius: 6px; opacity: .85; }
.ranked .bar i.pos { background: var(--positive); } .ranked .bar i.neg { background: var(--negative); }
.ranked .bar.dd i.neg { background: color-mix(in srgb, var(--negative) 75%, transparent); }
.ranked .bar b { position: absolute; right: .5rem; top: 0; line-height: 22px; font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.ranked .sharpe b { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ranked-head { display: none; } .ranked-row { grid-template-columns: 1fr 1fr; } .ranked-name { grid-column: 1 / -1; } .ranked .sharpe { display: none; } }

.toolbar-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .toolbar-5 { grid-template-columns: 1fr 1fr; } }
.ranked-name .small { white-space: nowrap; }

/* Box type, provider registration */
.box-tag, .tag.box-black, .tag.box-white { font-size: .7rem; }
.algo-card .minor .box-tag { color: var(--muted); }
.tag.box-black, .box-tag.box-black { color: var(--ink); }
.blackbox { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: .9rem 1rem; }
.blackbox .lock-icon { font-size: 1.2rem; line-height: 1.3; }
.boxpick { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem .8rem; }
.boxpick legend { font-size: .85rem; font-weight: 600; padding: 0 .3rem; }
.boxopt { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .5rem; border-radius: 8px; cursor: pointer; font-weight: 400; }
.boxopt:hover { background: var(--surface-2); }
.boxopt input { margin-top: .3rem; }
.boxopt > span { display: flex; flex-direction: column; gap: .1rem; }
.boxopt b { font-weight: 600; }
.cert-list { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.cert-list li { background: var(--surface-2); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; }
.toolbar.toolbar-mkt { grid-template-columns: 2fr 1.2fr repeat(5, minmax(0, 1fr)) auto; }
@media (max-width: 1240px) { .toolbar.toolbar-mkt { grid-template-columns: repeat(4, minmax(0, 1fr)); } .toolbar.toolbar-mkt .search { grid-column: span 2; } }
@media (max-width: 900px) { .toolbar.toolbar-mkt { grid-template-columns: 1fr 1fr; } }

/* Home */
.cta-row { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.cta-row .btn { padding: .75rem 1.3rem; font-size: 1rem; }
.proof { margin: 0; }
.explain { padding-top: 1rem; }
.explain h3 { font-size: 1.15rem; margin: .2rem 0 .4rem; }
.explain .grid { gap: 2rem; }
.glance-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin-bottom: .3rem; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
@media (max-width: 800px) { .two-up { grid-template-columns: 1fr; } }
.two-up h2 { font-size: 1.3rem; }

/* Spread FAQ */
.faq-spread { display: grid; grid-template-columns: minmax(220px, 1fr) 3fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .faq-spread { grid-template-columns: 1fr; gap: .5rem; } }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; align-items: start; }
.faq-col { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
@media (max-width: 700px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-grid details.faq { margin: 0; }

/* Legal pages */
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
.api-layout { grid-template-columns: 220px minmax(0, 1fr); }
@media (max-width: 860px) { .legal-layout, .api-layout { grid-template-columns: minmax(0, 1fr); } .legal-layout .toc { position: static; display: flex; flex-wrap: wrap; gap: .3rem .8rem; } }
.legal { max-width: 78ch; }
.legal .block h2 { font-size: 1.15rem; }
.legal p { color: var(--ink); line-height: 1.65; }
.legal p b { font-weight: 650; }

/* Nav visible only when signed in */
.nav-links { display: flex; gap: .2rem; align-items: center; }
.nav-links[hidden] { display: none; }
.site-nav .auth-slot { margin-left: .6rem; }
.site-nav .nav-links[hidden] + .auth-slot { border-left: none; padding-left: 0; margin-left: 0; }
@media (max-width: 900px) { .nav-links { flex-direction: column; align-items: stretch; } }

.auth-slot .nav-link { padding: .45rem .6rem; border-radius: 8px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.auth-slot .nav-link:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }

/* Grid children must be allowed to shrink below their content width (prevents horizontal page overflow from wide tables/charts) */
.detail-layout > *, .account-layout > *, .legal-layout > *, .hero-grid > *, .glance > *, .two-up > *, .faq-spread > *, .grid > * { min-width: 0; }

/* Pricing cards: equal height with the button pinned to the bottom */
.price-card { display: flex; flex-direction: column; }
.price-card ul { flex: 1; }
.price-card > .btn { margin-top: auto; }




/* Home: simple landing (short copy, visual cards) */
.cta-row { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.cta-row .btn { padding: .75rem 1.4rem; font-size: 1rem; }
.h-hero { padding: 3.5rem 0 3rem; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.h-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (max-width: 900px) { .h-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.h-hero h1 { font-size: clamp(2.4rem, 1.5rem + 3.5vw, 4rem); letter-spacing: -.04em; line-height: 1.05; margin-bottom: 1rem; }
.h-hero h1 span { color: var(--primary); }
.h-sub { font-size: 1.2rem; color: var(--muted); max-width: 520px; line-height: 1.55; }
.h-proof { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; color: var(--muted); }
.h-proof li::before { content: "✓ "; color: var(--positive); font-weight: 700; }
.h-chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem .9rem; box-shadow: var(--shadow); }
.h-chart figcaption { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .9rem; margin-bottom: .4rem; }
.h-chart figcaption span { color: var(--muted); }
.h-chart .legend { font-size: .74rem; gap: .2rem .8rem; }

.h-stats { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 1000px) { .h-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .h-stats li:last-child { grid-column: 1 / -1; } .h-stats a { padding: .75rem; gap: .6rem; } .h-stats .h-ico { width: 36px; height: 36px; border-radius: 10px; } }
.h-stats a { color: var(--ink); display: flex; align-items: center; gap: .8rem; height: 100%; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.h-stats a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.h-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.c-blue { background: var(--primary-soft); color: var(--primary); }
.c-amber { background: var(--accent-soft); color: var(--accent); }
.c-green { background: var(--positive-soft); color: var(--positive); }
.c-violet { background: color-mix(in srgb, #7C5CD6 14%, var(--surface)); color: #6A4BC4; }
.c-rose { background: var(--negative-soft); color: var(--negative); }
.h-stat { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.h-stat b { font-family: var(--display); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.h-stat > span { font-size: .82rem; color: var(--muted); margin-top: .15rem; }

.h-title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); letter-spacing: -.03em; margin-bottom: 1.4rem; }
.h-ways .h-title { text-align: center; }
.h-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.h-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1100px) { .h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .h-grid { grid-template-columns: minmax(0, 1fr); } }
.h-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.3rem 1.1rem; }
.h-tag { align-self: flex-start; font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .15rem .6rem; margin-bottom: .8rem; }
.h-card h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.h-card p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.h-link { color: var(--primary); font-weight: 600; font-size: .92rem; }
.h-card .h-link { margin-top: auto; padding-top: 1rem; }
.h-code { background: var(--ink); color: #E8EFEC; border-radius: 10px; padding: .75rem .85rem; font-family: var(--mono); font-size: .74rem; line-height: 1.6; overflow-wrap: anywhere; }
.h-code .m { color: #7CC4F0; font-weight: 600; } .h-code .ok { color: #6FD3A6; }
.h-modes { list-style: none; padding: 0; margin: 0; }
.h-modes li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.h-modes li:first-child { border-top: none; padding-top: 0; }
.h-modes li > span:last-child { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.h-modes b { font-size: .92rem; }
.h-modes li > span:last-child > span { font-size: .82rem; color: var(--muted); }
.h-mode-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.h-mode-ico svg { width: 18px; height: 18px; }
.h-mode-ico.open { background: var(--positive-soft); color: var(--positive); }
.h-mode-ico.closed { background: var(--surface-2); color: var(--ink); }
.h-mini { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.h-mini li { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.h-mini li:first-child { border-top: none; }
.h-mini a { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.h-mini span { color: var(--muted); white-space: nowrap; }
.h-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.h-chips span { font-size: .76rem; border: 1px solid var(--line); border-radius: 999px; padding: .12rem .55rem; }
.h-chips .more { background: var(--primary-soft); color: var(--primary); border-color: transparent; font-weight: 600; }

.h-flow-sec .h-title { text-align: center; }
.h-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6rem; }
.h-step { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.3rem 1.2rem; }
.h-step:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -2.6rem; width: 2.6rem; transform: translateY(-50%); text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.h-step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.h-step-no { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h-step h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.h-step p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.h-step .h-chips, .h-step .h-ticks { margin-top: auto; }
.h-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .88rem; }
.h-ticks li::before { content: "✓"; color: var(--positive); font-weight: 700; margin-right: .45rem; }
@media (max-width: 860px) {
  .h-flow { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
  .h-step:not(:last-child)::after { content: "↓"; top: auto; bottom: -2.2rem; right: 0; left: 0; width: auto; height: 2.2rem; line-height: 2.2rem; transform: none; }
}
.h-faq { max-width: 1100px; }
.h-cta { text-align: center; background: var(--primary); color: #fff; border-radius: 20px; padding: 2.6rem 1.5rem; }
.h-cta h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); margin-bottom: .4rem; }
.h-cta p { opacity: .85; margin-bottom: 1.2rem; }
.h-cta .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }


/* ---------- Create a strategy: start → build (sentence rules + live backtest) → save ---------- */
.cb { padding: .6rem 0 2.5rem; }
.cb h1 { margin: .3rem 0 .4rem; }
.cb-lead { color: var(--muted); font-size: 1.05rem; max-width: 660px; margin-bottom: 1.3rem; }
.cb-steps { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 0 0 1.4rem; }
.cb-steps button { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: none; border-radius: 9px; padding: 6px 14px 6px 8px; cursor: pointer; white-space: nowrap; }
.cb-steps button b { font-weight: inherit; }
.cb-steps button > span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font: 700 12px var(--mono); }
.cb-steps button:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.cb-steps button.active { background: var(--ink); color: var(--surface); }
.cb-steps button.active > span { background: var(--surface); color: var(--ink); }
.cb-steps button.done > span { background: var(--positive-soft); color: var(--positive); }
.cb-steps button:disabled { opacity: .45; cursor: default; }
.cb-screen[hidden] { display: none; }
.cb-resume { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 1rem; }
.cb-resume[hidden] { display: none; }
.cb-resume-act { display: flex; gap: 6px; }
.cb-inst { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); max-width: 880px; }
.cb-inst .field { margin: 0; }
.cb-inst .inst-search { border-width: 1.5px; border-color: var(--primary); }
.cb-inst .inst-search[hidden] { display: none; }
.cb-inst .inst-picked { margin-top: 0; }
.cb-inst .hint { margin-top: .5rem; }
.cb-popular { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.cb-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.cb-chip:hover { background: var(--surface-2); }
.cb-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cb-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 1.5rem 0 2.2rem; max-width: 1100px; }
.cb-way { position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; color: inherit; }
.cb-way:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.cb-way[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cb-way .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 4px; }
.cb-way b { font-family: var(--display); font-size: 1.08rem; }
.cb-way > span:last-child { color: var(--muted); font-size: 14px; line-height: 1.45; }
.cb-rec { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; color: var(--positive); background: var(--positive-soft); border-radius: 999px; padding: 2px 8px; }
.cb-gal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; scroll-margin-top: calc(var(--top-offset, 100px) + 16px); }
.cb-gal-head h2 { margin: 0 0 .2rem; }
.cb-gal-head p { margin: 0; }
.cb-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.cb-tpl { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; cursor: pointer; }
.cb-tpl[hidden] { display: none; }
.cb-tpl:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: var(--shadow); }
.cb-tpl .viz { background: var(--surface-2); border-radius: 10px; height: 92px; overflow: hidden; }
.cb-tpl .viz svg { display: block; width: 100%; height: 92px; }
.cb-tpl h3 { margin: 4px 0 0; font-size: 1.05rem; }
.cb-tpl p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.cb-tpl .tags { display: flex; gap: 5px; flex-wrap: wrap; }
.cb-tpl .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-top: 1px solid var(--line); padding-top: 9px; margin-top: auto; }
.cb-tpl .stats div { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.cb-tpl .stats b { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.cb-tpl .stats b.pos { color: var(--positive); } .cb-tpl .stats b.neg { color: var(--negative); }
.cb-tpl .use { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cb-tpl .use small { color: var(--muted); font-size: 12px; }

/* Workspace */
.cb-top { position: sticky; top: var(--top-offset, 100px); z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); padding: 8px 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.cb-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cb-title input { font: 700 1.3rem/1.2 var(--display); letter-spacing: -.02em; border: 1px solid transparent; border-radius: 8px; padding: 3px 6px; margin-left: -7px; background: transparent; color: var(--ink); width: 100%; max-width: 560px; box-shadow: none; }
.cb-title input:hover, .cb-title input:focus { border-color: var(--line); outline: none; background: var(--surface); }
.cb-title small { color: var(--muted); font-size: 12.5px; }
.cb-title small i { font-style: normal; color: var(--positive); }
.cb-title > b { font: 700 1.3rem/1.2 var(--display); }
.cb-actions { display: flex; gap: 8px; align-items: center; }
.cb-ws { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; padding-top: 14px; align-items: start; }
.cb-ws > * { min-width: 0; }
.cb-blk { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.cb-blk-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cb-blk-h h2 { font-size: 1.02rem; margin: 0; }
.cb-blk-h .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); font: 700 12.5px var(--mono); color: var(--muted); }
.cb-blk-h .sub { color: var(--muted); font-size: 13px; margin-left: auto; }
.cb .sent { position: relative; font-size: 16.5px; line-height: 2.15; padding: 3px 34px 3px 0; }
.cb .sent + .sent { border-top: 1px dashed var(--line); }
.cb .sent .conj { color: var(--muted); font-weight: 600; }
.cb .sent-x { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 7px; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; opacity: .35; }
.cb .sent:hover .sent-x, .cb .sent-x:focus-visible { opacity: 1; }
.cb .sent-x:hover { background: var(--negative-soft); color: var(--negative); }
.cb .tok { font: inherit; font-weight: 700; color: var(--primary); background: var(--primary-soft); border: none; border-bottom: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 6px 6px 3px 3px; padding: 0 7px; cursor: pointer; line-height: 1.6; white-space: nowrap; }
.cb .tok:hover, .cb .tok[aria-expanded="true"] { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.cb .tok.fixed { color: var(--ink); background: var(--surface-2); border-bottom-color: var(--line); cursor: default; }
.cb .tok[data-side="sell"] { color: var(--negative); background: var(--negative-soft); border-bottom-color: color-mix(in srgb, var(--negative) 35%, transparent); }
.cb .tok[data-side="buy"] { color: var(--positive); background: var(--positive-soft); border-bottom-color: color-mix(in srgb, var(--positive) 35%, transparent); }
.cb-note { margin: .2rem 0 0; }
.cb-adds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.cb-adds:empty { display: none; }
.cb-adds .lbl { font-size: 13px; color: var(--muted); margin-right: 2px; }
.cb-add { font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); background: none; border: 1.5px dashed color-mix(in srgb, var(--primary) 40%, var(--line)); border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.cb-add:hover { background: var(--primary-soft); }
.cb-legs { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.cb-pos { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.cb-pos:empty { display: none; }
.cb-pos svg { display: block; width: 100%; height: 130px; }
.cb-pos dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 8px 0 0; font-size: 12.5px; }
.cb-pos dt { color: var(--muted); }
.cb-pos dd { margin: 0; font-family: var(--mono); font-weight: 600; text-align: right; }
.cb-pos p { margin: 8px 0 0; font-size: 12px; }
.cb-mini-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.cb-mini-h label { display: inline-flex; align-items: center; gap: 6px; }
.cb-mini-h select { width: auto; font-size: 12.5px; padding: 2px 24px 2px 6px; min-height: 0; height: auto; border-radius: 6px; }
.cb-plain { background: linear-gradient(180deg, var(--primary-soft), var(--surface) 75%); }
.cb-plain p { margin: 0 0 6px; }
#r-plain { font-size: 15.5px; line-height: 1.6; }
.cb-res { position: sticky; top: calc(var(--top-offset, 100px) + 76px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); max-height: calc(100vh - var(--top-offset, 100px) - 92px); overflow-y: auto; }
.cb-res-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cb-res-h h2 { font-size: 1.02rem; margin: 0; }
.cb-state { margin-left: auto; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--positive-soft); color: var(--positive); white-space: nowrap; }
.cb-state.busy { background: var(--accent-soft); color: var(--accent); }
.cb-state.err { background: var(--negative-soft); color: var(--negative); }
.cb-res.busy .cb-kpis, .cb-res.busy .cb-eq, .cb-res.busy .cb-bars { opacity: .45; transition: opacity .15s; }
.cb-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.cb-kpis .kpi { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.cb-kpis .kpi span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cb-kpis .kpi b { display: block; font: 700 1.05rem var(--mono); white-space: nowrap; }
.cb-kpis .kpi i { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.cb-eq svg { display: block; width: 100%; height: 150px; }
.cb-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.cb-legend [hidden] { display: none; }
.cb-legend i { display: inline-block; width: 14px; height: 0; border-top: 2.5px solid var(--primary); vertical-align: middle; margin-right: 5px; }
.cb-legend i.prev { border-top: 2px dashed var(--muted); }
.cb-bars svg { display: block; width: 100%; height: 54px; }
.cb-checks { list-style: none; padding: 0; margin: 12px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.cb-checks li { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; }
.cb-checks li::before { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.cb-checks .ok::before { content: "✓"; background: var(--positive-soft); color: var(--positive); }
.cb-checks .warn::before { content: "!"; background: var(--accent-soft); color: var(--accent); }
.cb-checks .info::before { content: "i"; background: var(--surface-2); color: var(--muted); font-family: var(--mono); }
.cb-runs { border-top: 1px solid var(--line); padding-top: 10px; }
.cb-runs summary { cursor: pointer; font-size: 13.5px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.cb-runs summary::-webkit-details-marker { display: none; }
.cb-runs ol { list-style: none; padding: 0; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.cb-runs button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font: inherit; font-size: 12.5px; text-align: left; padding: 6px 8px; border-radius: 8px; border: none; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.cb-runs button:hover { background: color-mix(in srgb, var(--primary) 10%, var(--surface-2)); }
.cb-runs button[aria-current="true"] { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.cb-runs button b { font-family: var(--mono); }
.cb-runs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cb-runs p { margin: 0; }
.cb-res-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.cb-link { font: inherit; font-weight: 600; color: var(--primary); background: none; border: none; padding: 0; cursor: pointer; }
.cb-full { margin-top: 1.5rem; display: grid; gap: 1rem; }
.cb-full[hidden] { display: none; }
.cb-full-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cb-full-h h2 { margin: 0; }
#bt-review #bt-results, #bt-full-body #bt-results { display: grid; gap: 1rem; }
#bt-review { margin-top: 1rem; }
.cb-dock { display: none; }
body.cb-building .bot-fab, body.cb-building .bot { display: none !important; }
.cb-pop { position: absolute; z-index: 70; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; max-width: min(320px, calc(100vw - 24px)); }
.cb-pop-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 4px; }
.cb-pop-num { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px; }
.cb-pop-num input { width: 120px; flex: 1; min-width: 0; padding: 6px 8px; }
.cb-pop-num span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cb-pop-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 4px; }
.cb-pop-num + .cb-pop-list { margin-top: 2px; }
.cb-pop-h + .cb-pop-list { border-top: none; padding-top: 0; }
.cb-pop-list.scroll { max-height: 300px; overflow-y: auto; }
.cb-pop-list button { display: flex; justify-content: space-between; gap: 12px; font: inherit; font-size: 14px; text-align: left; background: none; border: none; padding: 7px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.cb-pop-list button small { color: var(--muted); font-size: 12px; }
.cb-pop-list button:hover, .cb-pop-list button:focus-visible { background: var(--surface-2); outline: none; }
.cb-pop-list button[aria-pressed="true"] { color: var(--primary); font-weight: 700; background: var(--primary-soft); }

/* Import, save, next actions */
.cb-import { max-width: 900px; }
.cb-import-steps { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .6rem; }
.cb-import-steps .btn { margin-left: .4rem; }
.cb-sv { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.cb-sv .field[hidden] { display: none; }
.cb-auto { font-size: 12px; color: var(--positive); font-weight: 600; margin-left: 6px; }
.cb-auto[hidden] { display: none; }
.cb-sv-facts h3 { margin-top: 0; }
.cb-sv-facts dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; font-size: 14px; margin: 0; }
.cb-sv-facts dt { color: var(--muted); }
.cb-sv-facts dd { margin: 0; font-weight: 700; font-family: var(--mono); text-align: right; }
#sv-done[hidden], #sv-form[hidden] { display: none; }
#sv-done { display: grid; gap: 1rem; }
.cb-saved { display: flex; gap: 12px; align-items: center; }
.cb-tick { width: 42px; height: 42px; border-radius: 50%; background: var(--positive-soft); color: var(--positive); display: grid; place-items: center; font-size: 22px; font-weight: 800; flex: none; }
.cb-next-h { margin: .4rem 0 0; font-size: 1.2rem; }
.cb-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cb-kick { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
#deploy-live .cb-kick { color: var(--positive); }
#deploy-publish .cb-kick { color: var(--accent); }
.cb .publish-box > summary { cursor: pointer; }

@media (max-width: 1100px) {
  .cb-ws { grid-template-columns: minmax(0, 1fr); }
  .cb-res { position: static; max-height: none; scroll-margin-top: calc(var(--top-offset, 100px) + 70px); }
  body.cb-building .cb-dock { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; align-items: center; gap: 10px; background: var(--ink); color: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px; }
  .cb-dock b { font-family: var(--mono); }
  .cb-dock a { margin-left: auto; color: var(--surface); font-weight: 700; white-space: nowrap; }
  body.cb-building .cb { padding-bottom: 80px; }
}
@media (max-width: 860px) {
  .cb-ways, .cb-next { grid-template-columns: minmax(0, 1fr); }
  .cb-legs, .cb-sv { grid-template-columns: minmax(0, 1fr); }
  .cb-top { position: static; }
  .cb-actions .ghost { display: none; }
}
@media (max-width: 560px) {
  .cb-pop { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: 8px; max-width: none; max-height: 70vh; overflow-y: auto; z-index: 80; box-shadow: 0 -8px 30px rgba(18,33,30,.25); }
  .cb-pop-list.scroll { max-height: none; }
  .cb-pop-list button { padding: 11px 12px; }
}
@media (max-width: 520px) {
  .cb .sent { font-size: 15.5px; line-height: 2.2; }
  .cb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-gallery { grid-template-columns: minmax(0, 1fr); }
  .cb-steps button { padding: 6px 10px 6px 6px; }
}

/* Cookie banner and toast: same styles as fintrens.com (its --accent is Lantern's --primary) */
.consent { position: fixed; left: 20px; bottom: 20px; width: min(520px, calc(100% - 40px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.22); padding: 16px 18px; font-size: 14px; line-height: 1.5; z-index: 200; display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.consent p { flex: 1 1 100%; margin: 0; color: var(--ink); }
.consent p a, .consent p button { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent .btn { padding: 9px 16px; font-size: 14px; font-weight: 700; border-radius: 9px; flex: none; background: var(--primary); color: #fff; border: none; margin-left: auto; }
.consent .btn.ghost { background: 0 0; color: var(--ink); border: 1.5px solid var(--line); margin-left: 0; }
.consent[hidden] { display: none; }
@media (max-width: 640px) { .consent { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 14px 16px; } .consent .btn { flex: 1 1 45%; margin: 0; } }
body:has(.consent:not([hidden])) .bot-fab { display: none; }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* How it works, strategy types, providers */
.cb-h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); margin: .3rem 0 .4rem; }
.h-sm { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.hw-steps { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hw-steps li { position: relative; padding-top: 1.1rem; }
.hw-steps h3 { margin: .5rem 0 .3rem; font-size: 1.05rem; }
.hw-steps p { margin: 0; font-size: .92rem; }
.hw-steps p a { color: var(--primary); }
.hw-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font: 700 .9rem var(--mono); }
@media (max-width: 900px) { .hw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hw-steps { grid-template-columns: minmax(0, 1fr); } }
.st-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .6rem; }
.st-jump .tag b { margin-left: .2rem; }
.st-type { scroll-margin-top: calc(var(--top-offset, 100px) + 12px); }
.st-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-bottom: 1rem; }
.st-head h2 { margin: 0 0 .3rem; }
.st-head p { margin: 0; color: var(--muted); }
.st-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0; }
.st-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; }
.st-facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.st-facts dd { margin: .15rem 0 0; font-weight: 600; font-size: .9rem; }
@media (max-width: 760px) { .st-head { grid-template-columns: minmax(0, 1fr); } }
a.tag:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary); }

/* Markets: India, US stocks, crypto */
.tag-market { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); font-weight: 600; }
.algo-card .tags .tag-market { flex: none; max-width: none; }
.fx { color: var(--muted); font-weight: 400; font-size: .8em; white-space: nowrap; }
.dp-market { margin: .7rem 0 0; padding: .6rem .7rem; border-radius: 8px; background: var(--bg-soft); color: var(--muted); line-height: 1.45; }
.dp-market b { color: var(--ink); }
.h-markets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.h-markets > * { min-width: 0; }
.h-market { display: flex; flex-direction: column; gap: .5rem; color: inherit; text-decoration: none; padding: 1.2rem; transition: border-color .15s, box-shadow .15s; }
.h-market:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(18, 33, 30, .07); text-decoration: none; }
a.card:hover { text-decoration: none; }   /* a whole card that is a link never underlines its text */
.h-market:hover .h-link { text-decoration: underline; }
.h-market h3 { margin: 0; font-size: 1.1rem; }
.h-market p { margin: 0; color: var(--muted); font-size: .92rem; }
.h-market dl { margin: .2rem 0 0; display: grid; gap: .35rem; }
.h-market dt { font-size: .74rem; color: var(--muted); }
.h-market dd { margin: 0; font-weight: 600; font-size: .9rem; }
.h-market .h-link { margin-top: auto; padding-top: .4rem; }
.h-markets-sec .h-title { text-align: center; }
.broker-rows { display: grid; gap: .2rem; margin: .4rem 0 .6rem; }
.broker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.broker-row .field { margin: 0; }
.broker-row .badge { justify-self: end; }
