:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #17201a;
  --muted: #617067;
  --line: #dce2dd;
  --brand: #1f6f50;
  --brand-dark: #15543c;
  --ok: #18794e;
  --warn: #9a6700;
  --error: #b42318;
}

@page { size: A4 landscape; margin: 12mm; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header { height: 62px; padding: 0 max(24px, calc((100% - 1180px)/2)); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.tool-tabs { padding: 0 max(24px, calc((100% - 1180px)/2)); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; gap: 26px; }
.tool-tabs a, .tool-tabs span { position: relative; padding: 13px 2px 11px; color: var(--muted); font-weight: 600; }
.tool-tabs a.active { color: var(--text); }
.tool-tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); }
.tool-tabs span { opacity: .55; }
.brand { color: var(--text); font-size: 18px; font-weight: 700; }
nav { display: flex; align-items: center; gap: 22px; }
main { max-width: 1180px; margin: 0 auto; padding: 34px 24px 60px; }
.analysis-main { max-width: 1460px; }
.tasks-main { max-width: 1600px; }
#task-table { table-layout: fixed; min-width: 1320px; }
#task-table .task-col-name { width: 25%; }
#task-table .task-col-created { width: 10%; }
#task-table .task-col-plan { width: 14%; }
#task-table .task-col-latest { width: 15%; }
#task-table .task-col-status { width: 12%; }
#task-table .task-col-count { width: 6%; }
#task-table .task-col-actions { width: 18%; }
#task-table td { padding: 20px 14px; line-height: 1.65; }
#task-table .subtle { font-size: 13px; margin-top: 4px; }
.task-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; overflow-wrap: anywhere; line-height: 1.5; }
.task-file { margin-top: 6px; color: var(--muted); font-size: 12px; }
.task-file summary { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.task-file summary::-webkit-details-marker { display: none; }
.task-file[open] > div { padding: 8px; margin-top: 6px; background: #f3f6f4; border-radius: 6px; overflow-wrap: anywhere; }
.task-nowrap, .task-created { white-space: nowrap; font-variant-numeric: tabular-nums; }
.task-created { color: var(--muted); font-size: 13px; }
.task-created::first-line { color: var(--text); font-size: 14px; }
.task-count { margin-top: 6px; font-size: 13px; }
.task-progress { display: block; width: 100%; height: 5px; margin-top: 8px; accent-color: var(--brand); }
.task-executions, #task-table th:nth-child(6) { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.task-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.task-actions form, .task-actions form .button { width: 100%; }
#task-table .task-actions .button { min-width: 0; text-align: center; white-space: normal; overflow-wrap: anywhere; padding: 6px; font-size: 12px; line-height: 1.5; }
.task-actions .task-view { background: #edf7f1; border-color: #cce2d4; color: var(--brand); }
footer { color: var(--muted); border-top: 1px solid var(--line); padding: 22px; text-align: center; font-size: 13px; }
h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
p { color: var(--muted); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head p { margin: 6px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.run-actions { flex: 0 0 auto; flex-wrap: nowrap; align-items: center; }
.run-actions .inline { display: inline-flex; }
.run-actions .button { white-space: nowrap; }
.inline { display: inline; margin: 0; }
.button, button { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; display: inline-block; }
.button:hover, button:hover { border-color: #a9b7ad; text-decoration: none; }
.button.primary { color: white; border-color: var(--brand); background: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.button.danger { color: var(--error); border-color: #f0b8b3; }
.button.danger:hover { background: #fef3f2; }
.button.small { padding: 5px 9px; font-size: 13px; }
.button.disabled { color: #929b95; background: #f5f6f5; cursor: not-allowed; }
.button.disabled:hover { border-color: var(--line); text-decoration: none; }
.link-button { border: 0; background: none; color: var(--brand); padding: 0; font-weight: 400; }
.panel, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.panel.narrow, .auth-card { max-width: 520px; }
.settings-panel { width: 100%; }
.settings-panel h2, .danger-zone h2 { margin-top: 0; }
.settings-summary { margin-top: 8px; }
.settings-metrics .metric strong { font-size: 17px; }
.danger-zone { width: 100%; margin-top: 22px; border-color: #f0b8b3; }
.danger-zone h2 { color: var(--error); }
.danger-zone .stack { max-width: 520px; }
.auth-card { margin: 60px auto; }
.stack { display: grid; gap: 18px; }
label { display: grid; gap: 7px; font-weight: 600; }
fieldset { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
legend { padding: 0 6px; font-weight: 700; }
fieldset label, label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 9px; }
input[type="radio"], input[type="checkbox"] { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.key-test-row { align-items: end; }
.key-test-row input, .key-test-row .button { box-sizing: border-box; height: 44px; }
.key-test-row .button { width: 100%; }
input, select { width: 100%; border: 1px solid #bfc9c2; border-radius: 8px; background: white; color: var(--text); padding: 10px 12px; font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(31,111,80,.17); border-color: var(--brand); }
.hint, .subtle { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.alert { border-radius: 8px; padding: 11px 13px; margin: 12px 0; }
.alert.error { color: #7a271a; background: #fef3f2; }
.alert.warn { color: #7a4d00; background: #fff8e1; }
.alert.success { color: #17603e; background: #eaf7f0; }
.settings-status { margin-bottom: 20px; color: var(--muted); }
.status-line { color: var(--muted); margin-bottom: 20px; }
.filter-note { margin: -10px 0 12px; color: var(--muted); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head p { margin: 4px 0 0; }
.empty.compact { padding: 28px; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--warn); }
.dot.ok { background: var(--ok); }.dot.error { background: var(--error); }
.empty { padding: 50px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed #bfc9c2; border-radius: 12px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #455249; background: #f1f4f1; font-size: 13px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcf9; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.title-cell { max-width: 420px; color: var(--muted); font-size: 13px; margin-top: 3px; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; white-space: nowrap; background: #eef1ef; }
.badge.ok { color: var(--ok); background: #eaf7f0; }.badge.warn { color: var(--warn); background: #fff7dc; }.badge.error { color: var(--error); background: #fef0ee; }
.error-text { max-width: 300px; color: var(--error); font-size: 12px; margin-top: 4px; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 245px; }
.progress { height: 4px; width: 110px; margin-top: 6px; overflow: hidden; background: #e7ebe8; border-radius: 4px; }
.progress span { display: block; height: 100%; background: var(--brand); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.metric span { display: block; color: var(--muted); font-size: 13px; }.metric strong { display: block; margin-top: 4px; font-size: 22px; }
.api-usage-panel { margin: 24px 0; }
.api-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.usage-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.usage-card h3 { margin: 0 0 14px; font-size: 16px; }
.quota-card { border-color: #bfd8c9; background: linear-gradient(145deg, #f6fcf8 0%, var(--surface) 72%); }
.api-usage-panel.quota-card { padding: 24px; }
.quota-card .section-head { margin-bottom: 20px; }
.quota-summary { margin: 16px 0 12px; color: var(--muted); }
.quota-summary strong { color: var(--text); font-variant-numeric: tabular-nums; }
.quota-meter { display: block; width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: #e4ebe7; color: var(--ok); accent-color: var(--ok); }
.quota-meter::-webkit-progress-bar { background: #e4ebe7; border-radius: 999px; }
.quota-meter::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
.quota-meter::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
.quota-meter.warn::-webkit-progress-value { background: var(--warn); }
.quota-meter.error::-webkit-progress-value { background: var(--error); }
.quota-meter.warn::-moz-progress-bar { background: var(--warn); }
.quota-meter.error::-moz-progress-bar { background: var(--error); }
.quota-card .quota-progress-label { margin-top: 8px; }
.quota-card .quota-foot { margin-top: 20px; justify-content: space-between; }
.quota-sync-error { color: var(--error); font-size: 13px; }
.quota-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.quota-hero > div > span { display: block; color: var(--muted); font-size: 13px; }
.quota-hero strong { display: block; margin-top: 4px; color: var(--text); font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.quota-hero strong small { color: var(--muted); font-size: 16px; font-weight: 650; }
.quota-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.quota-stats span { display: block; color: var(--muted); font-size: 12px; }
.quota-stats strong { display: block; margin-top: 2px; font-size: 18px; font-variant-numeric: tabular-nums; }
.quota-secondary { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.run-usage-stats { grid-template-columns: repeat(4, minmax(0,1fr)); }
.quota-progress { height: 9px; margin: 18px 0 7px; overflow: hidden; border-radius: 999px; background: #e4ebe7; }
.quota-progress span { display: block; height: 100%; background: var(--ok); }
.quota-progress span.warn { background: var(--warn); }
.quota-progress span.error { background: var(--error); }
.quota-progress-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.quota-progress-label strong { color: var(--text); font-variant-numeric: tabular-nums; }
.quota-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.local-usage-strip { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(90px, .75fr)) 1.35fr; gap: 1px; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.local-usage-strip > div { min-width: 0; padding: 12px 14px; background: var(--surface); }
.local-usage-strip span { display: block; color: var(--muted); font-size: 12px; }
.local-usage-strip strong { display: block; margin-top: 3px; font-size: 16px; font-variant-numeric: tabular-nums; }
.local-release strong { font-size: 14px; }
.quota-note { margin: 7px 2px 0; color: var(--muted); font-size: 12px; }
.quota-auto-refresh { display: none; }
.toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px; gap: 10px; margin: 18px 0 10px; }
.task-toolbar { grid-template-columns: minmax(260px, 1fr) 180px 180px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0 4px; color: var(--muted); font-size: 13px; }
.pagination-controls, .page-numbers { display: inline-flex; align-items: center; gap: 6px; }
.page-button { min-width: 34px; padding: 6px 9px; border-radius: 7px; font-size: 13px; line-height: 1.2; }
.pagination a.page-button { display: inline-block; border: 1px solid var(--line); color: var(--text); background: var(--surface); font-weight: 600; text-align: center; }
.pagination a.page-button:hover { border-color: #a9b7ad; text-decoration: none; }
.pagination a.page-button.active { color: white; border-color: var(--brand); background: var(--brand); }
.page-button.active { color: white; border-color: var(--brand); background: var(--brand); }
.page-button:disabled { color: #a1aaa4; background: #f5f6f5; cursor: not-allowed; }
.page-ellipsis { min-width: 20px; text-align: center; }
.page-jump { display: inline-flex; grid-template-columns: none; align-items: center; gap: 5px; margin-left: 4px; white-space: nowrap; font-weight: 400; }
.page-jump select { width: auto; min-width: 58px; padding: 5px 24px 5px 8px; border-radius: 7px; font-size: 13px; }
.events { margin-top: 20px; color: var(--muted); }
.events summary { cursor: pointer; color: var(--text); font-weight: 600; }
.events ul { list-style: none; padding: 0; }.events li { padding: 6px 0; border-bottom: 1px solid var(--line); }.events time { display: inline-block; width: 175px; }
.analysis-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 28px; margin: -6px 0 18px; border: 1px solid #cfe2d7; border-radius: 16px; background: linear-gradient(135deg, #f4fbf7 0%, #ffffff 72%); }
.analysis-hero h1 { margin-top: 3px; font-size: 32px; }
.analysis-hero p { margin: 7px 0 0; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.analysis-selector { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(4, auto); align-items: center; gap: 10px; margin-bottom: 14px; }
.report-download { border-color: #789583; color: #285c42; }
.report-download:disabled { opacity: .5; cursor: wait; }
.report-context-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: #59685d; font-size: 13px; margin: 0 0 12px; }
.report-context-bar a { color: #285c42; text-decoration: underline; }
.report-quality { margin: 0 0 22px; }
@media (max-width: 1100px) and (min-width: 721px) {
  .analysis-selector { grid-template-columns: repeat(4, auto); }
  .analysis-selector > label { grid-column: 1 / -1; }
}
.analysis-selector label { display: flex; align-items: center; gap: 12px; min-width: 0; }
.analysis-selector label > span, .analysis-selector > .button { white-space: nowrap; }
.analysis-selector label select, .analysis-selector .task-combobox { flex: 1; min-width: 0; }
.analysis-selector > .button { min-height: 44px; }
.task-combobox { position: relative; min-width: 0; font-weight: 400; }
.task-combobox-control { position: relative; }
.task-combobox-control input { width: 100%; padding-right: 40px; text-overflow: ellipsis; }
.task-combobox-control button { position: absolute; right: 3px; top: 3px; bottom: 3px; width: 34px; padding: 0; border: 0; background: transparent; color: var(--muted); }
#task-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow-y: auto; z-index: 50; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 5px; box-shadow: 0 8px 24px #17201a20; }
#task-search-results [role="option"] { padding: 10px 12px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; font-size: 14px; }
#task-search-results [role="option"]:hover, #task-search-results .active { background: #edf7f1; color: var(--brand); }
#task-search-results [aria-selected="true"] { font-weight: 650; }
.task-search-empty { padding: 14px 12px; color: var(--muted); font-size: 14px; }
.task-search-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.analysis-metrics { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin: 0 0 28px; }
.analysis-metric { position: relative; min-height: 124px; padding: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.analysis-metric::after { content: ""; position: absolute; right: -25px; bottom: -34px; width: 82px; height: 82px; border-radius: 50%; background: #f2f6f3; }
.analysis-metric.accent { border-color: #a9d2b9; background: #f2faf5; }
.analysis-metric span { display: block; color: var(--muted); font-size: 13px; }
.analysis-metric strong { display: block; margin: 5px 0 2px; font-size: 27px; letter-spacing: -.02em; }
.analysis-metric strong.metric-text { margin-top: 10px; font-size: 18px; line-height: 1.25; }
.analysis-metric small { position: relative; z-index: 1; display: block; color: #7a877e; font-size: 12px; }
.analysis-section { margin-top: 4px; }
.data-source { padding: 5px 9px; border-radius: 999px; color: var(--muted); background: #f1f4f1; font-size: 12px; white-space: nowrap; }
.analysis-table-wrap { overflow-x: hidden; }
.analysis-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 12px; }
.analysis-table th, .analysis-table td { padding: 10px 7px; vertical-align: middle; overflow-wrap: anywhere; }
.analysis-table th { line-height: 1.35; white-space: normal; }
.analysis-table th:nth-child(1) { width: 42px; }
.analysis-table th:nth-child(2) { width: 260px; }
.analysis-table th:nth-child(3) { width: 74px; }
.analysis-table th:nth-child(4) { width: 66px; }
.analysis-table th:nth-child(5), .analysis-table th:nth-child(6) { width: 95px; }
.analysis-table th:nth-child(7) { width: 68px; }
.analysis-table th:nth-child(8), .analysis-table th:nth-child(9) { width: 70px; }
.analysis-table th:nth-child(10) { width: 84px; }
.analysis-table th:nth-child(11) { width: 64px; }
.analysis-product { display: grid; min-width: 0; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 9px; }
.analysis-product img, .product-image-placeholder { width: 52px; height: 46px; border-radius: 7px; object-fit: cover; background: #eef2ef; }
.analysis-product-copy { min-width: 0; }
.analysis-product-title { display: -webkit-box; overflow: hidden; color: var(--brand); line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-image-placeholder { display: grid; place-items: center; color: #8a948d; font-size: 11px; text-align: center; }
.analysis-guide { margin: 0 0 14px; border: 1px solid #d9e2dc; border-radius: 11px; background: #fafcfb; }
.analysis-guide summary { padding: 12px 14px; cursor: pointer; color: var(--brand-dark); font-weight: 700; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 2px 14px 16px; }
.guide-grid p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.analysis-table tr:target { outline: 3px solid #8cc9a4; outline-offset: -3px; background: #f0faf4; }
.selection-observations, .comparison-section, .keyword-section { margin: 30px 0 34px; }
.review-insights { margin: 30px 0 34px; scroll-margin-top: 20px; }
.review-insight-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 15px 0 10px; }
.review-insight-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
.review-insight-controls select { min-width: 210px; }
.review-insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.review-insight-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.review-insight-card-head { padding: 16px; background: #f6faf7; border-bottom: 1px solid var(--line); }
.review-insight-card-head h3 { margin: 0 0 5px; font-size: 17px; }
.review-insight-card-head p { margin: 0 0 4px; font-weight: 600; }
.review-insight-card-head small { color: var(--muted); }
.review-insight-terms { padding: 4px 14px 14px; }
.review-insight-terms h4 { margin: 12px 0 5px; font-size: 13px; color: var(--brand-dark); }
.review-insight-change { margin-top: 14px; border-top: 1px solid var(--line); }
.review-insight-term { border-bottom: 1px solid var(--line); }
.review-insight-term summary { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 18px; align-items: center; column-gap: 6px; min-height: 44px; cursor: pointer; padding: 11px 0; list-style: none; white-space: nowrap; }
.review-insight-term summary::-webkit-details-marker { display: none; }
.review-insight-term-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 14px; }
.review-insight-chevron { justify-self: end; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .15s; }
.review-insight-term[open] .review-insight-chevron { transform: rotate(90deg); }
.review-insight-term-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.review-insight-term-body { padding: 0 0 12px; font-size: 12px; }
.review-insight-term-body > span { display: block; color: var(--muted); margin: 3px 0; }
.review-insight-comparison { margin: 8px 0 12px; padding: 10px; border-radius: 8px; background: #f5f8f6; }
.review-insight-comparison h5 { margin: 0 0 7px; font-size: 12px; }
.review-insight-comparison > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; padding: 3px 0; align-items: baseline; }
.review-insight-comparison > div span:nth-child(2) { color: var(--muted); font-variant-numeric: tabular-nums; }
.review-insight-comparison strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.review-insight-comparison p { margin: 7px 0 0; color: var(--brand-dark); font-weight: 600; }
.review-insight-timeline { margin: 10px 0 12px; }
.review-insight-timeline > p:first-child { margin: 0 0 8px; font-weight: 600; }
.review-insight-timeline > p:first-child small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.review-insight-bins { display: flex; align-items: end; gap: 5px; overflow-x: auto; padding-bottom: 3px; }
.review-insight-bin { display: grid; align-items: end; text-align: center; flex: 1 0 39px; min-width: 39px; padding: 2px 0 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 10px; }
.review-insight-bin:hover, .review-insight-bin[aria-pressed="true"] { border: 0; background: #eef5f0; }
.review-insight-bin:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.review-insight-bin strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.review-insight-bin-track { display: block; height: 53px; border-bottom: 1px solid #b8c9bd; background: #f3f7f4; }
.review-insight-bin-track svg { display: block; width: 100%; height: 52px; }
.review-insight-bin-track.empty { background: repeating-linear-gradient(45deg, #f3f7f4, #f3f7f4 3px, #e7ece8 3px, #e7ece8 6px); }
.review-insight-bin small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.review-insight-bin-detail { min-height: 35px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.review-insight-term-body ul { padding-left: 18px; margin: 9px 0 0; }
.review-insight-term-body li { margin: 9px 0; }
.review-insight-term-body blockquote { margin: 4px 0 0; padding: 7px 9px; border-left: 2px solid #aac9b1; background: #f8faf8; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.listing-review:target { outline: 3px solid #8cc9a4; outline-offset: 3px; background: #f0faf4; }
.observation-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; }
.priority-products, .winning-profile, .product-type-grid > div { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.priority-products h3, .winning-profile h3, .product-type-grid h3 { margin: 0 0 12px; font-size: 16px; }
.insight-product { display: grid; min-width: 0; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.insight-product > span { min-width: 0; }
.insight-product:last-child { border-bottom: 0; }
.insight-product:hover { text-decoration: none; }
.insight-product img, .insight-product .product-image-placeholder { width: 66px; height: 52px; border-radius: 7px; object-fit: cover; }
.insight-product strong, .insight-product small { display: block; }
.insight-product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insight-product small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.winning-profile dl { margin: 0; }
.winning-profile dl div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.winning-profile dt { color: var(--muted); font-size: 12px; }
.winning-profile dd { margin: 2px 0 0; font-weight: 700; }
.winning-profile dd { overflow-wrap: anywhere; }
.product-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.product-type-grid > div > p { min-height: 42px; margin: -5px 0 8px; font-size: 13px; }
.comparison-controls { display: grid; grid-template-columns: repeat(2, minmax(220px, 320px)); gap: 10px; margin-bottom: 12px; }
.comparison-controls[hidden] { display: none; }
.comparison-tabs, .keyword-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.comparison-tabs button, .keyword-tabs button { padding: 7px 12px; color: var(--muted); background: #f5f7f5; }
.comparison-tabs button.active, .keyword-tabs button.active { color: white; border-color: var(--brand); background: var(--brand); }
.comparison-question-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.comparison-question-tabs button { display: grid; gap: 3px; padding: 13px 15px; text-align: left; }
.comparison-question-tabs button strong { color: inherit; font-size: 14px; }
.comparison-question-tabs button span { color: inherit; opacity: .8; font-size: 12px; font-weight: 400; }
.chart-reading { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; color: #355d48; background: #f1f8f4; }
.candidate-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; font-size: 13px; }
.candidate-links span { color: var(--muted); }
.comparison-chart { min-height: 280px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.comparison-guide { margin-top: 14px; }
.leaderboard-wrap { width: 100%; overflow-x: hidden; }
.leaderboard-table { width: 100%; table-layout: fixed; }
.leaderboard-table th:first-child { width: 330px; }
.leaderboard-table th:nth-child(2) { width: 120px; }
.leaderboard-table tbody th { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 9px; white-space: normal; }
.leaderboard-rank { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); background: #edf1ee; font-size: 12px; }
.leaderboard-title { display: -webkit-box; overflow: hidden; line-height: 1.35; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.leaderboard-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.leaderboard-value strong, .leaderboard-value span { display: inline-block; }
.leaderboard-value span { margin-left: 4px; color: var(--muted); font-size: 12px; }
.leaderboard-scale { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.leaderboard-track { display: block; width: 100%; height: 12px; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: #edf1ee; }
.leaderboard-track::-webkit-progress-bar { border-radius: inherit; background: #edf1ee; }
.leaderboard-track::-webkit-progress-value { border-radius: inherit; background: var(--brand); }
.leaderboard-track::-moz-progress-bar { border-radius: inherit; background: var(--brand); }
.leaderboard-bar { display: grid; grid-template-columns: minmax(120px, 1fr) 90px; align-items: center; gap: 12px; }
.leaderboard-bar-label { text-align: right; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.analysis-svg { display: block; width: 100%; height: auto; overflow: visible; }
.analysis-svg text { fill: var(--text); font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.analysis-svg .chart-title, .analysis-svg .axis-label { font-weight: 700; }
.chart-bar { fill: var(--brand); opacity: .82; }
.analysis-svg a:hover .chart-bar { opacity: 1; }
.chart-value { font-weight: 700; }
.chart-grid line { stroke: var(--line); stroke-width: 1; }
.chart-grid text { fill: var(--muted); }
.chart-axis { stroke: #87938b; stroke-width: 1.2; }
.chart-median { stroke: #8b9890; stroke-width: 1.2; stroke-dasharray: 6 5; }
.chart-target { fill: #dff3e7; opacity: .7; }
.target-label { fill: var(--brand-dark) !important; font-weight: 700 !important; }
.chart-point { fill: var(--brand); fill-opacity: .72; stroke: white; stroke-width: 2; }
.analysis-svg a:hover .chart-point { fill-opacity: 1; stroke: var(--brand-dark); }
.heatmap-wrap { overflow-x: hidden; }
.heatmap-table { width: 100%; table-layout: fixed; }
.heatmap-table th:first-child { width: 190px; min-width: 0; }
.heatmap-table th:not(:first-child), .heatmap-table td { min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.heatmap-product-title { display: -webkit-box; overflow: hidden; line-height: 1.35; text-align: left; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.heatmap-table td.heat-0 { background: #f4f5f4; }
.heatmap-table td.heat-1 { background: #edf7f1; }
.heatmap-table td.heat-2 { background: #d7eee0; }
.heatmap-table td.heat-3 { background: #b7dfc7; }
.heatmap-table td.heat-4 { background: #86c5a1; }
.heatmap-table td.heat-5 { color: white; background: var(--brand); }
.positioning-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.positioning-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.positioning-card:first-child { grid-column: 1 / -1; }
.positioning-card h3 { margin: 0 0 8px; font-size: 16px; }
.positioning-item { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(260px, 1.4fr) minmax(150px, .7fr); align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.positioning-item > * { min-width: 0; }
.positioning-item > span { color: var(--muted); font-size: 12px; }
.positioning-examples { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 3px 9px; }
.positioning-examples > span { color: var(--muted); }
.positioning-examples a { white-space: nowrap; }
.score-detail { position: relative; min-width: 68px; }
.score-detail[open] { z-index: 2; }
.score-detail summary { list-style: none; cursor: pointer; }
.score-detail summary::-webkit-details-marker { display: none; }
.score-breakdown { display: grid; gap: 5px; width: 310px; margin-top: 8px; padding: 10px; border: 1px solid #bcd0c3; border-radius: 8px; background: #f7fbf8; box-shadow: 0 8px 20px rgba(31, 69, 48, .12); font-size: 12px; }
.score-breakdown span { display: flex; justify-content: space-between; gap: 10px; }
.reason-text { display: block; min-width: 0; color: #355d48; font-size: 12px; }
.listing-page-head { align-items: flex-start; }
.listing-actions { display: grid; flex: 0 0 164px; width: 164px; }
.listing-actions .button { width: 100%; text-align: center; }
.listing-page-head > div:first-child { min-width: 0; }
.listing-page-head h1 { overflow-wrap: anywhere; }
.listing-metadata { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; }
.listing-snapshot-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 16px; }
.listing-snapshot-heading h2 { margin: 0; font-size: 18px; }
.listing-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.listing-stat { padding: 22px; background: #f4f7f4; border-radius: 9px; min-width: 0; }
.listing-stat-value { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 10px 0; overflow-wrap: anywhere; }
.listing-stat-value span { font-size: 14px; font-weight: 400; margin-left: 6px; }
.listing-stat p { margin: 0; color: var(--muted); font-size: 13px; }
.listing-ratio { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding: 22px 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
.listing-ratio strong { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.listing-ratio p { margin: 3px 0; }
.listing-definitions { margin-top: 20px; font-size: 13px; }
.listing-definitions summary { color: var(--muted); cursor: pointer; padding: 8px 0; }
.listing-definitions dl { display: grid; grid-template-columns: 120px 1fr; gap: 12px 20px; }
.listing-definitions dt { color: var(--muted); }
.listing-definitions dd { margin: 0; }
.listing-reviews { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 24px; scroll-margin-top: 18px; }
.listing-reviews h2 { font-size: 18px; margin: 0 0 8px; }
.review-month-chart { overflow-x: auto; padding: 8px 0 12px; margin: 16px 0 24px; }
.review-chart-svg { display: block; overflow: visible; }
.review-month-bar { font-variant-numeric: tabular-nums; }
.review-month-hit { fill: transparent; }
.review-month-bar:hover .review-month-hit, .review-month-bar:focus .review-month-hit { fill: #1f6f5009; }
.review-month-bar[aria-current="true"] .review-month-hit { fill: #1f6f5014; stroke: var(--brand); stroke-width: 1; }
.review-bar-count { fill: var(--text); font-size: 13px; font-weight: 600; }
.review-bar-fill { fill: var(--brand); opacity: .2; }
.review-bar-baseline { stroke: var(--line); stroke-width: 1; }
.review-curve { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.review-curve-point { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.review-month-label { fill: var(--muted); font-size: 12px; }
.review-month-cutoff { fill: var(--muted); font-size: 11px; }
.review-list-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.review-list-heading h3 { font-size: 16px; margin: 0; }
.listing-review { padding: 20px 0; border-bottom: 1px solid var(--line); }
.listing-review header { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.review-stars { color: #966300; letter-spacing: 2px; }
.review-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 0; line-height: 1.75; }
.review-image-link { display: inline-block; margin-top: 12px; }
.review-image-link img { display: block; object-fit: cover; border-radius: 7px; }
.review-pagination { justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .listing-actions { display: flex; flex-wrap: wrap; flex: none; width: 100%; }
  .listing-actions .button { width: auto; }
  .listing-stats { grid-template-columns: 1fr; }
  .listing-definitions dl { grid-template-columns: 1fr; gap: 5px; }
  .listing-definitions dd { margin-bottom: 10px; }
}
.rank-number { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #516158; background: #edf1ee; font-size: 12px; font-weight: 800; }
.analysis-table tbody tr:nth-child(-n+3) .rank-number { color: white; background: var(--brand); }
.signal-score { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.signal-score.high { color: #12613d; background: #dcf3e6; }
.signal-score.medium { color: #7a5700; background: #fff1bd; }
.signal-score.low { color: #7e4138; background: #fbe7e4; }
.signal-score.muted-score { background: #f1f3f2; }
.reason-chip { display: inline-block; padding: 5px 9px; border-radius: 999px; color: #355d48; background: #edf7f1; font-size: 12px; white-space: nowrap; }
code { background: #edf1ee; padding: 2px 5px; border-radius: 4px; }
@media (max-width: 760px) {
  .site-header { height: auto; padding: 15px 18px; align-items: flex-start; }
  nav { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  main { padding: 24px 14px 48px; }
  .page-head { flex-direction: column; }
  .run-actions { flex-wrap: wrap; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .api-usage-grid { grid-template-columns: 1fr; }
  .run-usage-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quota-hero { flex-direction: column; }
  .local-usage-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .local-release { grid-column: 1 / -1; }
  .toolbar { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .key-test-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination-controls { flex-wrap: wrap; }
  .section-head { align-items: stretch; flex-direction: column; }
  .analysis-hero { flex-direction: column; padding: 20px; }
  .analysis-hero h1 { font-size: 27px; }
  .analysis-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-selector label { grid-column: 1 / -1; flex-direction: column; align-items: stretch; }
  .analysis-selector > .button { padding: 10px 8px; }
  .analysis-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: none; }
  .guide-grid { grid-template-columns: 1fr; }
  .observation-layout, .product-type-grid, .comparison-controls, .comparison-question-tabs, .positioning-grid, .review-insight-grid { grid-template-columns: 1fr; }
  .positioning-card:first-child { grid-column: auto; }
  .positioning-item { grid-template-columns: 1fr; gap: 2px; }
  .product-type-grid > div > p { min-height: 0; }
  .analysis-svg text { font-size: 11px; }
  h1 { font-size: 24px; }
}

.listing-overview.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.listing-photo { display: block; position: relative; min-height: 360px; border-radius: 10px; overflow: hidden; background: #f4f7f4; }
.listing-photo img { position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0; }
.listing-overview.has-photo .listing-stats { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); }
.review-month-chart { overflow: hidden; }
.review-chart-svg { width: 100%; overflow: hidden; }
.review-list { overflow-anchor: none; }
.review-month-bar:hover text { text-decoration: none; }
@media (max-width: 760px) {
  .listing-overview.has-photo { grid-template-columns: 1fr; }
  .listing-photo { min-height: 0; aspect-ratio: 1; }
}
.pool-panel { padding: 0; overflow: hidden; }
.pool-table-head { padding: 14px 18px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; }
.pool-table { min-width: 1040px; table-layout: fixed; }
.pool-table th:nth-child(1) { width: 15%; }
.pool-table th:nth-child(2) { width: 19%; }
.pool-table th:nth-child(3) { width: 15%; }
.pool-table th:nth-child(4) { width: 9%; }
.pool-table th:nth-child(5) { width: 26%; }
.pool-table th:nth-child(6) { width: 16%; }
.pool-table th { padding: 10px 12px; }
.pool-table td { vertical-align: middle; padding: 11px 12px; }
.pool-table input { min-width: 0; width: 100%; padding: 6px 9px; }
.pool-keystring { overflow-wrap: anywhere; font-size: 12px; }
.pool-secret { display: flex; align-items: center; gap: 2px; }
.pool-secret input { border: 0; background: transparent; font-family: monospace; padding-inline: 0; }
.pool-eye { padding: 4px; flex: 0 0 auto; border: 0; background: transparent; }
.pool-eye svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.pool-eye[aria-pressed="true"] .eye-slash { display: none; }
.key-secret-field { display: flex; align-items: center; gap: 2px; padding: 0 8px 0 0; border: 1px solid #bfc9c2; border-radius: 8px; background: white; }
.key-secret-field:focus-within { outline: 3px solid rgba(31,111,80,.17); border-color: var(--brand); }
.key-secret-field input { min-width: 0; flex: 1; border: 0; background: transparent; }
.key-secret-field input:focus { outline: 0; }
.key-secret-status { color: var(--error); font-size: 12px; }
.pool-meter-line { display: flex; align-items: center; gap: 9px; }
.pool-meter-line progress { flex: 1; min-width: 65px; }
.pool-meter-line strong { white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.pool-usage-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; margin-top: 4px; }
.pool-usage-detail, .pool-table small, .pool-save-status { display: block; font-size: 11px; color: var(--muted); }
.pool-usage-meta small { margin-left: auto; white-space: nowrap; }
.pool-save-status { margin-top: 3px; }
.pool-row-actions { display: flex; align-items: center; justify-content: flex-start; gap: 20px; }
.pool-row-actions .button { padding: 6px 8px; }
.pool-disable-option { display: flex; align-items: center; gap: 9px; }
.pool-disable-option input { width: auto; }
.pool-empty { padding: 0 22px 20px; }
#pool-add-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 26px; width: min(480px, calc(100vw - 32px)); color: var(--text); }
#pool-add-dialog::backdrop { background: rgb(0 0 0 / 30%); }
#pool-add-dialog h2 { margin: 0; }

[data-weekly-settings][hidden] { display: none; }

.overview-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0; }
.overview-metrics strong { font-size: 24px; }
.overview-metrics small { display: block; color: var(--muted); }
.overview-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: #f3f6f3; border: 1px solid var(--line); border-radius: 12px; }
.overview-status > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.overview-status label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.shop-overview { margin-bottom: 24px; }
.shop-overview th { white-space: nowrap; }
.shop-overview td { vertical-align: middle; }
.shop-overview td:first-child { min-width: 180px; }
.shop-thumbnails { display: flex; gap: 5px; }
.shop-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 7px; }
.shop-thumbnails .image-placeholder { font-size: 10px; }
.product-toolbar { flex-wrap: wrap; }
.product-toolbar input:first-child { flex: 1 1 220px; }
.product-toolbar input[type=number] { width: 110px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.product-photo { display: block; aspect-ratio: 1 / 1; background: #f2f2ee; overflow: hidden; }
.product-photo img { width: 100%; height: 100%; object-fit: contain; }
.image-placeholder { display: flex; align-items: center; justify-content: center; background: #f2f2ee; color: #7b817b; }
.product-photo .image-placeholder { width: 100%; height: 100%; }
.product-card-body { padding: 15px; }
.product-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; line-height: 22px; color: var(--text); font-weight: 600; }
.shop-text { border: 0; background: none; padding: 0; margin: 8px 0; color: #47745a; cursor: pointer; text-align: left; }
.product-price { font-size: 20px; font-weight: 700; }
.product-price small { color: #778077; font-size: 11px; font-weight: 400; }
.product-stats { display: flex; justify-content: space-between; gap: 8px; margin: 16px 0; font-size: 12px; }
.product-stats span { color: #778077; }
.product-stats b { display: block; margin-top: 3px; color: var(--text); font-size: 14px; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.product-card[hidden], #product-empty[hidden] { display: none; }
.collection-details { margin-top: 24px; }
.collection-details > summary { cursor: pointer; font-weight: 600; }
.collection-details > p { margin-top: 16px; }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .product-grid, .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-status { align-items: flex-start; flex-direction: column; } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } .overview-metrics strong { font-size: 18px; } .overview-status label { white-space: normal; } }
.product-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) 120px 110px 100px 100px; gap: 10px; }
.product-toolbar input, .product-toolbar select, .product-toolbar input[type=number] { width: 100%; min-width: 0; }
@media (max-width: 1100px) { .product-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .product-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .product-toolbar input:first-child { grid-column: 1 / -1; } }

/* Account administration */
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-table { min-width: 650px; }
.account-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; color: var(--text); }
.account-dialog::backdrop { background: rgb(0 0 0 / 30%); }
.account-dialog h2 { margin: 0; }
.account-card .stack { padding-bottom: 20px; }
.account-card fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.account-card label.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.account-card input[type="checkbox"] { width: auto; }
.tool-tabs { flex-wrap: wrap; }
.task-assignments { margin-top: 36px; scroll-margin-top: 24px; }

.assignment-controls { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.account-delete-form { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; }

.assignment-controls .account-multiselect { flex: 1; min-width: 210px; }
.account-picker-button { width: 100%; min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: white; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; text-align: left; cursor: pointer; }
.account-picker-button [data-picker-summary] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-picker-options { position: fixed; inset: auto; margin: 0; width: 290px; max-height: min(380px, calc(100vh - 32px)); overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / 12%); background: white; color: var(--text); }
.account-picker-options p { margin: 0 0 10px; }
.account-picker-options label { display: flex; align-items: center; gap: 8px; padding: 8px 4px; margin: 0; white-space: nowrap; }
.account-picker-options input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.account-picker-options .hint { margin-top: 10px; margin-bottom: 0; }
#task-assignments table { table-layout: fixed; min-width: 880px; }
#task-assignments td { overflow-wrap: anywhere; }
#task-assignments td:last-child { min-width: 0; }
#task-assignments .account-multiselect, #task-assignments .account-picker-button { min-width: 0; width: 100%; }

.assignment-status { font-size: 12px; overflow-wrap: anywhere; }
.assignment-status:empty { display: none; }
.assignment-status.error { color: #b42318; }
.assignment-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.assignment-pagination span { margin-right: auto; color: var(--muted); }

.assignment-run-status, .assignment-product-count { white-space: nowrap; }

.assignment-col-name { width: 30%; }
.assignment-col-accounts { width: 17%; }
.assignment-col-status, .assignment-col-products, .assignment-col-runs { width: 9%; }
.assignment-col-edit { width: 26%; }

/* Print the existing analysis page in its existing order. */
@media print {
  html, body { background: #fff; color: #17201a; font-size: 12px; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .tool-tabs, footer, .analysis-selector, #result-pagination, .pagination-controls,
  .review-insight-controls button, .comparison-question-tabs button:not(.active),
  .analysis-guide:not([open]), [data-chart-retry], [data-review-retry] { display: none !important; }
  main, .container { width: 100%; max-width: none; margin: 0; padding: 0; }
  .analysis-hero { margin: 0 0 18px; padding: 20px; break-inside: avoid; }
  .analysis-hero h1 { font-size: 26px; }
  .analysis-section { margin: 18px 0; padding: 0; }
  .section-head { break-inside: avoid; break-after: avoid; }
  .section-head h2 { font-size: 19px; }
  h3 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .observation-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
  .product-type-grid, .positioning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .insight-product, .winning-profile, .positioning-card, .review-insight-term { break-inside: avoid; }
  .insight-product strong, .analysis-product-title, .leaderboard-title { white-space: normal; display: block; -webkit-line-clamp: unset; overflow: visible; }
  .comparison-question-tabs { display: block; }
  .comparison-question-tabs button.active { display: block; width: 100%; border: 0; padding: 0; text-align: left; background: transparent; color: var(--text); }
  .comparison-controls { display: flex; gap: 16px; margin: 10px 0; }
  .comparison-controls[hidden], [hidden] { display: none !important; }
  .comparison-controls select, .review-insight-controls select { border: 0; padding: 0; color: #17201a; background: transparent; appearance: none; }
  .comparison-chart, .table-wrap, .leaderboard-wrap, .analysis-table-wrap { overflow: visible; min-width: 0; width: 100%; }
  .comparison-chart svg { display: block; max-width: 100%; height: auto; max-height: 95mm; break-inside: avoid; }
  .chart-reading { break-inside: avoid; }
  table { min-width: 0 !important; width: 100%; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  .analysis-table { font-size: 10px; }
  .analysis-table th, .analysis-table td { padding: 5px 4px; }
  .analysis-table th:nth-child(1) { width: 3%; }
  .analysis-table th:nth-child(2) { width: 22%; }
  .analysis-table th:nth-child(3) { width: 7%; }
  .analysis-table th:nth-child(4) { width: 6%; }
  .analysis-table th:nth-child(5), .analysis-table th:nth-child(6) { width: 8%; }
  .analysis-table th:nth-child(7), .analysis-table th:nth-child(8), .analysis-table th:nth-child(9) { width: 6%; }
  .analysis-table th:nth-child(10) { width: 7%; }
  .analysis-table th:nth-child(11) { width: 5%; }
  .analysis-table th:nth-child(12) { width: 16%; }
  .analysis-table .subtle { font-size: 9px; line-height: 1.3; }
  .analysis-table .reason-text { font-size: 10px; line-height: 1.4; }
  .analysis-table .rank-number { width: 22px; height: 22px; font-size: 10px; }
  .product-type-grid { break-inside: avoid; }
  .comparison-section, .keyword-section, .review-insights, .analysis-section:has(#result-table) { break-before: page; }
  .analysis-product { grid-template-columns: 38px minmax(0, 1fr); gap: 5px; }
  .analysis-product img, .analysis-product .product-image-placeholder { width: 38px; height: 34px; }
  .analysis-table .signal-score { width: 28px; height: 28px; font-size: 12px; border-radius: 7px; }
  .analysis-table .score-detail { min-width: 0; }
  .leaderboard-table { font-size: 11px; }
  .leaderboard-table th, .leaderboard-table td { padding: 6px; }
  .leaderboard-table th:first-child { width: 34%; }
  .leaderboard-table th:nth-child(2) { width: 12%; }
  .leaderboard-table tbody th { display: table-cell; }
  .leaderboard-rank { display: inline-grid; width: 22px; height: 22px; vertical-align: middle; margin-right: 6px; }
  .leaderboard-title { display: inline-block; width: calc(100% - 32px); font-size: 11px; line-height: 1.25; vertical-align: middle; }

  .leaderboard-bar { grid-template-columns: minmax(60px, 1fr) 65px; gap: 6px; }
  .score-detail:not([open]) > :not(summary) { display: none; }
  .priority-products, .winning-profile, .product-type-grid > div { padding: 12px; }
  .insight-product { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
  .insight-product img, .insight-product .product-image-placeholder { width: 50px; height: 42px; }
  .positioning-card { padding: 12px; }
  .positioning-card:first-child { grid-column: auto; }
  .positioning-item { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 5px 0; }
  .positioning-examples { justify-content: flex-start; }
  .positioning-item > span { font-size: 11px; line-height: 1.4; }
  .positioning-card h3 { font-size: 14px; }
  .keyword-section { break-inside: avoid; }
  .keyword-section > .subtle { break-before: avoid; font-size: 11px; line-height: 1.4; }
  .review-insight-grid { display: block; }
  .review-insight-card { overflow: visible; margin: 12px 0; break-inside: avoid; }
  .review-insight-card-head { padding: 10px 12px; }
  .review-insight-card-head h3 { font-size: 16px; }
  .review-insight-card-head p { font-size: 12px; }
  .review-insight-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 12px 10px; }
  .review-insight-terms h4 { margin: 9px 0 4px; }
  .review-insight-change { margin: 0; border: 0; }
  .review-insight-term summary { display: block; min-height: 0; padding: 6px 0; white-space: normal; }
  .review-insight-term-title, .review-insight-term-meta { display: block; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .review-insight-term-title { font-size: 12px; }
  .review-insight-term-meta { font-size: 11px; }
  .review-insight-chevron { display: none; }
  .review-insight-card:has(.review-insight-term[open]) { break-inside: auto; }
  .review-insight-card:has(.review-insight-term[open]) .review-insight-terms { display: block; }
  .review-insight-term[open] { break-inside: auto; }
  .review-insight-term-body blockquote { break-inside: avoid; }
  .review-insight-bins { flex-wrap: wrap; overflow: visible; }
  .comparison-chart:has(svg) { min-height: 0; break-inside: avoid; }
  .comparison-section:has(svg) .chart-reading { margin: 8px 0; padding: 8px 10px; }
  .heatmap-wrap { overflow: visible; }
  .heatmap-table { font-size: 11px; }
  .heatmap-table th, .heatmap-table td { padding: 6px; }
  .heatmap-table th:first-child { width: 36%; }
  .heatmap-table th:not(:first-child) { width: 12.8%; white-space: normal; }
  .heatmap-product-title { display: block; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
  .analysis-product-title, .leaderboard-title, .insight-product strong { overflow-wrap: anywhere; }
  .score-breakdown { width: auto; min-width: 0; padding: 4px; box-shadow: none; font-size: 9px; overflow-wrap: anywhere; }
  .score-breakdown span { display: block; }
  .review-insights { margin: 20px 0; }
  .review-insight-controls { margin: 8px 0; }
  a { color: #1f6f50; }
}
