/* ============================================================
   GovPixels — Bricks Builder Checklist
   Matches the editorial style of okayishmael.github.io/PCS
   ============================================================ */

/* ── Fonts ────────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #bf0a30;
  --navy: #002868;
  --black: #0d0d0e;
  --ink: #1a1a1c;
  --text: #2c2c30;
  --muted: #6b6b72;
  --faint: #9898a0;
  --rule: #e0e0e4;
  --surface: #f5f5f3;
  --white: #ffffff;
  --green: #0d7a3e;
  --green-bg: #eaf4ee;
  --amber: #8a5a00;
  --amber-bg: #fdf3dc;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --max: 760px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Government Banner ────────────────────────────────────── */
.gov-banner {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gov-banner .flag {
  font-size: 14px;
}
.gov-banner strong {
  color: #fff;
  font-weight: 500;
}

/* ── Navigation ───────────────────────────────────────────── */
nav {
  border-bottom: 1px solid var(--rule);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--black);
}

/* ── Page Container ───────────────────────────────────────── */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Hero / Intro ─────────────────────────────────────────── */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 580px;
}
.hero p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 36px;
}
.useful-tools {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 20px;
  margin-bottom: 48px;
  list-style: none;
}

.useful-tools a {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 36px;

  &:hover {
    color: var(--black);
    text-decoration-thickness: 2px;
  }
}
/* ── Summary Stats ────────────────────────────────────────── */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 0;
}
.stat-box {
  background: var(--white);
  padding: 20px 20px 18px;
}
.stat-box .num {
  font-size: 28px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}
.stat-box .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: var(--mono);
}

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-wrap {
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.progress-meta .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: var(--mono);
}
.progress-meta .count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--black);
}
.progress-track {
  height: 3px;
  background: var(--rule);
  width: 100%;
}
.progress-fill {
  height: 3px;
  background: var(--navy);
  width: 0%;
  transition: width 0.4s ease;
}
.progress-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-top: 8px;
  display: block;
}

/* ── Section header ───────────────────────────────────────── */
.section-intro {
  padding: 48px 0 0;
}
.section-intro .section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.section-intro h2 {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 300;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-intro p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 500px;
}

/* ── Checklist Category ───────────────────────────────────── */
.category {
  margin-bottom: 2px;
  border: 1px solid var(--rule);
}
.category + .category {
  border-top: none;
}
.category:first-of-type {
  border-top: none;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  background: var(--white);
  user-select: none;
  transition: background 0.12s;
  border: none;
  width: 100%;
  text-align: left;
}
.category-header:hover {
  background: var(--surface);
}

.cat-number {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.05em;
  min-width: 24px;
  flex-shrink: 0;
}
.cat-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  letter-spacing: -0.01em;
  flex: 1;
}
.cat-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cat-progress-track {
  width: 60px;
  height: 2px;
  background: var(--rule);
  flex-shrink: 0;
}
.cat-progress-fill {
  height: 2px;
  background: var(--navy);
  transition: width 0.3s;
}
.cat-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  min-width: 28px;
  text-align: right;
}
.chevron {
  font-size: 10px;
  color: var(--faint);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.category-header[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
}

/* ── Items List ───────────────────────────────────────────── */
.items {
  display: none;
  border-top: 1px solid var(--rule);
}
.items.open {
  display: block;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px 16px 60px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.item:last-child {
  border-bottom: none;
}
.item:hover {
  background: var(--surface);
}

/* Custom checkbox */
.item-check {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: var(--white);
}
.item.is-done .item-check {
  background: var(--navy);
  border-color: var(--navy);
}
.item-check svg {
  display: none;
}
.item.is-done .item-check svg {
  display: block;
}

.item-body {
  flex: 1;
  min-width: 0;
}
.item-label {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s;
}
.item.is-done .item-label {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-color: var(--rule);
}
.item-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.item.is-done .item-note {
  color: var(--faint);
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -1px;
}
.badge-critical {
  background: #fff0f0;
  color: var(--red);
  border: 1px solid #ffcccc;
}
.badge-perf {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #b8dfc6;
}

/* ── Useful Tools ────────────────────────────────────────── */
.useful-tools {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 20px;
  margin-bottom: 48px;
  list-style: none;
}

.useful-tools a {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 36px;

  &:hover {
    color: var(--black);
    text-decoration-thickness: 2px;
  }
}

/* ── Design Implication Block (like the PCS site's callouts) */
.implication {
  background: var(--surface);
  border-left: 3px solid var(--navy);
  padding: 12px 16px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}
.implication strong {
  font-weight: 600;
  color: var(--black);
}

/* ── Reset button ─────────────────────────────────────────── */
.reset-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--rule);
  padding: 7px 14px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
}
.reset-btn:hover {
  border-color: var(--text);
  color: var(--black);
}

/* ── Principle Sidebar Tags ───────────────────────────────── */
.maps-to {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}
.maps-to strong {
  color: var(--navy);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 40px 24px;
  margin-top: 64px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.footer-brand {
  font-weight: 600;
  font-size: 14px;
  color: var(--black);
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 6px;
}
.footer-tagline {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.03em;
}
.footer-right {
  font-size: 11px;
  color: var(--faint);
  text-align: right;
  font-family: var(--mono);
}

/* ── Scroll to top ────────────────────────────────────────── */
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-top: 32px;
  transition: color 0.15s;
}
.back-top:hover {
  color: var(--black);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary-stats .stat-box:last-child {
    grid-column: span 2;
  }
  .item {
    padding-left: 20px;
  }
  .cat-progress-track {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }
  .footer-right {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .summary-stats {
    grid-template-columns: 1fr;
  }
  .summary-stats .stat-box:last-child {
    grid-column: span 1;
  }
  .hero h1 {
    font-size: 22px;
  }
}
