/* 홈페이지 운영비 점검 결과지 견본(위시켓 159990). 인상: 통장 속지에 형광펜으로 표시한 고정비 정리표.
   옅은 옥색 바탕, 자두색 주색, 벽돌 주황 강조. 숫자는 Inconsolata, 한글은 Pretendard. */
:root {
  --bg: #E1F0EC;
  --surface: #FFFFFF;
  --text: #14231F;
  --muted: #47605A;
  --line: #BFD6CF;
  --primary: #5A1F4A;
  --accent: #B8451F;
  --ok: #1B6B3A;
  --warn: #7A5200;
  --danger: #B3261E;

  --primary-tint: #F4EAF1;
  --accent-tint: #FBEEE7;
  --ok-tint: #E4F2E8;
  --warn-tint: #FBF1DA;
  --danger-tint: #FBE8E6;
  --soft: #EEF7F4;
  --gray: #EDF2F0;

  --r: 6px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "Inconsolata", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sp {
  margin: 0;
  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;
}
.sp a { color: var(--accent); }
:where(.sp) :where(button, select) { font: inherit; color: inherit; }
.sp :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r); }
.sp [hidden] { display: none !important; }
.sp p { margin: 0; }
.sp-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sp-num { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sp-mono { font-family: var(--mono); font-weight: 500; }

/* 꼬리표: 견본·가상 금액·예시·공개 문서 */
.sp-tag, .sp-virtual, .sp-ex, .sp-doc {
  display: inline-block; vertical-align: 2px;
  font-size: 12px; line-height: 1; font-weight: 600; white-space: nowrap;
  padding: 4px 7px 4px 11px;
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%);
}
.sp-tag { background: var(--primary-tint); color: var(--primary); }
.sp-virtual { background: var(--accent-tint); color: #8E3416; }
.sp-ex { background: var(--gray); color: var(--muted); }
.sp-doc { background: var(--soft); color: var(--muted); font-weight: 500; white-space: normal; line-height: 1.3; }

/* 안내 띠 */
.sp-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;
}

/* 머리 */
.sp-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.sp-head__inner { max-width: 1040px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text) !important; min-width: 0; }
.sp-brand__mark { width: 32px; height: 32px; flex: none; }
.sp-brand__text { display: flex; flex-direction: column; min-width: 0; }
.sp-brand__title { font-weight: 700; font-size: 16px; line-height: 1.35; }
.sp-brand__sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.sp-reset {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 0 14px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600;
}
.sp-reset:hover { border-color: var(--primary); color: var(--primary); }
.sp-nav { border-top: 1px solid var(--line); }
.sp-nav__inner { max-width: 1040px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sp-nav__item {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px;
  color: var(--muted) !important; text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.sp-nav__item:hover { color: var(--primary) !important; }
.sp-nav__item.is-on { color: var(--primary) !important; border-bottom-color: var(--primary); }
.sp-nav__short { display: none; }

/* 본문 틀 */
.sp-main { max-width: 1040px; margin: 0 auto; padding: 18px 20px 104px; }
.sp-wrap { display: flex; flex-direction: column; gap: 16px; }
.sp-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; min-width: 0; }
.sp-sheet__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sp-sheet__head--row { flex-direction: row; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 16px; }
.sp-kicker { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.sp-h1 { margin: 0; font-size: 24px; line-height: 1.35; }
.sp-h2 { margin: 0; font-size: 19px; line-height: 1.4; }
.sp-h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.sp-note { font-size: 14px; color: var(--muted); line-height: 1.65; }
.sp-final { margin-top: 14px !important; padding: 12px 14px; border-left: 4px solid var(--primary); background: var(--primary-tint); font-weight: 600; font-size: 15px; }
.sp-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

.sp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); cursor: pointer;
  font-weight: 700; font-size: 15px; border: 2px solid var(--primary); background: var(--surface); color: var(--primary);
}
.sp-btn--primary { background: var(--primary); color: #fff; }
.sp-btn--primary:hover { background: #4A183C; }
.sp-btn--ghost:hover { background: var(--primary-tint); }
.sp-btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-width: 1.5px; }
.sp-btn--block { width: 100%; }

/* 1쪽: 전후 블록 */
.sp-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-ba { background: var(--surface); border: 3px solid var(--primary); border-radius: var(--r); padding: 18px 22px 16px; min-width: 0; }
.sp-ba__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-ba__changed { font-size: 13px; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); padding: 1px 8px; border-radius: 4px; }
.sp-ba__title { margin: 8px 0 4px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 14px; font-weight: 700; }
.sp-ba__col { display: flex; flex-direction: column; }
.sp-ba__cap { font-size: 14px; color: var(--muted); font-weight: 600; line-height: 1.3; }
.sp-ba__num { font-size: clamp(26px, 7.2vw, 48px); line-height: 1.1; white-space: nowrap; }
.sp-ba__num--now { color: var(--text); }
.sp-ba__num--after { color: var(--primary); }
.sp-ba__num .sp-num { font-size: 1.12em; }
.sp-ba__arrow { font-size: clamp(22px, 5vw, 34px); color: var(--accent); line-height: 1.3; padding-bottom: 2px; }
.sp-ba__saved { font-size: 16px; font-weight: 600; }
.sp-ba__saved strong { color: var(--primary); font-size: 1.15em; }
.sp-counts { list-style: none; margin: 12px 0 10px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sp-count { border: 1.5px solid var(--line); border-radius: 4px; padding: 6px 8px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; min-width: 0; }
.sp-count__mark { grid-row: 1 / 3; font-size: 16px; font-weight: 700; width: 18px; text-align: center; }
.sp-count__label { font-size: 13px; color: var(--muted); line-height: 1.3; white-space: nowrap; }
.sp-count strong { font-size: 22px; line-height: 1.1; }
.sp-count--keep .sp-count__mark { color: var(--ok); }
.sp-count--cut .sp-count__mark { color: var(--danger); }
.sp-count--swap .sp-count__mark, .sp-count--ask .sp-count__mark { color: var(--warn); }
.sp-ba__line { font-size: 13px; color: var(--muted); line-height: 1.6; }

.sp-answers { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-answers__list { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 5px; }
.sp-answers__list li::marker { font-family: var(--mono); font-weight: 700; color: var(--primary); }
.sp-answers .sp-btn { align-self: flex-start; }

/* 결제처별 막대 */
.sp-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.sp-legend span::before { content: ""; display: inline-block; width: 14px; height: 8px; margin-right: 6px; vertical-align: 1px; border-radius: 2px; }
.sp-legend__now::before { background: #B9CBC5; }
.sp-legend__after::before { background: var(--primary); }
.sp-bars { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 10px; }
.sp-bars__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sp-bars__head .sp-h3 { margin-bottom: 4px; }
.sp-bars .sp-note { font-size: 13px; }
.sp-bars__list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.sp-bar { display: grid; grid-template-columns: 1fr; gap: 4px; min-width: 0; }
.sp-bar__label { font-weight: 700; font-size: 14px; }
.sp-bar__tracks { display: flex; flex-direction: column; gap: 4px; }
.sp-bar__track { display: block; height: 10px; background: var(--soft); border-radius: 2px; overflow: hidden; }
.sp-bar__fill { display: block; height: 100%; border-radius: 2px; min-width: 2px; }
.sp-bar__fill--now { background: #B9CBC5; }
.sp-bar__fill--after { background: var(--primary); }
.sp-bar__amt { display: flex; gap: 6px; font-size: 15px; flex-wrap: wrap; line-height: 1.4; }
.sp-bar__now { color: var(--muted); font-weight: 500; }
.sp-bar__after { color: var(--primary); }

/* 판정표 */
.sp-ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--text); }
.sp-row {
  display: grid; gap: 10px 20px; padding: 16px 0 14px; border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas: "head head" "evid act" "why why" "dev dev";
}
.sp-row__head { grid-area: head; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.sp-row__no { width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid var(--text); border-radius: 3px; font-size: 16px; }
.sp-row__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.sp-row__title { margin: 0; font-size: 17px; line-height: 1.4; }
.sp-row__changed { font-size: 12px; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); padding: 0 6px; border-radius: 3px; white-space: nowrap; }
.sp-row__amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.35; }
.sp-row__now { font-size: 19px; }
.sp-row__after { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sp-row__after b { font-size: 16px; color: var(--primary); }
.sp-row[data-verdict="cut"] .sp-row__now { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.sp-row[data-verdict="cut"] .sp-row__after b { color: var(--danger); }
.sp-row[data-verdict="swap"] .sp-row__after b, .sp-row[data-verdict="ask"] .sp-row__after b { color: var(--warn); }
.sp-row[data-verdict="keep"] .sp-row__after b { color: var(--ok); }

.sp-payer { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 3px; border: 1.5px solid var(--muted); color: var(--muted); white-space: nowrap; line-height: 1.5; }
.sp-payer--vercel { border-style: double; border-width: 3px; padding: 0 6px; }
.sp-payer--google { border-style: dashed; }
.sp-payer--domain { border-style: dotted; border-width: 2px; }
.sp-payer--none { border-width: 1px; }

.sp-evid { grid-area: evid; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sp-evid__cell { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; background: #FBFDFC; min-width: 0; }
.sp-evid dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-evid dd { margin: 2px 0 0; font-size: 14px; line-height: 1.5; }
.sp-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 3px; margin-right: 2px; line-height: 1.6; white-space: nowrap; }
.sp-chip--on { background: var(--ok-tint); color: var(--ok); }
.sp-chip--off { background: var(--danger-tint); color: var(--danger); }
.sp-chip--in { background: var(--ok-tint); color: var(--ok); }
.sp-chip--out { background: var(--gray); color: var(--muted); }
.sp-chip--unsure { background: var(--warn-tint); color: var(--warn); }
.sp-evid__cell--bill .sp-chip--on { background: var(--accent-tint); color: #8E3416; }

.sp-row__act { grid-area: act; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sp-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sp-seg__btn {
  min-height: 44px; padding: 4px 2px; border: 0; border-left: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; line-height: 1.2;
}
.sp-seg__btn:first-child { border-left: 0; }
.sp-seg__btn:hover { background: var(--primary-tint); }
.sp-seg__mark { font-weight: 700; }
.sp-seg__btn--keep .sp-seg__mark { color: var(--ok); }
.sp-seg__btn--cut .sp-seg__mark { color: var(--danger); }
.sp-seg__btn--swap .sp-seg__mark, .sp-seg__btn--ask .sp-seg__mark { color: var(--warn); }
.sp-seg__btn[aria-pressed="true"] { background: var(--primary); color: #fff; }
.sp-seg__btn[aria-pressed="true"] .sp-seg__mark { color: #fff; }
.sp-alt { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.sp-alt__label { font-size: 13px; font-weight: 700; color: var(--warn); }
.sp-alt__select { min-height: 44px; width: 100%; min-width: 0; padding: 0 10px; border: 1.5px solid var(--warn); border-radius: var(--r); background: var(--warn-tint); font-size: 14px; }
.sp-row__why { grid-area: why; font-size: 15px; line-height: 1.6; }
.sp-dev { grid-area: dev; font-size: 14px; }
.sp-dev summary { cursor: pointer; color: var(--muted); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.sp-dev summary:hover { color: var(--primary); }
.sp-dev[open] { background: var(--soft); border-radius: 4px; padding: 4px 12px 10px; }
.sp-dev code { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.sp-dev__cap { font-weight: 700; color: var(--muted); margin-top: 4px !important; }
.sp-dev ul { margin: 2px 0 0; padding-left: 18px; }

/* 판정 규칙 */
.sp-rules { width: 100%; border-collapse: collapse; margin: 10px 0 12px; font-size: 14px; }
.sp-rules th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 2px solid var(--text); }
.sp-rules td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.sp-rules td:first-child, .sp-rules td:nth-child(2) { white-space: nowrap; }
.sp-rules__v { display: block; }
.sp-rules__v--ok { color: var(--ok); }
.sp-rules__v--warn { color: var(--warn); }
.sp-rules__v--danger { color: var(--danger); }
.sp-rules__note { display: block; color: var(--muted); font-size: 13px; }

/* 접근 권한 */
.sp-access { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sp-access__item { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; font-size: 14px; line-height: 1.55; min-width: 0; }
.sp-access__payer { font-weight: 700; font-size: 15px; }
.sp-access__cap { font-weight: 700; color: var(--primary); font-size: 13px; margin-top: 6px !important; }
.sp-access__todo { margin: 0; padding-left: 18px; }

/* 진행표 */
.sp-sched { list-style: none; margin: 10px 0 0; padding: 0; }
.sp-sched__item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sp-sched__item:last-child { border-bottom: 0; }
.sp-sched__time { font-size: 15px; color: var(--primary); }
.sp-sched__item--team .sp-sched__time { color: var(--accent); }
.sp-sched__title { font-weight: 700; font-size: 15px; }
.sp-sched__text { font-size: 14px; color: var(--muted); line-height: 1.55; }
.sp-who { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 6px; border: 1.5px solid var(--line); border-radius: 3px; color: var(--muted); vertical-align: 1px; white-space: nowrap; }
.sp-who--dev { border-color: var(--primary); color: var(--primary); }

/* 계정 취급 */
.sp-handle { border: 2px solid var(--primary); }
.sp-handle__list { margin: 10px 0 12px; padding-left: 20px; font-size: 15px; line-height: 1.65; display: flex; flex-direction: column; gap: 6px; }

/* 2쪽: 연결도 */
.sp-mapctl { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sp-states { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-states__btn { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600; }
.sp-states__btn:hover { border-color: var(--primary); }
.sp-states__btn[aria-checked="true"] { border: 2px solid var(--primary); background: var(--primary-tint); color: var(--primary); }

.sp-route { position: relative; --axis: x; --rail: 13; padding-top: 30px; margin-bottom: 14px; }
.sp-route::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: var(--line); }
.sp-route__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.sp-route .sp-node { position: relative; }
.sp-route .sp-node::before { content: ""; position: absolute; left: 50%; top: -17px; width: 2px; height: 17px; background: var(--line); }
.sp-route .sp-node.is-arrived::before, .sp-route .sp-node.is-stopped::before { background: var(--accent); }
.sp-dot {
  position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(184, 69, 31, .22); z-index: 2;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1); pointer-events: none; opacity: 0;
}
.sp-dot.is-placed { opacity: 1; }
.sp-dot.is-stopped { background: var(--danger); box-shadow: 0 0 0 4px rgba(179, 38, 30, .25); }

.sp-node__btn {
  width: 100%; height: 100%; text-align: left; cursor: pointer; background: var(--surface);
  border: 2px solid var(--muted); border-radius: var(--r); padding: 8px 9px;
  display: flex; flex-direction: column; gap: 2px; min-height: 44px;
}
.sp-node--aws .sp-node__btn { border-style: solid; }
.sp-node--vercel .sp-node__btn { border-style: double; border-width: 4px; padding: 6px 7px; }
.sp-node--google .sp-node__btn { border-style: dashed; }
.sp-node--domain .sp-node__btn { border-style: dotted; border-width: 3px; padding: 7px 8px; }
.sp-node--none .sp-node__btn { border: 1px solid var(--line); padding: 9px 10px; }
.sp-node__btn:hover { background: var(--soft); }
.sp-node__btn[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.sp-node__top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.sp-node__no { font-size: 14px; color: var(--text); }
.sp-node__name { font-weight: 700; font-size: 15px; line-height: 1.35; }
.sp-node__sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.sp-node__status { margin-top: auto; padding-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sp-node.is-arrived .sp-node__btn { background: var(--ok-tint); }
.sp-node.is-arrived .sp-node__status { color: var(--ok); }
.sp-node.is-pending .sp-node__btn { opacity: .72; }
.sp-node.is-stopped .sp-node__btn { background: var(--danger-tint); }
.sp-node.is-stopped .sp-node__status { color: var(--danger); }
.sp-node.is-cut .sp-node__btn { background: var(--danger-tint); opacity: 1; }
.sp-node.is-cut .sp-node__name { text-decoration: line-through; }
.sp-node.is-cut .sp-node__status { color: var(--danger); }

.sp-result { padding: 10px 14px; border-left: 4px solid var(--ok); background: var(--ok-tint); font-weight: 600; font-size: 15px; margin-bottom: 16px !important; }
.sp-result--danger { border-left-color: var(--danger); background: var(--danger-tint); color: #7E1A14; }

.sp-offwrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.sp-off__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sp-off__list--side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-node--off .sp-node__btn { background: var(--gray); border-color: #8FA49E; color: var(--muted); }
.sp-node--off .sp-node__name { color: var(--muted); }
.sp-node--off.is-cut .sp-node__btn { background: var(--danger-tint); }
.sp-node--side .sp-node__btn { background: var(--surface); }
.sp-node--side.sp-node--keep .sp-node__status { color: var(--ok); }
.sp-node--side.sp-node--ask .sp-node__status { color: var(--warn); }

.sp-panel { border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: var(--r); padding: 14px 16px; background: var(--surface); scroll-margin: 16px; }
.sp-panel__eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.sp-panel__title { margin: 4px 0 8px; font-size: 18px; }
.sp-panel__grid { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 20px; }
.sp-panel__grid dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-panel__grid dd { margin: 0; font-size: 15px; line-height: 1.6; }
.sp-verdict { font-weight: 700; }
.sp-verdict--keep { color: var(--ok); }
.sp-verdict--cut { color: var(--danger); }
.sp-verdict--swap, .sp-verdict--ask { color: var(--warn); }

.sp-keys { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.sp-keys li { display: inline-flex; align-items: center; gap: 8px; }
.sp-keybox { width: 26px; height: 18px; border: 2px solid var(--muted); border-radius: 3px; display: inline-block; }
.sp-keybox.sp-node--vercel { border-style: double; border-width: 4px; }
.sp-keybox.sp-node--google { border-style: dashed; }
.sp-keybox.sp-node--domain { border-style: dotted; border-width: 3px; }
.sp-keybox.sp-node--none { border: 1px solid var(--line); }

/* 3쪽: 구글 DB */
.sp-gl { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "clues found"; gap: 18px; align-items: start; }
.sp-clues { grid-area: clues; min-width: 0; }
.sp-found { grid-area: found; border: 2px solid var(--primary); border-radius: var(--r); padding: 14px 16px; position: sticky; top: 12px; background: var(--surface); }
.sp-found__head { display: flex; justify-content: space-between; align-items: baseline; }
.sp-found__count { font-size: 18px; color: var(--primary); }
.sp-found__list { margin: 0; }
.sp-found__row { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sp-found__row dt { font-size: 12px; color: var(--muted); font-weight: 700; }
.sp-found__row dd { margin: 0; font-size: 15px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.sp-found__val { font-weight: 700; }
.sp-found__val::before { content: "✓ "; color: var(--ok); }
.sp-found__src { font-size: 12px; color: var(--muted); }
.sp-found__empty { color: var(--muted); font-style: italic; }
.sp-found__row.is-filled .sp-found__empty { display: none; }
.sp-found__row:not(.is-filled) .sp-found__val, .sp-found__row:not(.is-filled) .sp-found__src { display: none; }
.sp-found__need { margin-top: 10px; font-size: 14px; }
.sp-found__cap { font-weight: 700; color: var(--danger); font-size: 13px; }
.sp-found__need ul { margin: 2px 0 0; padding-left: 18px; color: var(--muted); }

.sp-clues__bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-clues__list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-clue { border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.sp-clue.is-open { border-color: var(--primary); }
.sp-clue__head { width: 100%; min-height: 52px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 12px; background: none; border: 0; cursor: pointer; text-align: left; }
.sp-clue__no { font-size: 20px; color: var(--primary); font-weight: 700; }
.sp-clue__title { font-weight: 700; font-size: 16px; }
.sp-clue__state { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sp-clue.is-open .sp-clue__state { color: var(--primary); }
.sp-clue__body { padding: 0 14px 12px 50px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.6; }
.sp-clue:not(.is-open) .sp-clue__body { display: none; }
.sp-clue__cap { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 8px; }
.sp-clue__where { color: var(--muted); font-size: 14px; }

.sp-owner { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sp-owner__btn { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px; }
.sp-owner__btn:hover { border-color: var(--primary); }
.sp-owner__btn[aria-checked="true"] { border: 2px solid var(--primary); background: var(--primary-tint); color: var(--primary); }
.sp-owner__panel { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: 15px; line-height: 1.65; }
.sp-owner__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 24px; }
.sp-owner__cap { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 2px !important; }
.sp-letter { margin-top: 12px; padding: 10px 14px; border: 1.5px dashed var(--muted); border-radius: 4px; background: var(--soft); }
.sp-letter__text { font-size: 14px; }

/* 4쪽: 대안과 순서 */
.sp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.sp-plan {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; min-width: 0;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px;
}
.sp-plan:hover { border-color: var(--primary); }
.sp-plan[aria-checked="true"] { border: 3px solid var(--primary); padding: 12.5px 14.5px; background: var(--primary-tint); }
.sp-plan__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-plan__name { font-weight: 700; font-size: 17px; }
.sp-plan__badge { font-size: 12px; font-weight: 700; color: var(--primary); border: 1.5px solid var(--primary); padding: 0 6px; border-radius: 3px; }
.sp-plan__total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; font-weight: 600; }
.sp-plan__cap { font-size: 13px; color: var(--muted); width: 100%; }
.sp-plan__num { font-size: 30px; color: var(--primary); line-height: 1.1; }
.sp-plan__body { font-size: 14px; line-height: 1.55; }
.sp-plan__row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px; font-size: 13.5px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 5px; }
.sp-plan__k { color: var(--muted); font-weight: 700; }
.sp-scale { font-weight: 700; }

.sp-progress { font-size: 14px; font-weight: 700; color: var(--primary); border: 1.5px solid var(--primary); border-radius: 4px; padding: 2px 10px; white-space: nowrap; }
.sp-steps { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--text); }
.sp-step { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sp-step__check { display: grid; grid-template-columns: 26px 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; }
.sp-step__box { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.sp-step__no { width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid var(--text); border-radius: 3px; font-size: 15px; }
.sp-step__title { font-weight: 700; font-size: 16px; line-height: 1.4; }
.sp-step__lock { display: none; font-size: 12px; font-weight: 700; color: var(--danger); border: 1.5px solid var(--danger); border-radius: 3px; padding: 0 6px; white-space: nowrap; }
.sp-step.is-locked .sp-step__lock { display: inline-block; }
.sp-step.is-locked .sp-step__check { cursor: not-allowed; }
.sp-step.is-locked .sp-step__title, .sp-step.is-locked .sp-step__no { opacity: .55; }
.sp-step.is-locked .sp-step__box { cursor: not-allowed; }
.sp-step.is-done .sp-step__no { background: var(--ok-tint); border-color: var(--ok); color: var(--ok); }
.sp-step__why { margin-left: 72px !important; padding: 6px 10px; background: var(--danger-tint); border-left: 3px solid var(--danger); font-size: 14px; color: #7E1A14; font-weight: 600; }
.sp-step__body { margin-left: 72px !important; font-size: 15px; line-height: 1.6; }
.sp-step__meta { margin: 0 0 0 72px; display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: 8px; }
.sp-step__meta div { border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; background: #FBFDFC; min-width: 0; }
.sp-step__meta dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-step__meta dd { margin: 0; font-size: 14px; line-height: 1.5; }

/* 바닥 */
.sp-foot { max-width: 1040px; margin: 0 auto; padding: 0 20px 96px; text-align: center; }
.sp-foot__line { font-size: 13px; color: var(--muted); }
.demo-notice { margin-top: 4px; font-size: 12px; color: var(--muted); text-align: center; }

.sp-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 22px; border: 2px solid var(--primary); background: var(--surface); color: var(--primary);
  font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 4px 14px rgba(20, 35, 31, .16);
}
.sp-fab:hover { background: var(--primary-tint); }

.sp-dialog { border: 0; padding: 0; border-radius: 8px; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); color: var(--text); }
.sp-dialog--sm { width: min(420px, calc(100vw - 24px)); }
.sp-dialog::backdrop { background: rgba(20, 35, 31, .45); }
.sp-dialog__body { padding: 18px 20px; }
.sp-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.sp-eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-dialog__title { margin: 0; font-size: 20px; }
.sp-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; flex: none; }
.sp-maplist { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 2px; }
.sp-maplist li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sp-maplist__need, .sp-maplist__show { display: block; }
.sp-maplist li::marker { font-family: var(--mono); font-weight: 700; color: var(--primary); }
.sp-maplist__need { font-size: 14px; }
.sp-maplist__show { font-size: 14px; font-weight: 700; text-decoration: none; }
.sp-dialog__foot { font-size: 13px; color: var(--muted); margin-top: 10px !important; }
.sp-info { font-size: 16px; margin-bottom: 14px !important; }

/* 중간 폭: 연결도를 세로 흐름으로 */
@media (max-width: 899px) {
  .sp-route { --axis: y; --rail: 13; padding-top: 0; padding-left: 32px; }
  .sp-route::before { left: 12px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .sp-route__list { grid-template-columns: 1fr; gap: 8px; }
  .sp-route .sp-node::before { left: -19px; top: 50%; width: 19px; height: 2px; }
  .sp-route .sp-node__btn {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top status" "name status" "sub status";
    column-gap: 10px; row-gap: 0; align-items: center;
  }
  .sp-route .sp-node__top { grid-area: top; }
  .sp-route .sp-node__name { grid-area: name; }
  .sp-route .sp-node__sub { grid-area: sub; }
  .sp-route .sp-node__status { grid-area: status; margin: 0; padding: 0; white-space: nowrap; }
  .sp-offwrap { grid-template-columns: 1fr; }
  .sp-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "evid" "act" "why" "dev"; }
  .sp-gl { grid-template-columns: minmax(0, 1fr); grid-template-areas: "found" "clues"; }
  .sp-found { position: static; }
  .sp-top { grid-template-columns: minmax(0, 1fr); }
}

/* 모바일 */
@media (max-width: 640px) {
  .sp-band__long { display: none; }
  .sp-head__inner { padding: 8px 14px; gap: 8px; }
  .sp-brand__mark { width: 28px; height: 28px; }
  .sp-brand__title { font-size: 14.5px; }
  .sp-brand__sub { font-size: 12px; }
  .sp-reset { padding: 0 10px; font-size: 13px; gap: 4px; }
  .sp-reset .sp-ico { width: 18px; height: 18px; }
  .sp-nav__inner { padding: 0 6px; justify-content: space-between; }
  .sp-nav__item { padding: 0 10px; font-size: 14.5px; }
  .sp-nav__long { display: none; }
  .sp-nav__short { display: inline; }
  .sp-main { padding: 12px 12px 96px; }
  .sp-wrap { gap: 12px; }
  .sp-sheet { padding: 16px 14px; }
  .sp-h1 { font-size: 21px; }
  .sp-h2 { font-size: 18px; }
  .sp-ba { padding: 14px 14px 12px; }
  .sp-ba__title { gap: 2px 10px; }
  .sp-counts { gap: 4px; }
  .sp-count { padding: 5px 6px; column-gap: 4px; }
  .sp-count__label { font-size: 12px; }
  .sp-count strong { font-size: 19px; }
  .sp-grid2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sp-bars__list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sp-bar { grid-template-columns: 70px minmax(0, 1fr); grid-template-areas: "label tracks" "label amt"; column-gap: 10px; }
  .sp-bar__label { grid-area: label; font-size: 14px; }
  .sp-bar__tracks { grid-area: tracks; }
  .sp-bar__amt { grid-area: amt; font-size: 14px; }
  .sp-row__head { grid-template-columns: 30px minmax(0, 1fr); }
  .sp-row__amt { grid-column: 2; flex-direction: row; align-items: baseline; gap: 10px; text-align: left; flex-wrap: wrap; }
  .sp-row__title { font-size: 16px; }
  .sp-evid { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 4px; }
  .sp-evid__cell { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 6px 10px; }
  .sp-evid__cell:last-child { border-bottom: 0; }
  .sp-evid dd { margin: 0; }
  .sp-seg__btn { font-size: 13.5px; }
  .sp-access { grid-template-columns: minmax(0, 1fr); }
  .sp-sched__item { grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  .sp-sched__time { font-size: 14px; }
  .sp-mapctl .sp-btn { width: 100%; }
  .sp-states { width: 100%; }
  .sp-states__btn { flex: 1 1 auto; padding: 0 10px; font-size: 13.5px; }
  .sp-off__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-panel__grid { grid-template-columns: minmax(0, 1fr); }
  .sp-clue__body { padding: 0 12px 12px 14px; }
  .sp-owner__btn { flex: 1 1 auto; padding: 0 10px; }
  .sp-owner__cols { grid-template-columns: minmax(0, 1fr); }
  .sp-plans { grid-template-columns: minmax(0, 1fr); }
  .sp-plan__num { font-size: 26px; }
  .sp-step__check { grid-template-columns: 24px 28px minmax(0, 1fr); }
  .sp-step__lock { grid-column: 3; justify-self: start; }
  .sp-step__why, .sp-step__body { margin-left: 0 !important; }
  .sp-step__meta { margin-left: 0; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sp-fab { right: 12px; bottom: 12px; padding: 0 14px; }
  .sp-foot { padding: 0 14px 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-dot { transition: none; }
}
