/* AI diagnosis and report queue aligned to the reference product. */
#view-root[data-view="diagnostics"],
#view-root[data-view="reports"] { padding: 32px 16px 64px; }

.diagnosis-workspace {
  --brand: #008b7e; --brand-deep: #007a6e; --brand-soft: #e7f8f5;
  --fg: #0b1220; --fg-muted: #5b6b82; --border: rgba(15, 55, 95, .1);
  --bg: #eef5fb; --accent: #f0a34a; --accent-2: #e35b71;
  width: 100%; min-width: 0; color: var(--fg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.diagnosis-workspace .primary-button,
.diagnosis-workspace .ghost-button,
.diagnosis-workspace .secondary-button {
  min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 12px;
  font-size: 16px; font-weight: 650; line-height: 1.35; text-decoration: none;
}
.diagnosis-workspace .primary-button { color: #fff; background: var(--brand-deep); }
.diagnosis-workspace .primary-button:hover { background: #006d63; }
.diagnosis-workspace .ghost-button { color: var(--fg); border-color: var(--border); background: rgba(255, 255, 255, .72); }
.diagnosis-workspace .ghost-button:hover { border-color: rgba(0, 122, 110, .25); background: #fff; }
.diagnosis-workspace button:disabled { cursor: not-allowed; opacity: .52; }
.diagnosis-page-kicker, .diagnosis-form-kicker { margin: 0; color: #00998e; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: 2px; text-transform: uppercase; }

/* Instant diagnosis report. */
.geo-report { max-width: 72rem; margin: 0 auto; padding: 4px 0 32px; }
.geo-report-header { display: flex; min-height: 104px; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.geo-report-heading { min-width: 0; }
.geo-report-title { margin: 0; color: var(--fg); font-size: clamp(27px, 3.2vw, 37.6px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.geo-report-title > span { color: var(--brand-deep); }
.geo-report-meta { margin: 9px 0 0; color: var(--fg-muted); font-size: 14px; line-height: 1.5; }
.geo-report-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.geo-report-export { border-radius: 999px !important; padding-inline: 18px !important; box-shadow: 0 8px 20px rgba(15, 55, 95, .06); }
.geo-report-banner { margin: 0 0 18px; padding: 14px 18px; border: 1px solid rgba(0, 139, 126, .18); border-radius: 16px; color: var(--brand-deep); background: rgba(231, 248, 245, .68); font-size: 14px; line-height: 1.5; }
.geo-hero-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(256px, .9fr); gap: 28px; margin-bottom: 16px; padding: 28px 30px; border: 1px solid rgba(0, 139, 126, .1); border-radius: 28px; background: #fff; box-shadow: 0 14px 36px rgba(15, 55, 95, .06); }
.geo-hero-copy { min-width: 0; }
.geo-hero-headline { margin: 0; color: var(--fg); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.35; }
.geo-hero-headline em { margin: 0 .1em; color: var(--brand-deep); font-style: normal; font-size: 1.15em; }
.geo-hero-desc { max-width: 608px; margin: 16px 0 0; color: var(--fg-muted); font-size: 15px; line-height: 1.7; }
.geo-hero-stats { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 16px; }
.geo-hero-gap { padding: 16px 18px 17px; border: 2px solid transparent; border-radius: 18px; text-align: center; }
.geo-hero-gap strong { display: block; font-size: clamp(45px, 5vw, 58px); font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.geo-hero-gap span { display: block; margin-top: 7px; font-size: 13px; line-height: 1.4; }
.geo-hero-gap.is-low { border-color: #f27387; color: #be123c; background: #fff3f5; box-shadow: 0 0 0 1px rgba(225, 29, 72, .12); }
.geo-hero-gap.is-pass { border-color: #67c6b8; color: var(--brand-deep); background: #ecfaf7; box-shadow: 0 0 0 1px rgba(0, 139, 126, .12); }
.geo-hero-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.geo-hero-chip { padding: 14px 16px; border: 1px solid rgba(0, 139, 126, .12); border-radius: 16px; background: #f6fbfa; text-align: center; }
.geo-hero-chip span { display: block; color: var(--fg-muted); font-size: 12px; line-height: 1.35; }
.geo-hero-chip strong { display: block; margin-top: 6px; color: var(--brand-deep); font-size: 26px; font-weight: 750; line-height: 1.1; }
.geo-hero-chip.is-warn strong { color: #e11d48; }
.geo-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.geo-kpi-card { min-width: 0; padding: 20px 22px; border: 1px solid rgba(0, 139, 126, .09); border-radius: 24px; background: #fff; box-shadow: 0 10px 28px rgba(15, 55, 95, .05); }
.geo-kpi-label { display: block; color: var(--fg-muted); font-size: 13px; line-height: 1.4; }
.geo-kpi-value { display: block; margin-top: 13px; color: var(--fg); font-size: clamp(23px, 2.4vw, 30px); font-weight: 750; line-height: 1.15; letter-spacing: -.02em; }
.geo-kpi-hint { margin: 9px 0 0; color: var(--fg-muted); font-size: 13px; line-height: 1.45; }
.geo-kpi-card.is-pressure { border-color: rgba(227, 91, 113, .28); background: linear-gradient(180deg, #fff8f9, #fff 55%); }
.geo-kpi-value.is-warn, .geo-kpi-hint.is-warn { color: #d9465f; }
.geo-convert-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 18px 22px; border: 1px solid rgba(0, 139, 126, .22); border-radius: 22px; background: radial-gradient(circle at 100% 0%, rgba(231, 248, 245, .85), transparent 55%), #fff; box-shadow: 0 10px 28px rgba(15, 55, 95, .05); }
.geo-convert-copy { min-width: 0; }
.geo-convert-copy strong { display: block; font-size: 17px; font-weight: 750; line-height: 1.35; }
.geo-convert-copy p { margin: 6px 0 0; color: var(--fg-muted); font-size: 14px; line-height: 1.55; }
.geo-convert-copy .geo-convert-forecast { margin-top: 10px; padding: 10px 13px; border-radius: 14px; color: var(--brand-deep); background: #eefaf8; font-weight: 600; }
.geo-convert-forecast em { margin: 0 2px; color: #d9465f; font-style: normal; font-size: 1.15em; font-weight: 800; }
.geo-convert-actions, .geo-action-head-btns { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 9px; }
.geo-section-card, .geo-action-card { margin-bottom: 16px; padding: 24px 26px 26px; border: 1px solid rgba(0, 139, 126, .09); border-radius: 28px; background: #fff; box-shadow: 0 12px 32px rgba(15, 55, 95, .05); }
.geo-section-head { margin-bottom: 20px; }
.geo-section-head h2, .geo-action-head h2 { margin: 0; color: var(--fg); font-size: 19px; font-weight: 700; }
.geo-section-head p { margin: 6px 0 0; color: var(--fg-muted); font-size: 14px; }
.geo-leader-head, .geo-action-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.geo-leader-legend { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 14px 18px; margin: 2px 0 0; padding: 0; color: var(--fg-muted); font-size: 13px; font-weight: 600; list-style: none; }
.geo-leader-legend li { display: inline-flex; align-items: center; gap: 6px; }
.geo-leader-swatch { width: 11px; height: 11px; border-radius: 3px; }
.geo-leader-swatch.is-brand { background: var(--brand); }
.geo-leader-swatch.is-leader { background: var(--accent); }
.geo-leader-rows { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.geo-leader-rows > li { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: start; gap: 14px; }
.geo-model-name { display: inline-flex; min-width: 0; align-items: center; gap: 7px; color: var(--fg); font-size: 14px; font-weight: 600; }
.geo-model-name > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-model-icon { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 999px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.geo-model-badge { padding: 1px 6px; border-radius: 999px; color: #5b6b82; background: #eef2f6; font-size: 10px; font-weight: 700; white-space: nowrap; }
.geo-model-badge.is-probed { color: var(--brand-deep); background: #e4f5f1; }
.geo-leader-body { min-width: 0; }
.geo-leader-gap { margin: 0 0 6px; color: #b45309; font-size: 12px; font-weight: 650; line-height: 1.3; }
.geo-leader-gap.is-ahead { color: var(--brand-deep); }
.geo-leader-pair { display: grid; gap: 6px; }
.geo-leader-line { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 10px; }
.geo-leader-track { height: 11px; overflow: hidden; border-radius: 999px; background: #eef2f6; }
.geo-leader-fill { height: 100%; border-radius: inherit; }
.geo-leader-fill.is-brand { background: var(--brand); }
.geo-leader-fill.is-leader { background: var(--accent); }
.geo-leader-line strong { font-size: 15px; font-weight: 750; line-height: 1; text-align: right; }
.geo-action-head { margin-bottom: 18px; }
.geo-action-head h2 { max-width: 640px; line-height: 1.4; }
.geo-action-btn { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 7px 16px; border: 1px solid var(--border); border-radius: 14px; color: var(--brand-deep); background: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 8px 18px rgba(15, 55, 95, .06); }
.geo-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.geo-action-tile { min-width: 0; padding: 17px 18px 18px; border-radius: 18px; background: #f5f9fb; box-shadow: inset 3px 3px 8px rgba(15, 55, 95, .05), inset -3px -3px 8px rgba(255, 255, 255, .95); }
.geo-action-label { display: block; color: var(--fg-muted); font-size: 12px; }
.geo-action-value { display: block; margin-top: 9px; color: var(--fg); font-size: 19px; font-weight: 750; line-height: 1.25; }
.geo-action-value.is-warn { color: #d9465f; }
.geo-action-value.is-ok { color: var(--brand-deep); }
.geo-action-desc { margin: 9px 0 0; color: var(--fg-muted); font-size: 13px; line-height: 1.55; }
.geo-action-foot { margin: 16px 0 0; color: var(--fg-muted); font-size: 12px; text-align: right; }

/* Diagnosis setup form. */
.diagnosis-launch-page { display: grid; gap: 24px; }
.diagnosis-launch-hero { display: flex; min-height: 180px; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .65); border-radius: 20px; background: linear-gradient(165deg, rgba(255, 255, 255, .93), rgba(255, 255, 255, .74)); box-shadow: 0 16px 40px rgba(15, 55, 95, .1); }
.diagnosis-launch-hero > div { min-width: 0; }
.diagnosis-launch-hero h1 { margin: 9px 0 0; color: var(--fg); font-size: 32px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.diagnosis-launch-hero p:last-child { max-width: 720px; margin: 22px 0 0; color: var(--fg-muted); font-size: 14px; line-height: 1.65; }
.diagnosis-launch-hero > .ghost-button { align-self: flex-end; margin-bottom: -1px; }
.diagnosis-form { position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, .65); border-radius: 20px; background: linear-gradient(165deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72)); box-shadow: 0 16px 40px rgba(15, 55, 95, .1); }
.diagnosis-form::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, #1ccbb8, #1b95df 58%, #ff794d); }
.diagnosis-form-head { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 22px; border-bottom: 1px solid var(--border); background: linear-gradient(105deg, rgba(227, 248, 244, .88), rgba(240, 248, 254, .83)); }
.diagnosis-form-head h3 { margin: 7px 0 0; color: var(--fg); font-size: 16px; font-weight: 700; }
.diagnosis-form-head > p { max-width: 560px; margin: 0; color: var(--fg-muted); font-size: 13px; line-height: 1.5; text-align: right; }
.diagnosis-strategy-body { display: grid; gap: 20px; padding: 22px; }
.diagnosis-strategy-field { display: grid; gap: 6px; color: var(--fg-muted); font-size: 13px; font-weight: 650; }
.diagnosis-strategy-field em { margin-left: 6px; color: var(--brand-deep); font-style: normal; font-size: 12px; }
.diagnosis-input { width: 100%; max-width: 640px; min-height: 49px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--fg); background: rgba(255, 255, 255, .9); font-size: 16px; font-weight: 400; outline: 0; }
.diagnosis-input:focus { border-color: rgba(0, 139, 126, .55); box-shadow: 0 0 0 3px rgba(0, 139, 126, .1); }
.diagnosis-strategy-summary { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #f8fafc; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.summary-grid article { min-width: 0; min-height: 72px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.summary-grid span { display: block; color: var(--fg-muted); font-size: 12px; }
.summary-grid strong { display: block; overflow: hidden; margin-top: 6px; color: var(--fg); font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.summary-block-title { margin: 0 0 8px; color: var(--fg-muted); font-size: 13px; font-weight: 700; }
.summary-model-list, .summary-keyword-list { display: flex; flex-wrap: wrap; gap: 7px; }
.summary-model-pill { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; }
.summary-model-pill img { width: 16px; height: 16px; padding: 0; border: 0; object-fit: contain; }
.summary-keyword-list span { display: inline-flex; max-width: 100%; padding: 4px 9px; border-radius: 7px; color: #3f4d6b; background: #eef3ff; font-size: 13px; }
.diagnosis-summary-empty { display: grid; min-height: 180px; place-items: center; border: 1px dashed var(--border); border-radius: 14px; color: var(--fg-muted); background: #f8fafc; font-size: 14px; }
.form-footer { display: flex; min-height: 72px; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 22px; padding: 6px 0 16px; border-top: 1px solid var(--border); }
.diagnosis-run-btn { min-width: 168px; }
.diagnosis-run-meta { display: grid; min-width: 0; gap: 4px; }
.diagnosis-run-meta strong { color: var(--brand-deep); font-size: 13px; }
.diagnosis-run-meta small { color: var(--fg-muted); font-size: 12px; line-height: 1.45; }
.diagnosis-form-empty { display: grid; justify-items: start; gap: 9px; padding: 28px; border: 1px dashed var(--border); border-radius: 18px; color: var(--fg-muted); background: #fff; }
.diagnosis-form-empty strong { color: var(--brand-deep); font-size: 18px; }

/* Historical report queue. */
.diagnosis-queue { display: grid; gap: 18px; }
.queue-hero { display: flex; min-height: 165px; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px solid rgba(0, 139, 126, .16); border-radius: 20px; background: radial-gradient(circle at top right, rgba(231, 248, 245, .9), transparent 45%), linear-gradient(180deg, #fff, #f7fafc); }
.queue-title { margin: 9px 0 0; color: var(--brand-deep); font-size: clamp(29px, 3vw, 38px); font-weight: 700; line-height: 1.15; }
.queue-subtitle { max-width: 672px; margin: 10px 0 0; color: var(--fg-muted); font-size: 16px; line-height: 1.55; }
.queue-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.queue-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.queue-stats article { min-height: 84px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.queue-stats span { display: block; color: var(--fg-muted); font-size: 13px; }
.queue-stats strong { display: block; margin-top: 7px; color: var(--brand-deep); font-size: 27px; font-weight: 700; line-height: 1; }
.queue-empty { display: grid; min-height: 172px; justify-items: start; align-content: center; gap: 9px; padding: 32px 24px; border: 1px dashed var(--border); border-radius: 18px; color: var(--fg-muted); background: #fff; }
.queue-empty p { margin: 0; color: var(--brand-deep); font-size: 18px; font-weight: 700; }
.queue-empty span { font-size: 16px; line-height: 1.55; }
.queue-list { display: grid; gap: 16px; }
.queue-card { padding: 18px 20px 20px; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .05); }
.queue-card-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.queue-card-title-wrap h2 { margin: 7px 0 0; color: #152238; font-size: 19px; }
.queue-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; color: var(--fg-muted); font-size: 13px; }
.queue-status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 999px; color: #475569; background: #eef2f7; font-size: 12px; font-weight: 700; }
.queue-status[data-status="PROCESSING"], .queue-status[data-status="PENDING"] { color: #1d4ed8; background: #e8f1ff; }
.queue-status[data-status="COMPLETED"] { color: #0b6b50; background: #e8f7f1; }
.queue-status[data-status="FAILED"] { color: #b42318; background: #fff1f0; }
.queue-card-side { min-width: 176px; text-align: right; }
.queue-progress-label { margin: 0; color: var(--fg-muted); font-size: 13px; }
.queue-fail-reason { max-width: 256px; margin: 6px 0 0; color: #b42318; font-size: 12px; line-height: 1.35; text-align: right; }
.queue-progress-track { height: 7px; margin: 7px 0 11px; overflow: hidden; border-radius: 999px; background: #e8edf5; }
.queue-progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f7bf0, #12b5a0); transition: width .28s ease-out; }
.queue-progress-fill.is-waiting { background: linear-gradient(90deg, #2f7bf0, #5aa8ff, #12b5a0, #2f7bf0); background-size: 200% 100%; animation: diagnosis-progress 1.6s linear infinite; }
.queue-progress-fill.is-done { background: linear-gradient(90deg, #0f766e, #12b5a0); }
@keyframes diagnosis-progress { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.queue-detail-link { padding: 0; border: 0; color: var(--brand-deep); background: transparent; font-size: 14px; font-weight: 700; text-decoration: none; }
.queue-detail-link:hover { text-decoration: underline; }
.queue-card-grid { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(192px, 1fr) minmax(256px, 1.4fr); gap: 16px; margin-top: 16px; }
.queue-card-grid h3 { margin: 0 0 9px; color: var(--fg-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.queue-company { margin: 0; color: #152238; font-size: 16px; font-weight: 700; }
.queue-brand { margin: 6px 0 0; color: var(--fg-muted); font-size: 13px; }
.queue-models-hint { margin: -4px 0 10px; color: var(--fg-muted); font-size: 12px; }
.queue-model-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.queue-model-list li { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border: 1px solid rgba(0, 139, 126, .16); border-radius: 999px; color: var(--brand-deep); background: #f4fbf9; font-size: 12px; font-weight: 700; }
.queue-model-list img { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 999px; object-fit: contain; background: #fff; }
.queue-questions ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.queue-questions li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 7px; padding: 7px 9px; border-radius: 10px; color: #24324a; background: #f8fafc; font-size: 14px; line-height: 1.45; }
.q-index { color: #64748b; font-size: 12px; font-weight: 700; }
.queue-muted { margin: 0; color: var(--fg-muted); font-size: 14px; }

@media (max-width: 960px) {
  .geo-hero-card { grid-template-columns: 1fr; }
  .geo-kpi-grid, .geo-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .geo-convert-bar { align-items: stretch; flex-direction: column; }
  .geo-report-header, .geo-action-head, .diagnosis-launch-hero, .queue-hero, .queue-card-head { flex-direction: column; }
  .diagnosis-launch-hero > .ghost-button { align-self: flex-start; margin: 0; }
  .queue-card-side { width: 100%; text-align: left; }
  .queue-fail-reason { text-align: left; }
  .queue-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  #view-root[data-view="diagnostics"], #view-root[data-view="reports"] { padding: 20px 14px 42px; }
  .geo-report-actions { width: 100%; flex-wrap: wrap; }
  .geo-report-actions > * { flex: 1 1 auto; }
  .geo-kpi-grid, .geo-action-grid, .summary-grid, .queue-stats { grid-template-columns: 1fr; }
  .geo-leader-head { flex-direction: column; }
  .geo-leader-rows > li { grid-template-columns: 1fr; gap: 7px; }
  .diagnosis-launch-hero { min-height: 0; padding: 24px 20px; }
  .diagnosis-launch-hero h1 { font-size: 27px; }
  .diagnosis-form-head { align-items: flex-start; flex-direction: column; }
  .diagnosis-form-head > p { text-align: left; }
  .diagnosis-strategy-body { padding: 18px; }
  .form-footer { align-items: stretch; flex-direction: column; margin: 0 18px; padding-top: 16px; }
  .form-footer > button { width: 100%; }
  .queue-title { font-size: 31px; }
  .queue-subtitle { font-size: 14px; }
  .queue-hero-actions { width: 100%; }
  .queue-hero-actions > button { flex: 1 1 auto; }
}
@media print {
  #monitor-sidebar, .mobile-app-bar, .geo-report-actions, .geo-convert-actions, .geo-action-head-btns { display: none !important; }
  .app-shell.reference-nav-shell:not(.monitor-shell) { display: block; }
  #view-root[data-view="diagnostics"] { padding: 0; }
  .geo-report { max-width: none; }
}

/* Compact horizontal model chips for the inclusion query picker. */
.ym-inclusion-query-layout { grid-template-columns: minmax(0, 1fr); }
.ym-inclusion-query-layout > .panel { min-width: 0; }
.ym-inclusion-platform-field { margin-top: 2px; padding: 12px 14px; border-color: #dbe3eb; border-radius: 12px; background: #fbfcfe; }
.ym-inclusion-platform-field legend { padding: 0 7px; color: #43576d; font-size: 13px; font-weight: 700; }
.ym-inclusion-query-layout .ym-inclusion-platform-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.ym-inclusion-platform-option { position: relative; display: flex; flex: 0 1 auto; width: auto; min-width: 120px; max-width: 180px; min-height: 50px; align-items: center; justify-content: flex-start; gap: 9px; overflow: hidden; border: 1px solid #d9e0e8; border-radius: 10px; padding: 8px 12px; background: #fff; box-shadow: none; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.ym-inclusion-platform-option:hover { border-color: #a8c8d1; background: #fbfefe; box-shadow: 0 2px 7px rgba(26, 54, 85, .06); }
.ym-inclusion-platform-option:has(input:checked) { border-color: #71bdb4; background: #f1faf8; box-shadow: inset 0 0 0 1px rgba(41, 157, 148, .08); }
.ym-inclusion-platform-option:has(input:disabled) { cursor: not-allowed; opacity: .58; }
.ym-inclusion-platform-option input { width: 16px; min-width: 16px; min-height: 16px; flex: 0 0 16px; margin: 0; accent-color: #128d83; }
.ym-inclusion-platform-option .ym-platform-logo { width: 27px; height: 27px; flex: 0 0 27px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; object-fit: contain; }
.ym-inclusion-platform-option > span { display: block; flex: 1 1 auto; min-width: 0; max-width: 100%; text-align: left; }
.ym-inclusion-platform-option b { display: block; overflow: hidden; color: #344256; font-size: 13px; font-weight: 650; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ym-inclusion-platform-option small { display: none; }
.ym-inclusion-query-layout #inclusion-external-form > .primary-button { width: 50%; min-width: 180px; justify-self: center; }
@media (max-width: 560px) {
  .ym-inclusion-platform-field { padding: 10px; }
  .ym-inclusion-query-layout .ym-inclusion-platform-grid { gap: 7px; }
  .ym-inclusion-platform-option { min-width: 112px; min-height: 46px; padding: 6px 9px; }
  .ym-inclusion-platform-option input { width: 15px; min-width: 15px; min-height: 15px; flex-basis: 15px; }
  .ym-inclusion-platform-option .ym-platform-logo { width: 24px; height: 24px; flex-basis: 24px; }
  .ym-inclusion-query-layout #inclusion-external-form > .primary-button { width: 50%; min-width: 150px; }
}

/* One compact, wrapping model-picker pattern shared across workspace modules. */
.ym-platform-grid:not(.ym-inclusion-platform-grid),
.provider-choice-grid,
.strategy-provider-grid,
.article-provider-grid,
.monitor-editor-providers {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 9px;
  width: 100%;
}
.ym-platform-option:not(.ym-inclusion-platform-option),
.provider-choice,
.strategy-provider-choice,
.article-provider-option,
.monitor-editor-provider {
  position: relative;
  display: flex !important;
  flex: 0 1 184px;
  width: auto;
  min-width: 120px;
  max-width: 180px;
  min-height: 50px;
  align-items: center;
  justify-content: flex-start;
  gap: 9px !important;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #dce5eb;
  border-radius: 10px;
  padding: 8px 11px;
  color: #34465a;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 54, 85, .025);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.ym-platform-option:not(.ym-inclusion-platform-option):hover,
.provider-choice:hover,
.strategy-provider-choice:hover,
.article-provider-option:hover,
.monitor-editor-provider:hover {
  border-color: #9bcfc9;
  background: #fbfefd;
  box-shadow: 0 3px 9px rgba(20, 90, 90, .07);
}
.ym-platform-option:not(.ym-inclusion-platform-option):has(input:checked),
.provider-choice:has(input:checked),
.strategy-provider-choice:has(input:checked),
.article-provider-option:has(input:checked),
.monitor-editor-provider:has(input:checked) {
  border-color: #70bbb3;
  background: #f0faf8;
  box-shadow: inset 0 0 0 1px rgba(41, 157, 148, .08);
}
.ym-platform-option:not(.ym-inclusion-platform-option):has(input:disabled),
.provider-choice:has(input:disabled),
.strategy-provider-choice:has(input:disabled),
.article-provider-option:has(input:disabled),
.monitor-editor-provider:has(input:disabled) {
  cursor: not-allowed;
  opacity: .58;
}
.ym-platform-option:not(.ym-inclusion-platform-option) input,
.provider-choice input,
.strategy-provider-choice input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: #128d83;
}
.ym-platform-option:not(.ym-inclusion-platform-option) .ym-platform-logo,
.provider-choice .model-logo-img,
.strategy-provider-logo,
.monitor-editor-logo {
  width: 27px;
  height: 27px;
  min-width: 27px;
  flex: 0 0 27px;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}
.ym-platform-option:not(.ym-inclusion-platform-option) > span,
.provider-choice > span,
.strategy-provider-choice > span,
.article-provider-option > span,
.monitor-editor-provider > span {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 3px;
  text-align: left;
}
.ym-platform-option:not(.ym-inclusion-platform-option) b,
.ym-platform-option:not(.ym-inclusion-platform-option) small,
.provider-choice b,
.provider-choice small,
.strategy-provider-status,
.article-provider-option b,
.article-provider-option small,
.monitor-editor-provider strong,
.monitor-editor-provider small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ym-platform-option:not(.ym-inclusion-platform-option) b,
.provider-choice b,
.strategy-provider-choice > span,
.article-provider-option b,
.monitor-editor-provider strong {
  color: #344256;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.ym-platform-option:not(.ym-inclusion-platform-option) small,
.provider-choice small,
.strategy-provider-status,
.article-provider-option small,
.monitor-editor-provider small {
  color: #8292a2;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
}
.article-provider-option .article-provider-mark {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 7px;
  font-size: 11px;
}
.article-provider-option i {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid #b8c9cc;
  border-radius: 50%;
}
.article-provider-option:has(input:checked) i {
  border-color: #128d83;
  box-shadow: inset 0 0 0 3px #f0faf8;
  background: #128d83;
}
.article-provider-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.article-provider-option:focus-within,
.monitor-editor-provider:focus-within {
  outline: 3px solid rgba(18, 141, 131, .2);
  outline-offset: 2px;
}
.ym-inclusion-platform-option { min-width: 154px; max-width: 205px; min-height: 54px; }
.ym-inclusion-platform-option small { display: block; }

@media (max-width: 760px) {
  .ym-platform-grid:not(.ym-inclusion-platform-grid),
  .provider-choice-grid,
  .strategy-provider-grid,
  .article-provider-grid,
  .monitor-editor-providers { gap: 8px; }
  .ym-platform-option:not(.ym-inclusion-platform-option),
  .provider-choice,
  .strategy-provider-choice,
  .article-provider-option,
  .monitor-editor-provider { flex-basis: 172px; min-width: 120px; min-height: 50px; }
}
@media (max-width: 420px) {
  .ym-platform-option:not(.ym-inclusion-platform-option),
  .provider-choice,
  .strategy-provider-choice,
  .article-provider-option,
  .monitor-editor-provider { flex-basis: calc(50% - 4px); min-width: calc(50% - 4px); max-width: none; }
}
