/* copied from tools/site_shell, do not edit here */
/* The one shell every GraveCorp site wears: logs, translate and gravecorp.net. The logs site's graphite and violet
   (owner, 2026-11-05: "logs has the best UI"), one header at one height, nothing that moves once drawn. Every text
   color is AA or better on --bg and --panel. Edit it here, then run python3 tools/site_shell/sync.py. */
:root {
  --bg: #141414; --panel: #1c1c1c; --raise: #242424; --edge: #2e2e2e; --ink: #e8e8e8; --dim: #a3a3a3; --faint: #8f8f8f;
  --accent: #b18cff; --good: #4cc777; --warn: #e6c84f; --bad: #ff6b6b;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --gc-head: 48px; --gc-page: 1280px;
  color-scheme: dark;
}
/* the scrollbar's room is kept on a short page too, so nothing slides sideways from one page to the next */
html { scrollbar-gutter: stable; background: var(--bg); }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the header: 48 px on every page of every site, one line, sticky */
.gc-top { position: sticky; top: 0; z-index: 20; height: var(--gc-head); background: var(--bg); border-bottom: 1px solid var(--edge);
  font: 400 14px/20px var(--sans); }
.gc-bar { display: flex; align-items: center; gap: 18px; height: 100%; max-width: var(--gc-page); margin: 0 auto; padding: 0 16px;
  white-space: nowrap; overflow: hidden; }
.gc-brand { flex: none; color: var(--ink); font: 700 16px/20px var(--sans); letter-spacing: .01em; }
.gc-brand:hover { color: var(--accent); text-decoration: none; }
.gc-sites { flex: none; display: flex; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.gc-sites a { display: flex; align-items: center; gap: 5px; padding: 3px 10px; color: var(--dim); font-size: 13px; line-height: 20px; }
.gc-sites a + a { border-left: 1px solid var(--edge); }
.gc-sites a:hover { color: var(--ink); text-decoration: none; }
.gc-sites a[aria-current] { color: var(--ink); background: var(--raise); box-shadow: inset 0 -2px 0 var(--accent); }
.gc-sections { display: flex; align-self: stretch; gap: 20px; min-width: 0; }
.gc-sections a { display: flex; align-items: center; color: var(--dim); }
.gc-sections a:hover { color: var(--ink); text-decoration: none; }
.gc-sections a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.gc-sections a:focus-visible { outline-offset: -2px; }
.gc-menu { display: none; min-width: 0; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--edge);
  border-radius: 3px; padding: 4px 6px; height: 30px; }
.gc-utils { margin-left: auto; flex: none; display: flex; align-items: center; gap: 16px; }
.gc-utils a { color: var(--dim); }
.gc-utils a:hover { color: var(--ink); }
.gc-btn { font: 400 13px/20px var(--sans); color: var(--dim); background: var(--panel); border: 1px solid var(--edge); border-radius: 3px;
  padding: 2px 8px; cursor: pointer; }
.gc-btn:hover { color: var(--ink); border-color: var(--faint); }
.gc-btn kbd { font: 11px var(--mono); border: 1px solid var(--faint); border-radius: 3px; padding: 0 4px; margin-left: 5px; }
/* a count (unread mail): a number on a violet pill beside its word, none at zero */
.gc-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--bg);
  font: 700 11px/16px var(--sans); text-align: center; }
.gc-count[data-unread="0"], .gc-count[data-unread=""] { display: none; }
.gc-sections .gc-count { margin-left: 6px; }
/* live pages: a word and a shape, live a green dot, stale a yellow triangle; first on the right so its changing width
   moves nothing else */
.gc-live { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.gc-live:empty { display: none; }
.gc-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--good); }
.gc-live.stale { color: var(--warn); }
.gc-live.stale::before { width: 9px; border-radius: 0; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
/* a swap that waits on the network: a thin line under the header, nothing else moves */
html[data-gc-busy] .gc-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
html[data-gc-busy] { cursor: progress; }

/* the content: what a swap replaces. Tall enough that a short page never pulls the scroll back */
.gc-main { display: block; max-width: var(--gc-page); min-height: calc(100vh - var(--gc-head)); margin: 0 auto; padding: 20px 16px 60px; }
.gc-main:focus { outline: none; }
/* a row still loading: the height of a real one, so nothing below jumps when it comes */
.gc-skel td { height: 34px; }
.gc-skel td::after { content: ""; display: block; height: 10px; width: 60%; border-radius: 3px; background: var(--panel); }

@media (max-width: 1100px) { .gc-live .ago { display: none; } }
@media (max-width: 860px) {
  .gc-bar { gap: 10px; padding: 0 10px; }
  .gc-brand { font-size: 15px; }
  .gc-sites a { gap: 4px; padding: 3px 6px; font-size: 12px; }
  .gc-sections, .gc-utils .gc-wide { display: none; }
  .gc-menu { display: block; flex: 0 1 104px; width: 104px; padding: 4px 2px; font-size: 13px; }   /* one width on every site, whatever its pages are called */
  .gc-utils { gap: 10px; }
  .gc-live { font-size: 0; }
  .gc-live::before { margin-right: 0; }
  .gc-main { padding: 12px 10px 40px; }
}
