/* 차러브레터AI — AIForA 표준(counsel) 토큰: 크림 바탕 + 브라운 글씨 + 골드 포인트, 라이트 전용 */
:root {
  --bg: #fdfaf3; --surface: #ffffff; --paper: #f4e6cf; --paper-2: #e0c8a4;
  --ink: #3a2817; --ink-2: #5b4430; --muted: #8a7560; --gold: #b88a5e; --gold-dim: #8a6b52;
  --line: rgba(139, 90, 43, .18); --line-2: rgba(139, 90, 43, .32);
  --seal: #9c3b2e; --ok: #3f7a4f; --warn: #a8702a; --bad: #a2413a;
  --radius: 16px; --radius-s: 10px;
  --shadow: 0 18px 50px rgba(58, 40, 23, .14); --shadow-s: 0 4px 16px rgba(58, 40, 23, .08);
  --serif: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  --sans: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; line-height: 1.3; margin: 0; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(253, 250, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--muted); line-height: 1; }
.brand b { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.15; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.nav a:hover { background: var(--paper); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  font: 600 15px/1 var(--sans); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, opacity .15s; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dim); }
.btn-s { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.nav .btn { margin-left: 6px; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } .brand small { display: none; } }

/* 히어로 */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--gold-dim); text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(34px, 5.2vw, 60px); font-weight: 700; letter-spacing: -.02em; line-height: 1.22; }
.hero h1 em { font-style: normal; color: var(--seal); }
.hero .lead { font-size: 18px; color: var(--ink-2); margin: 22px 0 28px; max-width: 34em; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .org { margin-top: 26px; font-size: 13px; color: var(--muted); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } .hero { padding-top: 40px; } }

/* 편지 카드 (히어로 오른쪽 · 최신 기사) */
.letter { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 26px 22px; text-decoration: none; display: block; }
.letter::before { content: ""; position: absolute; inset: 10px; border: 1px dashed var(--line-2); border-radius: 10px; pointer-events: none; }
.letter .to { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.letter h3 { font-family: var(--serif); font-size: 22px; margin: 10px 0 8px; }
.letter p { margin: 0; color: var(--ink-2); font-size: 15px; }
.letter .from { margin-top: 16px; font-size: 13px; color: var(--muted); }
.letter .stamp { position: absolute; top: -18px; right: 18px; }
.letter img { border-radius: 10px; margin: -6px 0 14px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }

/* 소인(배심 점수) — 이 사이트의 단 하나뿐인 강한 장식 */
.stamp { width: 86px; height: 86px; border-radius: 50%; border: 2.5px solid var(--seal); color: var(--seal); display: grid; place-items: center;
  text-align: center; background: rgba(253, 250, 243, .94); transform: rotate(-9deg); box-shadow: inset 0 0 0 4px rgba(253, 250, 243, .94), inset 0 0 0 5.5px var(--seal); }
.stamp b { display: block; font: 800 26px/1 var(--sans); font-variant-numeric: tabular-nums; }
.stamp span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; margin-top: 3px; }
.stamp.sm { width: 64px; height: 64px; border-width: 2px; }
.stamp.sm b { font-size: 19px; } .stamp.sm span { font-size: 8.5px; }

/* 지표 4칸 */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.facts div { padding: 22px 24px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 6px 0 0; font: 800 30px/1.1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.facts dd small { font-size: 15px; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
@media (max-width: 720px) { .facts { grid-template-columns: repeat(2, 1fr); } .facts div:nth-child(2) { border-right: 0; } .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* 섹션 */
.sec { padding: 64px 0 8px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); }
.sec-head p { margin: 6px 0 0; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; color: var(--ink-2); background: var(--surface); cursor: pointer; font-family: var(--sans); }
.chip.on, .chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* 기사 목록 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--paper), var(--paper-2)); position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .stamp { position: absolute; right: 12px; bottom: -22px; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .cat { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--gold-dim); }
.card h3 { font-family: var(--serif); font-size: 19px; }
.card p { margin: 0; font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 48px 24px; text-align: center; color: var(--muted); background: var(--surface); }

/* 과정 4단계 */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--gold-dim); font-weight: 800; margin-bottom: 14px; }
.steps h3 { font-size: 17px; margin-bottom: 6px; }
.steps p { margin: 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rules div { background: linear-gradient(135deg, var(--paper), #f8eedd); border-radius: var(--radius); padding: 20px 22px; }
.rules b { display: block; margin-bottom: 4px; }
.rules p { margin: 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 720px) { .rules { grid-template-columns: 1fr; } }

.foot { margin-top: 72px; border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 13px; color: var(--muted); }
.foot .wrap { display: grid; gap: 8px; }

/* 기사 본문 */
.article { max-width: 720px; margin: 0 auto; padding: 44px 20px 0; }
.article .cat { font-size: 13px; font-weight: 700; color: var(--gold-dim); letter-spacing: .04em; }
.article h1 { font-family: var(--serif); font-size: clamp(28px, 4.2vw, 42px); letter-spacing: -.015em; margin: 12px 0 12px; }
.article .sub { font-size: 19px; color: var(--ink-2); margin: 0 0 22px; line-height: 1.55; }
.byline { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.byline .who b { display: block; }
.byline .who span { color: var(--muted); font-size: 13px; }
.byline .stamp { margin-left: auto; }
.figure { margin: 28px 0 6px; }
.figure img { border-radius: var(--radius-s); width: 100%; }
.figure figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.prose { font-size: 17.5px; line-height: 1.9; }
.prose p { margin: 0 0 1.15em; }
.prose p:first-child { font-weight: 600; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 28px 0; }
.box h2 { font-size: 16px; margin-bottom: 10px; }
.box dl { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.box dt { color: var(--muted); }
.box dd { margin: 0; word-break: break-word; }
.jtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.jtable th, .jtable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.jtable td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.PASS { background: #e6f1e8; color: var(--ok); } .pill.REVISE { background: #f7ecd9; color: var(--warn); }
.pill.REJECT, .pill.NO_QUORUM { background: #f6e3e0; color: var(--bad); } .pill.NA { background: #eee; color: #777; }
.tabs { display: flex; gap: 6px; margin: 36px 0 14px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cn { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.cn img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.cn div { padding: 12px 14px; font-size: 13.5px; }
.cn b { display: block; font-size: 15px; margin-bottom: 4px; }
video { width: 100%; border-radius: var(--radius-s); background: #000; }
.story { background: linear-gradient(135deg, #fff9ee, var(--paper)); border-radius: var(--radius); padding: 24px 26px; font-size: 16.5px; line-height: 1.9; }
.story p { margin: 0 0 1em; }


/* 기자단 띠 (2026-09-29) — 첫 화면 #reporters */
.rpstrip{display:flex;flex-wrap:wrap;gap:9px}
.rpchip{display:flex;align-items:center;gap:9px;padding:7px 13px 7px 7px;border:1px solid #e6e0d6;
  border-radius:40px;background:#fff;text-decoration:none;color:inherit;transition:border-color .15s}
.rpchip:hover{border-color:#8a6a2f}
.rpdot{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:.82rem;flex:none}
.rpchip b{font-size:.93rem;font-weight:700}
.rpchip i{font-style:normal;color:#8a6a2f;font-size:.82rem}

/* ── 제목 두 줄 (2026-09-30 박교수) ──
   hero 글 칸은 약 600px 인데 제목이 60px 이라 한글 12~13자가 한 줄에 안 들어가 석 줄로 깨졌다.
   13자가 들어가는 46px 로 낮춘다. */
.hero h1 { font-size: clamp(23px, 5vw, 46px); }

/* ── 모바일 손질 (2026-09-30 박교수: 네 포털 모두 모바일 최적화) ── */
@media (max-width: 640px) {
  /* 첫 제목은 두 줄로. 데스크톱용 줄바꿈을 숨기고 글자를 줄여 저절로 두 줄이 되게 한다 */
  .hero h1 .hbr, .hero h1 br.hbr { display: none; }
  .hero h1 { font-size: clamp(23px, 7vw, 34px); line-height: 1.3; letter-spacing: -.01em; }
  .hero { padding: 26px 0 28px; }
  .hero .lead { font-size: 16px; margin: 16px 0 18px; }
  .hero .genre { font-size: .9rem !important; }
  .hero .eyebrow { font-size: 12px; }
  .hero .cta .btn { flex: 1 1 46%; justify-content: center; padding: 12px 14px; }
  .wrap { padding: 0 16px; }

  /* 숫자 네 칸은 두 줄로 */
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts .num { font-size: 26px; }

  /* 분야 알약이 한 줄에 몰려 옆으로 삐져나가지 않게 */
  .chips { flex-wrap: wrap; gap: 6px; }
  .chip { font-size: 13px; padding: 6px 10px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* 기사 카드·기자단 띠 */
  .grid { grid-template-columns: 1fr; }
  .rpstrip { gap: 8px; }
  .rpchip { font-size: 13px; }

  /* 편지 상자(오늘의 기사)와 도장 */
  .letter { padding: 18px 16px; }
  .letter h3 { font-size: 19px; }
  .stamp { width: 64px; height: 64px; }
  .stamp b { font-size: 19px; }

  /* 기사 본문 */
  .article h1 { font-size: clamp(22px, 6.4vw, 30px); }
  .article .body { font-size: 16.5px; }

  /* 표·영상이 화면을 넘지 않게 */
  img, video, table { max-width: 100%; height: auto; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 22px; }
  .facts .num { font-size: 23px; }
}

/* ── 많이 본 기사 (2026-09-30 박교수) ── */
.toplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toplist li a { display: flex; align-items: center; gap: 14px; padding: 13px 14px; text-decoration: none;
  border-radius: var(--radius-s); transition: background .15s; }
.toplist li a:hover { background: var(--paper); }
.toplist .rank { flex: none; width: 30px; text-align: center; font: 800 19px/1 var(--sans);
  color: var(--gold); font-variant-numeric: tabular-nums; }
.toplist li:first-child .rank { color: var(--seal); font-size: 22px; }
.toplist .tt { flex: 1 1 auto; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toplist .vv { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.byline .views { margin-left: auto; }
@media (max-width: 640px) {
  .toplist li a { gap: 10px; padding: 11px 8px; }
  .toplist .rank { width: 22px; font-size: 17px; }
  .toplist .tt { font-size: 15px; }
  .toplist .vv { font-size: 12px; }
}
