/* 색·치수는 tokens.css 가 정본이다. 여기에는 이 사이트의 컴포넌트 규칙만 둔다.
   ⛔ 원시 팔레트(--jl-*)를 직접 참조하지 않는다. 예외는 아래 두 곳뿐이고 이유가 있다. */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 var(--font-sans);
  word-break: keep-all;
}

.site-head,
main,
.site-foot {
  max-width: var(--measure);
  margin-inline: auto;
}

/* 헤더 */
.site-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  text-decoration: none;
}

/* 락업 SVG 는 width/height 를 박아 둔다 — 로드 전 높이가 0 이면 헤더가 튄다(CLS). */
.brand img {
  display: block;
  height: 26px;
  width: auto;
}

.site-head nav a {
  margin-left: 1rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-decoration: none;
}

.site-head nav a:first-child { margin-left: 0; }
.site-head nav a:hover { color: var(--link); }

.site-head nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* 본문 */
main { padding: 2.5rem 0 3rem; }

section + section {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.hero { padding-bottom: 0.5rem; }
.hero + section { border-top: none; }

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

a { color: var(--link); }

/* 목록 */
.flow {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.flow li { margin-bottom: 0.35rem; }

.principles,
.axes,
.privacy { margin: 0; }

.principles dt,
.axes dt,
.privacy dt {
  margin-top: 1.25rem;
  font-weight: 600;
}

.principles dt:first-child,
.axes dt:first-child { margin-top: 0; }

.principles dd,
.axes dd,
.privacy dd {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

/* 처리방침의 항목은 목록이 짧아 간격을 좁힌다. */
.privacy dt { margin-top: 0.9rem; }

.note,
.effective {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* htmx 인디케이터.
   htmx 는 기본적으로 이 규칙을 <style> 태그로 head 에 주입하는데, CSP 의
   style-src 'self' 가 그걸 막아 콘솔에 위반이 찍힌다. 'unsafe-inline' 도
   nonce 도 쓰지 않기로 했으므로(web.go csp() 주석) 주입을 끄고
   (_partials.html 의 meta[name=htmx-config]) 같은 규칙을 여기에 둔다.
   htmx 2.0.4 가 주입하던 것과 동일한 내용이다. */
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; transition: opacity 200ms ease-in; }

/* 브랜드 자산 페이지 (/brand) */
.assets {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.assets li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 0.7rem;
}

/* ⛔ 미리보기 칸의 배경을 페이지 배경(--bg)에 맡기면 안 된다. 로고 판마다 전제하는
   배경이 다르고, 반전판은 밝은 면 위에서 통째로 사라진다. 여기는 역할 토큰이 아니라
   원시 팔레트로 **고정**한다 — 쓰는 사람이 보게 될 배경을 그대로 보여주는 칸이다. */
.assets .preview {
  flex: 0 0 auto;
  padding: 0.7rem 0.9rem;
  background: var(--jl-white);
  border: 1px solid var(--jl-line);
  border-radius: var(--radius-sm);
}

.assets li.on-ink .preview {
  background: var(--jl-ink);
  border-color: var(--jl-ink);
}

.assets .preview img { display: block; }

.assets .meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.assets .meta strong { color: var(--ink); }
.assets .meta a { margin-left: 0.5rem; }

.swatches {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.swatches li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}

/* ⛔ 색 견본을 style="background:..." 로 두면 안 된다. CSP 의 style-src 'self' 가
   인라인 style 속성까지 막는다 (web.go csp() 주석과 같은 판단). 클래스로 둔다.
   여기와 .on-ink 는 역할 토큰이 아니라 원시 팔레트(--jl-*)를 일부러 쓴다 —
   견본은 그 색 자체를 보여주는 것이라 다크 모드에서 바뀌면 안 된다. */
.chip {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transform: translateY(0.25rem);
}

.chip-ink { background: var(--jl-ink); }
.chip-signal { background: var(--jl-brand); }
.chip-signal-deep { background: var(--jl-brand-deep); }
.chip-tint { background: var(--jl-tint); }

.swatches em {
  color: var(--ink-soft);
  font-style: normal;
}

.swatches code {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* 푸터 */
.site-foot {
  padding: 1.75rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.site-foot p { margin: 0 0 0.6rem; }
.copy { margin-top: 1rem; }
