/* ==========================================================================
   세무그룹 인우(人友) — 실무 세금 계산기 10종 프리미엄 UI (tools-ui.css)
   컨셉: 프라이빗 뱅킹 / 하이엔드 핀테크 계기판 (여백·비례·촉각적 슬라이더·시각 차트)
   아이보리·크림 0건 · 과장된 그라디언트 0건 · 정제된 헤어라인 + 깊은 포레스트·브라스
   ========================================================================== */

.tools-hero {
  background-color: #0F1F1A;
  color: #F8FAF9;
  border-bottom: 1px solid rgba(200, 173, 114, 0.35);
  padding: clamp(1.5rem, 2.8vw, 2.25rem) 0;
}

.tools-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.tools-hero__eyebrow {
  display: inline-block;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #C8AD72;
  margin-bottom: 0.45rem;
}

.tools-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.32;
  color: #F8FAF9;
  letter-spacing: -0.02em;
}

.tools-hero__desc {
  font-size: 0.90625rem;
  color: #B7C4BE;
  margin-top: 0.45rem;
  max-width: 640px;
  line-height: 1.65;
}

.tools-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tools-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #E2EAE6;
  background-color: #162C24;
  border: 1px solid rgba(200, 173, 114, 0.32);
}

.tools-pill-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #C8AD72;
}

/* 메인 2컬럼 워크스페이스 */
.tools-canvas {
  background-color: #F3F6F5;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(3rem, 5vw, 4.5rem);
}

.tools-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .tools-shell {
    grid-template-columns: 276px minmax(0, 1fr);
    gap: 1.75rem;
  }
}

/* 좌측 정밀 네비게이션 레일 (모바일: 컴팩트 가로 스크롤 칩 바) */
.tools-rail {
  background-color: #FFFFFF;
  border: 1px solid #D8E0DC;
  padding: 0.7rem 0.75rem;
}

@media (max-width: 1023px) {
  .tools-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    padding: 0.65rem;
  }
  .tools-rail__group {
    display: contents;
  }
  .tools-rail__label {
    display: none;
  }
  .tools-rail__list {
    display: contents;
  }
  .t-nav-item {
    width: 100%;
    padding: 0.52rem 0.6rem;
    border: 1px solid #D8E0DC;
    border-left-width: 1px;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }
  .t-nav-item__icon {
    width: 22px;
    height: 22px;
    margin-top: 0;
  }
  .t-nav-item__icon svg {
    width: 13px;
    height: 13px;
  }
  .t-nav-item__sub {
    display: none;
  }
  .t-nav-item__title {
    white-space: normal;
    word-break: keep-all;
    font-size: 0.78125rem;
    line-height: 1.28;
  }
}

@media (min-width: 1024px) {
  .tools-rail {
    position: sticky;
    top: 84px;
    padding: 0.9rem 0.8rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
  .tools-rail__group + .tools-rail__group {
    margin-top: 0.75rem;
    padding-top: 0.72rem;
    border-top: 1px solid #E8EEEC;
  }
  .tools-rail__label {
    display: block;
    font-size: 0.71875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #5C6F67;
    padding: 0 0.5rem 0.35rem;
  }
  .tools-rail__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }
}

/* 13·15번 계산기 최적 하이라이트 & 위험 경고 배너 */
.t-ledger tr.t-mix-best th,
.t-ledger tr.t-mix-best td {
  background-color: #EDF6F2;
  color: #0F2B21;
  font-weight: 700;
}
.t-mix-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.42rem;
  font-size: 0.7rem;
  font-weight: 700;
  background-color: #143A2C;
  color: #E7D2A2;
  vertical-align: middle;
}
.t-hero-result--danger {
  background-color: #3B1212 !important;
  border-color: #B44141 !important;
}
.t-hero-result--danger .t-hero-result__lbl,
.t-hero-result--danger .t-hero-result__sub {
  color: #F4C8C8 !important;
}

/* 16. 진짜 내 돈 워터폴 막대 & 17. 법인전환 신호등 */
.rc-waterfall {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.rc-wf-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8125rem;
}
.rc-wf-row__lbl { color: #364B43; font-weight: 600; }
.rc-wf-row__track { height: 11px; background: #E7EEEB; position: relative; overflow: hidden; }
.rc-wf-row__bar { height: 100%; transition: width 0.25s ease; }
.rc-wf-row__val { text-align: right; font-weight: 700; color: #10241D; }

.sig-light-box {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.15rem;
  background-color: #0F231C;
  border: 1px solid #C8AD72;
  color: #F8FAF9;
}
.sig-bulbs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  background-color: #07120E;
  border: 1px solid rgba(200, 173, 114, 0.35);
  border-radius: 4px;
  flex-shrink: 0;
}
.sig-bulb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #21322B;
  opacity: 0.28;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.sig-bulb--red.is-on { background-color: #E04F4F; opacity: 1; box-shadow: 0 0 12px rgba(224, 79, 79, 0.75); }
.sig-bulb--yellow.is-on { background-color: #E8B948; opacity: 1; box-shadow: 0 0 12px rgba(232, 185, 72, 0.75); }
.sig-bulb--green.is-on { background-color: #3BB273; opacity: 1; box-shadow: 0 0 12px rgba(59, 178, 115, 0.75); }
.sig-verdict-lbl { display: block; font-size: 0.75rem; font-weight: 700; color: #DFC78E; margin-bottom: 0.2rem; }
.sig-verdict-title { display: block; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; color: #FFFFFF; line-height: 1.3; }
.sig-verdict-sub { display: block; font-size: 0.83rem; color: #C6D5CE; margin-top: 0.3rem; line-height: 1.5; }

.t-nav-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  background-color: transparent;
  color: #162922;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.t-nav-item:hover {
  background-color: #F2F6F4;
  border-color: #DCE4E0;
  border-left-color: #9BB0A6;
}

.t-nav-item.is-active {
  background-color: #0F1F1A;
  border-color: #0F1F1A;
  border-left-color: #C8AD72;
  color: #F8FAF9;
}

.t-nav-item__icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #EDF2EF;
  color: #143A2C;
  flex-shrink: 0;
  margin-top: 1px;
}

.t-nav-item.is-active .t-nav-item__icon {
  background-color: #1A332A;
  color: #C8AD72;
}

.t-nav-item__icon svg {
  width: 16px;
  height: 16px;
}

.t-nav-item__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.t-nav-item__title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
}

.t-nav-item__sub {
  font-size: 0.73rem;
  color: #5C6F67;
  line-height: 1.35;
}

.t-nav-item.is-active .t-nav-item__sub {
  color: #A8B9B1;
}

@media (max-width: 1023px) {
  .tools-rail .t-nav-item {
    width: 100%;
    padding: 0.52rem 0.6rem;
    border: 1px solid #D8E0DC;
    border-left-width: 1px;
    align-items: center;
  }
  .tools-rail .t-nav-item.is-active {
    border-color: #0F1F1A;
    border-left: 3px solid #C8AD72;
  }
  .tools-rail .t-nav-item__icon {
    width: 22px;
    height: 22px;
    margin-top: 0;
  }
  .tools-rail .t-nav-item__sub {
    display: none;
  }
  .tools-rail .t-nav-item__title {
    white-space: normal;
    word-break: keep-all;
    font-size: 0.78125rem;
  }
}

/* 우측 메인 계산기 스테이지 */
.tools-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.t-panel {
  display: none;
}

.t-panel.is-active {
  display: block;
}

.t-panel-card {
  background-color: #FFFFFF;
  border: 1px solid #D8E0DC;
}

.t-panel-head {
  padding: clamp(1.25rem, 2.4vw, 1.75rem) clamp(1.25rem, 2.6vw, 2rem);
  border-bottom: 1px solid #E6ECE9;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.t-panel-head__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #143A2C;
  background-color: #EAF1ED;
  padding: 0.22rem 0.6rem;
  margin-bottom: 0.45rem;
}

.t-panel-head__title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  font-weight: 700;
  color: #0F1F1A;
  line-height: 1.35;
}

.t-panel-head__desc {
  font-size: 0.875rem;
  color: #4A5D55;
  margin-top: 0.3rem;
}

.t-law-chip {
  font-size: 0.75rem;
  color: #3D524A;
  background-color: #F4F7F6;
  border: 1px solid #DCE4E0;
  padding: 0.4rem 0.7rem;
  line-height: 1.45;
  max-width: 340px;
}

.t-law-chip strong {
  color: #143A2C;
  margin-right: 0.3rem;
}

/* 좌측 입력 / 우측 결과 2분할 스튜디오 */
.t-studio {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .t-studio {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  }
}

.t-inputs {
  padding: clamp(1.25rem, 2.4vw, 1.9rem) clamp(1.25rem, 2.6vw, 2rem);
  border-bottom: 1px solid #E6ECE9;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .t-inputs {
    border-bottom: 0;
    border-right: 1px solid #E6ECE9;
  }
}

.t-results {
  padding: clamp(1.25rem, 2.4vw, 1.9rem) clamp(1.25rem, 2.6vw, 2rem);
  background-color: #FAFCFB;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* 세그먼트 토글 (애플·토스 스타일 깔끔한 전환) */
.t-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background-color: #EBF0EE;
  border: 1px solid #D8E1DD;
}

.t-seg-btn {
  padding: 0.56rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #465B53;
  background-color: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.t-seg-btn:hover {
  color: #0F1F1A;
}

.t-seg-btn.is-selected {
  background-color: #FFFFFF;
  color: #0F1F1A;
  border-color: #CFD9D4;
}

/* 정교한 입력 필드 + 단위 표기 + 촉각적 슬라이더 */
.t-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.t-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.t-field__head label {
  font-size: 0.84375rem;
  font-weight: 600;
  color: #2C3E37;
}

.t-field__val {
  font-size: 0.96875rem;
  font-weight: 700;
  color: #143A2C;
}

.t-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.t-input {
  width: 100%;
  padding: 0.72rem 3.2rem 0.72rem 0.9rem;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0F1F1A;
  background-color: #FFFFFF;
  border: 1.5px solid #CED8D3;
  outline: none;
  transition: border-color 0.15s ease;
}

.t-input--plain {
  padding-right: 0.9rem;
  font-size: 0.9375rem;
}

.t-input:focus {
  border-color: #143A2C;
}

.t-unit {
  position: absolute;
  right: 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #60746C;
  pointer-events: none;
}

/* 커스텀 레인지 슬라이더 */
.t-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: #DCE4E0;
  outline: none;
  margin-top: 0.15rem;
  cursor: pointer;
}

.t-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0F1F1A;
  border: 2.5px solid #C8AD72;
  cursor: pointer;
}

.t-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0F1F1A;
  border: 2.5px solid #C8AD72;
  cursor: pointer;
}

.t-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.t-preset {
  padding: 0.32rem 0.68rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #364B43;
  background-color: #F1F5F3;
  border: 1px solid #D8E1DD;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.t-preset:hover {
  background-color: #143A2C;
  border-color: #143A2C;
  color: #FFFFFF;
}

.t-select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0F1F1A;
  background-color: #FFFFFF;
  border: 1.5px solid #CED8D3;
}

.t-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .t-row-2 {
    grid-template-columns: 1fr;
  }
}

/* 우측 프라이빗 뱅킹 결과 헤더 카드 */
.t-hero-result {
  background-color: #0F1F1A;
  color: #F8FAF9;
  border: 1px solid rgba(200, 173, 114, 0.45);
  border-top: 3px solid #C8AD72;
  padding: 1.35rem 1.45rem;
}

.t-hero-result__lbl {
  display: block;
  font-size: 0.78125rem;
  font-weight: 600;
  color: #C8AD72;
  margin-bottom: 0.35rem;
}

.t-hero-result__val {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.t-hero-result__sub {
  display: block;
  font-size: 0.8125rem;
  color: #C0CEC7;
  margin-top: 0.5rem;
  line-height: 1.58;
}

.t-dual-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.45rem 0 0.35rem;
}

@media (min-width: 560px) {
  .t-dual-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.t-dual-item {
  background-color: #162B23;
  border: 1px solid rgba(200, 173, 114, 0.35);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.t-dual-item--div {
  border-color: rgba(200, 173, 114, 0.65);
}

.t-dual-item__k {
  font-size: 0.72rem;
  font-weight: 700;
  color: #C8AD72;
}

.t-dual-item .t-hero-result__val {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.3;
}

/* 시각 비례 바 / 스택 차트 */
.t-chart-card {
  background-color: #FFFFFF;
  border: 1px solid #DEE6E2;
  padding: 1rem 1.15rem;
}

.t-chart-card__title {
  font-size: 0.78125rem;
  font-weight: 700;
  color: #465B53;
  margin-bottom: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.t-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.t-bar-row + .t-bar-row {
  margin-top: 0.65rem;
}

.t-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1F322B;
}

.t-bar-track {
  height: 12px;
  background-color: #EDF2F0;
  overflow: hidden;
}

.t-bar-fill {
  height: 100%;
  transition: width 0.25s ease;
}

.t-bar-fill--dark { background-color: #143A2C; }
.t-bar-fill--brass { background-color: #B49452; }
.t-bar-fill--slate { background-color: #6B7F77; }
.t-bar-fill--teal { background-color: #2A6E56; }

/* 4분할 인건비 스택 바 */
.t-stack-bar {
  display: flex;
  height: 16px;
  overflow: hidden;
  background-color: #EDF2F0;
  gap: 2px;
}

.t-stack-seg {
  height: 100%;
  transition: width 0.25s ease;
}

.t-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #42564E;
}

.t-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.t-legend-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
}

/* 청년 나이 게이지 (만 34세 기준선) */
.t-gauge-wrap {
  position: relative;
  padding-top: 1.4rem;
}

.t-gauge-limit {
  position: absolute;
  top: 0;
  left: 68%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #143A2C;
}

.t-gauge-track {
  position: relative;
  height: 14px;
  background-color: #E8EEEC;
}

.t-gauge-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 68%;
  width: 2px;
  background-color: #0F1F1A;
  z-index: 2;
}

/* KPI 3열 요약 스트립 */
.t-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 520px) {
  .t-kpi-strip {
    grid-template-columns: 1fr;
  }
}

.t-kpi {
  background-color: #FFFFFF;
  border: 1px solid #DEE6E2;
  padding: 0.75rem 0.85rem;
}

.t-kpi span {
  display: block;
  font-size: 0.72rem;
  color: #5C6F67;
  margin-bottom: 0.2rem;
}

.t-kpi strong {
  font-size: 0.96875rem;
  color: #0F1F1A;
}

/* 정갈한 명세표 */
.t-ledger-wrap {
  background-color: #FFFFFF;
  border: 1px solid #DEE6E2;
  overflow-x: auto;
}

.t-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84375rem;
}

.t-ledger thead th {
  text-align: left;
  padding: 0.72rem 0.95rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4D6058;
  background-color: #F4F7F6;
  border-bottom: 1px solid #DEE6E2;
}

.t-ledger tbody th,
.t-ledger tbody td {
  padding: 0.68rem 0.95rem;
  border-bottom: 1px solid #EEF2F0;
  color: #1D3028;
}

.t-ledger tbody th {
  font-weight: 500;
  text-align: left;
  color: #3D5048;
}

.t-ledger .num-cell {
  text-align: right;
  white-space: nowrap;
}

.t-ledger tr.t-ledger-total th,
.t-ledger tr.t-ledger-total td {
  background-color: #F2F6F4;
  border-top: 1.5px solid #143A2C;
  border-bottom: 0;
  font-weight: 700;
  color: #0F1F1A;
}

/* 손진호 세무사 실무 체크 */
.t-tip {
  background-color: #F4F7F6;
  border-left: 3px solid #C8AD72;
  padding: 0.95rem 1.05rem;
  font-size: 0.84375rem;
  color: #384B43;
  line-height: 1.65;
}

.t-tip__head {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0F1F1A;
  margin-bottom: 0.3rem;
}

.t-tip p strong {
  color: #0F1F1A;
  font-weight: 700;
}

/* 액션 버튼 바 */
.t-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.t-disclaimer {
  background-color: #FFFFFF;
  border: 1px solid #D8E0DC;
  padding: 0.95rem 1.2rem;
  font-size: 0.8125rem;
  color: #4C5F57;
  line-height: 1.62;
}


/* v3.2 세금계산기 10종 유틸리티 버튼(링크 공유 · PDF 인쇄) & A4 인쇄 전용 스타일 */
.tools-util-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.78rem;
  font-size: 0.78125rem;
  font-weight: 700;
  color: #0F1F1A;
  background-color: #C8AD72;
  border: 1px solid #C8AD72;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tools-util-btn:hover {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
}

@media print {
  .site-header,
  .tools-rail,
  .mobile-sticky-cta,
  .site-footer,
  .t-actions,
  .t-presets,
  .tools-hero__badges,
  .t-range {
    display: none !important;
  }
  .tools-hero {
    background: #FFFFFF !important;
    color: #111C18 !important;
    border-bottom: 2px solid #143A2C !important;
    padding: 0.75rem 0 !important;
  }
  .tools-hero__title,
  .tools-hero__eyebrow,
  .tools-hero__desc {
    color: #111C18 !important;
  }
  .tools-canvas {
    background: #FFFFFF !important;
    padding: 1rem 0 !important;
  }
  .tools-shell {
    display: block !important;
  }
  .t-panel-card {
    border: 1px solid #CFD7D3 !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   v3 사례 기반 시뮬레이터 (18~20번) 비교 막대·경고 배지·최적 행 하이라이트
   ========================================================================== */
.t-nav-item__badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.36rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #0F1F1A;
  background-color: #C8AD72;
  vertical-align: middle;
}

.case-scenario-box {
  background-color: #F4F7F5;
  border: 1px solid #D8E1DD;
  border-left: 3px solid #143A2C;
  padding: 0.85rem 1rem;
  font-size: 0.84375rem;
  color: #2C3E37;
  line-height: 1.62;
}

.case-scenario-box strong {
  color: #0F1F1A;
}

.case-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.case-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.case-bar-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.case-bar-row__name {
  font-weight: 700;
  color: #1A2B24;
}

.case-bar-row__name.is-best {
  color: #143A2C;
}

.case-bar-row__val {
  font-weight: 700;
  color: #143A2C;
}

.case-bar-track {
  width: 100%;
  height: 12px;
  background-color: #EBF0EE;
  overflow: hidden;
  display: flex;
}

.case-bar-seg {
  height: 100%;
  transition: width 0.25s ease;
}

.case-bar-seg--forest { background-color: #143A2C; }
.case-bar-seg--gold   { background-color: #C8AD72; }
.case-bar-seg--slate  { background-color: #6B7F77; }
.case-bar-seg--warn   { background-color: #A64438; }

.case-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: #4C5F57;
}

.case-bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.case-bar-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
}

.case-alert-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.case-alert {
  padding: 0.68rem 0.9rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  border: 1px solid #E5D4B3;
  background-color: #FBF8F1;
  color: #3E331B;
}

.case-alert--danger {
  border-color: #E3C2BE;
  background-color: #FDF5F4;
  color: #5C221B;
}

.t-ledger tr.is-best-row {
  background-color: #EFF5F2;
}

.t-ledger tr.is-best-row th,
.t-ledger tr.is-best-row td {
  font-weight: 700;
  color: #0F1F1A;
}

.t-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 560px) {
  .t-kpi-row {
    grid-template-columns: 1fr;
  }
}

.t-ledger--compact {
  width: 100%;
  table-layout: fixed;
}

.t-ledger--compact th,
.t-ledger--compact td {
  padding: 0.52rem 0.4rem;
  font-size: 0.76rem;
  line-height: 1.4;
  word-break: keep-all;
}

.t-ledger--compact th:first-child {
  width: 28%;
}

.t-ledger--compact td.num-cell,
.t-ledger--compact th.num-cell {
  white-space: nowrap;
  font-size: 0.75rem;
}

.t-segmented--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 560px) {
  .t-segmented--3 {
    grid-template-columns: 1fr;
  }
}
