/* Square Deal Tools — Self-Hosted Stylesheet (Zero JS Required) */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local("IBM Plex Sans"), url("/static/fonts/IBMPlexSans-Variable.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: local("IBM Plex Mono"), url("/static/fonts/IBMPlexMono-Regular.woff2") format("woff2");
}

:root {
  --bg-paper: #FBFBF9;
  --bg-card: #FFFFFF;
  --bg-elevated: #F2F3F5;
  --bg-subtle: #F7F8F9;
  --bg-row-hover: #F6F9F8;
  --ink: #1B1F23;
  --ink-secondary: #3A4047;
  --ink-muted: #545B63;
  --btn-fg: #FFFFFF;
  --border: #E3E5E8;
  --border-strong: #C9CDD2;
  --teal: #0F6E6A;
  --teal-dark: #0A4F4C;
  --teal-tint: #E6F2F1;
  --teal-cell-tint: #F2F8F7;
  --coupon-cell-tint: #F8FCFB;
  --teal-border: #B9DBD8;
  --itc-blue: #1D4ED8;
  --itc-tint: #EFF6FF;
  --itc-cell-tint: #F5F8FF;
  --itc-border: #C7D9FE;
  --warn-orange: #B4400B;
  --warn-text-strong: #7C2804;
  --warn-tint: #FDF0EA;
  --warn-border: #F5C3B0;
  --amber: #8A5A00;
  --amber-tint: #FEF7E6;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-paper: #0D1117;
    --bg-card: #161B22;
    --bg-elevated: #21262D;
    --bg-subtle: #1B2129;
    --bg-row-hover: #1A2426;
    --ink: #ECF0F4;
    --ink-secondary: #B8C0CC;
    --ink-muted: #848D97;
    --btn-fg: #0D1117;
    --border: #29303A;
    --border-strong: #3B434F;
    --teal: #1D9A94;
    --teal-dark: #45D9D2;
    --teal-tint: rgba(29, 154, 148, 0.18);
    --teal-cell-tint: rgba(29, 154, 148, 0.11);
    --coupon-cell-tint: rgba(29, 154, 148, 0.06);
    --teal-border: #1F5E5B;
    --itc-blue: #60A5FA;
    --itc-tint: rgba(96, 165, 250, 0.16);
    --itc-cell-tint: rgba(96, 165, 250, 0.10);
    --itc-border: #254B85;
    --warn-orange: #F97316;
    --warn-text-strong: #FDBA74;
    --warn-tint: rgba(249, 115, 22, 0.14);
    --warn-border: #7C2D12;
    --amber: #FBBF24;
    --amber-tint: rgba(251, 191, 36, 0.14);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-paper: #0D1117;
  --bg-card: #161B22;
  --bg-elevated: #21262D;
  --bg-subtle: #1B2129;
  --bg-row-hover: #1A2426;
  --ink: #ECF0F4;
  --ink-secondary: #B8C0CC;
  --ink-muted: #848D97;
  --btn-fg: #0D1117;
  --border: #29303A;
  --border-strong: #3B434F;
  --teal: #1D9A94;
  --teal-dark: #45D9D2;
  --teal-tint: rgba(29, 154, 148, 0.18);
  --teal-cell-tint: rgba(29, 154, 148, 0.11);
  --coupon-cell-tint: rgba(29, 154, 148, 0.06);
  --teal-border: #1F5E5B;
  --itc-blue: #60A5FA;
  --itc-tint: rgba(96, 165, 250, 0.16);
  --itc-cell-tint: rgba(96, 165, 250, 0.10);
  --itc-border: #254B85;
  --warn-orange: #F97316;
  --warn-text-strong: #FDBA74;
  --warn-tint: rgba(249, 115, 22, 0.14);
  --warn-border: #7C2D12;
  --amber: #FBBF24;
  --amber-tint: rgba(251, 191, 36, 0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--btn-fg);
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--teal);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.header-search {
  flex: 1 1 320px;
  max-width: 520px;
  display: flex;
  gap: 8px;
}

.header-search input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  background: var(--bg-paper);
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-teal {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.nav-link:hover, .nav-link[aria-current="page"] {
  background: var(--bg-elevated);
  color: var(--ink);
  font-weight: 600;
}

.mobile-menu {
  display: none;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Hero / Search Section */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0;
  color: var(--ink-muted);
  font-size: 16px;
}

.hero-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-search-input {
  flex: 999 1 280px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  background: var(--bg-paper);
  color: var(--ink);
}

.hero-search-btn {
  min-height: 48px;
  padding: 0 22px;
  font-size: 16px;
  border-radius: 8px;
}

.hero-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--ink-muted);
}

.hero-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hero-chip,
.hero-chip:link,
.hero-chip:visited {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.hero-chip:hover {
  background: var(--teal-tint);
  border-color: var(--teal);
  color: var(--teal-dark);
}

.hero-code-pill {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 12px;
}

/* Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  scroll-margin-top: 20px;
}

.stat-card,
.stat-card:link,
.stat-card:visited,
.stat-card:hover,
.stat-card:active {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

a.stat-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.stat-card.active {
  border: 2px solid var(--ink);
  background: var(--bg-elevated);
  padding: 13px 15px;
}

.stat-card.active-teal {
  border: 2px solid var(--teal);
  background: var(--teal-tint);
  padding: 13px 15px;
}

.stat-card.active-itc {
  border: 2px solid var(--itc-blue);
  background: var(--itc-tint);
  padding: 13px 15px;
}

.stat-card.active-amber {
  border: 2px solid var(--amber);
  background: var(--amber-tint);
  padding: 13px 15px;
}

.stat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.stat-active-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.stat-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Filter Bar (3 Distinct Filter Groups) */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 28px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group-dept {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.filter-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.filter-reset-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.filter-reset-link:hover {
  text-decoration: underline;
}

.segmented-track {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 8px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.filter-pill:hover {
  background: var(--bg-card);
  color: var(--ink);
}

.dept-pill {
  border-color: var(--border-strong);
  background: var(--bg-paper);
}

.dept-pill:hover {
  border-color: var(--ink-muted);
  background: var(--bg-elevated);
}

.more-pills-details {
  display: contents;
}

.more-pills-details:not([open]) > :not(summary) {
  display: none;
}

.more-pills-summary {
  cursor: pointer;
  list-style: none;
  border-style: dashed;
  color: var(--teal-dark);
  font-weight: 600;
}

.more-pills-summary::-webkit-details-marker {
  display: none;
}

.more-pills-details[open] > .more-pills-summary {
  background: var(--bg-elevated);
  border-style: solid;
  border-color: var(--ink-muted);
}

.filter-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--btn-fg);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.filter-pill.teal-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

.filter-pill.itc-pill.active {
  background: var(--itc-blue);
  border-color: var(--itc-blue);
  color: var(--btn-fg);
}

.filter-pill.amber-pill.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--btn-fg);
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.pagination-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.pagination-btn.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-brand {
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: 11px;
}

.badge-teal {
  background: var(--teal-tint);
  color: var(--teal-dark);
}

.badge-itc {
  background: var(--itc-tint);
  color: var(--itc-blue);
  border: 1px solid var(--itc-border);
}

.badge-amber {
  background: var(--amber-tint);
  color: var(--amber);
}

.badge-warn {
  background: var(--warn-tint);
  color: var(--warn-orange);
}

.badge-neutral {
  background: var(--bg-elevated);
  color: var(--ink-secondary);
}

/* Responsive Deal Table -> Mobile Cards */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.deal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.deal-table thead tr {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
}

.deal-table th {
  padding: 12px 16px;
  font-weight: 600;
  white-space: nowrap;
}

.deal-table th.col-center,
.deal-table td.col-center {
  text-align: center;
}

.deal-table th.col-right,
.deal-table td.col-right {
  text-align: right;
}

.deal-table tbody tr {
  border-top: 1px solid var(--border);
}

.deal-table tbody tr:first-child {
  border-top: none;
}

.deal-table tbody tr:hover {
  background: var(--bg-row-hover);
}

.deal-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.item-cell-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}

.item-cell-link:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

.btn-history,
.btn-history:link,
.btn-history:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-history:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

/* Recall Alert Banner */
.recall-banner {
  border: 2px solid var(--warn-orange);
  background: var(--warn-tint);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* Item Detail Page — Matched-Height Hero & Price Strip */
.item-hero-split {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: stretch;
}

.product-image-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-card img {
  max-width: 100%;
  max-height: 190px;
  height: auto;
  object-fit: contain;
}

.item-right-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.item-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.item-h1 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.price-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  background: var(--bg-card);
  border: 1.5px solid var(--teal);
  border-radius: 10px;
  overflow: hidden;
  flex: 1;
  min-height: 118px;
}

.price-strip.itc-border {
  border-color: var(--itc-border);
}

.price-strip.amber-border {
  border-color: var(--amber);
}

.price-strip.neutral-border {
  border-color: var(--border-strong);
}

.strip-cell {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.strip-cell:last-child {
  border-right: none;
}

.strip-cell.tint-teal {
  background: var(--teal-cell-tint);
}

.strip-cell.tint-itc {
  background: var(--itc-cell-tint);
}

.strip-cell.tint-amber {
  background: var(--amber-tint);
}

.strip-cell.tint-coupon {
  background: var(--coupon-cell-tint);
}

.cell-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.cell-value {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cell-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.item-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.badge-subtle {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

code.mono {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.deal-item-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deal-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb-nav {
  font-size: 14px;
  color: var(--ink-muted);
}

.breadcrumb-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.variant-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variant-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.variant-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variant-pill {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.variant-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.variant-pill.active {
  border: 2px solid var(--teal);
  background: var(--teal-tint);
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.dept-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dept-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.dept-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.about-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.about-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-disclosure {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink-muted);
}

.not-found-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
  margin: 12px auto;
  width: 100%;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* Mobile Responsive (<760px) */
@media (max-width: 760px) {
  .container, .header-inner, .main-content, .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-content {
    padding-top: 18px;
    padding-bottom: 40px;
    gap: 18px;
  }

  .header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .brand-link {
    order: 1;
  }

  .desktop-nav {
    display: none;
  }

  .theme-toggle-btn {
    order: 2;
    margin-left: auto;
  }

  .mobile-menu {
    display: block;
    position: relative;
    order: 2;
  }

  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .mobile-menu summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: var(--bg-card);
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  /* Compact Hero on Mobile */
  .hero-card {
    padding: 16px;
    gap: 12px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-search-btn {
    width: 100%;
  }

  /* 2-Column Compact Stats Grid on Mobile */
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stats-strip > .stat-card:first-child:nth-last-child(5) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .stat-card,
  .stat-card:link,
  .stat-card:visited,
  .stat-card:hover,
  .stat-card:active {
    padding: 10px 12px;
  }

  .stat-card.active,
  .stat-card.active-teal,
  .stat-card.active-itc,
  .stat-card.active-amber {
    padding: 9px 11px;
  }

  .stat-value {
    font-size: 19px;
  }

  .stat-sub {
    font-size: 11px;
  }

  /* Horizontal Touch-Scroll Filter Strips on Mobile */
  .filter-bar {
    padding: 12px 14px;
    gap: 12px;
  }

  .filter-top-row {
    gap: 12px;
  }

  .filter-group {
    width: 100%;
    min-width: 0;
  }

  .segmented-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .segmented-track::-webkit-scrollbar {
    display: none;
  }

  .filter-group-dept {
    padding-top: 10px;
  }

  .filter-group-dept .pill-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-group-dept .pill-row::-webkit-scrollbar {
    display: none;
  }

  .filter-group-dept .dept-pill {
    flex-shrink: 0;
  }

  /* Product Page Mobile Adjustments */
  .item-hero-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-image-card {
    margin: 0 auto;
    width: 100%;
    max-width: 100% !important;
    padding: 14px !important;
  }

  .product-image-card img {
    max-height: 180px;
    width: auto;
  }

  .price-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .strip-cell {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .strip-cell:nth-child(2n) {
    border-right: none;
  }

  .strip-cell:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .strip-cell:nth-child(3):last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    border-right: none;
    border-bottom: none;
  }

  .cell-value {
    font-size: 26px;
  }

  .chart-card {
    padding: 12px 10px !important;
  }

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

  /* Responsive Deal Table -> Individual Mobile Card Bubbles + CTA */
  .table-wrap {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
  }

  .deal-table thead {
    display: none;
  }

  .deal-table, .deal-table tr, .deal-table td {
    display: block;
    width: 100%;
  }

  .deal-table tbody {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }

  .deal-table tbody tr,
  .deal-table tbody tr:first-child {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .deal-table tbody tr:hover {
    background: var(--bg-card);
  }

  .deal-table td {
    padding: 0;
  }

  .deal-table td.empty-mobile {
    display: none;
  }

  .deal-table td[data-label] {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px 8px;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
  }

  .deal-table td[data-label]:first-child {
    padding-top: 0;
    border-top: none;
  }

  .deal-table td[data-label]::before {
    content: attr(data-label);
    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: auto;
  }

  .deal-table td.col-center,
  .deal-table td.col-right {
    text-align: right;
  }

  .deal-table td.action-cell {
    padding-top: 6px;
  }

  .deal-table td.action-cell .btn-history {
    display: flex;
    width: 100%;
    min-height: 40px;
    background: var(--teal);
    border-color: var(--teal);
    color: #FFFFFF;
    font-size: 14px;
    border-radius: 8px;
  }
}
