/* style.css — 1021209 REACTION_TEST (반응속도 테스트) · 2026-09-26 개편
   출발점: DesignKit kit-aurora (중앙 정렬 · 큰 여백 · 둥근 형태 · Pretendard)
   → 평면 변형: aurora 의 그라디언트 배경·글래스 헤더·그림자·컬러 아이콘 배지는 전부 뺐다.
     면(面)의 명도 차이(paper / well)만으로 구획하고, 테두리는 거의 쓰지 않는다. 유채색 없음.
   - 한가운데 한 줄 컬럼: 알약 모드 스위치 → 둥근 측정 판 → 회차 칩 → 큰 수치 4개 → 알약 버튼
   - 시각 신호 = 판 전체 잉크 반전(테스트 영역 안의 유일한 신호, 기존과 같은 의미)
   - 수치는 Pretendard 가는 굵기 + tabular-nums (모노 글꼴 없음)
   - 디자인 레퍼런스: minimal.gallery (무작위 5개 godly·readymag·minimal.gallery·poolside·vercel 중) */
:root {
  --paper: #fafaf9; --well: #f0f0ee; --well-2: #e7e7e4;
  --ink: #171717; --ink-2: #5a5a58; --ink-3: #94948f;
  --line: #e4e4e1; --line-2: #d2d2ce;
  --r-xl: 32px; --r-l: 22px; --r-m: 16px; --r-s: 12px;
  --col: 720px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic',
    'Hiragino Sans', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans', 'Noto Sans Arabic', Tahoma, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121212; --well: #1c1c1c; --well-2: #262626;
  --ink: #ededeb; --ink-2: #a8a8a4; --ink-3: #72726e;
  --line: #2a2a2a; --line-2: #3a3a3a;
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; overflow-wrap: break-word; }
html:lang(ko) body { word-break: keep-all; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ── header: 내비(시작) · 브랜드(가운데) · 도구(끝) ── */
.top { background: var(--paper); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.brand { justify-self: center; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.mark { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); flex: none; }
.nav { justify-self: start; display: flex; gap: 4px; }
.nav a { color: var(--ink-3); text-decoration: none; font-size: .9rem; font-weight: 500; padding: 6px 13px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--well); }
.top-tools { justify-self: end; display: flex; gap: 8px; align-items: center; }
.lang { height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); padding: 0 12px; font-size: .86rem; max-width: 136px; cursor: pointer; }
.theme-btn { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--paper); border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.lang:hover, .theme-btn:hover { background: var(--well); }
@media (max-width: 860px) {
  .top-in { height: auto; padding-top: 14px; padding-bottom: 6px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand tools" "nav nav"; row-gap: 10px; }
  .brand { grid-area: brand; justify-self: start; }
  .top-tools { grid-area: tools; }
  .nav { grid-area: nav; justify-self: center; max-width: 100%; overflow-x: auto; }
}

/* ── test ── */
.app { width: 100%; max-width: var(--col); margin: 0 auto; padding: 36px 16px 72px; flex: 1; }
.bench { display: flex; flex-direction: column; align-items: center; }

/* 모드 스위치(알약 세그먼트). 선택된 모드의 부제는 스위치 아래 가운데에 보인다 */
.modes { position: relative; display: inline-flex; gap: 4px; padding: 5px; background: var(--well); border-radius: 999px; margin-bottom: 52px; max-width: 100%; }
.mode { border: 0; background: transparent; border-radius: 999px; padding: 9px 22px; cursor: pointer; color: var(--ink-3); min-width: 0; }
.mode .m-t { font-weight: 600; font-size: .95rem; white-space: nowrap; }
.mode:hover { color: var(--ink); }
.mode[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.mode .m-s { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mode[aria-selected="true"] .m-s { width: auto; height: auto; clip: auto; overflow: visible; left: 0; right: 0; top: calc(100% + 12px);
  text-align: center; font-size: .84rem; color: var(--ink-3); white-space: normal; }
:root[data-theme="dark"] .mode[aria-selected="true"] { background: var(--well-2); }

/* 측정 판 */
.stage { position: relative; width: 100%; min-height: clamp(320px, 54vh, 500px); display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 48px 24px 72px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: var(--well); color: var(--ink); border-radius: var(--r-xl); outline: none; text-align: center; }
.stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.st-top { position: absolute; left: 16px; right: 16px; bottom: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: .8rem; color: var(--ink-3); }
.st-trial { font-variant-numeric: tabular-nums; font-weight: 600; }
.st-read { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.st-num { font-weight: 200; font-size: clamp(88px, 17vw, 184px); letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.st-unit { font-size: clamp(18px, 2.4vw, 24px); font-weight: 400; color: var(--ink-3); visibility: hidden; }
.stage.has-ms .st-unit { visibility: visible; }
.st-msg { margin: 26px auto 0; max-width: 460px; min-height: 3.4em; color: var(--ink-2); font-size: 1rem; line-height: 1.7; }
.st-sym { display: none; width: clamp(120px, 24vw, 190px); height: clamp(120px, 24vw, 190px); }
.st-sym svg { width: 100%; height: 100%; display: block; }
.stage[data-state="wait"] .st-num { color: var(--ink-3); }

/* 시각 신호: 판 전체 반전 (시각 모드만. 청각 모드는 절대 바꾸지 않는다) */
.stage[data-mode="visual"][data-state="go"] { background: var(--ink); color: var(--paper); }
.stage[data-mode="visual"][data-state="go"] .st-top,
.stage[data-mode="visual"][data-state="go"] .st-msg { color: var(--paper); }
.stage[data-mode="visual"][data-state="go"] .st-msg { font-size: clamp(34px, 6vw, 60px); font-weight: 700; letter-spacing: -0.03em; margin-top: 0; min-height: 0; }
.stage[data-mode="visual"][data-state="go"] .st-read { display: none; }
/* Go/No-go: 기호만 표시 */
.stage[data-mode="gonogo"][data-state="go"] .st-sym { display: block; }
.stage[data-mode="gonogo"][data-state="go"] .st-read,
.stage[data-mode="gonogo"][data-state="go"] .st-msg { display: none; }

/* 회차 칩 */
.ticks { list-style: none; margin: 20px 0 0; padding: 0; width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ticks[data-n="8"] { max-width: none; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.tick { padding: 10px 6px 11px; border-radius: var(--r-m); background: var(--well); display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.tk-k { font-size: .7rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tk-v { font-size: 1.02rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tick.cur { background: var(--paper); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.tick.err .tk-v { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-3); }

/* 지표: 큰 수치 위 · 라벨 아래 · 테두리 없이 여백으로 구분 */
.readouts { width: 100%; margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 12px; }
.readouts.gng { margin-top: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.ro { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.ro-k { font-size: .82rem; color: var(--ink-3); line-height: 1.4; }
.ro-v { display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.ro-v b { font-weight: 300; font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ro-v i { font-style: normal; font-size: .8rem; color: var(--ink-3); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 48px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 24px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  border-radius: 999px; cursor: pointer; font-size: .95rem; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--well); }
.btn.solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.solid:hover { opacity: .86; background: var(--ink); }
.btn:disabled { border-color: var(--line); background: var(--well); color: var(--ink-3); cursor: default; opacity: 1; }
.lnk { background: none; border: 0; padding: 0; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .8rem; }
.lnk:disabled { opacity: .5; cursor: default; }

/* 차트 */
.charts { margin-top: 80px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart { margin: 0; padding: 20px 20px 14px; background: var(--well); border-radius: var(--r-l); min-width: 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.cap-r { display: inline-flex; gap: 10px; align-items: baseline; font-size: .76rem; font-weight: 400; color: var(--ink-3); }
.svg { width: 100%; height: auto; display: block; overflow: visible; }
.svg .gl { stroke: var(--well-2); stroke-width: 1; }
.svg .axl { stroke: var(--ink-3); stroke-width: 1; }
.svg .ax { fill: var(--ink-3); font-family: var(--font); font-size: 9px; font-variant-numeric: tabular-nums; }
.svg .bar { fill: var(--ink); rx: 3px; }
.svg .bar.hollow { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 2; }
.svg .meanl { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 3; }
.svg .mk { fill: var(--ink-2); font-family: var(--font); font-size: 11px; }
.svg .ln { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.svg .pt { fill: var(--well); stroke: var(--ink); stroke-width: 1.5; }
.svg .pt.best { fill: var(--ink); }
.svg .empty { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }

.acc { margin: 36px auto 0; max-width: 560px; text-align: center; font-size: .8rem; color: var(--ink-3); line-height: 1.7; }

@media (max-width: 720px) {
  .app { padding: 20px 16px 56px; }
  .modes { display: flex; width: 100%; margin-bottom: 48px; }
  .mode { flex: 1 1 0; padding: 9px 8px; }
  .mode .m-t { white-space: normal; font-size: .9rem; }
  .stage { min-height: clamp(300px, 54vh, 440px); border-radius: 26px; padding: 44px 16px 68px; }
  .ticks[data-n="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tk-v { font-size: .95rem; }
  .readouts { margin-top: 44px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .actions { margin-top: 40px; }
  .actions .btn { flex: 1 1 0; padding: 0 14px; }
  .charts { margin-top: 56px; grid-template-columns: minmax(0, 1fr); }
}

/* ── ads (애드핏 규정: 래퍼에 radius·overflow 금지) ── */
.ad-wrap { margin: 48px auto 0; }
.ad-grid { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 672px; margin: 0 auto; }
.ad-grid[data-ad-layout="mixed"] { max-width: 760px; }
.ad-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.ad-cell { min-height: 50px; max-width: 100%; }
.ad-pc { display: none; }
@media (min-width: 720px) { .ad-pc { display: flex; } .ad-mo { display: none; } }
.prose .ad-wrap { margin: 40px 0; }

/* ── content pages: 머리는 가운데, 본문은 읽기 폭 ── */
.page { width: 100%; max-width: 680px; margin: 0 auto; padding: 48px 16px 72px; flex: 1; }
.crumb { font-size: .8rem; color: var(--ink-3); margin-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb .sep { color: var(--line-2); }
.page-top { text-align: center; margin-bottom: 44px; }
.page-h { font-size: clamp(1.9rem, 5vw, 2.7rem); letter-spacing: -0.04em; line-height: 1.22; margin: 0 0 14px; font-weight: 700; }
.lead { color: var(--ink-2); font-size: 1.06rem; margin: 0 auto; max-width: 540px; }
.kicker { font-size: .78rem; font-weight: 600; color: var(--ink-3); margin: 0 0 12px; text-align: center; font-variant-numeric: tabular-nums; }
.prose > h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.25; margin: 0 0 18px; font-weight: 700; text-align: center; }
.prose > .lead { text-align: center; }
.prose > .lead { margin-bottom: 20px; }
.prose > .lead + p { text-align: center; margin-bottom: 40px; }
.prose h2 { font-size: 1.3rem; margin: 52px 0 12px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.4; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin: 7px 0; }
.prose li::marker { color: var(--ink-3); }
.prose code { font-size: .9em; background: var(--well); padding: 2px 7px; border-radius: 6px; }
.prose a { word-break: break-word; }
.formula { font-size: 1.02rem; font-weight: 500; padding: 14px 20px; background: var(--well); border-radius: var(--r-m); text-align: center; font-variant-numeric: tabular-nums; }
.tbl { overflow-x: auto; margin: 20px 0; background: var(--well); border-radius: var(--r-m); padding: 6px 14px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.tbl th, .tbl td { border-bottom: 1px solid var(--well-2); padding: 10px 8px; text-align: start; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-weight: 600; color: var(--ink-2); font-size: .84rem; }
.tbl td { font-variant-numeric: tabular-nums; }
.refs li { font-size: .95rem; }
.disclaimer { background: var(--well); border-radius: var(--r-m); padding: 16px 20px; font-size: .9rem; color: var(--ink-2); margin: 28px 0; }
.faq { background: var(--well); border-radius: var(--r-m); padding: 0; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 20px; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.2rem; line-height: 1; flex: none; }
.faq[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); }
.cta { margin-top: 44px; text-align: center; }
.mail { font-size: .98rem; text-align: center; background: var(--well); border-radius: var(--r-m); padding: 16px 20px; }
.mail span { color: var(--ink-3); margin-inline-end: 6px; }
.related { margin-top: 64px; }
.related h2 { text-align: center; font-size: 1.05rem; color: var(--ink-2); }
.related ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.related li { margin: 0; }
.related a { display: block; text-decoration: none; background: var(--well); border-radius: var(--r-m); padding: 14px 20px; font-weight: 500; }
.related a:hover { background: var(--well-2); }

/* 가이드 허브: 카드 그리드 */
.gcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gcard { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 18px; background: var(--well); border-radius: var(--r-l); text-decoration: none; color: var(--ink); min-width: 0; }
.gcard:hover { background: var(--well-2); }
.gc-n { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: .76rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.gc-t { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; line-height: 1.45; }
.gc-d { font-size: .9rem; color: var(--ink-2); line-height: 1.6; flex: 1; }
.gc-a { color: var(--ink-3); margin-top: 6px; }
[dir="rtl"] .gc-a { transform: scaleX(-1); align-self: flex-start; }
@media (max-width: 720px) { .gcards { grid-template-columns: minmax(0, 1fr); } .page { padding-top: 32px; } }

/* 404 */
.nf { text-align: center; padding-top: 20px; }
.nf-code { font-weight: 200; font-size: 128px; letter-spacing: -0.06em; line-height: 1; margin: 0 0 16px; }
.nf-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 32px; font-size: .9rem; }

/* ── footer: 가운데 정렬 ── */
.foot { margin-top: 32px; }
.foot-in { max-width: 760px; margin: 0 auto; padding: 40px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; border-top: 1px solid var(--line); }
.foot-main, .foot-guides { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: .88rem; }
.foot-main a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.foot-guides a { color: var(--ink-3); text-decoration: none; font-size: .8rem; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.copyright { margin: 8px 0 0; font-size: .74rem; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink); color: var(--paper); padding: 10px 20px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; z-index: 50; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
