@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;700;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --color-dark: #F5F5F5; /* High-contrast off-white/light text */
  --color-dark-muted: #27272A; /* Dark secondary grey */
  --color-light: #0A0A0B; /* Deep near-black background */
  --color-card-bg: #18181B; /* Graphite cards and panels */
  --color-border: #27272A; /* Tight dark border line */
  --color-accent: #FF9900; /* Bold Amazon orange */
  --color-accent-hover: #FFB13B;
  
  --color-state-covered: #4ADE80; /* Modern ready green */
  --color-state-covered-bg: rgba(74, 222, 128, 0.08);
  --color-state-covered-border: #27272A;
  --color-state-covered-text: #4ADE80;

  --color-state-watch: #FF9900; /* Bright orange */
  --color-state-watch-bg: rgba(255, 153, 0, 0.08);
  --color-state-watch-border: #27272A;
  --color-state-watch-text: #FF9900;

  --color-state-pressure: #F97316; /* Warning orange */
  --color-state-pressure-bg: rgba(249, 115, 22, 0.08);
  --color-state-pressure-border: #27272A;
  --color-state-pressure-text: #F97316;

  --color-state-critical: #EF4444; /* Critical red */
  --color-state-critical-bg: rgba(239, 68, 68, 0.08);
  --color-state-critical-border: #27272A;
  --color-state-critical-text: #EF4444;

  --text-color: #F5F5F5; /* Neutral off-white text */
  --text-muted: #A1A1AA; /* Muted slate grey */
  
  --radius-sm: 2px; /* Sharp technical corners */
  --radius-md: 4px; /* Crisp fintech styling */
  --radius-lg: 6px;
  
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
}

/* Reset and Global Styles */
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--color-light);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

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

/* Typography Utility Classes */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900; /* Extreme heavy bold */
  letter-spacing: -0.04em;
  color: var(--color-dark);
}

.text-muted { color: var(--text-muted); }

/* Logo and Header */
.main-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background-color: #18181B;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.header-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Hero Section */
.hero-section {
  padding: 80px 0 50px 0;
  background: radial-gradient(circle at top right, rgba(255, 153, 0, 0.04), transparent 60%), var(--color-light);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}

.hero-headline {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  text-transform: uppercase;
  color: var(--color-dark);
}

.hero-supporting {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800; /* Extremely solid bold style */
  padding: 14px 28px;
  border-radius: var(--radius-sm); /* Sharp technical corners */
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #0A0A0B; /* Strict dark text for high visibility */
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: scale(1.02);
}

.btn-link {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  background: none;
  border: none;
}

.btn-link:hover {
  color: var(--color-accent);
}

/* Two-Column Workspace Layout */
.workspace-section {
  padding: 60px 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* Mode Selector Switch */
.mode-selector-wrapper {
  margin-bottom: 24px;
  background: #18181B;
  padding: 4px;
  border-radius: var(--radius-md);
  display: inline-flex;
}

.mode-btn {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: calc(var(--radius-md) - 1px);
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mode-btn.active {
  background: var(--color-light); /* Darker active backing */
  color: var(--color-accent); /* Vibrant orange */
  font-weight: 900;
}

/* Form Styles */
.calculator-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.step-container {
  margin-bottom: 32px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-number {
  background-color: #0A0A0B;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 900;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-dark);
  background-color: #0A0A0B;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.form-control::placeholder {
  color: #3F3F46;
}

/* Results Panel */
.results-panel {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent); /* Vibrant top accent bar */
  border-radius: var(--radius-sm);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.primary-result-amount {
  font-size: clamp(3rem, 7.5vw, 5.2rem); /* Massive premium number display */
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.metric-card {
  background: #0A0A0B; /* Embedded black container inside graphite card */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.metric-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.metric-card-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
}

/* Content Sections (Why It Matters, Explanations, Disclaimers) */
.info-section {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
}

.info-section.dark {
  background-color: #0E0E10;
  color: var(--text-color);
}

.info-section.dark h2, .info-section.dark h3 {
  color: var(--color-dark);
}

.info-section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: none;
  transition: transform 0.15s ease-in-out;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
}

.info-card-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.info-card-title {
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.info-card-desc {
  color: var(--text-muted);
  line-height: 1.5;
}

.info-section.dark .info-card {
  background: var(--color-card-bg);
  border-color: var(--color-border);
}

.info-section.dark .info-card-icon {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--color-border);
}

.info-section.dark .info-card-desc {
  color: var(--text-muted);
}

/* Editorial Explanation Panel */
.editorial-section {
  max-width: 800px;
}

.editorial-block {
  margin-bottom: 36px;
  border-left: 3px solid var(--color-accent);
  padding-left: 20px;
}

.editorial-block h3 {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--color-dark);
}

.editorial-block p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Compliance and Footer */
.compliance-footer {
  background-color: #050506;
  color: #71717A;
  padding: 48px 0;
  font-size: 0.75rem;
  line-height: 1.6;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-text {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 640px) {
  .footer-brand {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 12px;
  }
}

/* Toast Notification Style */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #18181B;
  color: #F5F5F5;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Sticky Mobile CTA styles */
.sticky-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #18181B;
  border-top: 1px solid var(--color-border);
  padding: 12px 16px;
  z-index: 90;
  display: none;
}

.sticky-mobile-cta.active {
  display: block;
}

.sticky-mobile-cta-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.sticky-mobile-cta-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.sticky-mobile-cta-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sticky-mobile-cta-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

/* Hide on desktop, show only on mobile when screen is small and active */
@media (min-width: 1024px) {
  .sticky-mobile-cta.active {
    display: none !important;
  }
}

/* Responsive */
@media (max-width: 1023px) {
  .workspace-grid { grid-template-columns: 1fr; }
}

/* Print-Only Utility - Hidden on Screen, Visible only when printing */
.print-only-header,
.print-only-footer {
  display: none !important;
}

@media print {
  .print-only-header,
  .print-only-footer {
    display: block !important;
  }
}
