@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #111827;
  --navy-soft: #1c2536;
  --ink: #151923;
  --muted: #697386;
  --muted-2: #8c95a4;
  --line: #e4e6eb;
  --surface: #ffffff;
  --canvas: #f4f5f7;
  --yellow: #ffc400;
  --yellow-soft: #fff4bd;
  --green: #0f8a53;
  --red: #c04a38;
  --radius: 20px;
  --shadow: 0 16px 46px rgba(20, 28, 45, .055);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Manrope", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 18px; font-weight: 800; letter-spacing: -.45px; }
.brand small { margin-top: 5px; color: #7e8aa1; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.brand-light strong { color: #fff; }
.brand-light small { color: #9ba8c2; }
.brand-mark { display: flex; width: 31px; height: 34px; align-items: flex-end; gap: 4px; }
.brand-mark i { width: 7px; border-radius: 99px; background: var(--yellow); }
.brand-mark i:nth-child(1) { height: 20px; }
.brand-mark i:nth-child(2) { height: 31px; }
.brand-mark i:nth-child(3) { height: 25px; }

.overline { display: block; margin-bottom: 10px; color: #a07100; font-size: 12px; font-weight: 800; letter-spacing: 1.05px; text-transform: uppercase; }
.overline.light { color: var(--yellow); }

/* Authentication */
.auth-body { min-height: 100vh; background: #fff; }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(480px, .95fr) minmax(520px, 1.05fr); }
.auth-story { position: relative; display: flex; min-height: 100vh; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 48px 64px; background: var(--navy); }
.auth-story::after { position: absolute; right: -140px; bottom: -190px; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.auth-copy { position: relative; z-index: 2; max-width: 650px; }
.auth-copy h1 { margin: 0; color: #fff; font-size: clamp(52px, 5vw, 82px); font-weight: 720; letter-spacing: -4.5px; line-height: .99; }
.auth-copy p { max-width: 590px; margin: 30px 0 0; color: #aeb8cb; font-size: 19px; line-height: 1.65; }
.auth-orbit { position: absolute; right: 45px; bottom: 45px; display: flex; align-items: flex-end; gap: 10px; opacity: .9; }
.auth-orbit span { display: block; width: 10px; border-radius: 99px; background: var(--yellow); }
.auth-orbit span:nth-child(1) { height: 48px; }
.auth-orbit span:nth-child(2) { height: 83px; }
.auth-orbit span:nth-child(3) { height: 64px; }
.auth-panel { display: grid; min-height: 100vh; place-items: center; padding: 48px; background: #fff; }
.auth-form { width: min(100%, 460px); }
.mobile-brand { display: none; }
.auth-form h2 { margin: 0; font-size: 48px; font-weight: 760; letter-spacing: -2.4px; }
.auth-lead { margin: 12px 0 36px; color: var(--muted); font-size: 17px; }
.field { display: block; margin-bottom: 22px; }
.field > span { display: block; margin: 0 0 9px; color: #444c5b; font-size: 14px; font-weight: 700; }
.field input { width: 100%; height: 57px; padding: 0 17px; border: 1px solid #d8dce4; border-radius: 13px; outline: 0; background: #fafbfc; color: var(--ink); font-size: 16px; transition: border 150ms ease, box-shadow 150ms ease; }
.field input:focus { border-color: #e3ae00; box-shadow: 0 0 0 4px rgba(255,196,0,.16); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 112px; }
.password-wrap button { position: absolute; top: 50%; right: 10px; padding: 9px 10px; transform: translateY(-50%); border: 0; background: transparent; color: #8c6800; font-size: 13px; font-weight: 800; }
.primary-button { width: 100%; min-height: 58px; margin-top: 8px; border: 0; border-radius: 13px; background: var(--yellow); color: #251f08; font-size: 16px; font-weight: 800; transition: transform 150ms ease, box-shadow 150ms ease; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(181,132,0,.2); }
.auth-help { margin: 22px 0 0; color: #9299a6; font-size: 13px; text-align: center; }
.auth-error { margin: 0 0 16px; padding: 13px 15px; border-radius: 11px; background: #fff0ec; color: #ad3d28; font-size: 14px; font-weight: 700; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; display: flex; width: 282px; flex-direction: column; padding: 34px 24px 24px; background: var(--navy); color: #fff; }
.sidebar .brand { padding: 0 10px 38px; }
.side-nav { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow-y: auto; }
.nav-caption { margin: 18px 12px 10px; color: #7d8aa3; font-size: 10px; font-weight: 800; letter-spacing: 1.45px; text-transform: uppercase; }
.nav-caption-admin { margin-top: 32px; }
.side-nav button { display: grid; width: 100%; min-height: 54px; grid-template-columns: 34px 1fr; align-items: center; margin: 2px 0; padding: 0 12px; border: 0; border-radius: 13px; background: transparent; color: #aab5c9; font-size: 15px; font-weight: 650; text-align: left; transition: background 150ms ease, color 150ms ease; }
.side-nav button i { color: #65718a; font-size: 11px; font-style: normal; font-weight: 800; }
.side-nav button:hover { background: rgba(255,255,255,.045); color: #fff; }
.side-nav button.active { background: #273146; color: #fff; }
.side-nav button.active i { color: var(--yellow); }
.profile-card { display: grid; grid-template-columns: 42px minmax(0,1fr) 34px; align-items: center; gap: 11px; padding: 20px 6px 0; border-top: 1px solid rgba(255,255,255,.1); }
.profile-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--yellow); color: #261f03; font-size: 12px; font-weight: 850; }
.profile-copy { min-width: 0; }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { color: #fff; font-size: 12px; }
.profile-copy small { margin-top: 3px; color: #8693aa; font-size: 11px; }
.profile-card a { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: rgba(255,255,255,.06); color: #b9c2d2; text-decoration: none; }
.sidebar-backdrop { display: none; }
.workspace { min-height: 100vh; margin-left: 282px; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; height: 72px; align-items: center; gap: 16px; padding: 0 40px; border-bottom: 1px solid rgba(218,221,227,.85); background: rgba(244,245,247,.91); backdrop-filter: blur(16px); }
.menu-button { display: none; }
.topbar-title { margin-right: auto; font-size: 15px; font-weight: 800; }
.data-source { display: flex; align-items: center; gap: 9px; color: #737d8f; font-size: 13px; font-weight: 600; }
.data-source i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,196,0,.13); }
.page { width: min(100% - 72px, 1480px); margin: 0 auto; padding: 46px 0 72px; }

/* Shared content */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.page-head > div:first-child { max-width: 800px; }
.page-head h1 { margin: 0; font-size: clamp(42px, 4vw, 58px); font-weight: 730; letter-spacing: -2.8px; line-height: 1.04; }
.page-head p { margin: 15px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.admin-head { align-items: flex-start; }
.period-control { min-width: 300px; padding: 13px 15px; border: 1px solid #dfe2e8; border-radius: 14px; background: rgba(255,255,255,.82); box-shadow: 0 8px 28px rgba(28,35,50,.035); }
.period-control > span { display: block; margin: 0 0 6px 4px; color: #8a92a0; font-size: 10px; font-weight: 850; letter-spacing: 1px; text-transform: uppercase; }
.period-control > div { display: flex; align-items: center; }
.period-control select { min-width: 0; flex: 1; padding: 6px 7px; border: 0; outline: none; background: transparent; color: #252a34; font-size: 13px; font-weight: 750; }
.period-control b { color: #a8aeb8; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.metrics-three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-card { min-height: 166px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-card > span { display: block; color: var(--muted); font-size: 14px; font-weight: 700; }
.metric-card > strong { display: block; overflow-wrap: anywhere; margin-top: 14px; font-size: clamp(30px, 2.5vw, 42px); font-weight: 780; letter-spacing: -1.8px; line-height: 1.04; }
.metric-card p { margin: 15px 0 0; color: var(--muted-2); font-size: 13px; }
.metric-card.accent { border-color: var(--yellow); background: var(--yellow); }
.metric-card.accent > span, .metric-card.accent p { color: #705a0d; }
.metric-card.accent > strong { font-size: clamp(24px, 2.1vw, 34px); }
.executive-card { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(520px,.9fr); gap: 54px; align-items: center; margin-bottom: 18px; padding: 34px 38px; border-radius: 22px; background: var(--navy); color: #fff; box-shadow: 0 20px 54px rgba(17,24,39,.16); }
.executive-copy h2 { margin: 0; font-size: 33px; letter-spacing: -1.1px; }
.executive-copy p { margin: 12px 0 0; color: #b3bdcf; font-size: 15px; line-height: 1.65; }
.executive-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; }
.executive-facts article { min-width: 0; padding: 3px 18px; border-left: 1px solid rgba(255,255,255,.12); }
.executive-facts strong { display: block; overflow: hidden; color: #fff; font-size: 21px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.executive-facts span { display: block; margin-top: 8px; color: #8794aa; font-size: 12px; line-height: 1.45; }
.content-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.content-grid.two-thirds { grid-template-columns: minmax(0,1.2fr) minmax(410px,.8fr); }
.content-grid.phrase-layout { grid-template-columns: minmax(0,1.35fr) minmax(360px,.65fr); }
.content-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.panel { margin-bottom: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.content-grid > .panel { margin-bottom: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.panel-head h2 { margin: 0; font-size: 24px; font-weight: 760; letter-spacing: -.75px; }
.panel-head > span { color: var(--muted-2); font-size: 13px; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: #8a6500; font-size: 13px; font-weight: 800; }

/* Charts and ranks */
.chart-shell { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
.chart-y-axis { position: relative; height: 310px; color: #697386; font-size: 12px; font-weight: 750; }
.chart-y-axis small { position: absolute; top: 5px; left: 0; color: #8c94a2; font-size: 10px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.chart-y-axis > div { position: absolute; inset: 42px 0 34px; display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
.chart-y-axis span { line-height: 1; transform: translateY(50%); }
.chart-y-axis span:first-child { transform: translateY(-50%); }
.chart-plot { position: relative; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: auto; scrollbar-color: #c6a547 #eef0f3; border-radius: 6px; }
.chart-plot:focus-visible { outline: 2px solid #c6a547; outline-offset: 3px; }
.chart-plot::-webkit-scrollbar { height: 10px; }
.chart-plot::-webkit-scrollbar-track { background: #eef0f3; border-radius: 6px; }
.chart-plot::-webkit-scrollbar-thumb { background: #c6a547; border-radius: 6px; border: 2px solid #eef0f3; }
.chart-track { position: relative; width: 100%; }
.chart-scroll-hint { margin: 12px 0 0 68px; color: #697386; font-size: 12px; }

.chart-grid { position: absolute; inset: 42px 0 34px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { width: 100%; border-top: 1px dashed #e4e7eb; }
.chart-grid i:last-child { border-top-style: solid; }
.bar-chart { position: relative; z-index: 1; display: flex; height: 310px; align-items: stretch; gap: 0; padding: 42px 0 34px; }
.bar-column { position: relative; min-width: 64px; flex: 1 0 64px; align-self: stretch; }
.bar-column i { position: absolute; bottom: 0; left: 50%; display: block; width: 40%; height: var(--bar-height, 1.5%); max-width: 20px; min-height: 4px; border-radius: 5px 5px 2px 2px; background: var(--yellow); transform: translateX(-50%); transition: background 120ms ease; }
.bar-column:hover i { background: #dd9f00; }
.bar-column > span { position: absolute; bottom: calc(var(--bar-height, 1.5%) + 8px); left: 50%; display: none; z-index: 2; padding: 4px 7px; border-radius: 7px; background: var(--navy); color: #fff; font-size: 11px; transform: translateX(-50%); }
.bar-column:hover > span { display: block; }
.bar-column > b { position: absolute; top: calc(100% + 9px); left: 0; width: 100%; text-align: center; color: #8c94a2; font-size: 10px; font-weight: 700; white-space: nowrap; }
.bar-column:last-child > b { right: 0; }
.bar-column:first-child > span { left: 0; transform: none; }
.bar-column:last-child > span { left: auto; right: 0; transform: none; }
.rank-list { display: grid; gap: 17px; }
.rank-list article { display: grid; grid-template-columns: 28px 1fr 40px; align-items: center; gap: 12px; }
.rank-list article > span { color: #a8aeb8; font-size: 11px; font-weight: 800; }
.rank-list strong { display: block; overflow: hidden; margin-bottom: 6px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rank-list i, .share-bar { display: inline-block; height: 7px; overflow: hidden; border-radius: 99px; background: #edf0f3; }
.rank-list i { width: 100%; }
.rank-list i b, .share-bar i { display: block; height: 100%; border-radius: inherit; background: var(--yellow); }
.rank-list em { color: #596273; font-size: 13px; font-style: normal; font-weight: 800; text-align: right; }
.phrase-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 22px; }
.phrase-cards article { display: grid; min-width: 0; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid #eaecf0; }
.phrase-cards article:nth-child(-n+3) { border-top: 0; }
.phrase-cards article > span { color: #adb3bd; font-size: 11px; font-weight: 800; }
.phrase-cards article strong, .phrase-cards article small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phrase-cards article strong { font-size: 14px; }
.phrase-cards article small { margin-top: 3px; color: var(--muted-2); font-size: 11px; }
.phrase-cards article > b { font-size: 19px; }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.topic-grid article { position: relative; display: flex; min-height: 250px; overflow: hidden; flex-direction: column; padding: 22px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fbfbfc; }
.topic-grid article::after { position: absolute; inset: auto 0 0; width: var(--weight); height: 5px; background: var(--yellow); content: ""; }
.topic-grid article > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.topic-grid article > div:first-child > span { color: #a5acb7; font-size: 11px; font-weight: 800; }
.topic-grid h3 { margin: 26px 0 9px; font-size: 20px; letter-spacing: -.45px; }
.topic-grid p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.topic-grid footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 22px; }
.topic-grid footer strong { font-size: 26px; }
.topic-grid footer span { color: var(--muted-2); font-size: 11px; text-align: right; }
.movement { font-size: 12px; font-style: normal; font-weight: 800; white-space: nowrap; }
.movement.up { color: var(--green); }
.movement.down { color: var(--red); }
.movement.flat { color: #7b8493; }

/* Tables and phrase language */
.table-panel { padding-bottom: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 14px; border-bottom: 1px solid #dfe2e7; color: #858d9a; font-size: 10px; font-weight: 850; letter-spacing: .7px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 17px 14px; border-bottom: 1px solid #eceef1; color: #535c6c; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }
td strong { color: var(--ink); font-size: 14px; }
td small { display: block; max-width: 500px; overflow: hidden; margin-top: 4px; color: #8a92a0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.share-bar { width: 76px; margin-right: 9px; vertical-align: middle; }
.table-index { color: #a8aeb8; font-size: 11px; font-weight: 800; }
.topic-pill { display: inline-flex; padding: 6px 9px; border-radius: 99px; background: #f0f2f5; color: #5e6777; font-size: 11px; font-weight: 750; white-space: nowrap; }
.table-toolbar { align-items: flex-end; }
.table-toolbar > div:last-child { display: flex; gap: 9px; }
.table-toolbar input, .table-toolbar select { min-height: 44px; padding: 0 13px; border: 1px solid #dfe2e7; border-radius: 11px; outline: 0; background: #fafbfc; color: var(--ink); font-size: 13px; }
.table-toolbar input { width: min(330px, 42vw); }
.table-toolbar select { width: min(230px, 32vw); }
.table-toolbar input:focus, .table-toolbar select:focus { border-color: #d7a300; box-shadow: 0 0 0 3px rgba(255,196,0,.13); }
.registry-head { align-items: flex-end; }
.registry-controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.registry-controls input, .registry-controls select { min-height: 44px; padding: 0 13px; border: 1px solid #dfe2e7; border-radius: 11px; outline: 0; background: #fafbfc; color: var(--ink); font-size: 13px; }
.registry-controls input { width: min(300px,35vw); }
.registry-controls select { width: min(210px,28vw); }
.registry-controls input:focus, .registry-controls select:focus { border-color: #d7a300; box-shadow: 0 0 0 3px rgba(255,196,0,.13); }
.view-switch { display: flex; padding: 4px; border-radius: 11px; background: #eef0f3; }
.view-switch button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #747d8c; font-size: 11px; font-weight: 800; }
.view-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(19,27,43,.08); }
.query-groups { display: grid; gap: 11px; }
.query-group { overflow: hidden; border: 1px solid #e3e6eb; border-radius: 14px; background: #fbfbfc; }
.query-group summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; cursor: pointer; list-style: none; }
.query-group summary::-webkit-details-marker { display: none; }
.query-group summary strong, .query-group summary span { display: block; }
.query-group summary strong { font-size: 15px; }
.query-group summary span { margin-top: 4px; color: #8a92a0; font-size: 11px; }
.query-group summary > b { color: #876300; font-size: 13px; }
.query-group[open] summary { border-bottom: 1px solid #e3e6eb; background: #fff8da; }
.query-group .table-scroll { padding: 0 8px 8px; background: #fff; }
.empty-row { padding: 36px; color: var(--muted-2); text-align: center; }
.words-panel { min-height: 270px; }
.word-cloud { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.word-cloud > span { display: flex; width: 100%; min-width: 0; height: 46px; align-items: center; gap: 9px; padding: 0 13px; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 12px; background: #fafbfc; }
.word-cloud b { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.word-cloud small { flex: 0 0 auto; margin-left: auto; color: #9a7200; font-size: 10px; font-weight: 800; }
.compact-insight { display: flex; min-height: 270px; flex-direction: column; justify-content: flex-end; background: var(--yellow); }
.compact-insight h2 { margin: 0; font-size: 42px; letter-spacing: -2px; }
.compact-insight p { margin: 15px 0 0; color: #68540b; font-size: 14px; line-height: 1.65; }

/* Insights */
.insight-hero { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(350px,.7fr); gap: 60px; align-items: center; margin-bottom: 18px; padding: 35px 38px; border-radius: 22px; background: var(--navy); color: #fff; }
.insight-hero h2 { margin: 0; font-size: 44px; letter-spacing: -2px; }
.insight-hero p { margin: 12px 0 0; color: #aeb8c9; font-size: 14px; line-height: 1.65; }
.insight-hero > div:last-child { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.14); }
.insight-hero > div:last-child > span { display: block; color: #8996aa; font-size: 12px; }
.insight-hero > div:last-child strong { display: block; margin-top: 10px; font-size: 22px; }
.opportunity-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.opportunity-grid article { display: flex; min-height: 290px; flex-direction: column; padding: 22px; border: 1px solid #e4e7ec; border-radius: 16px; background: #fbfbfc; }
.opportunity-top { display: flex; align-items: center; justify-content: space-between; }
.opportunity-top span { color: #a6adb8; font-size: 11px; font-weight: 800; }
.opportunity-top strong { color: #956c00; font-size: 12px; }
.opportunity-grid h3 { margin: 28px 0 9px; font-size: 21px; letter-spacing: -.5px; line-height: 1.25; }
.opportunity-grid > article > p { margin: 0; color: var(--muted); font-size: 13px; }
.catalog-context { margin-top: auto; padding-top: 18px; border-top: 1px solid #e6e8ec; }
.catalog-context span { display: block; margin-bottom: 7px; color: #9299a5; font-size: 10px; font-weight: 850; letter-spacing: .65px; text-transform: uppercase; }
.catalog-context a, .catalog-context b { color: #765800; font-size: 12px; font-weight: 750; line-height: 1.5; text-decoration: none; }
.catalog-context a:hover { text-decoration: underline; }
.signal-panel { position: relative; min-height: 250px; overflow: hidden; }
.signal-number { position: absolute; top: 15px; right: 22px; color: #edf0f3; font-size: 72px; font-weight: 800; letter-spacing: -5px; line-height: 1; }
.signal-panel h2 { position: relative; margin: 38px 0 10px; font-size: 25px; letter-spacing: -.7px; }
.signal-panel p { position: relative; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.decision-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.decision-grid article { display: flex; min-height: 220px; flex-direction: column; padding: 21px; border: 1px solid #e4e7ec; border-radius: 16px; background: #fbfbfc; }
.decision-grid article > div { display: flex; align-items: center; justify-content: space-between; }
.decision-grid article > div span { color: #a6adb8; font-size: 11px; font-weight: 800; }
.decision-grid article > div strong { color: #8b6600; font-size: 18px; }
.decision-grid h3 { margin: 26px 0 9px; font-size: 20px; letter-spacing: -.45px; }
.decision-grid p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.decision-grid footer { margin-top: auto; padding-top: 18px; color: #8c94a2; font-size: 11px; }
.insight-details { align-items: stretch; }
.choice-list { display: grid; gap: 18px; }
.choice-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 7px 18px; }
.choice-list article > div strong, .choice-list article > div span { display: block; }
.choice-list article > div strong { font-size: 14px; }
.choice-list article > div span { margin-top: 3px; color: #8e96a3; font-size: 11px; }
.choice-list article > b { font-size: 18px; }
.choice-list article > i { grid-column: 1/-1; height: 7px; overflow: hidden; border-radius: 99px; background: #edf0f3; }
.choice-list article > i span { display: block; height: 100%; border-radius: inherit; background: var(--yellow); }
.concentration-card { display: flex; flex-direction: column; justify-content: flex-end; background: var(--navy); color: #fff; }
.concentration-card > strong { display: block; margin-top: auto; color: var(--yellow); font-size: clamp(54px,7vw,92px); font-weight: 780; letter-spacing: -4px; line-height: 1; }
.concentration-card h2 { margin: 16px 0 0; max-width: 460px; font-size: 24px; letter-spacing: -.8px; }
.concentration-card p { margin: 14px 0 0; color: #aeb8c9; font-size: 13px; line-height: 1.65; }
.empty-state { grid-column: 1/-1; padding: 42px; border: 1px dashed #d8dce3; border-radius: 15px; color: var(--muted-2); text-align: center; }
.empty-state.compact { padding: 24px; }

/* Administration */
.upload-card { display: grid; grid-template-columns: minmax(340px,.8fr) minmax(500px,1.2fr); gap: 38px; align-items: center; margin-bottom: 18px; padding: 32px; border: 1px solid #e7bd2c; border-radius: 22px; background: linear-gradient(135deg,#fff 55%,#fff7d5); box-shadow: var(--shadow); }
.upload-card h2 { margin: 0; font-size: 31px; letter-spacing: -1px; }
.upload-card > div:first-child p { margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.upload-zone { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 13px; padding: 17px; border: 1px dashed #cdd1d8; border-radius: 15px; background: rgba(255,255,255,.78); }
.dark-button, .yellow-button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 11px; font-size: 13px; font-weight: 800; }
.dark-button { background: var(--navy); color: #fff; }
.yellow-button { grid-column: 1/-1; background: var(--yellow); color: #282105; }
.yellow-button:disabled { cursor: not-allowed; opacity: .48; }
.upload-zone > div { min-width: 0; }
.upload-zone > div strong, .upload-zone > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-zone > div strong { font-size: 13px; }
.upload-zone > div span { margin-top: 3px; color: #8b93a0; font-size: 11px; }
.upload-feedback { grid-column: 1/-1; margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 13px; font-weight: 750; }
.upload-feedback.success { background: #eaf7ef; color: #237047; }
.upload-feedback.error { background: #fff0ec; color: #ae402b; }
.active-label { padding: 7px 10px; border-radius: 99px; background: var(--yellow-soft); color: #896500 !important; font-size: 10px !important; font-weight: 850; text-transform: uppercase; }
.source-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.source-stats article { padding: 18px; border-radius: 13px; background: #f6f7f9; }
.source-stats span { display: block; color: var(--muted-2); font-size: 11px; }
.source-stats strong { display: block; margin-top: 6px; font-size: 18px; }
.history-list article { display: grid; grid-template-columns: 44px minmax(0,1fr) 110px 175px; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid #e8eaee; }
.history-list article:first-child { border-top: 0; }
.history-list article > span { display: grid; width: 39px; height: 32px; place-items: center; border-radius: 9px; background: #fff3bd; color: #8f6900; font-size: 10px; font-weight: 850; }
.history-list strong, .history-list small { display: block; }
.history-list strong { font-size: 13px; }
.history-list small { margin-top: 3px; color: var(--muted-2); font-size: 11px; }
.history-list b { font-size: 12px; }
.history-list time { color: #808897; font-size: 11px; text-align: right; }
.access-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.access-card { display: grid; min-height: 250px; grid-template-columns: 66px 1fr; align-items: start; gap: 19px; }
.access-card > span { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 17px; background: var(--yellow); color: #292105; font-size: 14px; font-weight: 850; }
.access-card.admin > span { background: var(--navy); color: #fff; }
.access-card small { color: var(--muted-2); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.access-card h2 { margin: 8px 0 7px; font-size: 22px; }
.access-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.access-card b { display: inline-flex; padding: 6px 9px; border-radius: 99px; background: #f0f2f5; color: #626b7a; font-size: 10px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

@media (max-width: 1320px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .executive-card { grid-template-columns: 1fr; gap: 28px; }
  .topic-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .opportunity-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .decision-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1080px) {
  .sidebar { transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 50; display: none; border: 0; background: rgba(9,14,24,.48); }
  .sidebar.open + .sidebar-backdrop { display: block; }
  .workspace { margin-left: 0; }
  .menu-button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #dfe2e7; border-radius: 10px; background: #fff; color: var(--ink); font-size: 18px; }
  .topbar { padding: 0 26px; }
  .page { width: min(100% - 48px, 940px); }
  .content-grid.two-thirds, .content-grid.phrase-layout { grid-template-columns: 1fr; }
  .content-grid.three { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .phrase-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .phrase-cards article:nth-child(3) { border-top: 1px solid #eaecf0; }
  .phrase-cards article:nth-child(-n+2) { border-top: 0; }
  .upload-card { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 32px 22px; }
  .mobile-brand { display: flex; margin-bottom: 70px; }
  .auth-form h2 { font-size: 42px; }
  .page-head { align-items: stretch; flex-direction: column; gap: 22px; }
  .period-control { min-width: 0; }
  .executive-facts { grid-template-columns: 1fr; gap: 17px; }
  .executive-facts article { padding-left: 0; border-left: 0; }
  .insight-hero { grid-template-columns: 1fr; gap: 26px; }
  .insight-hero > div:last-child { padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.14); border-left: 0; }
  .topic-grid, .opportunity-grid, .decision-grid { grid-template-columns: 1fr; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .table-toolbar > div:last-child { width: 100%; }
  .table-toolbar input, .table-toolbar select { width: 50%; }
  .registry-head { align-items: stretch; flex-direction: column; }
  .registry-controls { justify-content: flex-start; }
  .source-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .access-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { height: 64px; padding: 0 15px; }
  .topbar-title { display: none; }
  .data-source { max-width: calc(100% - 58px); margin-left: auto; font-size: 10px; }
  .data-source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { width: calc(100% - 28px); padding: 30px 0 50px; }
  .page-head { margin-bottom: 25px; }
  .page-head h1 { font-size: 39px; letter-spacing: -1.9px; }
  .page-head p { font-size: 15px; }
  .metrics-grid, .metrics-three { grid-template-columns: 1fr; }
  .metric-card { min-height: 150px; padding: 21px; }
  .executive-card, .insight-hero { padding: 27px 23px; }
  .panel { padding: 22px; }
  .phrase-cards { grid-template-columns: 1fr; }
  .phrase-cards article:nth-child(2), .phrase-cards article:nth-child(3) { border-top: 1px solid #eaecf0; }
  .bar-chart, .chart-y-axis { height: 250px; }
  .chart-shell { grid-template-columns: 40px minmax(0,1fr); gap: 7px; }
  .table-toolbar > div:last-child { flex-direction: column; }
  .table-toolbar input, .table-toolbar select { width: 100%; }
  .registry-controls { align-items: stretch; flex-direction: column; }
  .registry-controls input, .registry-controls select, .view-switch { width: 100%; }
  .view-switch button { flex: 1; }
  .upload-card { padding: 23px; }
  .upload-zone { grid-template-columns: 1fr; }
  .yellow-button { grid-column: auto; }
  .source-stats { grid-template-columns: 1fr; }
  .history-list article { grid-template-columns: 40px 1fr; }
  .history-list b, .history-list time { grid-column: 2; text-align: left; }
}
