/* 코드 진단 결과지·인계 문서 견본(위시켓 159992). 인상: 항로도가 붙은 점검 기록지.
   옅은 물빛 바탕, 짙은 자주 경로 선, 구운 주황 강조. 진한 면은 선택된 버튼과 경로 선에만 쓴다. */
:root {
  --bg: #E4F1F4;
  --surface: #FFFFFF;
  --text: #14222B;
  --muted: #45606B;
  --line: #BFD6DC;
  --primary: #5A1E6B;
  --accent: #B8430A;
  --ok: #17663A;
  --warn: #735000;
  --danger: #A8201A;

  --primary-tint: #F3EAF6;
  --accent-tint: #FDEFE4;
  --ok-tint: #E4F3EA;
  --warn-tint: #FBF1D9;
  --danger-tint: #FBE7E5;
  --soft: #F3F9FA;

  --r-sheet: 12px;
  --r-btn: 8px;
  --r-label: 4px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --num: "Schibsted Grotesk", var(--sans);
  --mono: "Inconsolata", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.by {
  margin: 0;
  padding-bottom: 84px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.by a { color: var(--accent); text-underline-offset: 3px; }
.by button { font: inherit; color: inherit; }
.by :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.by [hidden] { display: none !important; }
.by :where(p, h1, h2, h3) { margin: 0; }
.by-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.by-num { font-family: var(--num); font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.by-mono { font-family: var(--mono); font-weight: 600; overflow-wrap: anywhere; word-break: normal; }

/* 원인 가정에 따라 보이는 부분 */
.by[data-hypo="a"] .by-only-b, .by[data-hypo="a"] .by-only-c,
.by[data-hypo="b"] .by-only-a, .by[data-hypo="b"] .by-only-c,
.by[data-hypo="c"] .by-only-a, .by[data-hypo="c"] .by-only-b { display: none !important; }

/* 안내 띠 */
.by-band {
  height: 28px; line-height: 28px; padding: 0 12px;
  font-size: 12.5px; color: var(--muted); text-align: center;
  border-bottom: 1px solid var(--line); background: var(--soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 머리 */
.by-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.by-head__inner { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.by-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text) !important; min-width: 0; }
.by-brand__mark { width: 34px; height: 34px; flex: none; }
.by-brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.by-brand__title { font-weight: 800; font-size: 16.5px; }
.by-brand__sub { font-size: 12.5px; color: var(--muted); }
.by-reset {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 0 14px; border-radius: var(--r-btn);
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14.5px; font-weight: 600;
}
.by-reset:hover { border-color: var(--primary); color: var(--primary); }

.by-nav { border-top: 1px solid var(--line); }
.by-nav__inner { max-width: 1040px; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; }
.by-nav__item {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 14px;
  color: var(--muted) !important; text-decoration: none; font-weight: 600; font-size: 15px;
  border-bottom: 3px solid transparent;
}
.by-nav__item:hover { color: var(--primary) !important; }
.by-nav__item.is-on { color: var(--primary) !important; border-bottom-color: var(--primary); }
.by-nav__short { display: none; }

/* 본문 */
.by-main { padding: 20px 20px 8px; }
.by-wrap { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.by-sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet);
  padding: 22px 24px; min-width: 0;
}
.by-sheet__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.by-sheet__head--tight { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.by-h2 { font-size: 19px; font-weight: 800; line-height: 1.4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.by-h3 { font-size: 17px; font-weight: 800; line-height: 1.4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.by-note { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.by-kicker { font-size: 13.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.by-warnline { font-size: 14.5px; font-weight: 700; color: var(--accent); }

/* 꼬리표·라벨 */
.by-sample {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px;
  border: 1px dashed var(--muted); border-radius: var(--r-label);
  font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); line-height: 1;
  white-space: nowrap; vertical-align: middle;
}
.by-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: var(--r-label);
  font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--soft); line-height: 1;
  white-space: nowrap; vertical-align: 2px;
}
.by-tag--real { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.by-tag--on { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.by-label {
  display: inline-flex; align-items: center; min-height: 26px; padding: 1px 8px;
  border: 1.5px solid currentColor; border-radius: var(--r-label);
  font-size: 13.5px; font-weight: 700; line-height: 1.3; white-space: nowrap;
}
.by-label--ok { color: var(--ok); background: var(--ok-tint); }
.by-label--danger { color: var(--danger); background: var(--danger-tint); }
.by-label--warn { color: var(--warn); background: var(--warn-tint); }
.by-res {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-label);
  font-size: 14px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.by-res--ok { color: var(--ok); background: var(--ok-tint); }
.by-res--danger { color: var(--danger); background: var(--danger-tint); }
.by-res--warn { color: var(--warn); background: var(--warn-tint); }
.by-size {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 5px;
  border: 1.5px solid var(--text); border-radius: var(--r-label); font-weight: 800; font-size: 13.5px; line-height: 1;
}
.by-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* 버튼 */
.by-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px;
}
.by-btn--primary { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.by-btn--primary:hover { background: #4A1858; }
.by-btn--block { width: 100%; }
.by-link-btn {
  background: none; border: 0; padding: 0 4px; min-height: 44px; cursor: pointer;
  color: var(--accent) !important; text-decoration: underline; text-underline-offset: 3px; font-size: 14px;
}
.by-chip-btn {
  min-height: 44px; padding: 0 14px; border-radius: var(--r-btn); cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px;
}
.by-chip-btn:hover { border-color: var(--primary); }
.by-chip-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 표지 */
.by-cover {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  padding: 4px 2px 2px;
}
.by-cover__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 420px; }
.by-cover__title { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
.by-cover__line { font-size: 14.5px; color: var(--muted); }
.by-cover__meta {
  margin: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 4px 20px;
  font-size: 14px; flex: 0 1 auto;
}
.by-cover__meta div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.by-cover__meta dt { color: var(--muted); font-weight: 600; white-space: nowrap; }
.by-cover__meta dd { margin: 0; font-weight: 700; min-width: 0; }

.by-pagehead { display: flex; flex-direction: column; gap: 4px; padding: 4px 2px 0; }
.by-pagehead__title { font-size: 26px; font-weight: 800; line-height: 1.3; }
.by-pagehead__lead { font-size: 15px; color: var(--muted); max-width: 760px; }

/* 접속 경로 그림 */
.by-regions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.by-route__fig { margin: 4px -6px 0; }
.by-route__svg { display: block; width: 100%; height: auto; overflow: visible; }
.by-route__svg--v { display: none; max-width: 420px; }
.by-route__base { stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.by-route__line { stroke: var(--primary); stroke-width: 6; stroke-linecap: butt; fill: none; transition: stroke-dashoffset 0.9s cubic-bezier(0.45, 0, 0.2, 1); }
.by-node__ring { fill: var(--surface); stroke: var(--primary); stroke-width: 3; }
.by-node__dot { fill: var(--primary); }
.by-node__x { stroke: var(--danger); stroke-width: 3.5; stroke-linecap: round; opacity: 0; }
.by-node__label { font-family: var(--sans); font-size: 16px; font-weight: 700; fill: var(--text); }
.by-node__state { font-family: var(--sans); font-size: 14px; font-weight: 700; fill: var(--ok); }
.by-node[data-state="x"] .by-node__ring { stroke: var(--danger); fill: var(--danger-tint); stroke-width: 3.5; }
.by-node[data-state="x"] .by-node__dot { opacity: 0; }
.by-node[data-state="x"] .by-node__x { opacity: 1; }
.by-node[data-state="x"] .by-node__label { fill: var(--danger); }
.by-node[data-state="x"] .by-node__state { fill: var(--danger); }
.by-node[data-state="u"] .by-node__ring { stroke: var(--warn); stroke-dasharray: 4 4; stroke-width: 2.5; }
.by-node[data-state="u"] .by-node__dot { opacity: 0; }
.by-node[data-state="u"] .by-node__label { fill: var(--muted); }
.by-node[data-state="u"] .by-node__state { fill: var(--warn); }
.by-route__caption {
  margin-top: 8px; padding: 10px 14px; border-left: 4px solid var(--primary); background: var(--soft);
  border-radius: 0 var(--r-btn) var(--r-btn) 0; font-weight: 600; font-size: 15px;
}

/* 원인 가정 */
.by-hypo {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet);
  padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 12px;
}
.by-hypo__head { display: flex; flex-direction: column; gap: 2px; }
.by-hypo__title { font-size: 17px; font-weight: 800; }
.by-hypo__note { font-size: 14px; color: var(--muted); }
.by-hypo__btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.by-hypo__btn {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 44px; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--surface);
}
.by-hypo__btn:hover { border-color: var(--primary); }
.by-hypo__btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.by-hypo__code {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r-label);
  font-family: var(--num); font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
  border: 1.5px solid var(--primary); color: var(--primary); background: var(--surface); line-height: 1; white-space: nowrap;
}
.by-hypo__btn[aria-pressed="true"] .by-hypo__code { border-color: #fff; color: var(--primary); }
.by-hypo__name { font-weight: 800; font-size: 15.5px; line-height: 1.45; }
.by-hypo__to { font-size: 13px; opacity: 0.85; }
.by-hypo__btn .by-tag--sample { position: absolute; top: 12px; right: 12px; }
.by-hypo__btn[aria-pressed="true"] .by-tag--sample { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.by-hypo--compact { padding: 14px 18px 16px; }
.by-hypo--compact .by-hypo__name { font-size: 15px; }

/* 집계 */
.by-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.by-tally__item {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 16px; min-width: 0;
  border: 1px solid var(--line); border-left-width: 5px; border-radius: var(--r-btn);
}
.by-tally__item--ok { border-left-color: var(--ok); }
.by-tally__item--danger { border-left-color: var(--danger); }
.by-tally__item--warn { border-left-color: var(--warn); }
.by-tally__num { font-size: 40px; line-height: 1.05; }
.by-tally__item--ok .by-tally__num { color: var(--ok); }
.by-tally__item--danger .by-tally__num { color: var(--danger); }
.by-tally__item--warn .by-tally__num { color: var(--warn); }
.by-tally__label { font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.by-tally__note { margin-top: 10px; }

/* 발견 10건 */
.by-finds__head, .by-find__sum {
  display: grid; grid-template-columns: 34px 100px minmax(0, 1fr) 150px 92px 18px; gap: 12px; align-items: center;
}
.by-finds__head {
  padding: 0 12px 8px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--text);
}
.by-finds__head::after { content: ""; }
.by-finds { list-style: none; margin: 0; padding: 0; }
.by-finds > li { border-bottom: 1px solid var(--line); }
.by-find__sum { padding: 12px; cursor: pointer; list-style: none; min-height: 56px; }
.by-find__sum::-webkit-details-marker { display: none; }
.by-find__sum::after {
  content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); justify-self: center; margin-top: -4px;
}
.by-find[open] .by-find__sum::after { transform: rotate(-135deg); margin-top: 4px; }
.by-find__sum:hover { background: var(--soft); }
.by-find__no { font-size: 18px; color: var(--primary); }
.by-find__area { font-size: 14px; font-weight: 700; color: var(--muted); }
.by-find__plain { font-size: 15.5px; min-width: 0; }
.by-find__split { display: flex; min-width: 0; }
.by-find__size { display: flex; align-items: center; gap: 6px; }
.by-find__est { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.by-find__dev {
  margin: 0 12px 14px 58px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--r-btn);
  background: var(--soft); font-size: 14.5px; display: flex; flex-direction: column; gap: 4px;
}
.by-find__devhead { font-weight: 800; font-size: 13px; color: var(--primary); }

/* 진행표 */
.by-plan { list-style: none; margin: 0; padding: 0; }
.by-plan__row {
  display: grid; grid-template-columns: 170px 170px minmax(0, 1fr) 200px; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; align-items: start;
}
.by-plan__row:first-child { border-top: 2px solid var(--text); }
.by-plan__time { font-family: var(--num); font-weight: 700; font-size: 15px; color: var(--primary); font-variant-numeric: tabular-nums; }
.by-plan__step { font-weight: 800; }
.by-plan__out { font-size: 14px; color: var(--muted); }
.by-plan__outlabel { display: inline-block; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line); border-radius: var(--r-label); padding: 0 5px; margin-right: 4px; color: var(--muted); }

/* 소스와 계정 상자 */
.by-box {
  border: 2px solid var(--primary); border-radius: var(--r-sheet); background: var(--surface);
  padding: 18px 24px;
}
.by-box__list { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15.5px; }
.by-box__list li::marker { color: var(--primary); }

/* 지금 보고 계신 접속 */
.by-now {
  background: var(--surface); border: 2px solid var(--accent); border-radius: var(--r-sheet); padding: 18px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.by-now__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.by-now__grid { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.by-now__grid div { min-width: 0; }
.by-now__grid dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.by-now__grid dd { margin: 0; font-weight: 700; font-size: 15.5px; color: var(--accent); min-width: 0; }
.by-now__sub { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* 접속 테스트 표 */
.by-cellsum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.by-cellsum__label { font-size: 14px; font-weight: 700; color: var(--muted); }
.by-cellsum__vals { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.by-cellsum b { font-size: 16px; }
.by-matrix { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.by-matrix thead th {
  text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 10px;
  border-bottom: 2px solid var(--text); vertical-align: bottom; line-height: 1.4;
}
.by-matrix__no { font-family: var(--num); color: var(--primary); }
.by-matrix tbody th, .by-matrix tbody td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.by-matrix__place { font-weight: 800; white-space: nowrap; }
.by-matrix__row--user .by-matrix__place { color: var(--primary); }
.by-grade {
  display: inline-flex; align-items: center; height: 24px; padding: 0 7px; border-radius: var(--r-label);
  font-size: 12.5px; font-weight: 700; white-space: nowrap; border: 1.5px solid var(--primary); color: var(--primary); background: var(--primary-tint);
}
.by-grade--server { border-style: double; border-width: 3px; border-color: var(--muted); color: var(--text); background: var(--surface); }
.by-grade--control { border-style: dashed; border-color: var(--muted); color: var(--muted); background: var(--surface); }
.by-grades { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.by-grades li { display: flex; gap: 8px; align-items: flex-start; }
.by-grades .by-grade { flex: none; margin-top: 1px; }

/* 원인 후보 */
.by-causes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.by-cause {
  border: 1.5px solid var(--line); border-radius: var(--r-btn); padding: 14px 16px; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.by-cause__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.by-cause__title { font-size: 16px; font-weight: 800; line-height: 1.4; flex: 1 1 100%; }
.by-cause .by-tag--on { display: none; }
.by-cause__lines { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.by-cause__lines dt { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.by-cause__lines dd { margin: 0; }
.by-cause__lines .by-label { margin-right: 4px; vertical-align: 1px; }
.by[data-hypo="a"] .by-cause[data-h="a"],
.by[data-hypo="b"] .by-cause[data-h="b"],
.by[data-hypo="c"] .by-cause[data-h="c"] { border: 2.5px solid var(--primary); background: var(--primary-tint); }
.by[data-hypo="a"] .by-cause[data-h="a"] .by-tag--on,
.by[data-hypo="b"] .by-cause[data-h="b"] .by-tag--on,
.by[data-hypo="c"] .by-cause[data-h="c"] .by-tag--on { display: inline-flex; }
.by-causes + .by-note { margin-top: 12px; }

/* 확인 요청 양식 */
.by-ask__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.by-ask__form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.by-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.by-field legend, .by-field__label { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.by-field legend { margin-bottom: 6px; }
.by-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.by-radio {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-btn); cursor: pointer; font-weight: 600; font-size: 15px;
}
.by-radio:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); color: var(--primary); }
.by-radio input, .by-check-line input { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; }
.by-input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r-btn);
  font: inherit; font-size: 16px; background: var(--surface); color: var(--text);
}
.by-input.by-mono { font-family: var(--mono); font-size: 17px; letter-spacing: 0.04em; }
.by-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-tint); }
.by-check-line { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 15px; }
.by-ask__out { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.by-ask__outhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.by-ask__outlabel { font-size: 14px; font-weight: 700; }
.by-ask__text {
  width: 100%; min-height: 330px; padding: 12px 14px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--soft); color: var(--text);
  font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1.65; overflow: hidden;
}
.by-blockbox { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.by-blockbox__cap { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.by-blockbox__frame {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; max-width: 560px;
  border: 2px solid var(--muted); border-radius: var(--r-btn); background: var(--soft);
}
.by-blockbox__slot {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 10px; text-align: center;
  border: 1.5px dashed var(--muted); border-radius: var(--r-label); color: var(--muted); font-size: 14px; font-weight: 700; background: var(--surface);
}
.by-blockbox__slot--wide { grid-column: 1 / -1; min-height: 72px; }

/* 공개 문서로 확인한 사실 */
.by-facts {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: var(--r-sheet); padding: 18px 24px; display: flex; flex-direction: column; gap: 8px;
}
.by-facts__list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.by-facts__list li { padding-top: 10px; border-top: 1px dashed var(--line); font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.by-facts__src { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.by-facts__list a { font-size: 13.5px; font-weight: 600; }

/* 구분표 */
.by-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.by-col {
  background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--line);
  border-radius: var(--r-sheet); padding: 14px; min-width: 0; display: flex; flex-direction: column; gap: 8px;
}
.by-col--ok { border-top-color: var(--ok); }
.by-col--danger { border-top-color: var(--danger); }
.by-col--warn { border-top-color: var(--warn); }
.by-col__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.by-col__title { display: flex; }
.by-col__count { font-size: 30px; line-height: 1; }
.by-col--ok .by-col__count { color: var(--ok); }
.by-col--danger .by-col__count { color: var(--danger); }
.by-col--warn .by-col__count { color: var(--warn); }
.by-col__desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.by-col__cards { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.by-col__cards:not(:has(.by-card))::after {
  content: "이 가정에서는 이 칸에 둔 항목이 없습니다"; display: flex; align-items: center; justify-content: center;
  min-height: 60px; border: 1.5px dashed var(--line); border-radius: var(--r-btn); color: var(--muted); font-size: 13.5px; padding: 8px; text-align: center;
}
.by-card { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r-btn); background: var(--surface); }
.by-col--ok .by-card { border-left-color: var(--ok); }
.by-col--danger .by-card { border-left-color: var(--danger); }
.by-col--warn .by-card { border-left-color: var(--warn); }
.by-card__sum { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 12px; cursor: pointer; list-style: none; min-height: 44px; }
.by-card__sum::-webkit-details-marker { display: none; }
.by-card__sum:hover { background: var(--soft); }
.by-card__no { font-size: 17px; color: var(--primary); line-height: 1.5; }
.by-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.by-card__title { font-weight: 700; font-size: 14.5px; line-height: 1.5; }
.by-card__meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.by-card__meta .by-size { min-width: 22px; height: 20px; font-size: 12px; }
.by-card__moves { font-size: 12px; font-weight: 700; color: var(--accent); }
.by-card__picked {
  display: none; font-size: 11.5px; font-weight: 800; color: var(--primary); border: 1.5px solid var(--primary);
  border-radius: var(--r-label); padding: 0 5px; line-height: 1.6; white-space: nowrap; margin-top: 2px;
}
.by-card.is-picked .by-card__picked { display: inline-block; }
.by-card__more { padding: 4px 12px 12px 46px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.by-card__q { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.by-card__more .by-hypo__code { height: 20px; font-size: 12px; margin-right: 2px; }
.by-card__size { display: flex; align-items: center; gap: 6px; }
.by-card__out { font-weight: 800; color: var(--danger); font-size: 13.5px; }
.by-card__out--warn { color: var(--warn); }

.by-sum {
  background: var(--surface); border: 2px solid var(--primary); border-radius: var(--r-sheet); padding: 16px 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.by-sum__main { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.by-sum__title { font-size: 17px; font-weight: 800; }
.by-sum__vals { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.by-sum__n { font-size: 34px; line-height: 1; color: var(--primary); }
.by-sum__unit { font-weight: 800; margin-left: -10px; }
.by-sum__sizes { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.by-sum__size { display: inline-flex; align-items: center; gap: 4px; }
.by-sum__size b { font-size: 19px; }
.by-sum__note { font-size: 14px; color: var(--muted); }

/* 인계 문서 */
.by-acc { width: 100%; border-collapse: collapse; font-size: 15px; }
.by-acc thead th { text-align: left; font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--text); }
.by-acc tbody th, .by-acc tbody td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.by-acc tbody th { font-weight: 800; white-space: nowrap; }
.by-progress-head { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.by-progress { display: flex; align-items: center; gap: 12px; }
.by-progress__n { font-size: 24px; color: var(--primary); white-space: nowrap; }
.by-progress__bar { position: relative; width: 180px; height: 10px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.by-progress__fill { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 99px; }
.by-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.by-group { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 12px 14px; min-width: 0; }
.by-group__title { font-size: 15px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.by-group__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.by-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; border-top: 1px dashed var(--line); }
.by-item:first-child { border-top: 0; }
.by-item__box { display: flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; }
.by-item__box input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.by-item__more summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; padding-right: 4px;
}
.by-item__more summary::-webkit-details-marker { display: none; }
.by-item__more summary::after {
  content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin-top: -4px;
}
.by-item__more[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.by-item.is-done .by-item__more summary { color: var(--muted); }
.by-item__steps { margin: 0 0 10px; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.by-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.by-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.by-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; }
.by-steps__no {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--primary); color: var(--primary); font-size: 15px;
}
.by-steps__body { display: flex; flex-direction: column; font-size: 14.5px; }
.by-steps__body b { font-size: 15.5px; }
.by-restore__list { margin: 0 0 12px; display: flex; flex-direction: column; }
.by-restore__list div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.by-restore__list dt { color: var(--muted); font-weight: 700; }
.by-restore__list dd { margin: 0; font-weight: 600; }
.by-endline { text-align: center; color: var(--muted); font-size: 14.5px; font-weight: 600; padding: 4px 0; }

/* 바닥 */
.by-foot { max-width: 1040px; margin: 18px auto 0; padding: 14px 20px 6px; border-top: 1px solid var(--line); }
.by-foot__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.by-foot__line { font-size: 13.5px; color: var(--muted); }
.demo-notice { font-size: 12px; color: var(--muted); padding: 4px 0 0; }

.by-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-btn); border: 2px solid var(--primary); background: var(--surface); color: var(--primary);
  font-weight: 800; font-size: 14.5px; cursor: pointer; box-shadow: 0 6px 18px rgba(20, 34, 43, 0.16);
}
.by-fab:hover { background: var(--primary-tint); }

/* 창 */
.by-dialog {
  width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-sheet); background: var(--surface); color: var(--text);
}
.by-dialog::backdrop { background: rgba(20, 34, 43, 0.45); }
.by-dialog--sm { width: min(400px, calc(100vw - 24px)); }
.by-dialog__body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.by-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.by-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.by-dialog__title { font-size: 20px; font-weight: 800; }
.by-icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--surface); cursor: pointer; flex: none; }
.by-map { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.by-map li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.by-map__need { color: var(--text); }
.by-map__show { font-weight: 700; }
.by-dialog__foot { font-size: 13px; color: var(--muted); }
.by-info { font-size: 15.5px; }

@media (prefers-reduced-motion: reduce) {
  .by-route__line { transition: none !important; }
}

/* 좁은 화면 */
@media (max-width: 900px) {
  .by-plan__row { grid-template-columns: 130px minmax(0, 1fr); }
  .by-plan__time { grid-column: 1; }
  .by-plan__step { grid-column: 2; }
  .by-plan__work, .by-plan__out { grid-column: 2; }
  .by-causes { grid-template-columns: minmax(0, 1fr); }
  .by-ask__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 719px) {
  .by-main { padding: 14px 12px 6px; }
  .by-head__inner { padding: 10px 12px; }
  .by-brand__mark { width: 30px; height: 30px; }
  .by-brand__title { font-size: 15px; }
  .by-reset { padding: 0 10px; font-size: 13.5px; }
  .by-nav__inner { padding: 0 4px; gap: 0; }
  .by-nav__item { flex: 1 1 0; padding: 0 6px; }
  .by-nav__long { display: none; }
  .by-nav__short { display: inline; }
  .by-wrap { gap: 14px; }
  .by-sheet, .by-hypo, .by-box, .by-now, .by-facts { padding: 16px 14px; }
  .by-cover__title, .by-pagehead__title { font-size: 22px; }
  .by-cover__meta { grid-template-columns: minmax(0, 1fr); }

  .by-route__svg--h { display: none; }
  .by-route__svg--v { display: block; margin: 0 auto; }
  .by-route__fig { margin: 4px 0 0; }

  .by-hypo__btns { grid-template-columns: minmax(0, 1fr); }
  .by-hypo__btn { padding: 10px 12px; }

  .by-tally { gap: 6px; }
  .by-tally__item { padding: 10px 8px 10px 10px; border-left-width: 4px; }
  .by-tally__num { font-size: 32px; }
  .by-tally__label { font-size: 13px; }

  .by-finds__head { display: none; }
  .by-finds > li:first-child { border-top: 2px solid var(--text); }
  .by-find__sum {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    grid-template-areas: "no area chev" "no plain plain" "no split size";
    gap: 4px 8px; padding: 12px 4px; align-items: start;
  }
  .by-find__no { grid-area: no; }
  .by-find__area { grid-area: area; font-size: 13px; }
  .by-find__plain { grid-area: plain; font-size: 15px; }
  .by-find__split { grid-area: split; }
  .by-find__size { grid-area: size; justify-self: end; }
  .by-find__sum::after { grid-area: chev; margin-top: 4px; }
  .by-find[open] .by-find__sum::after { margin-top: 10px; }
  .by-find__dev { margin: 0 4px 12px 34px; }

  .by-plan__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .by-plan__time, .by-plan__step, .by-plan__work, .by-plan__out { grid-column: 1; }

  .by-now__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .by-now__grid div:nth-child(1), .by-now__grid div:nth-child(2) { grid-column: 1 / -1; }

  .by-matrix, .by-matrix tbody, .by-matrix tr, .by-matrix th, .by-matrix td { display: block; }
  .by-matrix thead { display: none; }
  .by-matrix tbody tr { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; margin-bottom: 10px; }
  .by-matrix tbody th, .by-matrix tbody td { border: 0; padding: 0; }
  .by-matrix__place { white-space: normal; font-size: 16px; }
  .by-matrix__grade { margin: 4px 0 6px; }
  .by-matrix__cell { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 !important; border-top: 1px dashed var(--line) !important; }
  .by-matrix__cell::before { content: attr(data-label); font-size: 14px; color: var(--muted); font-weight: 600; }

  .by-board { grid-template-columns: minmax(0, 1fr); }
  .by-card__more { padding-left: 12px; }

  .by-acc, .by-acc tbody, .by-acc tr, .by-acc th, .by-acc td { display: block; }
  .by-acc thead { display: none; }
  .by-acc tbody tr { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; margin-bottom: 10px; }
  .by-acc tbody th, .by-acc tbody td { border: 0; padding: 0; }
  .by-acc tbody th { font-size: 16px; margin-bottom: 4px; }
  .by-acc tbody td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); }
  .by-acc tbody td::before { content: attr(data-label); color: var(--muted); font-size: 14px; font-weight: 600; flex: none; }
  .by-acc tbody td > span { text-align: right; min-width: 0; }

  .by-groups { grid-template-columns: minmax(0, 1fr); }
  .by-two { grid-template-columns: minmax(0, 1fr); }
  .by-progress__bar { width: 120px; }
  .by-blockbox__frame { grid-template-columns: minmax(0, 1fr); }
  .by-map li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .by-foot { padding: 12px 12px 6px; }
  .by-fab { right: 12px; }
}
