/* Grafloria demo shell — the shared chrome every gallery page wears.
   Brand tokens mirror grafloria.com (indigo #3B52D9 on near-white, soft indigo in dark). */
:root {
  color-scheme: light dark;
  --gf-accent: #3B52D9; --gf-deep: #2A3CA8; --gf-soft: #94A5F0;
  --gf-wash: #EEF1FE; --gf-bg: #FCFCFF; --gf-panel: #FFFFFF;
  --gf-ink: #232A3D; --gf-mut: #5A6478; --gf-line: #E3E7F2;
  --an-shadow: 0 8px 40px rgba(35, 42, 61, .16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --gf-accent: #8B9CF2; --gf-deep: #A9B6F5; --gf-soft: #5A6EE0;
    --gf-wash: rgba(139, 156, 242, .13); --gf-bg: #0E1118; --gf-panel: #141927;
    --gf-ink: #E6EAF6; --gf-mut: #9AA3BC; --gf-line: rgba(255, 255, 255, .1);
    --an-shadow: 0 8px 40px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--gf-bg); color: var(--gf-ink);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Page header: brand row + demo title + blurb ── */
header { padding: 10px 24px 12px; border-bottom: 1px solid var(--gf-line); background: var(--gf-panel); }
.brand-row { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; }
.brand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.brand img { width: 20px; height: 20px; }
.brand span { font-weight: 700; font-size: 14.5px; letter-spacing: -.2px; color: var(--gf-ink); }
.brand:hover span { color: var(--gf-accent); }
.crumb { color: var(--gf-mut); font-size: 12.5px; }
.crumb::before { content: "/"; margin-right: 8px; color: var(--gf-line); }
.head-links { margin-left: auto; display: flex; gap: 16px; font-size: 12.5px; font-weight: 500; }
.head-links a { color: var(--gf-accent); text-decoration: none; }
.head-links a:hover { text-decoration: underline; }
h1 { margin: 0 0 2px; font-size: 19px; letter-spacing: -.3px; }
.blurb { margin: 0; color: var(--gf-mut); font-size: 13px; max-width: 120ch; }
#canvas { width: 100%; height: calc(100vh - 100px); }

/* ── The gallery side menu (built by demo.js from the generated manifest) ── */
#grafloria-nav-toggle {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gf-line);
  background: var(--gf-panel); color: var(--gf-ink); font-size: 17px; cursor: pointer;
  box-shadow: var(--an-shadow); display: flex; align-items: center; justify-content: center;
  transition: transform .15s, opacity .15s;
}
#grafloria-nav-toggle:hover { transform: scale(1.06); border-color: var(--gf-soft); }
body.nav-open #grafloria-nav-toggle { opacity: 0; pointer-events: none; }
#grafloria-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: 264px; z-index: 55;
  background: var(--gf-panel); color: var(--gf-ink); border-right: 1px solid var(--gf-line);
  box-shadow: var(--an-shadow); display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .2s cubic-bezier(.4,0,.2,1);
  font-size: 13px;
}
body.nav-open #grafloria-nav { transform: none; }
.an-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--gf-line); }
.an-home { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gf-ink); text-decoration: none; letter-spacing: -.01em; }
.an-home img { width: 18px; height: 18px; }
.an-home:hover { color: var(--gf-accent); }
.an-close { border: 0; background: none; color: var(--gf-mut); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.an-close:hover { color: var(--gf-ink); }
.an-search { margin: 10px 12px; padding: 7px 10px; border: 1px solid var(--gf-line); border-radius: 8px;
  background: var(--gf-bg); color: var(--gf-ink); font: inherit; outline: none; }
.an-search:focus { border-color: var(--gf-accent); }
.an-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.an-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--gf-mut); padding: 12px 8px 5px; position: sticky; top: 0; background: var(--gf-panel); }
.an-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 7px;
  color: var(--gf-ink); text-decoration: none; }
.an-item:hover { background: var(--gf-wash); }
.an-item.current { background: var(--gf-wash); color: var(--gf-accent); font-weight: 640; box-shadow: inset 2px 0 0 var(--gf-accent); }
.an-new { flex: none; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: #16a34a; padding: 1px 5px; border-radius: 999px; }
.an-foot { padding: 9px 14px; border-top: 1px solid var(--gf-line); color: var(--gf-mut); font-size: 11px; }
.an-foot a { color: var(--gf-accent); text-decoration: none; }
.an-foot a:hover { text-decoration: underline; }
/* Wide screens: an open menu shifts the page instead of overlaying it. */
@media (min-width: 1100px) {
  body.nav-open { padding-left: 264px; }
}

/* ---- "How to test" panel (right side) — gallery chrome like the nav ---- */
#grafloria-howto { position: fixed; top: 16px; right: 16px; z-index: 50; width: 280px; max-height: calc(100vh - 32px);
  overflow-y: auto; background: var(--gf-panel); border: 1px solid var(--gf-line);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(35, 42, 61, .13); font-size: 13px; color: var(--gf-ink); }
#grafloria-howto .ht-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
  border-bottom: 1px solid var(--gf-line); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--gf-accent); }
#grafloria-howto .ht-head button { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer;
  color: var(--gf-mut); padding: 0 2px; }
#grafloria-howto .ht-head button:hover { color: var(--gf-ink); }
#grafloria-howto ol { margin: 8px 0 12px; padding-left: 30px; }
#grafloria-howto li { margin: 7px 8px 7px 0; line-height: 1.45; overflow-wrap: anywhere; }
#grafloria-howto-open { position: fixed; top: 16px; right: 16px; z-index: 50; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--gf-line); background: var(--gf-panel);
  color: var(--gf-accent); font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(35, 42, 61, .12); }
#grafloria-howto-open:hover { transform: scale(1.06); border-color: var(--gf-soft); }
#grafloria-howto .ht-run { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--gf-line); }
#grafloria-howto .ht-run button { border: 1px solid var(--gf-soft); background: var(--gf-wash);
  color: var(--gf-accent); font: inherit; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
#grafloria-howto .ht-run button:hover { background: var(--gf-accent); color: #fff; }
#grafloria-howto .ht-run span { font-size: 12px; color: var(--gf-mut); }

/* The How-to panel RESERVES space instead of overlaying content (live audit:
   readouts, export notes and whole side panels rendered underneath it). */
@media (min-width: 1100px) {
  body.howto-open { padding-right: 312px; }
}
