@charset "UTF-8";

/* ==========================================================================
   loss-simulator (거래처 소통 손실 계산기) — style.css
   톤은 구독 플랜·보안 페이지(docs/pricing/style.css, docs/security/style.css)를 따른다 —
   웜 오프화이트 배경, 1px 선(--line)으로 나눈 카드, 장식 없는 단색 제목, 알약형 검정 버튼. 보라색은 쓰지 않는다.
   GNB·푸터는 공통 /assets/gnb-footer.css가 맡는다 (GNB fixed 70px).
   ========================================================================== */

:root {
  --gray03: #e4e5e9;
  --gray04: #8d96a1;
  --gray06: #556372;
  --gray08: #3c4651;
  --gray10: #242a30;
  --gray10-rgb: 36, 42, 48;
  --white: #ffffff;
  --primary: #111111;
  --bg: #fdfcfc;
  --line: #eeedec;
  --gnb-height: 70px;
  --max: 1180px;
  /* 입력 칸 (재무 모델의 입력 셀 관례: 파란 글자) */
  --input-ink: #2161dc; /* blue-06 */
  --input-bg: #f3f7fe;
  --input-line: #bcd0f5;
  /* 결과 시트 */
  --sheet-bar: #fafafa;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    'Pretendard Variable',
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    Roboto,
    'Helvetica Neue',
    'Segoe UI',
    'Apple SD Gothic Neo',
    'Noto Sans KR',
    'Malgun Gothic',
    sans-serif;
  color: var(--gray10);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.loss {
  padding-top: var(--gnb-height);
  overflow-x: clip;
}

.ls-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   버튼 (구독 플랜 .pr-btn과 같은 계열)
   ========================================================================== */

.ls-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.2px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.ls-btn--primary {
  background: var(--primary);
  color: var(--white);
}

.ls-btn--primary:hover {
  background: var(--gray08);
}

.ls-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.ls-hero {
  padding: 72px 24px 24px;
  text-align: center;
}

.ls-hero__inner {
  max-width: 800px;
  margin: 0 auto;
}

.ls-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray06);
}

.ls-hero__title span,
.ls-hero__desc span {
  display: block;
}

.ls-hero__title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.ls-hero__desc {
  max-width: 600px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray06);
}

/* ==========================================================================
   계산기 — 데스크톱 좌 입력 / 우 결과, 모바일은 입력 아래 결과
   ========================================================================== */

.ls-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.ls-sim {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px;
  align-items: start;
}

/* ---------- 단계 머리 (STEP 1 입력 → STEP 2 결과) ---------- */

.ls-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.ls-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 0 4px;
}

.ls-step__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ls-results.is-locked .ls-step__badge {
  background: var(--white);
  color: var(--gray06);
  box-shadow: inset 0 0 0 1px var(--gray03);
}

.ls-step__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.4px;
}

.ls-step__sub {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray06);
}

.ls-results:focus {
  outline: none;
}

/* 계산 후 결과로 스크롤할 때 고정된 공지 띠·GNB에 가리지 않게 한다 */
.ls-results {
  scroll-margin-top: calc(var(--jn-header-offset, var(--gnb-height)) + 16px);
}

.ls-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

.ls-inputs {
  padding: 8px 28px 28px;
}

/* ---------- 계산 버튼 ---------- */

.ls-submit {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.ls-submit__btn {
  width: 100%;
  gap: 10px;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.ls-submit__icon {
  font-size: 14px;
}

.ls-submit__hint {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  color: var(--gray06);
}

/* 결과가 열린 뒤에는 입력이 바로 반영되므로 계산 버튼을 보조 표현으로 낮춘다 */
.ls-sim:has(.ls-results.is-revealed) .ls-submit__btn {
  background: var(--white);
  color: var(--gray10);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ---------- 입력 한 줄: 라벨 + 숫자 칸 / 슬라이더 / 범위 ---------- */

.ls-field {
  padding: 22px 0 20px;
  border-top: 1px solid var(--line);
}

.ls-field:first-of-type {
  border-top: 0;
}

.ls-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ls-field__label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gray10);
}

.ls-field__value {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  margin-left: auto; /* 라벨이 길어 줄이 바뀌어도 숫자 칸은 오른쪽에 둔다 */
  padding: 0 14px 0 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--input-bg);
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
  cursor: text;
}

.ls-field__value:hover {
  border-color: var(--input-line);
}

.ls-field__value:focus-within {
  border-color: var(--input-ink);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(33, 97, 220, 0.14);
}

.ls-num {
  width: 104px;
  padding: 9px 0 9px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: right;
  color: var(--input-ink);
  font-variant-numeric: tabular-nums;
}

.ls-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--input-ink);
  white-space: nowrap;
}

.ls-field__range {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray04);
  font-variant-numeric: tabular-nums;
}

/* ---------- 슬라이더 (채움 비율은 script.js가 --fill로 넣는다) ---------- */

.ls-range {
  --fill: 50%;
  display: block;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.ls-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--input-ink) var(--fill), var(--gray03) var(--fill));
}

.ls-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--gray03);
}

.ls-range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--input-ink);
}

.ls-range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 2px solid var(--input-ink);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  -webkit-appearance: none;
  appearance: none;
}

.ls-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--input-ink);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ls-range:focus-visible {
  outline: 2px solid var(--input-ink);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- 결과 카드 2장 ---------- */

.ls-results {
  gap: 16px;
}

/* ---------- 잠금 (계산 전) ---------- */

.ls-cards-wrap {
  position: relative;
}

.ls-results.is-locked .ls-card__amount > *,
.ls-results.is-locked .ls-card__meta {
  filter: blur(8px);
  opacity: 0.7;
  user-select: none;
}

.ls-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 20px;
  /* 카드 윤곽은 보이게 두고(결과가 이 자리에 나온다는 인지), 숫자는 아래 blur가 가린다 */
  background: radial-gradient(closest-side, rgba(253, 252, 252, 0.92), rgba(253, 252, 252, 0.45));
  text-align: center;
}

.ls-lock[hidden] {
  display: none;
}

.ls-lock__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--white);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 16px;
  color: var(--gray10);
}

.ls-lock__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.3px;
}

.ls-lock__desc {
  margin-top: 4px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray06);
}

.ls-lock__btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* 계산 전에는 결과를 전제로 한 CTA를 숨긴다 */
.ls-results.is-locked .ls-cta {
  display: none;
}

/* ---------- 열림·갱신 ---------- */

@keyframes ls-reveal {
  from {
    filter: blur(7px);
    opacity: 0.55;
  }
  to {
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes ls-flash {
  0% {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
  }
  100% {
    border-color: var(--line);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0);
  }
}

.ls-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ls-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
}

.ls-card__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.4px;
}

/* ---------- 결과 시트: 수식 입력줄(fx) + 결과 셀 ----------
   수식 속 입력값은 입력 칸과 같은 파란 글자(script.js가 data-in 갱신), 결과는 검정 테두리의 선택된 셀로 보인다. */

.ls-sheet {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.ls-sheet__bar {
  display: flex;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--sheet-bar);
  font-size: 12px;
  letter-spacing: -0.2px;
  line-height: 1.55;
  color: var(--gray06);
}

.ls-sheet__fx {
  flex-shrink: 0;
  font-style: italic;
  font-weight: 600;
  color: var(--gray04);
}

.ls-sheet__formula {
  min-width: 0;
}

.ls-sheet__formula b {
  font-weight: 700;
  color: var(--input-ink);
}

/* 선택된 셀: 검정 테두리 + 오른쪽 아래 채우기 핸들, 숫자는 오른쪽 정렬 */
.ls-sheet__cell {
  position: relative;
  padding: 16px 18px 14px;
  border-radius: 0 0 11px 11px;
  box-shadow: inset 0 0 0 2px var(--gray10);
  background: var(--white);
  text-align: right;
}

.ls-sheet__cell::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 6px;
  height: 6px;
  background: var(--gray10);
}

.ls-results.is-locked .ls-sheet__cell {
  box-shadow: none;
}

.ls-results.is-locked .ls-sheet__cell::after {
  display: none;
}

.ls-card__amount {
  margin-top: 0;
  font-size: clamp(28px, 2.9vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ls-sheet__cell.is-long {
  font-size: clamp(22px, 2.1vw, 28px);
}

.ls-card__prefix {
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gray06);
}

.ls-card__meta {
  margin-top: 10px;
  margin-bottom: 24px; /* 근거 구분선(margin-top: auto)과의 최소 간격 */
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray08);
  font-variant-numeric: tabular-nums;
}

.ls-card__basis {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray06);
}

.ls-card__basis a {
  color: var(--gray10);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(var(--gray10-rgb), 0.3);
}

.ls-card__basis a:hover {
  text-decoration-color: currentColor;
}

.ls-card__basis a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- CTA: 결과가 열린 뒤 나타나며, 방문자의 숫자를 문구에 다시 보여준다 ---------- */

.ls-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
}

.ls-cta__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

.ls-cta__title span {
  white-space: nowrap;
}

.ls-cta__desc {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
}

.ls-btn--light {
  flex-shrink: 0;
  background: var(--white);
  color: var(--gray10);
}

.ls-btn--light:hover {
  background: #ececec;
}

.ls-btn--light:focus-visible {
  outline-color: var(--white);
}

@media (prefers-reduced-motion: no-preference) {
  .ls-results.is-revealed .ls-cta {
    animation: ls-rise 420ms ease-out both;
    animation-delay: 160ms;
  }
}

@keyframes ls-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 모바일 결과 바 (데스크톱에서는 결과가 옆에 고정돼 있어 쓰지 않는다) ---------- */

.ls-dock {
  display: none;
}

/* ---------- 각주 ---------- */

.ls-footnote {
  max-width: 820px;
  margin-top: 40px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray06);
}

/* ==========================================================================
   반응형
   ========================================================================== */

/* 데스크톱: 입력을 움직이는 동안 결과가 화면에 머문다 */
@media screen and (min-width: 1001px) and (min-height: 760px) {
  .ls-results {
    position: sticky;
    top: calc(var(--jn-header-offset, var(--gnb-height)) + 24px);
  }
}

@media screen and (max-width: 1000px) {
  .ls-sim {
    grid-template-columns: 1fr;
  }

  /* 계산 전: 카드가 세로로 길게 쌓이면 잠금 안내가 카드 제목과 겹친다.
     결과 셀만 남겨 짧게 만들고, 덮개를 더 불투명하게 한다 */
  .ls-results.is-locked .ls-card__meta,
  .ls-results.is-locked .ls-card__basis {
    display: none;
  }

  .ls-results.is-locked .ls-card {
    padding-bottom: 20px;
  }

  .ls-results.is-locked .ls-lock {
    background: rgba(253, 252, 252, 0.86);
  }

  .ls-dock:not([hidden]) {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 0;
    border-radius: 16px;
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
  }

  .ls-dock__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .ls-dock__label {
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
  }

  .ls-dock__value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .ls-dock__go {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
  }

  .ls-dock:focus-visible {
    outline: 2px solid var(--input-ink);
    outline-offset: 2px;
  }
}

@media screen and (max-width: 640px) {
  .ls-hero {
    padding: 36px 16px 4px;
  }

  .ls-eyebrow {
    margin-bottom: 10px;
    font-size: 13px;
  }

  /* 첫 화면에 입력이 보이도록 히어로 설명을 한 문장으로 줄인다 (두 결과는 STEP 2가 설명한다) */
  .ls-hero__more {
    display: none !important;
  }

  .ls-hero__title {
    margin-bottom: 14px;
    font-size: clamp(26px, 7.5vw, 30px);
  }

  .ls-hero__desc {
    max-width: 400px;
    font-size: 16px;
    text-wrap: pretty;
  }

  .ls-hero__desc span {
    display: inline;
  }

  .ls-section {
    padding: 28px 16px 72px;
  }

  .ls-field {
    padding: 16px 0 14px;
  }

  .ls-field__head {
    margin-bottom: 8px;
  }

  .ls-field__range {
    margin-top: 4px;
  }

  .ls-num {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .ls-submit {
    padding-top: 18px;
  }

  .ls-card__title {
    font-size: 17px;
  }

  .ls-card__basis {
    padding-top: 16px;
    font-size: 12.5px;
  }

  .ls-card__meta {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .ls-inputs {
    padding: 4px 20px 20px;
  }

  .ls-step {
    min-height: 0;
  }

  .ls-step__title {
    font-size: 18px;
  }

  .ls-cards {
    grid-template-columns: 1fr;
  }

  .ls-card {
    padding: 24px 20px 20px;
  }

  .ls-card__amount {
    font-size: 28px;
  }

  .ls-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px 20px 20px;
  }

  .ls-cta__title {
    font-size: 16px;
  }

  .ls-btn {
    width: 100%;
    white-space: normal;
  }

  .ls-lock__btn {
    width: auto;
  }

  .ls-num {
    width: 84px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ls-btn {
    transition:
      background-color 160ms ease,
      color 160ms ease;
  }

  .ls-results.is-revealed .ls-card__amount > *,
  .ls-results.is-revealed .ls-card__meta {
    animation: ls-reveal 360ms ease-out;
  }

  .ls-card.is-updated {
    animation: ls-flash 700ms ease-out;
  }
}
