:root {
  color-scheme: dark;
  --bg: #071018;
  --sidebar: #06121a;
  --surface: #0b151d;
  --surface-2: #0e1c24;
  --border: #263b45;
  --border-soft: #1a2c35;
  --text: #eff7f7;
  --muted: #91a5ad;
  --faint: #60747d;
  --mint: #59dc99;
  --mint-dark: #12392f;
  --cyan: #59c9df;
  --blue: #4aa8e2;
  --amber: #f2be66;
  --danger: #ef766d;
  --sidebar-width: 212px;
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.monitor-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 20; display: flex; flex-direction: column; padding: 18px 12px; background: var(--sidebar); border-right: 1px solid var(--border); }
.monitor-brand { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 7px 18px; color: var(--cyan); font-size: 15px; font-weight: 700; }
.monitor-brand img { width: 35px; height: 35px; border-radius: 8px; object-fit: cover; }
.monitor-brand strong { color: var(--mint); font-size: 21px; }
.side-nav { display: grid; gap: 6px; margin-top: 12px; }
.side-nav a, .side-setting { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #b7c4c9; font-weight: 600; white-space: nowrap; }
.side-nav a svg, .side-setting svg { width: 19px; height: 19px; stroke-width: 1.8; }
.side-nav a:hover, .side-setting:hover { color: var(--text); background: #0b2028; }
.side-nav a.active { color: var(--mint); background: #103128; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.account-switcher { display: grid; grid-template-columns: 32px minmax(0, 1fr) 16px; gap: 8px; align-items: center; min-height: 56px; padding: 9px; border: 1px solid var(--border-soft); border-radius: 7px; background: #0a1922; }
.account-switcher strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.account-switcher small { color: var(--muted); font-size: 10px; }
.account-switcher svg { width: 14px; color: var(--muted); }
.account-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #1d3440; color: var(--mint); font-weight: 800; }
.side-setting { width: 100%; }

.monitor-main { grid-column: 2; min-width: 0; }
.monitor-header { position: sticky; top: 0; z-index: 12; height: 70px; display: flex; align-items: center; gap: 10px; padding: 0 24px; background: rgba(7, 16, 24, .94); border-bottom: 1px solid var(--border-soft); backdrop-filter: blur(12px); }
.header-spacer { flex: 1; }
.menu-button { display: none; }
.select-control { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: #08131a; }
.select-control svg { width: 16px; color: var(--muted); }
.select-control select { min-width: 104px; border: 0; outline: 0; background: transparent; color: var(--text); }
.company-select select { min-width: 170px; }
.primary-button, .secondary-button, .icon-button { border-radius: 6px; border: 1px solid transparent; font-weight: 700; }
.primary-button { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; background: var(--mint); color: #052017; }
.primary-button:hover { background: #72e5ad; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(5,32,23,.3); border-top-color: #052017; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.secondary-button { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; background: #10212a; color: var(--text); border-color: var(--border); }
.secondary-button:hover { border-color: var(--mint); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; background: transparent; color: var(--muted); border-color: var(--border); }
.icon-button svg { width: 17px; }
.data-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.data-state > span { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.data-state.live > span { background: var(--mint); box-shadow: 0 0 0 4px rgba(89,220,153,.1); }

.dashboard { max-width: 1520px; margin: 0 auto; padding: 24px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-heading h1 { margin: 0 0 5px; font-size: 26px; line-height: 1.2; }
.page-heading p, .panel-header p { margin: 0; color: var(--muted); font-size: 12px; }
.provider-status { display: flex; gap: 15px; color: var(--faint); font-size: 12px; }
.provider-status span { display: inline-flex; align-items: center; gap: 6px; }
.provider-status span span { width: 7px; height: 7px; border-radius: 50%; background: #41535b; }
.provider-status .connected { color: var(--text); }
.provider-status .connected span { background: var(--mint); }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 12px; margin-bottom: 12px; }
.metric-card { position: relative; min-height: 145px; padding: 17px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.metric-label { display: flex; align-items: center; gap: 7px; color: #c4d0d4; font-weight: 700; }
.metric-label svg { width: 15px; height: 15px; color: var(--muted); }
.info-tip { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.info-tip:hover svg, .info-tip:focus-visible svg, .info-tip.open svg { color: var(--mint); }
.info-tip::after { content: attr(data-tip); position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); width: 240px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.7; text-align: left; white-space: normal; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: opacity .15s ease; z-index: 40; }
.info-tip:hover::after, .info-tip:focus-visible::after, .info-tip.open::after { opacity: 1; visibility: visible; }
.metric-grid .metric-card:first-child .info-tip::after { left: -10px; transform: none; }
.metric-grid .metric-card:last-child .info-tip::after { left: auto; right: -10px; transform: none; }
.metric-value { display: flex; align-items: baseline; gap: 3px; margin-top: 13px; color: var(--mint); }
.metric-value strong { font-size: 36px; line-height: 1; }
.metric-value span { font-size: 19px; font-weight: 800; }
.metric-value.cyan { color: var(--cyan); }
.metric-value.amber { color: var(--amber); }
.metric-value.amber strong { font-size: 31px; }
.metric-value.amber span { font-size: 13px; color: var(--muted); }
.delta { margin: 10px 0 0; font-size: 11px; }
.delta.positive { color: var(--mint); }
.delta.negative { color: var(--danger); }
.delta.neutral { color: var(--muted); }
.metric-icon { position: absolute; right: 18px; bottom: 24px; width: 36px; height: 36px; color: #637983; stroke-width: 1.4; }
.mini-bars { position: absolute; right: 14px; bottom: 23px; width: 88px; height: 34px; display: flex; align-items: flex-end; gap: 3px; }
.mini-bars span { flex: 1; min-height: 5px; background: rgba(89,220,153,.35); border-radius: 1px 1px 0 0; }
.mini-line { position: absolute; right: 12px; bottom: 18px; width: 95px; height: 40px; }
.mini-line svg { width: 100%; height: 100%; overflow: visible; }
.eeat-track { height: 5px; margin-top: 13px; overflow: hidden; background: #1c2b33; border-radius: 4px; }
.eeat-track span { display: block; height: 100%; background: var(--amber); }

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .9fr); gap: 12px; }
.panel { border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.panel-header { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); }
.panel-header h2 { margin: 0 0 4px; font-size: 15px; }
.legend { display: flex; gap: 15px; color: var(--muted); font-size: 11px; }
.legend span::before { content: ""; display: inline-block; width: 15px; height: 2px; margin-right: 6px; vertical-align: middle; background: currentColor; }
.legend .chatgpt { color: var(--mint); }
.legend .gemini { color: var(--cyan); }
.legend .claude { color: #d6a76b; }
.legend .disabled { opacity: .45; }
.chart-wrap { height: 285px; padding: 12px 14px 10px; }
#trendChart { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #1d323c; stroke-width: 1; }
.chart-label { fill: #78909a; font-size: 10px; }
.chart-area { fill: url(#areaGradient); }
.chart-path { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--mint); stroke: var(--surface); stroke-width: 2; }

.share-content { min-height: 285px; display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 20px; padding: 24px 18px; }
.donut { width: 146px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--mint) 0 28.4%, var(--cyan) 28.4% 51%, var(--blue) 51% 69%, #82929a 69% 84%, #334650 84% 100%); }
.donut::before { content: ""; grid-area: 1/1; width: 88px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.donut div { z-index: 1; grid-area: 1/1; text-align: center; }
.donut span { display: block; color: var(--muted); font-size: 11px; }
.donut strong { display: block; margin-top: 3px; color: var(--mint); font-size: 22px; }
.share-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.share-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: #c6d1d5; font-size: 11px; }
.share-list i { width: 8px; height: 8px; border-radius: 50%; }

.aira-insight { min-height: 116px; display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 18px; align-items: center; margin: 12px 0; padding: 15px 20px; overflow: hidden; border: 1px solid #255144; border-radius: 7px; background: #0c1d1d; }
.insight-copy { max-width: 900px; }
.insight-title { display: flex; align-items: center; gap: 8px; color: var(--mint); }
.insight-title svg { width: 18px; }
.aira-insight p { margin: 10px 0 0; color: #d3dfe1; line-height: 1.8; }
.aira-insight img { width: 120px; align-self: start; margin-top: -17px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); }

.keyword-panel, .ranking-board { margin-bottom: 12px; scroll-margin-top: 80px; }
.table-heading { min-height: 70px; }
.table-tools { display: flex; justify-content: flex-end; gap: 8px; margin-left: auto; }
.provider-tabs { height: 38px; display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--border); border-radius: 7px; background: #08131a; }
.provider-tabs button { height: 30px; min-width: 76px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.provider-tabs button:hover { color: var(--text); background: #10212a; }
.provider-tabs button.active { color: #052017; background: linear-gradient(135deg, var(--mint), var(--cyan)); box-shadow: 0 0 18px rgba(89,220,153,.18); }
.search-box { width: 220px; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: #08131a; }
.search-box svg { width: 15px; color: var(--muted); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 14px; background: #10212a; color: #aebdc3; font-size: 11px; text-align: left; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--border-soft); color: #d5dfe2; font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: #0e1c24; }
.keyword-row { cursor: pointer; }
.keyword-row:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.keyword-row.selected-keyword-row { background: linear-gradient(90deg, rgba(89,220,153,.13), rgba(89,201,223,.05)); }
.keyword-row.selected-keyword-row td { border-top-color: rgba(89,220,153,.35); }
.keyword-row.selected-keyword-row .keyword-name strong::after { content: "選択中"; display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: rgba(89,220,153,.12); color: var(--mint); font-size: 10px; vertical-align: middle; }
.keyword-name { min-width: 220px; }
.keyword-name strong { display: block; color: var(--text); }
.keyword-name small { display: block; margin-top: 4px; color: var(--muted); }
.rate-cell { min-width: 130px; }
.rate-cell strong { color: var(--mint); }
.cell-track { width: 76px; height: 4px; display: inline-block; margin-left: 8px; overflow: hidden; vertical-align: middle; background: #20313a; border-radius: 4px; }
.cell-track span { display: block; height: 100%; background: var(--mint); }
.provider-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: #12352c; color: var(--mint); font-size: 10px; font-weight: 800; }
.provider-icon.gemini { background: #102d38; color: var(--cyan); }
.provider-icon.claude { background: #35271a; color: #f0bd7a; }
.muted-provider { color: var(--faint); }
.trend-up { color: var(--mint); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--muted); }
.ranking-board { overflow: hidden; }
.ranking-select select { min-width: 260px; }
.rank-pill { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #10212a; color: var(--cyan); font-weight: 900; }
.self-row { background: linear-gradient(90deg, rgba(89,220,153,.12), rgba(89,201,223,.04)); }
.self-row td { border-top-color: rgba(89,220,153,.34); }
.company-cell strong { display: block; color: var(--text); }
.company-cell small { display: inline-block; margin-top: 5px; padding: 2px 7px; border: 1px solid rgba(89,220,153,.25); border-radius: 999px; color: var(--mint); font-size: 10px; font-weight: 800; }
.ranking-board td { line-height: 1.7; }
.ranking-board th:nth-child(4), .ranking-board td:nth-child(4) { min-width: 190px; }
.ranking-board th:nth-child(5), .ranking-board td:nth-child(5) { min-width: 360px; }
.ranking-board th:nth-child(6), .ranking-board td:nth-child(6) { min-width: 170px; }
.ai-view-cell { color: #dbe8e9; line-height: 1.75; }
.ai-view-cell strong { display: block; color: var(--mint); margin-bottom: 5px; }
.ai-view-cell p { margin: 0 0 6px; }
.ai-view-cell small { display: block; margin: 6px 0; color: #b8c9ce; }
.ai-view-cell em { display: block; color: var(--muted); font-style: normal; font-size: 11px; }
.citation-links { display: grid; gap: 4px; min-width: 150px; }
.citation-links a { display: block; max-width: 220px; overflow: hidden; color: var(--cyan); text-overflow: ellipsis; white-space: nowrap; }
.lower-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 12px; }
.compact-table th, .compact-table td { padding: 10px 13px; }
.citation-list { display: grid; }
.citation-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 70px; gap: 15px; align-items: center; min-height: 62px; padding: 10px 16px; border-top: 1px solid var(--border-soft); }
.citation-row:first-child { border-top: 0; }
.citation-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citation-row a { display: block; margin-top: 4px; overflow: hidden; color: var(--cyan); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.citation-row span { color: var(--muted); font-size: 11px; text-align: right; }

.measure-dialog { width: min(680px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 26px 80px rgba(0,0,0,.55); }
.measure-dialog::backdrop { background: rgba(2,8,12,.8); backdrop-filter: blur(3px); }
.dialog-shell { display: grid; }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; padding: 20px; border-bottom: 1px solid var(--border-soft); }
.dialog-header h2 { margin: 0 0 6px; font-size: 20px; }
.dialog-header p { margin: 0; color: var(--muted); }
.measurement-notice { display: flex; gap: 10px; margin: 16px 20px 0; padding: 12px; border-left: 3px solid var(--cyan); background: #0b2028; color: #bfd0d5; line-height: 1.6; }
.measurement-notice svg { flex: 0 0 auto; width: 17px; margin-top: 2px; color: var(--cyan); }
.measurement-notice p { margin: 0; font-size: 12px; }
.keyword-checklist { max-height: 360px; display: grid; gap: 7px; padding: 16px 20px; overflow-y: auto; }
.keyword-option { min-height: 48px; display: grid; grid-template-columns: 18px 1fr auto; gap: 11px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 6px; }
.keyword-option:hover { border-color: #3d5b67; background: var(--surface-2); }
.keyword-option input { accent-color: var(--mint); }
.keyword-option small { color: var(--muted); }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 16px 20px; border-top: 1px solid var(--border-soft); }
.dialog-actions > span:first-child { margin-right: auto; color: var(--muted); font-size: 12px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.measure-progress { display: grid; gap: 12px; margin: 0 20px 16px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 7px; background: #081820; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #cfe0e3; }
.progress-head span { color: var(--muted); font-size: 12px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #1c2b33; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--mint), var(--cyan)); transition: width .25s ease; }
.provider-progress-list { display: grid; gap: 7px; }
.provider-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--border-soft); border-radius: 6px; color: #c8d6d9; font-size: 12px; }
.provider-progress-row strong { font-size: 11px; color: var(--muted); text-align: right; }
.provider-progress-row.running { border-color: rgba(89,201,223,.5); background: rgba(89,201,223,.08); }
.provider-progress-row.running strong { color: var(--cyan); }
.provider-progress-row.done { border-color: rgba(89,220,153,.45); background: rgba(89,220,153,.08); }
.provider-progress-row.done strong { color: var(--mint); }
.provider-progress-row.error { border-color: rgba(239,118,109,.5); background: rgba(239,118,109,.08); }
.provider-progress-row.error strong { color: var(--danger); }
.dialog-field { display: grid; gap: 8px; padding: 22px 20px; }
.dialog-field span { font-weight: 700; }
.dialog-field input { height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; outline: 0; background: #08131a; color: var(--text); }
.dialog-field input:focus { border-color: var(--mint); }
.settings-dialog { width: min(760px, calc(100vw - 32px)); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--border-soft); }
.settings-grid .dialog-field { padding-bottom: 18px; }
.keyword-settings { display: grid; gap: 13px; padding: 18px 20px; }
.keyword-settings strong { display: block; }
.keyword-settings small { display: block; margin-top: 4px; color: var(--muted); }
#settingsKeywordFields { display: grid; gap: 9px; }
.keyword-setting-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; }
.keyword-setting-row span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #10212a; color: var(--mint); font-weight: 900; }
.keyword-setting-row input { height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; outline: 0; background: #08131a; color: var(--text); }
.keyword-setting-row input:focus { border-color: var(--mint); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 420px; padding: 13px 16px; border: 1px solid #2e5e4e; border-radius: 7px; background: #0e241f; color: var(--text); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #6d3535; background: #2a1517; }

@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr; }
  .share-content { grid-template-columns: 170px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .monitor-shell { display: block; }
  .monitor-main { grid-column: auto; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 45px rgba(0,0,0,.45); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text); }
  .company-select { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .lower-grid { grid-template-columns: 1fr; }
  .provider-status { display: none; }
}

@media (max-width: 620px) {
  .monitor-header { height: 62px; padding: 0 12px; }
  .monitor-header .select-control { display: none; }
  .data-state { display: none; }
  .primary-button { padding: 0 12px; }
  .dashboard { padding: 18px 12px 30px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 23px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 125px; padding: 14px; }
  .metric-value strong { font-size: 29px; }
  .metric-label { font-size: 12px; }
  .metric-card:nth-child(5) { grid-column: 1 / -1; }
  .chart-wrap { height: 235px; padding-left: 5px; }
  .legend { display: none; }
  .share-content { grid-template-columns: 118px 1fr; gap: 13px; padding: 18px 12px; }
  .donut { width: 115px; }
  .donut::before { width: 70px; }
  .donut strong { font-size: 18px; }
  .aira-insight { grid-template-columns: minmax(0, 1fr) 70px; padding: 14px; }
  .aira-insight img { width: 92px; margin-left: -8px; }
  .table-heading { align-items: flex-start; flex-direction: column; }
  .table-tools { width: 100%; flex-wrap: wrap; }
  .provider-tabs { width: 100%; }
  .provider-tabs button { flex: 1; min-width: 0; }
  .search-box { flex: 1; width: auto; }
  .secondary-button { padding: 0 10px; }
  th, td { padding: 10px 11px; }
  .citation-row { grid-template-columns: minmax(0, 1fr) 58px; }
  .citation-row span:last-child { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .ranking-select, .ranking-select select { width: 100%; min-width: 0; }
}

@media print {
  .sidebar, .monitor-header, .table-tools, .aira-insight img { display: none !important; }
  .monitor-shell { display: block; }
  .monitor-main { grid-column: auto; }
  .dashboard { max-width: none; padding: 0; }
  body { background: #fff; color: #111; }
  .panel, .metric-card, .aira-insight { break-inside: avoid; }
}
