:root {
  color-scheme: light;
  --accent: #e85d3f;
  --accent-hover: #cc4c32;
  --accent-soft: #fff1ec;
  --teal: #147a6c;
  --teal-soft: #e8f3f0;
  --blue: #24435a;
  --blue-dark: #24435a;
  --blue-soft: #eef2f4;
  --danger: #a7372d;
  --danger-soft: #fff0ee;
  --focus: #e85d3f;
  --ink: #18212b;
  --ink-soft: #35424c;
  --line: #d7dde2;
  --muted: #5b6670;
  --page: #f5f6f7;
  --surface: #ffffff;
  --radius-large: 10px;
  --radius-medium: 8px;
  --shadow: 0 4px 12px rgba(24, 33, 43, 0.08);
  font-family:
    "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-weight: 400;
}

header,
main,
footer,
section,
article,
form,
figure,
canvas {
  min-width: 0;
  max-width: 100%;
}

svg {
  max-width: 100%;
}

button,
input,
select {
  min-width: 0;
  max-width: 100%;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page-shell {
  width: min(calc(100% - 40px), 1200px);
  min-width: 0;
  max-width: 100%;
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-hover);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero {
  min-width: 0;
  padding-block: 30px 34px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--accent-hover);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--accent-hover);
}

h1,
h2,
p,
figure {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.hero-description {
  max-width: 760px;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 400;
}

.dashboard {
  min-width: 0;
  padding-block: 26px 48px;
}

.mobile-section-nav,
.mobile-filter-toolbar,
.back-to-top {
  display: none;
}

.dashboard-status {
  display: flex;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0f2f3;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

#dashboard-status-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-status[hidden] {
  display: none;
}

.dashboard-status.is-error {
  border-color: #e9bcb7;
  background: var(--danger-soft);
  color: var(--danger);
}

.status-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.dashboard-status.is-error .status-spinner {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-button {
  margin-left: auto;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-panel,
.panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(24, 33, 43, 0.045);
}

.filter-panel {
  margin-bottom: 30px;
  padding: 22px 24px;
}

.filter-introduction,
.section-heading,
.panel-heading,
.table-panel-heading {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.filter-introduction > *,
.section-heading > *,
.panel-heading > *,
.table-panel-heading > * {
  min-width: 0;
  max-width: 100%;
}

.filter-introduction > p,
.section-note {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.78rem;
}

.global-filter-grid {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns:
    minmax(170px, 1.2fr)
    repeat(3, minmax(145px, 1fr))
    auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.global-filter-grid > *,
.summary-grid > *,
.analytics-grid > *,
.margin-list > *,
.table-actions > *,
.mobile-filter-toolbar > * {
  min-width: 0;
}

.mobile-filter-toolbar,
#filter-controls {
  min-width: 0;
  max-width: 100%;
}

.control-group {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.control-group label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.date-input-shell {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #aab4bc;
  border-radius: 7px;
  box-sizing: border-box;
  background: #ffffff;
}

.date-input-shell.is-readonly {
  background: #f0f2f3;
}

.date-input-shell:focus-within {
  border-color: var(--accent);
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.date-input-shell input[type="date"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  flex: 1 1 0%;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  background: transparent;
  color: var(--ink);
}

.date-input-shell input[type="date"]:focus-visible {
  outline: 0;
}

.date-input-shell input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

input,
select {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #aab4bc;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.84rem;
}

input[type="date"][readonly] {
  background: transparent;
  color: var(--ink);
  cursor: default;
}

input::placeholder {
  color: #7f8ba0;
}

.secondary-button,
.primary-button {
  max-width: 100%;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.secondary-button {
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent-hover);
}

.secondary-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.primary-button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  border-color: var(--accent);
}

.date-range-helper {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.latest-data-notice {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 0.77rem;
  font-weight: 600;
}

.filter-message {
  min-height: 20px;
  margin: 4px 0 -4px;
  overflow-wrap: anywhere;
  color: var(--danger);
  font-size: 0.77rem;
  font-weight: 600;
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  display: grid;
  min-width: 0;
  max-width: 100%;
  min-height: 136px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(24, 33, 43, 0.035);
}

.summary-card.is-loading .summary-value,
.summary-card.is-loading .summary-comparison,
.summary-card.is-loading .summary-detail {
  color: transparent;
  border-radius: 5px;
  background: #edf1f6;
}

.summary-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 1rem;
  font-weight: 700;
}

.summary-icon-margin {
  background: var(--teal-soft);
  color: var(--teal);
}

.summary-icon-orders {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.summary-icon-products {
  background: #f0f2f3;
  color: var(--ink-soft);
}

.summary-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.summary-value {
  overflow-wrap: anywhere;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.summary-comparison,
.summary-detail {
  min-height: 18px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.comparison-positive {
  color: var(--teal);
  font-weight: 600;
}

.comparison-negative {
  color: var(--accent-hover);
  font-weight: 600;
}

.analysis-metadata {
  margin: 11px 2px 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.74rem;
}

.trend-panel {
  min-width: 0;
  max-width: 100%;
  margin-top: 30px;
}

.trend-panel > * {
  min-width: 0;
  max-width: 100%;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.analytics-grid {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 20px;
  margin-top: 20px;
}

.panel-full {
  grid-column: 1 / -1;
}

.panel-description {
  margin: 6px 0 16px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.81rem;
}

.panel-note {
  margin: 16px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.72rem;
}

.metric-badge {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #f2c2b7;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.panel-key {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.panel-key span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--teal);
}

.chart-region,
.data-region,
.trend-region {
  width: 100%;
  max-width: 100%;
  min-height: 230px;
}

.trend-region {
  min-width: 0;
  min-height: 370px;
}

.trend-region:not(.loading-region) {
  min-height: 0;
}

.loading-region {
  display: grid;
  place-items: center;
}

.loading-bars,
.loading-stack {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 16px;
}

.loading-bars span,
.loading-stack span {
  display: block;
  height: 28px;
  border-radius: 7px;
  background: #e8ecef;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  50% {
    background: #f2f4f5;
  }
}

.loading-bars span:nth-child(1) {
  width: 94%;
}

.loading-bars span:nth-child(2) {
  width: 74%;
}

.loading-bars span:nth-child(3) {
  width: 61%;
}

.loading-bars span:nth-child(4) {
  width: 46%;
}

.loading-stack {
  gap: 11px;
}

.loading-stack span {
  height: 42px;
}

.trend-figure {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 0;
}

.trend-legend {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.legend-item {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
}

.legend-swatch {
  display: inline-block;
  width: 18px;
  height: 3px;
  flex: 0 0 18px;
  border-radius: 2px;
  background: var(--accent);
}

.legend-margin {
  height: 0;
  border-top: 3px dashed var(--teal);
  background: transparent;
}

.legend-missing {
  height: 0;
  border-top: 2px dotted #77828b;
  background: transparent;
}

.trend-chart-canvas {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.trend-chart-canvas svg {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: auto;
  overflow: visible;
}

.trend-mobile-summary {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
}

.trend-summary-group {
  min-width: 0;
  max-width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.trend-summary-revenue {
  border-color: #f2c2b7;
  background: var(--accent-soft);
}

.trend-summary-margin {
  border-color: #aed3ca;
  background: var(--teal-soft);
}

.trend-summary-heading-row {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.trend-summary-accent {
  width: 22px;
  height: 4px;
  flex: 0 0 22px;
  border-radius: 999px;
}

.trend-summary-accent-revenue {
  background: var(--accent);
}

.trend-summary-accent-margin {
  background: var(--teal);
}

.trend-summary-heading {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.trend-summary-stats {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 0;
  margin: 0;
}

.trend-summary-stats > div {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(53, 66, 76, 0.14);
}

.trend-summary-stats dt {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.trend-summary-stats dd {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.trend-summary-period {
  color: var(--muted);
  font-size: 0.75rem;
}

.trend-summary-value {
  color: var(--ink);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.trend-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.trend-axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.trend-y-label {
  text-anchor: end;
}

.trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.75;
}

.trend-line-revenue {
  stroke: var(--accent);
}

.trend-line-margin {
  stroke: var(--teal);
}

.trend-line.trend-line-margin {
  stroke-dasharray: 8 5;
}

.trend-point {
  fill: #ffffff;
  stroke-width: 2.5;
}

.trend-missing-marker {
  fill: #77828b;
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
}

.chart-list,
.category-list,
.margin-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-list {
  gap: 13px;
}

.chart-row {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(145px, 0.48fr) minmax(180px, 1.4fr) 96px;
  align-items: center;
  gap: 13px;
}

.chart-label {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  font-weight: 600;
}

.chart-track,
.category-track,
.margin-track {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.chart-track {
  height: 14px;
}

.chart-bar,
.category-bar,
.margin-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
}

.chart-bar {
  background: var(--accent);
}

.chart-value,
.category-value,
.margin-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.category-list {
  gap: 4px;
}

.category-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.category-item:last-child {
  border-bottom: 0;
}

.category-heading {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
}

.category-name {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  font-weight: 600;
}

.category-track {
  height: 6px;
}

.category-bar {
  background: var(--blue-dark);
}

.margin-list {
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.margin-item {
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: #fafbfa;
}

.margin-name {
  min-height: 42px;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  font-size: 0.79rem;
  font-weight: 600;
}

.margin-value {
  margin-bottom: 9px;
  color: var(--teal);
  font-size: 1.05rem;
  text-align: left;
}

.margin-track {
  height: 6px;
}

.margin-bar {
  background: var(--teal);
}

.margin-rate {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.69rem;
}

.table-panel {
  min-width: 0;
  max-width: 100%;
  margin-top: 20px;
}

.table-panel-heading {
  align-items: flex-end;
}

.table-panel-heading .panel-description {
  margin-bottom: 0;
}

.table-actions {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.search-control {
  width: min(260px, 100%);
  min-width: 0;
  max-width: 100%;
}

.table-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  contain: inline-size;
  -webkit-overflow-scrolling: touch;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

caption {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

thead {
  background: #f4f6f6;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

th[aria-sort="ascending"] .sort-button,
th[aria-sort="descending"] .sort-button {
  color: var(--accent-hover);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f7f9f8;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 3px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.numeric,
.numeric .sort-button {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.numeric .sort-button {
  justify-content: flex-end;
  margin-left: auto;
}

.product-cell {
  font-weight: 600;
}

.margin-positive {
  color: var(--teal);
  font-weight: 700;
}

.table-state {
  padding-block: 32px;
  color: var(--muted);
  text-align: center;
}

.result-count {
  min-height: 20px;
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed #c8d2e0;
  border-radius: 12px;
  background: #fafcff;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.error-state strong {
  color: var(--ink);
}

.error-state {
  border-color: #e9bcb7;
  background: var(--danger-soft);
  color: var(--danger);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #e9ece9;
  color: var(--muted);
}

.footer-content {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
  font-size: 0.72rem;
}

.footer-content p {
  min-width: 0;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.footer-content strong {
  margin-right: 9px;
  color: var(--ink);
  font-weight: 700;
}

.noscript-message {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 20px;
  width: min(420px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--danger);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .global-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .global-filter-grid .secondary-button {
    width: 100%;
    justify-self: stretch;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .panel-full {
    grid-column: auto;
  }

  .margin-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .margin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .table-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .table-actions {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .dashboard {
    padding-bottom: 88px;
  }

  .global-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .date-input-shell,
  .date-input-shell input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .date-input-shell {
    min-height: 44px;
    padding: 0 10px;
  }

  .date-input-shell input[type="date"] {
    min-height: 44px;
    padding: 0;
    font-size: 1rem;
  }

  .mobile-section-nav {
    position: sticky;
    z-index: 40;
    top: 0;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 5px;
    margin-bottom: 16px;
    padding: 9px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 0 0 9px 9px;
    background: var(--surface);
    box-shadow: 0 3px 8px rgba(24, 33, 43, 0.1);
  }

  .mobile-section-nav label {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .mobile-section-nav select {
    min-height: 44px;
  }

  .mobile-filter-toolbar {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
  }

  .filter-panel.is-collapsed .filter-introduction > p {
    display: none;
  }

  .filter-panel.is-collapsed .filter-message:empty {
    min-height: 0;
    margin: 0;
  }

  #filter-summary {
    flex: 1;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
  }

  .filter-toggle {
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 8px 4px;
  }

  .back-to-top {
    position: fixed;
    z-index: 45;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    display: inline-flex;
    min-width: 0;
    max-width: calc(100% - 24px);
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--blue-dark);
    border-radius: 999px;
    background: var(--blue-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 33, 43, 0.22);
    font-size: 0.78rem;
    font-weight: 700;
  }

  #overview-section,
  #trend-section,
  #revenue-section,
  #profitability-section,
  #product-performance-section {
    scroll-margin-top: 76px;
  }

  input,
  select,
  .secondary-button,
  .primary-button {
    min-height: 44px;
  }

  .search-control,
  #product-search {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .search-control {
    flex: 1 1 100%;
  }

  #product-search {
    min-height: 44px;
    font-size: 1rem;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 24px), 1200px);
  }

  .hero {
    padding-block: 24px 28px;
  }

  .dashboard {
    padding-top: 20px;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.08rem;
  }

  .filter-introduction,
  .section-heading,
  .panel-heading,
  .table-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .global-filter-grid,
  .summary-grid,
  .margin-list {
    grid-template-columns: 1fr;
  }

  .global-filter-grid .secondary-button {
    width: 100%;
  }

  .summary-card {
    min-height: 124px;
  }

  .eyebrow,
  .section-kicker,
  .control-group label,
  .date-range-helper,
  .latest-data-notice,
  .filter-message,
  .summary-label,
  .summary-comparison,
  .summary-detail,
  .analysis-metadata,
  .panel-note,
  .metric-badge,
  .panel-key,
  .margin-rate,
  th,
  .result-count,
  .footer-content {
    font-size: 0.75rem;
  }

  .panel,
  .filter-panel {
    padding: 16px;
    border-radius: 12px;
  }

  .chart-row {
    grid-template-columns: minmax(0, 1fr) minmax(78px, auto);
    gap: 7px 11px;
  }

  .chart-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .chart-value {
    grid-column: 2;
    grid-row: 1;
  }

  .table-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .search-control,
  .primary-button {
    width: 100%;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .footer-content strong,
  .footer-content span {
    display: block;
  }

  .trend-region {
    min-height: 220px;
  }

  .trend-region:not(.loading-region) {
    min-height: 0;
  }

  .trend-axis-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(calc(100% - 20px), 1200px);
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1rem;
  }

  .filter-panel,
  .panel {
    padding: 14px;
  }

  .summary-card {
    padding: 14px;
  }

  .trend-panel {
    padding: 12px;
  }

  .trend-panel .panel-heading {
    gap: 5px;
  }

  .trend-panel .panel-description {
    margin-bottom: 10px;
  }

  .trend-summary-group {
    padding: 11px 12px;
  }
}

@media (max-width: 360px) {
  .page-shell {
    width: min(calc(100% - 16px), 1200px);
  }

  .filter-panel,
  .panel {
    padding: 12px;
  }

  .trend-panel {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
