@font-face {
  font-family: Inter;
  src: url("./assets/inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f7fa;
  --panel: #fff;
  --ink: #162236;
  --muted: #5c687a;
  --line: #dce1e8;
  --blue: #245be8;
  --blue-text: #204fca;
  --blue-soft: #edf2ff;
  --accent: #d09b42;
  --accent-text: #845619;
  --accent-soft: #fbf1da;
  --positive: #287d57;
  --positive-text: #246546;
  --green-soft: #e6f4e9;
  --solid-ink: #fff;
  --shadow: none;
  --header-height: 56px;
  --rail-width: clamp(248px, 20vw, 286px);
  --rail: #131f32;
  --gutter: clamp(16px, 2.2vw, 36px);
  scroll-padding-top: calc(var(--header-height) + 16px);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101823;
  --panel: #182232;
  --ink: #eff3fa;
  --muted: #b2bfd2;
  --line: #344154;
  --blue: #97b4ff;
  --blue-text: #a6c0ff;
  --blue-soft: #243652;
  --accent: #e7ba68;
  --accent-text: #f4ce87;
  --accent-soft: #413723;
  --positive: #59d4a8;
  --positive-text: #90e3c5;
  --green-soft: #1a4138;
  --solid-ink: #101b2a;
  --shadow: 0 2px 8px #0003;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 650; }
svg { flex: none; vertical-align: middle; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
main:focus { outline: none; }
::selection { background: var(--blue-soft); color: var(--ink); }

.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; top: 8px; left: 8px; border-radius: 6px; padding: 8px 12px; color: var(--solid-ink); background: var(--blue); }
.frame { width: min(calc(100% - 2 * var(--gutter)), 1480px); margin-inline: auto; }
.loading { margin: 42px auto; padding: 16px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.panel-heading, .section-heading, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-heading { padding: 15px 16px; }
.panel-heading h2, .section-title { font-size: 17px; line-height: 1.3; letter-spacing: -.022em; font-weight: 680; }
.panel-heading p, .section-heading p, .page-heading p { margin-top: 4px; font-size: 13px; }
.page-heading { margin: 26px 0 18px; align-items: flex-end; }
.page-heading h1 { font-size: clamp(25px, 3.4vw, 38px); line-height: 1.13; letter-spacing: -.042em; font-weight: 690; }
.eyebrow { color: var(--muted); font-size: 10px !important; font-weight: 680; letter-spacing: .08em; text-transform: uppercase; }
.field { min-width: 0; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: var(--panel); color: var(--ink); }
.field::placeholder { color: var(--muted); opacity: 1; }
.field:focus { border-color: var(--blue); }
.btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: var(--panel); color: var(--ink); font-size: 12px; font-weight: 620; line-height: 1.35; text-align: center; }
.btn:not(:disabled):hover, .icon-btn:not(:disabled):hover { background: var(--bg); border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--solid-ink); }
.btn.primary:not(:disabled):hover { background: var(--blue); filter: brightness(.93); }
.icon-btn { width: 34px; padding: 0; color: var(--muted); }
.icon-btn.followed { color: var(--blue-text); background: var(--blue-soft); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-text); font-size: 12px; font-weight: 650; }
.text-link:hover { text-decoration: underline; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; min-height: 21px; max-width: 100%; border-radius: 4px; background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 620; line-height: 1.3; }
.tag-positive { background: var(--green-soft); color: var(--positive-text); }
.tag-blue { background: var(--blue-soft); color: var(--blue-text); }
.tag-amber { background: var(--accent-soft); color: var(--accent-text); }
.with-icon { display: flex; align-items: center; position: relative; }
.with-icon > svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.with-icon input { width: 100%; padding-left: 33px; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; }
.segmented button { min-height: 28px; min-width: 32px; padding: 3px 7px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; }
.segmented button[aria-pressed="true"] { border-color: var(--line); background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.empty-state { display: grid; justify-items: center; gap: 10px; padding: 40px 18px; color: var(--muted); text-align: center; }
.empty-state h2 { font-size: 18px; font-weight: 660; color: var(--ink); }
.empty-state p { max-width: 420px; }
.empty-state .btn { margin-top: 4px; }

.topbar { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-inner { height: calc(var(--header-height) - 1px); display: flex; align-items: center; gap: 12px; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-icon { width: 34px; height: 34px; background: #fff; border: 1px solid #dce1e8; border-radius: 7px; }
.brand-type { display: grid; gap: 5px; line-height: 1; }
.brand-type strong { font-size: 20px; font-weight: 680; letter-spacing: -.055em; }
.brand-type small { font-size: 8px; letter-spacing: .2em; text-transform: uppercase; font-weight: 620; }
.topbar-nav { display: flex; flex-direction: column; }
.nav-group { display: grid; gap: 3px; }
.nav-label { font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .14em; padding: 0 11px 9px; }
.nav-link, .nav-shortcut { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 11px; border-radius: 5px; font-size: 12.5px; font-weight: 500; }
.nav-shortcut { min-height: 32px; }
.nav-group .nav-shortcut .software-badge { width: 21px; height: 21px; background: #f1f4f8; border-radius: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.topbar .icon-btn { border-color: transparent; }
.topbar .profile-btn { background: var(--blue-soft); color: var(--blue-text); border: 1px solid var(--line); border-radius: 50%; width: 30px; height: 30px; min-height: 30px; margin-left: 5px; }
.global-search { display: inline-flex; gap: 8px; align-items: center; width: 205px; min-height: 32px; margin-right: 4px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--muted); text-align: left; font-size: 12px; }
.global-search:hover { border-color: var(--blue); }
kbd { margin-left: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); padding: 1px 4px; font: 10px/1.4 Inter, sans-serif; white-space: nowrap; }
.app-context { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.app-context strong { color: var(--ink); font-weight: 570; }
.app-context i { opacity: .55; font-style: normal; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #4cd3a1; }
.rail-foot { margin: auto -12px 0; padding: 19px 21px; border-top: 1px solid #304057; display: flex; align-items: center; gap: 9px; font-size: 11px; color: #bac5d5; }
.topbar .sidebar-toggle { display: none; }
@media (min-width: 961px) {
  :root[data-sidebar="expanded"] body { padding-inline-start: var(--rail-width); }
  .brand { position: fixed; left: 0; top: 0; width: var(--rail-width); height: 74px; padding: 0 23px; background: var(--rail); color: #fff; }
  .brand-type small { color: #acb9cd; }
  .topbar-nav { position: fixed; inset: 74px auto 0 0; width: var(--rail-width); padding: 20px 12px 0; background: var(--rail); color: #c9d3e2; gap: 28px; overflow-y: auto; }
  .topbar .sidebar-toggle { display: inline-flex; flex: none; }
  :root[data-sidebar="expanded"] .sidebar-toggle { position: fixed; top: 20px; left: calc(var(--rail-width) - 52px); background: transparent; color: #c9d3e2; }
  :root[data-sidebar="expanded"] .sidebar-toggle:hover { background: #203049; color: #fff; border-color: transparent; }
  :root[data-sidebar="expanded"] .sidebar-toggle:focus-visible { outline-color: #a6c2ff; }
  :root[data-sidebar="collapsed"] :is(.brand, .topbar-nav) { display: none; }
  .nav-label { color: #96a5bb; }
  .nav-link:hover, .nav-shortcut:hover { background: #203049; color: white; }
  .nav-link[aria-current="page"], .nav-shortcut[aria-current="page"] { color: white; background: #2b5ddd; }
  .topbar-nav :focus-visible { outline-color: #a6c2ff; }
}
.notice-btn { position: relative; }
.unread-dot { position: absolute; right: 6px; top: 5px; width: 7px; height: 7px; background: var(--accent); border: 1px solid var(--panel); border-radius: 50%; }
.profile-btn > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-size: 11px; background: var(--blue-soft); color: var(--blue-text); }
.mobile-nav-btn { display: none; }
.nav-theme { display: none; }

.mini-bars { display: flex; align-items: end; height: 22px; width: 47px; gap: 3px; }
.mini-bars i { display: block; height: var(--bar-height); min-height: 2px; flex: 1; border-radius: 2px 2px 0 0; background: var(--blue); opacity: .73; }
.software-badge { --logo-color: #2875cf; display: inline-grid; align-items: center; justify-items: center; width: 38px; height: 38px; flex: none; border-radius: 7px; color: color-mix(in srgb, var(--logo-color), var(--ink) 36%); background: color-mix(in srgb, var(--logo-color) 12%, var(--panel)); font-size: 13px; font-weight: 750; }
.software-badge.small { width: 30px; height: 30px; font-size: 11px; }
.software-badge img { display: block; width: 73%; height: 73%; object-fit: contain; }
:root[data-theme="dark"] .software-badge:has(img) { background: #ebf1eb; }
:root[data-theme="dark"] .software-badge { color: color-mix(in srgb, var(--logo-color), var(--ink) 62%); background: color-mix(in srgb, var(--logo-color) 25%, var(--panel)); }
.table-scroll { min-width: 0; overflow: auto; }
.terminal-table { width: 100%; border-spacing: 0; text-align: left; }
.terminal-table th, .terminal-table td { border-top: 1px solid var(--line); padding: 8px 12px; font-size: 12px; }
.terminal-table th { background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 650; }
.terminal-table tbody tr:hover { background: var(--blue-soft); }
.terminal-table td small { display: block; padding-top: 2px; color: var(--muted); font-size: 11px; }
.home-signal-table { min-width: 525px; }
.cell-link { border: 0; padding: 0; background: transparent; color: var(--blue-text); font-size: inherit; font-weight: 650; text-align: left; }
.cell-link:hover { text-decoration: underline; }
.opportunity-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 9px 16px; background: transparent; text-align: left; }
.opportunity-item:hover { background: var(--blue-soft); }
.opportunity-item strong { display: block; font-size: 12px; }
.opportunity-item small { display: block; font-size: 11px; color: var(--muted); }
.opportunity-icon { display: grid; place-items: center; width: 28px; height: 28px; background: var(--accent-soft); color: var(--accent-text); border-radius: 6px; }
.trend-meter { height: 7px; background: var(--bg); border-radius: 3px; }
.trend-meter i { display: block; height: 100%; width: var(--meter); border-radius: 3px; background: var(--blue); }
.category-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 12px; gap: 3px 8px; }
.category-links a { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 6px; border-radius: 5px; font-size: 12px; }
.category-links a:hover { background: var(--blue-soft); color: var(--blue-text); }
.editorial-link { display: grid; gap: 2px; padding: 8px 16px; border-top: 1px solid var(--line); }
.editorial-link:hover { background: var(--blue-soft); }
.editorial-link small { font-size: 11px; color: var(--muted); }
.editorial-link strong { font-size: 13px; }
.research-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; margin-block: 18px; }
.research-cta h2 { font-size: 17px; letter-spacing: -.025em; }
.research-cta p { font-size: 13px; margin-top: 3px; }
.terminal-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); padding: 12px 0 21px; font-size: 11px; }

.directory-page { padding-bottom: 36px; }
.directory-toolbar, .directory-controls, .directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.directory-toolbar { justify-content: space-between; gap: 12px; padding: 12px; }
.directory-controls .with-icon { min-width: 230px; }
.directory-results { border-top: 1px solid var(--line); }
.directory-scroll { max-height: min(66vh, 680px); }
.directory-table { min-width: 930px; font-variant-numeric: tabular-nums; }
.directory-table thead { position: sticky; top: 0; z-index: 1; }
.directory-table thead th { border-top: 0; border-bottom: 1px solid var(--line); }
.directory-table th button { padding: 0; border: 0; font-weight: inherit; white-space: nowrap; background: transparent; color: inherit; }
.directory-table th button:hover { color: var(--blue-text); }
.directory-table td:first-child { width: 42px; }
.directory-table td:nth-child(n+4) { white-space: nowrap; }
.directory-eco { display: flex; align-items: center; gap: 8px; min-width: 166px; }
.directory-eco > span:nth-child(2) { display: grid; justify-items: start; gap: 2px; }
.directory-eco:hover strong { color: var(--blue-text); text-decoration: underline; }
.directory-eco .tag { font-size: 10px; padding-block: 1px; min-height: 16px; }
.directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.directory-card { padding: 12px; }
.directory-card-top { display: flex; justify-content: space-between; gap: 8px; }
.directory-card h2 { margin-block: 7px 2px; font-size: 16px; line-height: 1.25; }
.directory-card h2 a:hover { color: var(--blue-text); }
.directory-card p { margin-top: 5px; font-size: 12px; }
.directory-card-stats, .compare-check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.compare-check { gap: 5px; margin-top: 5px; }
.directory-card-stats strong { color: var(--ink); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: 5px; }

.terminal-modal, .terminal-drawer { padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: 0 14px 55px #101a2740; }
.terminal-modal { width: min(calc(100% - 28px), 490px); max-height: min(84dvh, 720px); border-radius: 15px; overscroll-behavior: contain; }
.terminal-modal.command-modal, .terminal-modal.wide-modal { width: min(calc(100% - 28px), 650px); }
.terminal-modal::backdrop, .terminal-drawer::backdrop { background: #0c262a78; }
.terminal-drawer { position: fixed; inset: 0 0 0 auto; width: min(100%, 525px); height: 100%; max-height: none; max-width: none; margin: 0; border-width: 0 0 0 1px; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 13px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 18px; letter-spacing: -.035em; }
.dialog-body { padding: 20px; }
.stack-form { display: grid; gap: 12px; }
.stack-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 620; }
.stack-form .btn { justify-self: start; }
.global-search-input { position: relative; display: flex; align-items: center; color: var(--muted); }
.global-search-input > svg { position: absolute; left: 13px; pointer-events: none; }
.global-search-input input { min-height: 46px; width: 100%; padding-left: 38px; background: var(--bg); font-size: 15px; }
.global-search-results h3 { padding: 16px 8px 5px; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.search-result { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border-radius: 7px; padding: 9px 8px; }
.search-result:is(:hover,:focus-visible) { background: var(--blue-soft); }
.search-result strong { display: block; font-size: 13px; }
.search-result small { display: block; color: var(--muted); font-size: 11px; }
.search-result > svg { color: var(--blue-text); }
.toast { position: fixed; z-index: 19; bottom: 14px; right: 14px; max-width: min(360px, calc(100% - 28px)); pointer-events: none; }
.toast.visible { padding: 10px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); box-shadow: 0 7px 26px #172b4340; font-size: 13px; }
body:has(dialog[open]) { overflow: hidden; }

@media (max-width: 960px) {
  .topbar-nav, .app-context, .rail-foot, .shortcut-group { display: none; }
  .nav-group { gap: 0; }
  .nav-label { padding-top: 12px; color: var(--muted); }
  .topbar-nav.is-open { display: grid; position: absolute; inset: var(--header-height) 0 auto; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; background: var(--panel); padding: 8px var(--gutter) 14px; border-bottom: 1px solid var(--line); box-shadow: 0 12px 16px #112a2214; }
  .topbar-nav .nav-link { min-height: 41px; }
  .nav-link[aria-current="page"] { background: var(--blue-soft); border-radius: 5px; }
  .mobile-nav-btn { display: inline-flex; }
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { flex-wrap: wrap; }
  .directory-controls, .directory-controls > * { flex: 1 1 auto; }
  .directory-actions { flex: 1 1 100%; }
  .topbar-actions { gap: 3px; }
  .global-search { justify-content: center; width: 34px; }
  .global-search > span, .global-search > kbd { display: none; }
  .btn, .icon-btn { min-height: 38px; }
}
@media (max-width: 400px) {
  .topbar-inner { gap: 5px; padding-inline: 10px; }
  .brand { gap: 5px; font-size: 14px; }
  .brand-icon { width: 28px; height: 28px; }
  .topbar-actions .icon-btn, .global-search { width: 31px; }
  .section-heading, .panel-heading { flex-wrap: wrap; }
  .directory-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .topbar-inner { gap: 8px; padding-inline: 12px; }
  .topbar-actions { gap: 2px; }
  .topbar-actions .icon-btn, .topbar-actions .global-search { width: 38px; height: 38px; }
  .topbar-actions .profile-btn { width: 34px; height: 34px; min-height: 34px; }
  .topbar-actions [data-action="theme"] { display: none; }
  .topbar-nav.is-open .nav-theme { display: flex; align-items: center; gap: 8px; min-height: 43px; border: 0; border-top: 1px solid var(--line); padding: 6px 10px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
  .brand-icon { width: 33px; height: 33px; }
  .brand-type strong { font-size: 17px; }
  .terminal-modal .field { font-size: 16px; }
}
