/* OpenWick full pages (home, screener, heatmap, news). Uses the colour variables from app.css. */
/* Full pages (home, screener, heatmap) scroll normally; only the chart app locks the window. */
html.page, html.page body { height: auto; min-height: 100%; overflow-y: auto; overflow-x: hidden; }
html.page body { background: var(--bg); }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 28px 40px; }
.home main { max-width: 1240px; margin: 0 auto; padding: 0 28px 40px; }

/* top navigation */
.h-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.h-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.h-links { display: flex; gap: 4px; }
.h-links a { position: relative; color: color-mix(in srgb, var(--text) 72%, transparent); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; border: 1px solid transparent; }
/* Hover: a pebble, almost clear, with a faint edge; it just appears, no sliding. */
.h-links a:hover, .h-icon:hover { color: var(--text); background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .09); }
[data-theme="light"] .h-links a:hover, [data-theme="light"] .h-icon:hover { background: rgba(0, 0, 0, .03); border-color: rgba(0, 0, 0, .07); }
.h-links a.active { color: var(--text); }
/* The current page: a short bar under the word. */
.h-links a.active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transform: translateX(-50%); }
.h-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.h-icon.active { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
[data-theme="light"] .h-icon.active { background: rgba(0, 0, 0, .04); border-color: rgba(0, 0, 0, .09); }
.h-icon svg, .h-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* main button: white on the dark theme, black on the light one */
.h-btn { background: #f5f5f5; color: #0a0a0a; text-decoration: none; font-weight: 600; padding: 9px 18px; border-radius: 999px; }
.h-btn:hover { background: #ffffff; filter: none; }
[data-theme="light"] .h-btn { background: #111111; color: #ffffff; }
[data-theme="light"] .h-btn:hover { background: #000000; }

/* search boxes */
.h-search { position: relative; display: flex; align-items: center; gap: 8px; width: 260px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.h-search:focus-within { outline: 2px solid var(--accent); }
.h-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.h-search.big { width: min(640px, 100%); height: 56px; padding: 0 20px; margin: 30px auto 0; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); }
.h-search.big input { font-size: 16px; }
.h-search.big svg { width: 22px; height: 22px; }
.h-results { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; max-height: 420px; overflow: auto; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); text-align: left; }
.h-results.open { display: block; }
.h-results a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.h-results a:hover, .h-results a.sel { background: var(--hover); }
.h-results b { font-weight: 600; }
.h-results .n { grid-column: 1; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-results .t { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* hero */
.hero { position: relative; text-align: center; padding: 84px 0 56px; }
.hero-glow { position: absolute; inset: 10px 10% auto; height: 320px; z-index: -1; background: radial-gradient(closest-side, var(--accent-soft), transparent); filter: blur(10px); }
.hero h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.02; letter-spacing: -0.035em; margin: 0; font-weight: 800; color: var(--text); }
.hero h1 span { background: linear-gradient(90deg, var(--accent), #2fb8a0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 620px; margin: 22px auto 0; font-size: 18px; line-height: 1.5; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 13px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }

/* blocks */
.block { margin-top: 44px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.block-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; color: var(--text); }
.block-head a { color: var(--accent); text-decoration: none; font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: block; padding: 14px 14px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: transform 0.12s, border-color 0.12s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile .nm { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .px { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile .ch { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile svg { display: block; width: 100%; height: 44px; margin-top: 8px; }
.cols { display: grid; gap: 16px; }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols.three, .cols.two { grid-template-columns: 1fr; } .h-links { display: none; } }
.panel { padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); min-width: 0; }
.panel h3 { margin: 0 0 10px; font-size: 16px; color: var(--text); }
.panel h3 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.list a { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 8px; color: var(--text); text-decoration: none; }
.list a:hover { background: var(--hover); }
.list .s { min-width: 0; }
.list .s b { display: block; font-size: 13.5px; }
.list .s span { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .p, .list .c { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.list .c { font-weight: 600; }
.bars a { display: grid; grid-template-columns: 120px minmax(0, 1fr) 58px; gap: 10px; align-items: center; padding: 5px 4px; color: var(--text); text-decoration: none; font-size: 12.5px; border-radius: 6px; }
.bars a:hover { background: var(--hover); }
.bars .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { position: relative; height: 8px; }
.bars .track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border); }
.bars .fill { position: absolute; top: 0; height: 8px; border-radius: 4px; }
.bars .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.news a { display: block; padding: 10px 6px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.news a:last-child { border-bottom: 0; }
.news a:hover b { color: var(--accent); }
.news b { font-weight: 500; font-size: 14px; line-height: 1.4; }
.news span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.cal .ev { display: grid; grid-template-columns: 92px 44px minmax(0, 1fr); gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); font-size: 13px; }
.cal .ev:last-child { border-bottom: 0; }
.cal .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.cal .cc { font-weight: 700; }
.empty { color: var(--muted); padding: 10px 4px; font-size: 13px; }
.skeleton { height: 120px; border-radius: 10px; background: linear-gradient(90deg, var(--panel-2), var(--hover), var(--panel-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.h-foot { border-top: 1px solid var(--border); padding: 22px 28px 26px; color: var(--muted); font-size: 13px; }
.hf-row, .hf-legal { max-width: 1200px; margin: 0 auto; }
.hf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.hf-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.hf-brand img { border-radius: 4px; }
.hf-meta { flex: 1; min-width: 0; }
.hf-sep { margin: 0 8px; opacity: .5; }
.hf-link { color: var(--text); text-decoration: none; font-weight: 500; }
.hf-link:hover { text-decoration: underline; }
.hf-legal { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.6; opacity: .85; }

/* ---------- shared page parts (screener, heatmap, news) ---------- */
.wrap.wide { max-width: none; }
.pg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; padding: 26px 0 16px; }
.pg-head h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; color: var(--text); }
.pg-head .spacer { flex: 1; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.active { color: var(--accent-fg); background: var(--accent); }
.seg a { color: var(--muted); padding: 7px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.seg a:hover { color: var(--text); background: var(--hover); }
.seg a.active { color: var(--accent-fg); background: var(--accent); }
.pg-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: -4px 0 16px; }
.pg-tools .spacer { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 13px; }
.pill:focus-within { border-color: var(--accent); }
.pill input, .pill select { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; width: 64px; }
.pill select { width: auto; max-width: 220px; cursor: pointer; }
.pill.search input { width: 200px; }
#forSym { width: 290px; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.pill.btnlike { cursor: pointer; color: var(--text); }
.pill.btnlike:hover { border-color: var(--accent); color: var(--accent); }
.scan { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.scan summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--text); }
.scan-body { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 0 14px 14px; }
.scan-body .rules { margin: 0; }
.scan-body .hint-text { flex-basis: 100%; }
.sc-meta { display: flex; gap: 14px; align-items: baseline; padding: 6px 2px 10px; font-size: 12.5px; color: var(--text); }
.sc-wrap { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: clip; }
table.sc { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.sc th { position: sticky; top: 64px; z-index: 2; background: var(--panel); text-align: right; font-weight: 600; font-size: 12px; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; white-space: nowrap; }
table.sc th:hover, table.sc th.sorted { color: var(--text); }
table.sc td { text-align: right; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; white-space: nowrap; color: var(--text); }
table.sc .l { text-align: left; }
table.sc tbody tr { cursor: pointer; }
table.sc tbody tr:hover td { background: var(--hover); }
table.sc tbody tr:last-child td { border-bottom: 0; }
table.sc td.muted { color: var(--muted); }
table.sc td.up { color: var(--up); }
table.sc td.down { color: var(--down); }
table.sc .sym { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
table.sc .sym .badge { width: 26px; height: 26px; font-size: 10px; }
table.sc .sym > span:not(.badge) { display: flex; flex-direction: column; min-width: 0; }
table.sc .sym small { color: var(--muted); font-size: 12px; max-width: clamp(120px, 17vw, 300px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Fitting tables to the page instead of running off its edge: long names end in "…" (full name on
   hover), long sectors wrap onto a second line, column headers may wrap, padding tightens on
   smaller screens, and the least important columns (opt1, then opt2) step aside on narrow ones. */
table.sc th { line-height: 1.25; }
table.sc td.wrap { white-space: normal; min-width: 96px; max-width: clamp(110px, 13vw, 220px); line-height: 1.3; }
@media (max-width: 1360px) { table.sc th, table.sc td { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 1180px) { table.sc .opt1 { display: none; } }
@media (max-width: 980px) { table.sc .opt2 { display: none; } }
@media (max-width: 800px) { .sc-wrap { overflow-x: auto; } }
table.sc .skeleton { height: 300px; }

/* heatmap */
.hm-box { position: relative; height: calc(100vh - 230px); min-height: 480px; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--border); }
.hm-box canvas { display: block; width: 100%; height: 100%; }
.hm-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.hm-msg:empty { display: none; }
.legend-scale { display: flex; border-radius: 8px; overflow: hidden; font-size: 11px; font-weight: 600; color: #fff; }
.legend-scale span { padding: 5px 8px; min-width: 42px; text-align: center; }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .news-grid { grid-template-columns: 1fr; } }
.story { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color 0.12s; }
.story:hover { border-color: var(--accent); }
.story:hover b { color: var(--accent); }
.story .src { color: var(--muted); font-size: 12px; font-weight: 500; }
.story b { font-size: 15.5px; line-height: 1.4; font-weight: 600; }
.story p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story.lead { grid-column: span 2; grid-row: span 2; justify-content: flex-end; padding: 26px; background: linear-gradient(160deg, var(--accent-soft), var(--panel) 70%); }
.story.lead b { font-size: 26px; letter-spacing: -0.01em; }
.story.lead p { -webkit-line-clamp: 5; font-size: 14.5px; }
@media (max-width: 1000px) { .story.lead { grid-column: auto; grid-row: auto; } }
.news-grid .skeleton { height: 160px; }

/* ---------- screener ---------- */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.presets .muted { margin-right: 4px; }
.chip { border: 1px solid var(--border); background: transparent; color: var(--text); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pill.fp { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.pill.fp b { font-weight: 600; margin-right: 2px; }
.pill.fp input { width: 58px; text-align: center; }
.pill .fx { border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 0 0 4px; line-height: 1; }
.pill .fx:hover { color: var(--down); }
.pill.add { color: var(--accent); border-style: dashed; }
.add-menu { position: fixed; z-index: 50; width: 260px; max-height: 420px; overflow: auto; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.add-menu input { width: 100%; box-sizing: border-box; margin-bottom: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); outline: 0; }
.add-menu input:focus { border-color: var(--accent); }
.add-menu .grp { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.add-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.add-menu button:hover { background: var(--hover); }
.add-menu button.hidden { display: none; }
.views-bar { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; border-bottom: 1px solid var(--border); }
.views { display: flex; flex-wrap: wrap; gap: 2px; }
.views button { border: 0; background: transparent; color: var(--muted); padding: 10px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.views button:hover { color: var(--text); }
.views button.active { color: var(--text); border-bottom-color: var(--accent); }
.views-bar .spacer { flex: 1; }
.sc-count { font-size: 12.5px; color: var(--muted); }
.views-bar .pill { height: 30px; margin-bottom: 6px; }
.screener .sc-wrap { margin-top: 10px; overflow-x: auto; }
.screener table.sc th { top: 0; }
.screener .sc-wrap { max-height: calc(100vh - 120px); overflow: auto; }

/* ---------- home: market breadth ---------- */
.block-head h2 small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 8px; }
.breadth .b-top { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)); gap: 18px; align-items: end; margin-bottom: 18px; }
@media (max-width: 1000px) { .breadth .b-top { grid-template-columns: 1fr 1fr; } .breadth .b-ad { grid-column: 1 / -1; } }
.breadth .lbl { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.breadth .lbl b { color: var(--text); font-size: 14px; }
.breadth .sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.breadth .val { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.breadth .val.up, .breadth .up { color: var(--up); }
.breadth .val.down, .breadth .down { color: var(--down); }
.breadth .muted { color: var(--muted); }
.b-ad-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.b-ad-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--border); }
.b-ad-bar .u { background: var(--up); } .b-ad-bar .d { background: var(--down); } .b-ad-bar .f { background: var(--muted); opacity: .5; }
.b-meter .bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 6px; }
.b-meter .bar span { display: block; height: 100%; background: var(--accent); }
.breadth h3 { margin-top: 4px; }
.b-sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 2px 22px; }
.b-sectors a { display: grid; grid-template-columns: minmax(0, 1fr) 90px 44px 58px; gap: 10px; align-items: center; padding: 5px 4px; color: var(--text); text-decoration: none; font-size: 12.5px; border-radius: 6px; }
.b-sectors a:hover { background: var(--hover); }
.b-sectors .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-sectors .bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--down) 55%, transparent); overflow: hidden; }
.b-sectors .bar .u { display: block; height: 100%; background: var(--up); }
.b-sectors .cnt { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.b-sectors .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- home: your watchlist as a compact list ---------- */
.hw-list { padding: 8px 10px; }
.hw-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); column-gap: 18px; }
.hw-rows.open { max-height: 560px; overflow-y: auto; }
.hw-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 78px; align-items: center; gap: 12px; padding: 9px 8px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; border-radius: 8px; }
.hw-row:hover { background: var(--hover); border-bottom-color: transparent; }
.hw-name { min-width: 0; }
.hw-name b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-name small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-px { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.hw-ch { justify-self: end; min-width: 70px; padding: 3px 0; border-radius: 6px; text-align: center; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--hover); }
.hw-ch.up { color: #fff; background: var(--up); }
.hw-ch.down { color: #fff; background: var(--down); }
.hw-more { display: flex; justify-content: center; }
.hw-more:empty { display: none; }
.hw-toggle { margin: 8px 0 2px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.hw-toggle:hover { background: var(--hover); }
.hw-empty { grid-column: 1 / -1; padding: 22px; color: var(--muted); text-align: center; }

/* ---------- "See all" links, movers and breadth pages ---------- */
.block-head .links { display: flex; gap: 20px; }
.panel h3 a.more { float: right; font-size: 12.5px; font-weight: 500; color: var(--accent); text-decoration: none; }
.panel h3 a.more:hover, .block-head .links a:hover, .pg-head .sc-count a:hover, .pg-tools .sc-count a:hover { text-decoration: underline; }
.pg-head .sc-count a, .pg-tools .sc-count a { color: var(--accent); text-decoration: none; }
.pg-head .sc-count b, .pg-tools .sc-count b { font-weight: 600; }
.sc-count b.up { color: var(--up); } .sc-count b.down { color: var(--down); }
table.sc td.mv-bar { width: 22%; min-width: 140px; }
.mv-bar .track { display: block; position: relative; height: 8px; }
table.sc th.mv-barh { text-align: center; }
.mv-bar .track::before { content: ""; position: absolute; left: 50%; top: -5px; bottom: -5px; width: 1px; transform: translateX(-.5px); background: color-mix(in srgb, var(--muted) 55%, transparent); }
.mv-bar .fill { position: absolute; top: 0; height: 8px; border-radius: 4px; }
.mv-bar .fill.up { background: var(--up); } .mv-bar .fill.down { background: var(--down); }
a.mv-up { color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
.bd-all { margin: 30px 0 14px; align-items: center; }
.bd-ad { display: flex; align-items: center; gap: 8px; min-width: clamp(150px, 16vw, 210px); font-variant-numeric: tabular-nums; }
.bd-ad .b-ad-bar { flex: 1; height: 8px; }
.bd-ad .up { color: var(--up); min-width: 26px; text-align: right; } .bd-ad .down { color: var(--down); min-width: 26px; }
.bd-meter { display: inline-block; width: 56px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 3px; background: var(--border); overflow: hidden; }
.bd-meter span { display: block; height: 100%; background: var(--accent); }
table.sc tbody tr.bd-sel td { background: var(--hover); }
table.sc tbody tr.bd-sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.bd-miss { margin-top: 12px; }

/* ---------- stock and index pages ---------- */
.sp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; padding: 26px 0 10px; }
.sp-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sp-id .badge { width: 48px; height: 48px; font-size: 17px; border-radius: 12px; flex: none; }
.sp-id h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; color: var(--text); }
.sp-id .muted { color: var(--muted); font-size: 13px; margin-top: 3px; }
.sp-px { display: flex; align-items: baseline; gap: 10px; margin-left: auto; }
.sp-px .px { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.sp-px .ch { font-size: 17px; font-weight: 600; }
.sp-px .ch.up, .sp-perf .up b, .sp-rchg.up { color: var(--up); }
.sp-px .ch.down, .sp-perf .down b, .sp-rchg.down { color: var(--down); }
.sp-px .muted { color: var(--muted); font-size: 13px; }
.sp-tabs { position: sticky; top: 64px; z-index: 5; display: flex; gap: 4px; padding: 8px 0; margin-bottom: 8px; background: var(--bg); border-bottom: 1px solid var(--border); }
.sp-tabs a { padding: 7px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; font-size: 14px; }
.sp-tabs a:hover { color: var(--text); background: var(--hover); }
.sp-sec { padding-top: 18px; scroll-margin-top: 120px; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
@media (max-width: 1000px) { .sp-grid { grid-template-columns: 1fr; } }
.sp-chart-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sp-chart-bar .spacer { flex: 1; }
.sp-rchg { align-self: center; padding: 0 10px; font-weight: 600; font-size: 13px; }
.sp-open { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.sp-perf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.sp-perf div { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); text-align: center; }
.sp-perf span { display: block; color: var(--muted); font-size: 11.5px; }
.sp-perf b { font-variant-numeric: tabular-nums; color: var(--text); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.kv > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.kv > div.wide { grid-column: 1 / -1; border-bottom: 0; }
.kv .muted { color: var(--muted); font-size: 12px; }
.kv b { font-variant-numeric: tabular-nums; color: var(--text); font-size: 14.5px; }
.sp-range { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 500; }
.sp-range .track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--down), var(--muted), var(--up)); opacity: .85; }
.sp-range .track i { position: absolute; top: -4px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.sp-breadth { margin-bottom: 14px; }
.sp-w { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.sp-w .bar { width: 70px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.sp-w .bar i { display: block; height: 100%; background: var(--accent); }
.sym-page .chips { justify-content: flex-start; margin-top: 0; }
.sym-page .chips small { color: var(--muted); margin-left: 4px; }
.sym-page table.sc th { top: 118px; }
.sym-page .sc-wrap { border: 0; }

/* ---------- "Add to watchlist" stars and menu ---------- */
.wstar { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.wstar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.wstar:hover { color: #e5a43a; background: var(--hover); }
.wstar.on { color: #e5a43a; }
.wstar.on svg { fill: currentColor; }
.wstar.labelled { width: auto; height: 38px; gap: 6px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font: inherit; font-weight: 600; font-size: 14px; }
.wstar.labelled.on { color: #e5a43a; border-color: color-mix(in srgb, #e5a43a 50%, transparent); }
table.sc .sym-cell { display: flex; align-items: center; gap: 4px; }
table.sc .sym-cell .wstar { opacity: .35; }
table.sc tr:hover .sym-cell .wstar, table.sc .sym-cell .wstar.on { opacity: 1; }
.pf-empty[hidden], [hidden] { display: none !important; }
.wpop { position: fixed; z-index: 200; min-width: 220px; max-height: 60vh; overflow: auto; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); }
.wpop-h { padding: 6px 10px 8px; color: var(--muted); font-size: 12px; }
.wpop button { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.wpop button:hover { background: var(--hover); }
.wpop .tick { color: #e5a43a; font-weight: 700; }
.wpop .n { color: var(--muted); font-size: 12px; }
.sc-meta .spacer { flex: 1; }
.sc-meta a { color: var(--accent); }

/* ---------- portfolio page ---------- */
.pf .muted { color: var(--muted); }
.pf code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; font-size: 12.5px; }
.pf-btns { display: flex; gap: 8px; }
.pill.btnlike.danger { color: var(--down); }
.pill.btnlike.danger:hover { border-color: var(--down); color: var(--down); }
.linklike { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.pf-msg { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 13.5px; }
.pf-msg.ok { border-color: color-mix(in srgb, var(--up) 55%, transparent); }
.pf-msg.bad { border-color: color-mix(in srgb, var(--down) 60%, transparent); background: color-mix(in srgb, var(--down) 8%, var(--panel)); }
.pf-empty { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 26px 28px; }
@media (max-width: 900px) { .pf-empty { grid-template-columns: 1fr; } }
.pf-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 240px; border: 2px dashed var(--border); border-radius: 14px; color: var(--muted); text-align: center; padding: 20px; transition: border-color .15s, background .15s; }
.pf-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.pf-drop svg { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pf-drop b { color: var(--text); font-size: 16px; }
.pf-how h3 { margin-top: 0; }
.pf-how ol { padding-left: 20px; line-height: 1.65; color: var(--text); }
.pf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pf-card { padding: 14px 16px; }
.pf-card .lbl { color: var(--muted); font-size: 12px; }
.pf-card .val { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 4px; }
.pf-card .val.up { color: var(--up); } .pf-card .val.down { color: var(--down); }
.pf-card .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: 1fr; } }
.pf-table-head { display: flex; align-items: center; margin-bottom: 10px; }
.pf-table-head h3 { margin: 0; }
.pf-table-head .spacer, .pf-dlg-btns .spacer { flex: 1; }
.pf table.sc th { position: static; }
.pf table.sc td small { display: block; color: inherit; opacity: .8; font-size: 11.5px; }
.pf table.sc tbody tr { cursor: default; }
.pf-sector { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.pf-acts { white-space: nowrap; }
.pf-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; vertical-align: middle; }
.pf-icon:hover { background: var(--hover); color: var(--text); }
.pf-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pf-side h3 { margin-top: 0; }
.pf-side h3 small { font-weight: 400; font-size: 12px; margin-left: 6px; }
.pf-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pf-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pf-legend .me, .pf-sec .bar.me { background: var(--accent); }
.pf-legend .nf, .pf-sec .bar.nf { background: var(--muted); opacity: .55; }
.pf-sec { padding: 6px 0; }
.pf-sec .nm { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text); margin-bottom: 4px; }
.pf-sec .nm span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sec .nm small { color: var(--muted); }
.pf-sec .over { color: #e5a43a; } .pf-sec .under { color: var(--muted); }
.pf-sec .bar { height: 6px; border-radius: 3px; margin-top: 2px; min-width: 2px; }
.pf-tag { font-style: normal; font-weight: 700; color: var(--accent); margin-right: 4px; }
.pf-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); }
.pf-modal.hidden { display: none; }
.pf-dialog { width: min(420px, 92vw); padding: 22px 24px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.pf-dialog h3 { margin: 0 0 14px; }
.pf-form { display: flex; flex-direction: column; gap: 12px; }
.pf-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.pf-form input { height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.pf-form input:focus { outline: none; border-color: var(--accent); }
.pf-dlg-btns { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
button.h-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* ---------- screener alerts ---------- */
#screenAlert svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; margin-right: 6px; vertical-align: -2px; }
.sa-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12.5px; }
.sa-strip[hidden] { display: none; }
.sa-item { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--text); }
.sa-item.off { opacity: .6; }
.sa-item small { color: var(--muted); }
.sa-item button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; font: inherit; font-size: 12px; }
.sa-item button:hover { background: var(--hover); color: var(--text); }
.sa-item button[data-del]:hover { color: var(--down); }
.sa-desc { font-size: 13px; line-height: 1.55; margin: 0; }

/* home: the photo behind the hero (and the top bar), fading into the page. Dark theme: the forest at
   dusk under a black fade, white text. Light theme: the same forest as a pale misty photo under a
   white fade, dark text. Only the current theme's photo is downloaded (CSS background), at 3840px on
   high-density screens and 1920px otherwise. */
.home .cosmos { position: absolute; top: 0; left: 0; right: 0; height: min(92vh, 980px); min-height: 640px; z-index: 0; overflow: hidden; pointer-events: none;
  background: #0b0b0b center 50% / cover no-repeat;
  background-image: image-set(url("/img/hero-1920.jpg") 1x, url("/img/hero-3840.jpg") 2x); }
[data-theme="light"] .home .cosmos { background-color: #e9ecef;
  background-image: image-set(url("/img/hero-light-1920.jpg") 1x, url("/img/hero-light-3840.jpg") 2x); }
.home .cosmos::after { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 62% 50% at 50% 46%, rgba(0, 0, 0, 0.7), transparent 78%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.88) 0, rgba(0, 0, 0, 0.6) 12%, rgba(0, 0, 0, 0.38) 32%, rgba(0, 0, 0, 0.4) 60%, var(--bg) 100%); }
[data-theme="light"] .home .cosmos::after {
  background:
    radial-gradient(ellipse 62% 50% at 50% 46%, rgba(255, 255, 255, 0.72), transparent 78%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.55) 12%, rgba(255, 255, 255, 0.3) 32%, rgba(255, 255, 255, 0.35) 60%, var(--bg) 100%); }
.home main { position: relative; z-index: 1; }

/* Over the photo the top bar has no background or border of its own; it only gets one once the
   page scrolls past the photo (home.js adds .scrolled), fading in. */
.home .h-nav { background: transparent; border-bottom-color: transparent; backdrop-filter: none; transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease; }
.home .h-nav.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--border); backdrop-filter: blur(10px); }
.home .h-nav:not(.scrolled) .h-brand, .home .h-nav:not(.scrolled) .h-links a { font-weight: 600; }
.home .h-nav:not(.scrolled) .h-search { backdrop-filter: blur(8px); }
/* dark theme over the photo */
[data-theme="dark"] .home .h-nav:not(.scrolled) .h-brand, [data-theme="dark"] .home .h-nav:not(.scrolled) .h-links a { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .home .h-nav:not(.scrolled) .h-icon { color: #fff; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.9)); }
[data-theme="dark"] .home .h-nav:not(.scrolled) .h-search { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
[data-theme="dark"] .home .h-nav:not(.scrolled) .h-search, [data-theme="dark"] .home .h-nav:not(.scrolled) .h-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
/* light theme over the photo */
[data-theme="light"] .home .h-nav:not(.scrolled) .h-brand, [data-theme="light"] .home .h-nav:not(.scrolled) .h-links a { color: #111; text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9); }
[data-theme="light"] .home .h-nav:not(.scrolled) .h-icon { color: #111; }
[data-theme="light"] .home .h-nav:not(.scrolled) .h-search { background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
[data-theme="light"] .home .h-nav:not(.scrolled) .h-search, [data-theme="light"] .home .h-nav:not(.scrolled) .h-search input::placeholder { color: rgba(0, 0, 0, 0.55); }
[data-theme="light"] .home .h-nav:not(.scrolled) .h-search input { color: #111; }

/* hero text */
.home .hero { min-height: calc(min(92vh, 980px) - 64px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 72px; box-sizing: border-box; }
.home .hero h1 span { background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.home .hero .chips a { backdrop-filter: blur(6px); }
[data-theme="dark"] .home .hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .home .hero h1 span { color: rgba(255, 255, 255, 0.68); }
[data-theme="dark"] .home .hero p { color: rgba(255, 255, 255, 0.92); font-weight: 500; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .home .hero .chips a { color: #fff; border-color: rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.45); }
[data-theme="dark"] .home .hero .chips a:hover { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
[data-theme="light"] .home .hero h1 { color: #0f0f0f; text-shadow: 0 2px 30px rgba(255, 255, 255, 0.8); }
[data-theme="light"] .home .hero h1 span { color: rgba(0, 0, 0, 0.5); }
[data-theme="light"] .home .hero p { color: rgba(0, 0, 0, 0.78); font-weight: 500; text-shadow: 0 1px 14px rgba(255, 255, 255, 0.9); }
[data-theme="light"] .home .hero .chips a { color: #111; border-color: rgba(0, 0, 0, 0.18); background: rgba(255, 255, 255, 0.6); }
[data-theme="light"] .home .hero .chips a:hover { border-color: rgba(0, 0, 0, 0.5); color: #000; }
[data-theme="light"] .home .hero .h-search.big { background: rgba(255, 255, 255, 0.85); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12); }

/* photo credit */
.cosmos-credit { position: absolute; right: 0; bottom: 14px; font-size: 11px; text-decoration: none; }
[data-theme="dark"] .cosmos-credit { color: rgba(255, 255, 255, 0.55); }
[data-theme="dark"] .cosmos-credit:hover { color: #fff; }
[data-theme="light"] .cosmos-credit { color: rgba(0, 0, 0, 0.5); }
[data-theme="light"] .cosmos-credit:hover { color: #000; }
.h-brand img { display: block; border-radius: 8px; }

/* selection style without colour: grey fill, thin white outline */
.h-links a.active { color: var(--text); }
.h-search:focus-within { outline: 1px solid var(--sel-border); }
.seg button.active, .seg a.active, .chip.active { color: var(--text); background: var(--accent-soft); border-color: var(--sel-border); box-shadow: inset 0 0 0 1px var(--sel-border); }

/* Stock page: Technicals and Seasonals sections */
#technicals .tech.bare { padding: 14px 18px 18px; max-width: none; }
#technicals .tech.bare .tech-head { justify-content: flex-end; }
.sp-seas { padding: 0; overflow: hidden; }
.sp-seas .seas { display: flex; flex-direction: column; height: auto; }
.sp-seas .seas-left { height: 480px; border-right: 0; border-bottom: 1px solid var(--border); }
.sp-seas .seas-right { overflow-x: auto; padding: 4px 6px 8px; }
.sp-seas .seas-table { width: 100%; }
.sp-seas .seas-table td, .sp-seas .seas-table th { font-size: 12px; padding: 5px 6px; }

/* Search suggestions: filter tabs, Recent and Popular headings */
.h-results { max-height: 480px; }
.hs-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.hs-filters button { border: 1px solid var(--control); background: transparent; color: var(--text); font: inherit; font-size: 12.5px; height: 28px; padding: 0 12px; border-radius: 14px; cursor: pointer; }
.hs-filters button:hover { background: var(--hover); }
.hs-filters button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.hs-h { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.hs-empty { padding: 18px 10px; color: var(--muted); font-size: 13px; text-align: center; }
.h-nav .h-results { min-width: 440px; }

/* ---------- country picker (top bar) ---------- */
.h-country { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 10px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.h-country:hover { background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .09); }
[data-theme="light"] .h-country:hover { background: rgba(0, 0, 0, .03); border-color: rgba(0, 0, 0, .07); }
.h-country svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.h-country svg.chev { width: 14px; height: 14px; opacity: .6; margin-left: -2px; }
[data-theme="dark"] .home .h-nav:not(.scrolled) .h-country { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
[data-theme="light"] .home .h-nav:not(.scrolled) .h-country { color: #111; }
.dd-menu.country-menu { display: block; position: fixed; z-index: 1000; width: 310px; }
.country-menu .cm-title { padding: 8px 10px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.country-menu button { display: grid; grid-template-columns: 1fr auto 8px; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--menu-item-r, 6px); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.country-menu button:hover, .country-menu button:focus-visible { background: var(--hover); outline: none; }
.country-menu button.on { background: var(--accent-soft); font-weight: 500; }
.country-menu .cm-name { white-space: nowrap; }
.country-menu .cm-ex { font-size: 12px; color: var(--muted); white-space: nowrap; }
.country-menu .cm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--down); }
.country-menu .cm-dot.open { background: var(--up); opacity: 1; }
.country-menu .cm-foot { padding: 8px 10px 6px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.45; color: var(--muted); }
@media (max-width: 980px) { .h-country span { display: none; } .h-country { padding: 0 10px; } }
