@import url('https://cdnjs.cloudflare.com/ajax/libs/pretendard/1.3.9/static/pretendard.min.css');

/* ---------------------------------------------------------
   토큰
   subject: 재산·소득의 "기준선"을 넘는지 확인하는 계기판
   --------------------------------------------------------- */
:root{
  --ink:        #1E2A26;
  --ink-soft:   #4A5750;
  --paper:      #EEF1EC;
  --paper-card: #FBFCFA;
  --line:       #D7DCD3;

  --brand:      #2F5D50;   /* 구조/헤더 */
  --brand-deep: #203E36;

  --pass:       #3E7C5A;   /* 자격유지 */
  --pass-bg:    #E4EFE7;
  --fail:       #A64A34;   /* 자격상실 */
  --fail-bg:    #F5E7E2;

  --mark:       #B9862E;   /* 기준선 마커 */

  --radius: 10px;
  --font-display: 'Noto Serif KR', serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'IBM Plex Mono', 'Pretendard', monospace;
}

@font-face{
  font-family: 'Noto Serif KR';
  src: local('Noto Serif KR');
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap{
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* ---------------- Hero ---------------- */
.hero{
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.eyebrow{
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 10px;
  font-weight: 600;
}
.hero h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.35;
  margin: 0 0 14px;
  color: var(--brand-deep);
}
.hero .lede{
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.hero .lede strong{ color: var(--ink); }

/* ---------------- Cards ---------------- */
.card{
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 16px;
}
.card h2{
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 16px;
  color: var(--brand-deep);
}
.details-card summary{
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--brand-deep);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.details-card summary::-webkit-details-marker{ display:none; }
.details-card summary::before{
  content: '+';
  font-family: var(--font-num);
  font-size: 18px;
  color: var(--brand);
  width: 20px;
}
.details-card[open] summary::before{ content: '–'; }
.details-card[open] summary{ margin-bottom: 16px; }

/* ---------------- Fields ---------------- */
.field{ margin-bottom: 18px; }
.field:last-child{ margin-bottom: 0; }
label{
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
label.mt{ margin-top: 14px; }
input[type="number"], select{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--ink);
}
input[type="number"]:focus, select:focus, .toggle-btn:focus-visible, button:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.hint{
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 6px 0 0;
}
.notice{
  background: #FBF3E6;
  border: 1px solid #E9CE9B;
  color: #6B4E1E;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 4px 0 16px;
}

.check-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.check{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
}
.check input{ width: 16px; height: 16px; accent-color: var(--brand); }

.toggle-group{ display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-btn{
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.toggle-btn.active{
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.cta{
  width: 100%;
  padding: 15px;
  background: var(--brand-deep);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.cta:hover{ background: var(--brand); }

.hidden{ display: none !important; }

/* ---------------- Result ---------------- */
.result{
  margin-top: 28px;
  padding-top: 8px;
}
.verdict{
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.verdict.pass{ background: var(--pass-bg); border: 1px solid var(--pass); }
.verdict.fail{ background: var(--fail-bg); border: 1px solid var(--fail); }
.verdict-badge{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.verdict.pass .verdict-badge{ color: var(--pass); }
.verdict.fail .verdict-badge{ color: var(--fail); }
.verdict-sub{ font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* ---- 기준선 게이지 (시그니처 요소) ---- */
.gauge-block{ margin-bottom: 26px; }
.gauge-title{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.gauge-title h3{
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0;
}
.gauge-title .gauge-value{
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
}
.gauge-track{
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(to right, var(--pass) 0%, var(--pass) var(--zone1, 60%), var(--mark) var(--zone1, 60%), var(--mark) var(--zone2, 85%), var(--fail) var(--zone2, 85%), var(--fail) 100%);
  margin: 0 0 6px;
}
.gauge-marker{
  position: absolute;
  top: -6px;
  width: 3px;
  height: 26px;
  background: var(--ink);
  border-radius: 2px;
  transform: translateX(-50%);
}
.gauge-marker::after{
  content: attr(data-label);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-num);
  font-size: 10.5px;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
}
.gauge-ticks{
  position: relative;
  height: 14px;
}
.gauge-tick{
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--ink-soft);
  font-family: var(--font-num);
  white-space: nowrap;
}

.reasons{
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.reasons h3{
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0 0 10px;
}
.reasons ul{ margin: 0; padding-left: 18px; }
.reasons li{ margin-bottom: 6px; font-size: 14px; }

.next-step{
  background: var(--brand-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14px;
}
.next-step a{ color: #fff; font-weight: 700; }
.next-step p{ margin: 0 0 8px; }
.next-step p:last-child{ margin-bottom: 0; }

.spouse-result{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

/* ---------------- Disclaimer ---------------- */
.disclaimer{
  margin-top: 32px;
  font-size: 11.5px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

@media (max-width: 420px){
  .check-grid{ grid-template-columns: 1fr; }
}
