.connection-setup-action h2 { margin: 8px 0 12px; }
.connection-setup-action p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }

:root {
  color-scheme: dark;
  --bg: #111a29;
  --card: #1a2638;
  --card2: #202e43;
  --line: #34455d;
  --text: #f1f5fa;
  --muted: #b3c1d4;
  --blue: #8bbaff;
  --brand: #0d6efd;
  --yellow: #ffc107;
  --green: #8bdbb2;
  --red: #ffacb7;
  --amber: #ffda72;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-synthesis: none;
}
.ad-management-button { margin-top: 8px; }
.ad-search-terms { display: grid; gap: 18px; }
.ad-search-term { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.ad-search-term:last-child { border-bottom: 0; padding-bottom: 0; }
.ad-search-term h4 { margin: 0 0 6px; overflow-wrap: anywhere; }
.ad-term-tracking { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.ad-term-tracking span { min-width: 0; overflow-wrap: anywhere; }
.ad-term-tracking small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.ad-term-tracking button { width: auto; flex-shrink: 0; margin: 0; }
.ad-term-exclusion { margin-top: 8px; }
.ad-term-exclusion .chart-note { display: block; margin: 8px 0 0; }
.ad-settings-group { padding: 10px 0; border-top: 1px solid var(--line); }
.ad-settings-group summary { color: var(--blue); }
.ad-settings-group[open] > summary,
.ad-detail-fold[open] > summary { margin-bottom: 14px; }
.ad-source-notes { margin-top: 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ad-source-notes > summary { padding: 10px 0; cursor: pointer; }
.ad-source-notes[open] > summary { margin-bottom: 10px; }
.ad-source-notes li + li { margin-top: 6px; }
.ad-prerequisite .secondary-button,
.ad-management-button { font-size: 13px; font-weight: 600; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #0a111d;
  color: var(--text);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
summary,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
summary,
select {
  cursor: pointer;
}
button {
  min-height: 44px;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
a {
  color: var(--blue);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
button {
  border: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 620;
  letter-spacing: -0.25px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
svg {
  display: block;
}
img {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.app {
  max-width: 980px;
  min-height: 100dvh;
  margin: auto;
  background: var(--bg);
  border-inline: 1px solid #26344a;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  background: #142037;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 24px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
.brand img {
  border-radius: 50%;
  background: #fff;
  border: 1px solid #5486c6;
  flex: none;
}
.brand-dot {
  color: var(--yellow);
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
}
main {
  padding: 25px 20px 112px;
  outline: 0;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--blue);
  font-weight: 650;
  margin-bottom: 7px;
}
.intro {
  color: var(--muted);
  font-size: 13px;
  margin-top: 7px;
}
.filters {
  display: flex;
  gap: 10px;
  margin: 22px 0 9px;
}
.period {
  display: flex;
  flex: 1;
  background: #0b1422;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.period button {
  flex: 1;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  min-height: 40px;
  padding: 6px;
}
.period button[aria-pressed="true"] {
  background: #255ba2;
  color: white;
  box-shadow: inset 0 0 0 1px #4787d8;
}
.country {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 0 9px;
  font-size: 14px;
  max-width: 145px;
  min-width: 0;
}
.scope-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 18px;
}
.scope-line .snapshot {
  color: #c1cee0;
}
.data-delay {
  font-size: 12px;
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.data-delay svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
}
.overview {
  min-width: 0;
}
.hero {
  position: relative;
  background: #1e2d43;
  border: 1px solid #42628e;
  border-radius: 14px;
  padding: 19px 19px 4px;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--yellow);
}
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.hero-label {
  font-weight: 550;
  font-size: 14px;
}
.hero .hero-icon {
  color: var(--yellow);
  background: #3b3c31;
  padding: 8px;
  border-radius: 10px;
}
.hero-icon svg {
  width: 20px;
  height: 20px;
}
.hero-number {
  font-size: 37px;
  line-height: 1.2;
  letter-spacing: -1.2px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  margin: 6px 0;
}
.hero-sub {
  color: #c4d2e5;
  font-size: 12px;
}
.delta {
  font-size: 12px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.positive {
  color: var(--green);
}
.negative {
  color: var(--red);
}
.muted {
  color: var(--muted);
}
.hero details {
  border-top: 1px solid #405571;
  margin-top: 15px;
}
.hero summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  min-height: 45px;
  color: #d5e3f5;
  list-style: none;
}
.hero summary:after,
.fold > summary:after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
}
.hero details[open] summary:after,
.fold[open] > summary:after {
  content: "−";
}
summary::-webkit-details-marker {
  display: none;
}
.findability-hero {
  overflow: visible;
  padding-bottom: 19px;
}
.findability-hero-label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hero .findability-metric-help {
  margin: 0;
  border: 0;
}
.hero .findability-metric-help > summary {
  justify-content: center;
  min-height: 32px;
  width: 32px;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
}
.hero details.findability-metric-help > summary:after {
  content: none;
}
.findability-metric-help__text {
  position: absolute;
  z-index: 5;
  top: 62px;
  left: 16px;
  right: 16px;
  padding: 12px;
  border: 1px solid #6381a9;
  border-radius: 9px;
  background: #182639;
  box-shadow: 0 6px 18px #0006;
  color: #e3edf9;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.explanation {
  font-size: 12px;
  color: #c6d3e5;
  padding: 0 0 15px;
}
.explanation p + p {
  margin-top: 9px;
}
.explanation dl {
  margin: 0 0 9px;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #34465f;
  font-size: 12px;
  align-items: baseline;
}
.metric-row dt {
  color: var(--muted);
}
.metric-row dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.metric-row.total {
  font-weight: 650;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.kpi {
  padding: 12px 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
}
.kpi-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  white-space: normal;
}
.kpi-value {
  font-size: 19px;
  display: block;
  margin-top: 3px;
  letter-spacing: -0.4px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kpi-extra {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  margin-top: 16px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.panel-title h2 {
  font-size: 15px;
}
.small {
  font-size: 12px;
  color: var(--muted);
}
.chart-selector {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  min-height: 38px;
}
.chip[aria-pressed="true"] {
  color: var(--blue);
  border-color: #6398d8;
  background: #203d61;
}
.chart {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 130px;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart text {
  fill: var(--muted);
  font:
    10px Arial,
    sans-serif;
}
.chart .gridline,
.mini-trend .gridline {
  stroke: #3a4b62;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart .chartline,
.mini-trend .chartline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .lineBE,
.mini-trend .lineBE {
  stroke: var(--amber);
}
.chart .chartfill {
  fill: #1a4a7c;
  opacity: 0.28;
}
.chart-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.chart-legend {
  display: flex;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  margin-right: 5px;
}
.legend-dot.be {
  background: var(--amber);
}
.fold {
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  min-height: 44px;
  list-style: none;
  color: #cbdaf0;
}
.daily-table {
  max-height: 220px;
  overflow: auto;
  scrollbar-width: thin;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
th,
td {
  text-align: right;
  border-bottom: 1px solid var(--line);
  padding: 7px 3px;
}
th:first-child,
td:first-child {
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
}
.insight {
  display: flex;
  gap: 11px;
  padding: 15px;
  background: #20334a;
  border: 1px solid #426084;
  border-radius: 12px;
  margin-top: 16px;
}
.insight-icon {
  flex: none;
  color: var(--yellow);
  margin-top: 2px;
}
.insight-icon svg {
  width: 19px;
  height: 19px;
}
.insight strong {
  font-size: 13px;
  display: block;
  font-weight: 600;
}
.insight p {
  font-size: 12px;
  color: #c3d1e3;
  margin-top: 4px;
}
.text-button {
  color: var(--blue);
  font-weight: 550;
  background: transparent;
  padding: 10px 0 0;
  text-align: left;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
}
.text-button svg {
  width: 15px;
  height: 15px;
}
.list-section {
  margin-top: 26px;
  min-width: 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.list-intro {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 13px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #101a2b;
  border: 1px solid #415370;
  border-radius: 10px;
  padding: 0 11px;
}
.search svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  flex: none;
}
.search input {
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  font-size: 16px;
  outline-offset: 0;
}
.search input::placeholder {
  color: #93a5bf;
}
.search-clear {
  background: none;
  color: var(--muted);
  min-width: 32px;
  padding: 0;
  font-size: 21px;
}
.list-options {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 11px 0;
}
.list-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}
.list-options select {
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 7px;
  min-height: 44px;
  max-width: 200px;
  padding: 0 7px;
  min-width: 0;
}
.attention-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  min-height: 44px;
  margin: 0 0 6px;
  cursor: pointer;
}
.attention-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}
.product-list {
  display: grid;
  gap: 10px;
}
.product-card {
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.product-card:hover {
  background: #20314a;
  border-color: #6b8ab2;
}
.product-top {
  display: flex;
  gap: 11px;
  align-items: center;
}
.product-image {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: contain;
  background: #fff;
  border-radius: 9px;
  border: 1px solid #506079;
}
.product-name {
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 550;
  min-width: 0;
  flex: 1;
}
.chevron {
  color: #9db6d6;
  flex: none;
}
.chevron svg {
  width: 16px;
  height: 16px;
}
.product-metrics {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.product-metrics .label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}
.product-metrics .value {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: -0.2px;
}
.mini-track {
  display: block;
  height: 3px;
  background: #35465f;
  margin-top: 7px;
  border-radius: 3px;
  overflow: hidden;
}
.mini-track span {
  display: block;
  height: 100%;
  background: var(--yellow);
}
.product-tag {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid #35445b;
  font-size: 11px;
  color: #b8cbe3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-tag .dot {
  width: 5px;
  height: 5px;
  background: var(--amber);
  border-radius: 50%;
  flex: none;
}
.more-button,
.secondary-button {
  background: var(--card2);
  border: 1px solid #4c678e;
  border-radius: 9px;
  color: #d7e6fa;
  padding: 10px 14px;
  font-size: 13px;
  min-height: 44px;
}
.more-button {
  width: 100%;
  margin-top: 12px;
}
.primary-button {
  background: #186bdd;
  color: white;
  border: 1px solid #629cef;
  border-radius: 9px;
  padding: 11px 15px;
  font-weight: 550;
  font-size: 13px;
  min-height: 44px;
}
.empty {
  padding: 30px 15px;
  border: 1px dashed #4a6282;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 5px;
}
.empty button {
  margin-top: 12px;
}
.list-counter {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0 0;
  text-align: center;
}
.footer-note {
  font-size: 11px;
  color: #96abc6;
  line-height: 1.6;
  text-align: center;
  margin-top: 28px;
}
.footer-note button {
  background: transparent;
  color: var(--blue);
  padding: 3px 6px;
  font-size: 11px;
  min-height: 32px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bottom-nav {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 980px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 8px;
  scrollbar-width: thin;
  scrollbar-color: #7aa5df #172438;
  background: #172438f5;
  border-top: 1px solid #3e5577;
  padding: 7px 8px max(8px, env(safe-area-inset-bottom));
  backdrop-filter: blur(14px);
}
.bottom-nav a {
  position: relative;
  flex: 0 0 auto;
  min-width: 78px;
  padding: 8px 10px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  text-decoration: none;
  color: #adbed5;
  font-size: 11px;
  min-height: 53px;
  border-radius: 9px;
  font-weight: 550;
}
.bottom-nav a[aria-current="page"] {
  color: #a9cfff;
  background: #24446d;
}
.bottom-nav a[aria-current="page"]:before {
  content: "";
  position: absolute;
  top: -7px;
  width: 28px;
  height: 3px;
  background: var(--yellow);
  border-radius: 0 0 3px 3px;
}
.bottom-nav svg {
  width: 20px;
  height: 20px;
}
.loading {
  padding: 70px 15px;
  color: var(--muted);
  text-align: center;
}
.mobile-loading-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.mobile-loading-spinner,
button[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: mobile-loading-spin .8s linear infinite;
}
button[aria-busy="true"] { display: inline-flex; gap: 9px; align-items: center; justify-content: center; }
.mobile-loading-status {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 2px 14px;
  color: var(--text);
  background: #17253b;
  border-bottom: 2px solid var(--blue);
  font-size: 12px;
  line-height: 1.5;
}
.mobile-loading-status--dialog { position: sticky; z-index: 4; }
.app > main { padding-top: 32px; }
main[aria-busy="true"] .dashboard-layout,
main[aria-busy="true"] #workspace-body { opacity: .65; pointer-events: none; }
.mobile-frame-status { padding: 14px 0; color: var(--muted); font-size: 13px; }
.loading-skeleton { padding: 32px 0; }
.loading-skeleton__cards { display: grid; gap: 14px; margin-top: 24px; }
.loading-skeleton__cards span { display: block; height: 88px; border-radius: 12px; background: var(--card2); }
@keyframes mobile-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .mobile-loading-spinner, button[aria-busy="true"]::before { animation: none; }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -80px;
  left: 8px;
  padding: 12px;
  background: var(--yellow);
  color: #14223a;
  z-index: 100;
}
.skip:focus {
  top: 8px;
}
dialog {
  color: var(--text);
  background: var(--bg);
  border: 1px solid #4b6384;
  padding: 0;
  box-shadow: 0 25px 100px #0009;
}
dialog::backdrop {
  background: #050a14b8;
  backdrop-filter: blur(4px);
}
.product-dialog {
  width: min(100%, 560px);
  max-width: 100%;
  max-height: 95dvh;
  min-height: 50dvh;
  margin: auto auto 0;
  border-radius: 18px 18px 0 0;
  overscroll-behavior: contain;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #17253b;
  border-bottom: 1px solid var(--line);
  padding: 10px 17px;
}
.back-button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  color: var(--blue);
  padding: 0 4px;
  font-size: 13px;
}
.back-button svg {
  width: 17px;
  height: 17px;
}
.icon-button {
  min-width: 44px;
  background: #253852;
  border: 1px solid #486185;
  border-radius: 9px;
  font-size: 24px;
  line-height: 1;
  color: #d0dff4;
}
.dialog-context {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.product-body {
  padding: 21px 20px 30px;
}
#workspace-title {
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
/* Dialog titles receive programmatic focus for screen readers. Interactive
   controls keep their visible keyboard focus styles. */
#workspace-title:focus {
  outline: none;
}
.detail-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.detail-product img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: white;
  border-radius: 11px;
  flex: none;
}
.detail-product h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.3px;
}
.ean {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  word-break: break-all;
}
.detail-main-metric {
  border: 1px solid #456489;
  border-radius: 12px;
  background: #20344e;
  padding: 17px;
}
.detail-main-metric .metric-label {
  font-size: 12px;
  color: #c4d3e6;
}
.detail-main-metric strong {
  display: block;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.7px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.detail-main-metric p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.detail-heading {
  font-size: 15px;
  margin: 23px 0 12px;
}
.detail-dl {
  margin: 0;
}
.detail-dl .metric-row {
  font-size: 13px;
  padding: 10px 0;
}
.detail-dl .metric-row dt {
  max-width: 70%;
}
.cross-links {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}
.cross-links button {
  flex: 1;
  background: #1e304a;
  border: 1px solid #476284;
  border-radius: 8px;
  font-size: 11px;
  padding: 8px 5px;
  min-height: 47px;
  color: var(--blue);
}
.cross-links button.active {
  border-color: #7ca9e9;
  color: #e5effd;
  background: #2a4972;
}
.detail-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 13px;
  line-height: 1.6;
}
.detail-note.warning {
  padding: 12px;
  border: 1px solid #635c42;
  border-radius: 9px;
  background: #302f28;
  color: #e6d9b3;
}
.reason-row {
  margin: 14px 0;
}
.reason-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.reason-head span {
  color: #d4dfed;
}
.reason-head strong {
  font-weight: 550;
  white-space: nowrap;
}
.reason-track {
  height: 5px;
  border-radius: 5px;
  background: #33465e;
  margin-top: 6px;
  overflow: hidden;
}
.reason-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}
.reason-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.reason-button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  padding: 0;
  min-height: 0;
}
.reason-button .reason-row {
  margin: 16px 0;
}
.reason-button:hover .reason-head span {
  color: var(--blue);
}
.return-record {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 9px;
  font-size: 12px;
  background: var(--card);
}
.return-record-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 8px;
}
.return-record p {
  margin-top: 5px;
  color: #c5d3e5;
  font-size: 11px;
}
.return-record blockquote {
  margin: 9px 0 0;
  padding-left: 9px;
  border-left: 2px solid var(--yellow);
  font-size: 11px;
  color: var(--muted);
}
.record-bottom {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  margin-top: 10px;
  color: #bdcfe6;
  font-size: 11px;
}
.country-tabs {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
.country-tabs button {
  flex: 1;
  border: 1px solid #42618b;
  background: #1c2e49;
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px;
}
.country-tabs button[aria-pressed="true"] {
  background: #285a9a;
  border-color: #6a9bdd;
  color: white;
}
.diagnosis {
  margin-top: 12px;
  border: 1px solid #53684c;
  background: #283932;
  border-radius: 11px;
  padding: 14px;
}
.diagnosis.warn {
  background: #383326;
  border-color: #726548;
}
.diagnosis h3 {
  font-size: 14px;
  color: #d8eadc;
}
.diagnosis.warn h3 {
  color: #ffe5a1;
}
.diagnosis p {
  font-size: 12px;
  color: #cbd4cf;
  margin-top: 7px;
}
.diagnosis.warn p {
  color: #e1d7c2;
}
.snapshot-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.snapshot-label svg {
  width: 14px;
  height: 14px;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 10px;
}
.status-item {
  padding: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.status-item small {
  font-size: 11px;
  display: block;
  color: var(--muted);
}
.status-item strong {
  font-size: 16px;
  margin-top: 3px;
  display: block;
}
.compare-table {
  margin-top: 12px;
  font-size: 12px;
}
.compare-table th,
.compare-table td {
  padding: 10px 5px;
  white-space: normal;
}
.compare-table th {
  font-size: 10px;
}
.compare-table td:first-child {
  color: var(--muted);
  width: 35%;
}
.compare-table .ours {
  color: var(--blue);
  font-weight: 600;
}
.info-dialog {
  width: min(92%, 460px);
  border-radius: 15px;
  max-height: 90dvh;
}
.info-dialog h2 {
  font-size: 17px;
  margin: 0;
}
.info-body {
  padding: 20px;
  font-size: 13px;
  color: #cad7e8;
  line-height: 1.65;
}
.info-body p + p {
  margin-top: 13px;
}
.info-body .primary-button {
  width: 100%;
  margin-top: 22px;
}
.active-filter {
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #203c61;
  border: 1px solid #4774aa;
  padding: 4px 10px;
  border-radius: 8px;
  margin: 9px 0;
  color: #cbe1fc;
  gap: 6px;
}
.active-filter button {
  min-height: 35px;
  background: transparent;
  color: #cbe1fc;
  font-size: 20px;
  padding: 0 5px;
}
.reconciliation {
  font-size: 11px;
  color: var(--amber);
  margin-top: 10px;
}
.reasons-panel {
  padding-bottom: 5px;
}
.reason-value {
  color: var(--text);
}
.modal-open {
  overflow: hidden;
}
@media (min-width: 760px) {
  .header {
    padding: 16px 30px;
  }
  main {
    padding: 28px 30px 112px;
  }
  .dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
  }
  .list-section {
    margin-top: 0;
  }
  .list-options {
    margin: 10px 0;
  }
  .hero-number {
    font-size: 38px;
  }
  .intro {
    max-width: 600px;
  }
  .filters {
    max-width: 470px;
  }
  .scope-line {
    max-width: 470px;
  }
  .data-delay {
    max-width: 470px;
  }
  .bottom-nav a {
    flex-direction: row;
    gap: 10px;
    font-size: 13px;
  }
  .bottom-nav {
    padding: 8px 25px;
  }
  .product-dialog {
    margin: auto;
    max-height: 91dvh;
    border-radius: 16px;
  }
  .product-body {
    padding: 24px;
  }
  .product-card {
    padding: 13px;
  }
  .product-metrics .value {
    font-size: 16px;
  }
}
@media (max-width: 359px) {
  .header {
    padding: 12px 14px;
    gap: 7px;
  }
  .brand {
    gap: 7px;
    font-size: 22px;
  }
  .brand img {
    width: 35px;
    height: 35px;
  }
  main {
    padding: 22px 14px 110px;
  }
  h1 {
    font-size: 24px;
  }
  .hero {
    padding-inline: 15px;
  }
  .hero-number {
    font-size: 33px;
  }
  .kpi-value {
    font-size: 16px;
  }
  .kpi {
    padding: 10px 7px;
  }
  .kpi-label {
    font-size: 10px;
  }
  .country {
    font-size: 12px;
    max-width: 123px;
    padding: 0 4px;
  }
  .period button {
    font-size: 13px;
  }
  .product-metrics .value {
    font-size: 14px;
  }
  .bottom-nav a {
    font-size: 10px;
  }
  .panel {
    padding: 13px;
  }
  .product-body {
    padding: 18px 14px;
  }
  .list-options select {
    max-width: 182px;
  }
  .product-card {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.quality-note {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #6d6547;
  background: #302f28;
  border-radius: 10px;
}
.quality-note > span {
  color: var(--yellow);
  flex: none;
  padding-top: 2px;
}
.quality-note svg {
  width: 17px;
  height: 17px;
}
.quality-note strong {
  font-size: 12px;
  color: #f3df9f;
  font-weight: 600;
}
.quality-note p {
  font-size: 11px;
  color: #d2cbb8;
  margin-top: 3px;
}
.quality-note .text-button {
  font-size: 13px;
  min-height: 44px;
  padding-top: 7px;
}
/* Compact, optional analysis keeps the overview calm. */
.bottom-nav a {
  font-size: 10px;
}
.neutral-scope {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  line-height: 1.4;
}
.analysis-panel {
  padding: 0;
  overflow: hidden;
}
.analysis-panel > summary {
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  list-style: none;
  min-height: 70px;
}
.analysis-panel > summary strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.analysis-panel > summary small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 5px;
}
.disclosure-mark {
  color: var(--blue);
  font-size: 23px;
  min-width: 18px;
  text-align: center;
  flex: none;
}
.disclosure-mark:before {
  content: "+";
}
.analysis-panel[open] > .disclosure-mark:before,
.analysis-panel[open] > summary > .disclosure-mark:before {
  content: "−";
}
.analysis-body {
  border-top: 1px solid var(--line);
  padding: 15px 16px;
}
.pareto-chart,
.rank-chart {
  margin-top: 15px;
  width: 100%;
}
.pareto-chart svg,
.rank-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.pareto-chart text,
.rank-chart text {
  font:
    10px Arial,
    sans-serif;
  fill: var(--muted);
}
.gridline {
  stroke: #3a4b62;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.contribution-list {
  margin-top: 14px;
}
.contribution-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  background: transparent;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  min-height: 62px;
}
.contribution-row:hover .contribution-copy strong {
  color: var(--blue);
}
.rank-number {
  color: var(--muted);
  font-size: 11px;
  min-width: 13px;
}
.contribution-copy {
  display: block;
  flex: 1;
  min-width: 0;
}
.contribution-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
}
.contribution-copy small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
  margin-top: 5px;
}
.contribution-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.contribution-value svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.combination-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
}
.combination-row .product-image {
  width: 40px;
  height: 40px;
}
.combination-row:hover .contribution-copy strong {
  color: var(--blue);
}
.combination-measure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.combination-measure strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.combination-row .reason-track {
  display: block;
}
.combination-row .reason-track > span {
  display: block;
}
.less-button {
  display: block;
  margin: 8px auto 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  min-height: 40px;
  padding: 7px 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.control-buckets {
  margin-top: 12px;
}
.control-bucket {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 0;
  background: none;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  width: 100%;
  text-align: left;
  font-size: 12px;
}
.control-bucket span {
  flex: 1;
}
.control-bucket strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}
.control-bucket svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.control-bucket:hover {
  color: var(--blue);
}
.keyword-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.keyword-choice {
  width: 100%;
  background: var(--card);
  border: 1px solid #557aa8;
  border-radius: 9px;
  padding: 10px;
  font-size: 16px;
  min-height: 46px;
  min-width: 0;
  text-overflow: ellipsis;
}
.keyword-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}
.keyword-metrics > div {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  min-width: 0;
}
.keyword-metrics span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.keyword-metrics strong {
  display: block;
  font-size: 15px;
  line-height: 1.4;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.keyword-row {
  display: block;
  width: 100%;
  padding: 13px 0;
  text-align: left;
  background: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.keyword-row strong {
  font-size: 13px;
  font-weight: 550;
}
.keyword-row span,
.keyword-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.keyword-row:hover strong {
  color: var(--blue);
}
.cross-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cross-links button {
  font-size: 12px;
}
@media (min-width: 760px) {
  .bottom-nav a {
    font-size: 12px;
  }
  .neutral-scope {
    font-size: 12px;
  }
  .cross-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 359px) {
  .bottom-nav {
    padding-inline: 4px;
  }
  .bottom-nav a {
    font-size: 9px;
    gap: 5px;
  }
  .neutral-scope {
    min-width: 90px;
    font-size: 10px;
  }
  .analysis-body {
    padding: 13px;
  }
  .analysis-panel > summary {
    padding: 14px 13px;
  }
  .contribution-row {
    gap: 7px;
  }
  .contribution-value {
    font-size: 11px;
  }
  .keyword-metrics strong {
    font-size: 13px;
  }
}

/* Task screens share the same cards, spacing and dialog model as dashboards. */
.bottom-nav button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 8px 10px;
  min-width: 78px;
  white-space: nowrap;
}
.bottom-nav button svg {
  width: 21px;
  height: 21px;
}
.bottom-nav button[aria-current="page"] {
  color: var(--yellow);
}
.workspace-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  margin: 17px 0;
  background: #15283e;
  border: 1px solid #3e5c7d;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}
.workspace-notice strong {
  color: #dceaff;
  font-size: 12px;
}
.task-hero {
  padding-bottom: 19px;
  margin-top: 20px;
}
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0 22px;
}
.quick-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--blue);
  font-size: 12px;
}
.quick-actions svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.ws-filter-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0;
}
.ws-filter-label select {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  font-size: 16px;
  min-height: 44px;
}
.ws-list-count {
  color: var(--muted);
  font-size: 11px;
  margin: 12px 0;
}
.decision-card {
  display: block;
}
.decision-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.decision-top strong {
  overflow-wrap: anywhere;
}
.task-tag,
.beta-label {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  background: #3b372b;
  color: var(--amber);
  font-size: 10px;
}
.decision-title {
  display: block;
  font-size: 15px;
  margin: 11px 0 4px;
}
.decision-product {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.decision-description {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.6;
}
.decision-card .product-tag {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.decision-card .product-tag svg {
  flex: none;
  width: 14px;
  height: 14px;
}
.primary-button,
.secondary-button,
.warning-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 9px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}
.primary-button {
  background: #2475d8;
  color: white;
  border: 1px solid #5799ea;
}
.secondary-button {
  background: #22334a;
  color: var(--blue);
  border: 1px solid #54749c;
}
.warning-button {
  background: #544727;
  border: 1px solid #b89d48;
  color: #ffeda4;
}
.full-width {
  width: 100%;
  margin-top: 13px;
}
.ws-add-button {
  margin: 6px 0 12px;
}
.queue-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.queue-toolbar button {
  font-size: 12px;
  max-width: 66%;
}
.queue-progress {
  color: var(--yellow);
  font-size: 12px;
  margin: 12px 0;
}
.cost-card {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.cost-select {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  cursor: pointer;
}
.cost-select input {
  accent-color: #74aaff;
  width: 20px;
  height: 20px;
  margin: 0;
}
.cost-card-button {
  flex: 1;
  min-width: 0;
  padding: 14px 12px 14px 0;
  color: var(--text);
  background: none;
  text-align: left;
}
.cost-card-button .product-tag {
  display: block;
  margin: 8px 0 0;
}
.keyword-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.keyword-link-card > div {
  min-width: 0;
}
.keyword-link-card strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.keyword-link-card span,
.keyword-link-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.keyword-link-card button {
  font-size: 12px;
  padding: 8px;
  flex: none;
}
.invoice-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin-top: 13px;
}
.form-field {
  display: block;
  color: #d8e3f1;
  font-size: 12px;
  margin: 16px 0 10px;
}
.form-field input,
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: #101c2d;
  border: 1px solid #57769d;
  color: var(--text);
  border-radius: 9px;
  padding: 11px 10px;
  min-height: 46px;
  margin-top: 6px;
  font-family: inherit;
  font-size: 16px;
}
.form-field input[readonly] {
  background: #223048;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.form-grid > * {
  min-width: 0;
}
.form-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0;
}
.cost-extra {
  margin-top: 18px;
}
.form-feedback {
  border: 1px solid #bb7182;
  background: #372c3e;
  color: #ffe0e6;
  border-radius: 10px;
  padding: 13px;
  margin-top: 15px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.form-feedback.success {
  border-color: #53896e;
  background: #16382d;
  color: #c2f0d8;
}
.form-feedback.warning {
  border-color: #a28a4a;
  background: #393628;
  color: #fff0bf;
}
.form-feedback ul {
  padding-left: 18px;
  margin-bottom: 0;
}
.form-feedback small {
  display: block;
  margin-top: 12px;
  font-size: 10px;
}
.connection-status {
  margin-bottom: 20px;
}
.document-list {
  display: grid;
  gap: 9px;
}
.document-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.document-link small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.document-link svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.document-link > span {
  min-width: 0;
}
.menu-dialog {
  max-width: 500px;
}
.menu-items {
  padding: 10px 18px 22px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 15px 0;
  background: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.menu-item > svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
  flex: none;
}
.menu-item > svg:last-child {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.menu-item > span {
  flex: 1;
  min-width: 0;
}
.menu-item strong {
  font-size: 14px;
  font-weight: 550;
}
.menu-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.desktop-link {
  display: block;
  font-size: 12px;
  text-align: center;
  padding: 19px 0 0;
}
.detail-note + .detail-note {
  margin-top: 8px;
}
@media (min-width: 760px) {
  .bottom-nav button {
    font-size: 12px;
  }
  .menu-item {
    padding-block: 19px;
  }
  .queue-toolbar button {
    max-width: none;
  }
  .form-grid {
    gap: 16px;
  }
}
@media (max-width: 359px) {
  .bottom-nav button {
    font-size: 9px;
  }
  .quick-actions {
    gap: 6px;
  }
  .quick-actions button {
    padding: 10px 8px;
    font-size: 11px;
  }
  .form-grid {
    gap: 8px;
  }
  .form-field input {
    padding-inline: 7px;
  }
  .keyword-link-card {
    padding: 12px;
    gap: 6px;
  }
  .keyword-link-card button {
    font-size: 11px;
  }
}
/* Optional analysis and management details share the same compact vocabulary. */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset:disabled input,
fieldset:disabled select,
fieldset:disabled textarea {
  opacity: 0.72;
  cursor: default;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  background: #253246;
  color: #bdcce0;
}
.status-badge.warning {
  background: #47391f;
  color: #ffda88;
}
.status-badge.danger {
  background: #482732;
  color: #ffabbc;
}
.status-badge.success {
  background: #1c3937;
  color: #9ae0c6;
}
.status-badge.info {
  background: #243b57;
  color: #b2d3ff;
}
.invoice-statuses {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.invoice-open-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 12px;
  color: #b4c6df;
}
.invoice-open-label svg {
  width: 16px;
  height: 16px;
}
.invoice-card.needs-attention {
  border-left: 3px solid #edc16c;
}
.decision-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cost-history {
  margin: 18px 0 24px;
}
.cost-period-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  overscroll-behavior: contain;
}
.cost-period-row {
  display: grid;
  width: 100%;
  gap: 7px;
  text-align: left;
  border: 1px solid #33435c;
  background: #152236;
  color: #edf3ff;
  border-radius: 10px;
  padding: 12px;
}
.cost-period-row[aria-pressed="true"] {
  border-color: #8bbaff;
  background: #1b2d45;
}
.cost-period-row strong {
  font-size: 13px;
}
.cost-period-row > span:not(.status-badge),
.cost-period-row small {
  font-size: 12px;
  color: #bacbe2;
}
.mover-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #2c3a50;
  background: none;
  color: #edf3ff;
  text-align: left;
}
.mover-row > span:first-child {
  flex: 1;
  min-width: 0;
}
.mover-row strong,
.mover-row small {
  display: block;
}
.mover-row strong {
  font-size: 13px;
  line-height: 1.45;
}
.mover-row small {
  margin-top: 5px;
  color: #b1c2d9;
  font-size: 11px;
}
.mover-row > span:last-child {
  white-space: nowrap;
  font-size: 12px;
  display: flex;
  align-items: center;
}
.mover-row svg {
  width: 16px;
  height: 16px;
}
.heat-grid {
  display: grid;
  grid-template-columns: 34px repeat(7, minmax(0, 1fr));
  gap: 3px;
  margin: 18px -5px 12px;
}
.heat-day,
.heat-time {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #bacbe2;
}
.heat-cell {
  min-width: 0;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #f1f6ff;
  background: rgba(72, 135, 223, var(--heat));
  font-size: 11px;
  padding: 0;
}
.heat-cell[aria-pressed="true"] {
  border-color: #ffda88;
  outline: 1px solid #ffda88;
  outline-offset: -3px;
}
.heat-detail {
  background: #152236;
  padding: 14px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 13px;
}
.heat-detail dl {
  margin-bottom: 0;
}
.mini-trend {
  display: block;
  width: 100%;
  height: auto;
  margin: 10px 0;
}
.mini-trend text {
  fill: #adbed7;
  font-size: 9px;
}
.mini-analysis {
  border-bottom: 1px solid #2c3a50;
  padding: 8px 0 18px;
}
.mini-analysis h3 {
  font-size: 14px;
  margin: 8px 0;
}
.mini-latest {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #afc2de;
}
.ad-contribution {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  gap: 9px;
  padding: 14px 0;
  border: 0;
  background: none;
  color: #e1ecff;
  text-align: left;
  font-size: 13px;
}
.ad-contribution > span:first-child {
  min-width: 0;
  line-height: 1.5;
}
.ad-contribution .reason-track {
  grid-column: 1/-1;
}
.ad-contribution .loss-bar {
  background: #ed93a5;
}
.keyword-group {
  margin: 0 0 10px;
}
.keyword-group > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  min-height: 50px;
}
.keyword-group > summary > span:first-child {
  flex: 1;
  min-width: 0;
}
.keyword-group > summary strong,
.keyword-group > summary small {
  display: block;
}
.keyword-group > summary strong {
  font-size: 14px;
  line-height: 1.5;
}
.keyword-group > summary small {
  font-size: 11px;
  color: #b5c8e1;
  margin-top: 5px;
}
.keyword-group .keyword-link-card {
  border: 0;
  border-bottom: 1px solid #2c3a50;
  border-radius: 0;
  padding: 12px 0;
  gap: 12px;
}
.keyword-group .text-button {
  width: 100%;
  text-align: left;
  margin-top: 8px;
}
@media (max-width: 359px) {
  .keyword-link-card {
    flex-wrap: wrap;
  }
  .mover-row {
    gap: 7px;
  }
}

/* Native date controls need a full row on phones, including iOS Safari. */
.cost-dates {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.cost-dates input[type="date"] {
  min-inline-size: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  text-align: left;
}
.cost-dates input::-webkit-date-and-time-value {
  min-height: 1.4em;
  text-align: left;
}
@media (min-width: 520px) {
  .cost-dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
.heat-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 18px;
}
.heat-scale > span:last-child {
  white-space: nowrap;
}
.heat-gradient {
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    rgba(72, 135, 223, 0.1),
    rgba(72, 135, 223, 0.75)
  );
  border: 1px solid rgba(139, 186, 255, 0.15);
}

/* Account and period controls share the same narrow-screen layout. */
.filters {
  flex-wrap: wrap;
  gap: 8px;
}
.period {
  flex-wrap: wrap;
}
.period button {
  padding-inline: 10px;
}
.period-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}
.period-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.period-form input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.shop-header {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.shop-list {
  display: grid;
  gap: 12px;
}
.shop-choice {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
}
.shop-choice > div {
  display: grid;
  gap: 4px;
}
.shop-choice small {
  color: var(--muted);
}
.shop-draft-warning {
  display: flex;
  align-items: start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}
.invoice-management-frame {
  display: block;
  width: 100%;
  height: calc(100dvh - 180px);
  min-height: 380px;
  border: 0;
  border-radius: 12px;
  background: #101b2d;
}
.product-body:has(.invoice-management-frame) {
  padding: 8px;
}
.invoice-settings-button {
  margin-bottom: 16px;
}

#workspace-dialog:has(.invoice-management-frame)[open] {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
#workspace-dialog:has(.invoice-management-frame) .dialog-top {
  flex-shrink: 0;
}
#workspace-dialog .product-body:has(.invoice-management-frame) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.product-body:has(.invoice-management-frame) > h2 {
  display: none;
}
.product-body .invoice-management-frame {
  flex: 1;
  height: 100%;
  min-height: 0;
}

/* Shared touch controls and predictable alignment at every phone width. */
.header {
  gap: 16px;
}
.brand {
  flex: none;
}
.shop-header {
  margin-left: auto;
  justify-content: flex-end;
  flex: 1;
}
.shop-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #496181;
  border-radius: 12px;
  background: #22334c;
  color: #dfebfb;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
}
.shop-switcher .status-dot {
  flex: 0 0 6px;
}
.shop-switcher .shop-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.shop-chevron {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
}
.shop-chevron svg {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
}
.dialog-top h2 {
  margin: 0;
  min-width: 0;
  line-height: 1.3;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
}
.back-button {
  min-height: 44px;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.4;
}
.primary-button svg,
.secondary-button svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.full-width {
  width: 100%;
}
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.filters .period {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: initial;
  width: 100%;
}
.filters .period button {
  min-height: 44px;
  padding: 6px 8px;
  white-space: nowrap;
  font-size: 13px;
}
.filters .country {
  min-height: 44px;
  padding: 0 12px;
}
.filters:not(:has(.country)) {
  grid-template-columns: minmax(0, 1fr);
}
.period-dialog {
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  margin: auto;
}
.period-dialog .dialog-top {
  padding: 12px 18px;
}
.period-intro {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.period-form .period-field {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.period-field input[type="date"] {
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  line-height: 1.5;
}
.period-field input::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.5em;
}
.period-shortcuts button {
  min-height: 44px;
  padding: 10px 8px;
  line-height: 1.3;
}
.period-form .form-help {
  margin: 0;
}
#period-feedback:empty {
  display: none;
}
.period-form > [type="submit"] {
  min-height: 48px;
}
.readonly-action-note {
  padding: 10px 12px;
  margin: 0 0 16px;
  color: var(--muted);
  background: #182941;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}
.product-body:has(.invoice-management-frame) > .readonly-action-note {
  flex-shrink: 0;
  margin: 4px 0 12px;
}
.action-lock {
  border: 1px solid #516b8c;
  background: #182941;
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
}
.action-lock p {
  margin: 8px 0 0;
  color: var(--muted);
}
.ad-context {
  margin-top: 14px;
}
.ad-financial {
  display: grid;
  gap: 6px;
  border-left: 3px solid currentColor;
  padding: 12px 14px;
  margin: 18px 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ad-financial strong { font-size: 22px; }
.ad-financial small { color: var(--muted); }
.ad-financial--spend { color: #f6c65b; }
.ad-financial--scenario { color: #91bdff; }
.ad-context-section + .ad-context-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.ad-context-section h4,
.diagnosis h4 {
  margin: 16px 0 7px;
  font-size: 13px;
  color: var(--text);
}
.ad-context-section h4:first-child {
  margin-top: 0;
}
.ad-context-section p {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.ad-detail-fold > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding-block: 10px;
}
.ad-acos {
  margin: 18px 0;
  font-variant-numeric: tabular-nums;
}
.ad-acos__value {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.ad-acos__plot {
  position: relative;
  padding-top: 6px;
  padding-bottom: 34px;
}
.ad-acos__track {
  position: relative;
  height: 12px;
  border-radius: 4px;
  background: var(--card2);
  overflow: hidden;
}
.ad-acos__within,
.ad-acos__excess {
  position: absolute;
  top: 0;
  bottom: 0;
}
.ad-acos__within {
  left: 0;
  width: var(--ad-within-width);
  background: var(--green);
}
.ad-acos--danger .ad-acos__within { background: var(--blue); }
.ad-acos__excess {
  left: var(--ad-limit-position);
  width: var(--ad-excess-width);
  background: var(--red);
}
.ad-acos__marker {
  position: absolute;
  left: var(--ad-limit-position);
  top: 0;
  height: 25px;
  width: 2px;
  transform: translateX(-1px);
  background: var(--amber);
}
.ad-acos__limit {
  position: absolute;
  top: 28px;
  left: clamp(0px, calc(var(--ad-limit-position) - 72px), calc(100% - 144px));
  width: 144px;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
}
.ad-acos__axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.ad-acos__status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.ad-next-step {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card2);
  padding: 16px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.ad-next-step__label {
  color: var(--muted);
  font-size: 12px;
}
.ad-next-step h3 {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.5;
}
.ad-next-step__step {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 400;
}
.ad-next-step__evidence {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.ad-prerequisite {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card2);
  overflow-wrap: anywhere;
}
.ad-prerequisite h3 { font-size: 16px; margin: 10px 0; }
.ad-prerequisite p { font-size: 13px; line-height: 1.7; }
.ad-prerequisite__item + .ad-prerequisite__item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.ad-workflow {
  margin: 16px 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.ad-workflow > strong { display: block; margin: 6px 0 14px; }
.ad-next-step > .ad-workflow { margin: 20px 0 0; }
.ad-next-step > .ad-detail-fold { margin-bottom: 0; }
.ad-placement-results { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.ad-placement-results h4 { margin: 0 0 12px; font-size: 14px; }
.ad-placement-results .chart-note { line-height: 1.7; }
.ad-term-tracking .ad-term-track-button { min-height: 40px; border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.ad-detail-fold .detail-dl > div {
  align-items: flex-start;
}
.ad-detail-fold .detail-dl dt {
  flex: 1;
  min-width: 0;
}
.ad-detail-fold .detail-dl dd {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ad-evidence {
  margin-top: 16px;
  font-size: 13px;
}
.ad-evidence > summary {
  min-height: 44px;
  padding-block: 10px;
}
.keyword-demand-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 14px;
}
.keyword-demand-chart text {
  fill: var(--muted);
  font:
    11px system-ui,
    sans-serif;
}
.keyword-demand .chart-selector {
  margin-top: 16px;
}
@media (max-width: 479px) {
  .filters {
    grid-template-columns: minmax(0, 1fr);
  }
  .filters .country {
    width: 100%;
    max-width: none;
  }
  .header {
    padding: 12px 14px;
    gap: 12px;
  }
  .brand {
    font-size: 22px;
    gap: 7px;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  .shop-switcher {
    padding: 10px;
    font-size: 12px;
    gap: 6px;
  }
}

/* Secondary actions have the same touch height as primary actions. */
.brand {
  min-height: 44px;
}
.text-button,
.chart-selector button,
button.chip,
.footer-note button,
.more-button,
.less-button,
.country-tabs button {
  min-height: 44px;
}
.heat-cell {
  min-height: 44px;
}

.dialog-top:has(.dialog-context) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 44px;
  gap: 10px;
}
.dialog-context {
  min-width: 0;
  font-size: 10px;
  line-height: 1.35;
}

/* Form controls stay readable without focus zoom on phones. */
.filters .country,
.list-options select,
#ws-filter,
.keyword-choice,
.search input,
#ws-search {
  font-size: 16px;
}

/* The shell owns the date-field edge, including native Safari date controls. */
.period-form {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.period-form .period-field {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.date-input-shell {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid #57769d;
  border-radius: 9px;
  background: #101c2d;
  box-sizing: border-box;
}
.period-field .date-input-shell input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  flex: 1 1 0;
  box-sizing: border-box;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 12px 0;
  background: transparent;
  outline-offset: 3px;
}
.period-field input::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}
.shop-list {
  margin-top: 24px;
}
.shop-choice > div {
  gap: 8px;
}
.shop-choice strong {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.presentation-options {
  display: grid;
  gap: 12px;
}
.presentation-options > label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.presentation-options input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--blue);
}
.presentation-options span {
  display: grid;
  gap: 6px;
}
.presentation-options small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.presentation-options + a {
  margin-top: 14px;
}
.empty-shop {
  text-align: center;
  padding: 24px 18px;
  margin-top: 24px;
}
.empty-shop h2 {
  font-size: 20px;
  margin: 12px 0;
}
.empty-shop p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.empty-shop-icon svg {
  width: 38px;
  height: 38px;
  color: var(--blue);
}
.related-list,
.ad-limit-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.related-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.related-row > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.related-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.related-row small {
  color: var(--muted);
  font-size: 12px;
}
.related-row button {
  padding: 10px 12px;
  font-size: 12px;
}
.ad-limit-row {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: #17253b;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ad-limit-row strong {
  font-size: 13px;
  line-height: 1.5;
}
.ad-limit-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 14px;
}
.ad-limit-values > span {
  display: grid;
  gap: 4px;
}
.ad-limit-values small {
  color: var(--muted);
  font-size: 11px;
}

/* Native select interaction, with one consistent inset chevron. */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23b3c1d4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}
.search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgb(139 186 255 / 18%);
}
.search input:focus-visible {
  outline: none;
}
.chart-touch-surface {
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  border-radius: 8px;
}
.chart-touch-surface svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-readout {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  background: #142034;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.chart-readout-title {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.chart-readout dl {
  margin: 5px 0 0;
  display: grid;
  gap: 4px;
}
.chart-readout dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.chart-readout dt {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chart-readout dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.chart-readout small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.chart-touch-hint {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.chart-cursor {
  stroke: #d5e5ff;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}
.price-star-list {
  margin: 12px 0;
}
.price-star-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.price-star-list dd {
  margin: 0;
  font-weight: 650;
}
.star-icons {
  color: var(--amber);
  letter-spacing: 2px;
  font-size: 18px;
}
.visibility-reason {
  display: grid;
  gap: 5px;
  margin: 14px 0;
}
.visibility-reason > span {
  color: var(--muted);
  font-size: 12px;
}
.price-stars,
.visibility-history {
  margin-top: 16px;
}

.filters select.country,
.list-options select,
.ws-filter-label select,
.form-field select,
select.keyword-choice {
  padding-inline-end: 40px;
}
.list-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
}
.list-options select {
  width: 100%;
  max-width: none;
  padding-inline-start: 12px;
}
.sort-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.sort-inputs.fixed-sort {
  grid-template-columns: minmax(0, 1fr);
}
.sort-inputs button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}
.invoice-quick-filter {
  appearance: none;
  text-align: left;
  font: inherit;
  color: var(--text);
  min-width: 0;
  cursor: pointer;
}
.invoice-quick-filter > span {
  color: var(--muted);
  font-size: 11px;
}
.invoice-quick-filter strong {
  display: block;
  font-size: 24px;
  margin: 6px 0;
}
.invoice-quick-filter small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.invoice-quick-filter[aria-pressed="true"] {
  border-color: #86b8fc;
  background: #203553;
  box-shadow: inset 0 0 0 1px #86b8fc;
}
.invoice-quick-filter[aria-pressed="true"] small {
  color: #c1dcff;
}
.price-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  margin-top: 5px;
  color: var(--amber);
  font-size: 13px;
}
.price-zone > span {
  white-space: nowrap;
  letter-spacing: 1px;
}
.price-zone small {
  color: var(--muted);
  font-size: 10px;
}
.unfilled-stars {
  opacity: 0.5;
}
.price-zone.unknown {
  color: var(--muted);
  font-size: 10px;
}
.price-star-list .current-price-zone {
  padding: 12px;
  margin: 4px -4px;
  border: 1px solid #e8b55f;
  border-radius: 9px;
  background: #30291f;
}
.current-price-zone dd small {
  display: block;
  color: #f5cd8e;
  font-size: 11px;
  margin-top: 3px;
}
.offline-summary {
  margin-top: 18px;
}
.offline-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.offline-summary span {
  font-size: 13px;
}
.offline-summary strong {
  font-size: 28px;
}
.offline-summary p {
  color: var(--muted);
  font-size: 12px;
}
.visibility-reason {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}
.visibility-reason.has-offline {
  border-color: #ad8243;
  border-inline-start: 4px solid #e8b55f;
  background: #30291f;
}
.visibility-reason.has-offline > span {
  color: #e9c995;
}
.visibility-reason strong {
  font-size: 17px;
  color: var(--text);
}
.visibility-day {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.visibility-day > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.visibility-day > div span {
  color: var(--muted);
  font-size: 12px;
}
.visibility-day dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 8px 0 0;
  font-size: 12px;
  gap: 4px;
}
.visibility-day .metric-row {
  margin: 0;
  padding: 0;
  border: 0;
}
.visibility-day dt {
  color: var(--muted);
}
.visibility-day dd {
  margin: 0;
  text-align: right;
}
.visibility-day[hidden] {
  display: none;
}
@media (max-width: 479px) {
  .chart-selector:has(> button:nth-child(4):last-child) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A full metric name remains readable on the smallest phones. */
@media (max-width: 359px) {
  .sort-inputs {
    grid-template-columns: minmax(0, 1fr);
  }
  .sort-inputs button {
    justify-self: end;
  }
  .visibility-day > div {
    flex-wrap: wrap;
  }
}

/* Shared offer actions, presented as compact mobile work. */
.mobile-offer-action {
  border: 1px solid #638cc4;
  border-radius: 14px;
  padding: 16px;
  margin: 18px 0;
  background: #192b42;
}
.mobile-offer-action h3 {
  margin: 12px 0 8px;
  font-size: 18px;
}
.mobile-offer-action p {
  line-height: 1.55;
  font-size: 13px;
}
.mobile-offer-action .chart-note {
  font-size: 11px;
  color: #b5c6de;
}
.offer-method {
  padding: 10px 0;
  border-block: 1px solid #3d526e;
}
.delivery-advice {
  border-inline-start: 3px solid var(--amber);
  padding-inline-start: 12px;
  margin: 12px 0;
}
.pending-prices h2 {
  font-size: 18px;
}
#decision-status {
  margin: 10px 0;
  width: 100%;
}
#mobile-price-dialog {
  width: min(100%, 560px);
  height: min(var(--price-height, 100dvh), 940px);
  max-height: 100dvh;
  max-width: 100vw;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
#mobile-price-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#mobile-price-dialog .dialog-top {
  position: static;
  padding: 14px 16px;
}
#mobile-price-title {
  font-size: 18px;
  margin: 0;
}
.offer-price-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px;
  min-width: 0;
}
.offer-price-body h3 {
  font-size: 18px;
  line-height: 1.4;
}
.price-label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 20px;
}
.price-label input {
  width: 100%;
  font-size: 20px;
  min-height: 50px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 9px;
  text-align: left;
}
.price-references {
  display: grid;
  gap: 8px;
  margin: 12px 0 20px;
}
.price-references button {
  text-align: left;
  min-height: 44px;
  white-space: normal;
}
.offer-price-body .buybox-concept__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.offer-price-body .buybox-concept__fact {
  display: grid;
  gap: 5px;
  font-size: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.offer-price-body .buybox-concept__fact strong {
  font-size: 16px;
}
.offer-price-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
  table-layout: fixed;
}
.offer-price-body th,
.offer-price-body td {
  padding: 10px 4px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.offer-price-body th:first-child,
.offer-price-body td:first-child {
  text-align: left;
  width: 16%;
}
.offer-price-body small {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.offer-price-footer {
  padding: 12px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 -5px 20px #0003;
}
.offer-price-footer .form-feedback:empty {
  display: none;
}
.offer-price-footer .form-feedback {
  margin: 0 0 12px;
  font-size: 12px;
  max-height: 110px;
  overflow: auto;
  line-height: 1.4;
}
#mobile-price-submit {
  min-height: 48px;
}
@media (max-width: 599px) {
  #mobile-price-dialog {
    align-self: end;
    margin: auto auto 0;
    border-radius: 16px 16px 0 0;
  }
}

.offer-price-footer .price-basis {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.offer-price-footer .form-feedback.info {
  background: #203553;
  border-color: #476e9e;
  color: #deebff;
}

.price-label[hidden],
.price-references[hidden] {
  display: none;
}

.mobile-offer-action > .task-tag { display: inline-flex; margin-bottom: 12px; }
.mobile-offer-action > .task-tag + h3 { margin-top: 0; }
.mobile-offer-action > .task-tag + p { margin-top: 0; }

/* Keep status editing separate from diagnosis navigation. */
.decision-status-label { display: block; margin-top: 24px; }
.cost-dates .form-field { display: flex; flex-direction: column; align-items: stretch; }
.cost-dates .cost-date-caption { min-height: 1.4em; }
@media (min-width: 520px) { .cost-dates .cost-date-caption { min-height: 2.8em; } }
.cost-dates input[type="date"] { box-sizing: border-box; display: block; width: 100%; }
.connection-status .status-badge { white-space: normal; text-align: right; }
.connection-status dl { margin-bottom: 0; }
.shop-management { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Paint date-field boxes outside native WebKit date controls. */
.cost-dates .cost-date-control { display:block; width:100%; min-width:0; max-width:100%; box-sizing:border-box; margin-top:6px; border:1px solid #57769d; border-radius:9px; background:#101c2d; }
.cost-dates .cost-date-control input[type="date"] { -webkit-appearance:none; appearance:none; display:block; width:100%; min-width:0; max-width:100%; height:44px; min-height:44px; margin:0; border:0; border-radius:inherit; background:transparent; }
.cost-dates .cost-date-control:focus-within { outline:2px solid #78b6ff; outline-offset:2px; }
.cost-dates .cost-date-control input:focus { outline:none; }
.menu-dialog { max-height:calc(100dvh - 32px); overflow-y:auto; }
.mobile-logout { margin:12px 0 6px; }
.header { gap:10px; }
.account-button { display:flex; flex:none; flex-direction:column; align-items:center; justify-content:center; gap:2px; width:48px; min-height:44px; padding:4px; border:1px solid #496181; border-radius:12px; background:#22334c; color:#dfebfb; font:inherit; font-size:10px; }
.account-button svg { display:block; width:20px; height:20px; }
.account-actions { display:grid; gap:12px; }
.account-actions form { margin:8px 0 0; }
.account-actions .secondary-button { box-sizing:border-box; text-align:center; text-decoration:none; }
.connection-status .panel-title { margin-bottom:0; }
.header { position:sticky; top:0; z-index:40; }
.connection-shop-name { margin:12px 0 0; font-weight:600; overflow-wrap:anywhere; }
.billing-management-frame { display:block; width:100%; min-height:500px; border:0; background:#111a29; }
main:has(.billing-management-frame) { padding:0 0 20px; }
#shop-add { scroll-margin-top:90px; }
@media (max-width:359px) { .header { gap:8px; } .shop-switcher .status-dot { display:none; } .shop-switcher { padding-inline:8px; } }
.shop-manage-card { margin-bottom:16px; }
.shop-manage-card form { margin-top:14px; }
.shop-confirm { display:flex; align-items:flex-start; gap:10px; margin:18px 0; font-size:12px; line-height:1.5; }
.shop-confirm input { flex:none; width:20px; height:20px; margin-top:2px; }

/* Findability shares dated evidence with desktop, in compact native folds. */
.findability-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
.findability-kpis > .kpi:last-child { grid-column:1 / -1; }
.findability-kpis .kpi-label { overflow-wrap:anywhere; }
.shared-findability { font-size:12px; line-height:1.65; }
.shared-findability .findability-diagnosis-item, .shared-findability .findability-context-card { padding:12px 0; border-bottom:1px solid var(--line); }
.shared-findability .findability-diagnosis-item__label, .shared-findability .findability-card-footnote,
.shared-findability .findability-detail-card__intro, .shared-findability .findability-keyword-fit-chip__meta { color:var(--muted); font-size:11px; }
.shared-findability .findability-diagnosis-item__value, .shared-findability .findability-detail-card__title,
.shared-findability .findability-subsection-title { font-weight:650; margin-top:8px; }
.shared-findability .findability-fact-row { display:block; padding:10px 0; border-bottom:1px solid var(--line); }
.shared-findability .findability-fact-label { display:block; color:var(--muted); margin-bottom:4px; }
.shared-findability .findability-keyword-fit-chip { display:flex; flex-wrap:wrap; gap:8px; padding:6px 0; }
.shared-findability .findability-inline-details { padding:10px 0; }
.shared-findability .findability-source-badge { margin-right:8px; }
.shared-findability ul { padding-left:18px; }
.shared-findability table { width:100%; }
.shared-findability a { display:inline-block; padding:10px 0; min-height:44px; }
.shared-findability .findability-catalog-measurement { display:flex; flex-wrap:wrap; gap:4px 10px; padding:10px 0; margin-bottom:12px; border-bottom:1px solid var(--line); color:var(--muted); font-size:11px; }
.shared-findability .findability-catalog-measurement__label { font-weight:600; }
.shared-findability .findability-coverage-table { table-layout:fixed; font-size:12px; }
.shared-findability .findability-coverage-table thead { display:none; }
.shared-findability .findability-coverage-table tbody,
.shared-findability .findability-coverage-table tr { display:block; }
.shared-findability .findability-coverage-table tr { padding:10px 0; border-bottom:1px solid var(--line); }
.shared-findability .findability-coverage-table td { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; padding:4px 0; border:0; text-align:left; overflow-wrap:anywhere; }
.shared-findability .findability-coverage-table td > span:last-child { text-align:right; }
.shared-findability .findability-coverage-table td:first-child { display:block; font-weight:650; }
.shared-findability .findability-coverage__mobile-label { color:var(--muted); font-weight:400; }
.findability-related-list .related-row { min-height:76px; box-sizing:border-box; }
.findability-related-list--scrollable { max-height:162px; overflow-y:auto; overscroll-behavior-y:contain; padding-right:4px; }
.findability-related-list--scrollable:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }

.findability-context-slot { margin-top:24px; }


.keyword-row .keyword-row__heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.keyword-row__heading strong { min-width:0; overflow-wrap:anywhere; }
.keyword-row .keyword-row__evidence { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.keyword-change, .keyword-sponsored { display:inline-block; font-weight:700; white-space:nowrap; }
.keyword-row .keyword-change, .keyword-row .keyword-sponsored { display:inline; margin-top:0; }
.keyword-change--up, .keyword-sponsored--yes, .keyword-row .keyword-change--up, .keyword-row .keyword-sponsored--yes { color:var(--green); }
.keyword-change--down, .keyword-sponsored--no, .keyword-row .keyword-change--down, .keyword-row .keyword-sponsored--no { color:var(--red); }
.keyword-change--neutral, .keyword-sponsored--unknown { color:var(--muted); }
.related-row button { white-space:nowrap; padding:8px; }

.keyword-sponsored { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:7px; }
.keyword-sponsored--yes { background:rgba(139,219,178,.09); }
.keyword-sponsored--no { background:rgba(255,172,183,.07); }
.keyword-row .keyword-sponsored { display:inline-flex; }

.buybox-concept__write-warning { border: 1px solid #d9aa50; border-radius: 9px; padding: 12px 14px; margin: 16px 0; line-height: 1.6; }
.buybox-concept__write-warning strong { display: block; }

/* The complete ad analysis stays beneath its central prerequisite. */
.ad-next-step__followup { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.ad-next-step__note { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 14px 0 0; }
.ad-analysis-fold > summary { color: var(--text); font-size: 15px; }
.ad-analysis-fold[open] > .detail-main-metric { margin-top: 16px; }
.ad-result-scope { display: block; font-size: 12px; color: var(--muted); margin-top: 14px; }
.ad-term-group-results { padding: 12px 0; font-size: 12px; color: var(--muted); }
.ad-term-group-results > summary { cursor: pointer; min-height: 36px; line-height: 1.6; }

.ad-term-signal { display: inline-block; width: fit-content; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.ad-term-signal--review { background: #332a1e; color: #e4ba7a; }
.ad-term-signal--positive { background: #20352e; color: #a8cfb9; }
.ad-term-signal--neutral { background: var(--card2); color: var(--muted); }
.ad-search-terms { max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain; }
.invoice-register-controls {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0;}
.invoice-register-controls .form-field {min-width:0;}
.invoice-register-controls select {width:100%;min-width:0;}
.invoice-register-pagination {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:20px 0 14px;}
.invoice-register-pagination span {font-size:12px;text-align:center;}
.invoice-register-pagination button {padding:10px;}
.invoice-register-size {max-width:220px;}
#mobile-invoice-register .invoice-kpis {margin-bottom:16px;}
#mobile-invoice-register .list-section {scroll-margin-top:80px;}
@media(max-width:359px){.invoice-register-controls {grid-template-columns:minmax(0,1fr);}}
