/* The shared look of skills.0-0.chat and models.0-0.chat.
   ONE source of truth — sync.mjs copies this into each site's public/ at deploy time, so the two
   stores cannot drift into looking like different products. Palette matches the 00 app (#0a0b0d),
   light theme when the reader asks for it. */

:root {
  --bg: #0a0b0d;
  --surface: #131519;
  --surface-2: #191c21;
  --line: #262a31;
  --text: #e8eaed;
  --muted: #9aa1ab;
  --accent: #7dd3a0;
  --accent-ink: #0a0b0d;
  --warn: #f0b352;
  --bad: #ef7a7a;
  /* The logo tile, its lit pixels and its unlit ones. All three are fixed in BOTH themes: the mark is
     a black tile with white pixels, and a logo that changes colour with the reader's OS is not a logo. */
  --face-tile: #08090b;
  --face-lit: #ffffff;
  --pixel-off: #2a2f36;
  --radius: 12px;
  --wrap: 76rem;
  /* Height of the sticky header. Anything that has to sit UNDER it (a sticky table head) offsets by
     this, so the two can't disagree. */
  --topbar: 57px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfa;
    --surface: #fff;
    --surface-2: #f3f4f5;
    --line: #e3e5e8;
    --text: #16181c;
    --muted: #6b727c;
    --accent: #1f8a52;
    --accent-ink: #fff;
    --warn: #8a5a00;
    --bad: #b3261e;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

/* `hidden` must win. Any component that sets its own `display` (a flex card, a grid row) silently
   overrides the UA's [hidden] rule, and every client-side filter then "works" — the count updates,
   the cards stay on screen. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
code {
  font: 0.9em/1.5 ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

/* ── header ─────────────────────────────────────────────────────────────────
   Three columns so the centre slot (search on skills, tabs on models) is centred on the PAGE, not
   on whatever is left over after the brand — a search box that drifts when the logo's label changes
   length is the tell that a header was laid out by accident. The inner wrap matches <main>'s width,
   so the logo lines up with the first column of content beneath it. */

.top {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.top .wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 24px;
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  justify-self: start;
}
.brand .face { display: block; border-radius: 6px; }
.brand .marklink { display: flex; text-decoration: none; }
.brand .marklink:hover { opacity: 0.85; }
.brand .brandname:hover { color: var(--accent); }
/* A separator, not a word: it should be felt more than read. */
.brand .slash { color: var(--muted); font-weight: 400; opacity: 0.4; }
.brand .brandname { letter-spacing: -0.01em; text-decoration: none; }

/* The header owns its own spacing. Page stylesheets load after this one and reuse generic class names
   (.actions, .search, .tabs) for their own components — one stray margin there used to make the header
   38px taller on one site and not the other. */
.top .wrap > * { margin: 0; }
.centre { justify-self: center; width: 100%; display: flex; justify-content: center; }
.topnav { justify-self: end; display: flex; align-items: center; gap: 20px; }

.ghost { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.ghost:hover { color: var(--text); }

/* The one solid button on the page: white on dark, and it stays white-on-black in the light theme
   too, because it is the same button on both sites and on the app's own site. */
.pill {
  background: #fff;
  color: #0a0b0d;
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pill:hover { background: #e8eaed; border-color: #e8eaed; }
@media (prefers-color-scheme: light) {
  .pill { background: #16181c; color: #fff; border-color: #16181c; }
  .pill:hover { background: #000; border-color: #000; }
}

/* search (skills) */
.search { width: 100%; max-width: 30rem; }
.search input {
  width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Segmented control — the same shape as the app's right-rail tabs (Info / Android / Browser in
   PreviewsPanel.vue): a recessed track with a single RAISED pill marking what's active. The active
   segment is neutral, not accent-coloured: it marks position, it isn't a call to action. */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.tab {
  padding: 4px 12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.on {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
@media (prefers-color-scheme: light) {
  .tab.on { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
}

main { max-width: var(--wrap); margin: 0 auto; padding: 32px 24px 64px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 24px 48px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.foot a { color: var(--accent); }

@media (max-width: 780px) {
  .top .wrap { grid-template-columns: auto 1fr; row-gap: 10px; }
  .centre { grid-column: 1 / -1; order: 3; }
  .topnav { justify-self: end; }
  main { padding: 20px 16px 48px; }
}
