/* ==========================================================================
   생활계산소 — 공통 스타일
   ========================================================================== */

:root {
  --ink: #0f172a;
  --ink-2: #1f2a3d;
  --muted: #5b6675;
  --muted-2: #78828f;
  --line: #e3e7ee;
  --line-strong: #cfd6e0;
  --bg: #f6f7f9;
  --bg-soft: #eef2f7;
  --surface: #ffffff;
  --blue: #1b4fd8;
  --blue-dark: #143aa0;
  --blue-soft: #eaf0ff;
  --teal: #0d8a7a;
  --teal-soft: #e3f5f1;
  --amber: #b45309;
  --amber-soft: #fdf3e3;
  --red: #b42318;
  --red-soft: #fdeceb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 40px rgba(15, 23, 42, .10);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          system-ui, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕",
          "Noto Sans KR", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1140px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--surface);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.32; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
strong { color: var(--ink); font-weight: 700; }
code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}
.narrow { max-width: 780px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible {
  outline: 3px solid rgba(27, 79, 216, .45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark { display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.12rem; letter-spacing: -.03em; }
.brand-text small {
  font-size: .72rem;
  color: var(--muted-2);
  font-weight: 500;
  letter-spacing: -.01em;
}
.site-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }
.nav-link.is-active { color: var(--blue-dark); background: var(--blue-soft); }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px; height: 2px;
  margin: 3px auto;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 80% -10%, #e7f8f4 0%, rgba(231, 248, 244, 0) 60%),
    radial-gradient(900px 380px at 6% 0%, #eaf0ff 0%, rgba(234, 240, 255, 0) 58%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px;
  align-items: center;
  padding: 76px 0 72px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -.045em;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-lead {
  margin-top: 22px;
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 40em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats dt { font-size: .78rem; color: var(--muted-2); font-weight: 600; }
.hero-stats dd {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.hero-visual { display: flex; justify-content: flex-end; }
.hero-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 24px 20px;
}
.hero-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.dot:first-child { background: #f0b0a8; }
.dot:nth-child(2) { background: #f2d69a; }
.dot:nth-child(3) { background: #a6dcc9; }
.hero-card-title {
  margin-left: auto;
  font-size: .78rem;
  color: var(--muted-2);
  font-weight: 600;
}
.hero-bar {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hero-bar-label { font-size: .78rem; color: var(--muted); }
.hero-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.hero-bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #5cc7b5);
}
.hero-bar:nth-of-type(3) .hero-bar-track span { background: linear-gradient(90deg, var(--blue), #6f97f5); }
.hero-bar:nth-of-type(4) .hero-bar-track span { background: linear-gradient(90deg, #2f5fb3, #8fb0f2); }
.hero-bar-value {
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-card-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: .74rem;
  color: var(--muted-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .96rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 20px rgba(15, 23, 42, .16); }
.btn-primary:hover { background: #1b2740; color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }

/* ---------- trust strip ---------- */
.trust-strip { background: var(--bg); border-bottom: 1px solid var(--line); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.trust-item {
  padding: 26px 28px 26px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust-item + .trust-item { border-left: 1px solid var(--line); padding-left: 28px; }
.trust-item strong { font-size: .92rem; }
.trust-item span { font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-posts { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; }
.section-lead { margin-top: 10px; color: var(--muted); font-size: .98rem; }

/* ---------- calculator list ---------- */
.calc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.calc-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name arrow" "hint arrow";
  align-items: center;
  gap: 2px 16px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.calc-link:hover {
  border-color: #b9c8e8;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  color: inherit;
}
.calc-link-name { grid-area: name; font-weight: 700; color: var(--ink); font-size: 1rem; }
.calc-link-hint { grid-area: hint; font-size: .84rem; color: var(--muted); }
.calc-list .calc-link:last-child:nth-child(odd) { grid-column: 1 / -1; }
.calc-link-arrow {
  grid-area: arrow;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 700;
}

/* ---------- post tools / filters / cards ---------- */
.post-tools { display: flex; gap: 10px; }
.search-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 44px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--muted-2);
  min-width: 250px;
}
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 79, 216, .12); }
.search-box input {
  border: 0;
  outline: 0;
  font: inherit;
  font-size: .9rem;
  width: 100%;
  background: transparent;
  color: var(--ink);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 15px;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip:hover { border-color: #b9c8e8; }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-count { margin-left: auto; font-size: .8rem; color: var(--muted-2); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  display: flex;
}
.post-card:hover { border-color: #b9c8e8; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.post-card[hidden] { display: none; }
.post-card-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 24px 20px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.post-card-link:hover { color: inherit; }
.post-card-top { display: flex; gap: 8px; align-items: center; }
.post-card h3 { font-size: 1.14rem; font-weight: 700; line-height: 1.45; }
.post-card p { font-size: .89rem; color: var(--muted); line-height: 1.65; }
.post-card-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  gap: 6px;
  font-size: .78rem;
  color: var(--muted-2);
}
.empty-state { padding: 40px 0; color: var(--muted); font-size: .94rem; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.badge-tax { background: #eef1fd; color: #2f45a8; }
.badge-benefit { background: var(--teal-soft); color: #0a6b5f; }
.badge-calc { background: var(--amber-soft); color: #8a4708; }
.badge-soft { background: var(--bg-soft); color: var(--muted); }
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
}
.chip-calc { border-color: #cfe3de; color: #0a6b5f; background: #f4fbf9; }

/* ---------- about / principles ---------- */
.section-about { background: #fff; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}
.principle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.principle-list li { display: flex; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.principle-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.principle-num {
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--blue);
  padding-top: 3px;
}
.principle-list strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.principle-list p { font-size: .88rem; color: var(--muted); }

/* ---------- post ---------- */
.page-post { background: #fff; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: .8rem;
  color: var(--muted-2);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

.post-header { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.post-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.post-header h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  max-width: 22em;
}
.post-deck { margin-top: 14px; font-size: 1.02rem; color: var(--muted); max-width: 46em; }
.post-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: var(--muted-2);
}

.post-layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 48px;
  padding: 36px 0 72px;
  align-items: start;
}
.post-aside { position: sticky; top: 96px; display: grid; gap: 14px; }
.aside-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: var(--bg);
}
.aside-title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc-list li { counter-increment: toc; margin: 0; }
.toc-list li a {
  display: block;
  padding: 5px 0 5px 24px;
  position: relative;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc-list li a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 5px;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--muted-2);
}
.toc-list li a:hover { color: var(--blue); border-left-color: var(--blue); }
.toc-list li a.is-current { color: var(--blue-dark); background: #f3f7ff; border-left-color: var(--blue); font-weight: 600; }
.aside-calc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--blue-dark);
}
.aside-note { margin-top: 6px; font-size: .72rem; color: var(--muted-2); }

.post-body { min-width: 0; max-width: 760px; }
.post-body > * + * { margin-top: 1.15em; }

.summary-box {
  border: 1px solid #cfe0ff;
  background: linear-gradient(180deg, #f4f8ff, #fbfdff);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 34px;
}
.summary-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 8px;
}
.summary-box ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 7px; }
.summary-box li {
  position: relative;
  padding-left: 20px;
  font-size: .95rem;
  line-height: 1.6;
}
.summary-box li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--blue);
}
.summary-foot { margin-top: 12px; font-size: .78rem; color: var(--muted-2); }

/* prose */
.prose h2,
.post-body h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  font-weight: 800;
  margin: 2.6em 0 .8em;
  padding-top: .2em;
  scroll-margin-top: 96px;
}
.post-body h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--blue);
  margin-bottom: 14px;
}
.post-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 1.9em 0 .6em;
  scroll-margin-top: 96px;
}
.post-body h4 { font-size: .98rem; font-weight: 700; margin: 1.4em 0 .4em; }
.post-body p { color: var(--ink-2); }
.post-body ul, .post-body ol { padding-left: 1.3em; color: var(--ink-2); }
.post-body li { margin: .35em 0; }
.post-body li > ul, .post-body li > ol { margin: .3em 0; }
.post-body a { font-weight: 600; }
.post-body blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-left: 3px solid var(--line-strong);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-size: .94rem;
}
.post-body small { font-size: .8rem; color: var(--muted-2); }

/* tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.post-body table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 480px;
}
.post-body caption,
.prose caption {
  caption-side: top;
  text-align: left;
  font-size: .78rem;
  color: var(--muted-2);
  padding: 10px 14px 0;
}
.post-body th,
.post-body td,
.prose th,
.prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.post-body thead th,
.prose thead th {
  background: var(--bg);
  font-size: .8rem;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.post-body tbody tr:last-child td { border-bottom: 0; }
.post-body td.num,
.prose td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-body tbody tr.highlight td { background: #f7faff; font-weight: 600; }

/* callouts */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  background: #f8faff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  margin: 1.5em 0;
  font-size: .92rem;
}
.callout p { margin: 0; }
.callout p + p { margin-top: .5em; }
.callout strong { display: block; margin-bottom: 4px; font-size: .9rem; }
.callout.warn { border-left-color: var(--amber); background: #fffaf2; }
.callout.tip { border-left-color: var(--teal); background: #f4fbf9; }
.callout.danger { border-left-color: var(--red); background: #fff7f6; }

/* checklist */
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 8px; margin: 1.4em 0; }
.checklist li {
  position: relative;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: .9rem;
  margin: 0;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%);
  border: 2px solid var(--line-strong);
  border-radius: 4px;
}

/* figures / infographics */
.figure {
  margin: 1.8em 0;
  padding: 20px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: .76rem;
  color: var(--muted-2);
  line-height: 1.55;
}
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* kpi cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 1.6em 0;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}
.kpi-label { font-size: .76rem; color: var(--muted-2); font-weight: 600; }
.kpi-value { display: block; margin-top: 2px; font-size: 1.32rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.kpi-note { font-size: .72rem; color: var(--muted-2); }

/* ---------- calculator ---------- */
.calc {
  margin: 2.2em 0;
  border: 1px solid #ccd9f2;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 88px;
}
.calc-head {
  padding: 22px 24px 18px;
  background: linear-gradient(180deg, #f2f6ff, #fbfdff);
  border-bottom: 1px solid #dde7fa;
}
.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.calc-head h2 {
  margin: 10px 0 0 !important;
  font-size: 1.25rem !important;
  padding: 0 !important;
}
.calc-head h2::before { display: none !important; }
.calc-head p { margin-top: 6px; font-size: .86rem; color: var(--muted); }
.calc-form { padding: 22px 24px 6px; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .72rem; color: var(--muted-2); margin: 0; }
.field input[type="number"],
.field input[type="text"],
.field select {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  width: 100%;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6675' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field textarea {
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  width: 100%;
  resize: vertical;
  min-height: 120px;
}
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: var(--bg);
  color: var(--muted-2);
  cursor: not-allowed;
}
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.contact-form {
  margin: 1.8em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 8px;
  background: #fbfcfe;
}
.contact-form .calc-actions { padding-left: 0; padding-right: 0; }
.field input:focus, .field select:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 216, .13);
}
.field.invalid input, .field.invalid select { border-color: var(--red); }
.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font-size: .86rem;
}
.check-field input { width: 17px; height: 17px; accent-color: var(--blue); }
.calc-actions {
  display: flex;
  gap: 10px;
  padding: 18px 24px 20px;
  flex-wrap: wrap;
}
.calc-actions .btn { min-height: 46px; padding: 0 24px; }
.calc-note {
  padding: 0 24px 20px;
  font-size: .74rem;
  color: var(--muted-2);
  line-height: 1.55;
}
.calc-result {
  margin: 0 24px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 18px 20px;
}
.calc-result.is-empty { color: var(--muted); font-size: .86rem; }
.result-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.result-hero-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.result-hero-value {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.result-hero-value small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.result-hero-sub { font-size: .84rem; color: var(--muted); }
.result-rows { margin-top: 14px; border-top: 1px solid var(--line-strong); }
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .86rem;
}
.result-row:last-child { border-bottom: 0; }
.result-row span:first-child { color: var(--muted); }
.result-row span:last-child { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.result-row.is-key span:last-child { color: var(--blue-dark); }
.result-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
}
.result-tag.ok { background: var(--teal-soft); color: #0a6b5f; }
.result-tag.no { background: var(--amber-soft); color: #8a4708; }
.result-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .85rem;
}
.result-list li:last-child { border-bottom: 0; }
.result-list li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.result-foot { margin-top: 12px; font-size: .74rem; color: var(--muted-2); line-height: 1.55; }

/* ---------- disclaimer ---------- */
.disclaimer {
  margin: 2.6em 0 1.6em;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.disclaimer strong { display: block; font-size: .84rem; margin-bottom: 4px; }
.disclaimer p { font-size: .8rem; color: var(--muted); line-height: 1.65; }
.disclaimer-meta { margin-top: 6px; font-size: .74rem !important; color: var(--muted-2) !important; }

/* ---------- FAQ ---------- */
.post-faq { margin-top: 3em; }
.post-faq h2 { font-size: 1.3rem !important; }
.post-faq h2::before { display: none !important; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: .93rem;
  color: var(--ink);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: #fafbfd; }
.faq-icon { color: var(--muted-2); font-size: 1rem; transition: transform .15s ease; flex: none; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 18px 16px;
  font-size: .9rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.faq-answer p { margin: 0 0 .6em; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- related ---------- */
.post-related { margin-top: 3em; }
.post-related h2 { font-size: 1.3rem !important; }
.post-related h2::before { display: none !important; }
.related-grid { display: grid; gap: 10px; }
.related-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.related-card:hover { border-color: #b9c8e8; background: #fbfcff; color: inherit; }
.related-card strong { font-size: .92rem; font-weight: 600; line-height: 1.45; }
.related-meta { font-size: .74rem; color: var(--muted-2); white-space: nowrap; }
.back-top { margin-top: 2em; font-size: .84rem; }
.back-top a { color: var(--muted); text-decoration: none; }

/* ---------- static pages ---------- */
.page-static { background: #fff; }
.static-header { padding: 56px 0 24px; border-bottom: 1px solid var(--line); }
.static-header h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; }
.prose { padding: 32px 0 80px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.25rem; font-weight: 800; margin: 2.2em 0 .7em; }
.prose h3 { font-size: 1rem; font-weight: 700; margin: 1.6em 0 .5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose .updated { font-size: .8rem; color: var(--muted-2); }
.prose .policy-list { display: grid; gap: 10px; padding-left: 0; list-style: none; }
.prose .policy-list li { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.prose .policy-list strong { display: block; margin-bottom: 2px; }

/* ---------- 404 ---------- */
.error-page { padding: 100px 0 120px; }
.error-code {
  font-family: var(--mono);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  color: var(--line-strong);
  letter-spacing: -.05em;
  line-height: 1;
}
.error-page h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 14px; }
.error-lead { margin-top: 12px; color: var(--muted); max-width: 34em; }
.error-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c7d0dd; margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding: 52px 0 34px;
}
.footer-brand strong { color: #fff; font-size: 1.05rem; display: block; margin-bottom: 4px; }
.footer-brand p { font-size: .86rem; color: #9aa8bb; }
.footer-note { margin-top: 10px; font-size: .78rem !important; color: #7d8ba0 !important; max-width: 34em; line-height: 1.6; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-content: start; }
.footer-nav a { color: #c7d0dd; text-decoration: none; font-size: .86rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid #26324a; padding: 18px 0 28px; }
.footer-bottom p { font-size: .76rem; color: #7d8ba0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0; }
  .hero-visual { justify-content: flex-start; }
  .hero-card { max-width: 480px; }
  .post-layout { grid-template-columns: 1fr; gap: 28px; }
  .post-aside { position: static; grid-row: 1; grid-template-columns: 1fr 1fr; }
  .post-body { max-width: none; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 640px) {
  .figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .figure svg { min-width: 560px; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .header-inner { min-height: 64px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 16px; right: 16px; top: 64px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-hover);
    padding: 8px;
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: 11px 14px; border-radius: 8px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { padding: 18px 0; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .calc-list { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .search-box { min-width: 0; width: 100%; }
  .filter-count { margin-left: 0; width: 100%; }
  .post-aside { display: none; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-form, .calc-head, .calc-actions, .calc-note { padding-left: 16px; padding-right: 16px; }
  .calc-result { margin: 0 10px 14px; padding: 16px; }
  .hero-stats { gap: 22px; }
  .post-layout { padding: 24px 0 52px; }
  .related-card { grid-template-columns: 1fr; gap: 6px; }
  .related-meta { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .post-aside, .hero-actions, .calc-actions, .filter-row, .post-tools { display: none !important; }
  body { font-size: 11pt; }
  .post-layout { display: block; padding: 0; }
  .calc { break-inside: avoid; }
  a { color: inherit; }
}
