/* LizHub design tokens, v2 (2026-11-29: focus, field-border and on-down tokens; phone bar).
 *
 * Owned by the hub (hub/design/). Other parts vendor a copy: copy this file, keep the
 * version line, and map your own variables onto --lh-* where you have them. Light by
 * default, dark from the system, and a [data-theme] attribute overrides either way.
 *
 * Accent is the teal-green lizhub-accounts already uses, so the two match from day one.
 */

:root {
  /* colour: warm paper, basalt ink, lichen accent, sun */
  --lh-bg: #f5f1e8;
  --lh-surface: #fffcf5;
  --lh-surface-2: #efe8da;
  --lh-ink: #1a2320;
  --lh-ink-soft: #52605a;
  --lh-line: #d9cfbd;
  --lh-scale: rgba(29, 111, 94, 0.09);
  --lh-accent: #1d6f5e;
  --lh-accent-strong: #145244;
  --lh-accent-soft: #d7ebe3;
  --lh-on-accent: #ffffff;
  --lh-sun: #d9962b;
  --lh-sun-soft: #f8e6c4;
  --lh-up: #1d6f5e;
  --lh-down: #b42318;
  --lh-unknown: #7c705c;
  --lh-focus: #9a5b00;
  --lh-field-border: #8f8574;
  --lh-on-down: #ffffff;

  /* type */
  --lh-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --lh-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Source Serif Pro", "Noto Serif", Georgia, serif;
  --lh-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo,
    Consolas, monospace;
  --lh-step--1: 0.875rem;
  --lh-step-0: 1rem;
  --lh-step-1: 1.25rem;
  --lh-step-2: 1.6rem;
  --lh-step-3: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);

  /* shape and space */
  --lh-radius: 14px;
  --lh-radius-small: 8px;
  --lh-space-1: 0.25rem;
  --lh-space-2: 0.5rem;
  --lh-space-3: 0.75rem;
  --lh-space-4: 1rem;
  --lh-space-5: 1.5rem;
  --lh-space-6: 2.25rem;
  --lh-space-7: 3.5rem;
  --lh-shadow: 0 1px 0 rgba(26, 35, 32, 0.04), 0 6px 18px -10px rgba(26, 35, 32, 0.25);
  --lh-bar-height: 3.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lh-bg: #0e1412;
    --lh-surface: #161f1c;
    --lh-surface-2: #1d2925;
    --lh-ink: #e7eee9;
    --lh-ink-soft: #a0b1a9;
    --lh-line: #2b3a35;
    --lh-scale: rgba(63, 176, 143, 0.08);
    --lh-accent: #3fb08f;
    --lh-accent-strong: #66c9aa;
    --lh-accent-soft: #183a31;
    --lh-on-accent: #07120e;
    --lh-sun: #f0b955;
    --lh-sun-soft: #3a2c12;
    --lh-up: #3fb08f;
    --lh-down: #f0705f;
    --lh-unknown: #a99d88;
    --lh-focus: #f0b955;
    --lh-field-border: #5d6f68;
    --lh-on-down: #1a0b08;
    --lh-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --lh-bg: #0e1412;
  --lh-surface: #161f1c;
  --lh-surface-2: #1d2925;
  --lh-ink: #e7eee9;
  --lh-ink-soft: #a0b1a9;
  --lh-line: #2b3a35;
  --lh-scale: rgba(63, 176, 143, 0.08);
  --lh-accent: #3fb08f;
  --lh-accent-strong: #66c9aa;
  --lh-accent-soft: #183a31;
  --lh-on-accent: #07120e;
  --lh-sun: #f0b955;
  --lh-sun-soft: #3a2c12;
  --lh-up: #3fb08f;
  --lh-down: #f0705f;
  --lh-unknown: #a99d88;
  --lh-focus: #f0b955;
  --lh-field-border: #5d6f68;
  --lh-on-down: #1a0b08;
  --lh-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
}

/* The shared top bar (lizhub-bar.html). Self-contained so a part can use it alone. */
.lh-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--lh-surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--lh-line);
  font-family: var(--lh-font-body);
  font-size: var(--lh-step--1);
}
.lh-bar__inner {
  max-width: 72rem;
  margin: 0 auto;
  min-height: var(--lh-bar-height);
  padding: 0 var(--lh-space-4);
  display: flex;
  align-items: center;
  gap: var(--lh-space-4);
}
.lh-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--lh-space-2);
  color: var(--lh-ink);
  text-decoration: none;
  font-family: var(--lh-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.lh-bar__brand svg { width: 1.75rem; height: 1.75rem; color: var(--lh-accent); }
.lh-bar__here {
  color: var(--lh-ink-soft);
  border-left: 1px solid var(--lh-line);
  padding-left: var(--lh-space-3);
}
.lh-bar__inner > nav { margin-left: auto; }
.lh-bar__nav {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--lh-space-1) var(--lh-space-3);
  list-style: none;
  padding: 0;
}
.lh-bar__nav a {
  color: var(--lh-ink-soft);
  text-decoration: none;
  padding: var(--lh-space-1) var(--lh-space-2);
  border-radius: var(--lh-radius-small);
}
.lh-bar__nav a:hover { color: var(--lh-ink); background: var(--lh-surface-2); }
.lh-bar__nav a[aria-current="page"] { color: var(--lh-accent-strong); font-weight: 600; }
.lh-bar a:focus-visible { outline: 3px solid var(--lh-focus); outline-offset: 2px; }
/* Phones: the links get their own scrollable row under the brand, with real tap targets. */
@media (max-width: 40rem) {
  .lh-bar__here { display: none; }
  .lh-bar__inner { flex-wrap: wrap; row-gap: 0; }
  .lh-bar__inner > nav { order: 3; flex-basis: 100%; margin-left: 0; margin-right: calc(-1 * var(--lh-space-4)); }
  .lh-bar__nav { flex-wrap: nowrap; overflow-x: auto; gap: 0; padding-bottom: var(--lh-space-1); scrollbar-width: none; }
  .lh-bar__nav a { display: block; padding: 0.6rem 0.75rem; white-space: nowrap; }
  .lh-bar__nav li:first-child a { padding-left: 0; }
}
