:root {
  --paper: #faf9f6;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-muted: #57534e;
  --line: #e7e5e4;
  --forest: #14532d;
  --forest-hover: #166534;
  --forest-soft: #f0fdf4;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.font-serif-editorial {
  font-family: 'Newsreader', Georgia, serif;
}

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

/* Subtle custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

/* Hide scrollbar for horizontal sub-element chips */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Safe area for mobile bottom navigation */
.pb-safe {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.main-mobile-pad {
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
}

@media (min-width: 1024px) {
  .main-mobile-pad {
    padding-bottom: 2.5rem;
  }
}

/* Bottom sheet entrance animation */
@keyframes sheetUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-panel {
  animation: sheetUp 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Official print stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11px !important;
  }

  .no-print {
    display: none !important;
  }

  .print-only-table {
    display: block !important;
  }

  #mainContent {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #viewContainer {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .print-card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  table, th, td {
    border-color: #78716c !important;
  }
}
