/* ===== Fonts (Naver-blog feel: MaruBuri serif + Nanum) ===== */
@font-face {
  font-family: 'MaruBuri';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2107@1.1/MaruBuri-Regular.woff') format('woff');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'MaruBuri';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2107@1.1/MaruBuri-Bold.woff') format('woff');
  font-weight: 700; font-display: swap;
}

/* theme tokens have fallbacks so non-themed pages still render */
:root {
  --accent: #d81f2a;
  --ink: #16181d;
  --page-bg: #ffffff;
  --header-bg: #ffffff;
  --nav-text: #16181d;
  --brand-color: #16181d;
  --headline-font: 'Gothic A1', sans-serif;
  --body-font: 'MaruBuri', 'Nanum Myeongjo', serif;
  --body-size: 18px;
  --headline-size: 42px;

  --ink-2: #454a54;
  --muted: #8a919e;
  --line: #e7e9ee;
  --line-2: #f1f2f5;
  --blue: #1a54d8;
  --sans: 'Gothic A1', 'Nanum Gothic', -apple-system, 'Malgun Gothic', sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ============ Masthead: SUMMIT ============ */
.mh-summit { background: var(--header-bg); border-bottom: 2px solid var(--ink); }
.mh-summit .mh-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px 20px 16px; gap: 16px; }
.mh-summit .brand {
  grid-column: 2; justify-self: center;
  font-family: var(--headline-font); font-weight: 900;
  font-size: 34px; letter-spacing: -1px; color: var(--brand-color);
  background: var(--accent); color: #fff; padding: 4px 16px; border-radius: 3px;
}
.mh-summit .tagline { grid-column: 3; justify-self: end; font-size: 15px; color: var(--ink-2); font-weight: 700; max-width: 320px; text-align: right; }
.mh-summit-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mh-summit-nav .nav-inner { display: flex; align-items: center; gap: 14px; height: 52px; }
.mh-summit-nav ul { flex: 1; display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-weight: 800; font-size: 16px; overflow-x: auto; }
.mh-summit-nav li { white-space: nowrap; cursor: pointer; }
.mh-summit-nav li:hover { color: var(--accent); }
.mh-summit-nav .nav-search, .mh-summit-nav .nav-icons { color: var(--muted); font-size: 16px; }

/* ============ Masthead: OSEN (dark) ============ */
.mh-osen { background: var(--header-bg); border-bottom: 3px solid var(--accent); }
.mh-osen .mh-bar { display: flex; align-items: center; gap: 30px; height: 84px; }
.mh-osen .brand { display: flex; flex-direction: column; gap: 3px; }
.mh-osen .logo-mark {
  font-family: var(--headline-font); font-weight: 900; font-size: 30px; font-style: italic;
  color: var(--accent); letter-spacing: -1px; line-height: 1;
  padding-left: 12px; border-left: 6px solid var(--accent); transform: skewX(-6deg);
}
.mh-osen .hdate { font-size: 12px; color: var(--nav-text); opacity: .8; font-weight: 700; padding-left: 12px; }
.mh-osen-nav { margin-left: auto; }
.mh-osen-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; font-weight: 800; font-size: 18px; color: var(--nav-text); overflow-x: auto; }
.mh-osen-nav li { white-space: nowrap; cursor: pointer; }
.mh-osen-nav li:hover { color: var(--accent); }

/* ============ Masthead: MINIMAL ============ */
.mh-minimal { background: var(--header-bg); border-bottom: 1px solid var(--line); text-align: center; }
.mh-minimal .mh-min { padding: 28px 20px 18px; }
.mh-minimal .brand { font-family: var(--headline-font); font-weight: 900; font-size: 28px; letter-spacing: 2px; color: var(--brand-color); }
.mh-minimal .tagline { color: var(--muted); font-size: 13px; margin-top: 4px; letter-spacing: 1px; }
.mh-minimal-nav ul { display: flex; justify-content: center; gap: 24px; list-style: none; margin: 14px 0 0; padding: 0; font-weight: 700; font-size: 15px; }
.mh-minimal-nav li { cursor: pointer; }
.mh-minimal-nav li:hover { color: var(--accent); }

/* ============ Layout ============ */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 44px; padding-top: 30px; padding-bottom: 60px; }
.content { min-width: 0; }

/* ============ Home ============ */
.cat-tag { display: inline-block; background: var(--line-2); color: var(--ink-2); font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 3px; margin-bottom: 12px; }
.cat-tag.big { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-size: 13px; }
.lead { display: block; margin-bottom: 34px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.lead-img { margin-bottom: 18px; border-radius: 6px; overflow: hidden; aspect-ratio: 16/9; }
.lead-img img { width: 100%; height: 100%; object-fit: cover; }
.lead h2 { font-family: var(--headline-font); font-weight: 900; font-size: 34px; line-height: 1.3; letter-spacing: -0.5px; margin: 6px 0 10px; }
.lead p { color: var(--ink-2); font-size: 17px; margin: 0 0 10px; }
.byline { color: var(--muted); font-size: 13px; font-weight: 700; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; }
.card-img { aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; background: var(--line-2); margin-bottom: 12px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.noimg { background: linear-gradient(135deg, #f3f4f7, #e9ebf0); }
.card h3 { font-family: var(--headline-font); font-weight: 800; font-size: 19px; line-height: 1.35; letter-spacing: -0.4px; margin: 4px 0 8px; }
.card p { color: var(--ink-2); font-size: 14px; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty-lead { padding: 60px 20px; text-align: center; border: 2px dashed var(--line); border-radius: 10px; }
.empty-lead h2 { font-weight: 900; font-size: 26px; }
.empty-lead p { color: var(--muted); }

/* ============ Sidebar ============ */
.sb-sticky { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 26px; }
.sb-widget { min-width: 0; }
.sb-image img { width: 100%; border-radius: 8px; display: block; }
.sb-image .sb-cap { font-size: 13px; color: var(--muted); margin: 8px 2px 0; line-height: 1.5; }
.sb-text { background: var(--line-2); border-radius: 10px; padding: 18px 18px; }
.sb-text h3 { font-weight: 900; font-size: 17px; margin: 0 0 10px; color: var(--ink); }
.sb-text p { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); margin: 0 0 10px; }
.sb-text p:last-child { margin-bottom: 0; }
.best h3 { font-weight: 900; font-size: 20px; padding-bottom: 12px; border-bottom: 3px solid var(--ink); margin: 0 0 6px; }
.best-list { list-style: none; margin: 0; padding: 0; }
.best-list li { display: flex; gap: 12px; align-items: flex-start; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; font-weight: 700; line-height: 1.45; }
.best-list li .rank { color: var(--accent); font-weight: 900; font-size: 17px; min-width: 16px; }
.best-list li.on { color: var(--accent); }
.best-list li a:hover { text-decoration: underline; }
.best-list li.empty { color: var(--muted); font-weight: 400; }

/* ============ Article ============ */
.article .headline { font-family: var(--headline-font); font-weight: 900; font-size: var(--headline-size); line-height: 1.28; letter-spacing: -1.2px; margin: 8px 0 16px; color: var(--ink); }
.article .subhead { font-size: 18px; color: var(--ink-2); font-weight: 700; margin: 0 0 18px; }
.article .meta { display: flex; gap: 12px; align-items: center; padding-top: 8px; font-size: 14px; }
.article .meta .brand-mini { font-weight: 900; color: var(--accent); }
.article .meta .author { font-weight: 800; }
.article .meta .date { color: var(--muted); }
.article .meta-rule { height: 3px; background: var(--ink); margin: 12px 0 0; }
.article .hero { margin: 24px 0; border-radius: 6px; overflow: hidden; }

.article .body { margin-top: 26px; }
.article .body p { font-family: var(--body-font); font-size: var(--body-size); line-height: 1.95; letter-spacing: -0.2px; color: #23262d; margin: 0 0 26px; }
.article .body h2 { font-family: var(--headline-font); font-weight: 900; font-size: calc(var(--body-size) + 8px); letter-spacing: -0.6px; margin: 44px 0 16px; }
.article .body h3 { font-family: var(--headline-font); font-weight: 800; font-size: calc(var(--body-size) + 3px); margin: 34px 0 12px; }
.article .body figure.img { margin: 30px 0; }
.article .body figure.img img { width: 100%; border-radius: 6px; }
.article .body figure.video { margin: 30px 0; }
.article .body figure.video video { width: 100%; border-radius: 6px; background: #000; display: block; }
.article .body .embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 6px; overflow: hidden; background: #000; }
.article .body .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article .body blockquote { font-family: var(--body-font); margin: 30px 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--accent); font-size: calc(var(--body-size) + 1px); color: var(--ink-2); font-style: italic; }
.article .body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.article .body a { color: var(--accent); border-bottom: 1px solid currentColor; }
.article .body strong { color: var(--ink); }
.article-end { margin: 40px 0 10px; padding: 22px; background: var(--line-2); border-radius: 8px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; }

/* tags */
.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 14px; }
.tag-chip { background: #1b1d22; color: #fff; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 20px; }
.tag-chip:hover { background: var(--accent); }
.copyright { color: var(--muted); font-size: 13px; margin: 8px 0 30px; }

/* author card */
.author-card { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin: 10px 0 40px; }
.author-card .ac-head { display: flex; align-items: center; gap: 16px; }
.author-card .ac-avatar { width: 66px; height: 66px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--line-2); }
.author-card .ac-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-card .ac-initial { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: #fff; background: var(--accent); }
.author-card .ac-name { font-size: 18px; font-weight: 900; }
.author-card .ac-dept { font-weight: 700; color: var(--ink-2); font-size: 15px; margin-left: 4px; }
.author-card .ac-email { display: inline-block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.author-card .ac-others { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.author-card .ac-others li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.author-card .ac-others a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-card .ac-others a:hover { color: var(--accent); }
.author-card .ac-others .od { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* taboola */
.taboola { margin: 20px 0 44px; }
.taboola .tb-head { display: flex; align-items: baseline; gap: 10px; border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 16px; }
.taboola .tb-head h3 { font-size: 19px; font-weight: 900; margin: 0; }
.taboola .tb-by { color: var(--muted); font-size: 12px; margin-left: auto; }
.taboola .tb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 16px; }
.taboola-card { display: block; }
.taboola-card .tb-img { position: relative; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--line-2); margin-bottom: 8px; }
.taboola-card .tb-img img { width: 100%; height: 100%; object-fit: cover; }
.taboola-card .tb-ad { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 3px; }
.taboola-card .tb-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; margin: 0 0 4px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.taboola-card .tb-src { color: var(--muted); font-size: 12px; }

/* comments */
.comments { border-top: 1px solid var(--line); padding-top: 22px; }
.cm-policy { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }
.cm-top h3 { font-size: 18px; font-weight: 900; margin: 0 0 12px; }
.cm-top .cm-refresh { color: var(--muted); cursor: pointer; font-weight: 400; }
.cm-form { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.cm-form .cm-name { width: 140px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; font-family: var(--sans); }
.cm-form .cm-body { display: block; width: 100%; border: 0; resize: vertical; min-height: 44px; font-size: 15px; font-family: var(--sans); outline: none; line-height: 1.6; }
.cm-form .cm-submit { float: right; background: var(--ink); color: #fff; border: 0; padding: 8px 20px; border-radius: 7px; font-weight: 800; cursor: pointer; font-family: var(--sans); }
.cm-form .cm-submit:hover { background: var(--accent); }
.cm-form::after { content: ''; display: block; clear: both; }
.cm-sort { display: flex; gap: 16px; font-size: 14px; font-weight: 700; color: var(--muted); padding: 10px 2px; }
.cm-sort span { cursor: pointer; }
.cm-sort span.on { color: var(--ink); }
.cm-clean { background: #f3faf4; color: #2e7d43; font-size: 13px; font-weight: 700; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; }
.cm-list { }
.cm-item { display: flex; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.cm-ava { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 16px; }
.cm-main { flex: 1; min-width: 0; }
.cm-head { display: flex; align-items: center; gap: 8px; }
.cm-user { font-weight: 800; font-size: 14px; }
.cm-follow { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; cursor: pointer; }
.cm-date { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.cm-text { font-size: 15px; line-height: 1.65; color: #23262d; }
.cm-actions { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cm-actions span { cursor: pointer; }
.cm-actions .cm-vote b { color: var(--ink-2); }
.cm-actions .cm-vote:hover { color: var(--accent); }

/* paywall popup */
.pw-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.pw-box { background: #2b2d31; color: #e8eaed; border-radius: 12px; padding: 26px 26px 20px; max-width: 340px; width: 86%; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.pw-box .pw-msg { font-size: 15.5px; line-height: 1.6; margin-bottom: 20px; }
.pw-box .pw-ok { display: block; margin-left: auto; background: #5b8def; color: #fff; border: 0; padding: 9px 22px; border-radius: 8px; font-weight: 800; cursor: pointer; font-family: var(--sans); font-size: 14px; }
.pw-box .pw-ok:hover { background: #4a7be0; }

@media (max-width: 700px) {
  .taboola .tb-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Footer / buttons ============ */
.site-foot { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 14px; }
.site-foot a { color: var(--ink-2); font-weight: 700; }
.site-foot a:hover { color: var(--accent); }
.btn { display: inline-block; background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 6px; font-weight: 800; margin-top: 16px; }
.btn:hover { background: var(--accent); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 34px; }
  .card-grid { grid-template-columns: 1fr; }
  .article .headline { font-size: calc(var(--headline-size) * 0.72); }
  .lead h2 { font-size: 26px; }
  .best { position: static; }
  .mh-osen .mh-bar { height: auto; padding: 14px 20px; flex-wrap: wrap; gap: 14px; }
  .mh-summit .mh-top { grid-template-columns: 1fr; }
  .mh-summit .brand, .mh-summit .tagline { grid-column: 1; justify-self: center; text-align: center; }
}

/* ================= Dashboard (unchanged look, own bg) ================= */
.dash-mode { background: #f7f8fa; }
.dash-head { background: #fff; border-bottom: 1px solid var(--line); }
.dash-head .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.dash-head .brand { font-family: 'Black Han Sans'; font-size: 24px; color: var(--accent); }
.dash-head .brand span { color: var(--ink); }
.dash-title { font-weight: 800; font-size: 17px; }
.dash-head nav { margin-left: auto; display: flex; gap: 18px; font-weight: 700; font-size: 14px; }
.dash-head nav a:hover { color: var(--accent); }
.dash { padding-top: 30px; padding-bottom: 70px; }
.dash h1 { font-weight: 900; font-size: 28px; letter-spacing: -0.6px; margin: 0 0 6px; }
.dash h2 { font-weight: 900; font-size: 20px; margin: 34px 0 4px; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.dash-crumb { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.dash-crumb a:hover { color: var(--accent); }
.dash-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.dash-table th, .dash-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.dash-table th { background: #fafbfc; font-weight: 800; color: var(--ink-2); font-size: 13px; }
.dash-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-table .t-title a { font-weight: 800; }
.dash-table .t-title a:hover { color: var(--accent); }
.dash-table .slug { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.dash-table .empty { text-align: center; color: var(--muted); padding: 34px; }
.mini-bar { display: inline-block; width: 70px; height: 6px; background: var(--line); border-radius: 3px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--blue); }
.btn.sm { padding: 6px 12px; font-size: 13px; margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 8px; }
.tile { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); text-align: center; }
.tile .tv { display: block; font-size: 30px; font-weight: 900; letter-spacing: -1px; }
.tile .tl { color: var(--muted); font-size: 13px; font-weight: 700; }
.insight { background: #fff7e6; border: 1px solid #ffe1a8; color: #7a5200; padding: 16px 18px; border-radius: 10px; font-size: 15px; font-weight: 600; margin: 18px 0; }
.insight b { color: var(--accent); }
.funnel { background: #fff; border-radius: 10px; padding: 8px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.funnel-row { display: grid; grid-template-columns: 260px 1fr 130px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.funnel-row:last-child { border-bottom: 0; }
.funnel-row.head { font-weight: 800; font-size: 12px; color: var(--muted); }
.fr-label { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-label .tag { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 3px; background: var(--line); color: var(--ink-2); margin-right: 6px; text-transform: uppercase; }
.fr-label .tag.h2, .fr-label .tag.h3 { background: #e6f0ff; color: var(--blue); }
.fr-label .tag.image { background: #e9f9ee; color: #178a3f; }
.fr-label .tag.video { background: #fdeaf1; color: #c81e6a; }
.fr-bar { position: relative; height: 30px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.fr-bar .fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, #1a54d8, #4b7be8); border-radius: 5px; }
.fr-bar .fr-pct { position: absolute; left: 10px; top: 0; height: 100%; display: flex; align-items: center; font-size: 12px; font-weight: 800; color: #fff; mix-blend-mode: difference; }
.fr-drop { text-align: right; font-size: 13px; font-weight: 800; }
.fr-drop.low { color: var(--muted); }
.fr-drop.mid { color: #d98200; }
.fr-drop.high { color: var(--accent); }
.funnel-row.worst { background: #fff5f5; margin: 0 -18px; padding-left: 18px; padding-right: 18px; border-radius: 6px; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .funnel-row { grid-template-columns: 110px 1fr 80px; gap: 8px; }
  .dash-table .slug { display: none; }
}
