:root {
  --ink: #182923;
  --muted: #63736d;
  --paper: #f4f7f6;
  --card: #fff;
  --line: #dfe7e3;
  --green: #23634b;
  --green-soft: #eaf3ee;
  --orange: #ce8746;
  --orange-soft: #fcf2e8;
  --red: #ac4a45;
  --red-soft: #fcf0ee;
  --shadow: 0 8px 24px rgba(24,41,35,.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button, summary, select { cursor: pointer; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
a { color: var(--green); text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.app-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: max-content minmax(180px,1fr) auto; gap: 16px; align-items: center; padding: 12px max(24px,calc((100vw - 1440px)/2)); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 9px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; color: #fff; background: var(--green); border-radius: 8px; font-size: 13px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; font-weight: 650; line-height: 1.2; letter-spacing: -.5px; }
.brand small { display: none; margin-top: 2px; color: var(--muted); font-size: 11px; }
.free-badge { padding: 3px 7px; color: var(--green); background: var(--green-soft); border-radius: 5px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.site-nav { display: flex; gap: 10px; font-size: 12px; }
.site-nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }
.site-nav a[aria-current="page"] { font-weight: 650; }
.nav-toggle { display: none; }
.content-header { grid-template-columns: 1fr auto; }
.content-header .site-nav { grid-column: 2; }
.search-shell { position: relative; }
#company-search { width: 100%; padding: 8px 14px 8px 36px; color: var(--ink); background: #f7f9f8; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.search-shell::before { content: ""; position: absolute; z-index: 2; left: 14px; top: 12px; width: 10px; height: 10px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-shell::after { content: ""; position: absolute; left: 24px; top: 22px; width: 5px; height: 1.5px; background: var(--muted); transform: rotate(45deg); pointer-events: none; }
#company-search:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(35,99,75,.1); }
.search-results { position: absolute; z-index: 30; top: calc(100% + 8px); width: 100%; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.search-result { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; width: 100%; padding: 10px; text-align: left; background: transparent; border: 0; border-radius: 6px; text-decoration: none; color: inherit; }
.search-result:hover, .search-result:focus { background: var(--green-soft); }
.search-result b { color: var(--green); }
.search-result span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result small, .freshness { color: var(--muted); font-size: 12px; }
.freshness { justify-self: end; }

main { max-width: 1440px; min-height: calc(100vh - 180px); margin: 0 auto; padding: 32px 24px 48px; }
.card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.welcome { max-width: 940px; margin: 7vh auto 0; padding: 48px; }
.welcome h1 { max-width: 720px; margin: 8px 0 18px; font-size: clamp(30px,5vw,52px); line-height: 1.1; letter-spacing: -.04em; }
.welcome > p:not(.eyebrow) { max-width: 700px; color: var(--muted); font-size: 17px; }
.welcome-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 40px; }
.welcome-grid div { padding: 18px; background: #f7faf8; border: 1px solid var(--line); border-radius: 8px; }
.welcome-grid b, .welcome-grid span { display: block; }
.welcome-grid span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 0 6px; }
.workspace-heading h2 { margin: 3px 0 0; font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.6px; }
.snapshot-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.snapshot-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.availability { color: var(--muted); font-size: 12px; }

.chart-page main { padding-top: 18px; }
.chart-stage { display: flex; flex-direction: column; gap: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; flex-shrink: 0; }
.stat { padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; }
.stat span, .stat small { display: block; color: var(--muted); }
.stat span { font-size: 12px; }
.stat strong { font-size: 26px; font-weight: 650; line-height: 1.2; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.stat:first-child strong.positive { color: var(--green); }
.stat:first-child strong.negative { color: var(--red); }
.stat small { grid-column: 1 / -1; font-size: 11px; }
.control-strip { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) auto; gap: 18px; align-items: center; padding: 0; border: 0; background: transparent; flex-shrink: 0; }
.control-group { min-width: 0; }
.control-label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.segmented { display: inline-flex; max-width: 100%; padding: 3px; background: #e9eeeb; border-radius: 7px; }
.segmented button { padding: 5px 11px; font-size: 12px; white-space: nowrap; background: transparent; border: 0; border-radius: 5px; }
.segmented button:hover:not(:disabled) { background: rgba(255,255,255,.65); }
.segmented button.active { color: var(--green); background: #fff; box-shadow: 0 1px 3px rgba(24,41,35,.12); font-weight: 650; }
.segmented button:disabled { color: #8e9b95; cursor: not-allowed; text-decoration: line-through; }
.segmented.compact button { padding-inline: 11px; }
.multiple-group summary { display: none; }
.input-row { display: flex; align-items: center; gap: 7px; }
.input-row input { min-width: 0; width: 150px; padding: 7px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.text-button { padding: 7px 6px; color: var(--green); background: transparent; border: 0; font-size: 12px; }

.chart-card { padding: 18px; }
.chart-heading, .section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.chart-heading h2, .section-heading h2, .methodology h2, .annual-change-heading h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.3px; }
.chart-heading p, .annual-change-heading p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.chart-actions { display: flex; gap: 6px; flex-shrink: 0; }
.chart-actions button { padding: 5px 9px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.chart-actions button:hover { background: var(--green-soft); border-color: #b4c9be; }
.legend { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 3px; font-size: 12px; }
.legend button { display: flex; gap: 6px; align-items: center; padding: 4px 6px; color: #6e7c75; background: transparent; border: 0; border-radius: 5px; }
.legend button:not(.on) i { opacity: .35; }
.legend button.on { color: var(--ink); }
.legend i { display: inline-block; width: 16px; height: 3px; background: currentColor; }
.legend-price { color: var(--ink); }
.legend-adjusted { color: #8d9690; border-top: 1px dashed #fff; }
.legend-fair { color: var(--orange); }
.legend-dividend { color: #76508f; }
.chart-freshness { margin-left: auto; color: var(--muted); font-size: 11px; align-self: center; }
.chart-wrap { position: relative; height: 460px; min-height: 300px; }
#main-chart { width: 100%; height: 100%; overflow: visible; touch-action: pan-y; cursor: crosshair; user-select: none; }
.chart-tooltip { position: absolute; z-index: 5; min-width: 180px; max-width: 280px; padding: 12px 14px; pointer-events: none; color: var(--ink); background: rgba(255,255,255,.98); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-tooltip b { display: block; margin-bottom: 6px; }
.chart-tooltip span { display: flex; justify-content: space-between; gap: 18px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.brush-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.range-chart { width: 100%; height: 64px; touch-action: pan-y; cursor: ew-resize; user-select: none; }
.fit-viewport .chart-card { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.fit-viewport .workspace-heading, .fit-viewport .chart-heading, .fit-viewport .legend, .fit-viewport .brush-label { flex-shrink: 0; }
.fit-viewport .chart-wrap { flex: 1; height: auto; min-height: 300px; }
.fit-viewport .range-chart { flex: 0 0 58px; height: 58px; }
.chart-details { margin: 14px 0 22px; }
.chart-details .availability { margin: 6px 0; text-align: left; }
.selection-result { margin: 12px 0 0; padding: 10px 12px; background: var(--green-soft); border-radius: 6px; font-size: 13px; }
.selection-result b { color: var(--green); }
.warning { margin-top: 5px; padding: 7px 10px; color: #72552e; background: #fcf6e9; border-radius: 6px; font-size: 12px; }
.snapshot-note { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #eef3f0; font-size: 12px; }

.annual-change-card { margin-top: 16px; padding: 20px; }
.annual-change-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 16px; }
.annual-change-heading h2 { margin-top: 3px; }
.change-legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.change-legend span { display: flex; gap: 6px; align-items: center; }
.change-legend i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.change-legend i.negative { background: var(--red); }
.annual-change-list { display: flex; gap: 8px; padding-bottom: 8px; overflow-x: auto; scrollbar-color: #c4d1c9 transparent; }
.annual-change-item { flex: 1 0 88px; min-width: 88px; padding: 10px 8px; text-align: center; background: #f8fbf9; border: 1px solid var(--line); border-radius: 6px; font-variant-numeric: tabular-nums; }
.annual-change-item span, .annual-change-item small { display: block; color: var(--muted); }
.annual-change-item span { font-size: 11px; font-weight: 600; }
.annual-change-item strong { display: block; margin: 4px 0; color: var(--green); font-size: 16px; font-weight: 650; line-height: 1.2; }
.annual-change-item small { font-size: 11px; }
.annual-change-item.negative { background: #fdf9f8; }
.annual-change-item.negative strong { color: var(--red); }
.annual-change-item.flat strong, .annual-change-item.unavailable strong { color: var(--muted); }
.annual-change-empty { margin: 0; padding: 14px; color: var(--muted); background: #f4f7f5; border-radius: 6px; text-align: center; }

.details-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 16px; }
.fundamentals-card, .methodology { min-width: 0; padding: 20px; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin-top: 3px; }
.pill { padding: 4px 8px; color: var(--muted); background: #f0f4f2; border-radius: 5px; font-size: 11px; font-weight: 600; }
.table-scroll { max-height: 520px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fundamentals-card table { min-width: 780px; }
th { position: sticky; top: 0; z-index: 2; padding: 12px; color: var(--muted); background: #f8faf9; font-size: 11px; font-weight: 600; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, th:last-child, td:first-child, td:last-child { text-align: left; }
td { padding: 12px; text-align: right; border-bottom: 1px solid #edf1ef; }
.fundamentals-card td:first-child { white-space: nowrap; }
tbody tr:hover { background: #f8fbf9; }
td.source { max-width: 300px; color: var(--muted); font-size: 12px; }
.source a { display: inline-block; }
.source details summary { color: var(--green); }
.source details p { margin: 6px 0; }
.methodology { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; border: 0; background: transparent; padding: 8px 0; }
.methodology h2 { font-size: 13px; color: var(--muted); }
.methodology p { margin: 0; font-size: 12px; }
.formula { color: var(--ink); white-space: nowrap; }
.methodology ul { padding-left: 19px; }
.methodology li { margin: 8px 0; }
.methodology .disclaimer { margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 11px; }

.company-overview, .content-page { padding: 32px; margin-bottom: 22px; }
.company-overview h1, .content-page h1 { margin: 0 0 16px; font-size: clamp(26px,4vw,36px); font-weight: 650; line-height: 1.2; letter-spacing: -1px; }
.company-overview h2, .content-page h2, .full-history h2 { font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -.4px; }
.company-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.company-facts dt { color: var(--muted); font-size: 12px; }
.company-facts dd { margin: 0; font-weight: 600; }
.data-note { color: var(--muted); font-size: 13px; }
.content-page { max-width: 960px; margin-inline: auto; }
.company-overview p, .content-page p { overflow-wrap: anywhere; }
.content-page h2 { margin-top: 28px; }
.research-intro { margin-top: 24px; padding: 24px; }
.research-intro h1, .research-intro h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: -.4px; }
.research-intro p { max-width: 900px; }
.research-advantages { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 28px; margin: 24px 0; }
.research-advantages div { border-left: 2px solid var(--green); padding-left: 14px; }
.research-advantages dt { font-weight: 650; margin-bottom: 6px; }
.research-advantages dd { margin: 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 640px) { .research-advantages { grid-template-columns: 1fr; gap: 18px; } }
.guide-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; }
.guide-list { padding-left: 20px; }
.guide-list li + li { margin-top: 22px; }
.guide-list a { font-weight: 600; }
.guide-list p { margin: 6px 0 0; color: var(--muted); }
.updates-page { max-width: 1040px; }
.updates-page .eyebrow { margin-bottom: 8px; }
.updates-intro { max-width: 650px; color: var(--muted); font-size: 16px; }
.update-history-note { padding: 14px 0; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.update-history { list-style: none; padding: 0; margin: 0 0 28px; }
.update-history > li { border-bottom: 1px solid var(--line); }
.update-entry { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 32px; padding: 28px 0; }
.update-date { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; color: var(--muted); font-size: 12px; }
.update-type { display: inline-block; padding: 3px 8px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-weight: 600; }
.update-body h2 { margin: 0; }
.update-body p { margin: 10px 0; }
.update-body ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.update-body li + li { margin-top: 6px; }
@media (max-width: 600px) {
  .update-entry { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .update-date { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
.chart-page .company-overview { margin-top: 18px; }
.full-history { margin-top: 20px; }
.full-history .table-scroll, .directory-table { max-height: none; }
.full-history table { min-width: 1020px; }
caption { text-align: left; color: var(--muted); padding: 10px 0; font-size: 12px; }
tbody th { position: static; background: transparent; text-transform: none; font-size: 13px; letter-spacing: normal; }
.approximation { display: block; color: #72552e; }
.worked-formula { padding: 16px; background: var(--green-soft); border-radius: 6px; font-weight: 600; }
.directory-page { max-width: 1200px; }
.directory-table table { min-width: 660px; }
.directory-table th, .directory-table td { text-align: left; }
.directory-table th:first-child { width: 90px; }
.directory-table th:nth-child(2) { width: 34%; }
.directory-table td:last-child { font-size: 12px; }
.coverage-status { color: var(--green); background: var(--green-soft); padding: 3px 7px; border-radius: 4px; font-size: 11px; }
.directory-controls { display: flex; gap: 16px; align-items: end; padding: 18px 0; border-top: 1px solid var(--line); margin-top: 24px; }
.directory-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.directory-controls label:first-child { flex: 1; }
.directory-controls input, .directory-controls select { min-width: 0; padding: 10px 12px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.directory-count { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
footer { padding: 26px 24px; color: var(--muted); font-size: 12px; text-align: center; border-top: 1px solid var(--line); background: #fff; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 20px; }
footer nav a { text-decoration: none; }

@media (max-width: 1099px) {
  .app-header { grid-template-columns: auto 1fr; gap: 12px 24px; }
  .site-nav { grid-column: 1 / -1; justify-content: flex-end; }
  .content-header { grid-template-columns: 1fr; }
  .content-header .site-nav { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .freshness { display: none; }
  .control-strip { grid-template-columns: 1fr 1fr; gap: 12px; }
  .multiple-group { grid-column: 1 / -1; }
  .multiple-group summary { display: list-item; list-style: none; color: var(--green); font-size: 12px; padding: 3px 0; }
  .multiple-group summary::after { content: " +"; }
  .multiple-group[open] summary::after { content: " −"; }
  .multiple-group .control-label { margin-top: 8px; }
}
@media (max-width: 680px) {
  .app-header { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 12px; }
  .brand { gap: 7px; min-width: 0; }
  .brand strong { font-size: 15px; letter-spacing: -.4px; }
  .brand-mark { width: 30px; height: 30px; font-size: 11px; }
  .free-badge { padding-inline: 5px; font-size: 9px; }
  .search-shell { grid-column: 1 / -1; grid-row: 2; }
  .enhanced .nav-toggle { display: block; padding: 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
  .site-nav, .content-header .site-nav { display: flex; grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; gap: 14px; padding: 8px 0; }
  .enhanced .site-nav { display: none; }
  .enhanced .site-nav.is-open { display: flex; }
  main, .chart-page main { padding: 18px 12px 32px; }
  .chart-stage { gap: 10px; }
  .workspace-heading { gap: 8px; padding-bottom: 0; }
  .workspace-heading h2 { font-size: 21px; }
  .workspace-heading .eyebrow { font-size: 10px; }
  .snapshot-status { font-size: 10px; }
  .stats-grid { gap: 8px; }
  .stat { display: block; padding: 10px 12px; }
  .stat strong { display: block; font-size: 24px; margin: 4px 0; }
  .stat span, .stat small { font-size: 11px; }
  .control-strip { grid-template-columns: 1fr; gap: 9px; }
  .control-label { margin-bottom: 3px; font-size: 11px; }
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; padding: 6px 8px; }
  .segmented.compact button { padding-inline: 8px; }
  .multiple-group { grid-column: auto; }
  .chart-card { padding: 12px; }
  .chart-heading { align-items: start; flex-direction: column; gap: 10px; }
  .chart-heading h2 { font-size: 17px; }
  .chart-heading p { margin-top: 2px; font-size: 11px; line-height: 1.3; }
  .chart-actions { width: 100%; }
  .chart-actions button { padding: 7px 9px; }
  .chart-wrap { height: 340px; }
  .chart-freshness { flex-basis: 100%; margin: 2px 0 4px; }
  .legend { gap: 2px; font-size: 11px; }
  .brush-label span:nth-child(2) { display: none; }
  .annual-change-card, .fundamentals-card { padding: 16px; }
  .annual-change-heading { align-items: start; flex-direction: column; gap: 10px; }
  .methodology { align-items: start; flex-direction: column; gap: 12px; padding-inline: 4px; }
  .company-overview, .content-page { padding: 20px; }
  .company-facts, .welcome-grid { grid-template-columns: 1fr; }
  .welcome { padding: 28px 22px; }
  .directory-controls { flex-direction: column; align-items: stretch; gap: 12px; }
}
@media (max-width: 359px) {
  .brand .free-badge { display: none; }
  .snapshot-status { display: none; }
  .segmented.compact button { padding-inline: 6px; }
}
@media (min-width: 1100px) {
  .chart-page main { padding-top: 16px; }
  .chart-stage { gap: 5px; }
  .workspace-heading { padding: 0 0 2px; }
  .workspace-heading > div { display: flex; align-items: baseline; gap: 12px; }
  .workspace-heading .eyebrow { order: 2; letter-spacing: .04em; }
  .workspace-heading h2 { margin: 0; font-size: 22px; }
  .stat { padding: 6px 14px; }
  .stat strong { font-size: 24px; }
  .control-group, .multiple-fields { display: flex; gap: 8px; align-items: center; }
  .control-label { margin: 0; white-space: nowrap; }
  .segmented button, .segmented.compact button { padding-inline: 9px; }
  .input-row input { width: 136px; }
  .chart-card { padding: 12px; }
  .chart-heading h2 { font-size: 17px; }
  .chart-heading p { margin-top: 2px; font-size: 11px; line-height: 1.3; }
  .chart-actions button { font-size: 11px; padding: 4px 8px; }
  .legend { margin-top: 8px; }
  .fit-viewport .range-chart { flex-basis: 48px; height: 48px; }
}
.source details p { overflow-wrap: anywhere; }
.source details a { display: block; }
.directory-table { max-height: 640px; }
