/*! © 2026 Cyber Affinity LLC. All rights reserved. Use is subject to https://www.cyber-affinity.com/terms — copying or redistributing this code is not permitted. */
/* Board Security Update Builder — builds on /styles.css tokens */
.bu-wrap { max-width: 1320px; }
.bu-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; margin-top: 16px; }
.bu-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

/* Tips */
.bu-tips summary { cursor: pointer; color: var(--accent-2); font-weight: 600; }
.bu-tips[open] summary { margin-bottom: 8px; }
.bu-tips .feat { margin: 0; }
.bu-tips .feat strong { color: var(--text); }

/* Inputs */
.bu-form { gap: 16px; grid-template-columns: minmax(0, 1fr); }
.bu-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.page .bu-sec h2 { font-size: 18px; margin: 0; color: var(--accent-2); }
.bu-sec > .small { margin-top: -8px; }
.bu-rows { display: grid; gap: 10px; }
.bu-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.bu-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bu-item-head b { font-size: 14px; color: var(--muted); }
.bu-item-head .rr-x { padding: 0 8px; }
.bu-item label, .bu-li label, .bu-ask label { font-size: 13px; }
.bu-item input, .bu-item select, .bu-li input, .bu-ask input { padding: 8px 10px; font-size: 14px; }
.bu-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bu-span-2 { grid-column: span 2; }
.bu-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bu-item-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.bu-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.bu-li { display: flex; gap: 8px; align-items: end; }
.bu-ask { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.bu-grow { flex: 1 1 auto; min-width: 0; }
.bu-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bu-add select { flex: 1 1 240px; width: auto; min-width: 0; max-width: 100%; padding: 8px 10px; font-size: 14px; }
.bu-sec > .btn { justify-self: start; }

/* Output panel */
.bu-out { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; display: grid; gap: 12px; }
.bu-out-head .panel-title { margin-top: 0; }
.bu-out-head .out-actions { margin-top: 8px; }

/* The brief itself: a white "paper" so the preview matches the printout */
.bu-paper { background: #fff; color: #1a2433; border-radius: 10px; padding: 28px 30px; font-size: 14px; line-height: 1.5; display: grid; gap: 16px; }
.page .bu-paper p, .page .bu-paper li { color: #1a2433; }
.bu-paper p { margin: 0; }
.bu-empty { color: #52627a !important; text-align: center; padding: 40px 12px; }
.bu-head { border-bottom: 2px solid #1a2433; padding-bottom: 10px; }
.bu-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #0f766e !important; }
.page .bu-head h2 { font-size: 26px; margin: 2px 0 2px; color: #0b1422; letter-spacing: -0.01em; }
.bu-meta { font-size: 13px; color: #52627a !important; }
.bu-block { display: grid; gap: 8px; break-inside: avoid; }
.bu-block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #0b1422; margin: 0; border-bottom: 1px solid #d5dde8; padding-bottom: 4px; }
.bu-posture-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bu-badge { display: inline-block; font-weight: 800; font-size: 15px; border-radius: 8px; padding: 5px 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bu-badge.green { background: #16a34a; color: #fff; }
.bu-badge.amber { background: #fde047; color: #422006; }
.bu-badge.red { background: #dc2626; color: #fff; }
.bu-trend { font-weight: 700; font-size: 15px; color: #1a2433; }
.bu-summary { font-size: 15px; }
.bu-note { font-size: 13px; color: #52627a !important; }
.bu-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bu-table th { background: #eef2f7; color: #334155; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid #cbd5e1; white-space: nowrap; }
.bu-table td { padding: 6px 8px; border-bottom: 1px solid #e2e8f0; color: #1a2433; }
.bu-table tr { break-inside: avoid; }
.bu-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bu-nowrap { white-space: nowrap; }
.bu-dir { color: #52627a; font-size: 12px; }
.bu-paper .flag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bu-paper .flag.green { background: #dcfce7; color: #166534; }
.bu-paper .flag.yellow { background: rgba(253, 224, 71, 0.45); color: #713f12; }
.bu-paper .flag.red { background: #fee2e2; color: #991b1b; }
.bu-paper .flag.gray { background: #eef2f7; color: #475569; }
.bu-paper ul, .bu-paper ol { margin: 0; padding-left: 20px; }
.bu-paper li { margin: 3px 0; }
.bu-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bu-cost { font-weight: 700; }

@media (max-width: 1060px) {
  .bu-layout { grid-template-columns: minmax(0, 1fr); }
  .bu-out { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  .bu-grid-4 { grid-template-columns: 1fr 1fr; }
  .bu-grid-3 { grid-template-columns: 1fr; }
  .bu-span-2 { grid-column: auto; }
  .bu-ask { grid-template-columns: 1fr auto; }
  .bu-ask > label:first-child { grid-column: 1 / -1; }
  .bu-two { grid-template-columns: 1fr; }
  .bu-paper { padding: 20px 16px; }
}

@media print {
  @page { margin: 14mm; }
  .bu-page { padding: 0; }
  .bu-wrap { max-width: none; padding: 0; }
  .bu-layout { display: block; margin: 0; }
  .bu-out { position: static; max-height: none; overflow: visible; background: #fff !important; border: 0 !important; padding: 0; display: block; }
  .bu-paper { padding: 0; border-radius: 0; font-size: 12.5px; gap: 12px; }
  .page .bu-head h2 { font-size: 22px; }
  .bu-paper .flag { border: 0; }
  .bu-paper .flag.green { background: #dcfce7 !important; color: #166534 !important; }
  .bu-paper .flag.yellow { background: rgba(253, 224, 71, 0.45) !important; color: #713f12 !important; }
  .bu-paper .flag.red { background: #fee2e2 !important; color: #991b1b !important; }
  .bu-paper .flag.gray { background: #eef2f7 !important; color: #475569 !important; }
  .bu-table th { background: #eef2f7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bu-two { grid-template-columns: 1fr 1fr; }
}

/* Fill from other tools / start next quarter */
.bu-fill { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.bu-fill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bu-fill-list li { display: flex; gap: 10px; align-items: flex-start; }
.bu-fill-list input { width: auto; margin-top: 4px; accent-color: var(--accent); flex: none; }
.bu-fill-list label { display: block; font-size: 14px; font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.bu-fill-src { display: block; font-size: 13px; color: var(--muted); }
.bu-next { margin-top: 12px; display: grid; gap: 12px; }
.page .bu-next h2 { font-size: 18px; margin: 0; color: var(--accent-2); }
.bu-next-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.bu-next label:not(.opt-row) { display: grid; gap: 4px; font-size: 14px; max-width: 360px; }

/* Phone widths: the brief's tables scroll inside the paper instead of widening the page */
.bu-out, .bu-paper, .bu-block { grid-template-columns: minmax(0, 1fr); min-width: 0; }
@media screen and (max-width: 560px) { .bu-paper { padding: 20px 16px; } .bu-block { overflow-x: auto; } }
