/* ==========================================================================
   BOND CALCULATOR (VERSION 3) — SETTLEMENT BAR, RAPID DATE MASKING & VFD
   ========================================================================== */

:root {
  /* Frame & Surface Palette */
  --bg-desk: #0b0d11;
  --frame-bg: #14171d;
  --frame-border: #2c3340;
  --panel-bg: #11141a;

  /* VFD Vacuum Fluorescent Colors */
  --vfd-bg-center: #05161a;
  --vfd-bg-edge: #02080a;
  --vfd-cyan: #00f0ff;
  --vfd-cyan-dim: rgba(0, 240, 255, 0.28);
  --vfd-amber: #ffb700;
  --vfd-amber-dim: rgba(255, 183, 0, 0.28);
  --vfd-grid-line: rgba(0, 240, 255, 0.08);

  /* Neon Green Calculated Status Accent */
  --calc-neon-green: #00ff66;

  /* Validation Error Palette */
  --error-red: #ff3b5c;
  --error-bg: rgba(255, 59, 92, 0.1);
  --error-glow: rgba(255, 59, 92, 0.3);

  /* Tactile Keycap Palette */
  --key-charcoal-top: #282e3a;
  --key-charcoal-btm: #1c2029;
  --key-border: #384152;
  --key-text: #e6ecf5;
  --key-subtext: #8b96a9;

  /* Accent Keycaps */
  --key-clear-top: #6e2626;
  --key-clear-btm: #4b1818;

  /* Typography */
  --font-display: 'Share Tech Mono', 'IBM Plex Mono', monospace;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;

  /* Ad Compliance Buffer */
  --ad-buffer-space: 28px;
}

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

html,
body {
  min-height: 100vh;
  background-color: var(--bg-desk);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #0b0d11 0%, #07080b 100%);
  color: var(--key-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px 40px;
}

body:not(.devmode-active) .ad-top-wrapper,
body:not(.devmode-active) .ad-sidebar-rail,
body:not(.devmode-active) .ad-mobile-anchor-bar,
body:not(.devmode-active) #btn-toggle-ads,
body:not(.devmode-active) #dev-test-harness,
body.ads-collapsed .ad-top-wrapper,
body.ads-collapsed .ad-sidebar-rail,
body.ads-collapsed .ad-mobile-anchor-bar {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   GOOGLE ADS CONTAINERS — ZERO CLS & COLLAPSIBLE PREVIEW SUPPORT
   ========================================================================== */

.ad-top-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: var(--ad-buffer-space);
}

.ad-slot {
  background: linear-gradient(180deg, rgba(20, 24, 32, 0.9) 0%, rgba(12, 15, 20, 0.95) 100%);
  border: 1px dashed rgba(139, 150, 169, 0.3);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #6c778b;
  font-family: var(--font-mono);
  user-select: none;
}

.ad-badge {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b96a9;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 3px;
}

.ad-placeholder-text {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #566072;
  text-align: center;
}

.ad-leaderboard {
  width: 728px;
  max-width: 100%;
  height: 90px;
  min-height: 90px;
  aspect-ratio: 728 / 90;
  flex-shrink: 0;
}

.ad-sidebar-rail {
  margin-left: var(--ad-buffer-space);
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
}

.ad-skyscraper {
  width: 160px;
  min-width: 160px;
  height: 600px;
  min-height: 600px;
  aspect-ratio: 160 / 600;
  padding: 12px 10px;
  text-align: center;
}

.ad-rail-Headline {
  font-size: 12px;
  font-weight: 600;
  color: #8b96a9;
  margin-top: 14px;
  line-height: 1.4;
}

.ad-rail-Sub {
  font-size: 11px;
  color: #545e70;
  margin-top: 8px;
  line-height: 1.4;
}

.ad-mobile-anchor-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 11, 15, 0.96);
  border-top: 1px solid #222834;
  padding: 4px 0;
  justify-content: center;
  align-items: center;
}

.ad-mobile-banner {
  width: 320px;
  height: 50px;
  min-height: 50px;
  aspect-ratio: 320 / 50;
}

/* ==========================================================================
   MAIN WORKSPACE SHELL & THIN-BORDER CALCULATOR FRAME
   ========================================================================== */

.workspace-shell {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 1160px;
}

.calculator-column {
  flex: 1;
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
}

.calculator-frame {
  width: 100%;
  max-width: 920px;
  background: var(--frame-bg);
  border: 1px solid var(--frame-border);
  border-radius: 8px;
  padding: 10px 14px 12px;
}

/* Compact Header Bar */
.calculator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.calculator-title-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calculator-logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.18);
}

.calculator-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f3f6fc;
  margin: 0;
}

.calculator-title-divider {
  color: #3b4859;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0 3px;
  user-select: none;
}

.calculator-tagline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a8b9e;
  line-height: 1.2;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad-toggle-btn {
  background: #1b2230;
  border: 1px solid #354156;
  color: var(--vfd-cyan);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.ad-toggle-btn:hover {
  transform: translateY(-1.5px);
  border-color: var(--vfd-cyan);
  background: #232d40;
}

.ad-toggle-btn.ads-hidden-state {
  color: var(--vfd-amber);
  border-color: rgba(255, 183, 0, 0.45);
}

/* Single Static Convention Label Badge */
.basis-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--vfd-amber);
  background: rgba(255, 183, 0, 0.1);
  border: 1px solid rgba(255, 183, 0, 0.35);
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   VACUUM FLUORESCENT DISPLAY (VFD) — STREAMLINED READOUT
   ========================================================================== */

.vfd-screen {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 42%, #072228 0%, #041216 58%, #02080b 100%);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow:
    inset 0 0 28px rgba(0, 240, 255, 0.06),
    inset 0 0 10px rgba(255, 183, 0, 0.03);
}

.vfd-scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.22) 0px,
      rgba(0, 0, 0, 0.22) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 240, 255, 0.02) 0px,
      rgba(0, 240, 255, 0.02) 1px,
      transparent 1px,
      transparent 28px
    );
  z-index: 1;
}

.vfd-screen > *:not(.vfd-scanlines) {
  position: relative;
  z-index: 2;
}

.vfd-cyan-glow {
  color: var(--vfd-cyan);
  text-shadow:
    0 0 6px rgba(0, 240, 255, 0.75),
    0 0 16px rgba(0, 240, 255, 0.45),
    0 0 28px rgba(0, 240, 255, 0.25);
}

.vfd-amber-glow {
  color: var(--vfd-amber);
  text-shadow:
    0 0 6px rgba(255, 183, 0, 0.78),
    0 0 16px rgba(255, 183, 0, 0.45),
    0 0 28px rgba(255, 183, 0, 0.25);
}

.vfd-main-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 12px;
}

.vfd-panel {
  background: rgba(1, 10, 14, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: 5px;
  padding: 7px 12px;
}

.vfd-amber-panel {
  border-color: rgba(255, 183, 0, 0.18);
}

.vfd-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.vfd-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #7ca7b2;
}

.vfd-amber-panel .vfd-label {
  color: #bfa065;
}

.vfd-sub-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: #6a8d96;
}

.vfd-amber-panel .vfd-sub-tag {
  color: #b5924c;
}

.vfd-primary-digits {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.04;
  letter-spacing: 0.04em;
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
}

.vfd-secondary-row {
  display: grid;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vfd-two-col {
  grid-template-columns: repeat(2, 1fr);
}

.vfd-four-col {
  grid-template-columns: repeat(4, 1fr);
}

.vfd-mini-stat {
  display: flex;
  flex-direction: column;
}

.vfd-mini-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #6c8891;
  letter-spacing: 0.08em;
  margin-bottom: 1px;
}

.vfd-amber-panel .vfd-mini-label {
  color: #9e8454;
}

.vfd-mini-val {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   INTERACTIVE DECK: DEDICATED SETTLEMENT BAR + 4-COLUMN INPUTS + 10-KEY PAD
   ========================================================================== */

.interactive-deck {
  display: grid;
  grid-template-columns: 1.78fr 0.82fr;
  gap: 12px;
  align-items: stretch;
}

.parameter-inputs-strip {
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: space-between;
}

/* Dedicated Settlement Date Bar & Segmented Preset Buttons */
.settlement-bar-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.settlement-reg-card {
  flex: 1.1;
  padding: 8px 13px !important;
}

.settlement-field-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settlement-label {
  margin-bottom: 0 !important;
  white-space: nowrap;
  font-size: 10.5px !important;
  color: #96a4bc !important;
}

.settlement-field-inline .reg-input {
  max-width: 170px;
  text-align: right;
}

.settlement-presets-segmented {
  flex: 1.25;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #0b0e14;
  border: 1px solid #262e3d;
  border-radius: 6px;
  padding: 3px;
  gap: 4px;
}

.settle-preset-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #8b96a9;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  cursor: pointer;
  transition:
    background-color 0.14s ease,
    color 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;
}

.settle-preset-btn:hover {
  color: #e6ecf5;
  background: rgba(255, 255, 255, 0.04);
}

.settle-preset-btn.active {
  background: rgba(0, 240, 255, 0.14);
  border-color: rgba(0, 240, 255, 0.55);
  color: var(--vfd-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.12);
}

/* Main 4-Field Schedule Row & 2-Field Solver Row */
.inputs-row {
  display: grid;
  gap: 9px;
}

.inputs-row-four {
  grid-template-columns: repeat(4, 1fr);
}

.inputs-row-two {
  grid-template-columns: repeat(2, 1fr);
  flex: 1;
}

/* Enhanced Inner Padding & Larger Font Size for All Input Cards */
.reg-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #0d1015;
  border: 1px solid #262e3d;
  border-radius: 6px;
  padding: 9px 12px;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.reg-card-solve-input {
  background: #0f131b;
  border-color: #2f3a4f;
  padding: 10px 14px;
}

.reg-card.active-reg-card {
  border-color: var(--vfd-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.18);
}

/* Instant Validation Error Highlighting */
.reg-card.input-invalid {
  border-color: var(--error-red) !important;
  background: var(--error-bg) !important;
  box-shadow: 0 0 12px var(--error-glow) !important;
}

.reg-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.reg-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #7d899e;
  margin-bottom: 4px;
  cursor: pointer;
}

.reg-card.input-invalid .reg-title {
  color: #ff8599;
}

.reg-title small {
  color: #546075;
}

.reg-solver-hint {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: #5f6d82;
  letter-spacing: 0.04em;
}

/* Increased Input Font Size (18px) & Identical-Sized Low-Opacity Placeholder */
.reg-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f0f5fc;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.reg-input::placeholder {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(139, 150, 169, 0.26);
}

/* Wrapper holding input and inner-right Neon Green Calculated Status Badge */
.input-with-status-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.reg-input-primary {
  font-size: 21px;
  color: var(--vfd-cyan);
  padding-right: 78px;
}

.reg-input-primary::placeholder {
  font-size: 21px;
  color: rgba(139, 150, 169, 0.24);
}

#card-target-yield .reg-input-primary {
  color: var(--vfd-amber);
}

/* Neon Green Calculated Status Indicator Icon & Badge */
.calc-status-badge {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.45);
  color: var(--calc-neon-green);
  filter: drop-shadow(0 0 6px rgba(0, 255, 102, 0.6));
  pointer-events: none;
  user-select: none;
}

.calc-status-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.calc-badge-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--calc-neon-green);
}

.field-error-note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: #ff6b84;
  line-height: 1.25;
  margin-top: 4px;
  min-height: 0;
  display: none;
  white-space: normal;
}

.reg-card.input-invalid .field-error-note {
  display: block;
}

.validation-summary-banner {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--error-bg);
  border: 1px solid var(--error-red);
  color: #ff8599;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   STANDARD 10-KEY NUMPAD BANK
   ========================================================================== */

.key-bank {
  background: var(--panel-bg);
  border: 1px solid #252c38;
  border-radius: 6px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
}

.bank-section-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: #7b869a;
  margin-bottom: 5px;
}

.tactile-key {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--key-charcoal-top) 0%, var(--key-charcoal-btm) 100%);
  border: 1px solid var(--key-border);
  border-bottom: 2px solid #0e1117;
  border-radius: 6px;
  padding: 5px 6px;
  color: var(--key-text);
  font-family: var(--font-sans);
  cursor: pointer;
  user-select: none;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.14s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.14s ease,
    filter 0.14s ease;
}

.tactile-key:hover {
  transform: translateY(-1.5px);
  border-color: #54627a;
  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  filter: brightness(1.06);
}

.tactile-key:active,
.tactile-key.key-pressed {
  transform: translateY(1px) scale(0.97);
  border-bottom-width: 1px;
}

.key-cap-main {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f2f6fc;
}

.key-cap-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--key-subtext);
  letter-spacing: 0.06em;
  margin-top: 1px;
}

.numpad-grid-10key {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  flex: 1;
}

.key-num,
.key-clear {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  min-height: 36px;
}

.key-clear {
  background: linear-gradient(180deg, var(--key-clear-top) 0%, var(--key-clear-btm) 100%);
  border-color: #943535;
  font-size: 13px;
  color: #ffdede;
}

/* ==========================================================================
   PERSISTENT CALCULATION HISTORY BLOTTER & SETTLEMENT VERIFY FLASH
   ========================================================================== */

@keyframes settlementVerifyPulse {
  0% {
    border-color: var(--vfd-amber);
    box-shadow: 0 0 0 0 rgba(255, 183, 0, 0.65), inset 0 0 14px rgba(255, 183, 0, 0.25);
    background: rgba(255, 183, 0, 0.14);
  }
  50% {
    border-color: #ffd257;
    box-shadow: 0 0 16px 3px rgba(255, 183, 0, 0.45), inset 0 0 18px rgba(255, 183, 0, 0.22);
    background: rgba(255, 183, 0, 0.2);
  }
  100% {
    border-color: var(--vfd-amber);
    box-shadow: 0 0 0 0 rgba(255, 183, 0, 0);
    background: #0d1015;
  }
}

.reg-card.settlement-verify-flash {
  animation: settlementVerifyPulse 0.75s ease-in-out 2;
  border-color: var(--vfd-amber) !important;
}

.history-blotter-section {
  width: 67%;
  max-width: 920px;
  margin-top: 12px;
  background: linear-gradient(180deg, #151922 0%, #0f1219 100%);
  border: 1px solid var(--frame-border);
  border-radius: 8px;
  padding: 10px 14px 12px;
  box-sizing: border-box;
}

.blotter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 7px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blotter-title-cluster {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.blotter-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #edf3fc;
  margin: 0;
}

.blotter-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #8b96a9;
  letter-spacing: 0.02em;
  margin: 0;
}

.blotter-clear-btn {
  background: rgba(148, 53, 53, 0.22);
  border: 1px solid rgba(255, 92, 119, 0.38);
  color: #ffb3c0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.blotter-clear-btn:hover {
  background: rgba(185, 56, 56, 0.36);
  border-color: #ff6b84;
  color: #ffffff;
  transform: translateY(-1px);
}

.blotter-table-wrap {
  width: 100%;
  max-height: 230px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #232a38;
  border-radius: 6px;
  background: #0b0e14;
  scrollbar-width: thin;
  scrollbar-color: #2a3344 #0b0e14;
}

.blotter-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.blotter-table-wrap::-webkit-scrollbar-track {
  background: #0b0e14;
}

.blotter-table-wrap::-webkit-scrollbar-thumb {
  background: #2a3344;
  border-radius: 3px;
}

.blotter-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #3e4a60;
}

.blotter-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: left;
}

.blotter-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #141923;
  border-bottom: 1px solid #283142;
  box-shadow: 0 1px 0 #283142;
}

.blotter-table th {
  padding: 6px 10px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b96a9;
  white-space: nowrap;
}

.blotter-table th.th-align-right,
.blotter-table td.cell-align-right {
  text-align: right;
}

.blotter-table tbody tr.blotter-data-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.blotter-table tbody tr.blotter-data-row:hover {
  background: rgba(0, 240, 255, 0.08);
  box-shadow: inset 3px 0 0 rgba(0, 240, 255, 0.7);
}

.blotter-table tbody tr.blotter-data-row.active-blotter-row {
  background: rgba(0, 240, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--vfd-cyan);
}

.blotter-table td {
  padding: 6px 10px;
  color: #dce4f2;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blotter-table td.cell-cyan {
  color: var(--vfd-cyan);
  font-weight: 600;
}

.blotter-table td.cell-amber {
  color: var(--vfd-amber);
  font-weight: 600;
}

.blotter-bond-cell {
  vertical-align: middle;
}

.blotter-bond-main {
  font-weight: 500;
  color: #edf3fc;
  white-space: nowrap;
}

.blotter-call-sub {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--vfd-amber);
  opacity: 0.95;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.blotter-table tr.blotter-section-header-row td {
  background: rgba(0, 240, 255, 0.05);
  color: #93b8c4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.blotter-table tr.blotter-prior-divider-row td {
  background: rgba(255, 183, 0, 0.08);
  color: var(--vfd-amber);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-top: 1px solid rgba(255, 183, 0, 0.25);
  border-bottom: 1px solid rgba(255, 183, 0, 0.25);
}

.blotter-table tr.blotter-empty-row td {
  text-align: center;
  color: #6b778d;
  font-style: italic;
  padding: 14px 10px;
}

.blotter-settle-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--vfd-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.blotter-call-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9.5px;
  color: var(--vfd-amber);
  background: rgba(255, 183, 0, 0.1);
  border: 1px solid rgba(255, 183, 0, 0.3);
}

/* ==========================================================================
   DEV & QA TEST HARNESS TABLE
   ========================================================================== */

.dev-test-harness {
  width: 100%;
  max-width: 1108px;
  margin-top: 18px;
  background: linear-gradient(180deg, #161a23 0%, #10131a 100%);
  border: 1px solid #2b3344;
  border-radius: 8px;
  padding: 12px 16px 14px;
}

.harness-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.harness-title-cluster {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.harness-badge {
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: var(--vfd-cyan);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.harness-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f0f5fc;
}

.harness-subtitle {
  font-size: 11.5px;
  color: #8b96a9;
  margin-top: 2px;
}

.harness-formula-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0a0d12;
  border: 1px solid #242c3a;
  border-radius: 5px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--vfd-amber);
}

.formula-tag {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: #7d899e;
  font-weight: 600;
}

.harness-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #232a38;
  border-radius: 6px;
  background: #0b0e14;
}

.harness-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: left;
}

.harness-table thead tr {
  background: #141923;
  border-bottom: 1px solid #283142;
}

.harness-table th {
  padding: 6px 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b96a9;
  white-space: nowrap;
}

.harness-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.harness-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.06);
}

.harness-table tbody tr.active-test-row {
  background: rgba(0, 240, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--vfd-cyan);
}

.harness-table td {
  padding: 6px 8px;
  color: #dce4f2;
  white-space: nowrap;
}

.harness-table td.cell-cyan {
  color: var(--vfd-cyan);
  font-weight: 600;
}

.harness-table td.cell-amber {
  color: var(--vfd-amber);
  font-weight: 600;
}

.harness-load-btn {
  background: #1d2634;
  border: 1px solid #384761;
  color: var(--vfd-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.harness-load-btn:hover {
  transform: translateY(-1.5px);
  background: #243246;
  border-color: var(--vfd-cyan);
}

.harness-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.harness-batch-info {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #7d899e;
}

.harness-regen-btn {
  padding: 6px 14px;
  background: linear-gradient(180deg, #005b66 0%, #003b44 100%);
  border-color: #009eb3;
}

.harness-regen-btn:hover {
  border-color: var(--vfd-cyan);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 1080px) {
  .ad-sidebar-rail {
    display: none;
  }

  .ad-mobile-anchor-bar {
    display: flex;
  }

  body {
    padding-bottom: calc(56px + var(--ad-buffer-space));
  }
}

@media (max-width: 820px) {
  .vfd-main-grid {
    grid-template-columns: 1fr;
  }

  .vfd-four-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .interactive-deck {
    grid-template-columns: 1fr;
  }

  .settlement-bar-row {
    flex-direction: column;
  }

  .inputs-row-four {
    grid-template-columns: repeat(2, 1fr);
  }

  .inputs-row-two {
    grid-template-columns: 1fr;
  }

  .ad-leaderboard {
    width: 100%;
    height: 90px;
  }

  .history-blotter-section {
    width: 100%;
  }

  .calculator-title-divider {
    display: none;
  }

  .calculator-tagline {
    font-size: 0.72rem;
  }
}
