/* The factory block kit (BLUEPRINT.md J.2, G6, G10, G13): the only classes a funnel's own design may use.
   The factory wraps a funnel block in .k-block; the funnel composes the k-* pieces inside it and names no colour,
   width or style. Colours come from the tenant's two (house pair without a preset) and the house tokens, which
   carry their own dark values. Every class here is listed in KIT in fragment.js; a test keeps the two equal. */
.k-block {
  --k-brand: var(--tenant-brand, var(--house-teal));
  --k-ink: var(--house-ink);
  --k-soft: var(--house-ink-soft);
  --k-mark: var(--house-teal);
  --k-surface: var(--house-surface);
  --k-rule: var(--house-rule);
  --k-tint: color-mix(in srgb, var(--k-brand) 8%, var(--k-surface));
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  color: var(--k-ink);
  font-family: var(--house-sans);
  line-height: 1.5;
}
.k-block h2, .k-block h3 { margin: 0; font-family: var(--house-serif); font-weight: 700; letter-spacing: -.01em; }
.k-block h2 { font-size: clamp(1.375rem, 4cqi, 2rem); line-height: 1.2; }
.k-block h3 { font-size: 1.25rem; line-height: 1.25; }
.k-block h4 { margin: 0; font-size: 1rem; font-weight: 700; }
.k-block p { margin: 0; }
.k-block ul, .k-block ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 6px; }
.k-block dl { margin: 0; display: grid; gap: 2px; }
.k-block dt { font-weight: 700; }
.k-block dd { margin: 0 0 8px; }
.k-block div, .k-block li, .k-block dd, .k-block figure { min-width: 0; }

/* Layout: a grid of two or three that stacks in a narrow container (G10). */
.k-grid-2, .k-grid-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container (min-width: 30rem) {
  .k-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.k-grid-4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container (min-width: 30rem) { .k-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 56rem) { .k-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Cards: a bordered card, and the raised sheet that leads a story. */
.k-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.k-split > * { display: grid; gap: 12px; align-content: start; min-width: 0; }
@container (min-width: 48rem) { .k-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.k-item { display: flex; align-items: flex-start; gap: 14px; }
.k-item > :last-child { flex: 1; min-width: 0; }
.k-block .k-deep :is(h2, h3, h4), .k-block .k-deep .k-ledger :is(dt, dd) { color: var(--house-on-deep); }
.k-block .k-deep .k-ledger .k-total, .k-block .k-deep .k-ledger .k-total + dd { color: var(--house-amber); }
.k-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--k-surface); border: 1px solid var(--k-rule); border-radius: 12px; }
.k-raised { gap: 16px; padding: 22px; border-color: var(--k-ink); box-shadow: 6px 6px 0 var(--k-ink); }

/* A stat: a figure with its label; k-lead makes it the story's leading figure. */
.k-stat { display: flex; flex-direction: column; gap: 4px; }
.k-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--k-mark); }
.k-figure { font-family: var(--house-serif); font-weight: 700; font-size: clamp(1.25rem, 4cqi, 1.5rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.k-lead .k-figure { font-size: clamp(2rem, 8cqi, 3.25rem); line-height: 1.1; letter-spacing: -.02em; }
.k-label { font-size: 0.875rem; color: var(--k-soft); }

/* A note: a short aside marked by the tenant's colour. */
.k-note { padding: 12px 16px; border-left: 4px solid var(--k-brand); border-radius: 0 8px 8px 0; background: var(--k-tint); font-size: 0.9375rem; }

/* Tints: a pale wash for a card that carries emphasis without a border, in the brand colour or the house gold. */
.k-tint { background: var(--k-tint); border-color: transparent; }
.k-tint-gold { background: color-mix(in srgb, var(--house-amber) 14%, var(--k-surface)); border-color: transparent; }
.k-tint-gold li::marker { color: var(--house-amber); }

/* A dark panel: the house deep green, with its eyebrow, label and numbered badges recoloured for contrast. */
.k-deep { background: var(--house-deep); border-color: var(--house-deep); color: var(--house-on-deep); }
.k-deep .k-eyebrow { color: var(--house-amber); }
.k-deep .k-label { color: color-mix(in srgb, var(--house-on-deep) 70%, transparent); }
.k-deep .k-num { background: var(--house-amber); color: var(--house-deep); }

/* A numbered badge: a small filled circle carrying its own digit, sized like an icon. */
.k-num { display: inline-flex; flex: none; align-items: center; justify-content: center; inline-size: 2.25rem; block-size: 2.25rem; border-radius: 50%; background: var(--house-deep); color: var(--house-on-deep); font-weight: 700; }

/* A row that spaces its ends apart, for a badge and an icon sharing one line. */
.k-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* A meter: a small scaled bar, drawn by drawMeters in fragment.js from a funnel's three declared values (J.2,
   owner 2026-09-28). --base, --line and --add are percentages of a shared scale, set inline by drawMeters. */
.k-meter { position: relative; block-size: 14px; border-radius: 999px; background: var(--k-tint); overflow: hidden; }
.k-meter-base { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: var(--base); background: var(--k-brand); border-radius: 999px; }
.k-meter-add {
  position: absolute; inset-block: 0; inset-inline-start: var(--base); inline-size: var(--add);
  background: repeating-linear-gradient(45deg, var(--k-brand) 0 3px, transparent 3px 6px); opacity: .65;
}
.k-meter-line { position: absolute; inset-block: -2px; inset-inline-start: var(--line); inline-size: 2px; background: var(--k-ink); border-radius: 1px; }

/* A ledger: a short worksheet of labelled figures read top to bottom, on a dl; k-total marks the dt of the line
   it adds up to, which stands under one double rule across both columns (owner, 2026-09-27). The total is firm but
   stays below the headline: the finding leads, the ledger proves it. */
.k-block .k-ledger { grid-template-columns: minmax(0, 1fr) auto; gap: 0; font-size: 0.9375rem; }
.k-block .k-ledger dt, .k-block .k-ledger dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--k-rule); }
.k-block .k-ledger dt { font-weight: 400; color: var(--k-soft); padding-right: 16px; }
.k-block .k-ledger dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.k-block .k-ledger dt:has(+ dd + .k-total), .k-block .k-ledger dd:has(+ .k-total) { border-bottom: 0; }
.k-block .k-ledger .k-total, .k-block .k-ledger .k-total + dd {
  display: flex; align-items: baseline; align-self: stretch; border-bottom: 0; border-top: 3px double var(--k-ink); padding-top: 12px; color: var(--k-ink); }
.k-block .k-ledger .k-total { font-weight: 700; }
.k-block .k-ledger .k-total + dd { justify-content: flex-end; font-family: var(--house-serif); font-size: 1.625rem; line-height: 1.1; color: var(--k-brand); }

/* A display headline: the one statement a story leads with, larger than anything else in it. */
.k-block .k-display { font-size: clamp(1.75rem, 5.5cqi, 2.75rem); line-height: 1.12; letter-spacing: -.015em; }

/* A figure with an image from the funnel folder, and its caption. */
.k-media { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.k-media img { display: block; width: 100%; height: auto; border-radius: 10px; }
.k-media figcaption { font-size: 0.875rem; color: var(--k-soft); }

/* Icons: a fixed set drawn by the kit in the house mark colour; k-icons lays items out in a row. */
.k-block .k-icons { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.k-icons > * { display: flex; align-items: center; gap: 10px; }
.k-icon { position: relative; display: inline-block; flex: none; inline-size: 2.25rem; block-size: 2.25rem; border-radius: 50%; background: var(--k-tint); }
.k-icon::before {
  content: ""; position: absolute; inset: 24%; background: var(--k-mark);
  -webkit-mask: var(--k-glyph) center / contain no-repeat; mask: var(--k-glyph) center / contain no-repeat;
}
/* Gold on its own pale wash, or a larger size for a card's leading icon. */
.k-icon-gold { --k-mark: var(--house-focus); background: color-mix(in srgb, var(--house-amber) 18%, var(--k-surface)); }
.k-icon-deep { --k-mark: var(--house-on-deep); background: var(--house-deep); }
.k-icon-lg { inline-size: 3.5rem; block-size: 3.5rem; }
.k-icon-money { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8M12 18V6'/%3E%3C/svg%3E"); }
.k-icon-vehicle { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 17h2v-4l-2-5H5l-2 5v4h2'/%3E%3Cpath d='M3 13h18'/%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E"); }
.k-icon-document { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.k-icon-calendar { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.k-icon-chart { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M8 17v-5M13 17V8M18 17v-9'/%3E%3C/svg%3E"); }
.k-icon-check { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.k-icon-trend-up { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E"); }
.k-icon-group { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M2.5 20c0-3.5 3-5.3 6.5-5.3s6.5 1.8 6.5 5.3'/%3E%3Ccircle cx='17' cy='9' r='2.4'/%3E%3Cpath d='M15.8 20c.2-2.6 1.7-4 4-4.4'/%3E%3C/svg%3E"); }
.k-icon-calculator { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cpath d='M8 6h8M8 11h2M8 15h2M8 19h2M13 11h3M13 15h3M13 19h3'/%3E%3C/svg%3E"); }
.k-icon-search { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.k-icon-info { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-5M12 8h.01'/%3E%3C/svg%3E"); }
.k-icon-flag { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3v18'/%3E%3Cpath d='M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E"); }
.k-icon-shield { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l8 4v6c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V6z'/%3E%3C/svg%3E"); }
.k-icon-scale { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M4 21h16M6 7h12'/%3E%3Cpath d='M6 7l-4 6a4 4 0 0 0 8 0z'/%3E%3Cpath d='M18 7l-4 6a4 4 0 0 0 8 0z'/%3E%3C/svg%3E"); }
.k-icon-binoculars { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h2v4H9zM13 4h2v4h-2z'/%3E%3Cpath d='M9 8a4 4 0 0 0-4 4v4a3 3 0 0 0 6 0v-4'/%3E%3Cpath d='M15 8a4 4 0 0 1 4 4v4a3 3 0 0 1-6 0v-4'/%3E%3C/svg%3E"); }
.k-icon-gear { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }
.k-icon-arrow { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
