/* ==========================================================
   페이지투웹 kit · 디자인 "패널" (panel) — 일성 브로셔 kit의 panel 테마를 옮겼다.
   One screen, nothing to scroll. A letterhead masthead across the top, the
   evidence as a list on the left, and one open panel on the right that swaps in
   place. The page itself never grows: the list and the panel scroll inside
   themselves if they must. Loads after page.css.
   2026-11-16 가볍게 다듬음: 뼈대와 라벨 카드 말투(큰 Anybody 수치 · vs 비교 · 옅은 색 문장 칸)는 그대로,
   고정폭 글꼴 · 01 번호 · 제목 위 작은 글 · 그라데이션 막대 · 흐림 유리 · 쉬는 그림자 · 칸막이 선을 뺐다.
   목록과 판은 선 대신 바탕 색 차이(회색 목록 / 흰 판)로 나뉜다. 고른 근거는 흰 칸, 판 오른쪽 위에 그 근거의 큰 수치.
   ========================================================== */

:root {
  --paper: #e9ecef;
  --card: #ffffff;
  --line: #d6dbe1;
  --ink: #11151b;
  --muted: #626c78;
  --comp: #aeb6bf;
  --comp-deep: #6d7681;
  --night: #11151b;
  --radius: 8px;
  --bar: 56px; /* the fixed top bar */
  --edge: max(var(--gutter), calc((100vw - 1480px) / 2));
  --gutter: clamp(18px, 3.4vw, 54px);
  --f-mono: var(--f-body); /* 고정폭 글꼴을 쓰지 않는다 (n=106, p값, 참고문헌 번호, 심의 번호까지) */
}

body { background: var(--paper); }
.topbar, .topbar.is-solid { padding-block: max(14px, env(safe-area-inset-top)) 14px; }
.topbar.is-solid { background: var(--card); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; } /* taste-skill-ignore: page.css의 흐림·그림자를 끄는 줄 */

/* ---------- Masthead: one slim letterhead row, so the board gets the screen ---------- */
.masthead {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
  padding: var(--bar) var(--edge) 14px;
  background: var(--card);
}
/* name, the 전문 tab and the ingredients on one line, like the front of the package */
.masthead-copy { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; row-gap: 6px; }
.label-tab { background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 3px; }
.product-name {
  margin: 0; font-size: clamp(26px, 2.5vw, 38px); font-weight: 820;
  line-height: 1.05; letter-spacing: -.035em; color: var(--accent);
}
.product-name .suffix { font-size: .4em; font-weight: 700; color: var(--ink); letter-spacing: 0; margin-left: .14em; }
.ingredients { margin: 0; font-size: clamp(13.5px, 1.05vw, 15.5px); font-weight: 600; color: var(--ink); }
.ingredients .sep { color: var(--comp); margin: 0 .4em; }

.masthead-strength { display: grid; gap: 4px; justify-items: end; text-align: right; }
.band-strength { font-family: var(--f-num); font-weight: 820; font-size: clamp(24px, 2.2vw, 34px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.band-strength small { font-size: .42em; font-weight: 700; margin-left: .1em; color: var(--muted); }
.band-tagline { max-width: 34ch; font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.4; }
.masthead-copy .band-tagline { flex-basis: 100%; max-width: none; margin: 0; font-size: 15px; } /* 함량이 없는 제품은 한 줄 설명을 이름 아래에 */

.masthead .stage {
  position: relative; width: clamp(72px, 6vw, 92px);
  grid-column: auto; grid-row: auto; align-self: center; justify-self: end; z-index: auto; /* page.css의 라벨 히어로 배치를 지운다 */
  margin: 0; /* 병 전체가 머리 안에 들어간다 */
}
.masthead .stage .product { width: 100%; height: auto; opacity: 0; filter: none; }
.masthead.is-ready .stage .product { animation: panel-in .9s var(--ease) .15s forwards; }
@keyframes panel-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.masthead .stage-shadow { display: none; }

/* ---------- Board: list on the left, one panel on the right ---------- */
/* a definite height, not min-height: with `auto` the 1fr row grows to its content and the
   list/panel never scroll inside themselves — which is the whole point of this surface */
.deck { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100svh; }
/* 목록 칸 = 왼쪽 여백(머리 줄과 시작선 맞춤) + 글 폭. 예전엔 칸 폭을 340px로 묶어 둬서
   1480px보다 넓은 화면에선 여백만 커지고 글 폭이 100px까지 줄었다(2026-11-21) */
.board { display: grid; grid-template-columns: calc(max(8px, var(--edge) - 14px) + clamp(250px, 19vw, 300px)) minmax(0, 1fr); min-height: 0; }

/* no divider lines: the grey list and the white panel are told apart by their tone alone */
.claims { overflow-y: auto; overscroll-behavior: contain; padding: 6px 10px 18px max(8px, calc(var(--edge) - 14px)); background: var(--paper); }
.claim-group { margin: 16px 0 4px; padding: 0 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.claim-group:first-child { margin-top: 10px; }
/* title, then the number under it: a column of its own would squeeze titles onto three lines */
.claim {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 1px;
  width: 100%; text-align: left; border: 0; border-radius: var(--radius); background: none; cursor: pointer;
  padding: 8px 14px; color: var(--ink);
  transition: background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.claim-title { grid-column: 1; font-size: 14px; font-weight: 600; line-height: 1.4; transition: color .2s; min-width: 0; }
.claim-value { grid-column: 1; display: flex; align-items: baseline; white-space: nowrap; }
.claim[aria-selected="true"] { background: var(--card); }
.claim[aria-selected="true"] .claim-title { color: var(--accent); font-weight: 700; }
@media (hover: hover) { .claim:not([aria-selected="true"]):hover { background: color-mix(in srgb, var(--card) 55%, var(--paper)); } }
.claim:hover .claim-title { color: var(--accent); }
.claim:active { transform: scale(.99); }
.claim-value .num { font-family: var(--f-num); font-size: 21px; font-weight: 820; color: var(--accent); letter-spacing: -.02em; }
.claim-value .stat-text { font-size: 13px; font-weight: 700; color: var(--accent); white-space: normal; line-height: 1.3; }
.claim-value .stat-label { display: none; }
.claim-chevron { grid-column: 2; grid-row: 1; position: static; display: block; width: 18px; height: 18px; color: var(--comp-deep); }
.claim-chevron svg { width: 18px; height: 18px; }
.claim-chevron .card-more { position: static; display: block; } /* page.css는 카드 오른쪽 위에 띄운다 */

/* ---------- The open panel ---------- */
.panel { overflow-y: auto; overscroll-behavior: contain; background: var(--card); }
.panel-body { padding: clamp(16px, 1.8vw, 28px) clamp(22px, 2.8vw, 48px) 10px; }
.panel-body { padding-right: max(clamp(22px, 2.8vw, 48px), var(--edge)); } /* 오른쪽 끝을 머리 줄과 맞춤 */
/* the head reads like a label card: title and comparison on the left, the claim's number large on the right */
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: clamp(16px, 2.4vw, 40px); margin-bottom: 12px; }
.panel-stat { margin: 0; flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; max-width: 40%; }
.panel-stat .num { font-size: clamp(48px, 5.4vw, 88px); color: var(--accent); white-space: nowrap; } /* 판의 머리: 설명하는 사람이 가리키는 숫자 하나 */
.panel-stat .stat-text { font-size: clamp(20px, 1.8vw, 28px); font-weight: 820; color: var(--accent); letter-spacing: -.02em; line-height: 1.15; }
.panel-stat .stat-label { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--ink); }
.panel-title { margin: 0 0 4px; font-size: clamp(19px, 1.8vw, 26px); font-weight: 820; letter-spacing: -.03em; line-height: 1.22; }
.panel-compare { margin: 0; font-size: 14px; color: var(--muted); }
.panel-compare b { font-family: var(--f-num); font-weight: 700; color: var(--comp-deep); }
/* 핵심 문구는 상자 없이 글로: 굵은 부분만 강조색 */
.panel .messages { margin-bottom: 14px; gap: 4px; }
.panel .messages li { padding: 0; background: none; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.5; }
.panel .messages b { color: var(--accent); }
.panel .messages li::before { display: none; }
/* 연구 설계 칸: 그래프 아래, 제목 하나 + 대상 · 배정 · 기간 · 1차 평가변수 */
.design-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px 18px; margin: 4px 0 6px; }
.design-strip h3 { margin: 10px 0 0; font-size: 15px; font-weight: 800; white-space: nowrap; }
.design-strip h3 sup { color: var(--accent); }
.design-strip .design-facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.design-strip .design-facts div { padding: 8px 12px; background: var(--paper); }
.design-strip .design-facts dd { font-size: 14px; }
.panel:has(.design-strip) { --chrome: 540px; }
.panel:has(.design-strip):has(.messages li:only-child) { --chrome: 498px; }
/* the chart takes what the screen has left after the header, title, messages and caption
   (--chrome), so the whole claim reads without scrolling the panel; it never grows past 360px */
/* flat bars: the engine's top-to-bottom bar gradient collapses to the accent */
.panel { --chrome: 460px; --glow: var(--accent); }
.panel:has(.messages li:only-child) { --chrome: 418px; } /* one message line leaves about 40px more for the chart */
.panel .figure { border: 0; padding: 0; margin-bottom: 8px; }
.panel .figure + .figure { padding-top: 16px; }
.panel .figure svg.chart { max-height: clamp(150px, calc(100svh - var(--chrome)), 420px); }
/* a claim with two figures: side by side where the panel is wide, stacked and shorter where it is not */
.panel .figures { display: grid; gap: 12px; }
.panel .figures .figure { margin-bottom: 0; }
.panel .figures .figure + .figure { padding-top: 16px; }
.panel .is-multi .figure svg.chart { max-height: clamp(110px, calc((100svh - var(--chrome) - 120px) / 2), 190px); }
@media (min-width: 960px) {
  .panel .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
  .panel .figures .figure + .figure { padding-top: 0; }
  .panel .is-multi .figure svg.chart { max-height: clamp(150px, calc(100svh - var(--chrome) - 30px), 300px); }
}
.panel .info-table { font-size: 14px; }
.panel .info-table th, .panel .info-table td { padding-block: 5px; }
/* a figure that carries a table under its chart has two things to fit, so the chart gives way */
/* but never below a readable size: on a short window the panel scrolls a little instead */
.panel .figure:has(.risk-table) svg.chart { max-height: clamp(170px, calc(100svh - var(--chrome) - 150px), 225px); }
.panel .risk-table { margin-top: 8px; font-size: 13px; }
.panel .risk-table th, .panel .risk-table td { padding: 3px 8px; }
.panel .figure figcaption { margin-top: 6px; font-size: 12px; }
.panel .figure .note { margin-top: 3px; font-size: 12px; }
.panel .figure figcaption .p { font-style: normal; font-weight: 600; }
.panel .details { padding-top: 2px; border-top: 0; }
.panel .details summary { padding: 6px 0; }
/* 1366×768 laptops leave about 650px of browser window: tighten the spacing, not the content */
@media (max-height: 700px) and (min-width: 901px) {
  .panel-body { padding-top: 12px; }
  .panel .messages li { padding-block: 6px; }
  .panel .info-table th, .panel .info-table td { padding-block: 3px; }
  .claim { padding-block: 6px; }
  .claim-group { margin-top: 10px; }
}
.panel .lead { font-size: clamp(15px, 1.5vw, 18px); padding: 14px 18px; margin-bottom: 18px; }
.panel .guide-grid { margin-bottom: 18px; }
.panel .guide { border: 0; background: var(--paper); }
.panel .refs li { font-size: 12.5px; }

/* ---------- Responsive: below the board width it becomes an ordinary page ---------- */
@media (max-width: 900px) {
  .deck { display: block; height: auto; }
  .masthead {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy stage" "strength stage";
    align-items: start; padding-top: calc(var(--bar) + 14px); row-gap: 12px;
  }
  .masthead-copy { grid-area: copy; }
  .masthead-strength { grid-area: strength; justify-items: start; text-align: left; }
  .masthead .stage { grid-area: stage; align-self: center; width: clamp(72px, 20vw, 96px); margin: 0; }
  .design-strip { grid-template-columns: 1fr; }
  .design-strip h3 { margin: 0; }
  .band-tagline { max-width: none; }
  .board { display: block; }
  .claims {
    display: flex; gap: 8px; overflow-x: auto; overflow-y: visible; scrollbar-width: none;
    padding: 12px var(--gutter);
    position: sticky; top: var(--bar); z-index: 20; background: var(--paper);
  }
  .claims::-webkit-scrollbar { display: none; }
  .claim-group { display: none; }
  .claim {
    flex: none; width: auto; display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px; background: var(--card);
  }
  .claim[aria-selected="true"] { background: var(--ink); }
  .claim[aria-selected="true"] .claim-title { color: var(--paper); }
  .claim-title { white-space: nowrap; font-size: 13.5px; }
  .claim-value, .claim-chevron { display: none; }
  .panel-head { gap: 14px; }
  .panel-stat .num { font-size: 40px; }
  .panel { overflow: visible; scroll-margin-top: calc(var(--bar) + 72px); }
  .panel-body { padding-inline: var(--gutter); }
  .info-table th { width: 84px; white-space: normal; }
}

/* ---------- Calm motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) .claim { transition: none; }
  html:not(.force-motion) .masthead.is-ready .stage .product { animation: panel-fade .8s ease .1s forwards; }
}
@keyframes panel-fade { from { opacity: 0; } to { opacity: 1; } }

/* A short window cannot hold a letterhead plus a readable panel; let the page flow instead.
   The one-screen rule is a nicety, a clipped page is a bug. */
@media (max-height: 620px) and (min-width: 901px) {
  .deck { height: auto; display: block; }
  .board { display: block; }
  .claims { overflow: visible; }
  .panel { overflow: visible; }
  .panel .figure svg.chart, .panel .is-multi .figure svg.chart, .panel .figure:has(.risk-table) svg.chart { max-height: 360px; }
}


/* 읽는 글은 13px 아래로 내리지 않는다 (푸터 알림 15px, 그래프 설명 13px) */
.footer { font-size: 15px; color: color-mix(in srgb, #fff 82%, transparent); }
.label-tab { font-size: 13px; }
.panel .figure figcaption, .panel .figure .note, .panel .refs li { font-size: 13px; }
.claim-title { font-size: 15px; }
.panel-compare { font-size: 15px; }
/* 연구 설계·약어(접힘)는 읽는 글: 본문 크기, 짙은 글자, 한 줄 75자 안 */
.panel .details-body { font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 75ch; }
.panel .details-body .refs li { color: var(--muted); }
