/* ===== Design tokens ===== */
:root {
  --radius: .75rem;
  --background: oklch(99% .004 85);
  --foreground: oklch(20% .01 60);
  --card: oklch(100% 0 0);
  --primary: oklch(22% .01 60);
  --primary-foreground: oklch(99% .004 85);
  --secondary: oklch(95.5% .01 85);
  --muted-foreground: oklch(52% .012 60);
  --border: oklch(91% .01 80);
  --input: oklch(89% .01 80);
  --ring: oklch(60% .05 145);
  --placeholder: oklch(91% .015 85);
  --field: oklch(97.5% .03 90);
  --enough: oklch(55% .1 150);
  --enough-soft: oklch(95% .04 150);
  --short: oklch(60% .12 60);
  --short-soft: oklch(96% .04 75);
  --info: oklch(55% .12 240);
  --surface: oklch(95.5% .008 85);

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  --spacing: .25rem;
  --container-xs: 20rem;
  --text-xs: .75rem;   --text-xs--line-height: calc(1 / .75);
  --text-sm: .875rem;  --text-sm--line-height: calc(1.25 / .875);
  --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;  --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;  --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem; --text-3xl--line-height: calc(2.25 / 1.875);
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --tracking-tight: -.025em;
  --leading-snug: 1.375;
  --default-transition-duration: .15s;
  --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
}
@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
@property --tw-space-y-reverse { syntax: "*"; inherits: false; initial-value: 0; }
@property --tw-leading { syntax: "*"; inherits: false; }
@property --tw-font-weight { syntax: "*"; inherits: false; }
@property --tw-tracking { syntax: "*"; inherits: false; }
@property --tw-duration { syntax: "*"; inherits: false; }
@property --tw-ease { syntax: "*"; inherits: false; }
@property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
@property --tw-backdrop-blur { syntax: "*"; inherits: false; }

/* ===== Base (Tailwind preflight, trimmed) ===== */
*, ::after, ::before, ::backdrop { box-sizing: border-box; border: 0 solid; margin: 0; padding: 0; }
html { text-size-adjust: 100%; tab-size: 4; line-height: 1.5; font-family: var(--font-sans); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
ol, ul, menu { list-style: none; }
img, svg, video, canvas { vertical-align: middle; display: block; }
img, video { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; opacity: 1; background-color: transparent; border-radius: 0; }
button, input:where([type="button"], [type="reset"], [type="submit"]) { appearance: button; }
::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
* { border-color: var(--border); }
body { background-color: var(--background); color: var(--foreground); font-family: var(--font-sans); word-break: keep-all; -webkit-font-smoothing: antialiased; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ===== Utilities used on this page ===== */
.sticky { position: sticky; } .top-0 { top: 0; } .z-30 { z-index: 30; }
.mx-auto { margin-inline: auto; }
.mt-1 { margin-top: var(--spacing); }
.mt-2 { margin-top: calc(var(--spacing) * 2); }
.mt-3 { margin-top: calc(var(--spacing) * 3); }
.mt-4 { margin-top: calc(var(--spacing) * 4); }
.mt-5 { margin-top: calc(var(--spacing) * 5); }
.mt-7 { margin-top: calc(var(--spacing) * 7); }
.mt-8 { margin-top: calc(var(--spacing) * 8); }
.mt-14 { margin-top: calc(var(--spacing) * 14); }
.mt-20 { margin-top: calc(var(--spacing) * 20); }
.mb-1\.5 { margin-bottom: calc(var(--spacing) * 1.5); }
.mb-3 { margin-bottom: calc(var(--spacing) * 3); }
.ml-auto { margin-left: auto; }
.flex { display: flex; } .grid { display: grid; } .hidden { display: none; }
.inline-block { display: inline-block; } .inline-flex { display: inline-flex; }
.aspect-\[16\/9\] { aspect-ratio: 16 / 9; }
.h-3 { height: calc(var(--spacing) * 3); }
.h-3\.5 { height: calc(var(--spacing) * 3.5); }
.h-4 { height: calc(var(--spacing) * 4); }
.h-5 { height: calc(var(--spacing) * 5); }
.h-12 { height: calc(var(--spacing) * 12); }
.h-14 { height: calc(var(--spacing) * 14); }
.h-16 { height: calc(var(--spacing) * 16); }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.w-3 { width: calc(var(--spacing) * 3); }
.w-3\.5 { width: calc(var(--spacing) * 3.5); }
.w-4 { width: calc(var(--spacing) * 4); }
.w-5 { width: calc(var(--spacing) * 5); }
.w-12 { width: calc(var(--spacing) * 12); }
.w-16 { width: calc(var(--spacing) * 16); }
.w-full { width: 100%; }
.max-w-\[1200px\] { max-width: 1200px; }
.max-w-xs { max-width: var(--container-xs); }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.cursor-help { cursor: help; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex-col { flex-direction: column; }
.place-items-center { place-items: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--spacing); }
.gap-1\.5 { gap: calc(var(--spacing) * 1.5); }
.gap-2 { gap: calc(var(--spacing) * 2); }
.gap-4 { gap: calc(var(--spacing) * 4); }
.gap-5 { gap: calc(var(--spacing) * 5); }
.gap-6 { gap: calc(var(--spacing) * 6); }
.gap-8 { gap: calc(var(--spacing) * 8); }
.gap-10 { gap: calc(var(--spacing) * 10); }
.gap-x-4 { column-gap: calc(var(--spacing) * 4); }
.gap-x-8 { column-gap: calc(var(--spacing) * 8); }
.gap-y-6 { row-gap: calc(var(--spacing) * 6); }
:where(.space-y-2 > :not(:last-child)) { margin-block-end: calc(var(--spacing) * 2); }
:where(.space-y-3 > :not(:last-child)) { margin-block-end: calc(var(--spacing) * 3); }
:where(.space-y-5 > :not(:last-child)) { margin-block-end: calc(var(--spacing) * 5); }
:where(.space-y-7 > :not(:last-child)) { margin-block-end: calc(var(--spacing) * 7); }
.self-start { align-self: flex-start; }
.truncate { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: .25rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: var(--radius); }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-xl { border-radius: calc(var(--radius) + 4px); }
.border { border-style: var(--tw-border-style); border-width: 1px; }
.border-\[3px\] { border-style: var(--tw-border-style); border-width: 3px; }
.border-t { border-top-style: var(--tw-border-style); border-top-width: 1px; }
.border-t-2 { border-top-style: var(--tw-border-style); border-top-width: 2px; }
.border-b { border-bottom-style: var(--tw-border-style); border-bottom-width: 1px; }
.border-b-2 { border-bottom-style: var(--tw-border-style); border-bottom-width: 2px; }
.border-border { border-color: var(--border); }
.border-foreground { border-color: var(--foreground); }
.border-input { border-color: var(--input); }
.border-transparent { border-color: transparent; }
.bg-background\/90 { background-color: color-mix(in oklab, var(--background) 90%, transparent); }
.bg-card { background-color: var(--card); }
.bg-enough-soft { background-color: var(--enough-soft); }
.bg-field { background-color: var(--field); }
.bg-placeholder { background-color: var(--placeholder); }
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-short-soft { background-color: var(--short-soft); }
.bg-surface { background-color: var(--surface); }
.object-cover { object-fit: cover; }
.p-4 { padding: calc(var(--spacing) * 4); }
.p-5 { padding: calc(var(--spacing) * 5); }
.px-2 { padding-inline: calc(var(--spacing) * 2); }
.px-4 { padding-inline: calc(var(--spacing) * 4); }
.px-5 { padding-inline: calc(var(--spacing) * 5); }
.py-1 { padding-block: var(--spacing); }
.py-1\.5 { padding-block: calc(var(--spacing) * 1.5); }
.py-2 { padding-block: calc(var(--spacing) * 2); }
.py-3 { padding-block: calc(var(--spacing) * 3); }
.py-4 { padding-block: calc(var(--spacing) * 4); }
.py-10 { padding-block: calc(var(--spacing) * 10); }
.pt-3 { padding-top: calc(var(--spacing) * 3); }
.pt-8 { padding-top: calc(var(--spacing) * 8); }
.pt-10 { padding-top: calc(var(--spacing) * 10); }
.text-right { text-align: right; }
.text-2xl { font-size: var(--text-2xl); line-height: var(--tw-leading, var(--text-2xl--line-height)); }
.text-lg { font-size: var(--text-lg); line-height: var(--tw-leading, var(--text-lg--line-height)); }
.text-sm { font-size: var(--text-sm); line-height: var(--tw-leading, var(--text-sm--line-height)); }
.text-xl { font-size: var(--text-xl); line-height: var(--tw-leading, var(--text-xl--line-height)); }
.text-xs { font-size: var(--text-xs); line-height: var(--tw-leading, var(--text-xs--line-height)); }
.text-\[15px\] { font-size: 15px; }
.text-\[17px\] { font-size: 17px; }
.leading-snug { --tw-leading: var(--leading-snug); line-height: var(--leading-snug); }
.font-bold { --tw-font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold); }
.font-extrabold { --tw-font-weight: var(--font-weight-extrabold); font-weight: var(--font-weight-extrabold); }
.font-medium { --tw-font-weight: var(--font-weight-medium); font-weight: var(--font-weight-medium); }
.font-semibold { --tw-font-weight: var(--font-weight-semibold); font-weight: var(--font-weight-semibold); }
.tracking-tight { --tw-tracking: var(--tracking-tight); letter-spacing: var(--tracking-tight); }
.text-enough { color: var(--enough); }
.text-foreground { color: var(--foreground); }
.text-info { color: var(--info); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-short { color: var(--short); }
.border-enough { border-color: var(--enough); }
.bg-enough { background-color: var(--enough); }
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.transition-transform { transition-property: transform, translate, scale, rotate; transition-timing-function: var(--default-transition-timing-function); transition-duration: var(--default-transition-duration); }
.duration-500 { transition-duration: .5s; }
.outline-none { outline-style: none; }
@media (hover: hover) {
  .group:hover .group-hover\:scale-\[1\.03\] { scale: 1.03; }
  .hover\:bg-secondary:hover { background-color: var(--secondary); }
}
.focus-within\:border-ring:focus-within { border-color: var(--ring); }
.disabled\:opacity-40:disabled { opacity: .4; }
.data-\[status\=active\]\:border-foreground[data-status="active"] { border-color: var(--foreground); }
.data-\[status\=active\]\:font-semibold[data-status="active"] { font-weight: var(--font-weight-semibold); }
.data-\[status\=active\]\:text-foreground[data-status="active"] { color: var(--foreground); }
@media (width >= 40rem) {
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-\[1fr_auto\] { grid-template-columns: 1fr auto; }
  .sm\:pt-12 { padding-top: calc(var(--spacing) * 12); }
  .sm\:text-2xl { font-size: var(--text-2xl); line-height: var(--tw-leading, var(--text-2xl--line-height)); }
  .sm\:text-3xl { font-size: var(--text-3xl); line-height: var(--tw-leading, var(--text-3xl--line-height)); }
}
@media (width >= 64rem) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:gap-14 { gap: calc(var(--spacing) * 14); }
}

/* ===== Blog pages ===== */
:root { --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-base: 1rem; --text-base--line-height: 1.5; }
.mt-6 { margin-top: calc(var(--spacing) * 6); }
.mt-12 { margin-top: calc(var(--spacing) * 12); }
.mt-16 { margin-top: calc(var(--spacing) * 16); }
.ml-0\.5 { margin-left: calc(var(--spacing) * .5); }
.block { display: block; } .inline { display: inline; }
.table { display: table; }
.h-9 { height: calc(var(--spacing) * 9); } .w-9 { width: calc(var(--spacing) * 9); }
.max-w-\[760px\] { max-width: 760px; }
.flex-wrap { flex-wrap: wrap; }
.items-end { align-items: flex-end; }
.snap-x { scroll-snap-type: x mandatory; }
.snap-start { scroll-snap-align: start; }
.\[scrollbar-width\:none\] { scrollbar-width: none; }
.gap-x-6 { column-gap: calc(var(--spacing) * 6); }
.gap-y-10 { row-gap: calc(var(--spacing) * 10); }
:where(.space-y-4 > :not(:last-child)) { margin-block-end: calc(var(--spacing) * 4); }
.rounded-2xl { border-radius: calc(var(--radius) + 8px); }
.border-primary { border-color: var(--primary); }
.bg-background { background-color: var(--background); }
.px-1\.5 { padding-inline: calc(var(--spacing) * 1.5); }
.px-3 { padding-inline: calc(var(--spacing) * 3); }
.px-3\.5 { padding-inline: calc(var(--spacing) * 3.5); }
.px-6 { padding-inline: calc(var(--spacing) * 6); }
.py-0\.5 { padding-block: calc(var(--spacing) * .5); }
.py-2\.5 { padding-block: calc(var(--spacing) * 2.5); }
.pt-4 { padding-top: calc(var(--spacing) * 4); }
.text-center { text-align: center; }
.text-4xl { font-size: var(--text-4xl); line-height: var(--tw-leading, var(--text-4xl--line-height)); }
.text-base { font-size: var(--text-base); line-height: var(--tw-leading, var(--text-base--line-height)); }
.text-\[11px\] { font-size: 11px; }
.leading-\[1\.8\] { --tw-leading: 1.8; line-height: 1.8; }
.opacity-70 { opacity: .7; }
table { border-collapse: collapse; }
@media (width >= 40rem) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:overflow-x-auto { overflow-x: auto; }
  .sm\:pb-2 { padding-bottom: calc(var(--spacing) * 2); }
  .sm\:w-\[62\%\] { width: 62%; }
}
@media (width >= 40rem) { .sm\:hidden { display: none; } }
[hidden] { display: none !important; }
.text-3xl { font-size: var(--text-3xl); line-height: var(--tw-leading, var(--text-3xl--line-height)); }
.pb-6 { padding-bottom: calc(var(--spacing) * 6); }
:where(.space-y-1 > :not(:last-child)) { margin-block-end: var(--spacing); }
@media (width >= 40rem) { .sm\:text-3xl { font-size: var(--text-3xl); line-height: var(--tw-leading, var(--text-3xl--line-height)); } }

/* 페이지마다 스크롤바 유무가 달라도 가로 위치가 흔들리지 않게 */
html { scrollbar-gutter: stable; }

/* ===== 블로그 원고 24편용 ===== */
.relative { position: relative; } .absolute { position: absolute; } .inset-0 { inset: 0; }
.list-disc { list-style: disc; } .list-decimal { list-style: decimal; }
.pl-5 { padding-left: calc(var(--spacing) * 5); }
.mt-0\.5 { margin-top: calc(var(--spacing) * .5); }
:where(.space-y-1\.5 > :not(:last-child)) { margin-block-end: calc(var(--spacing) * 1.5); }
.text-left { text-align: left; }
.font-normal { font-weight: 400; }
/* 글 본문 안의 링크 */
.post-body :is(p, li, td) a, .post-sources a { text-decoration: underline; text-underline-offset: 2px; }
.post-sources a { word-break: break-all; }
/* 표가 좁은 화면에서 넘치면 표만 가로로 스크롤 */
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 100%; }
.table-wrap th, .table-wrap td { white-space: nowrap; padding-right: 12px; }
.table-wrap td:first-child, .table-wrap th:first-child { white-space: normal; min-width: 7em; }
/* 글의 계산기 버튼으로 들어왔을 때 관련 입력칸 강조 */
.is-highlight { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }

/* 입력칸 지우기(x) 버튼 */
.clear-btn { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; margin: -4px -4px -4px -6px; border-radius: 9999px; color: color-mix(in oklab, var(--muted-foreground) 55%, transparent); }
.clear-btn:hover { color: var(--muted-foreground); }
.clear-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
