/*!
 * style.css — Seoul Skin Price Index (M-05 글로벌 파일럿)
 * 외부 폰트·CDN 없이 시스템 폰트만 사용한다(정적·개인정보 최소화).
 */
:root {
  --ink: #14181c;
  --ink-soft: #46505a;
  --muted: #6d7883;
  --line: #dde3e8;
  --bg: #fbfaf7;
  --card: #ffffff;
  --brand: #0f4c5c;
  --brand-soft: #e6f0f2;
  --fair: #1f7a4d;
  --fair-bg: #e6f4ec;
  --above: #9a6a00;
  --above-bg: #fdf3dc;
  --high: #a3271f;
  --high-bg: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px rgba(16, 24, 32, .06);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
          "Hiragino Sans", "Noto Sans JP", "Malgun Gothic", "Apple SD Gothic Neo", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: .01em;
}

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); font-weight: 750; }
h2 { font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 700; margin-top: 1.2em; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin: .35em 0; }
strong { font-weight: 700; }

.wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.section { padding: .9rem 0 1.9rem; }
.narrow-text { max-width: 780px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .86rem; line-height: 1.55; }
.hint.warn { color: var(--above); background: var(--above-bg); border-radius: 8px; padding: .5rem .7rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }

/* ── head ─────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 250, 247, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--ink); font-weight: 700; min-width: 0; }
.brand-mark { color: var(--brand); font-size: 1.2rem; }
.brand-text { font-size: .98rem; letter-spacing: -.01em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { text-decoration: none; font-size: .9rem; color: var(--ink-soft); }
.site-nav a:hover { color: var(--brand); }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: .18rem .7rem; background: #fff; }

/* ── banner ───────────────────────────────────────── */
.banner { padding: .8rem 0; font-size: .9rem; line-height: 1.6; }
.banner p { margin: 0; }
.banner-vat { background: #2b2110; color: #f6edda; }
.banner-vat a { color: #ffe2a8; }
.banner-legal { background: var(--brand-soft); color: #123c46; border-top: 1px solid #cfe2e6; }
.pill {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; border-radius: 999px; padding: .15rem .55rem; margin-right: .45rem;
  vertical-align: .08em;
}
.pill-warn { background: #f2c14e; color: #2b2110; }
.pill-neutral { background: #0f4c5c; color: #eaf4f6; }

/* ── hero ─────────────────────────────────────────── */
.hero { padding: 2.4rem 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; color: var(--muted); margin-bottom: .6rem; }
.lead { font-size: clamp(1rem, 1.6vw, 1.13rem); color: var(--ink-soft); max-width: 62ch; }
.lead.small { font-size: .98rem; }
.stat-strip {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem; padding: 0; margin: 1.6rem 0 0;
}
.stat-strip li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; display: flex; flex-direction: column; gap: .1rem; margin: 0;
}
.stat-strip strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stat-strip span { font-size: .78rem; color: var(--muted); }

/* ── tables ───────────────────────────────────────── */
.table-wrap {
  overflow-x: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
thead th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700; padding: .8rem .9rem; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td, tbody th { padding: .8rem .9rem; border-bottom: 1px solid #eef1f4; vertical-align: top; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { text-align: left; font-weight: 650; }
.num-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.item { min-width: 15rem; color: var(--ink-soft); font-size: .86rem; }
td .src { font-size: .82rem; }
.tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  border-radius: 6px; padding: .05rem .35rem; vertical-align: .08em; text-transform: uppercase;
}
.tag-event { background: var(--above-bg); color: var(--above); }
.tag-list { background: #eef2f5; color: var(--ink-soft); }
.tag-derived { background: var(--brand-soft); color: var(--brand); }
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: .5rem 1rem; font: inherit; font-size: .88rem; font-weight: 650;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #0c3e4b; color: #fff; }
.btn-ghost { background: transparent; }
.btn-small { padding: .25rem .7rem; font-size: .78rem; }

/* ── calculator ───────────────────────────────────── */
.calc {
  display: grid; gap: 1.2rem; grid-template-columns: 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow);
}
.calc-form { display: grid; gap: .85rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field-row { display: grid; gap: .85rem; grid-template-columns: 1fr 1fr; }
label, legend { font-size: .82rem; font-weight: 650; color: var(--ink-soft); }
input[type="text"], input[type="number"], select {
  font: inherit; font-size: .98rem; padding: .6rem .7rem; border: 1px solid #cdd6dd;
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid #7fb2c0; outline-offset: 2px;
}
.vat-field { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.vat-field legend { margin-bottom: .35rem; }
.radio { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; font-size: .9rem; color: var(--ink); }
.radio input { width: auto; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }

.result { border-top: 1px dashed var(--line); padding-top: 1.1rem; display: grid; gap: 1rem; }
.result-head h3 { margin: .5rem 0 .35rem; font-size: 1.15rem; }
.result-head p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.band-pill {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px;
}
.band-pill.fair { background: var(--fair-bg); color: var(--fair); }
.band-pill.above { background: var(--above-bg); color: var(--above); }
.band-pill.high { background: var(--high-bg); color: var(--high); }
.result-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.num {
  background: #f7f8f9; border-radius: 10px; padding: .6rem .7rem;
  display: flex; flex-direction: column; gap: .1rem; min-width: 0;
}
.num-label { font-size: .72rem; color: var(--muted); }
.num strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.scale { display: grid; gap: .35rem; }
.scale-bar { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.zone-fair { background: #b9e3c8; width: 52.27%; }
.zone-above { background: #f6dfa5; width: 20.45%; }
.zone-high { background: #f3c0ba; width: 27.28%; }
.marker {
  position: absolute; top: -4px; width: 3px; height: 22px; background: var(--ink);
  border-radius: 2px; transform: translateX(-50%);
}
.tick { position: absolute; top: 0; width: 1px; height: 100%; background: rgba(20, 24, 28, .35); }
.scale-cap { margin: 0; font-size: .74rem; color: var(--muted); line-height: 1.5; }

table.kv { width: 100%; font-size: .92rem; }
table.kv th { text-align: left; font-weight: 500; color: var(--ink-soft); padding: .35rem 0; }
table.kv td { text-align: right; padding: .35rem 0; font-variant-numeric: tabular-nums; }
table.kv tr.strong th, table.kv tr.strong td { font-weight: 750; border-top: 1px solid var(--line); padding-top: .5rem; color: var(--ink); }

.bench { display: grid; gap: .6rem; }
.bench-item { display: grid; gap: .1rem; font-size: .9rem; }
.bench-item strong { font-variant-numeric: tabular-nums; }
.bench-tag { color: var(--muted); font-size: .78rem; }
.bench-none { color: var(--muted); font-size: .86rem; margin: 0; }

.bench-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.bench-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.bench-card h4 { margin-bottom: .5rem; }
.bench-value { font-size: 1.2rem; font-weight: 750; margin-bottom: .3rem; font-variant-numeric: tabular-nums; }
.bench-pct { font-size: .82rem; font-weight: 700; color: var(--high); margin-left: .4rem; }
.bench-pct[data-dir="down"] { color: var(--fair); }
.bench-main[data-dir="down"] { color: var(--fair); }
.bench-note { font-size: .84rem; color: var(--ink-soft); margin-bottom: .35rem; }
.bench-src { font-size: .76rem; margin: 0; word-break: break-word; }

/* ── detail ───────────────────────────────────────── */
.breadcrumb { font-size: .82rem; margin-bottom: .4rem; }
.breadcrumb a { text-decoration: none; }
.summary { color: var(--ink-soft); max-width: 66ch; }
.aliases { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .9rem 0 .3rem; }
.alias-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-right: .2rem; }
.chip {
  display: inline-block; font-size: .78rem; color: var(--ink-soft); background: #eef2f5;
  border-radius: 999px; padding: .1rem .55rem;
}
.dist-grid { display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dist-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .8rem; display: flex; flex-direction: column; gap: .15rem;
}
.dist-card span { font-size: .72rem; color: var(--muted); }
.dist-card strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.dist-card.accent { border-color: var(--brand); background: #f3f9fa; }
.dist-card.accent strong { color: var(--brand); }

.steps, .limits { padding-left: 1.3rem; }
.steps li, .limits li { margin: .5em 0; color: var(--ink-soft); }
.plain-list { list-style: none; padding: 0; }
.plain-list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .5rem; }

/* ── root ─────────────────────────────────────────── */
.root { padding-top: 3rem; }
.lang-cards { display: grid; gap: .8rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.lang-card {
  display: grid; gap: .2rem; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.lang-card:hover { border-color: var(--brand); }
.lang-card strong { font-size: 1.2rem; }
.lang-card span { font-size: .88rem; color: var(--muted); }

/* ── foot ─────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: #f4f2ec; margin-top: 2rem; padding: 1.6rem 0 2.2rem; }
.foot-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.foot-brand { font-weight: 750; margin-bottom: .3rem; }
.foot-note { font-size: .82rem; color: var(--muted); margin: 0 0 .5rem; word-break: break-word; }

/* ── desktop ──────────────────────────────────────── */
@media (min-width: 760px) {
  .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); padding: 1.4rem; align-items: start; }
  .dist-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bench-grid { grid-template-columns: 1fr 1fr; }
  .lang-cards { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.4fr 1fr; }
  .section { padding: 1rem 0 2.1rem; }
}

/* ── mobile table → stacked cards ─────────────────── */
@media (max-width: 640px) {
  .head-row { min-height: 54px; gap: .5rem; }
  .brand-text { font-size: .78rem; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
  .brand-mark { font-size: 1rem; }
  .site-nav { gap: .55rem; }
  .site-nav a { font-size: .8rem; }
  .site-nav a[href$="/method/"] { display: none; }
  .lang-switch { padding: .1rem .5rem; }
  .stat-strip li { padding: .65rem .7rem; }
  .stat-strip strong { font-size: 1.1rem; }
  .source-table thead { display: none; }
  .source-table, .source-table tbody, .source-table tr, .source-table td { display: block; width: 100%; }
  .source-table tr {
    border-bottom: 1px solid var(--line); padding: .55rem .1rem .7rem;
  }
  .source-table tbody tr:last-child { border-bottom: 0; }
  .source-table td { border: 0; padding: .18rem .9rem; font-size: .88rem; }
  .source-table td::before {
    content: attr(data-label) " "; color: var(--muted); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .06em; margin-right: .35rem;
  }
  .source-table td.item { font-size: .84rem; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; width: 100%; }
  .price-table tbody tr { border-bottom: 1px solid var(--line); padding: .7rem .9rem; }
  .price-table tbody th { border: 0; padding: 0 0 .2rem; font-size: 1rem; }
  .price-table td { border: 0; padding: .12rem 0; font-size: .9rem; }
  .price-table td::before {
    content: attr(data-label) " "; color: var(--muted); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .06em; margin-right: .35rem;
  }
  .price-table td:last-child { padding-top: .5rem; }
  .result-numbers { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
