/* Brand colors, used everywhere below */
:root {
  --accent: #006aff;
  --ink: #1a1b22;
  --border: #c5dcf0;
  --bg: #f7fbff;
  --muted: #5b6070;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 32px 16px;
  background: #e9f1fa;
  color: var(--ink);
  font-family: "Inter Tight", sans-serif;
}

/* The A4 page: 210mm x 297mm */
.kit {
  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto;
  padding: 14mm;
  background: #fff;
  box-shadow: 0 4px 24px rgba(26, 27, 34, 0.08);
}

h1, h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  margin: 0;
}
h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 24px; margin-bottom: 12px; }
h3 { font-size: 12px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

section { margin-top: 28px; }

/* Header */
.kit-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--accent);
}
.photo, .logo, .mini-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}
.photo { width: 96px; height: 96px; border-radius: 50%; }
.logo { width: 72px; height: 72px; border-radius: 12px; margin-left: auto; }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.tagline { margin: 8px 0 6px; font-size: 15px; }
.handles { margin: 0; font-size: 12px; color: var(--muted); }

/* Audience numbers */
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.stat { position: relative; }
[data-stat][hidden] { display: none; }
.stats.many .stat { padding: 10px; }
.stats.many .stat b { font-size: 20px; }
.stats.single .card-remove { display: none; }
.stat {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stat b { display: block; font-size: 24px; color: var(--accent); }
.stat span { font-size: 12px; color: var(--muted); }

/* Three equal columns, used by several sections */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* Age bars */
.bar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.bar[hidden] { display: none; }
.bar span { color: var(--muted); }
.bar i { display: block; height: 8px; min-width: 8px; background: var(--accent); border-radius: 4px; }
.bar b { text-align: right; font-weight: 600; }

/* Countries */
.countries { margin: 0; padding-left: 18px; font-size: 12px; line-height: 2; }
.countries b { float: right; }

/* Cards: brands and packages */
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}
.card span { color: var(--muted); }
.mini-logo { width: 40px; height: 40px; border-radius: 8px; }
.package { background: var(--bg); }
.packages { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 14px; }
[data-package][hidden] { display: none; }
.packages.single .card-remove { display: none; }
@media (max-width: 640px) { .packages { grid-template-columns: 1fr; } }
.price { margin: 0; font-size: 22px; font-weight: 700; color: var(--accent); }

/* Footer */
.kit-foot {
  margin-top: 32px;
  padding: 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
}
.kit-foot p { margin: 6px 0 0; font-size: 14px; }
.kit-foot .updated { font-size: 11px; opacity: 0.6; }

/* Phones: stack the columns */
@media (max-width: 640px) {
  .kit { padding: 20px; min-height: 0; }
  .kit-head { flex-wrap: wrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .three { grid-template-columns: 1fr; }
}
/* Brands: 0 to 6 cards in one row */
.brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.brands.many { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
[data-brand][hidden] { display: none; }
.brands.many .card { padding: 10px; }
.brands.many b { font-size: 12px; }
.brands.many span { font-size: 11px; }
.kit {
  --border: color-mix(in srgb, var(--accent) 22%, white);
  --bg: color-mix(in srgb, var(--accent) 3%, white);
}
/* Layouts: Clean = default, Bold and Dark add a class to .kit */
.kit { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.kit.layout-bold .kit-head {
  margin: -14mm -14mm 0;
  padding: 14mm 14mm 24px;
  background: var(--accent);
  color: #fff;
  border-bottom: none;
}
.kit.layout-bold .eyebrow,
.kit.layout-bold .handles { color: rgba(255, 255, 255, 0.8); }
.kit.layout-bold section h2 { color: var(--accent); }

.kit.layout-dark {
  background: var(--ink);
  color: #fff;
  --border: color-mix(in srgb, var(--accent) 35%, var(--ink));
  --bg: color-mix(in srgb, var(--accent) 10%, var(--ink));
  --muted: #a3a7b5;
}
.kit.layout-dark .kit-foot { background: var(--accent); }

@media (max-width: 640px) {
  .kit.layout-bold .kit-head { margin: -20px -20px 0; padding: 20px; }
}
