/* Direction: Tallyflow — a ledger console. Paper-white sheet, ink navy,
   a confident ledger-green accent, tabular mono figures. */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f5f6f2;
  --surface: #ffffff;
  --surface-2: #e9ebe3;
  --border: #d5d9cc;
  --border-strong: #adb4a2;
  --ink: #16202b;
  --muted: #576271;
  --accent: #0e6b4c;
  --accent-hover: #0b5a3f;
  --accent-ink: #ffffff;
  --accent-text: #0b5a3f;
  --accent-strong: #084a34;
  --accent-soft: #daeee4;
  --accent-border: #a7cfbd;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dae8dc;
  --success-strong: #137638;
  --warning: #a35a07;
  --warning-ink: #ffffff;
  --warning-soft: #ebe3d6;
  --warning-strong: #965306;
  --danger: #b42318;
  --danger-ink: #ffffff;
  --danger-soft: #edddd8;
  --danger-strong: #b42318;
  --chart-1: #0e6b4c;
  --chart-2: #1280a0;
  --chart-3: #473e90;
  --chart-4: #a14c81;
  --chart-5: #803103;
  --chart-6: #7c7412;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display-weight: 700;
  --display-tracking: -0.03em;
  --eyebrow-tracking: 0.12em;
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --card-pad: 1.25rem;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="dark"] {
  --canvas: #020f0b;
  --surface: #1b2723;
  --surface-2: #0f1b17;
  --border: #25312d;
  --border-strong: #4e5754;
  --ink: #f5f6f2;
  --muted: #949a96;
  --accent: #0e6b4c;
  --accent-hover: #328167;
  --accent-ink: #ffffff;
  --accent-text: #609d88;
  --accent-strong: #52957e;
  --accent-soft: #052319;
  --accent-border: #073828;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #062816;
  --success-strong: #499c68;
  --warning: #a35a07;
  --warning-ink: #ffffff;
  --warning-soft: #25200a;
  --warning-strong: #b77e3e;
  --danger: #b42318;
  --danger-ink: #ffffff;
  --danger-soft: #29130e;
  --danger-strong: #ca6259;
  --chart-1: #287d5d;
  --chart-2: #1d94b7;
  --chart-3: #7873ca;
  --chart-4: #b55e93;
  --chart-5: #bf6339;
  --chart-6: #8f861d;
}

/* Tallyflow — console details */

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* segmented tabs for the import console */
.ttab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ttab:hover {
  color: var(--accent-text);
  border-color: var(--accent-border);
}
.ttab[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent-border);
}
.ttab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* attach zone */
.drop {
  display: block;
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--surface-2);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ruled paper for raw text areas */
.sheet {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6rem;
}

.xmlbox {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  max-height: 20rem;
  max-width: 100%;
}

/* htmx busy states */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex;
}
.htmx-request button[type="submit"] {
  opacity: 0.65;
}

.rowgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .rowgrid {
    grid-template-columns: 2.2fr 0.8fr 1fr 1fr;
  }
}

@keyframes tf-rise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}
[data-inview].tf-rise {
  animation: tf-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.reduced-motion [data-inview].tf-rise {
  animation: none;
}
