/* ================================
   common.css
   - Webfont: woff2 only + font-display: swap
   - Common header / footer
   - CryptoDiscountCode common layout
================================ */

/* ================================
   Root variables
================================ */
:root{
  --header-h:72px;

  --navy-700:#0b1f3a;
  --navy-600:#102a4d;
  --on-navy:#ffffff;
  --on-navy-dim:rgba(255,255,255,.88);

  --accent:#007aff;
  --text:#333333;
  --muted:#777777;
  --border:#e5e7eb;
  --card:#ffffff;
}

/* ================================
   Webfont
================================ */
@font-face{
  font-family:'Nanum Gothic';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('/font/NanumGothic-Regular.woff2') format('woff2');
}

@font-face{
  font-family:'Nanum Gothic';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url('/font/NanumGothic-Bold.woff2') format('woff2');
}

@font-face{
  font-family:'Nanum Gothic';
  font-style:normal;
  font-weight:800;
  font-display:swap;
  src:url('/font/NanumGothic-ExtraBold.woff2') format('woff2');
}

/* ================================
   Reset & Base
================================ */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

html,
body{
  font-family:'Nanum Gothic', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size:16px;
  background:#ffffff;
  color:var(--text);
  line-height:1.6;
  overflow-x:hidden;
}

body{
  padding-top:var(--header-h);
}

p{
  margin-bottom:1em;
  line-height:1.7;
}

a{
  color:var(--accent);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

strong{
  color:#0c2c78;
}

ul,
ol{
  padding-left:20px;
  margin-bottom:1em;
}

li{
  margin-bottom:6px;
}

img{
  max-width:100%;
  height:auto;
  display:block;
}

table{
  width:100%;
  border-collapse:collapse;
  margin:20px 0;
  font-size:15px;
}

th,
td{
  border:1px solid #ccc;
  padding:10px;
  text-align:left;
}

th{
  background:#f4f4f4;
  font-weight:700;
}

input,
select,
textarea,
button{
  font-family:'Nanum Gothic', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size:16px;
  padding:10px;
  border:1px solid #ccc;
  border-radius:6px;
  outline:none;
}

button{
  cursor:pointer;
  background:var(--accent);
  color:#fff;
  border:none;
  transition:background-color .2s;
}

button:hover{
  background:#005fcc;
}

pre,
code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
  font-size:14px;
  background:#f9f9f9;
  padding:6px;
  border-radius:4px;
  overflow-x:auto;
}

/* ================================
   Headings & Titles
================================ */
h1,
h2,
h3,
h4,
h5,
h6{
  font-family:'Nanum Gothic', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight:700;
  line-height:1.4;
  color:#222;
  margin-top:.8em;
  margin-bottom:.6em;
}

h1{
  font-size:24px;
  color:#000;
  margin-bottom:20px;
  text-align:center;
}

h2{
  font-size:20px;
  margin-top:30px;
  margin-bottom:16px;
  border-bottom:none;
}

h3{ font-size:18px; }
h4{ font-size:16px; }

.main-title{
  font-size:26px;
  font-weight:700;
  margin-bottom:25px;
  margin-left:10px;
  position:relative;
  display:inline-block;
  z-index:0;
}

.main-title::after{
  content:'';
  position:absolute;
  left:-7.5%;
  right:-7.5%;
  bottom:1px;
  height:39%;
  background:#21d5ff;
  z-index:-1;
}

.sub-title-box{
  font-size:20px;
  font-weight:700;
  margin-top:30px;
  margin-bottom:10px;
  color:#222;
  padding-left:12px;
  border-left:6px solid #546382;
}

.sub-title{
  font-size:20px;
  font-weight:700;
  margin-top:30px;
  margin-bottom:10px;
  color:#222;
}

.body-text{
  font-size:16px;
  line-height:1.7;
  margin-bottom:15px;
}

.small-text{
  font-size:13px;
  color:var(--muted);
  font-weight:400;
}

.note-center{ text-align:center; }

.note{
  font-size:14px;
  color:#555;
  font-weight:400;
}

/* ================================
   Layout
================================ */
.content-wrapper{
  max-width:800px;
  margin:0 auto;
  padding:10px;
  text-align:left;
}

.page-grid{
  max-width:1200px;
  margin:0 auto;
  padding:0 12px;
}

.page-grid-inner{
  display:block;
}

.site-aside{
  display:none;
}

@media (min-width:1024px){
  .page-grid-inner{
    display:grid;
    grid-template-columns:minmax(0,1fr) 320px;
    gap:28px;
    align-items:start;
  }

  .site-aside{
    display:block;
    position:sticky;
    top:calc(var(--header-h) + 16px);
    height:fit-content;
  }
}

@media (max-width:640px){
  .page-grid{
    padding:0 8px;
  }

  .content-wrapper{
    padding:0 8px;
  }
}

/* ================================
   Aside
================================ */
.aside-card{
  background:var(--card);
  border:1px solid #e6e6e6;
  border-radius:12px;
  padding:16px 18px;
  margin-bottom:16px;
}

.aside-card h3{
  margin:0 0 10px;
  font-size:18px;
  color:#2b51ff;
}

.aside-list{
  list-style:none;
  margin:0;
  padding:0;
}

.aside-list li{
  padding:10px 0;
  border-top:1px solid #efefef;
}

.aside-list li:first-child{
  border-top:0;
}

.aside-list a{
  color:#111;
  text-decoration:none;
}

.aside-list a:hover{
  text-decoration:underline;
}

/* ================================
   Responsive helpers
================================ */
.only-desktop{
  display:none;
}

.only-mobile{
  display:none;
}

@media (min-width:1024px){
  .only-desktop{
    display:block;
  }
}

@media (max-width:768px){
  .only-mobile{
    display:block;
  }
}

/* ================================
   Link list
================================ */
.link-list{
  list-style:none;
  padding:0;
  margin:20px 0;
}

.link-list li{
  margin-bottom:10px;
}

.link-list a{
  display:flex;
  align-items:center;
  text-decoration:none;
  color:inherit;
  background:#f9f9f9;
  padding:10px 14px;
  border-radius:6px;
  transition:background-color .2s ease, transform .1s ease;
}

.link-list a:hover,
.link-list a:focus{
  background:#fff9cc;
}

.link-list a:active{
  background:#fff176;
  transform:scale(.97);
}

.link-list span.number{
  font-weight:700;
  margin-right:10px;
  color:#546382;
  width:24px;
  text-align:right;
}

.link-list span.text{
  flex:1;
}

/* ================================
   Common Header
================================ */
.site-topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:9999;
  background:var(--navy-700);
  color:#fff;
  box-shadow:none;
  border-bottom:1px solid rgba(255,255,255,.08);
  transition:transform .22s ease;
}

.site-topbar.hidden{
  transform:translateY(-100%);
}

.topbar-inner{
  max-width:1200px;
  min-height:var(--header-h);
  margin:0 auto;
  padding:0 16px;
  display:flex;
  align-items:center;
  gap:18px;
}

.hamburger-btn{
  display:none;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border:0;
  background:transparent;
  padding:0;
  border-radius:10px;
  flex:0 0 auto;
}

.hamburger-btn:hover{
  background:rgba(255,255,255,.10);
}

.hamburger-btn span,
.hamburger-btn span::before,
.hamburger-btn span::after{
  content:"";
  display:block;
  width:22px;
  height:2px;
  background:#fff;
  border-radius:999px;
  position:relative;
}

.hamburger-btn span::before{
  position:absolute;
  top:-7px;
  left:0;
}

.hamburger-btn span::after{
  position:absolute;
  top:7px;
  left:0;
}

.brand-link{
  display:flex;
  align-items:center;
  gap:8px;
  color:#fff;
  text-decoration:none;
  font-weight:800;
  white-space:nowrap;
  flex:0 0 auto;
}

.brand-link:hover{
  text-decoration:none;
}

.brand-logo{
  width:auto;
  height:26px;
}

.brand-text{
  display:flex;
  align-items:center;
  gap:5px;
  color:#fff;
  font-size:18px;
  line-height:1;
}

.brand-word::first-letter{
  color:#ffbf2f;
  font-weight:900;
}

.desktop-nav{
  display:flex;
  align-items:center;
  gap:4px;
  margin-left:auto;
}

.desktop-nav a{
  color:var(--on-navy-dim);
  text-decoration:none;
  font-size:14px;
  font-weight:800;
  padding:10px 8px;
  border-radius:10px;
  white-space:nowrap;
}

.desktop-nav a:hover{
  background:rgba(255,255,255,.10);
  color:#fff;
  text-decoration:none;
}

.search-link{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  border-radius:10px;
  text-decoration:none;
  flex:0 0 auto;
}

.search-link:hover{
  background:rgba(255,255,255,.10);
  text-decoration:none;
}

.exchange-dropdown{
  position:relative;
  flex:0 0 auto;
}

.dropdown-btn{
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--accent);
  background:var(--accent);
  color:#fff;
  border-radius:999px;
  padding:8px 14px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.dropdown-btn .caret{
  display:inline-flex;
  transition:transform .2s ease;
}

.exchange-dropdown.open .dropdown-btn .caret{
  transform:rotate(180deg);
}

.dropdown-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  min-width:240px;
  max-height:70vh;
  overflow:auto;
  display:none;
  padding:8px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  box-shadow:0 14px 32px rgba(0,0,0,.16);
  z-index:10000;
}

.exchange-dropdown.open .dropdown-menu{
  display:block;
}

.dropdown-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#111;
  font-size:14px;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}

.dropdown-item:hover{
  background:#f3f6ff;
}

.dropdown-item small{
  color:#667085;
  font-size:12px;
}

/* ================================
   Mobile Drawer
================================ */
.drawer-backdrop{
  position:fixed;
  inset:0;
  z-index:9997;
  display:none;
  background:rgba(0,0,0,.35);
}

.drawer-backdrop.show{
  display:block;
}

.mobile-drawer{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  z-index:9998;
  width:min(86vw,340px);
  background:#fff;
  color:#111;
  transform:translateX(-100%);
  transition:transform .24s ease;
  box-shadow:none;
}

.mobile-drawer.open{
  transform:translateX(0);
  box-shadow:0 18px 40px rgba(0,0,0,.22);
}

.drawer-head{
  height:var(--header-h);
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #eef0f4;
  font-weight:900;
}

.drawer-close{
  width:36px;
  height:36px;
  border:0;
  border-radius:10px;
  background:#f2f4f8;
  color:#111;
  font-size:22px;
}

.drawer-nav{
  padding:14px;
  display:grid;
  gap:8px;
}

.drawer-nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:13px 14px;
  border-radius:12px;
  background:#f7f9fc;
  color:#0b2342;
  text-decoration:none;
  font-weight:800;
}

.drawer-nav a:hover{
  background:#edf4ff;
  text-decoration:none;
}

/* ================================
   Header responsive
================================ */
@media (max-width:768px){
  .hamburger-btn{
    display:flex;
  }

  .desktop-nav,
  .search-link{
    display:none;
  }

  .topbar-inner{
    gap:10px;
  }

  .brand-text{
    font-size:18px;
  }

  .exchange-dropdown{
    margin-left:auto;
  }
}

@media (max-width:460px){

  .brand-logo{
    height:20px;
  }

  .brand-text{
    display:flex;
    gap:2px;
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
  }

  .brand-word{
    display:inline !important;
  }

  .dropdown-btn{
    padding:6px 10px;
    font-size:12px;
  }

  .dropdown-menu{
    min-width:min(92vw,300px);
  }

}

/* ================================
   Footer
================================ */
.site-footer{
  background:var(--navy-700);
  color:#fff;
  border-top:0;
  margin-top:40px;
  padding:22px 16px;
  text-align:center;
}

.footer-inner{
  max-width:1200px;
  margin:0 auto;
  text-align:center;
}

.footer-links{
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:18px;
  margin:0 0 12px;
  padding:0;
  text-align:center;
}

.footer-links a{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
}

.footer-links a:hover,
.footer-links a:focus{
  color:#fff;
  text-decoration:underline;
}

.footer-copy{
  color:#d7e0ef;
  font-size:13px;
  text-align:center;
}

/* ================================
   MOST READ
================================ */
.most-read-box{
  background:#f5f5f5;
  border-radius:10px;
  padding:16px;
  margin:24px 0;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
}

.most-read-box h3{
  font-size:1.1rem;
  font-weight:800;
  color:#0c2c78;
  margin-bottom:12px;
}

.most-read-box ul{
  list-style:none;
  margin:0;
  padding:0;
}

.most-read-box li{
  margin-bottom:10px;
  line-height:1.4;
}

.most-read-box a{
  color:var(--accent);
  text-decoration:none;
  font-weight:700;
}

.most-read-box a:hover{
  text-decoration:underline;
}

/* ================================
   Ads
================================ */
.ad-card{
  padding:0;
}

.ad-card a{
  display:block;
  border-radius:12px;
  overflow:hidden;
  border:1px solid #e5e7eb;
  background:#fff;
}

.ad-card .ad-img{
  display:block;
  width:100%;
  height:auto;
}

.ad-card a:hover{
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  transform:translateY(-1px);
  transition:box-shadow .2s ease, transform .2s ease;
}

@media (max-width:960px){
  .ad-card{
    display:none;
  }
}

/* ================================
   Utility
================================ */
.text-center{ text-align:center; }
.text-right{ text-align:right; }
.text-left{ text-align:left; }

.mt-1{ margin-top:8px; }
.mt-2{ margin-top:16px; }
.mt-3{ margin-top:24px; }

.mb-1{ margin-bottom:8px; }
.mb-2{ margin-bottom:16px; }
.mb-3{ margin-bottom:24px; }

/* ================================
   Coupang banner
================================ */
.coupang-banner-wrapper{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  display:flex;
  justify-content:center;
}

.coupang-banner-wrapper iframe,
.coupang-banner-wrapper div{
  max-width:100% !important;
  height:auto !important;
}

/* ================================
   Copy URL button
================================ */
.copy-url-wrapper{
  text-align:center;
  margin:40px 0;
}

.copy-url-button{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:15px;
  color:#032835;
}

.copy-url-msg{
  margin-top:8px;
  font-size:13px;
  color:#032835;
  display:none;
}

/* ================================
   Dark mode
================================ */
html.dark body{
  background:#121212;
  color:#eee;
}

html.dark a{
  color:#3fa4fd;
}

html.dark a:hover{
  color:#82c9ff;
}

html.dark strong{
  color:#4daeff;
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6{
  color:#fff;
}

html.dark .section,
html.dark .icon-grid,
html.dark .icon-item{
  background:#1a1a1a;
  color:#eee;
}

html.dark .main-title::after{
  background:#0095ff;
}

html.dark .sub-title-box,
html.dark .sub-title{
  color:#f1f1f1;
  border-left-color:#4daeff;
}

html.dark .small-text{
  color:#bbb;
}

html.dark .note{
  color:#ccc;
}

html.dark table th{
  background:#1e1e1e;
  color:#f1f1f1;
}

html.dark table td{
  color:#e0e0e0;
  border-color:#444;
}

html.dark input,
html.dark select,
html.dark textarea{
  background:#1e1e1e;
  color:#e0e0e0;
  border-color:#444;
}

html.dark pre,
html.dark code{
  background:#1e1e1e;
  color:#f1f1f1;
}

html.dark .link-list a{
  background:#1c1c1c;
  color:#e0e0e0;
}

html.dark .link-list a:hover,
html.dark .link-list a:focus{
  background:#2b2b2b;
}

html.dark .link-list span.number{
  color:#4daeff;
}

html.dark .copy-url-button,
html.dark .copy-url-msg{
  color:#90cdf4;
}

html.dark .site-footer{
  background:var(--navy-600);
  color:#fff;
}

html.dark .site-footer a{
  color:#fff;
}

html.dark .site-footer a:hover,
html.dark .site-footer a:focus{
  color:#fff;
  text-decoration:underline;
}

/* ================================
   Prefers dark
================================ */
@media (prefers-color-scheme: dark){
  html:not(.light) body{
    background:#121212;
    color:#e0e0e0;
  }

  html:not(.light) h1,
  html:not(.light) h2,
  html:not(.light) h3,
  html:not(.light) h4,
  html:not(.light) h5,
  html:not(.light) h6{
    color:#fff;
  }

  html:not(.light) a{
    color:#4daeff;
  }

  html:not(.light) table th{
    background:#1e1e1e;
  }

  html:not(.light) table th,
  html:not(.light) table td{
    border-color:#444;
  }

  html:not(.light) input,
  html:not(.light) select,
  html:not(.light) textarea{
    background:#1e1e1e;
    color:#e0e0e0;
    border-color:#444;
  }

  html:not(.light) button{
    background:#3399ff;
  }

  html:not(.light) button:hover{
    background:#1e88e5;
  }

  html:not(.light) pre,
  html:not(.light) code{
    background:#1e1e1e;
    color:#f1f1f1;
  }
}

/* ===========================
   Common Ad Slot
=========================== */

.cdc-ad-slot{
    margin:28px 0;
}

.cdc-ad-box{
    width:100%;
    max-width:760px;
    margin:0 auto;
    box-sizing:border-box;
}

.cdc-ad-box a{
    display:block;
    text-decoration:none;
    outline:none;
}

.cdc-ad-box img{
    display:block;
    width:100%;
    height:auto;
    border:0;
    border-radius:12px;
    vertical-align:middle;
}


/* Force full-width header/footer */
#site-header,
#site-footer{
  display:block;
  width:100vw;
  max-width:none;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
}

.site-topbar,
.site-footer{
  width:100%;
  max-width:none;
}
