/* BCxP Brand — Work Sans · Fire Red · Deep Black */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --fire-red:       #ea0029;
  --fire-red-dark:  #560009;
  --fire-red-light: #ef787e;
  --deep-black:     #000000;
  --gray-70:  #4a4a49;
  --gray-50:  #878787;
  --gray-40:  #9d9d9c;
  --gray-20:  #d0d0d0;
  --gray-05:  #ededed;
  --brand-green: #77a746;
  --brand-blue:  #006ac3;
  --accent-bg:   #fce8ec;
  --success-bg:  #edf5e6;
  --info-bg:     #e0eef9;
  --text-primary:   var(--deep-black);
  --text-secondary: var(--gray-50);
  --bg-page:   var(--gray-05);
  --bg-card:   #ffffff;
  --border:         var(--gray-20);
  --sans: 'Work Sans', sans-serif;
  --radius-sm: 3px;
  --radius-md: 5px;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 780px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* Header */
.header { /* border-bottom: 2px solid var(--deep-black); */ padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
.header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.badge-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.badge { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-sm); }
.badge-blue  { background: var(--info-bg);    color: var(--brand-blue); }
.badge-amber { background: var(--accent-bg);  color: var(--fire-red-dark); }
.badge-green { background: var(--success-bg); color: #3a6020; }

h1 { font-family: var(--sans); font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--deep-black); max-width: 520px; text-transform: uppercase; letter-spacing: -0.01em; }
h1::before { content: '\2715\00A0'; color: var(--fire-red); }
h1 em { display: block; font-style: normal; font-weight: 400; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--gray-70); margin-top: 4px; }

.progress-block { text-align: right; min-width: 110px; }
.progress-num { font-family: var(--sans); font-size: 44px; font-weight: 800; color: var(--fire-red); line-height: 1; }
.progress-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-top: 2px; }

.progress-bar-wrap { width: 100%; height: 4px; background: var(--gray-20); margin-top: 1.25rem; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--fire-red); transition: width 0.4s ease; }

/* Filters */
.filter-row { display: flex; gap: 6px; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-btn { font-family: var(--sans); font-size: 11px; font-weight: 700; padding: 5px 14px; border-radius: 0; border: 1.5px solid var(--gray-40); background: transparent; color: var(--gray-70); cursor: pointer; transition: all 0.12s; letter-spacing: 0.06em; text-transform: uppercase; }
.filter-btn:hover { color: var(--fire-red); border-color: var(--fire-red); background: var(--accent-bg); }
.filter-btn.active { background: var(--fire-red); color: #ffffff; border-color: var(--fire-red); }

/* Items */
.item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 8px; transition: border-color 0.15s; overflow: hidden; }
.item:hover { border-color: var(--gray-50); }
.item.done { opacity: 0.5; }

.item-main { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-left: 3px solid transparent; cursor: pointer; user-select: none; transition: border-color 0.15s, padding-left 0.15s; }
.item:hover .item-main { border-left-color: var(--fire-red); padding-left: 13px; }

.num { font-size: 11px; font-weight: 700; color: var(--gray-40); min-width: 20px; padding-top: 2px; letter-spacing: 0.06em; }
.check-wrap { flex-shrink: 0; margin-top: 2px; }
.check { width: 18px; height: 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--gray-40); display: flex; align-items: center; justify-content: center; transition: all 0.15s; background: transparent; }
.check.ticked { background: var(--brand-green); border-color: var(--brand-green); }
.check svg { display: none; }
.check.ticked svg { display: block; }

.item-body { flex: 1; min-width: 0; }
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.item-title { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--deep-black); }

/* Category tags */
.cat-tag { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--radius-sm); }
.cat-arch { background: var(--accent-bg);  color: var(--fire-red-dark); }
.cat-ops  { background: var(--info-bg);    color: var(--brand-blue); }
.cat-net  { background: var(--gray-05);    color: var(--gray-70); border: 1px solid var(--gray-20); }
.cat-obs  { background: var(--success-bg); color: #3a6020; }
.cat-sec  { background: var(--accent-bg);  color: var(--fire-red); }

/* Effort pips */
.effort-pip { display: inline-flex; gap: 3px; align-items: center; margin-left: 2px; }
.pip { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-20); }
.pip.on { background: var(--fire-red); }

.intro { font-size: 14px; font-weight: 400; color: var(--gray-70); line-height: 1.55; margin-top: 1.25rem; }
.item-desc { font-size: 14px; font-weight: 400; color: var(--gray-70); line-height: 1.55; }
.expand-row { margin-top: 6px; }
.expand-btn { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fire-red); background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.expand-btn:hover { color: var(--fire-red-dark); }
.chevron { transition: transform 0.2s; display: inline-block; }
.chevron.open { transform: rotate(180deg); }

/* Detail */
.item-detail { padding: 0 16px 0 52px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.item-detail.open { max-height: 1500px; padding: 0 16px 16px 52px; }
.detail-inner { border-top: 1px solid var(--border); padding-top: 12px; }
.detail-inner p { font-size: 14px; font-weight: 400; color: var(--gray-70); line-height: 1.7; margin-bottom: 10px; }

/* ── Inline code ───────────────────────────────────── */
code {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--gray-70);
  border: 1px solid var(--gray-70);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  white-space: nowrap;
}

/* ── Code block wrapper ────────────────────────────── */
.code-block {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 12px 0 18px;
  font-family: var(--mono);
}

/* Header bar */
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--deep-black);       /* pure #000000 — on-brand           */
  padding: 6px 12px;
}

.code-lang {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fire-red);              /* red label pops on black            */
}

.code-copy {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-40);
  background: none;
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.12s, border-color 0.12s;
}
.code-copy:hover {
  color: #ffffff;
  border-color: var(--gray-50);
}
.code-copy.copied {
  color: var(--brand-green);
  border-color: var(--brand-green);
}

/* Pre / code body */
pre {
  margin: 0;
  padding: 14px 16px;
  background: #111111;
  overflow-x: auto;
}

/* Reset inline <code> styles when nested inside <pre> */
pre code,
pre code.code-body {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.75;
  color: #e2e2e2;
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
}

/* Optional: very light syntax colouring via CSS only */
/* (swap for a real highlighter such as highlight.js if needed) */
pre .kw  { color: var(--fire-red-light); }  /* keywords   */
pre .str { color: #a8d8a8; }                /* strings    */
pre .cmt { color: var(--gray-50);
           font-style: italic; }            /* comments   */
pre .num { color: #f0c070; }                /* numbers    */

.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tech-tag { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--gray-05); color: var(--gray-70); border: 1px solid var(--gray-20); }

/* Footer */
.footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-text { font-size: 12px; font-weight: 400; color: var(--gray-50); display: flex; align-items: center; gap: 4px; }
.reset-btn { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-70); background: none; border: 1.5px solid var(--gray-40); border-radius: var(--radius-sm); padding: 5px 12px; cursor: pointer; transition: all 0.12s; }
.reset-btn:hover { color: var(--fire-red); border-color: var(--fire-red); background: var(--accent-bg); }

.hidden { display: none !important; }
