/* ==========================================================================
   BESTNICK Consumer Homepage Design System
   WCAG 2.2 AA Accessible Tokens, Mobile-First Layout, Zero Overflow
   ========================================================================== */

:root {
  --bn-forest-950: #042F25;
  --bn-forest-900: #064E3B;
  --bn-emerald-700: #047857;
  --bn-emerald-600: #059669;
  --bn-emerald-400: #34D399;
  --bn-emerald-300: #6EE7B7;
  --bn-emerald-100: #D1FAE5;
  --bn-emerald-50: #ECFDF5;

  --bn-slate-900: #0F172A;
  --bn-slate-800: #1E293B;
  --bn-slate-700: #334155;
  --bn-slate-600: #475569;
  --bn-slate-500: #64748B;
  --bn-slate-400: #94A3B8;
  --bn-slate-300: #CBD5E1;
  --bn-slate-200: #E2E8F0;
  --bn-slate-100: #F1F5F9;
  --bn-canvas: #F8FAFC;
  --bn-white: #FFFFFF;

  --bn-accent-blue: #2563EB;
  --bn-sky-600: #0284C7;

  /* Safety Triage Tiers */
  --bn-green-bg: #F0FDF4;
  --bn-green-pill: #DCFCE7;
  --bn-green-border: #15803D;
  --bn-green-text: #166534;

  --bn-amber-bg: #FFFBEB;
  --bn-amber-pill: #FEF3C7;
  --bn-amber-border: #B45309;
  --bn-amber-text: #92400E;

  --bn-red-bg: #FEF2F2;
  --bn-red-solid: #B91C1C;
  --bn-red-deep: #991B1B;

  /* Native High-Legibility Typography Stack (Zero External CDNs) */
  --bn-font-display: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bn-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bn-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --bn-radius-sm: 8px;
  --bn-radius-md: 12px;
  --bn-radius-lg: 16px;
  --bn-radius-xl: 22px;
  --bn-radius-pill: 9999px;

  --bn-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --bn-shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --bn-shadow-elevated: 0 18px 40px -12px rgba(4, 47, 37, 0.14), 0 4px 12px rgba(15, 23, 42, 0.05);

  --bn-container: 1220px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--bn-font-body);
  color: var(--bn-slate-900);
  background-color: var(--bn-canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

[id] {
  scroll-margin-top: 88px;
}

[hidden] {
  display: none !important;
}

.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-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--bn-forest-900);
  color: var(--bn-white);
  font-weight: 700;
  border-radius: var(--bn-radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--bn-forest-900);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.25);
}

.dark-surface :focus-visible {
  outline: 2px solid var(--bn-emerald-400);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(4, 47, 37, 0.85);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.bn-container {
  width: 100%;
  max-width: var(--bn-container);
  margin-inline: auto;
  padding-inline: 24px;
}

.bn-section {
  padding-block: 52px;
}

.bn-section-surface {
  background: var(--bn-white);
  border-block: 1px solid var(--bn-slate-200);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.section-kicker {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bn-emerald-700);
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--bn-font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--bn-slate-900);
  margin: 0;
}

.section-subtitle {
  margin: 6px 0 0;
  font-size: 1rem;
  color: var(--bn-slate-600);
  max-width: 62ch;
}

/* ==========================================================================
   1. Clean Consumer Header & Lowercase Wordmark
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bn-slate-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bn-emerald-50);
  border: 1px solid var(--bn-emerald-100);
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--bn-font-display);
  font-size: clamp(1.65rem, 2.1vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.wordmark-best {
  color: var(--bn-slate-900);
}

.wordmark-nick {
  color: var(--bn-emerald-600);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--bn-radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bn-slate-700);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.primary-nav a:hover {
  background: var(--bn-emerald-50);
  color: var(--bn-forest-900);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--bn-radius-pill);
  background: var(--bn-forest-900);
  color: var(--bn-white);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.header-cta:hover {
  background: var(--bn-emerald-700);
  color: var(--bn-white);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--bn-radius-sm);
  border: 1.5px solid var(--bn-slate-300);
  background: var(--bn-white);
  color: var(--bn-slate-900);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  padding: 12px 24px 20px;
  background: var(--bn-white);
  border-top: 1px solid var(--bn-slate-200);
}

.mobile-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--bn-radius-sm);
  text-decoration: none;
  font-weight: 600;
  color: var(--bn-slate-900);
}

.mobile-drawer a:hover {
  background: var(--bn-emerald-50);
  color: var(--bn-forest-900);
}

.mobile-drawer a.mobile-ask-cta {
  margin-top: 6px;
  justify-content: center;
  background: var(--bn-forest-900);
  color: var(--bn-white);
  font-weight: 700;
}

/* ==========================================================================
   2. Forest-Green Consumer Hero & Direct Transparent Nick Integration
   ========================================================================== */
.hero-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 42%, rgba(52, 211, 153, 0.16) 0%, transparent 46%),
    linear-gradient(150deg, var(--bn-forest-900) 0%, #053E2F 54%, var(--bn-forest-950) 100%);
  color: var(--bn-white);
  padding-top: 40px;
  padding-bottom: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 28px;
  align-items: end;
}

.hero-copy {
  padding-bottom: 48px;
  min-width: 0;
}

.hero-headline {
  font-family: var(--bn-font-display);
  font-size: clamp(2.35rem, 4.17vw, 3.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--bn-white);
  margin: 0 0 14px;
}

.hero-subhead {
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.5;
  color: #E2F2EC;
  max-width: 52ch;
  margin: 0 0 24px;
}

/* Prominent Universal Search Pill */
.hero-search-form {
  max-width: 620px;
}

.hero-search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 6px 6px 6px 16px;
  background: var(--bn-white);
  border: 2px solid transparent;
  border-radius: var(--bn-radius-lg);
  box-shadow: 0 16px 36px -8px rgba(2, 20, 15, 0.45);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-search-shell:focus-within {
  border-color: var(--bn-emerald-400);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.35), 0 16px 36px -8px rgba(2, 20, 15, 0.45);
}

.hero-search-icon {
  color: var(--bn-slate-500);
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--bn-slate-900);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
}

.hero-search-input:focus-visible {
  box-shadow: none;
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--bn-slate-600);
}

.hero-search-btn {
  flex-shrink: 0;
  min-height: 46px;
  padding: 10px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--bn-forest-900);
  color: var(--bn-white);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.hero-search-btn:hover {
  background: var(--bn-emerald-700);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-chips-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bn-emerald-300);
  margin-right: 4px;
}

.hero-chip-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--bn-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: var(--bn-white);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hero-chip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--bn-emerald-300);
}

.hero-search-status {
  margin: 0;
  min-height: 0;
  font-size: 0.875rem;
  color: var(--bn-emerald-300);
}

.hero-search-status:not(:empty) {
  margin-top: 10px;
}

/* Direct Transparent Cutout Nick Portrait (Zero Box / Zero Border) */
.hero-nick-col {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-width: 0;
}

.hero-nick-stage {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-nick-stage::before {
  content: "";
  position: absolute;
  inset: 8% -12% 0;
  background: radial-gradient(circle at 50% 48%, rgba(52, 211, 153, 0.28) 0%, rgba(5, 150, 105, 0.12) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.hero-nick-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 36px rgba(2, 20, 15, 0.45));
}

.hero-nick-pill {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--bn-radius-pill);
  background: rgba(4, 47, 37, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(110, 231, 183, 0.34);
  box-shadow: 0 10px 24px rgba(2, 20, 15, 0.36);
  color: var(--bn-white);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hero-nick-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bn-emerald-400);
  flex-shrink: 0;
}

/* ==========================================================================
   3. Six Quick-Action Consumer Tiles
   ========================================================================== */
.quick-actions-section {
  padding-block: 36px 24px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quick-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  background: var(--bn-white);
  border: 1px solid var(--bn-slate-200);
  border-radius: var(--bn-radius-lg);
  box-shadow: none;
  text-decoration: none;
  color: var(--bn-slate-900);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick-tile:hover {
  transform: translateY(-2px);
  border-color: var(--bn-emerald-600);
}

.quick-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bn-emerald-50);
  border: 1px solid var(--bn-emerald-100);
  color: var(--bn-forest-900);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quick-tile-icon svg {
  width: 28px;
  height: 28px;
}

.quick-tile-body {
  min-width: 0;
  flex: 1 1 auto;
}

.quick-tile-title {
  display: block;
  font-family: var(--bn-font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--bn-slate-900);
  margin-bottom: 4px;
}

.quick-tile-desc {
  display: block;
  font-size: 0.875rem;
  color: var(--bn-slate-600);
  line-height: 1.38;
}

/* ==========================================================================
   4. Elevated Compact Diagnostic & 50% Rule Workbench
   ========================================================================== */
.workbench-section {
  padding-block: 16px 48px;
}

.workbench-card {
  background: var(--bn-white);
  border: 1px solid var(--bn-slate-200);
  border-radius: var(--bn-radius-xl);
  box-shadow: var(--bn-shadow-elevated);
  padding: 24px 28px;
  min-width: 0;
}

.workbench-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--bn-slate-200);
}

.workbench-top-main {
  min-width: 0;
}

.workbench-title {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.workbench-tablist {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 6px;
  padding: 5px;
  background: var(--bn-slate-100);
  border-radius: var(--bn-radius-md);
}

.workbench-tab {
  min-height: 44px;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--bn-radius-sm);
  background: transparent;
  color: var(--bn-slate-700);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.workbench-tab[aria-selected="true"] {
  background: var(--bn-forest-900);
  color: var(--bn-white);
  box-shadow: var(--bn-shadow-xs);
}

.workbench-ask-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--bn-radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--bn-emerald-700);
  text-decoration: none;
  white-space: nowrap;
}

.workbench-ask-link:hover {
  background: var(--bn-emerald-50);
  color: var(--bn-forest-900);
}

.decoder-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(0, 0.95fr) auto;
  gap: 12px;
  align-items: end;
}

.decoder-field {
  min-width: 0;
}

.decoder-submit-btn {
  width: auto;
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--bn-slate-900);
  margin-bottom: 6px;
}

.bn-select,
.bn-input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bn-slate-900);
  background: var(--bn-white);
  border: 1.5px solid var(--bn-slate-400);
  border-radius: var(--bn-radius-sm);
}

.bn-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--bn-radius-sm);
  background: var(--bn-forest-900);
  color: var(--bn-white);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.bn-btn-primary:hover {
  background: var(--bn-emerald-700);
  color: var(--bn-white);
}

.code-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.code-pill-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--bn-radius-pill);
  border: 1px solid var(--bn-slate-300);
  background: var(--bn-canvas);
  color: var(--bn-slate-800);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.code-pill-btn:hover {
  background: var(--bn-emerald-50);
  border-color: var(--bn-emerald-600);
  color: var(--bn-forest-900);
}

.code-pill-btn[aria-pressed="true"] {
  background: var(--bn-forest-900);
  border-color: var(--bn-forest-900);
  color: var(--bn-white);
}

.diag-hint {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--bn-slate-600);
}

.triage-panel {
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: var(--bn-radius-md);
  border: 1px solid var(--bn-slate-200);
  border-left-width: 5px;
  background: var(--bn-canvas);
}

.triage-panel[data-tier="GREEN"] {
  background: var(--bn-green-bg);
  border-color: #BBF7D0;
  border-left-color: var(--bn-green-border);
}

.triage-panel[data-tier="AMBER"] {
  background: var(--bn-amber-bg);
  border-color: #FDE68A;
  border-left-color: var(--bn-amber-border);
}

.triage-panel[data-tier="RED"] {
  background: var(--bn-red-bg);
  border-color: #FECACA;
  border-left-color: var(--bn-red-solid);
}

.triage-panel[data-tier="NEUTRAL"] {
  background: var(--bn-slate-100);
  border-color: var(--bn-slate-300);
  border-left-color: var(--bn-slate-600);
}

.triage-red-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--bn-radius-sm);
  background: var(--bn-red-solid);
  color: var(--bn-white);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 14px;
}

.triage-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--bn-radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.triage-tier-badge.tier-green {
  background: var(--bn-green-pill);
  color: var(--bn-green-text);
  border: 1px solid var(--bn-green-border);
}

.triage-tier-badge.tier-amber {
  background: var(--bn-amber-pill);
  color: var(--bn-amber-text);
  border: 1px solid var(--bn-amber-border);
}

.triage-tier-badge.tier-red {
  background: var(--bn-red-solid);
  color: var(--bn-white);
  border: 1px solid var(--bn-red-deep);
}

.triage-tier-badge.tier-neutral {
  background: var(--bn-white);
  color: var(--bn-slate-800);
  border: 1px solid var(--bn-slate-400);
}

.triage-title {
  font-family: var(--bn-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bn-slate-900);
  margin: 0 0 8px;
}

.triage-summary {
  margin: 0 0 12px;
  color: var(--bn-slate-700);
  font-size: 0.95rem;
}

.triage-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--bn-slate-800);
  display: grid;
  gap: 6px;
  font-size: 0.9375rem;
}

.triage-pro-stop {
  padding: 12px 14px;
  border-radius: var(--bn-radius-sm);
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid #FCA5A5;
  color: #7F1D1D;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.triage-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.875rem;
  color: var(--bn-slate-700);
}

.triage-service-text {
  min-width: 0;
  flex: 1 1 280px;
}

.triage-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.triage-clear-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--bn-radius-sm);
  border: 1px solid var(--bn-slate-300);
  background: var(--bn-white);
  color: var(--bn-slate-800);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.triage-clear-btn:hover {
  background: var(--bn-slate-100);
  border-color: var(--bn-slate-500);
}

.triage-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bn-emerald-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 50% Rule Calculator Panel */
.calc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.stepper-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-btn {
  min-width: 46px;
  min-height: 46px;
  border-radius: var(--bn-radius-sm);
  border: 1.5px solid var(--bn-slate-300);
  background: var(--bn-slate-100);
  color: var(--bn-slate-900);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.stepper-btn:hover {
  background: var(--bn-emerald-50);
  border-color: var(--bn-emerald-600);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.metric-tile {
  padding: 16px;
  border-radius: var(--bn-radius-md);
  background: var(--bn-canvas);
  border: 1px solid var(--bn-slate-200);
  min-width: 0;
}

.metric-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bn-slate-600);
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--bn-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bn-forest-900);
}

.metric-verdict {
  font-size: 1.2rem;
}

.rule-meter-wrap {
  margin-top: 16px;
}

.rule-meter-track {
  position: relative;
  height: 12px;
  border-radius: var(--bn-radius-pill);
  background: var(--bn-slate-200);
  overflow: hidden;
}

.rule-meter-fill {
  height: 100%;
  border-radius: var(--bn-radius-pill);
  background: var(--bn-emerald-600);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.rule-meter-caption {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--bn-slate-600);
}

/* ==========================================================================
   5. Ten Separated Appliance Category Cards (5x2 Desktop, 2-col Mobile)
   ========================================================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bn-white);
  border: 1px solid var(--bn-slate-200);
  border-radius: var(--bn-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--bn-slate-900);
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--bn-emerald-600);
}

.category-media {
  background: var(--bn-canvas);
  padding: 8px;
  border-bottom: 1px solid var(--bn-slate-100);
}

.category-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-radius: 8px;
}

.category-content {
  padding: 12px 14px 14px;
  min-width: 0;
}

.category-name {
  font-family: var(--bn-font-display);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--bn-slate-900);
  margin: 0 0 3px;
}

.category-meta {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--bn-slate-600);
  margin: 0;
}

/* ==========================================================================
   6. Clean Ad-Ready Editorial Layout Break (Zero Dev Text / Zero Live Scripts)
   ========================================================================== */
.editorial-break-wrap {
  margin-block: 44px;
}

.editorial-break-band {
  min-height: 90px;
  padding: 16px 24px;
  border-radius: var(--bn-radius-md);
  background: var(--bn-slate-100);
  border: 1px solid var(--bn-slate-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.editorial-break-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bn-slate-500);
}

/* ==========================================================================
   7. Visually Rich My Home Energy Section (EIA Rates + SVG Donut + Bar Chart)
   ========================================================================== */
.energy-panel {
  background: var(--bn-white);
  border: 1px solid var(--bn-slate-200);
  border-radius: var(--bn-radius-xl);
  box-shadow: var(--bn-shadow-card);
  padding: 28px;
}

.energy-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--bn-slate-200);
}

.energy-state-select-wrap {
  flex: 1 1 260px;
  max-width: 360px;
  min-width: 0;
}

.energy-rate-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.rate-kpi-pill {
  padding: 12px 18px;
  border-radius: var(--bn-radius-md);
  background: var(--bn-emerald-50);
  border: 1px solid var(--bn-emerald-100);
  min-width: 0;
}

.rate-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bn-emerald-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.rate-kpi-val {
  display: block;
  font-family: var(--bn-font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--bn-forest-900);
}

.energy-viz-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: center;
}

.donut-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px;
  border-radius: var(--bn-radius-lg);
  background: var(--bn-canvas);
  border: 1px solid var(--bn-slate-200);
  min-width: 0;
}

.donut-svg {
  width: 220px;
  max-width: 100%;
  height: auto;
}

.donut-legend {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bn-slate-700);
  min-width: 0;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.bars-box {
  display: grid;
  gap: 15px;
  min-width: 0;
}

.bar-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bar-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
}

.bar-row-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--bn-slate-900);
}

.bar-row-val {
  font-size: 0.9375rem;
  color: var(--bn-slate-700);
}

.bar-row-cost {
  font-weight: 800;
  color: var(--bn-slate-900);
}

.bar-row-meta {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bn-slate-600);
}

.bar-track {
  height: 11px;
  border-radius: var(--bn-radius-pill);
  background: var(--bn-slate-100);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--bn-radius-pill);
  transition: width 0.25s ease;
}

.state-benchmark-box {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--bn-radius-md);
  background: var(--bn-canvas);
  border: 1px solid var(--bn-slate-200);
}

.energy-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--bn-slate-200);
}

.energy-attribution {
  font-size: 0.85rem;
  color: var(--bn-slate-600);
  margin: 0;
  flex: 1 1 320px;
}

/* ==========================================================================
   8. Editorial Magazine Cards (16:9 Custom Vector Art)
   ========================================================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bn-white);
  border: 1px solid var(--bn-slate-200);
  border-radius: var(--bn-radius-lg);
  overflow: hidden;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--bn-emerald-600);
}

.article-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--bn-slate-100);
  border-bottom: 1px solid var(--bn-slate-200);
}

.article-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px 18px;
}

.article-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bn-emerald-700);
  margin-bottom: 6px;
}

.article-title {
  font-family: var(--bn-font-display);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--bn-slate-900);
  margin: 0 0 8px;
}

.article-title a {
  color: inherit;
  text-decoration: none;
}

.article-title a:hover {
  color: var(--bn-forest-900);
}

.article-deck {
  font-size: 0.9rem;
  color: var(--bn-slate-600);
  line-height: 1.48;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--bn-slate-600);
  padding-top: 10px;
  border-top: 1px solid var(--bn-slate-100);
}

.article-read-link {
  color: var(--bn-emerald-700);
  font-weight: 700;
  text-decoration: none;
}

/* ==========================================================================
   9. Contextual Safety & Transparency Footer
   ========================================================================== */
.site-footer {
  background: var(--bn-slate-900);
  color: var(--bn-slate-200);
  padding-block: 48px 28px;
  margin-top: 20px;
  border-top: 4px solid var(--bn-forest-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand-col {
  min-width: 0;
}

.footer-brand-mark {
  background: var(--bn-forest-950);
  border-color: var(--bn-emerald-700);
}

.footer-wordmark-best {
  color: var(--bn-white);
}

.footer-wordmark-nick {
  color: var(--bn-emerald-400);
}

.footer-brand-note {
  margin: 12px 0 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--bn-slate-200);
}

.footer-safety-box {
  padding: 13px 15px;
  border-radius: var(--bn-radius-md);
  background: var(--bn-slate-800);
  border-left: 4px solid var(--bn-red-solid);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--bn-slate-100);
}

.footer-safety-box strong {
  color: #FCA5A5;
  display: block;
  margin-bottom: 4px;
}

.footer-nav-details {
  min-width: 0;
}

.footer-heading {
  list-style: none;
  font-family: var(--bn-font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bn-white);
  margin: 0 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-heading::-webkit-details-marker {
  display: none;
}

.footer-heading::after {
  content: "+";
  display: none;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bn-emerald-300);
  line-height: 1;
}

.footer-nav-details[open] > .footer-heading::after {
  content: "−";
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bn-emerald-300);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--bn-white);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--bn-slate-800);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 0.8125rem;
  color: var(--bn-slate-300);
}

/* ==========================================================================
   10. Responsive Breakpoints (Zero Overflow Guarantee)
   ========================================================================== */
@media (max-width: 1080px) {
  .primary-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

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

  .decoder-submit-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

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

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

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

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

@media (max-width: 959px) {
  .hero-band {
    padding-top: 28px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-copy {
    padding-bottom: 4px;
  }

  .hero-nick-col {
    justify-content: center;
  }

  .hero-nick-stage {
    max-width: 300px;
  }

  .energy-viz-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .bn-container {
    padding-inline: 16px;
  }

  .bn-section {
    padding-block: 24px;
  }

  .section-header {
    margin-bottom: 14px;
  }

  .header-inner {
    min-height: 58px;
  }

  .header-cta {
    display: none;
  }

  /* Compact Mobile Hero (~450-510px CSS height) */
  .hero-band {
    padding-top: 14px;
  }

  .hero-grid {
    gap: 6px;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-headline {
    font-size: 2rem;
    margin-bottom: 6px;
  }

  .hero-subhead {
    font-size: 0.88rem;
    line-height: 1.38;
    margin-bottom: 10px;
  }

  .hero-search-shell {
    flex-wrap: nowrap;
    min-height: 48px;
    padding: 3px 3px 3px 12px;
    gap: 6px;
  }

  .hero-search-input {
    font-size: 0.9rem;
    min-height: 40px;
  }

  .hero-search-btn {
    width: auto;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 0.875rem;
  }

  .hero-chips {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-top: 8px;
    gap: 6px;
    padding-bottom: 0;
  }

  .hero-chips-label {
    display: none;
  }

  .hero-chip-btn {
    min-height: 44px;
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  .hero-nick-stage {
    max-width: 185px;
  }

  .hero-nick-pill {
    bottom: 8px;
    padding: 4px 10px;
    font-size: 0.72rem;
    gap: 6px;
  }

  /* Compact 2-Column Mobile Quick Actions */
  .quick-actions-section {
    padding-block: 18px 14px;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .quick-tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 12px;
  }

  .quick-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .quick-tile-icon svg {
    width: 22px;
    height: 22px;
  }

  .quick-tile-title {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }

  .quick-tile-desc {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  /* Compact Mobile Workbench */
  .workbench-section {
    padding-block: 8px 24px;
  }

  .workbench-card {
    padding: 15px;
    border-radius: var(--bn-radius-lg);
  }

  .workbench-top {
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .workbench-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .workbench-tab {
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .decoder-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .decoder-submit-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .code-pills-row {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-top: 10px;
    gap: 6px;
    padding-bottom: 0;
  }

  .code-pill-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  .diag-hint {
    margin-top: 9px;
    font-size: 0.84rem;
  }

  .calc-inputs-grid,
  .metrics-grid,
  .articles-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .triage-panel {
    padding: 15px;
  }

  /* Compact 2-Column Mobile Category Grid */
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .category-media {
    padding: 5px;
  }

  .category-content {
    padding: 8px 10px 10px;
  }

  .category-name {
    font-size: 0.88rem;
  }

  .category-meta {
    font-size: 0.75rem;
  }

  .editorial-break-wrap {
    margin-block: 20px;
  }

  .editorial-break-band {
    min-height: 64px;
    padding: 10px 14px;
  }

  /* Compact Mobile Energy Section */
  .energy-panel {
    padding: 14px;
    border-radius: var(--bn-radius-lg);
  }

  .energy-controls-row {
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .energy-rate-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .rate-kpi-pill {
    padding: 7px 6px;
  }

  .rate-kpi-label {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
  }

  .rate-kpi-val {
    font-size: 0.92rem;
  }

  .energy-viz-grid {
    gap: 12px;
  }

  .donut-box {
    padding: 12px;
  }

  .donut-svg {
    width: 172px;
  }

  .donut-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
    margin-top: 8px;
  }

  .legend-item {
    font-size: 0.73rem;
  }

  .bars-box {
    gap: 10px;
  }

  .bar-row-name,
  .bar-row-val {
    font-size: 0.84rem;
  }

  .bar-row-meta {
    font-size: 0.74rem;
  }

  .state-benchmark-box {
    padding: 10px 12px;
  }

  .energy-footer-row {
    margin-top: 14px;
    padding-top: 12px;
    gap: 10px;
  }

  .articles-grid {
    gap: 12px;
  }

  .article-cover {
    max-height: 166px;
    object-fit: cover;
  }

  .article-body {
    padding: 12px 14px 14px;
  }

  .article-title {
    font-size: 1.02rem;
    margin-bottom: 6px;
  }

  .article-deck {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }

  /* Compact Mobile Footer Accordions */
  .site-footer {
    padding-block: 22px 16px;
    margin-top: 8px;
  }

  .footer-grid {
    gap: 10px;
    margin-bottom: 16px;
  }

  .footer-brand-note {
    margin: 8px 0 10px;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .footer-safety-box {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .footer-nav-details {
    border-top: 1px solid var(--bn-slate-800);
    padding-top: 2px;
  }

  .footer-heading {
    min-height: 44px;
    margin: 0;
    padding-block: 8px;
  }

  .footer-heading::after {
    display: inline-block;
  }

  .footer-links {
    padding-bottom: 6px;
  }
}

@media (max-width: 339px) {
  .quick-actions-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
