/* whi.net — brand theme layer, loaded on every page.
   Overrides shared/styles/base.css tokens; keeps its structural classes. */

@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/archivo-black.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/public-sans.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  --color-accent: #256570;
  --color-accent-hover: #163c42;
  --color-accent-contrast: #ffffff;

  --color-bg: #f4f5f1;
  --color-surface: #ffffff;
  --color-border: #d8dacf;
  --color-text: #1b211d;
  --color-text-muted: #5c655e;
  --color-shadow: rgba(27, 33, 29, 0.06);

  --color-accent-soft-bg: #e4eeee;
  --color-surface-2: #ebece6;

  --font-sans: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* See shared/styles/base.css for why this is guarded rather than a plain
   @media block: an explicit light choice from the header toggle must win
   even while the OS itself is in dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #14181a;
    --color-surface: #1c2224;
    --color-border: #2b3234;
    --color-text: #e9ebe5;
    --color-text-muted: #97a098;
    --color-shadow: rgba(0, 0, 0, 0.4);
    --color-accent: #6fc3ce;
    --color-accent-hover: #96d8e0;
    --color-accent-contrast: #0e2226;

    --color-accent-soft-bg: #1b3236;
    --color-surface-2: #101314;
  }
}

:root[data-theme="dark"] {
  --color-bg: #14181a;
  --color-surface: #1c2224;
  --color-border: #2b3234;
  --color-text: #e9ebe5;
  --color-text-muted: #97a098;
  --color-shadow: rgba(0, 0, 0, 0.4);
  --color-accent: #6fc3ce;
  --color-accent-hover: #96d8e0;
  --color-accent-contrast: #0e2226;

  --color-accent-soft-bg: #1b3236;
  --color-surface-2: #101314;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

h1, h2, h3 {
  text-wrap: balance;
}

/* Shared across tool pages (not the homepage, which sets its own .hero h1
   via home.css, loaded after this file so it still wins). */
.hero h1 {
  font-size: 2rem;
}

.btn--sm {
  padding: var(--space-1) var(--space-3);
  font-size: 0.85rem;
  font-weight: 500;
}

.result-rows {
  margin-top: var(--space-4);
}

.result-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row__label {
  flex: 0 0 200px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.result-row__value {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  word-break: break-word;
}

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

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

.ref-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.ref-table td:first-child {
  color: var(--color-text-muted);
}

.ref-table td:last-child {
  font-family: var(--font-mono);
  text-align: right;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.tab {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}

.tab:hover {
  color: var(--color-text);
}

.tab.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

details summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
  user-select: none;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: var(--space-5);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.dropzone.is-dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft-bg);
  color: var(--color-text);
}
