/* TFS News brand page. Loads after style.css and reuses its tokens. */

.brandpage {
  max-width: 64rem;
  margin: 0 auto;
  padding: 32px 0 8px;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.brandpage h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.brandpage .lede {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 46rem;
}
.brandpage h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 48px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.brandpage h3,
.brandpage h4 {
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 28px 0 10px;
}
.brandpage p,
.brandpage ul,
.brandpage ol { margin: 0 0 1em; max-width: 46rem; }
/* the wide blocks are laid out as lists, so they need the reading column lifted */
.brandpage .brand-toc,
.brandpage .asset-grid,
.brandpage .swatches,
.brandpage .rules,
.brandpage .specimen,
.brandpage .diagram,
.brandpage .download-band { max-width: none; }
.brandpage li { margin: 0.35em 0; }
.brandpage a { color: var(--accent-ink); }

/* Jump list */
.brand-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  max-width: none;
}
.brand-toc li { margin: 0; }
.brand-toc a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
}
.brand-toc a:hover { color: var(--ink); border-color: var(--accent-line); }

/* Asset tiles */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  max-width: none;
}
.asset-grid > li { margin: 0; }
.asset {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.asset-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 24px;
  background: var(--band);
}
.asset-art img { max-width: 100%; max-height: 170px; width: auto; height: auto; }
.asset-art.on-ink { background: #15171A; }
.asset-art.on-paper { background: #FAF7F0; }
.asset-art.on-gold { background: #CFA23A; }
.asset figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.asset figcaption b { font-weight: 700; }
.asset figcaption span { color: var(--ink-faint); }
.asset-links { margin-top: 2px; font-size: 0.875rem; letter-spacing: 0.02em; }
.asset-links a { margin-right: 10px; white-space: nowrap; }

/* Colour */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  max-width: none;
}
.swatches > li { margin: 0; }
.swatch {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.swatch-chip {
  height: 96px;
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* A near white chip on a white card and an Ink chip on a dark card are both
     invisible without an edge. This grey clears 3:1 against both card fills and
     against the extreme chips, in either theme. */
  border: 1px solid #767676;
}
.swatch-body { padding: 12px 14px 14px; font-size: 0.9375rem; line-height: 1.5; }
.swatch-body b { display: block; font-size: 1rem; }
.swatch-body code { font-size: 0.875rem; color: var(--ink-soft); }
.swatch-body .role { display: block; margin-top: 6px; color: var(--ink-faint); }

/* Tables */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.9375rem;
}
.spec-table caption {
  text-align: left;
  color: var(--ink-faint);
  padding-bottom: 8px;
  font-size: 0.9375rem;
}
.spec-table th,
.spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule-soft);
}
.spec-table th { font-weight: 700; border-bottom-color: var(--rule); }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table code { font-size: 0.875rem; }

/* Do and do not */
.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 0 0 24px;
  max-width: none;
}
.rule-card {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
}
.rule-card.no { border-left-color: var(--gold); }
.rule-card h3,
.rule-card h4 { margin: 0 0 8px; color: var(--ink); }
.rule-card ul { margin: 0; padding-left: 1.1em; }

/* Type specimen */
.specimen {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
  margin: 0 0 24px;
  max-width: none;
}
.specimen p { margin: 0 0 10px; max-width: none; }
.specimen .s-xl { font-size: 2.25rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
.specimen .s-lg { font-size: 0.9375rem; line-height: 1.6; font-weight: 500; }
.specimen .s-md { font-size: 1rem; line-height: 1.6; font-weight: 400; }
.specimen .s-sm {
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
}
.specimen .s-label {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* Clear space and minimum size diagrams */
.diagram {
  margin: 0 0 24px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  max-width: none;
}
.diagram img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.diagram figcaption {
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 0.9375rem;
  text-align: center;
}

/* Download band */
.download-band {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  max-width: none;
}
.download-band p { margin: 0; flex: 1 1 18rem; }
.download-band .btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 700;
}
.download-band .btn.secondary {
  background: transparent;
  color: var(--accent-ink);
  /* --accent-line is 1.49:1 against the band fill and would not read as a
     control. --accent-ink clears 3:1 in both themes. */
  border: 1px solid var(--accent-ink);
}
.download-band .btn:hover { filter: brightness(1.08); }

/* Boilerplate blocks the reader copies */
.copyblock {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--band);
  padding: 16px 18px;
  margin: 0 0 18px;
  max-width: 46rem;
}
.copyblock p:last-child { margin-bottom: 0; }
.copytext {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.copyblock .count {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 640px) {
  .brandpage { padding-top: 20px; }
  .asset-art { min-height: 120px; padding: 18px; }
}

/* Swatch chips. Defined here because the site CSP forbids inline styles. */
.chip-ink { background: #15171A; color: #FAF7F0; }
.chip-gold { background: #CFA23A; color: #15171A; }
.chip-warm { background: #FAF7F0; color: #15171A; }
.chip-slate { background: #3A5A78; color: #FAF7F0; }
