/* The-현명한 자동차보험 이야기: 첫 화면과 본문 화면의 모양 (원본. site/assets/blog.css는 이 파일의 복사본)
   기본 틀(색·글꼴·간격·모서리)은 스타일 가이드(brunch.md)를 따르고,
   첫 화면은 시안 A(증권 서식 같은 글 목록)와 시안 C(큰 질문 한 칸)를 섞었다. */
:root {
  --bg: #FFFFFF;
  --subtle: #FBFBFB;
  --soft: #F8F8F8;
  --text: #333333;
  --sub: #666666;
  --faint: #959595;
  --line: #DDDDDD;
  --line2: #EEEEEE;
  --ink: #171717;
  --teal: #00C6BE;
  --teal-dark: #007A75;
  --warn-bg: #FFF7E6;
  --warn-fg: #8A651E;
  --serif: 'Nanum Myeongjo', 'Batang', 'AppleMyungjo', serif;
  --sans: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --max: 1100px;
  --reader: 700px;
  --gutter: 32px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 16px/1.9 var(--sans);
  letter-spacing: .02em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 4px; }

.in {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 8px; }

/* 맨 위 줄 */
.top-in { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.mark { font: 400 15px/1.4 var(--serif); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 13px; }
.icon-btn { background: none; border: 0; padding: 8px; margin: -8px; color: var(--sub); cursor: pointer; line-height: 0; }
.icon-btn:hover { color: var(--text); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.text-link { color: var(--sub); text-decoration: none; letter-spacing: 0; }
.text-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.search { padding-bottom: 12px; }
.search input {
  width: 100%; min-height: 44px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: var(--bg); color: var(--text); font: 300 16px/1.6 var(--sans);
}
.search input:focus { outline: none; border-bottom-color: var(--teal-dark); }
.search input::placeholder { color: var(--faint); }

/* 첫 화면 */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; padding-top: 40px; padding-bottom: 72px; align-items: stretch; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(38px, 4.6vw, 54px); line-height: 1.25; letter-spacing: -.03em; }
.lede { margin-top: 28px; max-width: 24em; color: var(--sub); font-size: 15px; }

.feature {
  background: var(--ink); color: #fff; padding: 48px; min-height: 380px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.feature .meta { display: flex; gap: 14px; font-size: 12px; line-height: 20px; color: rgba(255,255,255,.62); letter-spacing: 0; }
.feature h2 { margin-top: 20px; color: #fff; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.4; letter-spacing: -.035em; }
.feature h2 a { text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
.feature .sum { margin-top: 24px; max-width: 32em; color: rgba(255,255,255,.82); font-size: 15px; line-height: 2; }
.feature :focus-visible { outline-color: var(--teal); }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 26px; border-radius: 100px;
  background: var(--teal); color: var(--ink); font: 400 14px/1 var(--sans); letter-spacing: .02em; text-decoration: none;
}
.btn:hover { background: #27CEC5; }
.btn:active { transform: translateY(1px); }

/* 글 목록: 증권 서식처럼 선으로 나눈다 */
.shelf { padding-bottom: 96px; }
.shelf > h2 { font-size: 24px; line-height: 1.45; letter-spacing: -.035em; margin-bottom: 20px; }
.sheet { border-top: 2px solid var(--text); }
.sheet-head, .row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 84px; gap: 20px; }
.sheet-head { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 20px; color: var(--faint); letter-spacing: 0; }
.sheet-head span:last-child { text-align: right; }
.row { position: relative; padding: 24px 0; border-bottom: 1px solid var(--line2); }
.row .cat { color: var(--sub); font-size: 13px; line-height: 2.2; letter-spacing: 0; }
.row h3 { font-size: 22px; line-height: 1.5; letter-spacing: -.035em; }
.row h3 a { text-decoration: none; }
.row h3 a::after { content: ""; position: absolute; inset: 0; }
.row:hover h3 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.row p { margin-top: 6px; font-size: 13px; line-height: 23px; color: var(--sub); letter-spacing: 0; }
.row time { font-size: 12px; line-height: 2.6; color: var(--faint); text-align: right; letter-spacing: 0; }
.empty, .status { color: var(--sub); font-size: 14px; border-top: 2px solid var(--text); padding-top: 24px; }
.status { border-top: 0; padding: 0 0 16px; }

/* 본문 화면 */
.read { max-width: calc(var(--reader) + 2 * var(--gutter)); padding-bottom: 80px; }
.post-head { padding-top: 56px; }
.post-cat { font-size: 13px; line-height: 20px; color: var(--sub); letter-spacing: 0; }
.post-head h1 { margin-top: 12px; font-size: clamp(32px, 5.4vw, 45px); line-height: 1.3; letter-spacing: -.03em; }
.post-meta { margin-top: 20px; display: flex; gap: 16px; font-size: 12px; line-height: 20px; color: var(--faint); letter-spacing: 0; }
.prose { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line2); font-size: 17px; line-height: 2; }
.prose > * { margin-top: 0; margin-bottom: 28px; }
.prose h2 { margin-top: 64px; margin-bottom: 20px; font-size: 26px; line-height: 1.5; letter-spacing: -.04em; }
.prose h3 { margin-top: 44px; margin-bottom: 14px; font-size: 20px; line-height: 1.5; letter-spacing: -.035em; }
.prose h4 { margin-top: 32px; margin-bottom: 12px; font: 500 16px/1.6 var(--sans); }
.prose strong { font-weight: 500; color: var(--ink); }
.prose a { color: var(--teal-dark); text-underline-offset: 4px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0 0 10px; }
.prose li > ul, .prose li > ol { margin: 10px 0 0; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 18px 22px; background: var(--subtle); color: var(--sub); font-size: 15px; line-height: 1.9; }
.prose blockquote > * { margin: 0; }
.prose blockquote > * + * { margin-top: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line2); margin: 56px 0; }
.prose code { font: 400 .9em/1.6 Consolas, 'D2Coding', monospace; background: var(--soft); padding: 2px 6px; }
.prose pre { overflow-x: auto; background: var(--soft); padding: 16px 20px; }
.prose pre code { background: none; padding: 0; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { margin-top: 10px; font-size: 12px; line-height: 20px; color: var(--faint); letter-spacing: 0; }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; line-height: 1.7; letter-spacing: 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line2); }
.prose th { font-weight: 500; border-bottom: 1px solid var(--text); }
.flag { background: var(--warn-bg); color: var(--warn-fg); padding: 1px 8px; border-radius: 40px; font-size: .78em; font-weight: 400; letter-spacing: 0; white-space: nowrap; }

.pager { margin-top: 24px; border-top: 2px solid var(--text); }
.pg { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line2); text-decoration: none; }
.pg-l { font-size: 12px; color: var(--faint); letter-spacing: 0; }
.pg-t { font: 400 18px/1.55 var(--serif); letter-spacing: -.035em; color: var(--ink); }
.pg:hover .pg-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

.foot { border-top: 1px solid var(--line2); padding-top: 28px; padding-bottom: 48px; font-size: 12px; line-height: 20px; color: var(--faint); letter-spacing: 0; }
.foot .notice { max-width: 46em; margin-bottom: 8px; }

@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 24px; padding-bottom: 48px; }
  .feature { padding: 32px 24px; min-height: 0; }
  .shelf { padding-bottom: 64px; }
  .sheet-head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 20px 0; }
  .row .cat { line-height: 1.6; }
  .row time { text-align: left; line-height: 1.6; }
  .row h3 { font-size: 20px; }
  .post-head { padding-top: 32px; }
  .prose { font-size: 16px; margin-top: 32px; padding-top: 28px; }
  .prose h2 { margin-top: 48px; font-size: 23px; }
  .pg { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
