/* Build Your Stack — IC Service Stack Planning Worksheet (scoped to .bys-page) */
.bys-page .bys-body { background: var(--steel-dark); padding: 28px 0 64px; }

/* Toolbar */
.bys-page .bys-toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--steel-dark); padding: 10px 0 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.bys-page .bys-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.bys-page .bys-jump a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px;
  background: var(--steel); border: 1px solid var(--border); color: var(--text);
  font-size: 0.82rem; font-weight: 800; text-decoration: none;
}
.bys-page .bys-jump a:hover { border-color: var(--accent); color: var(--accent); }
.bys-page .bys-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bys-page .bys-status { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }
.bys-page .bys-status.is-dirty { color: var(--accent); }

/* Sections */
.bys-page .bys-welcome,
.bys-page .bys-part {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 28px; margin-bottom: 22px; scroll-margin-top: 150px;
}
.bys-page .bys-welcome h2 { font-size: 1.35rem; font-weight: 900; color: var(--text); margin: 0 0 10px; }
.bys-page .bys-welcome p { color: var(--text-mid); line-height: 1.7; margin: 0 0 12px; }
.bys-page .bys-savenote { font-size: 0.9rem; padding: 12px 14px; background: var(--steel); border-radius: 10px; }
.bys-page .bys-part-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.bys-page .bys-part-num {
  flex-shrink: 0; display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase;
}
.bys-page .bys-part-head h2 { font-size: 1.45rem; font-weight: 900; color: var(--text); margin: 0; line-height: 1.25; }
.bys-page .bys-intro { color: var(--text-mid); line-height: 1.7; margin: 0 0 16px; }
.bys-page .bys-step { font-size: 1.02rem; font-weight: 800; color: var(--accent); margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.bys-page .bys-note { font-size: 0.9rem; color: var(--text-mid); line-height: 1.65; padding: 12px 14px; background: var(--steel); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; margin: 14px 0 0; }
.bys-page .bys-note a, .bys-page .bys-cb a { color: var(--accent); font-weight: 700; }
.bys-page .bys-list { margin: 0 0 12px; padding-left: 20px; color: var(--text-mid); line-height: 1.7; }
.bys-page .bys-list li { margin-bottom: 4px; }

/* Fields */
.bys-page .bys-line { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.bys-page .bys-line > label { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.bys-page .bys-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.bys-page .bys-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.bys-page .bys-in, .bys-page .bys-ta, .bys-page .bys-sel {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--steel-dark); border: 1px solid var(--border-light); border-radius: 8px;
  padding: 9px 11px; min-height: 42px;
}
.bys-page .bys-in:focus, .bys-page .bys-ta:focus, .bys-page .bys-sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); background: #fff; }
.bys-page .bys-ta { resize: vertical; line-height: 1.5; }
.bys-page .bys-sel { appearance: auto; }
.bys-page .bys-in--sm { width: 110px; }
.bys-page .bys-in--md { width: 200px; }
.bys-page .bys-in--date { width: 150px; }
.bys-page .bys-money { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-mid); }
.bys-page .bys-inline-label { font-size: 0.86rem; font-weight: 700; color: var(--text-mid); }

/* Checkboxes & radios */
.bys-page .bys-cbl { display: flex; flex-direction: column; gap: 8px; }
.bys-page .bys-cbl--inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bys-page .bys-cb { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--text); line-height: 1.45; cursor: pointer; }
.bys-page .bys-cb input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.bys-page .bys-cb span:empty { display: none; }
.bys-page .bys-rate { display: inline-flex; gap: 6px; }
.bys-page .bys-rate label { position: relative; cursor: pointer; }
.bys-page .bys-rate input { position: absolute; opacity: 0; width: 0; height: 0; }
.bys-page .bys-rate span {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px;
  background: var(--steel); border: 1px solid var(--border-light); font-weight: 800; color: var(--text-mid);
}
.bys-page .bys-rate input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.bys-page .bys-rate input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3); }

/* Tables */
.bys-page .bys-table-wrap { overflow-x: auto; margin: 0 0 14px; -webkit-overflow-scrolling: touch; }
.bys-page .bys-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bys-page .bys-table th { text-align: left; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); padding: 8px 10px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.bys-page .bys-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-mid); line-height: 1.45; }
.bys-page .bys-table td strong { color: var(--text); }
.bys-page .bys-table td .bys-in, .bys-page .bys-table td .bys-sel, .bys-page .bys-table td .bys-ta { min-width: 120px; }
.bys-page .bys-table td .bys-in--sm { min-width: 90px; width: 90px; }
.bys-page .bys-table td .bys-in--date { min-width: 130px; width: 130px; }
.bys-page .bys-table--ref td { color: var(--text-mid); }
.bys-page .bys-table--calc td:last-child { width: 180px; }
.bys-page .bys-table--check td:not(:first-child), .bys-page .bys-table--plan td:last-child { text-align: center; width: 110px; }
.bys-page .bys-table--check .bys-cb, .bys-page .bys-table--plan .bys-cb { justify-content: center; }
.bys-page .bys-table--summary td:first-child { width: 34%; }
.bys-page .bys-table--wide { min-width: 820px; }

/* Footer */
.bys-page .bys-foot { text-align: center; margin-top: 10px; color: var(--text-dim); font-size: 0.88rem; }
.bys-page .bys-back { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; text-decoration: none; }

/* Mobile: stack table cells */
@media (max-width: 760px) {
  .bys-page .bys-welcome, .bys-page .bys-part { padding: 20px 16px; border-radius: 12px; scroll-margin-top: 170px; }
  .bys-page .bys-grid2, .bys-page .bys-grid3 { grid-template-columns: 1fr; }
  .bys-page .bys-table-wrap { overflow: visible; }
  .bys-page .bys-table, .bys-page .bys-table--wide { min-width: 0; }
  .bys-page .bys-table thead { display: none; }
  .bys-page .bys-table tr { display: block; padding: 10px 0 6px; border-bottom: 2px solid var(--border); }
  .bys-page .bys-table td { display: block; border: 0; padding: 4px 0; }
  .bys-page .bys-table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
  .bys-page .bys-table--ref td::before { display: inline-block !important; margin-right: 6px; }
  .bys-page .bys-table--check td, .bys-page .bys-table--plan td, .bys-page .bys-table--calc td:last-child { text-align: left; width: auto; }
  .bys-page .bys-table--check td:not(:first-child) { display: inline-block; width: 48%; }
  .bys-page .bys-table--check .bys-cb, .bys-page .bys-table--plan .bys-cb { justify-content: flex-start; }
  .bys-page .bys-table--check td:not(:first-child) .bys-cb span:empty { display: inline; }
  .bys-page .bys-table td .bys-in, .bys-page .bys-table td .bys-sel { width: 100%; }
  .bys-page .bys-table td .bys-in--sm, .bys-page .bys-table td .bys-in--date { width: 140px; }
  .bys-page .bys-in--md { width: 100%; }
}

/* Print: clean worksheet, no chrome */
@media print {
  .site-header, .site-footer, footer, .bys-toolbar, .bys-foot, .mobile-nav, .nav-banner { display: none !important; }
  .bys-page .page-hero { padding: 0 0 12px; background: none !important; }
  .bys-page .page-hero h1, .bys-page .page-hero h1 span { color: #000 !important; }
  .bys-page .bys-body { background: #fff; padding: 0; }
  .bys-page .bys-welcome, .bys-page .bys-part { border: 0; border-top: 2px solid #000; border-radius: 0; padding: 14px 0; margin: 0; page-break-inside: auto; }
  .bys-page .bys-part-head { page-break-after: avoid; }
  .bys-page .bys-table tr { page-break-inside: avoid; }
  .bys-page .bys-in, .bys-page .bys-ta, .bys-page .bys-sel { background: #fff; border: 1px solid #999; border-radius: 0; }
  .bys-page .bys-rate span { border: 1px solid #999; }
  .bys-page .bys-rate input:checked + span { background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bys-page .bys-part-num { background: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Sign-in gate + status states (2026-11-04: worksheet saves to the member's account) */
.bys-page .bys-gate { text-align: center; padding: 48px 0; }
.bys-page .bys-gate-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.bys-page .bys-gate p { color: var(--text-mid); margin-bottom: 20px; }
.bys-page .bys-gate-foot { font-size: 0.82rem; color: var(--text-dim); margin: 12px 0 0; }
.bys-page .bys-gate-foot a { color: var(--accent); }
.bys-page .bys-status.is-error { color: #dc2626; }

/* In steps (audit Nov 11 2026, F07; js/bys-steps.js): the steps on the left, one part
   at a time on the right. The whole worksheet and the printout show every part. */
.bys-page .bys-progress { height: 6px; border-radius: 999px; background: #e7edf7; overflow: hidden; margin: -8px 0 18px; }
.bys-page .bys-progress b { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.bys-page .bys-stepper { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.bys-page .bys-steplist { position: sticky; top: 190px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: grid; gap: 2px; }
.bys-page .bys-stepitem { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; font-size: 0.84rem; color: var(--text-mid); cursor: pointer; }
.bys-page .bys-stepitem:hover { color: var(--text); background: var(--steel); }
.bys-page .bys-stepitem i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-light); display: grid; place-items: center; font-style: normal; font-size: 0.7rem; font-weight: 800; color: var(--text-dim); }
.bys-page .bys-stepitem.is-done i { background: #15803d; border-color: #15803d; color: #fff; font-size: 0; }
.bys-page .bys-stepitem.is-done i::before { content: "✓"; font-size: 0.72rem; }
.bys-page .bys-stepitem.is-current { background: #eff6ff; color: var(--accent); font-weight: 700; }
.bys-page .bys-stepitem.is-current i { border-color: var(--accent); color: var(--accent); }
.bys-page .bys-stepitem.is-current.is-done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.bys-page .bys-stepbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.bys-page .bys-stepbar[hidden] { display: none; }
.bys-page .bys-stepwhere { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; }
.bys-page .bys-stepbar .btn[disabled] { opacity: 0.45; cursor: default; }
.bys-mode-steps .bys-page .bys-jump { display: none; }
.bys-page .bys-part[hidden], .bys-page .bys-welcome[hidden] { display: none; }
@media (max-width: 900px) {
  .bys-page .bys-stepper { grid-template-columns: 1fr; }
  .bys-page .bys-steplist { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .bys-page .bys-stepitem { flex: 0 0 auto; width: auto; grid-template-columns: 24px auto; white-space: nowrap; }
  .bys-page .bys-stepitem:not(.is-current) span { display: none; }
  .bys-page .bys-stepbar .btn { flex: 1 1 100%; justify-content: center; }
  .bys-page .bys-stepwhere { order: -1; width: 100%; text-align: center; }
}
@media print {
  .bys-page .bys-steplist, .bys-page .bys-stepbar, .bys-page .bys-progress { display: none !important; }
  .bys-page .bys-stepper { display: block; }
  .bys-page .bys-part[hidden], .bys-page .bys-welcome[hidden] { display: block !important; }
}
