.mkt-root { display: grid; gap: 14px; min-width: 0; max-width: 100%; overflow-x: clip; }
.mkt-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.mkt-tile { background: rgba(16, 18, 24, 0.5); border: 1px solid rgba(42, 47, 60, 0.5); border-radius: 12px; padding: 12px 16px; min-width: 0; }
.mkt-tile .k { color: #9aa3b5; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.mkt-tile .v { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 2px; }
.mkt-tile .sub { color: #9aa3b5; font-size: 12px; }
.mkt-card { background: #101218; border: 1px solid #2a2f3c; border-radius: 16px; padding: 14px 12px 12px; min-width: 0; max-width: 100%; }
.mkt-card h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.mkt-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; margin-bottom: 8px; }
.mkt-head .when { color: #9aa3b5; font-size: 13px; text-align: right; }
.mkt-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
.mkt-table { border-collapse: collapse; width: 100%; min-width: 1080px; font-size: 13px; }
.mkt-table th, .mkt-table td { padding: 7px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid #1c2030; }
.mkt-table th { color: #9aa3b5; font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.mkt-table th button { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; }
.mkt-table td.left, .mkt-table th.left { text-align: left; }
.mkt-table tr.mkt-dim { opacity: .7; }
.mkt-table tr.total td { font-weight: 800; border-top: 1px solid #3a4154; border-bottom: 0; }
/* the shared table style prints a total label in capitals: his Markets row says "Total" */
.mkt-table tr.total td.left { text-transform: none; letter-spacing: 0; }
.mkt-table tbody tr.mkt-line { cursor: pointer; }
.mkt-table tbody tr.mkt-line:hover td { background: #161a24; }
.mkt-table tr.mkt-detail-row > td { padding: 0; white-space: normal; }
.mkt-name { font-weight: 750; }
.mkt-tag { margin-left: 6px; font-size: 10px; letter-spacing: .08em; color: #6d7688; font-weight: 750; }
.mkt-gold { color: #f5c542; font-weight: 750; }
.mkt-green { color: #3ddc84; font-weight: 750; }
.mkt-yellow { color: #f5c542; font-weight: 750; }
.mkt-red { color: #f43f5e; font-weight: 750; }
.mkt-dash { color: #6d7688; }
.mkt-foot { color: #9aa3b5; font-size: 12.5px; margin: 10px 2px 0; line-height: 1.45; white-space: normal; }
.mkt-drill { background: #0c0e14; border-bottom: 1px solid #1c2030; }
.mkt-drill-box { display: grid; gap: 12px; padding: 8px 8px 14px; min-width: 0; }
.mkt-drill-cols { display: grid; grid-template-columns: 1.35fr .8fr .85fr; gap: 18px; align-items: start; min-width: 0; max-width: 100%; }
.mkt-drill-cols > * { min-width: 0; max-width: 100%; }
.mkt-drill .mkt-table { min-width: 0; width: 100%; }
.mkt-drill h3 { font-size: 12px; letter-spacing: .04em; color: #9aa3b5; font-weight: 750; margin: 0 0 8px; text-transform: uppercase; }
.mkt-src { min-width: 0; width: 100%; font-size: 14px; }
.mkt-drill td, .mkt-drill th { font-size: 14px; }
.mkt-drill td { color: #9aa3b5; }
.mkt-drill td.left { color: #f4f6fb; font-weight: 400; }
.mkt-drill { margin-top: 12px; padding-top: 8px; border-top: 1px solid #1c2030; }
.mkt-bars { display: grid; gap: 6px; max-width: 520px; }
.mkt-bar { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; min-width: 0; }
.mkt-bar .track { height: 8px; background: #1c2030; border-radius: 99px; overflow: hidden; }
.mkt-bar .fill { height: 100%; background: #eab308; border-radius: 99px; }
.mkt-bar.unknown .fill { background: #f43f5e; }
.mkt-bar.unknown .lab { color: #f43f5e; }
.mkt-note { color: #9aa3b5; font-size: 12px; margin: 6px 0 0; white-space: normal; max-width: 720px; }
.mkt-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 0; background: none; color: inherit; cursor: pointer; text-align: left; padding: 0; }
.mkt-toggle .lab { font-weight: 800; font-size: 16px; }
.mkt-toggle .meta { color: #9aa3b5; font-size: 13px; }
.mkt-chevron { width: 8px; height: 8px; border-right: 2px solid #9aa3b5; border-bottom: 2px solid #9aa3b5;
  transform: rotate(-45deg); transition: transform .15s ease; flex: 0 0 auto; }
.mkt-chevron.open { transform: rotate(45deg); }
.mkt-spend, .mkt-quality { min-width: 0; }
.mkt-quality { border-color: #7f1d32; }
.mkt-quality .count { color: #f43f5e; font-weight: 800; font-size: 22px; }
.mkt-body { margin-top: 12px; display: grid; gap: 10px; min-width: 0; }
.mkt-intro, .mkt-split { color: #c5cad6; font-size: 13px; line-height: 1.45; }
.mkt-split { display: flex; gap: 8px; align-items: flex-start; }
.mkt-split input { margin-top: 3px; }
.mkt-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mkt-field { display: grid; gap: 4px; min-width: 0; }
.mkt-field span { color: #9aa3b5; font-size: 12px; }
.mkt-field input { width: 100%; max-width: 100%; background: #0c0e14; border: 1px solid #2e3444; border-radius: 8px; padding: 6px 8px; }
.mkt-month { color: #9aa3b5; font-size: 12px; font-weight: 750; }
.mkt-synced { color: #c5cad6; font-size: 13px; }
.mkt-empty { background: #101218; border: 1px solid #2a2f3c; border-radius: 16px; padding: 28px 16px; text-align: center; }
.mkt-empty strong { display: block; font-size: 18px; margin-bottom: 10px; }
.mkt-note-line { color: #f0a43a; font-size: 13px; }
@media (max-width: 900px) {
  .mkt-drill-cols { grid-template-columns: 1fr; }
  .mkt-card, .mkt-drill, .mkt-drill-box { overflow-x: clip; }
  .mkt-tiles { grid-template-columns: 1fr 1fr; }
  .mkt-inputs { grid-template-columns: 1fr 1fr; }
  .mkt-tile .v { font-size: 24px; }
  .mkt-src { min-width: 0; }
  .mkt-src th, .mkt-src td { white-space: normal; }
  .mkt-bar { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) auto; max-width: 100%; }
  .mkt-bar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mkt-note { max-width: 100%; }
}
@media (max-width: 390px) {
  .mkt-inputs { grid-template-columns: 1fr; }
  .mkt-bar { grid-template-columns: 96px minmax(0, 1fr) auto; }
}
/* P&L by market (Jacob 11-11). Laptop: a five-column table. Phone: each market reads as a block, no sideways scroll. */
.mkt-pnl { min-width: 0; }
.mkt-pnl .mkt-table.mkt-pnl-table { min-width: 0; width: 100%; font-size: 14px; }
.mkt-pnl-table td.left .mkt-chevron { display: inline-block; margin-left: 8px; vertical-align: middle; }
.mkt-pnl-table tr.mkt-detail-row > td { padding: 0; }
.mkt-pnl .mkt-pnl-table tr.total td { color: #f4f6fb; font-size: 14px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.mkt-pnl .mkt-pnl-table tr.total td.mkt-red { color: #f43f5e; }
.mkt-pnl .mkt-pnl-table tr.total td.mkt-dash { color: #6d7688; }
.mkt-pnl-thru { color: #c5cad6; font-size: 12px; font-weight: 650; margin-top: 2px; }
.mkt-pnl-lines { display: grid; padding: 6px 8px 10px 18px; background: #0c0e14; max-width: 640px; }
.mkt-pnl-cap { color: #9aa3b5; font-size: 11.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.mkt-pnl-sum { display: grid; margin-top: 12px; max-width: 640px; min-width: 0; }
.mkt-pnl-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 2px;
  border-bottom: 1px solid #1c2030; font-size: 14px; min-width: 0; }
.mkt-pnl-line .lab { min-width: 0; overflow-wrap: anywhere; }
.mkt-pnl-line .amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mkt-pnl-line.sub { color: #9aa3b5; font-size: 13px; padding-left: 14px; }
.mkt-pnl-line.total { font-weight: 800; border-top: 1px solid #3a4154; border-bottom: 0; }
button.mkt-pnl-btn { width: 100%; border: 0; border-bottom: 1px solid #1c2030; background: none; color: inherit;
  font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.mkt-pnl-btn .mkt-chevron { display: inline-block; margin-left: 6px; vertical-align: middle; }
.mkt-pnl-tie { font-size: 13px; font-weight: 750; padding: 2px 2px 0; }
.mkt-pnl-tie.ok { color: #3ddc84; }
.mkt-pnl-tie.bad { color: #f43f5e; }
.mkt-pnl-months { display: grid; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #1c2030; min-width: 0; }
.mkt-pnl-mbtn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0;
  border-bottom: 1px solid #1c2030; background: none; color: inherit; cursor: pointer; text-align: left; font: inherit;
  padding: 8px 2px; min-width: 0; }
.mkt-pnl-mbtn .lab { font-weight: 750; font-size: 14px; flex: 0 0 auto; }
.mkt-pnl-mbtn .meta { color: #9aa3b5; font-size: 13px; flex: 1 1 auto; text-align: right; min-width: 0; }
.mkt-pnl-month { padding: 4px 0 10px; min-width: 0; }
@media (max-width: 640px) {
  .mkt-pnl .mkt-table.mkt-pnl-table { font-size: 14px; }
  .mkt-pnl-table thead { display: none; }
  .mkt-pnl-table, .mkt-pnl-table tbody { display: block; width: 100%; }
  .mkt-pnl-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px;
    padding: 10px 2px; border-bottom: 1px solid #1c2030; }
  .mkt-pnl-table td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; min-width: 0; }
  .mkt-pnl-table td[data-label]::before { content: attr(data-label); display: block; color: #9aa3b5; font-size: 11.5px;
    font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
  .mkt-pnl-table td.left { grid-column: 1 / -1; font-weight: 750; font-size: 15px; }
  .mkt-pnl-table td.left::before { content: none; }
  .mkt-pnl-table tr.total { border-top: 1px solid #3a4154; border-bottom: 0; }
  .mkt-pnl-table tr.total td { border-top: 0; }
  .mkt-pnl-table tr.mkt-detail-row { display: block; padding: 0; }
  .mkt-pnl-lines { padding-left: 10px; }
  .mkt-pnl-mbtn { flex-wrap: wrap; }
  .mkt-pnl-mbtn .meta { text-align: left; flex-basis: calc(100% - 30px); order: 3; }
}

/* Cost per appointment tile in the P&L section (ask 889): the OSA tab's blue highlight */
.mkt-cpa { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 10px 0; min-width: 0; }
.mkt-cpa-tile { border: 1px solid #1e3a5f; background: linear-gradient(165deg, #102033, #101218 60%); border-radius: 14px; padding: 12px 16px; text-align: center; min-width: 0; }
.mkt-cpa-k { color: #60a5fa; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mkt-cpa-v { color: #60a5fa; font-size: 30px; font-weight: 800; line-height: 1.15; margin: 4px 0; }
.mkt-cpa-sub { color: #9aa3b5; font-size: 12px; overflow-wrap: anywhere; }
