/* quotelinks.com — Design 1 "Clean": light, white navbar, blue accent */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-soft: #eff4ff;
  --up: #047857;
  --up-soft: #ecfdf5;
  --down: #c2410c;
  --down-soft: #fff4ed;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.up { --c: var(--up); } .down { --c: var(--down); } .flat { --c: var(--muted); }

/* ---------- Navbar ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 16px; min-height: var(--nav-h); }
.nav-brand { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.nav-brand span { color: var(--text); }
.nav-brand b { color: var(--accent); font-weight: 700; }
.nav-brand:hover { text-decoration: none; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-menu > li { position: relative; }
.nav-menu > li > a, .nav-dd-btn {
  display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--text); font: 500 15px var(--font); background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-menu > li > a:hover, .nav-dd-btn:hover, .nav-dd.open > .nav-dd-btn { background: var(--bg); text-decoration: none; }
.nav-menu a[aria-current="page"] { color: var(--accent); }
.nav-dd-btn::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); margin-left: 4px; opacity: .6; transition: transform .15s; }
.nav-dd.open > .nav-dd-btn::after { transform: rotate(-135deg) translateY(-1px); }
.nav-sub { list-style: none; margin: 0; padding: 6px; display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.12); }
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* hover bridge */
.nav-sub a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 14px; }
.nav-sub a:hover, .nav-sub a:focus { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.nav-sub .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.nav-dd.open > .nav-sub { display: block; }
@media (hover: hover) and (min-width: 992px) { .nav-dd:hover > .nav-sub { display: block; } }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; border-radius: 8px; cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle .bar { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.nav-search { margin-left: auto; width: 280px; }

@media (max-width: 991.98px) {
  .nav { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .nav-toggle { display: flex; }
  .nav-search { order: 3; width: 100%; margin: 0; }
  .home .nav-search { display: none; }
  .nav-menu { order: 4; display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 8px;
    max-height: calc(100vh - 70px); overflow-y: auto; border-top: 1px solid var(--line); }
  .nav-menu.show { display: flex; }
  .nav-menu > li > a, .nav-dd-btn { height: 48px; width: 100%; justify-content: space-between; font-size: 16px; padding: 0 8px; }
  .nav-sub { position: static; box-shadow: none; border: 0; padding: 0 0 6px 12px; min-width: 0; }
  .nav-sub a { padding: 10px 8px; font-size: 15px; }
}

/* ---------- Search ---------- */
.search { position: relative; display: flex; align-items: center; }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  font: 15px var(--font); color: var(--text); -webkit-appearance: none; appearance: none; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.search-ico { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-results { list-style: none; margin: 0; padding: 6px; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.14); text-align: left; }
.search-results li { display: flex; gap: 12px; align-items: baseline; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.search-results li.active { background: var(--accent-soft); }
.sr-sym { font-weight: 700; min-width: 56px; color: var(--accent); }
.sr-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results mark { background: none; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.search-empty { color: var(--muted); cursor: default !important; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { padding: 56px 16px 24px; text-align: center; max-width: 1000px; }
.hero h1 { font-size: clamp(26px, 3.5vw, 40px); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.hero-search { max-width: 728px; margin: 0 auto; }
@media (max-width: 767.98px) { .hero h1 { white-space: normal; } }
.lead { color: var(--muted); font-size: 17px; margin: 14px auto 26px; max-width: 600px; }
.hero-search input { height: 56px; font-size: 17px; padding-left: 46px; padding-right: 120px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.hero-search .search-ico { left: 16px; width: 20px; height: 20px; }
.hero-search button { position: absolute; right: 6px; height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 600 15px var(--font); cursor: pointer; }
.hero-search button:hover { background: #1e40af; }
.try { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.try a { display: inline-block; margin: 4px 3px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; }
.try a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Sections ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 32px 0 14px; }
.sec-head h2, .browse h2 { font-size: 20px; }
.updated { color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px 10px; }
.card-head h2 { font-size: 18px; }
.card-title { font-size: 15px; font-weight: 600; padding: 14px 16px 6px; }
.more { font-size: 14px; }

/* Index cards */
.idx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.idx { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 20px; min-height: 96px; }
.idx-text { display: flex; flex-direction: column; gap: 2px; }
.spark { width: 100%; height: 60px; overflow: visible; }
.spark-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: color-mix(in srgb, var(--c) 9%, transparent); stroke: none; }
.spark-base { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; vector-effect: non-scaling-stroke; }
.idx-name { color: var(--muted); font-size: 13px; font-weight: 500; }
.idx-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.idx-chg { color: var(--c); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.idx-pct { display: inline-block; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 10%, transparent); }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 24px; align-items: start; }
.side { display: grid; gap: 20px; }

/* Quote table */
.q-head, .q-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 92px 80px 86px 76px; align-items: center; gap: 8px; padding: 0 18px; }
.q-head { border-bottom: 1px solid var(--line); }
.q-head button { background: none; border: 0; padding: 10px 0; font: 600 12px var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: right; cursor: pointer; }
.q-head button:nth-child(-n+2) { text-align: left; }
.q-head button[aria-sort="ascending"]::after { content: " ▲"; }
.q-head button[aria-sort="descending"]::after { content: " ▼"; }
.q-head button[aria-sort="ascending"], .q-head button[aria-sort="descending"] { color: var(--accent); }
.q-row { min-height: 46px; border-bottom: 1px solid var(--line); color: var(--text); font-variant-numeric: tabular-nums; }
.q-body .q-row:last-child { border-bottom: 0; }
.q-row:hover { background: #fafbff; text-decoration: none; }
.q-sym { font-weight: 700; color: var(--accent); }
.q-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-price, .q-chg, .q-pct, .q-vol { text-align: right; }
.q-price { font-weight: 600; }
.q-chg { color: var(--c); }
.q-pct { justify-self: end; color: var(--c); font-weight: 600; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.q-vol { color: var(--muted); }

/* Movers */
.movers { padding: 0 8px 8px; }
.mv { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 8px; color: var(--text); font-variant-numeric: tabular-nums; }
.mv:hover { background: var(--bg); text-decoration: none; }
.mv-sym { font-weight: 700; color: var(--accent); }
.mv-name { color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mv-pct { color: var(--c); font-weight: 600; min-width: 64px; text-align: right; }

/* Breadth */
.breadth { padding: 4px 16px 16px; }
.br-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); gap: 2px; }
.br-up { background: var(--up); } .br-down { background: var(--down); } .br-flat { background: #cbd5e1; }
.br-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 600; }
.br-legend .up { color: var(--up); } .br-legend .down { color: var(--down); } .br-legend .flat { color: var(--muted); }

/* Browse */
.browse { margin-top: 36px; }
.browse h2 { margin-bottom: 14px; }
.browse-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.links { list-style: none; margin: 0; padding: 0 16px 14px; columns: 2; column-gap: 16px; }
.links li { break-inside: avoid; padding: 4px 0; font-size: 14px; }

/* Loading */
.skel { position: relative; overflow: hidden; background: var(--surface); }
.q-row.skel { height: 46px; }
.skel::after { content: ""; position: absolute; inset: 12px 16px; border-radius: 6px; background: linear-gradient(90deg, #eef0f3 0%, #f7f8fa 50%, #eef0f3 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.load-error { color: var(--muted); padding: 16px 18px; margin: 0; }

/* Footer */
.site-footer { margin-top: 48px; padding: 28px 0 36px; border-top: 1px solid var(--line); background: var(--surface); text-align: center; font-size: 14px; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--text); }
.fine { color: var(--muted); font-size: 12.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .layout { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .browse-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
  .idx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .idx { min-height: 0; padding: 10px; grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .spark { height: 30px; }
  .idx-price { font-size: 16px; }
  .idx-chg { font-size: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .side { grid-template-columns: 1fr; }
  .browse-grid { grid-template-columns: 1fr; }
  .q-head, .q-row { grid-template-columns: minmax(0, 1fr) 86px 84px; padding: 0 14px; row-gap: 0; }
  .q-head .q-name, .q-head .q-chg, .q-head .q-vol, .q-row .q-chg, .q-row .q-vol { display: none; }
  .q-row { grid-template-areas: "sym price pct" "name price pct"; padding-top: 8px; padding-bottom: 8px; }
  .q-row .q-sym { grid-area: sym; } .q-row .q-name { grid-area: name; font-size: 13px; }
  .q-row .q-price { grid-area: price; } .q-row .q-pct { grid-area: pct; }
  .hero-inner { padding: 32px 16px 18px; }
  .lead { font-size: 15.5px; }
  .hero-search input { height: 52px; padding-right: 16px; }
  .hero-search button { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Content pages (disclaimer, privacy, contact) ---------- */
.page-head { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 40px; padding-bottom: 28px; max-width: 880px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin: 8px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.page { max-width: 880px; margin: 28px auto 0; padding: 0 16px; }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; line-height: 1.7; }
.prose h2 { font-size: 19px; margin: 30px 0 8px; scroll-margin-top: 80px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose .updated-on { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.callout { border: 1px solid #c7d7fe; background: var(--accent-soft); border-radius: 10px; padding: 14px 18px; margin: 0 0 22px; }
.callout ul { margin: 6px 0 0; }
.callout strong { color: #1e3a8a; }
.prose .toc, .toc { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text); background: var(--bg); }
.toc a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.contact-card h2 { font-size: 16px; margin: 0 0 6px; }
.contact-card p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }
.contact-card .mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15.5px; word-break: break-all; }
.contact-card .mail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
@media (max-width: 767.98px) {
  .prose { padding: 20px 18px; border-radius: 10px; }
  .contact-grid { grid-template-columns: 1fr; }
  .page-head .wrap { padding-top: 28px; padding-bottom: 20px; }
}

/* Tighter gap between the hero and Market overview */
.hero + section .sec-head { margin-top: 18px; }

/* ---------- Software product pages ---------- */
.prod-hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.prod-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; padding-top: 28px; padding-bottom: 40px; }
.prod-hero .crumbs { margin-bottom: 14px; }
.prod-hero h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -.02em; }
.prod-hero .lead { margin: 14px 0 22px; max-width: 44em; font-size: 17px; line-height: 1.6; color: #374151; }
.prod-hero .meta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.shot { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 10px 30px rgba(16,24,40,.10); }
.shot img { display: block; width: 440px; max-width: 100%; height: auto; border-radius: 7px; }
.shot a:hover { text-decoration: none; }

.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 16px var(--font); text-align: center; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-download { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(29,78,216,.3); }
.btn-download:hover { background: #1e40af; color: #fff; }
.btn-order { background: var(--up); color: #fff; box-shadow: 0 1px 2px rgba(4,120,87,.3); }
.btn-order:hover { background: #065f46; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.prod { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-top: 28px; }
.prod-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 30px; line-height: 1.65; min-width: 0; }
.prod-main h2 { font-size: 20px; margin: 30px 0 10px; }
.prod-main h2:first-child { margin-top: 0; }
.prod-main p { margin: 0 0 12px; }
.checks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--up-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checks b { font-weight: 600; }
.prod-main .shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 6px 0 8px; }
.prod-main .shots figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--bg); }
.prod-main .shots figure.wide { grid-column: 1 / -1; }
.prod-main .shots img { display: block; width: 100%; height: auto; border-radius: 6px; }
.prod-main .shots figcaption { font-size: 13.5px; color: var(--muted); text-align: center; padding: 6px 4px 2px; }
.prod-main code, .prod-main kbd { font: 13.5px ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

.facts { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.facts h2 { font-size: 15px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.facts .price { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.facts dl { margin: 0 0 16px; font-size: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.facts .btn { display: flex; width: 100%; margin-top: 8px; }
.facts .mirror { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.related { margin-top: 36px; }
.related h2 { font-size: 20px; margin-bottom: 14px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rel { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.rel-head { display: flex; align-items: center; gap: 12px; }
.rel-head img { width: 44px; height: 44px; flex: none; }
.rel-head h3 { font-size: 16px; }
.rel-head h3 a { color: var(--text); }
.rel-head .p { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.rel p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.rel .more { font-weight: 600; }

@media (max-width: 991.98px) {
  .prod { grid-template-columns: 1fr; }
  .facts { position: static; }
  .rel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .prod-hero .wrap { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; padding-bottom: 28px; }
  .shot { justify-self: center; }
}
@media (max-width: 767.98px) {
  .prod-main { padding: 20px 18px; border-radius: 10px; }
  .prod-hero .lead { font-size: 16px; }
}
@media (max-width: 480px) {
  .btns .btn { flex: 1 1 100%; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Stock pages (/stocks/{sym}.html) ---------- */
.stock-head { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.stock-head .wrap { padding-top: 22px; }
.sh-top { display: flex; flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.sh-id { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
.sh-id .sh-meta { max-width: 760px; }
.sh-logo { width: 52px; height: 52px; flex: none; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); padding: 8px; object-fit: contain; }
.sh-id h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; }
.sh-meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.sh-meta a { color: var(--muted); }
.sh-tag { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text); margin-right: 6px; }
.sh-price { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.sh-last { font-size: clamp(30px, 4vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.sh-chg { color: var(--c); font-weight: 600; font-size: 17px; }
.sh-chg .idx-pct { margin-left: 4px; }
.sh-time { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sh-price.skel { width: 200px; height: 74px; border-radius: 10px; }

.stock-tabs { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.stock-tabs::-webkit-scrollbar { display: none; }
.stock-tabs a { flex: none; padding: 10px 16px; color: var(--muted); font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.stock-tabs a:hover { color: var(--text); text-decoration: none; }
.stock-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.stock-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 22px; align-items: start; }
.stock-main, .stock-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.stock-main > *, .stock-side > *, .bars-row > * { min-width: 0; }
.stock-grid .card-head h2 { font-size: 17px; }
.card-body { padding: 4px 18px 18px; }

/* Chart card */
.ranges { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.ranges button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.ranges button:hover { color: var(--text); }
.ranges button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.pchart { position: relative; height: 340px; margin: 0 8px; }
.pchart .load-error { position: absolute; inset: 0; display: grid; place-items: center; }
.chart-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px 14px; font-size: 14px; color: var(--muted); }
.chart-foot .perf { color: var(--c); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Key statistics */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin: 0; padding: 0 18px 10px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.range-bar { position: relative; height: 6px; border-radius: 999px; background: var(--line); margin: 6px 0 2px; }
.range-bar i { position: absolute; top: -3px; width: 4px; height: 12px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.rng { padding: 6px 18px 16px; font-size: 13px; color: var(--muted); }
.rng-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 0; }
.rng-ends { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

/* SVG bar charts (EPS, revenue) */
.bars-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bchart { position: relative; padding: 0 12px 12px; }
.bchart svg { display: block; width: 100%; height: 200px; overflow: visible; }
.bchart .grid { stroke: var(--line); stroke-width: 1; }
.bchart .base { stroke: #9ca3af; stroke-width: 1; }
.bchart .lbl { fill: var(--muted); font: 12px var(--font); }
.bchart .val { fill: var(--text); font: 600 12px var(--font); }
.bchart .bar { transition: opacity .12s; }
.bchart .hit { fill: transparent; cursor: default; }
.bchart:hover .bar { opacity: .55; }
.bchart .grp.on .bar { opacity: 1; }
.legend { display: flex; gap: 14px; padding: 0 18px 4px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--sw); margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--text); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 6px 9px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, -100%); box-shadow: 0 6px 16px rgba(16,24,40,.18); font-variant-numeric: tabular-nums; }
.tip b { font-weight: 600; }

/* About */
.about { padding: 0 18px 18px; line-height: 1.7; color: #374151; }
.about p { margin: 0 0 12px; }
.about p:last-child { margin: 0; }
.about-clip { max-height: 210px; overflow: hidden; position: relative; }
.about-clip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--surface)); }
.more-btn { border: 0; background: none; padding: 0; margin-top: 8px; color: var(--accent); font: 600 14px var(--font); cursor: pointer; }

/* Profile */
.facts-list { margin: 0; padding: 0 18px 12px; font-size: 14.5px; }
.facts-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts-list div:last-child { border-bottom: 0; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; font-weight: 600; text-align: right; }

/* News */
.news { list-style: none; margin: 0; padding: 0 8px 8px; }
.news a { display: block; padding: 10px; border-radius: 8px; color: var(--text); }
.news a:hover { background: var(--bg); text-decoration: none; }
.news b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.news span { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }

/* Analyst ratings */
.an-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 18px 10px; }
.an-cons { font-size: 22px; font-weight: 700; color: var(--c); }
.an-tgt { text-align: right; font-size: 13px; color: var(--muted); }
.an-tgt b { display: block; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.an-tgt .up, .an-tgt .down { color: var(--c); font-weight: 600; }
.an-rows { padding: 0 18px 16px; display: grid; gap: 8px; font-size: 13.5px; }
.an-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.an-row .t { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.an-row .t i[hidden] { display: none; }
.an-row .t i { display: block; height: 100%; border-radius: 999px; background: var(--c); min-width: 2px; }
.an-row .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-note { padding: 0 18px 14px; margin: 0; font-size: 12.5px; color: var(--muted); }

/* Related */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
.chips a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.block-skel { height: 140px; margin: 0 18px 18px; border-radius: 8px; }

@media (max-width: 991.98px) {
  .stock-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
  .sh-top { align-items: flex-start; flex-direction: column; gap: 12px; }
  .sh-price { text-align: left; }
  .sh-logo { width: 44px; height: 44px; }
  .stats { grid-template-columns: 1fr; }
  .bars-row { grid-template-columns: 1fr; }
  .pchart { height: 280px; margin: 0 2px; }
  .card-head { flex-wrap: wrap; gap: 10px; }
  .stock-tabs a { padding: 10px 12px; }
}
.sh-logo.mono { display: grid; place-items: center; padding: 0; background: var(--accent-soft); border-color: #c7d7fe; color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: -.02em; }

/* Stock pages: financials table, FAQ, Dow 30 peers */
.fin-wrap { padding: 0 18px 14px; overflow-x: auto; }
.fin { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.fin th, .fin td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.fin thead th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fin th:first-child { text-align: left; padding-left: 0; }
.fin tbody th { font-weight: 600; }
.fin tbody tr:last-child th, .fin tbody tr:last-child td { border-bottom: 0; }
.fin-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.faq { padding: 0 18px 12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 12px 24px 12px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 18px; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 21px; }
.faq p { margin: 0 0 14px; color: #374151; line-height: 1.65; }
.peer-list { list-style: none; margin: 0; padding: 0 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 8px; }
.peer-list a { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 8px; color: var(--text); min-width: 0; }
.peer-list a:hover { background: var(--bg); text-decoration: none; }
.peer-list b { color: var(--accent); min-width: 44px; font-size: 14px; }
.peer-list span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Sector pages (/materials.html ...) — js/ql-sector.js ---------- */
.sx-head .wrap { max-width: 1200px; padding-top: 28px; padding-bottom: 20px; }
.sx-head p.lead-sm { margin: 10px 0 0; color: #374151; max-width: 860px; line-height: 1.6; }
.sx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 14px; align-items: start; }
.sx-main, .sx-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.sx-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 4px 18px 14px; }
.sx-summary div { padding: 8px 12px 8px 0; }
.sx-summary dt { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sx-summary dd { margin: 4px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sx-summary .sx-wide { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.sx-summary .sx-wide dd { font-size: 15px; font-weight: 500; }
.sx-pct { display: inline-block; color: var(--c); font-weight: 600; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.sx-summary .sx-pct { padding: 0 8px; }
.sx-breadth { padding: 0 18px 16px; }
.sx-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 0 18px 10px; }
.sx-tools input { height: 36px; width: 240px; max-width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: 14px var(--font); color: var(--text); }
.sx-tools input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.sx-count { color: var(--muted); font-size: 13px; }
.sx-btn { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 14px var(--font); cursor: pointer; }
.sx-btn:hover { border-color: var(--accent); color: var(--accent); }
.sx-chips { display: flex; gap: 6px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: thin; }
.sx-chips button { flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.sx-chips button i { font-style: normal; color: var(--muted); margin-left: 2px; }
.sx-chips button:hover { border-color: var(--accent); }
.sx-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.sx-chips button[aria-pressed="true"] i { color: rgba(255,255,255,.8); }
.sx-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.sx-table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sx-table th, .sx-table td { padding: 0 7px; height: 44px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sx-table th:first-child, .sx-table td:first-child { padding-left: 18px; }
.sx-table th:last-child, .sx-table td:last-child { padding-right: 18px; }
.sx-table thead th { height: 38px; position: sticky; top: 0; background: var(--surface); }
.sx-table thead button { background: none; border: 0; padding: 0; font: 600 12px var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.sx-table th[aria-sort="ascending"] button, .sx-table th[aria-sort="descending"] button { color: var(--accent); }
.sx-table th[aria-sort="ascending"] button::after { content: " ▲"; }
.sx-table th[aria-sort="descending"] button::after { content: " ▼"; }
.sx-table tbody tr:last-child td { border-bottom: 0; }
.sx-table tbody tr:hover { background: #fafbff; }
.sx-table .sx-num { text-align: right; }
@media (max-width: 1199.98px) and (min-width: 992px) { .sx-industry { display: none; } }
@media (max-width: 1099.98px) and (min-width: 992px) { .sx-5d { display: none; } }
@media (max-width: 899.98px) and (min-width: 768px) { .sx-pe, .sx-5d { display: none; } }
.sx-sym a { font-weight: 700; }
.sx-sym small { display: none; }
/* Text columns absorb the leftover width and truncate with an ellipsis. max-width on a table cell is
   ignored by browsers, so use the max-width:0 + percentage width trick instead. */
.sx-name { width: 26%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sx-industry { width: 20%; max-width: 0; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.sx-price, .sx-cap { font-weight: 600; }
.sx-5d { color: var(--c); }
.sx-pe, .sx-vol { color: var(--muted); }
.sx-note { margin: 0; padding: 10px 18px 14px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.sx-inds { display: grid; gap: 2px; padding: 0 8px 10px; }
.sx-ind { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: 14px var(--font); color: var(--text); }
.sx-ind:hover { background: var(--bg); }
.sx-ind[aria-pressed="true"] { background: var(--accent-soft); }
.sx-ind-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-ind-name i { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.sx-ind-pct { color: var(--c); font-weight: 600; font-variant-numeric: tabular-nums; }
.sx-ind-bar { grid-column: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; align-self: center; }
.sx-ind-bar b { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.sx-ind-cap { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; }
.sx-top { padding: 0 18px 14px; }
.sx-top table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sx-top th, .sx-top td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.sx-top td:last-child, .sx-top th:last-child { text-align: right; }
.sx-top thead th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sector-loaded .sx-static { display: none; }
.sx-prose { padding: 0 18px 16px; color: #374151; line-height: 1.65; }
.sx-prose p { margin: 0 0 12px; }
.sx-prose ul { margin: 0 0 12px; padding-left: 20px; }
.sx-prose li { margin: 4px 0; }
.sx-others { list-style: none; margin: 0; padding: 0 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 8px; }
.sx-others a { display: block; padding: 7px 8px; border-radius: 8px; }
.sx-others a:hover { background: var(--bg); text-decoration: none; }
@media (max-width: 991.98px) {
  .sx-grid { grid-template-columns: minmax(0, 1fr); }
  .sx-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .sx-side { grid-template-columns: minmax(0, 1fr); }
  .sx-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-summary dd { font-size: 18px; }
  .sx-industry, .sx-5d, .sx-pe, .sx-vol, .sx-name { display: none; }
  .sx-table td.sx-sym { height: 52px; line-height: 1.25; }
  .sx-table thead th { white-space: normal; line-height: 1.15; }
  .sx-table thead button { font-size: 11px; }
  .sx-sym small { display: block; max-width: 22vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
  .sx-table th, .sx-table td { padding: 0 5px; }
  .sx-table .sx-sym { padding-left: 12px; }
  .sx-tools input { width: 100%; }
}

/* 404 page */
.nf-hero .hero-inner { padding-top: 40px; }
.nf-code { margin: 0 0 4px; font-size: clamp(56px, 9vw, 88px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--accent); opacity: .18; }
.nf-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 28px; align-items: start; }
@media (max-width: 991.98px) { .nf-grid { grid-template-columns: 1fr 1fr; } .nf-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .nf-grid { grid-template-columns: minmax(0, 1fr); } }
