/*
 * 새 메인 화면(WHAT'S IN FOCUS) 디자인.
 *
 * rental-lab-main-design 시안의 스타일시트를 그대로 옮긴 것이다. 지금까지 쓰던
 * public.css 와는 아예 다른 디자인이라 섞지 않는다 - 이 파일은 새 레이아웃
 * (layout/focus.html)을 쓰는 화면만 부른다. public.css / tokens.css / cms.css 를
 * 바이트 단위로 유지하는 규칙은 그대로다.
 *
 * 시안은 자바스크립트가 카드를 그리는 목업이었다. 여기서는 서버가 HTML 을 완성해
 * 내려보내므로(검색·AI 가 내용을 읽어야 한다) 클래스 이름만 그대로 쓰고 마크업은
 * 템플릿이 만든다.
 */


    :root { --ink:#20374b; --muted:#5d7488; --line:#dce6ed; --navy:#17324d; --blue:#4e84a7; --blue-ink:#3b739c; --pale:#d9e8f1; --surface:#f4f8fb; --shadow:0 12px 32px rgb(23 50 77 / 8%); }
    *,*::before,*::after { box-sizing:border-box; }
    html { scroll-behavior:smooth; scrollbar-gutter:stable; }
    body { margin:0; background:#fff; color:var(--ink); font-family:"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",Arial,sans-serif; word-break:keep-all; -webkit-font-smoothing:antialiased; }
    a { color:inherit; text-decoration:none; }
    button,input { font:inherit; color:inherit; }
    button { cursor:pointer; }
    svg { display:block; }
    [hidden] { display:none!important; }
    :focus-visible { outline:3px solid var(--blue); outline-offset:4px; }
    .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    .skip-link { position:fixed; z-index:20; top:-70px; left:20px; padding:12px 18px; background:var(--navy); color:white; }
    .skip-link:focus { top:12px; }
    .container { max-width:1120px; margin-inline:auto; padding-inline:32px; }
    .masthead { display:flex; align-items:center; justify-content:space-between; padding-top:18px; padding-bottom:18px; }
    .brand { display:inline-flex; align-items:center; gap:9px; color:var(--navy); }
    .brand svg { width:34px; height:40px; flex:none; }
    .brand-name { display:block; font-size:23px; font-weight:800; letter-spacing:-1.1px; line-height:1.15; }
    .brand-en { display:block; margin-top:6px; color:var(--blue-ink); font:600 7px/1 Arial,sans-serif; letter-spacing:2.6px; }
    .search-toggle { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:none; color:#17324d; }
    .search-toggle:hover { background:var(--surface); }
    .search-toggle svg { width:23px; height:23px; }
    .feature-viewport { overflow:hidden; border-radius:18px; box-shadow:var(--shadow); }
    .feature-slide { background:#fff; }
    .feature-slide > a { min-height:360px; display:grid; grid-template-columns:1.18fr .82fr; }
    .feature-art { min-height:360px; position:relative; overflow:hidden; background:var(--pale); }
    .feature-art img { position:absolute; inset:0; }
    .feature-copy { padding:38px; display:flex; flex-direction:column; justify-content:center; background:var(--surface); }
    .feature-kicker { color:var(--navy); font:900 10px/1 Arial,sans-serif; letter-spacing:.12em; }
    .feature-copy h2 { margin:14px 0 16px; color:var(--navy); font-size:30px; line-height:1.4; letter-spacing:-.055em; }
    .feature-copy p { margin:0; color:var(--muted); font-size:13px; line-height:1.8; }
    .feature-copy small { margin-top:22px; color:var(--muted); font-size:10px; font-weight:600; line-height:1.4; }
    .feature-controls { display:flex; justify-content:center; align-items:center; gap:12px; margin-top:14px; }
    .feature-controls button { width:34px; height:34px; border:1px solid var(--line); border-radius:50%; background:#fff; color:var(--navy); }
    .feature-position { min-width:42px; color:var(--muted); text-align:center; font:800 10px/1 Arial,sans-serif; }
    .focus-section { padding-top:38px; }
    .focus-title { margin:0; color:var(--navy); text-align:center; font-family:"Arial Black",Arial,sans-serif; font-size:52px; font-weight:950; line-height:1.07; letter-spacing:-.045em; }
    .focus-tabs { display:flex; justify-content:center; gap:26px; margin:26px 0 34px; }
    .focus-tabs button { position:relative; padding:10px 7px 14px; border:0; background:none; color:var(--muted); font:400 23px/1 Arial,sans-serif; letter-spacing:-.045em; }
    .focus-tabs button[aria-selected="true"] { color:var(--navy); font-weight:800; }
    .focus-tabs button[aria-selected="true"]::after { content:""; position:absolute; bottom:0; left:0; right:0; height:3px; background:var(--blue); }
    .portrait-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
    .portrait-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:#fff; box-shadow:0 6px 18px rgb(23 50 77 / 4%); transition:transform .2s ease,box-shadow .2s ease; }
    .portrait-card > a { height:100%; display:flex; flex-direction:column; }
    .portrait-card > a:focus-visible { outline:3px solid var(--blue); outline-offset:-4px; }
    .portrait-card:hover { transform:translateY(-3px); box-shadow:0 12px 26px rgb(23 50 77 / 10%); }
    .thumbnail { position:relative; overflow:hidden; aspect-ratio:4/3; background:var(--pale); }
    .news-image { display:block; width:100%; height:100%; object-fit:cover; filter:saturate(.72) contrast(.98); }
    .thumbnail::after,.feature-art::after { content:""; position:absolute; inset:0; background:linear-gradient(135deg,rgb(23 50 77 / 8%),rgb(78 132 167 / 6%)); pointer-events:none; }
    .portrait-copy { flex:1; display:flex; flex-direction:column; padding:20px 18px 18px; }
    .portrait-category { margin-bottom:10px; color:var(--blue-ink); font-size:10px; font-weight:700; line-height:1.5; letter-spacing:.04em; }
    .portrait-copy h3 { margin:0 0 10px; color:var(--navy); font-size:17px; line-height:1.5; letter-spacing:-.045em; }
    .portrait-copy p { margin:0 0 20px; color:var(--muted); font-size:12px; line-height:1.7; }
    .portrait-meta { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:auto; padding-top:14px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; line-height:1.5; }
    .portrait-meta .read-arrow { color:var(--blue); font-size:17px; }
    .series-section { padding-top:72px; padding-bottom:44px; }
    .series-title { margin:0 0 36px; color:var(--navy); text-align:center; font-family:"Arial Black",Arial,sans-serif; font-size:34px; font-weight:950; line-height:1; letter-spacing:-.04em; }
    .series-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
    .series-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:15px; background:white; }
    .series-card > a { display:block; height:100%; }
    .series-card .thumbnail { aspect-ratio:2.06/1; }
    .series-copy { padding:24px; }
    .series-copy small { color:var(--blue-ink); font:700 10px/1 Arial,sans-serif; letter-spacing:.08em; }
    .series-copy h3 { margin:12px 0 9px; color:var(--navy); font-size:24px; line-height:1.35; letter-spacing:-.04em; }
    .series-copy p { margin:0; color:var(--muted); font-size:13px; line-height:1.8; }
    .series-copy .series-link { display:block; margin-top:20px; color:var(--blue-ink); font-size:12px; font-weight:700; }
    .series-card:hover h3 { text-decoration:underline; text-underline-offset:5px; }
    .series-episodes { padding:0; list-style:none; }
    .series-episodes a { display:block; padding:17px 0; border-bottom:1px solid var(--line); color:var(--navy); font-size:15px; line-height:1.6; }
    .series-episodes a:hover { color:var(--blue); text-decoration:underline; }
    .newsletter-section { margin-top:4px; padding:36px 20px 44px; background:var(--surface); }
    .newsletter-shell { max-width:440px; margin:0 auto; padding:32px; border-radius:13px; background:white; box-shadow:0 10px 25px rgb(23 31 51 / 6%); }
    .newsletter-kicker { color:var(--blue-ink); font:900 8px/1 Arial,sans-serif; letter-spacing:.14em; }
    .newsletter-shell h2 { margin:15px 0 10px; font-size:24px; line-height:1.2; letter-spacing:-.055em; }
    .newsletter-shell > p { margin:0; color:var(--muted); font-size:11px; line-height:1.7; }
    .newsletter-form { margin-top:24px; }
    .newsletter-form label { display:block; margin-bottom:9px; font-size:10px; font-weight:800; }
    .newsletter-form > div { display:grid; grid-template-columns:minmax(0,1fr) auto; }
    .newsletter-form input { min-width:0; padding:12px; border:1px solid var(--line); border-radius:4px 0 0 4px; background:#fff; font-size:11px; }
    .newsletter-form button { padding:0 17px; border:0; border-radius:0 4px 4px 0; background:var(--navy); color:#fff; font-size:11px; font-weight:800; }
    .newsletter-note { margin-top:12px!important; color:var(--muted)!important; font-size:10px!important; line-height:1.6; }
    #newsletter-status:empty { display:none; }
    #newsletter-status { margin-top:16px; color:var(--navy); font-size:11px; line-height:1.6; }
    dialog { width:min(720px,calc(100% - 32px)); max-height:85vh; padding:0; border:0; border-radius:16px; color:var(--ink); background:white; box-shadow:0 25px 100px rgb(13 34 49 / 25%); }
    dialog::backdrop { background:rgb(15 32 45 / 45%); }
    body:has(dialog[open]) { overflow:hidden; }
    .search-dialog { position:fixed; inset:0 0 auto; width:100%; max-width:none; max-height:100dvh; margin:0; border-radius:0; overscroll-behavior:contain; }
    .search-dialog::backdrop { background:rgb(16 39 57 / 50%); }
    .search-dialog[open] { animation:search-down .25s ease-out; }
    @keyframes search-down { from { opacity:0; transform:translateY(-32px); } to { opacity:1; transform:translateY(0); } }
    .search-dark { position:relative; min-height:280px; padding:82px 24px 52px; background:var(--navy); color:#fff; }
    .search-close { position:absolute; top:20px; right:clamp(24px,4vw,80px); width:44px; height:44px; display:grid; place-items:center; padding:0; border:0; background:none; color:#fff; }
    .search-close svg { width:22px; height:22px; }
    .search-inner { max-width:600px; margin:auto; }
    .search-form { display:flex; align-items:center; border-bottom:2px solid #fff; }
    .search-form input { width:100%; min-width:0; padding:12px 0 17px; border:0; border-radius:0; outline:none; background:transparent; color:#fff; font-size:25px; line-height:1.5; }
    .search-form input::placeholder { color:#fff; opacity:1; }
    .search-form:focus-within { border-bottom-color:#c9dcec; }
    .search-form input:focus-visible { outline:none; }
    .search-form button { display:grid; place-items:center; flex:none; width:44px; height:44px; padding:0; border:0; background:none; color:#fff; }
    .search-form button svg { width:25px; height:25px; }
    .search-recent { display:flex; flex-wrap:wrap; align-items:center; gap:8px 15px; margin-top:22px; color:#b8cedd; font-size:13px; line-height:1.8; }
    .search-recent button { padding:0; border:0; background:none; color:var(--pale); font-size:13px; }
    .search-recent button:hover { text-decoration:underline; }
    .search-light { padding:38px 32px 46px; background:#fff; }
    .search-columns { display:grid; grid-template-columns:1fr 1fr; gap:72px; max-width:1000px; margin:auto; }
    .search-columns h3 { margin:0 0 22px; color:var(--navy); font-size:21px; font-weight:600; }
    .search-keywords { display:flex; flex-wrap:wrap; gap:8px; }
    .search-keywords button { padding:10px 13px; border:1px solid var(--line); border-radius:4px; background:var(--surface); color:var(--navy); font-size:13px; line-height:1.3; }
    .search-keywords button:hover { background:var(--pale); }
    .search-results { max-height:300px; overflow:auto; }
    .search-empty { margin:60px 0 30px; color:var(--muted); text-align:center; font-size:13px; line-height:1.8; }
    .search-result { display:block; padding:14px 0; border-bottom:1px solid var(--line); }
    .search-result:first-child { padding-top:0; }
    .search-result small { color:#718098; font-size:10px; letter-spacing:.04em; }
    .search-result strong { display:block; margin-top:6px; color:#17324d; font-size:16px; line-height:1.55; }
    .search-result:hover strong { text-decoration:underline; text-underline-offset:3px; }
    .dialog-top { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:18px 28px; border-bottom:1px solid var(--line); }
    .dialog-brand { color:var(--navy); font-size:13px; font-weight:700; }
    .close-dialog { width:32px; height:32px; padding:0; border:0; background:var(--surface); border-radius:50%; color:var(--navy); font-size:22px; }
    .dialog-body { padding:35px 38px 40px; }
    .dialog-category { color:var(--navy); font-size:11px; letter-spacing:1px; }
    .dialog-body h1, .dialog-body h2 { margin:13px 0 12px; font-size:28px; line-height:1.45; letter-spacing:-1px; }
    .dialog-meta { color:var(--muted); font-size:11px; }
    .direct-answer { margin:27px 0; padding:23px; background:var(--surface); border-left:2px solid var(--blue); }
    .direct-answer b { font-size:12px; color:var(--navy); }
    .direct-answer p { margin:8px 0 0; font-size:15px; line-height:1.9; }
    .dialog-body h3 { margin:23px 0 8px; color:var(--navy); font-size:17px; }
    .dialog-body > p { color:#586c79; font-size:14px; line-height:1.9; }
    .checklist { padding-left:20px; color:#586c79; font-size:13px; line-height:2; }
    .article-image { width:100%; aspect-ratio:16/9; margin-top:24px; border-radius:10px; }
    .source-link { display:inline-block; margin-top:22px; color:var(--blue-ink); font-size:12px; text-decoration:underline; text-underline-offset:4px; }
    @media (max-width:900px) {
      .container { padding-inline:24px; }
      .feature-copy { padding:26px; } .feature-copy h2 { font-size:24px; }
      .feature-art,.feature-slide > a { min-height:320px; }
      .focus-title { font-size:44px; }
      .portrait-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
      .portrait-copy h3 { font-size:18px; }
      .focus-tabs { gap:20px; } .focus-tabs button { font-size:22px; }
      .series-section { padding-top:58px; } .series-grid { gap:20px; }
      .search-columns { gap:36px; }
    }
    @media (max-width:600px) {
      .container { padding-inline:18px; }
      .masthead { padding-top:12px; padding-bottom:12px; } .brand svg { width:29px; height:35px; }
      .brand-name { font-size:21px; } .brand-en { font-size:6px; letter-spacing:2.6px; }
      .feature-viewport { border-radius:16px; } .feature-slide > a { grid-template-columns:1fr; }
      .feature-art { min-height:220px; }
      .feature-copy { padding:23px 24px 25px; } .feature-copy h2 { font-size:22px; }
      .feature-copy p { font-size:12px; } .feature-copy small { margin-top:18px; font-size:9px; }
      .feature-controls { margin-top:15px; }
      .focus-section { padding-top:30px; } .focus-title { font-size:clamp(26px,7.5vw,38px); letter-spacing:-.055em; white-space:nowrap; }
      .focus-tabs { justify-content:space-between; gap:3px; margin:20px 0 26px; }
      .focus-tabs button { padding:9px 3px 13px; font-size:clamp(12.5px,3.9vw,19px); }
      .focus-tabs button[aria-selected="true"]::after { height:3px; }
      .portrait-grid { grid-template-columns:1fr; gap:18px; }
      .portrait-copy { padding:22px; }
      .portrait-copy h3 { font-size:20px; }
      .portrait-meta { font-size:11px; }
      .series-section { padding-top:48px; padding-bottom:36px; }
      .series-title { margin-bottom:28px; font-size:29px; }
      .series-grid { grid-template-columns:1fr; gap:22px; }
      .series-copy { padding:22px; } .series-copy h3 { font-size:22px; }
      .newsletter-section { padding:28px 17px 34px; } .newsletter-shell { padding:30px 24px; }
      .newsletter-shell h2 { font-size:23px; } .newsletter-form button { padding-inline:12px; }
      .dialog-top { padding:13px 19px; } .dialog-body { padding:24px 23px 30px; }
      .dialog-body h1, .dialog-body h2 { font-size:23px; } .direct-answer { padding:18px; }
      .search-dark { min-height:240px; padding:72px 24px 40px; }
      .search-close { top:12px; right:12px; }
      .search-form input { font-size:20px; }
      .search-light { padding:30px 24px 36px; }
      .search-columns { grid-template-columns:1fr; gap:30px; }
      .search-columns h3 { margin-bottom:18px; font-size:19px; }
      .search-empty { margin:26px 0 10px; text-align:left; }
    }
    @media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; animation:none!important; } }
  
/* ===============================================================
   시안에 없던 것 — 실제 데이터에 맞춘 규칙

   시안은 기사마다 사진이 있는 목업이었다. 지금 발행된 글에는 사진이 없고, 대신
   글마다 정해지는 표지 색(cover_tone)과 표지 문구(cover_label)가 있다. 빈 회색
   네모를 두느니 그 둘로 자리를 채운다 - 사진을 넣는 경로가 생기면 .news-image 를
   그대로 쓰면 된다(시안의 규칙이 이미 들어 있다).
   =============================================================== */
.feature-art,
.thumbnail {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cover-a, #17324d), var(--cover-b, #4e84a7));
}

.art-label {
  padding: 0 18px;
  color: rgb(255 255 255 / 86%);
  font: 800 13px/1.4 Arial, sans-serif;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
}

.feature-art .art-label {
  font-size: 17px;
}

/* 표지 색. public.css 와 같은 값을 쓴다 - 같은 글이 어느 화면에서도 같은 색으로
   보여야 한다. 색을 정하는 곳은 ArticleWriteService.COVER_TONES 하나뿐이다. */
.one   { --cover-a: #17275f; --cover-b: #2f8fae; }
.two   { --cover-a: #18345f; --cover-b: #3b7da3; }
.three { --cover-a: #165a68; --cover-b: #4f9e9c; }
.four  { --cover-a: #243b70; --cover-b: #607fa8; }
.five  { --cover-a: #173651; --cover-b: #467ba6; }
.six   { --cover-a: #1e4663; --cover-b: #5b92a7; }
.seven { --cover-a: #15364e; --cover-b: #468b8a; }
.eight { --cover-a: #273b68; --cover-b: #6c87aa; }

/* ---------------------------------------------------------------
   슬라이더 — 자바스크립트 없이

   시안은 슬라이드 하나만 그려 두고 JS 로 갈아끼운다. 여기서는 세 장을 모두 그려
   두고 가로 스크롤로 넘긴다(home.html 주석 참고). 그래서 viewport 의 overflow 를
   가로 스크롤로 바꾸고, 슬라이드가 한 장씩 멈추도록 scroll-snap 을 건다.
   --------------------------------------------------------------- */
.feature-viewport {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.feature-viewport::-webkit-scrollbar {
  display: none;
}

.feature-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

/* 좌우 단추가 시안에서는 <button> 이지만 여기서는 링크다(주소가 있어야 한다).
   타입 선택자로 쓰인 시안의 모양을 링크에도 그대로 입힌다. */
/* 시안의 .feature-controls button 과 같은 모양. 여기서는 링크라 타입 선택자가
   닿지 않아 다시 적는다(자바스크립트 없이도 넘어가야 해서 링크로 두었다). */
.feature-controls a {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
}

.feature-controls a:hover {
  border-color: var(--blue-ink);
  color: var(--blue-ink);
}

/* "1 / 3". 시안과 같은 자리·같은 크기로 둔다. 자릿수가 바뀌어도 화살표가 움직이지
   않도록 최소 폭을 준다 - 9 에서 10 으로 넘어갈 때 좌우가 들썩이면 눈에 거슬린다. */
.feature-position {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
   카테고리 탭

   시안의 .focus-tabs button 은 타입 선택자라 링크에는 듣지 않는다. 같은 모양을
   링크에 다시 입힌다 - 탭을 링크로 둔 이유는 home.html 주석에 있다.
   --------------------------------------------------------------- */
.focus-tabs a {
  position: relative;
  padding: 10px 7px 14px;
  color: var(--muted);
  font: 400 23px/1 Arial, sans-serif;
  letter-spacing: -.045em;
  text-decoration: none;
}

.focus-tabs a.is-on {
  color: var(--ink);
  font-weight: 700;
}

.focus-tabs a.is-on::after {
  position: absolute;
  right: 7px;
  bottom: 0;
  left: 7px;
  height: 2px;
  background: var(--ink);
  content: "";
}

/* 탭이 많아지면 줄바꿈 대신 한 줄로 두고 좌우로 넘긴다.
   가운데 정렬은 justify-content: center 대신 양 끝 auto 여백으로 한다 - center 는
   넘칠 때 왼쪽 끝이 잘려 스크롤로도 닿지 않는다. */
.focus-tabs-wrap {
  position: relative;
  margin: 26px 0 34px;
}

.focus-tabs-wrap .focus-tabs {
  justify-content: flex-start;
  flex-wrap: nowrap;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.focus-tabs-wrap .focus-tabs::-webkit-scrollbar {
  display: none;
}

.focus-tabs-wrap .focus-tabs > :first-child { margin-left: auto; }
.focus-tabs-wrap .focus-tabs > :last-child { margin-right: auto; }

.focus-tabs-wrap .focus-tabs a {
  flex: 0 0 auto;
  white-space: nowrap;
  scroll-snap-align: start;
}

.focus-tabs-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 2px 10px rgba(23, 50, 77, .12);
}

.focus-tabs-arrow[hidden] { display: none; }
.focus-tabs-arrow.is-prev { left: -6px; }
.focus-tabs-arrow.is-next { right: -6px; }

/* 화살표 밑으로 글자가 비치지 않고, 더 있다는 것이 보이도록 넘치는 쪽 끝을 흐리게 덮는다.
   화살표(z-index 1)보다 아래, 탭보다 위에 둔다. */
.focus-tabs-wrap::before,
.focus-tabs-wrap::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  content: "";
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.focus-tabs-wrap::before { left: 0; background: linear-gradient(90deg, #fff 45%, rgba(255,255,255,0)); }
.focus-tabs-wrap::after { right: 0; background: linear-gradient(270deg, #fff 45%, rgba(255,255,255,0)); }
.focus-tabs-wrap.can-prev::before,
.focus-tabs-wrap.can-next::after { opacity: 1; }

@media (max-width: 600px) {
  .focus-tabs-wrap { margin: 20px 0 26px; }
  .focus-tabs-wrap .focus-tabs { gap: 14px; }
  .focus-tabs-wrap .focus-tabs a { padding: 9px 3px 13px; font-size: 19px; }
  .focus-tabs-arrow { width: 30px; height: 30px; font-size: 14px; }
}

.focus-empty {
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------------
   검색 화면

   시안의 검색은 레이어였다. 여기서는 주소가 있는 화면이라(SearchController 주석)
   레이어용 규칙(.search-dark/.search-light)을 쓰지 않고 본문 안에 둔다.
   --------------------------------------------------------------- */
.search-page {
  padding-top: 24px;
}

.search-page-form {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.search-page-form:focus-within {
  border-color: var(--blue-ink);
}

.search-page-form input {
  min-width: 0;
  flex: 1 1 auto;
  padding: 12px 0;
  border: 0;
  background: none;
  font-size: 17px;
  outline: none;
}

.search-page-form button {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}

.search-page-form button svg {
  width: 20px;
  height: 20px;
}

.search-count {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.search-shortcuts h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.search-shortcuts .search-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-shortcuts .search-keywords a {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.search-shortcuts .search-keywords a:hover {
  border-color: var(--blue-ink);
}

/* 관리자 설정에서 로고 이미지를 정했을 때. 예전에는 최대 높이 34px 이라 기본 글자 로고(아이콘 +
   두 줄, 약 40px·폭 150px)보다 눈에 띄게 작게 보였다. 높이를 정해 두고(48px) 폭은 비율대로 늘리되,
   가로로 아주 긴 로고가 머리말을 다 차지하지 않게 폭 상한(240px)을 둔다. */
.brand-logo {
  display: block;
  width: auto;
  height: 48px;
  max-width: 240px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 760px) {
  .brand-logo {
    height: 40px;
    max-width: 180px;
  }
}

/* ---------------------------------------------------------------
   연재 상세 (/series/{슬러그})

   시안은 팝업 레이어였다. 여기서는 주소가 있는 화면이라 레이어용 규칙(.dialog-*)을
   쓰지 않고, 레이어 안에 있던 모양만 본문에 옮겨 담는다.
   --------------------------------------------------------------- */
.series-detail {
  max-width: 760px;
  padding-top: 24px;
}

.series-crumb {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.series-crumb a {
  color: var(--muted);
}

.series-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.series-kicker {
  color: var(--blue-ink);
  font: 700 11px/1 Arial, sans-serif;
  letter-spacing: .16em;
}

.series-head h1 {
  margin: 14px 0 10px;
  font-size: 30px;
  letter-spacing: -.045em;
  line-height: 1.3;
}

.series-head p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.series-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.series-detail .series-episodes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.series-detail .series-episodes li {
  border-bottom: 1px solid var(--line);
}

.series-detail .series-episodes a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.series-detail .series-episodes a:hover {
  color: var(--blue-ink);
}

.episode-go {
  flex: 0 0 auto;
  color: var(--muted);
}

/* ---------------------------------------------------------------
   WHAT'S IN FOCUS 와 뉴스레터 사이 여백

   시안에는 그 사이에 늘 THE SERIES(아래 여백 44px)가 있어서 카드 묶음이 뉴스레터 띠에
   바로 닿을 일이 없었다. 여기서는 연재를 아직 등록하지 않았거나 모두 숨기면 그 영역이
   통째로 빠져(home.html 주석 참고) 카드 아래가 곧바로 회색 띠가 된다.

   .focus-section 자체에 아래 여백을 주지 않는 이유: 연재가 있을 때는 THE SERIES 의
   위 여백(72px)과 겹쳐 사이가 너무 벌어진다. 바로 다음에 뉴스레터가 올 때만 메운다.
   --------------------------------------------------------------- */
.focus-section + .newsletter-section {
  margin-top: 56px;
}

@media (max-width: 900px) {
  .focus-section + .newsletter-section {
    margin-top: 36px;
  }
}

/* ===============================================================
   기사 본문 (화면과 레이어가 함께 쓰는 조각)

   시안의 레이어는 문단 몇 개짜리 목업이었다. 실제 본문은 편집기가 만든
   HTML 이라 제목·목록·인용·표가 섞여 들어온다. 그 요소들의 모양을 여기서 정한다.
   =============================================================== */
.article-page {
  max-width: 820px;
  padding-top: 24px;
}

/* 화면으로 들어왔을 때는 레이어의 안쪽 여백이 필요 없다 - 이미 여백을 가진 자리다. */
.article-page .dialog-body {
  padding: 0;
}

/* 사진이 없는 글의 표지 자리. 시안의 .article-image 와 같은 비율을 쓴다. */
.article-visual {
  margin-top: 24px;
  border-radius: 10px;
  aspect-ratio: 16/9;
}

.article-html {
  margin-top: 26px;
  color: #3a4b57;
  font-size: 15px;
  line-height: 1.95;
}

.article-html p {
  margin: 0 0 18px;
}

.article-html h2 {
  margin: 34px 0 12px;
  font-size: 21px;
  letter-spacing: -.03em;
}

.article-html h3 {
  margin: 26px 0 10px;
  color: var(--navy);
  font-size: 17px;
}

.article-html ul,
.article-html ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.article-html li {
  margin: 6px 0;
}

.article-html blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--blue);
  background: var(--surface);
  color: #46606f;
}

.article-html img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.article-html table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.article-html th,
.article-html td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-html th {
  background: var(--surface);
  color: var(--navy);
}

/* 레이어에서만 보이는 "이 글만 따로 보기". 화면에서는 이미 그 주소라 그리지 않는다. */
.dialog-permalink {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.dialog-permalink a {
  color: var(--blue-ink);
  font-weight: 700;
}

.related-section {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.related-section .series-title {
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .related-section {
    margin-top: 36px;
  }
}

/* 층 배지와 신뢰 정보 줄. 시안에는 없지만 이 사이트가 "믿을 만한 글"임을 밝히는
   신호라 디자인이 바뀌어도 남긴다(article-view.html 주석 참고). */
.dialog-body .eyebrow {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue-ink);
  font: 700 11px/1 Arial, sans-serif;
  letter-spacing: .08em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.trust-item {
  display: grid;
  flex: 1 1 120px;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
}

.trust-item b {
  color: var(--navy);
  font-size: 12px;
}

.trust-item span {
  color: var(--muted);
}

/* ---------------------------------------------------------------
   뉴스레터 입력칸과 단추

   시안의 기본 초점 표시는 `:focus-visible { outline: 3px solid …; outline-offset: 4px }`
   다. 그런데 이 둘은 서로 맞붙은 한 덩어리(왼쪽은 입력칸, 오른쪽은 단추)라, 입력칸에
   초점이 가면 4px 떨어진 굵은 테두리가 단추 위로 올라타 겹쳐 보인다.

   그래서 둘을 감싸는 쪽에 초점 표시를 준다 - 어느 쪽을 눌러도 한 덩어리가 함께 밝아지고,
   겹칠 자리가 없다. 안쪽 요소의 기본 표시는 끄되, 끄기만 하면 키보드 사용자가 초점을
   잃으므로 반드시 감싸는 쪽이 대신 보여 줘야 한다.
   --------------------------------------------------------------- */
.newsletter-form > div {
  border-radius: 4px;
}

.newsletter-form > div:focus-within {
  box-shadow: 0 0 0 3px rgb(59 105 255 / 30%);
}

.newsletter-form input:focus,
.newsletter-form input:focus-visible,
.newsletter-form button:focus,
.newsletter-form button:focus-visible {
  outline: none;
}

/* 입력칸 자신도 테두리 색으로 "여기에 쓰고 있다"를 알린다. */
.newsletter-form > div:focus-within input {
  border-color: var(--blue);
}

/* 단추에 키보드 초점이 갔을 때는 감싸는 쪽 표시만으로는 둘 중 어디인지 알 수 없다.
   단추 안쪽에 흰 테를 둘러 구분한다. */
.newsletter-form button:focus-visible {
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 85%);
}

/* ---------------------------------------------------------------
   기사 레이어 — 머리는 고정, 본문만 구른다

   시안은 레이어 전체(dialog)가 구르는 구조라, 본문을 내리면 "렌탈연구소"와 닫기 단추가
   함께 위로 사라진다. 긴 글일수록 닫을 방법을 찾아 다시 끝까지 올려야 한다.

   레이어를 세로 상자로 만들고 본문 칸에만 스크롤을 준다. min-height: 0 이 없으면 flex
   항목이 내용 크기 아래로 줄지 않아 스크롤이 생기지 않는다(그 자리에서 넘쳐 버린다).
   --------------------------------------------------------------- */
#article-dialog {
  display: flex;
  overflow: hidden;
  flex-direction: column;
}

/* 위의 display: flex 는 ID 선택자라, 브라우저가 닫힌 dialog 를 숨기는 기본 규칙
   (dialog:not([open]) { display: none })보다 우선한다. 그대로 두면 닫혀 있는 레이어의
   머리("렌탈연구소" + 닫기 단추)가 페이지 맨 아래에 잘린 상자로 드러난다. */
#article-dialog:not([open]) {
  display: none;
}

#article-dialog .dialog-top {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  background: #fff;
}

#article-dialog-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
}

/* ---------------------------------------------------------------
   글 대표 이미지(CMS 편집 화면의 "대표 이미지", db/19).
   있으면 표지 자리(.feature-art · .thumbnail · .thumb · .article-visual)에 사진을 꽉 채워
   깔고(인라인 background-image), 색 그라데이션·표지 문구·장식 원은 숨긴다.
   없으면 지금처럼 색 배경 + 표지 문구다.
   --------------------------------------------------------------- */
.has-cover {
  background-color: #e9edf3;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.thumb.has-cover::before,
.thumb.has-cover::after {
  display: none;
}

/* 세로형 카드는 카드 전체가 표지라 글자가 사진 위에 얹힌다 - 아래쪽을 어둡게 덮어
   흰 글자가 읽히게 한다. */
.portrait-card.has-cover {
  background: linear-gradient(180deg, rgb(10 20 40 / 10%) 30%, rgb(10 20 40 / 78%)),
              var(--cover-image) center / cover no-repeat;
}

.portrait-card.has-cover::before,
.portrait-card.has-cover::after {
  display: none;
}

/* ---------------------------------------------------------------
   카테고리 탭 좌우 화살표 다듬기.
   화살표가 탭 글자 위에 얹혀 첫 글자를 가렸다. 화살표를 탭 줄 양옆의 제자리에 두고
   (보일 때만 자리를 차지한다), 잘린 쪽 끝은 글자가 부드럽게 사라지게 한다.
   모양은 위 대표 슬라이드의 ← → 단추와 같은 원형.
   --------------------------------------------------------------- */
.focus-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.focus-tabs-wrap::before,
.focus-tabs-wrap::after {
  display: none;
}

.focus-tabs-wrap .focus-tabs {
  flex: 1 1 auto;
  min-width: 0;
}

.focus-tabs-wrap.can-prev .focus-tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 36px);
  mask-image: linear-gradient(90deg, transparent 0, #000 36px);
}

.focus-tabs-wrap.can-next .focus-tabs {
  -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 36px);
  mask-image: linear-gradient(270deg, transparent 0, #000 36px);
}

.focus-tabs-wrap.can-prev.can-next .focus-tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
}

.focus-tabs-arrow {
  position: static;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d9dee6;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgb(23 50 77 / 10%);
  color: var(--navy);
  font-size: 15px;
  transform: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.focus-tabs-arrow:hover {
  border-color: var(--navy);
  background: #f5f7fb;
  box-shadow: 0 4px 12px rgb(23 50 77 / 14%);
}

.focus-tabs-arrow:focus-visible {
  outline: 3px solid rgb(59 105 255 / 30%);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .focus-tabs-arrow {
    width: 32px;
    height: 32px;
  }
}

/* ---------------------------------------------------------------
   검색 화면 다듬기.
   입력 상자가 화면 끝에서 끝까지 얇은 선 하나라 어디가 칸인지 흐렸고, 제목과도 붙어 있었다.
   가운데 760px 폭으로 모으고, 높이·그림자로 칸을 분명히 하고, 단추는 남색 원형으로.
   아래 "카테고리로 둘러보기"도 같은 폭 가운데로 맞춘다.
   --------------------------------------------------------------- */
.search-page .focus-title {
  margin-bottom: 26px;
}

.search-page-form {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 7px 7px 7px 24px;
  border: 1px solid #d6dde6;
  box-shadow: 0 8px 24px rgb(23 50 77 / 8%);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.search-page-form:focus-within {
  border-color: var(--navy);
  box-shadow: 0 8px 28px rgb(23 50 77 / 14%), 0 0 0 4px rgb(23 50 77 / 6%);
}

.search-page-form input {
  padding: 13px 0;
  color: var(--ink);
  font-size: 17px;
}

.search-page-form input::placeholder {
  color: #9aa6b4;
}

.search-page-form button {
  width: 48px;
  height: 48px;
  background: var(--navy);
  transition: background-color .15s ease, transform .15s ease;
}

.search-page-form button:hover {
  background: #0f2236;
  transform: scale(1.04);
}

.search-page-form button:focus-visible {
  outline: 3px solid rgb(59 105 255 / 35%);
  outline-offset: 2px;
}

.search-shortcuts,
.search-count {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.search-shortcuts h2 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.search-shortcuts .search-keywords {
  justify-content: center;
}

.search-shortcuts .search-keywords a {
  border-color: #dde3ea;
  color: var(--navy);
  transition: border-color .15s ease, background-color .15s ease;
}

.search-shortcuts .search-keywords a:hover {
  border-color: var(--navy);
  background: #f3f6fa;
}

@media (max-width: 600px) {
  .search-page-form {
    padding-left: 18px;
  }

  .search-page-form input {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------
   카테고리 탭 ‹ › - 오른쪽 끝 한 묶음(다시 다듬음).
   양옆에 떨어져 있던 화살표가 탭 글자 바로 옆에 붙어 어색했다. 두 단추를 오른쪽 끝에
   나란히 두고, 끝에 닿은 쪽은 흐리게 잠근다(사라지지 않아 줄 폭이 들썩이지 않는다).
   단추 세로 위치는 탭 글자 줄에 맞춘다(탭 아래 밑줄 자리만큼 올린다).
   --------------------------------------------------------------- */
.focus-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.focus-tabs-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin-bottom: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.focus-tabs-nav[hidden] {
  display: none;
}

.focus-tabs-wrap .focus-tabs-arrow {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
  color: var(--navy);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.focus-tabs-wrap .focus-tabs-arrow:hover:not(:disabled) {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.focus-tabs-wrap .focus-tabs-arrow:disabled {
  color: #b9c3cf;
  cursor: default;
}

.focus-tabs-wrap .focus-tabs-arrow:focus-visible {
  outline: 3px solid rgb(59 105 255 / 30%);
  outline-offset: 2px;
}

/* 잘린 쪽 탭 글자는 부드럽게 흐려진다. */
.focus-tabs-wrap.can-prev .focus-tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px);
  mask-image: linear-gradient(90deg, transparent 0, #000 48px);
}

.focus-tabs-wrap.can-next .focus-tabs {
  -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 48px);
  mask-image: linear-gradient(270deg, transparent 0, #000 48px);
}

.focus-tabs-wrap.can-prev.can-next .focus-tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}

@media (max-width: 600px) {
  .focus-tabs-nav {
    padding-left: 10px;
  }

  .focus-tabs-wrap .focus-tabs-arrow {
    width: 30px;
    height: 30px;
  }
}

/* 띄어쓰기 없이 긴 글(답변·제목·주소)이 레이어 밖으로 밀려 좌우 스크롤이 생기지 않게
   줄을 바꾼다. 넓은 표는 표 안에서만 가로로 움직인다. */
#article-dialog-body { overflow-x: hidden; overflow-y: auto; min-height: 0; }
.dialog-body { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.dialog-body .article-html { max-width: 100%; overflow-x: auto; }
.dialog-body .article-html table { table-layout: fixed; }

/* 레이어 위쪽 여백: 머리줄 바로 아래 빈칸이 커 보였다. */
#article-dialog .dialog-body { padding-top: 20px; }
@media (max-width: 900px) {
  #article-dialog .dialog-body { padding-top: 16px; }
}

/* 입력 확인 문구. 브라우저 말풍선 대신 칸 아래에 한 줄로 보여 준다(public-forms.js). */
input.is-invalid { border-color: #d0605a !important; box-shadow: 0 0 0 3px rgb(208 96 90 / 14%); outline: none; }
.form-hint-error { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: #b3443e; font-size: 12px; line-height: 1.5; }
.form-hint-error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%; background: #d0605a; color: #fff; font: 700 10px/1 Arial, sans-serif; }

/* ---------------------------------------------------------------
   기사 머리 - 팝업 머리말의 "렌탈연구소"를 조금 키우고, 카테고리 · 게시일을 제목 위 한 줄로.
   --------------------------------------------------------------- */
.dialog-brand {
  font-size: 15px;
}

.dialog-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.dialog-kicker .dialog-category {
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}
.dialog-kicker .dialog-meta {
  color: var(--muted);
  font-size: 12px;
}
/* 위쪽 한 줄이 생겼으니 제목 아래 여백은 사진까지의 간격만 남긴다. */
.dialog-body .dialog-kicker + h1 {
  margin-bottom: 4px;
}
/* 가운뎃점은 글자(·) 대신 작은 원으로 그린다 - 글꼴마다 · 의 높이가 달라 줄 가운데에서 어긋났다. */
.dialog-kicker-sep {
  display: inline-block;
  flex: none;
  width: 3px;
  height: 3px;
  margin: 0 2px;
  border-radius: 50%;
  background: #a3b1bd;
}
