:root {
  color-scheme: light;
  --paper: #f5f5f1;
  --surface: #fff;
  --surface-soft: #f9faf7;
  --ink: #17241f;
  --ink-soft: #4f5d56;
  --muted: #55625a;
  --line: #e0e4df;
  --line-strong: #cdd5cf;
  --green: #1d5a42;
  --green-deep: #174532;
  --green-pale: #e7f0e9;
  --orange: #ad582c;
  --orange-pale: #fbede2;
  --red: #a8473c;
  --red-pale: #fae9e6;
  --blue: #496b82;
  --blue-pale: #e9f0f3;
  --shadow-drawer: -16px 0 52px rgb(16 34 25 / 14%);
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-data: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { color: #fff; background: var(--green); }
:focus-visible { outline: 3px solid #b66a3b; outline-offset: 2px; }
.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; }

.app-body { background: var(--paper); }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 96%); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: inline-flex; align-items: end; gap: 2px; width: 25px; height: 25px; padding: 4px; border: 1px solid var(--green); border-radius: 2px; background: var(--green); }
.brand-mark span { display: block; flex: 1; background: #d8e9d9; border-radius: 1px 1px 0 0; }
.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 12px; }
.brand-mark span:nth-child(3) { height: 16px; background: #e89a5f; }
.brand-copy { display: grid; gap: 0; line-height: 1.1; }
.brand-copy strong { font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-family: var(--font-data); font-size: 8px; letter-spacing: .13em; }
.topbar-right { display: flex; align-items: center; gap: 15px; min-width: 0; color: var(--ink-soft); font-size: 12px; }
.header-sync { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.header-sync > span:last-child { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #9aa39c; }
.status-dot[data-state="running"] { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-pale); animation: pulse 1.8s ease-in-out infinite; }
.status-dot[data-state="success"] { background: #438260; }
.status-dot[data-state="partial"], .status-dot[data-state="error"], .status-dot[data-state="interrupted"] { background: var(--red); }
.header-divider { width: 1px; height: 19px; background: var(--line); }
.account-label { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 214px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.sidebar { position: sticky; top: 66px; display: flex; flex-direction: column; align-self: start; height: calc(100vh - 66px); min-height: 500px; padding: 25px 13px 18px; border-right: 1px solid var(--line); background: #f1f2ed; }
.nav-caption { margin: 0 13px 10px; color: #8b948d; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #55625a; cursor: pointer; text-align: left; transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span:nth-of-type(1) { flex: 1; }
.nav-item:hover { background: rgb(255 255 255 / 68%); color: var(--green-deep); }
.nav-item.is-active { border-color: #d4dfd6; background: #fff; color: var(--green-deep); box-shadow: 0 1px 2px rgb(30 58 41 / 4%); font-weight: 650; }
.nav-count { padding: 1px 6px; border-radius: 2px; background: #eff2ed; color: #637168; font-family: var(--font-data); font-size: 10px; font-weight: 500; }
.sidebar-foot { margin-top: auto; padding: 0 13px 7px; color: #67746b; font-size: 11px; }
.sidebar-foot-rule { display: block; width: 22px; height: 2px; margin-bottom: 12px; background: var(--orange); }
.sidebar-foot p { margin: 0 0 5px; color: #47554c; }
.sidebar-foot-sub { display: block; color: #8b948d; font-size: 10px; }
.main-content { width: 100%; max-width: 1560px; min-width: 0; margin: 0 auto; padding: 28px 36px 20px; }
.overview-strip { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(420px, auto) auto; align-items: center; gap: 26px; min-height: 99px; padding: 0 0 21px; border-bottom: 1px solid var(--line-strong); }
.overview-heading { align-self: center; }
.eyebrow { display: block; color: #738078; font-size: 10px; font-weight: 700; letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.overview-heading h1 { margin: 4px 0 0; font-size: clamp(22px, 2vw, 28px); font-weight: 680; letter-spacing: -.045em; line-height: 1.2; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(88px, 1fr)); gap: 0; }
.metric { display: grid; gap: 5px; min-width: 0; padding: 2px 17px; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric strong { color: var(--ink); font-family: var(--font-data); font-size: 18px; font-weight: 600; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-time strong { font-family: var(--font-ui); font-size: 12px; letter-spacing: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 13px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: 650; text-decoration: none; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease; white-space: nowrap; }
.button:active { transform: translateY(1px); }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { border-color: var(--green); background: var(--green); color: #fff; }
.button-primary:hover { border-color: var(--green-deep); background: var(--green-deep); }
.button-primary:disabled { border-color: #80968a; background: #80968a; cursor: wait; }
.button-outline { min-height: 33px; border-color: var(--line-strong); background: #fff; color: #34473d; }
.button-outline:hover { border-color: var(--green); background: var(--green-pale); color: var(--green-deep); }
.button-quiet { border-color: transparent; background: transparent; color: #54645a; }
.button-quiet:hover { border-color: var(--line); background: #f4f6f2; color: var(--ink); }
.button-small { min-height: 30px; padding: 0 9px; font-size: 11px; }
.sync-button { min-width: 112px; }
.sync-button svg { transition: transform .45s ease; }
.sync-button.is-busy svg { animation: rotate 1.2s linear infinite; }
.sync-progress { display: flex; align-items: center; gap: 12px; min-height: 42px; margin: 14px 0 -3px; padding: 8px 12px; border: 1px solid #ead9c9; background: #fffaf4; color: #6d4b33; font-size: 11px; }
.progress-spinner { width: 12px; height: 12px; flex: 0 0 12px; border: 1.5px solid #e2c2a3; border-top-color: var(--orange); border-radius: 50%; animation: rotate .8s linear infinite; }
.progress-copy { overflow: hidden; min-width: 120px; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { display: block; width: min(210px, 24vw); height: 4px; overflow: hidden; margin-left: auto; border-radius: 3px; background: #efdfd1; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .35s ease; }
.progress-count { min-width: 58px; color: #8c6348; font-family: var(--font-data); font-size: 10px; text-align: right; }
.notice-banner { position: relative; display: flex; align-items: flex-start; gap: 9px; margin: 13px 0 0; padding: 10px 38px 10px 11px; border: 1px solid var(--line); background: #fff; color: #46564c; font-size: 12px; }
.notice-banner[data-tone="error"] { border-color: #e9c5c0; background: #fff8f6; color: #773c34; }
.notice-icon { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; border-radius: 50%; background: var(--blue-pale); color: var(--blue); font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.notice-banner[data-tone="error"] .notice-icon { background: var(--red-pale); color: var(--red); }
.notice-dismiss { position: absolute; top: 5px; right: 5px; }
.view-panel { min-width: 0; padding-top: 24px; }
.view-panel.is-visible { animation: reveal .18s ease-out; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-heading h2 { margin: 4px 0 0; font-size: 17px; font-weight: 670; letter-spacing: -.025em; }
.section-actions { display: flex; align-items: center; gap: 14px; }
.result-count { color: #68756d; font-size: 11px; font-variant-numeric: tabular-nums; }
.filter-bar { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 11px; padding: 9px; border: 1px solid var(--line); background: #fbfcfa; }
.search-field { display: flex; align-items: center; gap: 8px; width: min(355px, 34vw); min-width: 205px; height: 34px; padding: 0 9px; border: 1px solid var(--line); background: #fff; }
.search-field:focus-within { border-color: #819d8a; box-shadow: 0 0 0 2px rgb(29 90 66 / 9%); }
.search-field svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: #7b8880; stroke-width: 1.5; stroke-linecap: round; }
.search-field input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: #939c95; }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
kbd { flex: 0 0 auto; padding: 1px 4px; border: 1px solid #e4e8e3; background: #f8f9f7; color: #8c968e; font-family: var(--font-ui); font-size: 9px; }
.filter-control { position: relative; display: block; min-width: 102px; }
.filter-control select, .page-size-control select { width: 100%; height: 34px; padding: 0 25px 0 9px; appearance: none; border: 1px solid var(--line); border-radius: 0; background: #fff; color: #58645c; cursor: pointer; font-size: 11px; }
.filter-control::after { position: absolute; top: 12px; right: 9px; width: 6px; height: 6px; border-right: 1px solid #78847b; border-bottom: 1px solid #78847b; content: ""; pointer-events: none; transform: rotate(45deg); }
.filter-control select:focus-visible, .page-size-control select:focus-visible { outline-offset: 1px; }
.filter-reset { min-height: 30px; margin-left: auto; padding: 0 5px; border: 0; background: transparent; color: #718077; cursor: pointer; font-size: 11px; }
.filter-reset:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.active-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -1px 0 10px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid #dfe5df; background: #fff; color: #58665d; font-size: 10px; }
.filter-chip button { padding: 0; border: 0; background: transparent; color: #78837b; cursor: pointer; font-size: 13px; line-height: 1; }
.table-frame { position: relative; width: 100%; overflow: auto; border: 1px solid var(--line); background: var(--surface); scrollbar-color: #c4ccc5 #f5f7f4; scrollbar-width: thin; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.keyword-table { min-width: 890px; }
.batch-table { min-width: 820px; }
.runs-table { min-width: 860px; }
.data-table thead { background: #f7f8f5; }
.data-table th { height: 39px; padding: 0 13px; border-bottom: 1px solid var(--line); color: #77827a; font-size: 10px; font-weight: 650; letter-spacing: .025em; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { padding-left: 16px; }
.data-table td { height: 53px; padding: 8px 13px; border-bottom: 1px solid #edf0ec; color: #46534b; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .12s ease; }
.data-table tbody tr:hover { background: #f9fbf8; }
.data-table th.numeric, .data-table td.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.data-table th.numeric button { justify-content: flex-end; }
.data-table .sortable { padding: 0; }
.data-table .sortable button { display: flex; align-items: center; gap: 7px; width: 100%; height: 39px; padding: 0 13px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: inherit; font-weight: inherit; letter-spacing: inherit; white-space: nowrap; }
.data-table .sortable button:hover { color: var(--green-deep); }
.data-table .sortable[aria-sort="ascending"] button, .data-table .sortable[aria-sort="descending"] button { color: var(--green); }
.sort-mark { color: #a5ada7; font-family: var(--font-data); font-size: 11px; }
.sortable[aria-sort="ascending"] .sort-mark::after { content: "↑"; }
.sortable[aria-sort="descending"] .sort-mark::after { content: "↓"; }
.sortable[aria-sort="ascending"] .sort-mark, .sortable[aria-sort="descending"] .sort-mark { font-size: 0; }
.sortable[aria-sort="ascending"] .sort-mark::after, .sortable[aria-sort="descending"] .sort-mark::after { font-size: 11px; }
.keyword-name { display: block; max-width: 270px; overflow: hidden; color: #24342b; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.keyword-meta { display: block; max-width: 270px; margin-top: 3px; overflow: hidden; color: #949d96; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.row-link { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.row-link:hover .keyword-name { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.taxonomy { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.taxonomy-item { color: #69756c; font-size: 10px; }
.taxonomy-separator { color: #c0c7c1; font-size: 9px; }
.value-data { color: #36473d; font-family: var(--font-data); font-size: 11px; font-variant-numeric: tabular-nums; }
.value-empty { color: #a0a8a2; }
.growth-value { color: #4d795c; }
.growth-value.is-negative { color: #9a6b53; }
.verdict-badge, .trend-badge, .state-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 145px; padding: 3px 7px; overflow: hidden; border: 1px solid #e0e7e0; background: #f3f7f3; color: #466650; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.verdict-badge[data-tone="good"] { border-color: #d5e4d8; background: var(--green-pale); color: #315f40; }
.verdict-badge[data-tone="warn"] { border-color: #efdfd2; background: var(--orange-pale); color: #8d512e; }
.verdict-badge[data-tone="bad"] { border-color: #efd7d3; background: var(--red-pale); color: #91473e; }
.verdict-badge[data-tone="neutral"], .state-badge[data-tone="neutral"] { border-color: #e1e5e1; background: #f4f5f3; color: #6d7770; }
.trend-badge { border-color: transparent; background: transparent; color: #6e7c72; padding-left: 0; }
.mini-spark { display: block; width: 70px; height: 22px; overflow: visible; }
.mini-spark polyline { fill: none; stroke: #669070; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mini-spark.is-empty { color: #a2aaa4; font-size: 10px; }
.batch-id, .run-id { color: #4f6156; font-family: var(--font-data); font-size: 10px; }
.table-time { display: block; color: #4d5b52; font-size: 10px; white-space: nowrap; }
.table-subtime { display: block; margin-top: 2px; color: #9aa29c; font-family: var(--font-data); font-size: 9px; }
.external-cell { display: inline-block; max-width: 185px; overflow: hidden; color: #527264; text-overflow: ellipsis; white-space: nowrap; }
.external-cell:hover { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 2px; background: transparent; color: #78837b; cursor: pointer; font-size: 21px; font-weight: 300; line-height: 1; }
.icon-button:hover { border-color: var(--line); background: #f8faf7; color: var(--ink); }
.open-detail { color: #87958a; font-size: 16px; }
.clickable-row { cursor: pointer; }
.clickable-row:focus-within { outline: 2px solid #91ad98; outline-offset: -2px; }
.table-state { display: grid; min-height: 208px; place-content: center; justify-items: center; padding: 28px; color: #737f76; text-align: center; }
.table-state-icon { display: grid; width: 38px; height: 38px; margin-bottom: 13px; place-items: center; border: 1px solid #dce4dd; color: #60806a; font-family: var(--font-data); font-size: 17px; }
.table-state strong { margin-bottom: 5px; color: #45554a; font-size: 12px; font-weight: 650; }
.table-state p { max-width: 370px; margin: 0; color: #869189; font-size: 11px; line-height: 1.6; }
.table-state-action { margin-top: 12px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 53px; color: #7d8981; font-size: 10px; }
.table-footer-note { font-size: 10px; }
.page-size-control { display: inline-flex; align-items: center; gap: 7px; }
.page-size-control select { width: auto; height: 27px; padding: 0 20px 0 7px; font-size: 10px; }
.pagination { display: flex; align-items: center; justify-content: end; gap: 4px; }
.page-button { display: grid; min-width: 28px; height: 27px; place-items: center; padding: 0 7px; border: 1px solid transparent; background: transparent; color: #66736a; cursor: pointer; font-family: var(--font-data); font-size: 10px; }
.page-button:hover:not(:disabled) { border-color: var(--line); background: #fff; color: var(--green); }
.page-button.is-current { border-color: #ceddd1; background: #fff; color: var(--green-deep); font-weight: 700; }
.page-button:disabled { color: #bac1bb; cursor: default; }
.page-ellipsis { padding: 0 3px; color: #a1aaa3; font-family: var(--font-data); font-size: 10px; }
.batch-filter-bar { margin-bottom: 13px; }
.batch-filter-bar .search-field { width: min(410px, 50vw); }
.runs-table td:nth-child(7) { max-width: 300px; color: #865244; }
.state-badge { padding: 3px 8px; }
.state-badge[data-tone="success"] { border-color: #d5e4d8; background: var(--green-pale); color: #315f40; }
.state-badge[data-tone="running"] { border-color: #efdfd2; background: var(--orange-pale); color: #8d512e; }
.state-badge[data-tone="error"], .state-badge[data-tone="partial"], .state-badge[data-tone="interrupted"] { border-color: #efd7d3; background: var(--red-pale); color: #91473e; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: #9aa29c; font-size: 9px; }
.page-footer span:first-child { font-family: var(--font-data); letter-spacing: .08em; }

.drawer-backdrop { position: fixed; z-index: 20; inset: 0; background: rgb(13 26 19 / 31%); animation: fade-in .15s ease-out; }
.detail-drawer { position: fixed; z-index: 21; top: 0; right: 0; display: flex; flex-direction: column; width: min(510px, calc(100vw - 24px)); height: 100dvh; border-left: 1px solid #d7ded8; background: #fff; box-shadow: var(--shadow-drawer); animation: slide-in .2s ease-out; outline: 0; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 15px 21px; border-bottom: 1px solid var(--line); background: #fbfcfa; }
.drawer-meta { margin: 5px 0 0; color: #7c8980; font-family: var(--font-data); font-size: 10px; }
.drawer-close { width: 34px; height: 34px; font-size: 24px; }
.drawer-content { min-height: 0; overflow-y: auto; padding: 22px 24px 32px; scrollbar-color: #c4ccc5 #f5f7f4; scrollbar-width: thin; }
.drawer-loading, .drawer-error { display: grid; min-height: 180px; place-content: center; color: #849087; font-size: 12px; text-align: center; }
.drawer-keyword { margin: 0 0 11px; color: #1a2a22; font-size: 24px; font-weight: 680; letter-spacing: -.04em; line-height: 1.3; overflow-wrap: anywhere; }
.drawer-taxonomy { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 19px; }
.drawer-taxonomy span { padding: 3px 7px; border: 1px solid var(--line); color: #68766c; font-size: 10px; }
.drawer-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 22px; border: 1px solid var(--line); background: #fafbf9; }
.drawer-stat { min-width: 0; padding: 11px 12px; border-left: 1px solid var(--line); }
.drawer-stat:first-child { border-left: 0; }
.drawer-stat span { display: block; margin-bottom: 5px; color: #89938b; font-size: 10px; }
.drawer-stat strong { display: block; overflow: hidden; color: #33463a; font-family: var(--font-data); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.drawer-section { margin-top: 22px; }
.drawer-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: #32463a; font-size: 12px; font-weight: 680; }
.drawer-section-title::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.brief-grid { display: grid; gap: 12px; }
.brief-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
.brief-item dt { color: #8a948c; font-size: 10px; }
.brief-item dd { margin: 0; color: #4c5a50; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.reason-list, .source-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reason-list li { position: relative; padding-left: 13px; color: #57665b; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.reason-list li::before { position: absolute; top: .65em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); content: ""; }
.suggestion-box { padding: 11px 12px; border-left: 2px solid #d18a58; background: #fff9f4; color: #73523b; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-spark-wrap { padding: 7px 2px 0; }
.detail-spark { display: block; width: 100%; height: 76px; overflow: visible; }
.detail-spark .spark-grid { stroke: #e9ede8; stroke-width: 1; }
.detail-spark .spark-area { fill: rgb(72 126 88 / 8%); }
.detail-spark .spark-line { fill: none; stroke: #4c815a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.detail-spark .spark-point { fill: #fff; stroke: #4c815a; stroke-width: 1.5; }
.spark-legend { display: flex; justify-content: space-between; margin-top: 4px; color: #9aa39c; font-family: var(--font-data); font-size: 9px; }
.source-list a, .detail-page-link { color: #47745c; font-size: 11px; text-decoration: underline; text-decoration-color: #c7d8ca; text-underline-offset: 3px; overflow-wrap: anywhere; }
.source-list a:hover, .detail-page-link:hover { color: var(--green-deep); text-decoration-color: var(--green); }
.detail-page-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; }
.detail-page-link::after { content: "↗"; }
.drawer-empty { color: #9aa39c; font-size: 11px; }
body.drawer-open { overflow: hidden; }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: var(--paper); }
.login-shell { position: relative; display: grid; grid-template-columns: 1fr; width: min(100%, 420px); min-height: 548px; padding: 30px 0 18px; }
.login-shell::before { position: absolute; z-index: 0; top: 85px; left: 50%; width: 430px; height: 356px; border: 1px solid #e6e8e2; content: ""; pointer-events: none; transform: translateX(-50%); }
.login-brand { z-index: 1; width: fit-content; align-self: start; }
.login-content { z-index: 1; width: 100%; margin: 71px auto 0; padding: 0 34px; }
.login-content h1 { margin: 7px 0 8px; color: #1a2921; font-size: 25px; font-weight: 680; letter-spacing: -.045em; }
.login-intro { margin-bottom: 26px; color: #79847c; font-size: 12px; }
.login-form { display: grid; }
.login-form label { margin: 0 0 6px; color: #4d5b51; font-size: 11px; font-weight: 600; }
.login-form input { width: 100%; height: 42px; margin-bottom: 17px; padding: 0 11px; border: 1px solid #d6ddd7; border-radius: 2px; background: #fff; color: var(--ink); font-size: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
.login-form input:focus { border-color: #789782; outline: 0; box-shadow: 0 0 0 3px rgb(29 90 66 / 9%); }
.login-error { margin: -4px 0 12px; color: #a3453b; font-size: 11px; line-height: 1.5; }
.login-submit { justify-content: space-between; width: 100%; height: 43px; margin-top: 1px; padding: 0 14px; font-size: 12px; }
.login-submit:disabled { cursor: wait; opacity: .75; }
.button-arrow { font-size: 17px; font-weight: 400; }
.login-footnote { display: flex; align-items: center; gap: 6px; margin: 19px 0 0; color: #919a93; font-size: 10px; }
.secure-mark { color: #78927e; font-size: 8px; }
.login-footer { display: flex; align-items: center; justify-content: space-between; align-self: end; padding-top: 18px; border-top: 1px solid #e1e5df; color: #9ba39d; font-size: 9px; }
.login-footer span:first-child { font-family: var(--font-data); letter-spacing: .1em; }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgb(173 88 44 / 9%); } }
@keyframes reveal { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { opacity: .7; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1180px) {
  .main-content { padding-right: 24px; padding-left: 24px; }
  .overview-strip { grid-template-columns: minmax(130px, .8fr) minmax(370px, auto) auto; gap: 16px; }
  .metric { padding-right: 11px; padding-left: 11px; }
  .filter-bar { gap: 6px; }
  .search-field { width: min(290px, 29vw); }
  .filter-control { min-width: 91px; }
}
@media (max-width: 960px) {
  .workspace { grid-template-columns: 176px minmax(0, 1fr); }
  .main-content { padding-right: 19px; padding-left: 19px; }
  .overview-strip { grid-template-columns: minmax(130px, 1fr) auto; }
  .overview-metrics { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, 1fr); margin-top: -8px; }
  .sync-button { grid-column: 2; grid-row: 1; }
  .metric:first-child { border-left: 0; }
  .filter-bar { flex-wrap: wrap; }
  .search-field { flex: 1 1 260px; width: auto; }
  .filter-control { flex: 1 1 118px; }
  .filter-reset { margin-left: auto; }
}
@media (max-width: 700px) {
  .topbar { position: relative; height: 58px; padding: 0 14px; }
  .brand { gap: 8px; }
  .brand-mark { width: 23px; height: 23px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 7px; }
  .topbar-right { gap: 9px; font-size: 10px; }
  .header-sync { max-width: 130px; }
  .header-sync > span:last-child { max-width: 98px; }
  .header-divider, .account-label { display: none; }
  .button-small { min-height: 28px; padding: 0 7px; font-size: 10px; }
  .workspace { display: flex; flex-direction: column; min-height: calc(100vh - 58px); }
  .sidebar { position: relative; top: auto; display: block; width: 100%; height: auto; min-height: 0; padding: 0 10px; border-right: 0; border-bottom: 1px solid var(--line); background: #f1f2ed; }
  .nav-caption, .sidebar-foot { display: none; }
  .primary-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-item { position: relative; flex: 0 0 auto; width: auto; min-height: 46px; gap: 7px; padding: 0 12px; border: 0; border-radius: 0; font-size: 11px; }
  .nav-item.is-active { background: transparent; box-shadow: none; }
  .nav-item.is-active::after { position: absolute; right: 11px; bottom: -1px; left: 11px; height: 2px; background: var(--green); content: ""; }
  .nav-item svg { width: 15px; height: 15px; }
  .nav-count { padding: 1px 4px; font-size: 9px; }
  .main-content { padding: 18px 14px 16px; }
  .overview-strip { grid-template-columns: minmax(0, 1fr) auto; gap: 13px 9px; min-height: 0; padding-bottom: 16px; }
  .overview-heading h1 { font-size: 22px; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; grid-row: 2; margin-top: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .metric { padding: 8px 8px 8px 10px; border-left: 1px solid var(--line); }
  .metric:nth-child(odd) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric strong { font-size: 15px; }
  .metric-time strong { font-size: 10px; }
  .sync-button { grid-column: 2; grid-row: 1; min-width: 96px; min-height: 34px; padding: 0 8px; font-size: 10px; }
  .sync-button svg { width: 14px; }
  .sync-progress { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .progress-copy { flex: 1; min-width: 110px; }
  .progress-track { order: 4; width: calc(100% - 68px); margin-left: 20px; }
  .progress-count { order: 5; }
  .view-panel { padding-top: 19px; }
  .section-heading { align-items: center; margin-bottom: 12px; }
  .section-heading h2 { font-size: 15px; }
  .section-actions { gap: 8px; }
  .result-count { font-size: 10px; }
  .button-outline { min-height: 31px; padding: 0 8px; font-size: 10px; }
  .button-outline svg { width: 14px; }
  .filter-bar { gap: 6px; padding: 7px; }
  .search-field { flex-basis: 100%; width: 100%; height: 36px; }
  .search-field kbd { display: none; }
  .filter-control { flex: 1 1 calc(50% - 4px); min-width: calc(50% - 4px); }
  .filter-control select { height: 32px; font-size: 10px; }
  .filter-control::after { top: 11px; }
  .filter-reset { min-height: 30px; margin-left: auto; font-size: 10px; }
  .active-filter-row { margin-top: 0; }
  .table-frame { margin-right: -1px; margin-left: -1px; width: calc(100% + 2px); }
  .keyword-table { min-width: 800px; }
  .batch-table { min-width: 730px; }
  .runs-table { min-width: 790px; }
  .data-table th { height: 36px; padding-right: 9px; padding-left: 9px; font-size: 9px; }
  .data-table td { height: 50px; padding: 7px 9px; font-size: 10px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 11px; }
  .data-table .sortable button { height: 36px; padding-right: 9px; padding-left: 9px; font-size: 9px; }
  .table-footer { min-height: 48px; }
  .table-footer-note { max-width: 42%; }
  .page-button { min-width: 26px; height: 26px; padding: 0 5px; }
  .page-footer { margin-top: 10px; }
  .drawer-header { min-height: 70px; padding: 12px 16px; }
  .drawer-content { padding: 18px 17px 28px; }
  .drawer-keyword { font-size: 21px; }
  .login-body { padding: 18px; }
  .login-shell { min-height: 520px; padding-top: 22px; }
  .login-shell::before { top: 73px; width: min(100%, 430px); height: 348px; }
  .login-content { margin-top: 68px; padding: 0 25px; }
}
@media (max-width: 380px) {
  .topbar { padding-right: 10px; padding-left: 10px; }
  .header-sync { max-width: 104px; }
  .header-sync > span:last-child { max-width: 75px; }
  .main-content { padding-right: 10px; padding-left: 10px; }
  .nav-item { padding-right: 9px; padding-left: 9px; }
  .sync-button { min-width: 88px; }
  .overview-heading h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-dot[data-state="running"] { animation: none; box-shadow: 0 0 0 3px var(--orange-pale); }
  .sync-button.is-busy svg, .progress-spinner { animation: none; }
  .view-panel.is-visible, .drawer-backdrop, .detail-drawer { animation: none; opacity: 1; transform: none; }
  .progress-track span, .nav-item, .button, .sync-button svg { transition: none; }
}

/* Keep operational values readable without changing the compact desktop layout. */
.metric span, .result-count, .search-field input, .filter-control select, .filter-reset,
.data-table td, .keyword-meta, .taxonomy-item, .value-data, .verdict-badge, .trend-badge,
.state-badge, .batch-id, .run-id, .table-time, .table-subtime, .external-cell,
.table-state p, .table-state strong, .table-footer, .table-footer-note, .page-button,
.page-size-control select, .progress-copy, .progress-count, .notice-banner,
.drawer-meta, .drawer-stat span, .drawer-stat strong, .brief-item dt, .brief-item dd,
.reason-list li, .suggestion-box, .source-list a, .detail-page-link, .drawer-empty {
  font-size: 12px;
}
.data-table th { font-size: 11px; }
.keyword-name { font-size: 14px; }
.sidebar-foot, .sidebar-foot-sub { font-size: 12px; }
.table-state strong, .section-heading h2 { font-size: 14px; }
.filter-chip { font-size: 12px; }
.button { font-size: 13px; }
.button-small { font-size: 12px; }
.schedule-note { margin: 5px 0 0; color: #738078; font-size: 12px; line-height: 1.3; }
.sync-alert { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 11px 13px; border: 1px solid #e7c4bd; background: #fff7f5; color: #783f36; font-size: 13px; line-height: 1.55; }
.sync-alert[hidden] { display: none !important; }
.sync-alert[data-tone="partial"] { border-color: #ead7bd; background: #fffaf1; color: #735536; }
.sync-alert-mark { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border-radius: 50%; background: #f3ded9; color: #9b483c; font-size: 12px; font-weight: 700; }
.sync-alert[data-tone="partial"] .sync-alert-mark { background: #f3e7cf; color: #8a6337; }

/* Secondary information stays readable on the paper, table, and drawer surfaces. */
.nav-caption, .sidebar-foot-sub, .eyebrow, .schedule-note, .metric span,
.result-count, .filter-reset, .data-table th, .keyword-meta, .taxonomy-item,
.taxonomy-separator, .trend-badge, .sort-mark, .value-empty, .mini-spark.is-empty,
.table-subtime, .table-state, .table-state p, .table-footer, .table-footer-note,
.page-footer, .progress-count, .kbd, .search-field input::placeholder,
.drawer-meta, .drawer-loading, .drawer-error, .drawer-taxonomy span,
.drawer-stat span, .brief-item dt, .spark-legend, .drawer-empty,
.icon-button, .open-detail, .login-intro, .login-footnote, .login-footer {
  color: var(--muted);
}
.eyebrow, .nav-caption { font-size: 12px; }
.brand-copy small { font-size: 10px; }
.nav-count { color: var(--muted); font-size: 11px; }
.kbd { font-size: 10px; }
.mini-spark.is-empty { font-size: 12px; }
.spark-legend { font-size: 12px; }
.page-footer, .login-footer { font-size: 12px; }
.sidebar-foot, .table-state-icon,
.verdict-badge[data-tone="neutral"], .state-badge[data-tone="neutral"],
.filter-chip button, .page-ellipsis {
  color: var(--muted);
}
.growth-value.is-negative { color: #8a5b45; }

@media (max-width: 700px) {
  .metric span, .result-count, .filter-control select, .filter-reset, .table-footer,
  .table-footer-note, .page-size-control select, .progress-copy, .progress-count,
  .drawer-meta, .drawer-stat span, .brief-item dt, .brief-item dd, .drawer-empty { font-size: 12px; }
  .metric-time strong { font-size: 12px; }
  .keyword-name { font-size: 13px; }
  .keyword-meta, .taxonomy-item, .value-data, .verdict-badge, .trend-badge,
  .state-badge, .batch-id, .run-id, .table-time, .table-subtime, .external-cell { font-size: 12px; }
  .data-table th, .data-table .sortable button { font-size: 11px; }
  .data-table td { font-size: 13px; }
  .nav-item { font-size: 12px; }
  .sync-button, .button-outline, .button-small { font-size: 12px; }
  .overview-metrics { min-width: 0; }
  .table-footer { flex-wrap: wrap; padding: 7px 0; }
  .pagination { margin-left: auto; }
  .page-button[data-page] { display: none; }
  .page-button[data-page][aria-current="page"] { display: grid; }
  .page-ellipsis { display: none; }
  .button, .button-small, .button-outline, .filter-reset, .icon-button, .page-button,
  .filter-control select, .page-size-control select, .search-field,
  .data-table .sortable button, .filter-chip button {
    min-height: 44px;
  }
  .button, .button-small, .button-outline, .filter-reset, .icon-button, .page-button,
  .filter-chip button { min-width: 44px; }
  .row-link { min-height: 44px; }
  .page-button { min-width: 44px; }
  .icon-button { width: 44px; }
  .filter-chip button { min-width: 44px; }
  .data-table th, .data-table .sortable button { height: 44px; }
  .search-field input { font-size: 13px; }
  .login-form input { min-height: 44px; }
  .filter-chip { min-height: 44px; }
  .drawer-close { min-height: 44px; }
  .sync-alert { font-size: 12px; }
}
