@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --font-ui: 'Manrope', 'Inter var', Inter, ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Space Grotesk', 'Manrope', 'Inter var', Inter, ui-sans-serif, system-ui, sans-serif;
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 48%;
  }
}

@layer base {
  html {
    @apply min-h-full bg-slate-50 dark:bg-gray-900;
  }

  html.export-light-theme {
    background: #f8fafc !important;
    color-scheme: light !important;
  }

  * {
    @apply border-border;
  }

  #root {
    min-height: 100vh;
    min-height: 100dvh;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-ui);
    @apply bg-background text-foreground transition-colors duration-300;
  }

  h1,
  h2,
  h3,
  .font-display {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  body.export-light-theme {
    background: #ffffff !important;
    color: #111827 !important;
    color-scheme: light !important;
  }
  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  input[type="number"] {
    -moz-appearance: textfield;
  }
}

/* Formula container styles */
.formula-container {
  @apply w-full py-4;
  overflow: visible !important;
}

/* KaTeX container styles */
.katex-display {
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.katex {
  @apply text-current;
  font-size: 1.1em !important;
  max-width: 100%;
  display: flex !important;
  justify-content: center !important;
}

.katex-html {
  max-width: 100%;
  overflow: visible !important;
}

/* Scale formulas on mobile */
@media (max-width: 640px) {
  .katex {
    font-size: 0.9em !important;
  }
  
  .katex-display > .katex {
    white-space: normal !important;
  }
  
  .katex .mfrac .frac-line {
    min-width: 0;
  }
  
  .katex .mspace {
    margin-right: 0 !important;
  }
  
  .katex .mord + .mrel {
    margin-left: 0.2em;
    margin-right: 0.2em;
  }
}

/* Dark mode formula styles */
.dark .katex {
  @apply text-gray-100;
}

.dark .katex .mord,
.dark .katex .mbin,
.dark .katex .mrel,
.dark .katex .mopen,
.dark .katex .mclose,
.dark .katex .mpunct,
.dark .katex .minner {
  @apply text-current;
}

/* Calculation section styles */
.calculation-section {
  @apply space-y-4 p-4 rounded-xl bg-white dark:bg-gray-800;
}

.calculation-title {
  @apply text-lg font-semibold text-gray-900 dark:text-white;
}

.calculation-content {
  @apply space-y-2;
}

/* Formula block styles */
.formula-block {
  @apply p-4 rounded-lg bg-gray-50 dark:bg-gray-900;
  overflow: visible;
}

@keyframes rotate {
  0% {
    --gradient-angle: 0deg;
  }
  100% {
    --gradient-angle: 360deg;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.input-gradient-border {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(226, 232, 240), rgb(226, 232, 240)) border-box;
  background-clip: padding-box, border-box;
  transition: background 0.3s ease;
}

.input-gradient-border input,
.input-gradient-border select {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  background-clip: padding-box;
  outline: none;
  box-shadow: none;
}

.calculator-focus-field,
.calculator-focus-group {
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(226, 232, 240), rgb(226, 232, 240)) border-box;
  background-clip: padding-box, border-box;
  transition: background 0.3s ease;
}

.calculator-focus-field {
  background-clip: padding-box, border-box;
}

.calculator-focus-group input,
.calculator-focus-group select {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  box-shadow: none;
}

.calculator-focus-group input:focus,
.calculator-focus-group select:focus,
.calculator-focus-field:focus {
  outline: none;
  box-shadow: none;
}

.calculator-focus-field:focus,
.calculator-focus-group:focus-within {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(199, 210, 254), rgb(199, 210, 254)) border-box;
}

select.calculator-focus-field,
.calculator-focus-group select,
.input-gradient-border select {
  color-scheme: light;
}

select.calculator-focus-field option,
.calculator-focus-group select option,
.input-gradient-border select option {
  background-color: rgb(255, 255, 255);
  color: rgb(31, 41, 55);
}

.date-field-input {
  position: relative;
  color-scheme: light;
  cursor: pointer;
}

.date-field-input::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* Light theme styles */
.input-gradient-border:has(input:focus):has(.indigo-input),
.input-gradient-border:has(select:focus):has(.indigo-input) {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(199, 210, 254), rgb(199, 210, 254)) border-box;
}

.input-gradient-border:has(input:focus):has(.purple-input),
.input-gradient-border:has(select:focus):has(.purple-input) {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(233, 213, 255), rgb(233, 213, 255)) border-box;
}

.input-gradient-border:has(input:focus):has(.pink-input),
.input-gradient-border:has(select:focus):has(.pink-input) {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(251, 207, 232), rgb(251, 207, 232)) border-box;
}

.input-gradient-border:has(input:focus):has(.blue-input),
.input-gradient-border:has(select:focus):has(.blue-input) {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(rgb(191, 219, 254), rgb(191, 219, 254)) border-box;
}

/* Dark theme styles */
.dark .input-gradient-border {
  background:
    linear-gradient(rgb(17, 24, 39), rgb(17, 24, 39)) padding-box,
    linear-gradient(rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.15)) border-box;
}

.dark .calculator-focus-field,
.dark .calculator-focus-group {
  background:
    linear-gradient(rgb(17, 24, 39), rgb(17, 24, 39)) padding-box,
    linear-gradient(rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.15)) border-box;
}

.dark select.calculator-focus-field,
.dark .calculator-focus-group select,
.dark .input-gradient-border select {
  color-scheme: dark;
}

.dark select.calculator-focus-field option,
.dark .calculator-focus-group select option,
.dark .input-gradient-border select option {
  background-color: rgb(17, 24, 39);
  color: rgb(229, 231, 235);
}

.dark .date-field-input {
  color-scheme: dark;
}

.dark .input-gradient-border:has(input:focus),
.dark .input-gradient-border:has(select:focus) {
  background:
    linear-gradient(rgb(17, 24, 39), rgb(17, 24, 39)) padding-box,
    conic-gradient(
      from var(--gradient-angle),
      rgba(99, 102, 241, 0.15) 0%,
      rgba(99, 102, 241, 0.15) 10%,
      rgba(129, 140, 248, 1) 20%,
      rgba(165, 180, 252, 1) 40%,
      rgba(99, 102, 241, 0.15) 50%,
      rgba(99, 102, 241, 0.15) 100%
    ) border-box;
  animation: rotate 4s linear infinite;
}

.dark .calculator-focus-field:focus,
.dark .calculator-focus-group:focus-within {
  background:
    linear-gradient(rgb(17, 24, 39), rgb(17, 24, 39)) padding-box,
    conic-gradient(
      from var(--gradient-angle),
      rgba(99, 102, 241, 0.15) 0%,
      rgba(99, 102, 241, 0.15) 10%,
      rgba(129, 140, 248, 1) 20%,
      rgba(165, 180, 252, 1) 40%,
      rgba(99, 102, 241, 0.15) 50%,
      rgba(99, 102, 241, 0.15) 100%
    ) border-box;
  animation: rotate 4s linear infinite;
}

input[type="number"] {
  @apply transition-colors duration-200 ease-in-out bg-white dark:bg-gray-900;
}

input[type="number"]:focus {
  @apply outline-none;
}

.gradient-bg {
  @apply bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 dark:from-indigo-800 dark:via-purple-800 dark:to-pink-800;
}

.premium-glass-surface {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 100%);
  backdrop-filter: blur(22px);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.premium-glass-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.14), transparent 36%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 32%);
}

.dark .premium-glass-surface {
  border-color: rgba(71, 85, 105, 0.72);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.82) 0%, rgba(17, 24, 39, 0.68) 100%);
  box-shadow:
    0 28px 70px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.premium-card-link {
  position: relative;
  overflow: hidden;
  border-color: rgba(226, 232, 240, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.62) 100%);
  backdrop-filter: blur(18px);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.premium-card-link::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 42%),
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 36%);
}

.premium-card-link:hover::before,
.premium-card-link:focus-visible::before {
  opacity: 1;
}

.premium-card-link:hover,
.premium-card-link:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(165, 180, 252, 0.72);
  box-shadow:
    0 28px 60px rgba(99, 102, 241, 0.14),
    0 12px 30px rgba(15, 23, 42, 0.08);
}

.dark .premium-card-link {
  border-color: rgba(71, 85, 105, 0.7);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.72) 0%, rgba(17, 24, 39, 0.56) 100%);
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark .premium-card-link:hover,
.dark .premium-card-link:focus-visible {
  border-color: rgba(129, 140, 248, 0.48);
  box-shadow:
    0 28px 64px rgba(79, 70, 229, 0.22),
    0 14px 30px rgba(2, 6, 23, 0.34);
}

.navigation-shell {
  background: transparent;
  box-shadow: none;
}

.navigation-panel {
  border: 1px solid rgba(226, 232, 240, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.86) 100%);
  backdrop-filter: blur(22px);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.dark .navigation-panel {
  border-color: rgba(71, 85, 105, 0.7);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.88) 100%);
  box-shadow:
    0 28px 70px rgba(2, 6, 23, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark .navigation-shell {
  background: transparent;
  box-shadow: none;
}

.calculator-surface {
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.dark .calculator-surface {
  border-color: rgba(71, 85, 105, 0.78);
  background:
    linear-gradient(180deg, rgba(31, 41, 55, 0.98) 0%, rgba(17, 24, 39, 0.94) 100%);
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calculator-subsurface {
  border: 1px solid rgba(226, 232, 240, 0.82);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(248, 250, 252, 0.78) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.dark .calculator-subsurface {
  border-color: rgba(71, 85, 105, 0.72);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.82) 0%, rgba(15, 23, 42, 0.68) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calculator-toolbar-surface {
  border: 1px solid rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

.dark .calculator-toolbar-surface {
  border-color: rgba(71, 85, 105, 0.72);
  background: rgba(31, 41, 55, 0.88);
  box-shadow:
    0 20px 40px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calculator-metric-card {
  border: 1px solid rgba(226, 232, 240, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 8px 20px rgba(15, 23, 42, 0.03);
}

.dark .calculator-metric-card {
  border-color: rgba(71, 85, 105, 0.72);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.9) 0%, rgba(15, 23, 42, 0.84) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(2, 6, 23, 0.18);
}

.calculator-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.dark .calculator-metric-label {
  color: rgb(148 163 184);
}

.calculator-metric-value {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: rgb(15 23 42);
  font-variant-numeric: tabular-nums;
}

.dark .calculator-metric-value {
  color: rgb(248 250 252);
}

.calculator-table-shell {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 28px rgba(15, 23, 42, 0.04);
}

.dark .calculator-table-shell {
  border-color: rgba(71, 85, 105, 0.72);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.84) 0%, rgba(15, 23, 42, 0.78) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 36px rgba(2, 6, 23, 0.2);
}

.calculator-table {
  width: 100%;
  border-collapse: collapse;
}

.calculator-table thead th {
  background: rgba(248, 250, 252, 0.88);
  padding: 0.9rem 1rem;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.dark .calculator-table thead th {
  background: rgba(15, 23, 42, 0.46);
  color: rgb(148 163 184);
}

.calculator-table tbody td {
  border-top: 1px solid rgba(226, 232, 240, 0.82);
  padding: 0.95rem 1rem;
  color: rgb(51 65 85);
}

.dark .calculator-table tbody td {
  border-top-color: rgba(71, 85, 105, 0.7);
  color: rgb(226 232 240);
}

.calculator-table tbody tr:hover td {
  background: rgba(248, 250, 252, 0.62);
}

.dark .calculator-table tbody tr:hover td {
  background: rgba(15, 23, 42, 0.36);
}

.calculator-table-row-label {
  background: rgba(248, 250, 252, 0.78);
}

.dark .calculator-table-row-label {
  background: rgba(15, 23, 42, 0.3);
}

.calculator-table-value {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgb(15 23 42);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dark .calculator-table-value {
  color: rgb(248 250 252);
}

@layer utilities {
  .ease-spring {
    transition-timing-function: cubic-bezier(0.87, 0, 0.13, 1);
  }
  
  .animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }
  
  .animation-delay-100 {
    animation-delay: 100ms;
  }
  
  .animation-delay-200 {
    animation-delay: 200ms;
  }
  
  .animation-delay-300 {
    animation-delay: 300ms;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      translate: 0 20px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
  
  @keyframes float {
    0% { translate: 0 0px; rotate: 0deg; }
    50% { translate: 0 -15px; rotate: 2deg; }
    100% { translate: 0 0px; rotate: 0deg; }
  }

  @keyframes float-reverse {
    0% { translate: 0 0px; rotate: 0deg; }
    50% { translate: 0 15px; rotate: -2deg; }
    100% { translate: 0 0px; rotate: 0deg; }
  }

  .animate-float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
  }

  @keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
  }

  .animate-marquee {
    animation: marquee 25s linear infinite;
  }
}

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

  .premium-card-link:hover,
  .premium-card-link:focus-visible {
    transform: none;
  }
}

.cap-table-print-report {
  display: none;
  background: #ffffff;
  color: #111827;
}

.option-pool-print-report {
  display: none;
  background: #ffffff;
  color: #111827;
}

.anti-dilution-print-report {
  display: none;
  background: #ffffff;
  color: #111827;
}

.safe-print-report {
  display: none;
  background: #ffffff;
  color: #111827;
}

.cap-table-print-shell,
.option-pool-print-shell,
.anti-dilution-print-shell,
.safe-print-shell {
  background: #ffffff;
  color: #111827;
}

.cap-table-print-report table,
.option-pool-print-report table,
.anti-dilution-print-report table,
.safe-print-report table,
.cap-table-print-report tbody,
.option-pool-print-report tbody,
.anti-dilution-print-report tbody,
.safe-print-report tbody,
.cap-table-print-report tr,
.option-pool-print-report tr,
.anti-dilution-print-report tr,
.safe-print-report tr,
.cap-table-print-report td,
.option-pool-print-report td,
.anti-dilution-print-report td,
.safe-print-report td {
  background: #ffffff;
  color: #111827;
}

@media print {
  @page {
    margin: 0.6in;
    size: auto;
  }

  html,
  body,
  #root {
    background: #ffffff !important;
    color: #111827 !important;
    color-scheme: light !important;
  }

  .cap-table-print-report,
  .option-pool-print-report,
  .anti-dilution-print-report,
  .safe-print-report,
  .cap-table-print-shell,
  .option-pool-print-shell,
  .anti-dilution-print-shell,
  .safe-print-shell,
  .cap-table-print-header,
  .option-pool-print-header,
  .anti-dilution-print-header,
  .safe-print-header,
  .cap-table-print-section,
  .option-pool-print-section,
  .anti-dilution-print-section,
  .safe-print-section {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: none !important;
    color-scheme: light !important;
  }

  .cap-table-print-report table,
  .option-pool-print-report table,
  .anti-dilution-print-report table,
  .safe-print-report table,
  .cap-table-print-report tbody,
  .option-pool-print-report tbody,
  .anti-dilution-print-report tbody,
  .safe-print-report tbody,
  .cap-table-print-report tr,
  .option-pool-print-report tr,
  .anti-dilution-print-report tr,
  .safe-print-report tr,
  .cap-table-print-report td,
  .option-pool-print-report td,
  .anti-dilution-print-report td,
  .safe-print-report td {
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.print-cap-table-report {
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.print-cap-table-report .cap-table-screen {
    display: none !important;
  }

  body.print-cap-table-report .cap-table-print-report {
    display: block !important;
  }

  body.print-safe-report {
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.print-safe-report .safe-screen {
    display: none !important;
  }

  body.print-safe-report .safe-print-report {
    display: block !important;
  }

  body.print-option-pool-report {
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.print-option-pool-report .option-pool-screen {
    display: none !important;
  }

  body.print-option-pool-report .option-pool-print-report {
    display: block !important;
  }

  body.print-anti-dilution-report {
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.print-anti-dilution-report .anti-dilution-screen {
    display: none !important;
  }

  body.print-anti-dilution-report .anti-dilution-print-report {
    display: block !important;
  }

  .cap-table-print-shell {
    color: #111827;
    font-size: 12px;
    line-height: 1.5;
  }

  .option-pool-print-shell {
    color: #111827;
    font-size: 12px;
    line-height: 1.5;
  }

  .anti-dilution-print-shell {
    color: #111827;
    font-size: 12px;
    line-height: 1.5;
  }

  .safe-print-shell {
    color: #111827;
    font-size: 12px;
    line-height: 1.5;
  }

  .calculator-print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
  }

  .calculator-print-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .calculator-print-source {
    margin: 2px 0 0;
    font-size: 11px;
    color: #64748b;
  }

  .cap-table-print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .option-pool-print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .anti-dilution-print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .safe-print-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .cap-table-print-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
  }

  .option-pool-print-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
  }

  .anti-dilution-print-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
  }

  .safe-print-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
  }

  .cap-table-print-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
  }

  .option-pool-print-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
  }

  .anti-dilution-print-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
  }

  .safe-print-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
  }

  .cap-table-print-subtitle {
    margin: 6px 0 0;
    font-size: 15px;
    color: #475569;
  }

  .option-pool-print-subtitle {
    margin: 6px 0 0;
    font-size: 15px;
    color: #475569;
  }

  .anti-dilution-print-subtitle {
    margin: 6px 0 0;
    font-size: 15px;
    color: #475569;
  }

  .safe-print-subtitle {
    margin: 6px 0 0;
    font-size: 15px;
    color: #475569;
  }

  .cap-table-print-meta p {
    margin: 0 0 4px;
  }

  .option-pool-print-meta p {
    margin: 0 0 4px;
  }

  .anti-dilution-print-meta p {
    margin: 0 0 4px;
  }

  .safe-print-meta p {
    margin: 0 0 4px;
  }

  .cap-table-print-section {
    margin-top: 20px;
    break-inside: avoid;
  }

  .option-pool-print-section {
    margin-top: 20px;
    break-inside: avoid;
  }

  .option-pool-print-section[data-testid="option-pool-print-breakdown"] {
    break-inside: auto;
    page-break-inside: auto;
  }

  .anti-dilution-print-section {
    margin-top: 20px;
    break-inside: avoid;
  }

  .safe-print-section {
    margin-top: 20px;
    break-inside: avoid;
  }

  .safe-print-section[data-testid="safe-print-ownership-breakdown"] {
    break-inside: auto;
    page-break-inside: auto;
  }

  .cap-table-print-section h2 {
    margin: 0 0 12px;
    font-size: 16px;
  }

  .option-pool-print-section h2 {
    margin: 0 0 12px;
    font-size: 16px;
  }

  .anti-dilution-print-section h2 {
    margin: 0 0 12px;
    font-size: 16px;
  }

  .safe-print-section h2 {
    margin: 0 0 12px;
    font-size: 16px;
  }

  .cap-table-print-section h3 {
    margin: 0 0 8px;
    font-size: 13px;
  }

  .safe-print-section h3 {
    margin: 0 0 8px;
    font-size: 13px;
  }

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

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

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

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

  .cap-table-print-grid ul,
  .cap-table-print-issues {
    margin: 0;
    padding-left: 18px;
  }

  .safe-print-grid ul,
  .safe-print-issues {
    margin: 0;
    padding-left: 18px;
  }

  .option-pool-print-grid > div {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
  }

  .anti-dilution-print-grid > div {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
  }

  .option-pool-print-grid span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
  }

  .anti-dilution-print-grid span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
  }

  .option-pool-print-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    color: #111827;
  }

  .anti-dilution-print-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    color: #111827;
  }

  .cap-table-print-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .safe-print-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .cap-table-print-metrics > div {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
  }

  .safe-print-metrics > div {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
  }

  .cap-table-print-metrics span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
  }

  .safe-print-metrics span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
  }

  .cap-table-print-metrics strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    color: #111827;
  }

  .safe-print-metrics strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    color: #111827;
  }

  .cap-table-print-chart-card {
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
  }

  .cap-table-print-chart-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .option-pool-print-chart-card,
  .anti-dilution-print-chart-card,
  .safe-print-chart-card {
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
  }

  .option-pool-print-section[data-testid="option-pool-print-breakdown"] .option-pool-print-chart-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  .anti-dilution-print-section[data-testid="anti-dilution-print-ownership-comparison"] .anti-dilution-print-chart-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  .safe-print-section[data-testid="safe-print-ownership-breakdown"] .safe-print-chart-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  .option-pool-print-chart-image,
  .anti-dilution-print-chart-image,
  .safe-print-chart-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .option-pool-print-section[data-testid="option-pool-print-breakdown"] .option-pool-print-chart-image {
    max-width: 88%;
    margin: 0 auto;
  }

  .safe-print-section[data-testid="safe-print-ownership-breakdown"] .safe-print-chart-image {
    max-width: 88%;
    margin: 0 auto;
  }

  .cap-table-print-report table {
    width: 100%;
    border-collapse: collapse;
  }

  .option-pool-print-report table,
  .anti-dilution-print-report table {
    width: 100%;
    border-collapse: collapse;
  }

  .safe-print-report table {
    width: 100%;
    border-collapse: collapse;
  }

  .cap-table-print-report th,
  .cap-table-print-report td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
  }

  .option-pool-print-report th,
  .option-pool-print-report td,
  .anti-dilution-print-report th,
  .anti-dilution-print-report td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
  }

  .safe-print-report th,
  .safe-print-report td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
  }

  .cap-table-print-report th {
    background: #eef2ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3730a3;
  }

  .option-pool-print-report th,
  .anti-dilution-print-report th {
    background: #eef2ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3730a3;
  }

  .safe-print-report th {
    background: #eef2ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3730a3;
  }

  .anti-dilution-print-issues {
    margin: 0;
    padding-left: 18px;
  }
}
