/* Brick & Bill — what things around a house actually cost.
   The idea: a sturdy hardware-store sign over a marked-up utility bill.
   - One memorable thing: the brick-red masthead with a brick-bond course
     under it (the name, made literal). Everything else stays quiet.
   - Headlines in Archivo at its widest cut: square, built, signage-like.
   - Body in Charter (system serif), blueprint blue-black ink on cool white.
   - Bold figures in the text get a meter-yellow highlighter, the way you'd
     mark the number that matters on a bill.
   Font: Archivo, SIL Open Font License, self-hosted (no third-party request). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600 900;
  font-stretch: 112% 125%;
  font-display: swap;
  src: url("../../fonts/archivo-latin.woff2") format("woff2");
}

.theme-ink {
  --paper:   #fbfbfa;
  --surface: #ffffff;
  --ink:     #1c2430;   /* blueprint ink */
  --muted:   #5c6470;
  --rule:    #e2ddd4;
  --mortar:  #e7e2d9;
  --brick:   #8e3b26;   /* fired brick, deep - not the clay/terracotta tell */
  --brick-2: #a54a31;
  --accent:  #8e3b26;
  --accent-d:#7a3020;
  --meter:   #f4cf45;   /* highlighter on the bill */
  --serif:   Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sign:    "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --course: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='18'%3E%3Crect width='44' height='18' fill='%23d9d2c6'/%3E%3Crect x='1' y='1' width='42' height='7' fill='%237a3020'/%3E%3Crect x='-21' y='10' width='42' height='7' fill='%23963f28'/%3E%3Crect x='23' y='10' width='42' height='7' fill='%23963f28'/%3E%3C/svg%3E");
}

/* ---------- masthead: the sign ---------- */
.theme-ink .masthead { background: var(--brick); border-bottom: 0; position: relative; }
.theme-ink .masthead::after {
  content: ""; display: block; height: 18px; background: var(--course) repeat-x;
}
.theme-ink .bar { padding: 1.35rem 1.25rem 1.2rem; }
.theme-ink .brand { color: #fff; gap: .75rem; }
.theme-ink .mark { width: 40px; height: 40px; color: #fff; }
.theme-ink .mark rect { fill: var(--meter); }
.theme-ink .wordmark {
  font-family: var(--sign); font-stretch: 125%; font-weight: 800;
  font-size: 1.9rem; letter-spacing: -.01em;
}
.theme-ink .wordmark .w-first,
.theme-ink .wordmark .w-last { font-weight: 800; font-style: normal; color: #fff; }
.theme-ink .wordmark .amp { color: var(--meter); font-style: normal; font-weight: 700; }
.theme-ink .tagline { color: #f1ddd5; font-size: .9375rem; }
.theme-ink .sections { background: var(--brick); border-top: 1px solid rgba(255,255,255,.18); }
.theme-ink .sections .inner { padding: .55rem 1.25rem .65rem; }
.theme-ink .sections a { color: #fff; font-weight: 600; }
.theme-ink .sections a:hover { color: var(--meter); }

/* ---------- shared type ---------- */
body.theme-ink { font-size: 1.15rem; line-height: 1.72; }
.theme-ink .article h1,
.theme-ink .bb-lead h1 {
  font-family: var(--sign); font-stretch: 118%; font-weight: 800;
  letter-spacing: -.025em; line-height: 1.04;
}
.theme-ink .body h2 {
  font-family: var(--sign); font-stretch: 112%; font-weight: 750;
  font-size: 1.45rem; letter-spacing: -.015em; line-height: 1.2;
  margin-top: 2.6rem;
}
.theme-ink .body h3 { font-family: var(--sign); font-stretch: 112%; font-weight: 700; }
.theme-ink .body strong {
  background: linear-gradient(transparent 66%, var(--meter) 66%, var(--meter) 90%, transparent 90%);
  padding: 0 .08em;
}
.theme-ink .body a { color: var(--brick); text-decoration-thickness: 2px; text-decoration-color: rgba(142,59,38,.35); }
.theme-ink .body a:hover { text-decoration-color: var(--brick); }

/* ---------- article ---------- */
.theme-ink .article { padding-top: 3rem; }
.theme-ink .article h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); margin-bottom: .9rem; }
.theme-ink .dek { font-size: 1.3rem; color: var(--ink); opacity: .78; }
.theme-ink .byline {
  border-top: 4px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: .75rem 0; color: var(--muted);
}
.theme-ink figure img { border-radius: 0; }
.theme-ink figcaption { color: var(--muted); }
.theme-ink .chart { background: var(--mortar); border: 0; padding: 1.25rem 1.4rem; }
.theme-ink .inseries a, .theme-ink .cluster a, .theme-ink .sources a { color: var(--brick); }
.theme-ink .cluster {
  background: var(--mortar); border-top: 0; padding: 1.3rem 1.4rem 1rem;
}
.theme-ink .cluster h2, .theme-ink .sources h2 {
  font-family: var(--sign); font-stretch: 112%; font-weight: 750; font-size: 1.15rem;
}
.theme-ink .pager .next { background: var(--brick); border-radius: 0; }

/* ---------- rail ---------- */
.theme-ink .rail { padding-top: 3.1rem; }
.theme-ink .railbox {
  background: transparent; border: 0; border-top: 4px solid var(--ink);
  padding: .8rem 0 0; margin-bottom: 2rem; border-radius: 0;
}
.theme-ink .railbox h2 {
  font-family: var(--sign); font-stretch: 112%; font-weight: 750; font-size: 1rem;
  border-bottom: 0; padding-bottom: 0; color: var(--ink);
}
.theme-ink .railbox a { font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.theme-ink .railbox a:hover { color: var(--brick); }
.theme-ink .toc li::before { color: var(--brick); font-family: var(--sign); }
.theme-ink .standards { border-top-color: var(--brick); }

/* ---------- home ---------- */
.bb-home { max-width: 68rem; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; }
.bb-lead a {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  color: inherit; text-decoration: none; background: var(--mortar);
}
.bb-lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3 / 2; }
.bb-lead-txt { padding: 2.4rem 2.4rem 2.2rem; display: flex; flex-direction: column; justify-content: center; }
.bb-tag {
  margin: 0 0 .9rem; font-family: var(--sans); font-size: .875rem; font-weight: 700;
  color: var(--brick);
}
.bb-lead h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin: 0 0 1rem; }
.bb-lead .dek { font-size: 1.15rem; line-height: 1.55; margin: 0 0 1.6rem; opacity: .85; }
.bb-go {
  align-self: flex-start; font-family: var(--sans); font-size: .9375rem; font-weight: 700;
  color: #fff; background: var(--brick); padding: .7rem 1.15rem;
}
.bb-lead a:hover .bb-go { background: var(--ink); }
.bb-lead a:hover h1 { color: var(--brick); }

.bb-more { margin-top: 3.5rem; }
.bb-more > h2 {
  font-family: var(--sign); font-stretch: 112%; font-weight: 800; font-size: 1.5rem;
  letter-spacing: -.015em; margin: 0 0 1.5rem; padding-top: .8rem;
  border-top: 4px solid var(--ink);
}
.bb-tiles {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 2.75rem;
}
.bb-tiles a {
  display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 1.25rem;
  align-items: start; color: inherit; text-decoration: none;
}
.bb-tiles img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.bb-tiles h3 {
  font-family: var(--sign); font-stretch: 112%; font-weight: 750; font-size: 1.22rem;
  line-height: 1.18; letter-spacing: -.012em; margin: 0 0 .5rem;
}
.bb-tiles p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.bb-tiles a:hover h3 { color: var(--brick); }

/* ---------- footer ---------- */
.theme-ink .foot {
  background: var(--ink); color: #c3c9d2; border-top: 0; padding-top: 0; margin-top: 4rem;
}
.theme-ink .foot::before {
  content: ""; display: block; height: 18px; background: var(--course) repeat-x; margin-bottom: 2rem;
}
.theme-ink .foot .legal a { color: #fff; }

/* ---------- focus + small screens ---------- */
.theme-ink a:focus-visible { outline: 3px solid var(--meter); outline-offset: 3px; }
@media (max-width: 900px) {
  .bb-lead a { grid-template-columns: minmax(0, 1fr); }
  .bb-lead-txt { padding: 1.6rem 1.4rem 1.7rem; }
  .bb-tiles { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}
@media (max-width: 520px) {
  .theme-ink .wordmark { font-size: 1.5rem; }
  .bb-tiles a { grid-template-columns: 38% minmax(0, 1fr); gap: .9rem; }
  .bb-tiles h3 { font-size: 1.05rem; }
  .bb-tiles p { display: none; }
}
