/* ==========================================================================
   BRAND GUIDE — page-specific components.
   Loads after assets/css/style.css and only styles the guide itself. Nothing
   here is used by the public site.
   ========================================================================== */

.guide-hero {
  background-image: linear-gradient(180deg, var(--gold-200) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: var(--s-8) 0 var(--s-7);
}
.guide-hero h1 { font-size: var(--fs-display); letter-spacing: var(--track-display); }
.guide-hero p { margin-top: var(--s-4); font-size: var(--fs-lead); color: var(--ink-2); }

.guide-section { padding-block: var(--s-7); border-bottom: 1px solid var(--line); }
.guide-section:nth-of-type(even) { background: var(--paper); }
.guide-section > .container > h2 { margin-bottom: var(--s-2); }
.guide-section > .container > p { margin-bottom: var(--s-5); }

/* ---------- swatches ---------- */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: var(--s-4);
  margin-block: var(--s-5);
}
.swatch { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.swatch-chip { height: 76px; border-bottom: 1px solid var(--line-soft); }
.swatch-chip--bordered { box-shadow: inset 0 0 0 1px var(--line); }
.swatch-body { padding: var(--s-3); }
.swatch-name {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}
.swatch-hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  margin-top: 2px;
  text-transform: uppercase;
}
.swatch-note { font-size: var(--fs-micro); color: var(--ink-3); margin-top: var(--s-2); line-height: 1.45; }
.swatch-ratio { font-size: var(--fs-micro); color: var(--success); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* Swatch fills as utility classes rather than inline style="" attributes, so
   the guide stays renderable under the site's style-src 'self' CSP. */
.sw-ink { background: var(--ink); }
.sw-ink-2 { background: var(--ink-2); }
.sw-ink-3 { background: var(--ink-3); }
.sw-ink-4 { background: var(--ink-4); }
.sw-white { background: var(--white); }
.sw-paper { background: var(--paper); }
.sw-parchment { background: var(--parchment); }
.sw-sand { background: var(--sand); }
.sw-line { background: var(--line); }
.sw-gold-900 { background: var(--gold-900); }
.sw-gold-800 { background: var(--gold-800); }
.sw-gold-700 { background: var(--gold-700); }
.sw-gold-600 { background: var(--gold-600); }
.sw-gold-500 { background: var(--gold-500); }
.sw-gold-400 { background: var(--gold-400); }
.sw-gold-300 { background: var(--gold-300); }
.sw-gold-200 { background: var(--gold-200); }
.sw-gold-100 { background: var(--gold-100); }
.sw-accent { background: var(--accent); }
.sw-ink-deep { background: var(--ink-deep); }
.sw-ink-deep-2 { background: var(--ink-deep-2); }
.sw-on-dark { background: var(--on-dark); }
.sw-on-dark-2 { background: var(--on-dark-2); }
.sw-success { background: var(--success); }
.sw-danger { background: var(--danger); }

/* ---------- spec sheets ---------- */
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-5); }
.spec-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: var(--s-5);
}
.spec-card > h3 { margin-bottom: var(--s-2); }
.spec-card > p { font-size: var(--fs-sm); }
.spec-card .eyebrow { margin-bottom: var(--s-2); }

/* ---------- type specimen ---------- */
.specimen {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5) var(--s-6);
  margin-block: var(--s-4);
}
.specimen-row { display: grid; grid-template-columns: 150px 1fr; gap: var(--s-5); align-items: baseline; padding-block: var(--s-3); border-bottom: 1px solid var(--line-soft); }
.specimen-row:last-child { border-bottom: 0; }
.specimen-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  line-height: 1.6;
}
.specimen-display { font-family: var(--font-display); font-weight: 600; }
.specimen-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: 1.12;
  letter-spacing: var(--track-heading);
  color: var(--ink);
  text-wrap: balance;
}
.specimen-accent { font-family: var(--font-accent); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--gold-700); }

/* ---------- token tables ---------- */
.token-table { width: 100%; border-collapse: collapse; margin-block: var(--s-5); font-size: var(--fs-sm); }
.token-table caption {
  text-align: left;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--gold-700);
  padding-bottom: var(--s-3);
}
.token-table th, .token-table td { border-bottom: 1px solid var(--line); padding: 10px var(--s-3); text-align: left; vertical-align: top; }
.token-table th {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-2);
}
.token-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  color: var(--gold-700);
}
.token-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- do / don't ---------- */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); margin-block: var(--s-5); }
.dodont-col { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); background: var(--white); }
.dodont-col h3 { font-size: var(--fs-h4); margin-bottom: var(--s-3); }
.dodont-col.do h3 { color: var(--success); }
.dodont-col.dont h3 { color: var(--danger); }
.dodont-col ul { list-style: none; }
.dodont-col li { padding-left: 1.5em; position: relative; font-size: var(--fs-sm); padding-block: 4px; }
.dodont-col.do li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.dodont-col.dont li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 700; }

/* ---------- component demo ---------- */
.demo {
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-block: var(--s-4);
}
.demo--dark { background: var(--ink-deep); color: var(--on-dark-2); border-color: var(--ink-deep-2); }
.demo--dark h2 { color: var(--on-dark); }
/* gold-700 has nowhere near enough contrast on ink-deep; the eyebrow steps up. */
.demo--dark .eyebrow { color: var(--gold-300); }
.demo--dark a { color: var(--gold-300); }
.demo--dark a:hover { color: var(--accent); }
.demo-label {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-4);
}
.demo--dark .demo-label { color: var(--on-dark-2); }

.logo-row { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; }
.logo-tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  display: flex; align-items: center; justify-content: center;
  min-width: 210px;
}
.logo-tile--dark { background: var(--ink-deep); border-color: var(--ink-deep-2); }
.logo-tile img { max-height: 76px; width: auto; }
.logo-tile--dark img { filter: invert(1) hue-rotate(180deg); }

@media (max-width: 760px) {
  .dodont { grid-template-columns: 1fr; }
  .specimen-row { grid-template-columns: 1fr; gap: var(--s-2); }
}
