:root {
  color-scheme: light;
  --ink: #15243d;
  --muted: #56637b;
  --accent: #324fc9;
  --surface: #fff;
  --canvas: #f4f5f9;
  --line: #dfe4ef;
  --tint: #edf1ff;
  --round: 16px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 2px solid #3761e8;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 5; top: 10px; left: 12px; padding: 8px 16px; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; min-height: 68px; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 750; letter-spacing: -.05em; }
.brand-icon { display: inline-flex; width: 31px; height: 31px; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; background: #344ec3; }
.brand-icon i { width: 3px; border-radius: 3px; background: white; }
.brand-icon i:nth-child(1) { height: 8px; opacity: .66; }
.brand-icon i:nth-child(2) { height: 15px; }
.brand-icon i:nth-child(3) { height: 11px; opacity: .82; }
.nav { display: flex; align-self: stretch; gap: 28px; }
.nav a { position: relative; display: flex; align-items: center; color: var(--muted); font-size: .92rem; font-weight: 590; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }
.nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.header-action { margin-left: auto; padding: 8px 13px; color: #2e44a4; background: var(--tint); border: 1px solid #e1e7fc; border-radius: 9px; font-size: .91rem; font-weight: 700; white-space: nowrap; }
.header-action:hover, .header-action[aria-current] { background: #dfe7ff; }
.header-action span { margin-right: 4px; }

.main { min-height: 72vh; padding: 34px 0 62px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(255px, .64fr); gap: 32px; padding: 38px 42px; border-radius: 22px; align-items: center; color: white; background: radial-gradient(ellipse at 99% 82%, #434fb0 0, transparent 56%), linear-gradient(123deg, #141f45, #233577); overflow: hidden; }
.hero-kicker { display: inline-flex; gap: 8px; align-items: center; color: #d2dcff; font-size: .8rem; letter-spacing: .12em; font-weight: 650; }
.hero-kicker span { width: 7px; height: 7px; border-radius: 50%; background: #9badff; }
.hero h1 { margin: 5px 0 6px; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.06; letter-spacing: -.068em; font-weight: 780; }
.hero p { color: #e0e7ff; font-size: 1.08rem; }
.hero-example { display: grid; gap: 8px; justify-self: end; width: min(100%, 354px); background: #becbff18; border: 1px solid #cad4ff53; border-radius: 14px; padding: 18px 20px; }
.hero-example:hover { color: white; background: #becbff29; }
.hero-example-label { font-size: .8rem; font-weight: 640; color: #d8e2ff; }
.hero-example strong { font-size: 1.03rem; line-height: 1.35; }
.hero-tickers { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.hero-tickers span { border-radius: 5px; background: #dce5ff24; padding: 3px 7px; font: 650 .76rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }

.workspace, .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-top: 34px; align-items: start; }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 1.45rem; line-height: 1.25; letter-spacing: -.035em; }
.edition { color: var(--muted); font-size: .88rem; }
.search { display: flex; align-items: center; gap: 11px; min-height: 47px; padding: 0 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #dce4ff; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 9px 0; outline: 0; }
.search input:focus-visible { outline: 0; }
.search input::placeholder { color: #69768d; }
.search-icon { display: inline-block; width: 13px; height: 13px; border: 1.7px solid #6c7a94; border-radius: 50%; position: relative; margin: 0 3px 2px 1px; flex: 0 0 13px; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.7px; border-radius: 2px; background: #6c7a94; right: -4px; bottom: -2px; transform: rotate(45deg); }
kbd { background: var(--canvas); border: 1px solid var(--line); border-radius: 5px; color: var(--muted); padding: 0 7px; font: .88rem/1.55 ui-monospace, monospace; }
.filters, .feed-meta { display: flex; gap: 9px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.filters { margin-top: 13px; }
.market-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-button, .select-wrap select, .button, .tag-button { display: inline-flex; align-items: center; justify-content: center; min-height: 37px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: #44516a; font-size: .89rem; font-weight: 640; line-height: 1.35; }
.filter-button[aria-pressed="true"], .tag-button, .button[aria-pressed="true"] { background: var(--tint); border-color: #cfd9fb; color: #2b44b1; }
.filter-button:hover, .button:hover, .tag-button:hover { border-color: #9baef0; color: var(--accent); }
.select-wrap { display: inline-flex; position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 11px; top: 14px; width: 7px; height: 7px; border-right: 1.5px solid #63718b; border-bottom: 1.5px solid #63718b; transform: rotate(45deg); pointer-events: none; }
.select-wrap select { appearance: none; padding-right: 28px; }
.feed-meta { margin: 16px 0 10px; color: var(--muted); font-size: .88rem; }
.sort { margin-left: auto; }
.sort select { border-color: transparent; min-height: 30px; background: transparent; }
.sort::after { top: 11px; }

.event-list { display: grid; gap: 11px; }
.event-card { border: 1px solid var(--line); border-radius: var(--round); padding: 17px 19px; background: var(--surface); transition: border-color .18s, box-shadow .18s; }
.event-card:hover { border-color: #b9c6ef; box-shadow: 0 4px 15px #203e770b; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.badge { border-radius: 6px; padding: 3px 8px; background: #eef1f9; color: #475676; font-size: .78rem; font-weight: 720; line-height: 1.35; }
.badge-earnings { color: #3f35a1; background: #eeeaff; }
.badge-partnership { color: #2359a5; background: #e8f1ff; }
.badge-product { color: #126153; background: #e0f5ee; }
.badge-policy { color: #89461c; background: #fff0dd; }
.badge-investment { color: #913976; background: #fce9f6; }
.event-card h3 { margin: 8px 0 5px; font-size: 1.18rem; font-weight: 750; line-height: 1.35; letter-spacing: -.026em; }
.event-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-summary { color: #4b586e; font-size: .94rem; }
.card-bottom { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-top: 12px; }
.stock-pills, .card-markets { display: flex; gap: 6px; flex-wrap: wrap; }
.stock-pill, .ticker-block { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border: 1px solid #dfe5f2; border-radius: 6px; background: #f2f5fc; color: #344875; font: 700 .82rem/1.15 ui-monospace, SFMono-Regular, Consolas, monospace; }
.stock-pill:hover { color: var(--accent); border-color: #9baef0; background: var(--tint); }
.card-markets { font-size: .76rem; color: var(--muted); font-weight: 650; }

.rail { display: grid; gap: 16px; }
.panel { border: 1px solid var(--line); background: var(--surface); padding: 18px; border-radius: var(--round); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.panel h2, .panel-heading h2 { font-size: 1.04rem; letter-spacing: -.022em; }
.panel-heading a { font-size: .86rem; color: var(--accent); font-weight: 650; }
.theme-row { display: flex; gap: 11px; align-items: center; border-top: 1px solid #edf0f5; padding: 10px 0; }
.theme-row:last-child { padding-bottom: 0; }
.theme-row strong, .theme-row small { display: block; }
.theme-row strong { font-size: .91rem; line-height: 1.3; }
.theme-row small { color: var(--muted); margin-top: 2px; font-size: .8rem; }
.theme-glyph, .lens-icon { display: inline-grid; place-items: center; width: 33px; height: 33px; flex: 0 0 33px; border-radius: 9px; color: #4157b5; background: #edf1ff; font-size: 1.13rem; font-weight: 750; }
.lens-panel { background: #ebefff; border-color: #d9e1fb; }
.lens-panel .lens-icon { background: #dce5ff; margin-bottom: 11px; }
.lens-panel p { margin: 6px 0 13px; color: #485575; font-size: .94rem; }

.back { display: inline-block; color: var(--accent); font-size: .92rem; font-weight: 670; margin-bottom: 22px; }
.back::before { content: ""; display: inline-block; width: 7px; height: 7px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin-right: 8px; vertical-align: 2px; }
.detail-layout { margin-top: 0; }
.detail-meta { margin-bottom: 10px; }
.page-head { margin: 0 0 27px; }
.page-title { margin: 0 0 9px; font-size: clamp(2.05rem, 4.8vw, 3.15rem); font-weight: 770; line-height: 1.12; letter-spacing: -.054em; overflow-wrap: break-word; }
.lede { font-size: 1.08rem; color: #465671; max-width: 72ch; }
.detail-actions, .relation-links { display: flex; flex-wrap: wrap; gap: 10px 15px; align-items: center; }
.detail-actions { margin-top: 18px; }
.detail-actions input { max-width: 100%; }
.detail-actions [role="status"] { color: var(--muted); font-size: .88rem; }
.source-link, .relation-links a { color: var(--accent); font-size: .93rem; font-weight: 670; text-decoration: underline; text-decoration-color: #a3b2e8; text-underline-offset: 3px; }
.section-block { margin-top: 30px; }
.relations { display: grid; gap: 9px; }
.relation { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.relation summary { display: flex; align-items: center; gap: 11px; padding: 13px; list-style: none; cursor: pointer; }
.relation summary::-webkit-details-marker { display: none; }
.relation summary:hover { background: #f7f9ff; border-radius: 12px; }
.relation-company { flex: 1; min-width: 0; }
.relation-company strong, .relation-company small { display: block; overflow-wrap: break-word; line-height: 1.28; }
.relation-company small { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.relation-tag { border-radius: 6px; padding: 4px 7px; color: #52617c; background: #eef1f7; font-size: .77rem; font-weight: 680; line-height: 1.3; }
.relation-tag.direct { color: #29564f; background: #e2f4ed; }
.relation-tag.named { color: #364c9c; background: #edf0ff; }
.chevron { flex: 0 0 7px; width: 7px; height: 7px; margin: -3px 4px 0; border-right: 1.6px solid #657590; border-bottom: 1.6px solid #657590; transform: rotate(45deg); }
.relation[open] .chevron { transform: rotate(225deg); margin-top: 3px; }
.relation-body { padding: 0 15px 15px; color: #44516a; }
.relation-body p { margin: 3px 0 12px; }
.context p { color: #465671; margin-top: 5px; }
.context h2:not(:first-child) { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.ticker-line { display: flex; gap: 10px; align-items: center; margin-bottom: 9px; color: var(--muted); font-size: .93rem; }
.page-head .button { margin-top: 7px; }
.narrow, .lens-workspace { max-width: 785px; }
.theme-grid, .watchlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.theme-card h2, .watch-item h2 { margin: 9px 0 4px; }
.theme-card p { color: var(--muted); margin: 5px 0 10px; }
.watch-item button { margin-top: 8px; }
.lens-form { display: grid; gap: 11px; }
.lens-form label { font-weight: 700; }
.lens-form textarea { resize: vertical; width: 100%; min-height: 115px; padding: 12px; border: 1px solid #ccd5e8; border-radius: 8px; }
.lens-form > div { display: flex; gap: 8px; flex-wrap: wrap; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: #233cab; color: white; }
.empty { padding: 21px; border: 1px dashed #c0cde4; border-radius: 12px; background: #f7f9fe; }
.empty p { margin: 5px 0 9px; color: var(--muted); }
.footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 13px; border-top: 1px solid var(--line); min-height: 72px; padding: 17px 0; color: var(--muted); font-size: .87rem; }
.footer span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.footer .brand-icon { width: 24px; height: 24px; border-radius: 7px; transform: scale(.93); }

@media (max-width: 880px) {
  .shell { width: min(100% - 42px, 1160px); }
  .workspace, .detail-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 17px; }
  .hero { padding: 30px; gap: 20px; }
}
@media (max-width: 670px) {
  .shell { width: calc(100% - 30px); }
  .header-inner { min-height: 59px; gap: 13px; flex-wrap: wrap; padding-top: 10px; }
  .nav { width: 100%; min-height: 38px; order: 3; gap: 27px; }
  .header-action { margin-left: auto; }
  .main { padding-top: 22px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 25px 21px; }
  .hero-example { justify-self: start; width: 100%; }
  .workspace, .detail-layout { grid-template-columns: minmax(0, 1fr); margin-top: 23px; }
  .detail-layout { margin-top: 0; }
  .rail { gap: 13px; }
  .theme-grid, .watchlist-grid { grid-template-columns: minmax(0, 1fr); }
  .event-card { padding: 15px; }
  .event-card h3 { font-size: 1.1rem; }
  .filters { align-items: start; }
  .card-bottom { gap: 6px; }
  .search kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
