/* =========================================================================
   NEDA DS — 네다 트레이딩 디자인 시스템
   기반: DESIGN.md(토스 TDS) 토큰. 그 위에 네다 고유 요소:
   · 계단형 N 로고 · STEP 배지(학습 단계) · 모바일 하단 탭바(앱처럼)
   · 회색 면(#f2f4f6) 카드로만 구분, 그림자 없음 · 파란색은 행동·강조에만
   ========================================================================= */
:root{
  --blue:#3182f6; --blue-h:#2272eb; --blue-50:#e8f3ff; --blue-100:#c9e2ff; --blue-700:#1b64da;
  --g50:#f9fafb; --g100:#f2f4f6; --g200:#e5e8eb; --g300:#d1d6db; --g400:#b0b8c1; --g500:#8b95a1; --g600:#6b7684; --g700:#4e5968; --g800:#333d4b; --g900:#191f28;
  --red:#f04452; --red-50:#ffeeee; --green:#03b26c;
  --bg:#ffffff; --text:#191f28; --sub:#4e5968; --mute:#6b7684;
  --r-s:8px; --r-m:10px; --r-l:14px; --r-xl:16px; --r-card:24px;
  --font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Noto Sans",sans-serif;
  --hd:64px; --tab:64px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--hd) + 12px)}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:16px;line-height:1.5;letter-spacing:-.01em;-webkit-font-smoothing:antialiased;word-break:keep-all;overflow-wrap:anywhere}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input,textarea,select{font:inherit;color:inherit;letter-spacing:inherit}
h1,h2,h3{margin:0;letter-spacing:-.025em;font-weight:700}
p{margin:0}
:focus-visible{outline:none;box-shadow:0 0 0 1px #8ac0ff,0 0 0 3px #b8d9ff;border-radius:var(--r-s)}
::selection{background:var(--blue-50)}
.wrap{width:min(1080px,100% - 48px);margin-inline:auto}
.wrap-n{width:min(720px,100% - 48px)}
.t-blue{color:var(--blue)}
.t-mute{color:var(--mute)}
.br-m{display:none}

/* ---------- 헤더 ---------- */
.hd{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(12px);-webkit-backdrop-filter:saturate(180%) blur(12px)}
.hd-in{height:var(--hd);display:flex;align-items:center;gap:40px}
.logo{display:inline-flex;align-items:center;gap:9px;font-weight:800;font-size:19px;letter-spacing:-.03em;flex:none}
.logo b{font-weight:600;color:var(--g500);margin-left:3px}
.logo-mark{width:30px;height:30px;flex:none}
.hd-nav{display:flex;gap:4px;flex:1}
.hd-nav a{padding:8px 12px;border-radius:var(--r-s);color:var(--sub);font-weight:600;font-size:15px;transition:background .15s,color .15s}
.hd-nav a:hover{background:var(--g100);color:var(--text)}
.hd-nav a[aria-current]{color:var(--text)}
.hd-act{display:flex;align-items:center;gap:8px;margin-left:auto}
.hd-link{padding:8px 10px;border-radius:var(--r-s);color:var(--sub);font-size:15px;font-weight:600}
.hd-link:hover{background:var(--g100);color:var(--text)}

/* ---------- 버튼 (TDS: s 32/8 · m 38/10 · l 48/14 · xl 56/16, 누르면 scale .96) ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;cursor:pointer;font-weight:600;white-space:nowrap;transition:transform .1s ease,background .15s;-webkit-tap-highlight-color:transparent}
.btn:active{transform:scale(.96)}
.btn[disabled]{opacity:.38;cursor:not-allowed;transform:none}
.btn-s{height:32px;padding:0 12px;border-radius:var(--r-s);font-size:14px}
.btn-m{height:38px;padding:0 16px;border-radius:var(--r-m);font-size:15px}
.btn-l{height:48px;padding:0 20px;border-radius:var(--r-l);font-size:16px}
.btn-xl{height:56px;padding:0 24px;border-radius:var(--r-xl);font-size:17px}
.btn-block{width:100%}
.btn-primary{background:var(--blue);color:#fff}
.btn-primary:hover{background:var(--blue-h)}
.btn-weak{background:var(--blue-50);color:var(--blue-700)}
.btn-weak:hover{background:var(--blue-100)}
.btn-gray{background:var(--g100);color:var(--g700)}
.btn-gray:hover{background:var(--g200)}
.link-btn{background:none;border:0;padding:0;color:var(--mute);font-size:13px;cursor:pointer}
.link-btn:hover{color:var(--red)}
.ic{width:24px;height:24px}
.ic-s{width:16px;height:16px;vertical-align:-3px}

/* ---------- 공통 블록 ---------- */
.eyebrow{color:var(--blue);font-weight:700;font-size:16px;margin-bottom:12px}
.ph{padding:64px 0 8px}
.ph h1{font-size:clamp(30px,4.4vw,44px);line-height:1.3}
.ph-sub{margin-top:12px;font-size:18px;color:var(--sub);line-height:1.6}
.ph-btn{margin-top:24px}
.back{display:inline-block;margin-bottom:20px;color:var(--mute);font-size:15px;font-weight:600}
.back:hover{color:var(--text)}
.meta{display:flex;align-items:center;gap:10px;margin-top:18px;color:var(--mute);font-size:15px}
.sec{padding:40px 0}
.sec-top{padding-top:32px}
.sec-last{padding-bottom:96px}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px}
.sec-h h2{font-size:clamp(22px,2.6vw,26px)}
.sec-h a{color:var(--mute);font-size:15px;font-weight:600}
.sec-h a:hover{color:var(--text)}
.h3{font-size:20px;margin:40px 0 14px}
.box{background:var(--g100);border-radius:var(--r-card)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;font-size:12px;font-weight:700;white-space:nowrap;flex:none}
.badge-blue{background:var(--blue-50);color:var(--blue-700)}
.badge-gray{background:var(--g200);color:var(--g700)}
.box .badge-gray{background:#fff}
.badge-red{background:var(--red-50);color:var(--red)}
.empty{text-align:center;padding:72px 24px;border-radius:var(--r-card);background:var(--g100)}
.empty b{font-size:20px}
.empty p{margin:8px 0 20px;color:var(--mute)}
.alert{padding:14px 18px;border-radius:var(--r-l);background:var(--red-50);color:var(--red);font-weight:600;font-size:15px;margin-bottom:20px}
.alert-ok{background:var(--blue-50);color:var(--blue-700)}

/* ---------- ListRow (TDS) ---------- */
.rows{padding:8px;margin:0;list-style:none}
.row{display:flex;align-items:center;gap:14px;min-height:64px;padding:12px 14px;border-radius:16px;transition:background .15s}
a.row:hover{background:rgba(0,23,51,.04)}
a.row:active{background:rgba(0,23,51,.07)}
.row-lead{flex:none;display:flex}
.row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.row-main b{font-weight:600;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-main small{color:var(--mute);font-size:14px}
.row-right{flex:none;font-size:15px;font-weight:600;color:var(--sub)}
.row-go{width:18px;height:18px;color:var(--g400);flex:none}
.row-empty{justify-content:center;text-align:center;min-height:120px}
.row-empty b{white-space:normal}
.cmt-n{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:12px;background:var(--blue-50);color:var(--blue-700);font-size:13px}
.exl{--c:#333;display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--c);color:#fff;font-weight:800;font-size:17px;font-style:normal}
.exl-l{width:48px;height:48px;border-radius:14px;font-size:20px}
.exl-xl{width:64px;height:64px;border-radius:18px;font-size:26px}
.num{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff;color:var(--g700);font-style:normal;font-weight:700;font-size:14px}

/* ---------- 홈 히어로 ---------- */
.hero{padding:80px 0 48px;overflow:hidden}
.hero-in{display:grid;grid-template-columns:1.1fr .9fr;gap:48px;align-items:center}
.hero h1{font-size:clamp(38px,6vw,64px);line-height:1.2;letter-spacing:-.035em}
.hero h1 em{font-style:normal;color:var(--blue)}
.hero-sub{margin-top:22px;font-size:clamp(17px,1.8vw,20px);line-height:1.6;color:var(--sub)}
.hero-cta{display:flex;flex-wrap:wrap;gap:10px;margin-top:36px}
.hero-stack{position:relative;height:400px}
.hs-card{position:absolute;display:flex;flex-direction:column;gap:6px;width:min(320px,100%);padding:24px;border-radius:var(--r-card);background:var(--g100);animation:hs-in .7s cubic-bezier(.2,.8,.2,1) both}
.hs-card b{font-size:20px;letter-spacing:-.02em}
.hs-card small{color:var(--mute);font-size:14px}
.hs-k{color:var(--blue);font-weight:700;font-size:14px}
.hs-1{top:0;left:6%;background:var(--blue);color:#fff}
.hs-1 .hs-k,.hs-1 small{color:rgba(255,255,255,.8)}
.hs-bar{height:8px;border-radius:4px;background:rgba(255,255,255,.28);margin:10px 0 4px;overflow:hidden}
.hs-bar i{display:block;height:100%;border-radius:4px;background:#fff}
.hs-2{top:142px;right:0;animation-delay:.12s}
.hs-chips{display:flex;gap:6px;margin-top:8px}
.hs-chips span{padding:5px 10px;border-radius:8px;background:#fff;font-size:13px;font-weight:700;color:var(--g700)}
.hs-3{top:270px;left:0;animation-delay:.24s;background:var(--g50);border:1px solid var(--g200)}
@keyframes hs-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hs-card{animation:none}}

/* ---------- STEP 카드 ---------- */
.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.steps a{display:flex;flex-direction:column;height:100%;padding:28px 24px;border-radius:var(--r-card);background:var(--g100);transition:background .15s,transform .1s}
.steps a:hover{background:var(--g200)}
.steps a:active{transform:scale(.98)}
.step-k{display:inline-block;color:var(--blue);font-weight:800;font-size:13px;letter-spacing:.02em}
.steps b{margin:12px 0 8px;font-size:21px;letter-spacing:-.02em}
.steps p{color:var(--sub);font-size:15px;line-height:1.6;flex:1}
.step-n{margin-top:20px;font-size:14px;font-weight:600;color:var(--mute)}
.band{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:48px;border-radius:32px;background:var(--g900);color:#fff}
.band h2{font-size:clamp(24px,3vw,32px);line-height:1.35;color:#fff}
.band p{margin-top:10px;color:var(--g400)}

/* ---------- 아카데미 ---------- */
.lv{padding:24px 0 32px}
.lv-h h2{font-size:clamp(24px,3vw,30px);margin-top:8px}
.lv-h p{margin-top:8px;color:var(--sub)}
.course-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:20px}
.course{display:flex;flex-direction:column;gap:8px;padding:24px;border-radius:var(--r-card);background:var(--g100);transition:background .15s,transform .1s}
.course:hover{background:var(--g200)}
.course:active{transform:scale(.98)}
.course-top{display:flex;align-items:center;justify-content:space-between;font-size:14px;margin-bottom:6px}
.course b{font-size:20px;letter-spacing:-.02em}
.course p{color:var(--sub);font-size:15px;line-height:1.6}
.course-layout{display:grid;grid-template-columns:1fr 320px;gap:32px;align-items:start}
.course-layout .h3:first-child{margin-top:0}
.checks{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.checks li{position:relative;padding-left:32px;font-size:16px;line-height:1.6}
.checks li::before{content:"";position:absolute;left:0;top:2px;width:22px;height:22px;border-radius:50%;background:var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233182f6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat}
.side{position:sticky;top:calc(var(--hd) + 20px);padding:28px}
.side-t{font-size:20px}
.side p{margin:8px 0 20px;color:var(--sub);font-size:15px;line-height:1.6}

/* ---------- 칼럼·글 ---------- */
.cards3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.col-card{display:flex;flex-direction:column;gap:8px;padding:24px;border-radius:var(--r-card);background:var(--g100);transition:background .15s}
.col-card:hover{background:var(--g200)}
.col-card span{font-size:14px}
.col-card b{font-size:19px;line-height:1.4}
.col-card p{color:var(--sub);font-size:15px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.article{padding:56px 0 96px}
.article h1{font-size:clamp(28px,4vw,38px);line-height:1.35}
.art-meta{margin-top:14px;color:var(--mute);font-size:15px}
.art-lead{margin-top:28px;padding:22px 24px;border-radius:var(--r-card);background:var(--g100);font-size:17px;line-height:1.7;color:var(--g800)}
.art-note{margin-top:40px;padding-top:20px;border-top:1px solid var(--g200);color:var(--mute);font-size:14px;line-height:1.6}
.art-note a{color:var(--blue);font-weight:600}
.prose{margin-top:32px;font-size:17px;line-height:1.85;color:var(--g800)}
.prose h2{margin:44px 0 14px;font-size:24px;color:var(--text)}
.prose p{margin:0 0 18px}
.prose ul{margin:0 0 18px;padding-left:22px}
.prose li{margin:6px 0}
.legal{font-size:15px;line-height:1.75;margin-top:0}
.legal h2{font-size:19px;margin:32px 0 10px}
.legal table{width:100%;border-collapse:collapse;margin:12px 0;font-size:14px}
.legal th,.legal td{padding:10px 12px;border-bottom:1px solid var(--g200);text-align:left;vertical-align:top}
.legal th{background:var(--g50);font-weight:600}

/* ---------- 거래소 ---------- */
.ex-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.ex{display:flex;flex-direction:column;gap:18px;padding:24px;border-radius:var(--r-card);background:var(--g100);transition:background .15s,transform .1s}
.ex:hover{background:var(--g200)}
.ex:active{transform:scale(.98)}
.ex-top{display:flex;align-items:center;gap:12px}
.ex-top b{display:block;font-size:19px}
.ex-top small{color:var(--mute);font-size:14px}
.ex-pay{display:flex;justify-content:space-between;align-items:baseline;padding:14px 16px;border-radius:16px;background:#fff}
.ex-pay span{color:var(--sub);font-size:14px;font-weight:600}
.ex-pay b{font-size:18px}
.ex ul{margin:0;padding-left:18px;color:var(--sub);font-size:14px;line-height:1.7}
.howto{margin-top:24px;padding:32px}
.howto .h3{margin-top:0}
.nsteps{list-style:none;margin:0;padding:0;counter-reset:n;display:grid;gap:4px}
.nsteps li{counter-increment:n;position:relative;padding:14px 0 14px 48px}
.nsteps li::before{content:counter(n);position:absolute;left:0;top:12px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--blue);color:#fff;font-weight:700;font-size:15px}
.nsteps b{font-size:17px}
.nsteps p{margin-top:4px;color:var(--sub);font-size:15px}
.ex-hero{display:flex;align-items:center;gap:18px}
.ex-hero h1{font-size:clamp(28px,4vw,38px)}
.ex-hero .ph-sub{margin-top:4px;font-size:16px}
.code-box{padding:28px;margin-bottom:16px}
.code-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 20px}
.code-line b{font-size:30px;letter-spacing:.02em}
.code-box p{margin:-8px 0 20px;color:var(--sub);font-size:15px}

/* ---------- 커뮤니티 ---------- */
.tabs-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.seg{display:flex;gap:4px;padding:4px;border-radius:14px;background:var(--g100);overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg a{padding:8px 16px;border-radius:10px;font-size:15px;font-weight:600;color:var(--mute);white-space:nowrap}
.seg a[aria-current]{background:#fff;color:var(--text)}
.search input{width:220px;height:44px;padding:0 16px;border:0;border-radius:var(--r-l);background:var(--g100);font-size:15px}
.search input:focus{outline:none;box-shadow:0 0 0 2px var(--blue)}
.board .row-main b{white-space:normal;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
.pager{display:flex;justify-content:center;gap:4px;margin-top:20px}
.pager a{min-width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-m);color:var(--mute);font-weight:600}
.pager a[aria-current]{background:var(--g900);color:#fff}
.post-cat{margin-bottom:12px}
.post-t{font-size:clamp(24px,3.4vw,32px);line-height:1.4}
.post-meta{display:flex;align-items:center;gap:12px;margin-top:20px;padding-bottom:24px;border-bottom:1px solid var(--g200)}
.post-meta span:last-child{display:flex;flex-direction:column}
.post-meta small{color:var(--mute);font-size:14px}
.avatar{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--blue-50);color:var(--blue-700);font-weight:700;flex:none}
.avatar-s{width:32px;height:32px;font-size:14px}
.post-body{padding:28px 0;font-size:17px;line-height:1.8;color:var(--g800);min-height:120px}
.post-act{display:flex;gap:8px;flex-wrap:wrap;padding-bottom:28px;border-bottom:1px solid var(--g200)}
.cmts .h3{margin-top:28px}
.cmt{display:flex;gap:12px;padding:14px 0}
.cmt small{color:var(--mute);font-size:13px}
.cmt p{margin-top:4px;line-height:1.65}
.cmt-form{display:flex;flex-direction:column;align-items:flex-end;gap:8px;margin-top:12px}

/* ---------- 폼 (TDS TextField box) ---------- */
.form{display:flex;flex-direction:column}
.form-box{padding:28px}
.lbl{margin:18px 0 8px;font-size:15px;font-weight:600;color:var(--g700)}
.lbl:first-of-type{margin-top:0}
.field{width:100%;min-height:56px;padding:16px;border:0;border-radius:var(--r-l);background:var(--g100);font-size:17px;transition:box-shadow .15s,background .15s;resize:vertical}
.box .field{background:#fff}
.field::placeholder{color:var(--g400)}
.field:focus{outline:none;background:#fff;box-shadow:inset 0 0 0 2px var(--blue)}
textarea.field{line-height:1.6}
.form .btn{margin-top:28px}
.form-box .btn{align-self:flex-start}
.check{display:flex;align-items:flex-start;gap:10px;margin-top:16px;font-size:15px;color:var(--g700);cursor:pointer;line-height:1.5}
.check input{width:22px;height:22px;margin:0;accent-color:var(--blue);flex:none}
.check a{color:var(--blue);font-weight:600}
.agree{margin-top:24px;padding:4px 20px 20px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip input{position:absolute;opacity:0;pointer-events:none}
.chip span{display:inline-flex;height:40px;align-items:center;padding:0 16px;border-radius:var(--r-m);background:var(--g100);font-weight:600;font-size:15px;color:var(--g700);cursor:pointer}
.chip input:checked+span{background:var(--blue);color:#fff}
.chip input:focus-visible+span{box-shadow:0 0 0 1px #8ac0ff,0 0 0 3px #b8d9ff}
.auth{min-height:calc(100vh - var(--hd));display:grid;place-items:start center;padding:72px 24px 96px}
.auth-in{width:min(420px,100%)}
.auth h1{font-size:30px}
.auth h1+p{margin:8px 0 32px}
.auth-alt{margin-top:24px;text-align:center;color:var(--mute);font-size:15px}
.auth-alt a{color:var(--blue);font-weight:600}
.logout{margin-top:32px}

/* ---------- 푸터 ---------- */
.ft{background:var(--g50);padding:48px 0 56px;margin-top:24px;font-size:14px;color:var(--mute)}
.ft-top{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.ft-nav,.ft-legal{display:flex;gap:20px;flex-wrap:wrap}
.ft-nav a{font-weight:600;color:var(--g700)}
.ft-legal{margin-top:28px}
.ft-legal a:hover,.ft-nav a:hover{color:var(--text)}
.ft-biz{margin-top:14px}
.ft-note{margin-top:14px;max-width:760px;line-height:1.7;color:var(--g500)}
.ft-copy{margin-top:14px;color:var(--g500)}

/* ---------- 모바일 하단 탭바 (네다 시그니처) ---------- */
.tabbar{display:none}
@media (max-width:820px){
  :root{--hd:56px}
  .wrap,.wrap-n{width:calc(100% - 40px)}
  .hd-nav{display:none}
  .hd-start{display:none}
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:50;display:grid;grid-template-columns:repeat(5,1fr);height:calc(var(--tab) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(255,255,255,.96);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--g200)}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--g400);font-size:11px;font-weight:600;-webkit-tap-highlight-color:transparent}
  .tabbar a[aria-current]{color:var(--g900)}
  .tabbar .ic{width:24px;height:24px}
  body{padding-bottom:calc(var(--tab) + env(safe-area-inset-bottom))}
  .is-auth .tabbar{display:none}
  .is-auth{padding-bottom:0}
  .hero{padding:48px 0 24px}
  .hero-in{grid-template-columns:1fr;gap:36px}
  .hero-stack{height:300px}
  .hs-card{width:min(280px,82%);padding:20px}
  .hs-2{top:110px}
  .hs-3{top:208px}
  .steps,.cards3,.ex-grid{grid-template-columns:1fr}
  .two,.course-layout{grid-template-columns:1fr}
  .side{position:static}
  .course-grid{grid-template-columns:1fr}
  .band{flex-direction:column;align-items:flex-start;padding:32px 24px;border-radius:24px}
  .band .btn{width:100%}
  .tabs-row{flex-direction:column;align-items:stretch}
  .search input{width:100%}
  .ph{padding-top:40px}
}
@media (max-width:480px){
  .br-m{display:inline}
  .hero-cta .btn{flex:1 1 100%}
  .ph-sub{font-size:16px}
  .code-line b{font-size:24px}
  .howto,.code-box,.form-box{padding:22px}
}
