/* ============================================================
   세이안 공용 브랜드 CSS — 모든 페이지가 이 파일 하나를 읽는다.
   좌측 최상단 SAGE 로고, 누르면 언제나 메인(/)으로 간다.

   쓰는 법: <head> 에 <link rel="stylesheet" href="/brand.css"> 를 넣고,
            <body> 안 아무 곳에나 아래 한 줄을 둔다(위치는 CSS 가 고정한다).

     <a class="sage-home" href="/" aria-label="세이안 메인으로">
       <img src="/sage-logo.jpg" alt="SAGE">
     </a>

   position:fixed 라 페이지 레이아웃을 건드리지 않는다.
   ============================================================ */

.sage-home {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 2147483000; /* 어떤 모달·게이트보다 위 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(46, 106, 96, 0.16);
  box-shadow: 0 2px 10px rgba(46, 58, 47, 0.14);
  overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sage-home img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sage-home:hover,
.sage-home:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(46, 58, 47, 0.22);
}

.sage-home:active {
  transform: scale(0.96);
}

.sage-home:focus-visible {
  outline: 2px solid #1f8a70;
  outline-offset: 2px;
}

/* 좁은 화면에서는 살짝 줄인다 */
@media (max-width: 380px) {
  .sage-home {
    top: 8px;
    left: 8px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sage-home {
    transition: none;
  }
}


/* ── 관련 보도 (세이안 헌법 제5조) ─────────────────────────────
   답변 본문 '밖'의 블록이라 LLM 답변 길이(max_tokens)에 영향이 없다. */
.ref-box{margin-top:12px;border-top:1px dashed #D8E2DA;padding-top:10px}
.ref-head{font-size:11px;font-weight:800;color:#0F5847;margin-bottom:7px;letter-spacing:.3px}
.ref-item{display:block;text-decoration:none;background:#F7FAF8;border:1px solid #E4EDE7;
  border-radius:9px;padding:8px 11px;margin-bottom:5px;transition:background .15s}
.ref-item:hover{background:#EFF5F1}
.ref-title{display:block;font-size:12.5px;font-weight:700;color:#1B3D2E;line-height:1.5}
.ref-meta{display:block;font-size:10.5px;color:#7E8E85;margin-top:3px}

/* ── 되묻기 선택지 (헌법 제3조) ───────────────────────────── */
.ask-opts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.ask-opt{background:#E7F0EA;border:1px solid #CFE0D5;color:#0F5847;border-radius:16px;
  padding:11px 14px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;
  /* 모바일 터치 타깃 최소 44px — 손가락으로 정확히 누를 수 있어야 한다 */
  min-height:44px;line-height:1.35;text-align:left;
  /* 긴 선택지가 화면 밖으로 나가지 않게 */
  max-width:100%;white-space:normal;word-break:keep-all}
.ask-opt:hover{background:#DCEAE1}
