/* =========================================================
   DOOITSURVEY — SUB PAGES UNIFIED SKIN (single body class)
   Scope: body.sub-page only
   How to use: <body class="sub-page"> on ALL sub pages
======================================================== */

/* ============ Root tokens ============ */
:root{
  --brand:#1c55ff; --text:#333; --text-strong:#222; --muted:#6b7280; --accent:#ff7a00;
  --chip-bg:#f7f7f9; --chip-border:#e5e7eb; --chip-hover-bg:#f2f4f8; --chip-hover-border:#d7dbe3;
  --chip-active-bg:#eef2ff; --chip-active-border:#c6cff7; --chip-active-text:#133aa6;
  --control-h:44px; --radius:12px; --ring:0 0 0 3px rgba(28,85,255,.15);
  --ink-1:#0f172a; --ink-2:#334155; --ink-3:#64748b; --ink-500:#64748b; --ink-700:#1f2937; --ink-900:#0f172a;
  --border:#e5e7eb; --surface:#fff; --bg-soft:#f8fafc; --line:#e5e7eb;
}

/* ============ Base ============ */
body.sub-page{ color:var(--text); line-height:1.6; overflow-x:hidden; background:#fff; }
body.sub-page .container{ max-width:1400px; margin:0 auto; padding:0 20px; }

/* ---------- Common Sub Hero ---------- */
body.sub-page .sub-hero{
  padding:100px 20px 80px; text-align:center; color:#fff;
  background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
}
body.sub-page .sub-hero__title, body.sub-page .sub-hero h1{ font-size:42px; font-weight:800; margin:0 0 12px; }
body.sub-page .sub-hero__desc, body.sub-page .sub-hero p{ font-size:18px; opacity:.9; margin:0; }
@media (max-width:768px){
  body.sub-page .sub-hero{ padding:72px 16px 56px; }
  body.sub-page .sub-hero__title, body.sub-page .sub-hero h1{ font-size:32px; }
  body.sub-page .sub-hero__desc, body.sub-page .sub-hero p{ font-size:16px; }
}

/* ---------- Helpers ---------- */
body.sub-page .container-narrow{ max-width:880px; margin:0 auto; padding:0 16px; }
.input-400{ width:400px; max-width:100%; padding:12px 14px; border:1px solid var(--border); border-radius:8px; font-size:16px; background:#fff; transition:border-color .2s, box-shadow .2s; }
.input-400:focus{ border-color:var(--brand); box-shadow:var(--ring); outline:none; }
.choice-inline{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.choice-inline label{ display:inline-flex; align-items:center; gap:8px; font-size:16px; }
.choice-inline input[type="radio"], .choice-inline input[type="checkbox"]{ width:18px; height:18px; accent-color:var(--brand); }
.btn-44{ display:inline-flex; align-items:center; justify-content:center; min-width:80px; height:44px; padding:0 18px; font-size:14px; font-weight:600; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--ink-1); transition:all .2s; cursor:pointer; }
.btn-44:hover{ background:var(--bg-soft); }
.btn-44.primary{ background:var(--brand); border-color:var(--brand); color:#fff; }
.btn-44.primary:hover{ filter:brightness(.95); }
.btn-44.ghost{ background:#fff; color:var(--ink-1); }
.inline-inputs{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.w-80{ width:80px!important; } .w-90{ width:90px!important; } .w-100{ width:100px!important; } .w-200{ width:200px!important; }

/* ---------- Unified Controls ---------- */
body.sub-page input[type="text"],
body.sub-page input[type="password"],
body.sub-page input[type="email"],
body.sub-page input[type="number"]{
  width:100%; max-width:640px; height:var(--control-h);
  padding:0 14px; border:1px solid var(--chip-border); border-radius:var(--radius);
  font-size:16px; background:#fff; transition:border-color .2s, box-shadow .2s;
}
body.sub-page textarea{
  width:100%; min-height:160px; padding:14px 16px; border:1px solid var(--chip-border); border-radius:8px;
  font-size:16px; background:#fff; transition:border-color .2s, box-shadow .2s; resize:vertical;
}
body.sub-page input:focus, body.sub-page textarea:focus{ outline:none; border-color:var(--brand); box-shadow:var(--ring); }
body.sub-page select{
  appearance:none; height:var(--control-h); padding:0 42px 0 14px; border:1px solid var(--chip-border); border-radius:var(--radius);
  font-size:16px; color:var(--text-strong); background:#fff;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'><path d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/></svg>");
  background-repeat:no-repeat; background-position:right 14px center; background-size:16px 16px; transition:border-color .2s, box-shadow .2s;
}
body.sub-page select:focus{ outline:none; border-color:var(--brand); box-shadow:var(--ring); }
body.sub-page select:disabled{ background:#f3f4f6; color:#9ca3af; cursor:not-allowed; }

/* ---------- Chip style radios/checkboxes ---------- */
body.sub-page .chip-group, body.sub-page .service-list, body.sub-page .inline-options{
  display:flex; flex-wrap:wrap; gap:12px; align-items:center;
}
body.sub-page .chip, body.sub-page .service-item, body.sub-page .inline-options label{
  display:inline-flex; align-items:center; gap:10px; padding:10px 16px; height:var(--control-h);
  border:1px solid var(--chip-border); border-radius:9999px; background:var(--chip-bg); color:var(--text-strong);
  font-size:16px; font-weight:700; line-height:1; cursor:pointer; user-select:none;
  transition:background .15s, border-color .15s, box-shadow .15s;
}
body.sub-page .chip:hover, body.sub-page .service-item:hover, body.sub-page .inline-options label:hover{
  background:var(--chip-hover-bg); border-color:var(--chip-hover-border);
}
body.sub-page .chip input[type="radio"], 
body.sub-page .chip input[type="checkbox"],
body.sub-page .service-item input[type="radio"], 
body.sub-page .service-item input[type="checkbox"],
body.sub-page .inline-options input[type="radio"], 
body.sub-page .inline-options input[type="checkbox"]{
  width:18px; height:18px; margin:0; flex-shrink:0; accent-color:var(--brand);
}
body.sub-page .chip:has(input:checked),
body.sub-page .service-item:has(input:checked),
body.sub-page .inline-options label:has(input:checked){
  border-color:var(--chip-active-border); background:var(--chip-active-bg); color:var(--chip-active-text);
  box-shadow:0 6px 18px rgba(28,85,255,.12);
}

/* ---------- Card ---------- */
body.sub-page .card{ background:#fff; border-radius:16px; box-shadow:0 6px 18px rgba(0,0,0,.06); border:1px solid rgba(0,0,0,.06); overflow:hidden; }
body.sub-page .card-header{ padding:20px 24px 0; }
body.sub-page .card-title{ font-size:20px; font-weight:700; margin:0 0 8px; letter-spacing:-.2px; }
body.sub-page .card-body{ padding:20px 24px 28px; line-height:1.75; font-size:15px; color:#222; }
body.sub-page .card hr{ border:0; height:1px; background:#eee; margin:20px 0; }

/* ======================================================
   PAGE SECTIONS (컴포넌트 기반: 바디 클래스 추가 없이 섹션만 쓰면 됨)
====================================================== */

/* JOIN */
body.sub-page .page-banner{ background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); padding:60px 0; text-align:center; color:#fff; }
body.sub-page .page-banner h1{ font-size:42px; font-weight:800; margin:0 0 10px; }
body.sub-page .join-section{ padding:80px 0; max-width:900px; margin:0 auto; }
body.sub-page .section-title{ font-size:24px; font-weight:800; color:#333; margin-bottom:30px; padding-bottom:15px; border-bottom:2px solid var(--brand); }
body.sub-page .form-group{ background:#fff; border-radius:15px; padding:40px; margin-bottom:30px; box-shadow:0 2px 10px rgba(0,0,0,.08); }
body.sub-page .checkbox-group{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
body.sub-page .btn-submit{ width:200px; padding:15px 0; background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:#fff; border:none; border-radius:30px; font-size:18px; font-weight:700; cursor:pointer; transition:all .3s; margin:40px auto 0; display:block; }
body.sub-page .btn-submit:hover{ transform:translateY(-2px); box-shadow:0 10px 30px rgba(102,126,234,.4); }
@media (max-width:768px){ body.sub-page .form-group{ padding:20px; } body.sub-page .btn-submit{ width:100%; } }

/* RESULT LIST */
body.sub-page .issue-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:20px; }
body.sub-page .issue-row{
  display:flex; gap:16px; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden;
  box-shadow:0 6px 24px rgba(0,0,0,.06); padding:12px; transition:box-shadow .2s, transform .1s;
}
body.sub-page .issue-row:hover{ box-shadow:0 10px 30px rgba(2,6,23,.10); transform:translateY(-1px); }
body.sub-page .issue-row .thumb{ flex:0 0 280px; display:block; border-radius:8px; overflow:hidden; background:var(--bg-soft); }
body.sub-page .issue-row .thumb img{ width:100%; height:100%; object-fit:cover; aspect-ratio:4/3; display:block; }
body.sub-page .issue-row .body{ flex:1; display:flex; flex-direction:column; gap:6px; }
body.sub-page .issue-row .title{ font-size:18px; font-weight:700; margin:0; line-height:1.35; }
body.sub-page .issue-row .title a{ color:var(--ink-1); text-decoration:none; }
body.sub-page .issue-row .title a:hover{ text-decoration:underline; }
body.sub-page .issue-row .meta{ display:flex; flex-wrap:wrap; gap:14px; font-size:13px; color:var(--ink-3); margin-top:8px; margin-bottom:2px; list-style:none; padding:0; }
@media (max-width:1024px){ body.sub-page .issue-row .thumb{ flex-basis:220px; } }
@media (max-width:768px){ body.sub-page .issue-row{ flex-direction:column; } body.sub-page .issue-row .thumb img{ aspect-ratio:16/9; } }

/* CONTACT */
body.sub-page .form-section{ padding:80px 0; background:#f8f9fa; }
body.sub-page .form-box{ background:#fff; border-radius:20px; padding:50px; max-width:900px; margin:0 auto; box-shadow:0 5px 25px rgba(0,0,0,.08); }
body.sub-page .form-box h2{ font-size:28px; margin-bottom:40px; text-align:center; font-weight:800; }
body.sub-page .form-label{ display:block; font-weight:700; margin-bottom:10px; font-size:16px; }
body.sub-page .file-box{ border:2px dashed var(--brand); padding:20px; border-radius:12px; background:#f0f5ff; }
@media (max-width:768px){ body.sub-page .form-box{ padding:30px 20px; border-radius:16px; } }

/* PRICING */
body.sub-page .pricing-section{ padding:80px 0; }
body.sub-page .pricing-section .section-title{ text-align:center; font-size:28px; margin-bottom:30px; font-weight:700; }
body.sub-page table.pricing{ width:100%; border-collapse:collapse; background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 4px 20px rgba(0,0,0,.05); margin-bottom:40px; }
body.sub-page table.pricing th, body.sub-page table.pricing td{ padding:14px 18px; border-bottom:1px solid #eee; text-align:center; font-size:15px; }
body.sub-page table.pricing th{ background:#f0f4ff; font-weight:700; }
body.sub-page .total-price{ font-size:22px; font-weight:800; color:var(--brand); text-align:right; margin-top:20px; }
@media (max-width:768px){ body.sub-page .pricing-section{ padding:56px 0; } body.sub-page table.pricing th, body.sub-page table.pricing td{ padding:12px; font-size:14px; } }

/* AUTH (login/register) */
body.sub-page .stacked-inputs{ border:1px solid #e5e7eb; border-radius:16px; overflow:hidden; background:#fff; }
body.sub-page .stacked-inputs .stack-item{ position:relative; display:flex; align-items:center; }
body.sub-page .stacked-inputs .stack-item + .stack-item{ border-top:1px solid #eef0f5; }
body.sub-page .stacked-inputs input{ width:100%; height:56px; border:0; padding:0 48px 0 16px; font-size:17px; background:#fff; }
body.sub-page .icon-btn{ position:absolute; right:10px; top:50%; transform:translateY(-50%); width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; border:0; background:#f1f3f9; color:#6b7280; cursor:pointer; font-size:14px; }
body.sub-page .btn-primary.lg{ height:56px; min-width:180px; padding:0 24px; background:#1c55ff; color:#fff; border:none; border-radius:12px; font-weight:800; font-size:18px; box-shadow:0 10px 24px rgba(28,85,255,.25); transition:transform .12s, box-shadow .2s, background .2s; }
body.sub-page .btn-primary.lg:hover{ background:#1243d6; transform:translateY(-1px); }

/* REPORT (program skin inside #survey_result) */
body.sub-page .report-surface{ padding:28px 0 48px; }
body.sub-page #survey_result .logo{ display:none; }
body.sub-page .survey_data{ background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 10px 30px rgba(2,6,23,.08); padding:20px; }
body.sub-page .survey_content table{
  width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--line); border-radius:12px; overflow:hidden;
  box-shadow:0 2px 10px rgba(2,6,23,.05); margin:10px 0 18px;
}
body.sub-page .survey_content thead th{
  background:linear-gradient(180deg,#f9fafb,#f1f5f9); color:var(--ink-1); font-weight:800; padding:10px; border-bottom:1px solid var(--line); text-align:center;
}
body.sub-page .survey_content tbody td,
body.sub-page .survey_content tbody th{ padding:9px 10px; border-top:1px solid var(--line); text-align:center; word-break:keep-all; overflow-wrap:anywhere; }

/* HISTORY (timeline) */
body.sub-page .timeline{ position:relative; margin:32px auto 96px; max-width:920px; padding-left:28px; }
body.sub-page .timeline::before{ content:""; position:absolute; left:12px; top:0; bottom:0; width:2px; background:linear-gradient(var(--brand), rgba(59,130,246,.25)); opacity:.9; }
body.sub-page .tl-item{ position:relative; display:grid; grid-template-columns:140px 1fr; gap:16px; padding:22px 16px 22px 0; }
body.sub-page .tl-item + .tl-item{ border-top:1px dashed var(--border); }
body.sub-page .tl-pin{ position:absolute; left:3px; top:28px; width:18px; height:18px; background:var(--brand); border-radius:50%; box-shadow:0 0 0 4px rgba(59,130,246,.18); }
body.sub-page .tl-year{ display:inline-block; min-width:96px; font-size:22px; font-weight:800; color:var(--ink-900); }
body.sub-page .tl-body{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:16px 18px; box-shadow:0 4px 14px rgba(2,6,23,.04); }
@media (max-width:768px){
  body.sub-page .timeline{ padding-left:22px; }
  body.sub-page .tl-item{ grid-template-columns:110px 1fr; gap:12px; }
  body.sub-page .tl-year{ min-width:84px; font-size:18px; }
}

/* FAQ (accordion) */
body.sub-page .faq .faq-list{ max-width:920px; margin:0 auto; }
body.sub-page .faq-item{ background:#fff; border:1px solid var(--border); border-radius:12px; margin:12px 0; box-shadow:0 6px 16px rgba(2,6,23,.04); overflow:hidden; }
body.sub-page .faq-q{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; font-weight:700; color:var(--ink-900); cursor:pointer; list-style:none; }
body.sub-page .faq-q::-webkit-details-marker{ display:none; }
body.sub-page .faq-q::after{
  content:""; width:18px; height:18px; flex:0 0 18px;
  background:conic-gradient(from 45deg, transparent 0 75%, currentColor 0) no-repeat;
  mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'><path fill='black' d='M7 10l5 5 5-5z'/></svg>") center/contain;
  color:#9aa4b2; transition:transform .2s, color .2s;
}
body.sub-page .faq-item[open] .faq-q::after{ transform:rotate(180deg); color:var(--ink-500); }
body.sub-page .faq-a{ padding:16px 20px 20px; background:var(--bg-soft); color:var(--ink-700); border-top:1px solid var(--border); }
body.sub-page .section.container.faq{ padding-top:64px; padding-bottom:96px; }
@media (max-width:768px){ body.sub-page .faq-q{ padding:16px; } body.sub-page .faq-a{ padding:14px 16px 18px; } }

/* ======================================================
   (선택) 레거시 호환: 예전 body 클래스가 있어도 깨지지 않게
   전환 끝나면 아래 블록 삭제 가능
====================================================== */
body.join-page, body.result-list-page, body.contact-page, body.pricing-page, body.report-page, body.history-page, body.faq{
  /* 옛 페이지도 공통 규칙 상속되도록 body에 sub-page를 붙여주는 느낌의 넓은 스코프 */
}
