/* ============================================================================
   David Analytics — COMPONENT LIBRARY galerij
   ========================================================================== */
.g-body { margin: 0; background: var(--bg-soft); color: var(--ink-900); }
.g-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.g-side {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  box-sizing: border-box;
  overflow-y: auto;
}
.g-brand { display: flex; flex-direction: column; gap: 6px; text-decoration: none; padding: 4px 8px 22px; flex: 0 0 auto; }
.g-logo { width: 132px; height: auto; }
.g-brand-sub {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary-600);
}
.g-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.g-nav-group {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-300); padding: 8px 10px 6px;
}
.g-nav-item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 500;
  color: var(--ink-700); text-align: left;
  background: none; border: 0; border-radius: 10px;
  padding: 9px 11px; cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.g-nav-item .lic { color: var(--ink-500); }
.g-nav-item:hover { background: var(--bg-soft); }
.g-nav-item.active { background: var(--primary-050); color: var(--primary-700); font-weight: 600; }
.g-nav-item.active .lic { color: var(--primary-600); }
.g-back {
  display: flex; align-items: center; gap: 8px; margin-top: 18px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-500);
  text-decoration: none; padding: 10px 11px; border-radius: 10px;
}
.g-back:hover { background: var(--bg-soft); color: var(--primary-600); }

/* Main */
.g-main { padding: 48px 56px 80px; max-width: 1040px; }
.g-section-head { margin-bottom: 28px; }
.g-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary-600);
}
.g-section-head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 34px;
  margin: 8px 0 0; color: var(--ink-900);
}
.g-intro { font-size: 16px; line-height: 1.6; color: var(--ink-700); max-width: 64ch; margin: 12px 0 0; }

/* Showcase cards */
.g-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px 24px;
  box-shadow: 0 6px 18px rgba(15,23,42,.05);
  margin-bottom: 22px;
}
.g-card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--ink-900); margin-bottom: 18px;
}
.g-card-title code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 14px; background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; }
.g-card-note { font-size: 13.5px; line-height: 1.6; color: var(--ink-500); margin: -6px 0 18px; max-width: 70ch; }
.g-card-note code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; color: var(--primary-700); }

/* Layout-demo boxes (RecordLayout showcase) */
.g-lbox {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px dashed var(--primary-200);
  background: var(--bg-soft);
  border-radius: 12px;
  min-height: 56px;
  color: var(--ink-500);
}
.g-lbox b { font-size: 13px; font-weight: 700; color: var(--ink-700); }
.g-lbox span { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11.5px; }
.g-lbox.rail { border-style: solid; border-color: var(--primary-300); background: var(--primary-050); }
.g-lbox.rail b { color: var(--primary-700); }

/* Inline-veld demo (bewerk-in-plaats binnen een leesregel) */
.g-inline-host {
  display: flex; align-items: baseline; gap: 16px;
  max-width: 320px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.g-inline-lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); flex: 0 0 auto; }
.g-inline-host > .ff-input-wrap, .g-inline-host > .ff-select-wrap { flex: 1 1 auto; }

/* State grid */
.g-grid-states { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 22px; }
.g-swatch { display: flex; flex-direction: column; gap: 9px; }
.g-swatch-stage { display: flex; }
.g-swatch-stage > * { width: 100%; }
.g-swatch-label {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--ink-500);
}

/* Anatomy list */
.g-anatomy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.g-anatomy li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.55; color: var(--ink-700); }
.g-anatomy code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; color: var(--primary-700); }
.g-dot { position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 999px; background: var(--primary-400); }

/* Props table */
.g-props { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.g-props th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-500); padding: 0 14px 10px 0; border-bottom: 1px solid var(--line);
}
.g-props td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-700); }
.g-props tr:last-child td { border-bottom: 0; }
.g-props code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; color: var(--ink-900); background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; }
.g-type { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; color: var(--primary-700); }
.g-muted { color: var(--ink-300); }

/* Typography showcase */
.g-font-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-font-card {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-card, 20px); padding: 20px 22px;
}
.g-font-big { grid-row: span 2; font-size: 64px; line-height: 1; color: var(--primary-600); }
.g-font-meta { display: flex; flex-direction: column; gap: 2px; }
.g-font-meta b { font-family: var(--font-display); font-size: 18px; color: var(--ink-900); }
.g-font-glyphs { grid-column: 1 / -1; margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--ink-500); border-top: 1px solid var(--line); padding-top: 12px; }
.g-typescale { display: flex; flex-direction: column; }
.g-type-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  min-width: 0; overflow: hidden;
}
.g-type-row:last-child { border-bottom: 0; }
.g-type-sample { color: var(--ink-900); line-height: 1.2; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-type-spec { display: flex; flex-direction: column; gap: 2px; text-align: right; flex: 0 0 auto; }
.g-type-spec .g-muted { font-size: 12px; }
.g-weights { display: flex; flex-direction: column; gap: 14px; }
.g-weight-row { display: flex; align-items: baseline; gap: 28px; }
.g-weight-row .g-muted { font-size: 12.5px; flex: 0 0 auto; }
.g-weight-row > span:not(.g-muted) { color: var(--ink-900); }
@media (max-width: 720px) {
  .g-font-pair { grid-template-columns: 1fr; }
}

/* Color showcase */
.g-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.g-color { display: flex; align-items: center; gap: 14px; min-width: 0; }
.g-color-chip {
  width: 56px; height: 56px; flex: 0 0 auto; border-radius: var(--r-sm, 10px);
  border: 1px solid rgba(15,23,42,.08); display: grid; place-items: center;
  color: var(--primary-700); font-size: 11px;
}
.g-color-chip.is-dark { border-color: rgba(255,255,255,.12); }
.g-color-star { line-height: 1; }
.g-color-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-color-hex { font-size: 12.5px; font-weight: 600; color: var(--ink-700); text-transform: uppercase; }
.g-color-meta .g-muted { font-size: 12px; }

/* Tokens showcase */
.g-radii { display: flex; flex-wrap: wrap; gap: 26px; }
.g-radius { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.g-radius-demo {
  width: 96px; height: 72px; background: var(--primary-050);
  border: 2px solid var(--primary-500);
}
.g-shadows { display: flex; flex-wrap: wrap; gap: 30px; }
.g-shadow { display: flex; flex-direction: column; gap: 10px; }
.g-shadow-demo { width: 130px; height: 80px; background: #fff; border-radius: var(--r-card, 20px); }
.g-spaces { display: flex; flex-direction: column; gap: 12px; }
.g-space-row { display: flex; align-items: center; gap: 16px; }
.g-space-bar { height: 18px; background: var(--primary-400); border-radius: 4px; flex: 0 0 auto; }

/* Timeline showcase — channel labels */
.g-tl-chan {
  flex: 0 0 auto; align-self: center; margin-left: auto;
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  color: var(--flag-ink); background: var(--accent-050);
}
.g-tl-chan.sales { color: var(--primary-700); background: var(--primary-050); }
.g-selected {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 0 0; font-size: 14px; color: var(--ink-700);
}
.g-selected .lic { color: var(--primary-600); }

/* Organisme: bewerkbare recordkaart (lezen ↔ bewerken) */
.g-record .d-card { box-shadow: none; }
/* Zero-beweging-patroon: elk veld is in beide modi hetzelfde DS-veld. Leesmodus
   = de velden op `disabled`, hier schoon getoond als leeswaarde (geen rand, volle
   inkt). Omdat het exact hetzelfde input-/select-element is als in bewerkmodus,
   kan de tekst niet verspringen — in geen enkele browser. */
.g-record .ff-input:disabled,
.g-record .ff-input.ff-disabled {
  background: var(--bg-soft);
  border-color: transparent;
  color: var(--ink-900);
  -webkit-text-fill-color: var(--ink-900);
  cursor: default;
  opacity: 1;
}
.g-record .ff-select-wrap.disabled .ff-select-caret { display: none; }
.g-record .ff-date:disabled::-webkit-calendar-picker-indicator { display: none; }

/* Knoppen / badges / avatars: rij met voorbeelden */
.g-btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.g-dot-lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-700); }
/* Kaartkop-demo: vulregel onder de kop */
.g-card-fill { padding: 16px 20px; font-size: 14px; color: var(--ink-500); }
.g-card-spaced { margin-top: 16px; }
/* Dropdownmenu-demo: ruimte zodat het open menu niet botst met de volgende kaart */
.g-menu-host { min-height: 220px; }

@media (max-width: 860px) {
  .g-shell { grid-template-columns: 1fr; }
  .g-side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .g-nav { flex-direction: row; flex-wrap: wrap; }
  .g-main { padding: 32px 24px 64px; }
}
