/* 리을 — 방향 B 「한 획」(2026-11-09 승인). 기준: docs/design/board-source/B-*.dc.html
   무브 01 쓰는 순서대로 한 번에 · 02 마지막 획은 멈추지 않음 · 03 그 선이 곧 인터페이스
   04 한 색을 넓게, 드물게 · 05 숫자는 고정폭 · 06 고친 말엔 밑줄, 뺀 말은 물러남
   이 파일을 바꾸면 docs/design/assets/rieul.css(그대로 복사)와 docs/design/tokens.json도 함께. */

:root {
  --ink: #0F1012;        /* 흑 — 글자 */
  --paper: #F7F7F5;      /* 백 — 바탕 */
  --blue: #2B3FE0;       /* 군청 — 한 색 */
  --gray: #5F6168;       /* 회 — 보조 글자 */
  --gray-2: #34363B;     /* 지문 옆 설명 글자 */
  --line: #DCDDE0;       /* 비어 있는 선 */
  --on-blue: #FFFFFF;
  --on-blue-muted: #D6DBFF;
  --sans: 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', 'Noto Sans KR', ui-monospace, Menlo, monospace;
  --line-w: 4px;         /* 무브 03: 진행·결·영역 점수는 모두 이 굵기의 가로선 */
  --mark-w: 3px;         /* 고른 답·다듬은 말·입력칸 밑선 */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--ink); }
a:hover { color: var(--blue); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
p, h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.group { display: contents; }

/* 화면 틀: 390 기준, 데스크톱은 가운데 최대 560px */
.page {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
}
.bar { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.wm { display: block; width: 58px; height: 24px; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 12px; color: var(--gray); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 버튼 — 한 화면에 하나 */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 56px; padding: 0 22px;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 0; text-decoration: none;
  font-size: 17px; font-weight: 700; cursor: pointer;
}
.btn:hover { color: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: default; }
.link-btn { background: none; border: 0; padding: 12px; font-size: 14px; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.note { font-size: 13px; color: var(--gray); text-align: center; }

/* ── 무브 04: 군청을 면으로 쓰는 곳은 랜딩과 공유 카드 두 곳뿐 ── */
body.blue { background: var(--blue); color: var(--on-blue); overflow-x: hidden; overflow-x: clip; }
body.blue a { color: var(--on-blue); }
body.blue a:hover { color: var(--on-blue-muted); }
.landing { padding: 28px 24px 24px; }
.landing .tag { font-family: var(--mono); font-size: 13px; color: var(--on-blue-muted); }
.landing .mark { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 150px; }
/* 무브 02: 마지막 획은 화면 오른쪽 끝을 뚫고 나간다(데스크톱에서도 창 끝까지 — 경로 꼬리를 길게 두고 넘치는 곳은 잘라 낸다) */
.landing .mark svg, .card .mark svg { display: block; width: calc(100% + 24px); height: auto; margin-right: -24px; overflow: visible; }
.landing .lead { display: flex; flex-direction: column; gap: 18px; padding-bottom: 32px; }
.landing h1 { font-weight: 900; font-size: 34px; line-height: 1.35; letter-spacing: -0.04em; }
.landing .sub { font-size: 16px; line-height: 1.7; color: var(--on-blue-muted); }
.landing .go { display: flex; flex-direction: column; gap: 14px; }
.btn-white { justify-content: space-between; background: var(--on-blue); color: var(--blue); }
body.blue .btn-white, body.blue .btn-white:hover { color: var(--blue); }
.btn-white .mono { font-size: 14px; font-weight: 500; }
.landing .fine { font-family: var(--mono); font-size: 12px; color: var(--on-blue-muted); text-align: center; }
.landing .foot { margin-top: 28px; text-align: center; font-size: 12px; }
body.blue .landing .foot a { color: var(--on-blue-muted); text-underline-offset: 3px; }

/* ── 무브 03: 진행 표시는 한 선(15칸, 지난 칸은 군청) ── */
.track { display: grid; grid-template-columns: repeat(var(--n, 15), minmax(0, 1fr)); gap: 2px; }
.track > i { display: block; height: var(--line-w); background: var(--line); }
.track > i.on { background: var(--blue); }

/* 문항 */
.q { gap: 26px; }
.q .top { display: flex; flex-direction: column; gap: 14px; }
.q .stop { font-size: 14px; color: var(--gray); text-decoration: none; padding: 12px 12px 12px 0; }
.count { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.count .of, .score .of { color: var(--gray); }
.q .doc { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.passage { font-size: 20px; font-weight: 500; line-height: 1.75; letter-spacing: -0.02em; }
.question { font-size: 16px; font-weight: 700; line-height: 1.55; border-top: 1px solid var(--line); padding-top: 20px; }
.opts { display: flex; flex-direction: column; margin-top: -10px; }
.opt {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: baseline; gap: 6px;
  width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 15px 0; font-size: 15px; line-height: 1.5; cursor: pointer; min-height: 44px;
}
.opt .no { font-family: var(--mono); font-size: 13px; color: var(--gray); }
.opt[aria-pressed="true"] { border-bottom: var(--mark-w) solid var(--blue); padding-bottom: 13px; font-weight: 700; }
.opt[aria-pressed="true"] .no { color: var(--blue); }
.q .end { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.q .skip { background: none; border: 0; padding: 12px; font-size: 14px; color: var(--gray); cursor: pointer; }

/* 결과 */
.r { gap: 36px; padding-bottom: 36px; }
.r section { display: flex; flex-direction: column; }
.head { gap: 6px; }
.score { font-family: var(--mono); font-size: 72px; font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.stage-name { margin-top: 8px; font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.3; }
.stage-line { font-size: 14px; color: var(--gray-2); }
.summary { margin-top: 14px; font-size: 16px; line-height: 1.75; }
.stages { margin-top: 18px; --n: 5; }
.stages > div { display: flex; flex-direction: column; gap: 8px; }
.stages > div > i { display: block; height: var(--line-w); background: var(--line); }
.stages > div.on > i { background: var(--blue); }
.stages span { font-size: 11px; color: var(--gray); }
.stages .me span { color: var(--ink); font-weight: 700; }

.areas .row { display: grid; grid-template-columns: minmax(0, 1fr) 66px 34px; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; }
.areas .row:first-of-type { border-top: 2px solid var(--ink); }
.areas .row:last-of-type { border-bottom: 1px solid var(--line); }
.areas .row.weak > span:first-child { font-weight: 700; }
.areas .weak-tag { font-size: 12px; font-weight: 400; color: var(--blue); }
.areas .frac { font-family: var(--mono); font-size: 14px; text-align: right; }
.dots { --n: 3; }
.weak-line { margin-top: 16px; font-size: 16px; line-height: 1.75; }

.taste { gap: 14px; border-top: var(--line-w) solid var(--blue); padding-top: 18px; }
.taste .passage { font-size: 16px; }
.taste .question { border-top: 0; padding-top: 0; font-size: 15px; }
.pick { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 10px; font-size: 15px; line-height: 1.6; }
.pick dt { font-size: 13px; color: var(--gray); padding-top: 1px; }
.pick dd { margin: 0; }
.explain { font-size: 16px; line-height: 1.75; color: var(--gray-2); }
.ten { font-size: 13px; color: var(--gray); }

/* 무브 06: 들어온 말에만 군청 밑줄, 빠진 말은 회색으로 물러남(취소선 없음) */
.u { font-weight: 700; text-decoration: underline var(--mark-w) var(--blue); text-underline-offset: 5px; text-decoration-skip-ink: none; }
.back { color: var(--gray); }

/* 말하기 다듬기 미리 보기(B-4를 고정 문장으로) */
.speak { gap: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.speak .bar { height: auto; }
.speak .title { font-size: 15px; font-weight: 700; }
.speak .soon { font-family: var(--mono); font-size: 12px; color: var(--blue); }
.speak .ask { font-size: 20px; font-weight: 900; line-height: 1.45; letter-spacing: -0.03em; }
.speak .timer { display: flex; align-items: center; gap: 12px; }
.speak .timer > i { flex: 1; height: var(--line-w); background: linear-gradient(to right, var(--blue) 70%, var(--line) 70%); }
.speak .timer span { font-family: var(--mono); font-size: 13px; }
.speak .said { font-size: 16px; line-height: 1.8; }
.speak .fixed { font-size: 21px; font-weight: 700; line-height: 1.7; letter-spacing: -0.02em; }
.speak .fixed .u { text-underline-offset: 6px; }
.speak .label.blue { color: var(--blue); }
.speak dl { margin: 0; }
.speak dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.speak dl > div:first-child { border-top: 2px solid var(--ink); }
.speak dl > div:last-child { border-bottom: 1px solid var(--line); }
.speak dt { color: var(--gray); }
.speak dd { margin: 0; }
.speak .fine { font-size: 12px; color: var(--gray); }

/* 대기열 — 입력칸 밑선도 같은 군청 선 */
.wait { gap: 14px; }
.wait h2 { font-size: 19px; font-weight: 900; line-height: 1.45; letter-spacing: -0.02em; }
.wait .more { font-size: 15px; line-height: 1.7; color: var(--gray-2); }
.wait form { display: flex; flex-direction: column; gap: 14px; }
.wait label.field { font-size: 13px; color: var(--gray); }
.wait input[type="email"] { height: 52px; border: 0; border-bottom: var(--mark-w) solid var(--blue); border-radius: 0; background: transparent; padding: 0 2px; font-size: 16px; margin-top: -8px; }
/* 입력칸은 군청 밑선이 곧 표시라 상자 테두리를 더하지 않는다 */
.wait input[type="email"]:focus-visible { outline: none; border-bottom-width: 4px; }
.wait input[type="email"]::placeholder { color: var(--gray); }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.6; color: var(--ink); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.consent-body { font-size: 12px; line-height: 1.7; color: var(--gray); }
.consent-body p + p { margin-top: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { font-size: 14px; line-height: 1.7; }
.msg.err { color: var(--blue); }

/* 공유 */
.share { gap: 12px; align-items: center; }
.share .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; }
.share .opt-score { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray); cursor: pointer; }
.share .opt-score input { accent-color: var(--blue); margin: 0; }

/* 결을 매기지 않는 화면 */
.unrated { gap: 18px; padding-top: 24px; }
.unrated h1 { font-size: 28px; font-weight: 900; line-height: 1.35; letter-spacing: -0.03em; }

/* 공유 링크 페이지 /k/{n} — 공유 카드와 같은 구도 */
.card { padding: 44px 40px 40px; }
.card .tag { font-family: var(--mono); font-size: 13px; color: var(--on-blue-muted); }
.card .wm { width: 68px; height: 28px; }
.card .big { margin-top: 96px; display: flex; flex-direction: column; gap: 14px; }
.card .name { font-size: 96px; font-weight: 900; line-height: 1.1; letter-spacing: -0.05em; }
.card .line { font-size: 16px; line-height: 1.6; color: var(--on-blue-muted); }
.card .bottom { margin-top: auto; padding-top: 48px; display: flex; flex-direction: column; gap: 32px; }
.card .mark svg { width: calc(100% + 40px); margin-right: -40px; }
.card .foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.card .foot .mono { color: var(--on-blue-muted); }
@media (max-width: 389px) { .card .name { font-size: 76px; } .card .big { margin-top: 64px; } }

/* 개인정보 처리방침 */
.doc-page { gap: 28px; }
.doc-page h1 { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.35; }
.doc-page h2 { font-size: 16px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 8px; }
.doc-page section { font-size: 15px; line-height: 1.75; color: var(--gray-2); }
.doc-page ul { margin: 0; padding-left: 18px; }
.doc-page li + li { margin-top: 4px; }
.doc-page code { font-family: var(--mono); font-size: 13px; }
