@font-face {
  font-family: 'Guide Geist';
  src: url('../mkeditor/assets/fonts/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Guide Geist Mono';
  src: url('./geist-mono-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

.brand-guide {
  --g-bg: #060606;
  --g-surface: #0e0e0e;
  --g-raised: #171717;
  --g-line: #2f2f2f;
  --g-text: #ececec;
  --g-muted: #bdbdbd;
  --g-quiet: #9a9a9a;
  --g-accent: #f2f2f2;
  --g-on-accent: #060606;
  --g-radius: 16px;
  margin: 0;
  background: var(--g-bg);
  color: var(--g-text);
  font: 400 1rem/1.7 'Guide Geist', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
.brand-guide.g-mkeditor {
  --g-bg: var(--page);
  --g-surface: var(--surface);
  --g-raised: var(--raised);
  --g-line: var(--line);
  --g-text: var(--text);
  --g-muted: var(--muted);
  --g-quiet: var(--quiet);
  --g-accent: var(--accent);
  --g-on-accent: #15372e;
  --g-radius: 6px;
}
.brand-guide *, .brand-guide *::before, .brand-guide *::after { box-sizing: border-box; }
.brand-guide :is(h1, h2, h3, p, figure) { margin: 0; }
.brand-guide :is(h1, h2, h3) { color: var(--g-text); font-weight: 500; letter-spacing: -0.045em; line-height: 1.12; }
.brand-guide h1 { font-size: clamp(3rem, 6.5vw, 6.75rem); letter-spacing: -0.06em; max-width: 12ch; }
.brand-guide h2 { font-size: clamp(2rem, 3.6vw, 3.3rem); margin-bottom: 1.25rem; }
.brand-guide h3 { font-size: 1.25rem; letter-spacing: -0.025em; margin-bottom: 0.75rem; }
.brand-guide p + p { margin-top: 1rem; }
.brand-guide a { text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.brand-guide a:not(.button):not(.g-button) { color: inherit; }
.brand-guide a:not(.button):not(.g-button):hover { color: var(--g-accent); }
.brand-guide :is(a, button):focus-visible { outline: 2px solid var(--g-accent); outline-offset: 5px; }
.brand-guide button { font: inherit; cursor: pointer; }
.brand-guide img { display: block; max-width: 100%; height: auto; }
.brand-guide :is(code, pre, .g-mono) { font-family: 'Guide Geist Mono', ui-monospace, monospace; }
.brand-guide code { font-size: 0.875em; overflow-wrap: anywhere; }
.brand-guide pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 1.25rem 0 0; padding: 1.25rem; border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-bg); font-size: 0.875rem; line-height: 1.7; }
.brand-guide ::selection { background: var(--g-accent); color: var(--g-on-accent); }
.g-wrap { width: min(1440px, calc(100% - clamp(40px, 8.4vw, 144px))); margin-inline: auto; }
.g-topbar { border-bottom: 1px solid var(--g-line); }
.g-topbar .g-wrap { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.g-brand { display: inline-flex; align-items: center; gap: 0.75rem; font-weight: 550; text-decoration: none; letter-spacing: -0.02em; }
.g-brand img { width: 28px; height: 28px; }
.g-back { font-size: 0.875rem; }
.g-skip { position: fixed; left: 1rem; top: 1rem; z-index: 100; padding: 0.75rem 1rem; background: var(--g-accent); color: var(--g-on-accent) !important; transform: translateY(-200%); }
.g-skip:focus { transform: none; }
.g-hero { padding-block: clamp(4rem, 8vw, 8rem) 4rem; border-bottom: 1px solid var(--g-line); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.g-eyebrow { font-size: 0.875rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--g-accent); margin-bottom: 1.5rem !important; }
.g-intro { font-size: 1.125rem; color: var(--g-muted); max-width: 42ch; }
.g-meta { font-size: 0.8125rem; color: var(--g-quiet); margin-top: 1.5rem !important; }
.g-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.g-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.65rem 1.15rem; border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-raised); color: var(--g-text); text-decoration: none; font-size: 0.875rem; transition: border-color 180ms ease; }
.g-button:hover { border-color: var(--g-accent); }
.g-button-primary { background: var(--g-accent); color: var(--g-on-accent) !important; border-color: var(--g-accent); }
.g-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.g-toc { position: sticky; top: 2rem; padding-block: 3.5rem; }
.g-toc p { font-size: 0.875rem; color: var(--g-quiet); margin-bottom: 1rem; }
.g-toc ul { list-style: none; margin: 0; padding: 0; }
.g-toc a { display: block; padding: 0.4rem 0; color: var(--g-muted); text-decoration: none; font-size: 0.875rem; }
.g-toc a:hover { text-decoration: underline; }
.g-content { min-width: 0; }
.g-section { padding-block: 4rem; border-bottom: 1px solid var(--g-line); scroll-margin-top: 2rem; }
.g-section > p { max-width: 70ch; color: var(--g-muted); }
.g-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.g-card { padding: clamp(1.25rem, 2.5vw, 2rem); background: var(--g-surface); border: 1px solid var(--g-line); border-radius: var(--g-radius); min-width: 0; }
.g-card p, .g-card li { color: var(--g-muted); }
.g-card ul, .g-section > ul { padding-left: 1.25rem; color: var(--g-muted); }
.g-card li + li, .g-section > ul li + li { margin-top: 0.5rem; }
.g-note { padding: 1.25rem 1.5rem; margin-top: 1.5rem !important; border-left: 2px solid var(--g-accent); background: var(--g-surface); }
.g-lockup { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; min-height: 180px; padding: 1.5rem; margin-bottom: 1.5rem; border: 1px dashed var(--g-line); border-radius: var(--g-radius); background: var(--g-bg); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; letter-spacing: -0.03em; }
.g-lockup img { width: 56px; height: 56px; }
.g-mark-only img { width: 112px; height: 112px; }
.g-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.g-swatch { min-width: 0; padding: 0; text-align: left; color: var(--g-text); background: var(--g-surface); border: 1px solid var(--g-line); border-radius: var(--g-radius); overflow: hidden; }
.g-swatch:hover { border-color: var(--g-accent); }
.g-swatch-color { display: block; height: 90px; border-bottom: 1px solid var(--g-line); background: var(--swatch); }
.g-swatch-label { display: block; padding: 1rem; }
.g-swatch-label strong { display: block; font-size: 1rem; font-weight: 500; }
.g-swatch-label code { display: block; margin-top: 0.25rem; color: var(--g-muted); }
.g-caption { font-size: 0.875rem; color: var(--g-quiet); margin-top: 1rem !important; }
.g-type { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.055em; line-height: 1.15; color: var(--g-text) !important; margin-bottom: 1rem !important; }
.g-type-mono { font-family: 'Guide Geist Mono', ui-monospace, monospace; font-size: 1.125rem; letter-spacing: 0.04em; }
.g-table-wrap { overflow-x: auto; margin-top: 1.5rem; }
.g-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 0.9375rem; }
.g-table :is(th, td) { padding: 1rem 0.75rem; border-bottom: 1px solid var(--g-line); vertical-align: top; }
.g-table th { color: var(--g-text); font-weight: 550; }
.g-table td { color: var(--g-muted); }
.g-table caption { text-align: left; color: var(--g-quiet); font-size: 0.875rem; padding-bottom: 0.5rem; }
.g-specimen { margin-top: 2rem; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-surface); }
.g-specimen h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); max-width: 20ch; }
.g-specimen p { color: var(--g-muted); max-width: 48ch; }
.g-specimen .g-button { border-radius: 999px; background: rgba(15, 15, 15, 0.5); }
.g-trace { height: 1px; width: min(100%, 260px); background: linear-gradient(90deg, #f2f2f2, #2f2f2f); margin: 1.75rem 0; }
.g-shot { margin-top: 2rem; }
.g-shot img { border: 1px solid var(--g-line); border-radius: 7px; box-shadow: 0 28px 65px #0005; }
.g-shot figcaption { color: var(--g-quiet); font-size: 0.875rem; margin-top: 1rem; }
.g-checklist { list-style: none; padding-left: 0 !important; }
.g-checklist li { border-bottom: 1px solid var(--g-line); padding: 1rem 0; }
.g-footer { padding-block: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; font-size: 0.875rem; color: var(--g-quiet); }
.g-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.g-status { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); max-width: calc(100% - 2rem); background: var(--g-text); color: var(--g-bg); border-radius: 6px; font-size: 0.875rem; z-index: 100; }
.g-status:not(:empty) { padding: 0.75rem 1.25rem; }
[data-print][hidden] { display: none; }
@media (max-width: 1000px) {
  .g-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 2rem; }
  .g-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .g-hero { grid-template-columns: 1fr; gap: 2rem; }
  .g-layout { display: block; }
  .g-toc { position: static; padding-block: 2rem; border-bottom: 1px solid var(--g-line); }
  .g-toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
  .g-grid { grid-template-columns: 1fr; }
  .g-section { padding-block: 3rem; }
  .g-topbar .g-wrap { min-height: 76px; flex-wrap: wrap; padding-block: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-guide *, .brand-guide *::before, .brand-guide *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .brand-guide { --g-bg: #fff; --g-surface: #fff; --g-raised: #fff; --g-line: #bbb; --g-text: #111; --g-muted: #333; --g-quiet: #444; --g-accent: #111; --g-on-accent: #fff; color-scheme: light; font-size: 10pt; }
  .brand-guide.g-mkeditor { --g-bg: #fff; --g-surface: #fff; --g-raised: #fff; --g-line: #bbb; --g-text: #111; --g-muted: #333; --g-quiet: #444; --g-accent: #111; --g-on-accent: #fff; }
  .g-wrap { width: 100%; }
  .g-toc, .g-skip, .g-actions, .g-status, .g-back, .g-copy { display: none !important; }
  .g-layout, .g-hero { display: block; }
  .g-hero { padding-block: 2rem; }
  .g-hero h1 { font-size: 40pt; margin-bottom: 1rem; }
  .g-section { padding-block: 2rem; }
  .g-card, .g-swatch, .g-shot, .g-note { break-inside: avoid; }
  .g-section h2, .g-section h3 { break-after: avoid; }
  .g-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-swatch { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .g-lockup { background: #111; color: #ececec; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .g-shot img { box-shadow: none; }
  .g-table-wrap { overflow: visible; }
  .g-footer { margin-top: 1rem; }
}
