:root {
  --ink: #111111;
  --paper: #fff7da;
  --banana: #ffe45e;
  --guava: #ff4fa3;
  --mint: #37e68a;
  --lime: #b8f34a;
  --clay: #ff6b35;
  --ocean: #00b4d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(17, 17, 17, 0.06) 1px, transparent 1px),
    linear-gradient(110deg, transparent 0 12%, rgba(255, 79, 163, 0.55) 12% 20%, transparent 20% 100%),
    linear-gradient(165deg, transparent 0 72%, rgba(0, 180, 216, 0.55) 72% 82%, transparent 82% 100%),
    linear-gradient(135deg, #fff7da 0%, #d9ffd1 44%, #ffd7a8 100%);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.min-h-screen { min-height: 100vh; }
.h-full { height: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-3 { height: 0.75rem; }
.h-6 { height: 1.5rem; }
.h-48 { height: 12rem; }
.h-72 { height: 18rem; }
.w-3 { width: 0.75rem; }
.w-6 { width: 1.5rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-xs { max-width: 20rem; }
.w-fit { width: fit-content; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-8 { gap: 2rem; }
.gap-6 { gap: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.rounded-md { border-radius: 0.375rem; }
.border-0 { border-width: 0; }
.border { border: 1px solid var(--ink); }
.border-2 { border: 2px solid var(--ink); }
.border-4 { border: 4px solid var(--ink); }
.border-b-4 { border-bottom: 4px solid var(--ink); }
.border-b-2 { border-bottom: 2px solid var(--ink); }
.border-t-2 { border-top: 2px solid var(--ink); }
.border-l-4 { border-left: 4px solid var(--ink); }
.border-line { border-color: var(--ink); }
.bg-white { background-color: #ffffff; }
.bg-paper { background-color: var(--paper); }
.bg-banana { background-color: var(--banana); }
.bg-guava { background-color: var(--guava); }
.bg-mint { background-color: var(--mint); }
.bg-lime { background-color: var(--lime); }
.bg-clay { background-color: var(--clay); }
.bg-ocean { background-color: var(--ocean); }
.bg-transparent { background-color: transparent; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-4 { padding-top: 1rem; }
.sticky { position: sticky; }
.bottom-0 { bottom: 0; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration-line: underline; }
.leading-5 { line-height: 1.25rem; }
.leading-6 { line-height: 1.5rem; }
.text-ink { color: var(--ink); }
.text-white { color: #ffffff; }
.text-ink\/70 { color: rgba(17, 17, 17, 0.7); }
.text-center { text-align: center; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.shadow-soft { box-shadow: 8px 8px 0 var(--ink); }
.shadow-hard { box-shadow: 5px 5px 0 var(--ink); }
.transition { transition: all 150ms ease; }
.appearance-none { appearance: none; }
.opacity-40 { opacity: 0.4; }
.opacity-45 { opacity: 0.45; }
.opacity-80 { opacity: 0.8; }
.opacity-100 { opacity: 1; }

.focus-within\:translate-x-1:focus-within,
.hover\:translate-x-1:hover,
.focus\:translate-x-1:focus {
  transform: translate(0.25rem, 0.25rem);
}

.focus-within\:shadow-none:focus-within,
.hover\:shadow-none:hover,
.focus\:shadow-none:focus {
  box-shadow: none;
}

.focus-within\:opacity-100:focus-within,
.hover\:opacity-100:hover {
  opacity: 1;
}

.hover\:bg-guava:hover { background-color: var(--guava); }
.hover\:bg-lime:hover { background-color: var(--lime); }
.hover\:bg-banana:hover { background-color: var(--banana); }

.focus-within\:translate-y-1:focus-within,
.hover\:translate-y-1:hover,
.focus\:translate-y-1:focus {
  transform: translate(0.25rem, 0.25rem);
}

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

.metric-card {
  position: relative;
}

.metric-help {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.5rem);
  right: 0;
  display: none;
  width: min(20rem, 78vw);
  border: 2px solid var(--ink);
  border-radius: 0.375rem;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 900;
  line-height: 1.45;
}

.metric-card:hover .metric-help,
.metric-card:focus-within .metric-help {
  display: block;
}

.metric-mark {
  cursor: help;
}

.context-select,
.theme-dark select.context-select {
  background-color: #fff7da;
  color: #111111;
}

.context-select option,
.theme-dark select.context-select option {
  background-color: #fff7da;
  color: #111111;
}

.context-label {
  color: #111111;
}

.theme-dark .context-panel .context-label {
  color: #fff7da;
}

.theme-dark .context-modal .context-label {
  color: #111111;
}

.bg-black\/75 { background-color: rgba(0, 0, 0, 0.75); }
.backdrop-blur-sm {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.theme-dark,
body:has(.theme-dark) {
  background:
    linear-gradient(90deg, rgba(255, 247, 218, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 247, 218, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #081714 0%, #10261f 52%, #211427 100%);
  color: var(--paper);
}

.theme-dark {
  --dark-panel: #111f1c;
  --dark-card: #1d2b27;
  --dark-card-2: #243530;
  --dark-muted: rgba(255, 247, 218, 0.82);
}

.theme-dark .border-line {
  border-color: #000000;
}

.theme-dark .bg-paper,
.theme-dark .bg-white {
  background-color: var(--dark-card);
  color: var(--paper);
}

.theme-dark section.bg-white,
.theme-dark aside .bg-white {
  background-color: var(--dark-card-2);
}

.theme-dark .bg-banana {
  background-color: #f4c62f;
}

.theme-dark .text-ink,
.theme-dark .text-ink\/70 {
  color: var(--paper);
}

.theme-dark .text-ink\/70 {
  color: var(--dark-muted);
}

.theme-dark label > span:first-child {
  color: #fff7da;
}

.theme-dark label .text-ink\/70,
.theme-dark .text-xs.font-semibold {
  color: rgba(255, 247, 218, 0.88);
}

.theme-dark p {
  color: inherit;
}

.theme-dark .bg-banana .text-ink,
.theme-dark .bg-mint .text-ink,
.theme-dark .bg-lime .text-ink,
.theme-dark .bg-guava .text-ink,
.theme-dark .bg-clay .text-ink {
  color: var(--ink);
}

.theme-dark .context-panel .text-ink {
  color: #fff7da;
}

.theme-dark .context-panel .text-ink\/70 {
  color: rgba(255, 247, 218, 0.86);
}

.theme-dark .bg-guava,
.theme-dark .bg-mint,
.theme-dark .bg-lime,
.theme-dark .bg-clay,
.theme-dark .bg-ocean {
  color: var(--ink);
}

.theme-dark .bg-ocean.text-white,
.theme-dark .bg-ocean .text-white {
  color: #ffffff;
}

.theme-dark input,
.theme-dark select,
.theme-dark .bg-transparent {
  color: #111111;
}

.theme-dark input,
.theme-dark select {
  background-color: #fff7da;
}

.theme-dark input::placeholder {
  color: rgba(17, 17, 17, 0.58);
}

.theme-dark .field-control {
  background-color: #fff7da;
  color: #111111;
}

.theme-dark .field-control input,
.theme-dark .field-control .text-ink,
.theme-dark .field-control span {
  color: #111111;
}

.theme-dark input.field-control {
  background-color: #fff7da;
  color: #111111;
}

.theme-dark .field-control input::placeholder {
  color: rgba(17, 17, 17, 0.58);
}

.theme-dark input.field-control::placeholder {
  color: rgba(17, 17, 17, 0.58);
}

.theme-dark .opacity-45,
.theme-dark .opacity-80 {
  opacity: 0.9;
}

.theme-dark .shadow-hard {
  box-shadow: 5px 5px 0 #000000;
}

.theme-dark .shadow-soft {
  box-shadow: 8px 8px 0 #000000;
}

.theme-dark .metric-help {
  background: #fff7da;
  color: #111111;
  border-color: #000000;
  box-shadow: 5px 5px 0 #000000;
}

.theme-dark button.bg-white {
  background-color: #f8f1d2;
  color: #111111;
}

.theme-dark button.bg-white:hover {
  background-color: var(--lime);
}

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:p-7 { padding: 1.75rem; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:flex-none { flex: none; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:p-8 { padding: 2rem; }
  .lg\:p-6 { padding: 1.5rem; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-end { align-items: flex-end; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_280px\] {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_300px\] {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_320px\] {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
