/* Korea Out Loud — styles. No external fonts, no trackers. */
:root {
  --paper: #f6f3ec;
  --paper-2: #efebe1;
  --card: #fffdf8;
  --ink: #161513;
  --ink-2: #3b3934;
  --muted: #6b675e;
  --rule: #e2ddd1;
  --red: #c8293b;
  --blue: #1e4aa8;
  --travel: #1e4aa8;
  --living: #2b7a58;
  --money: #a8661a;
  --culture: #c8293b;
  --radius: 14px;
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", "Noto Serif KR", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --w: 1160px;
  --shadow: 0 1px 0 rgba(22, 21, 19, .04), 0 8px 24px -12px rgba(22, 21, 19, .18);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121211; --paper-2: #191917; --card: #1b1a18; --ink: #edeae3; --ink-2: #cfcbc2; --muted: #9a958a; --rule: #2c2a27;
    --red: #ef5b6b; --blue: #7ea2ff; --travel: #7ea2ff; --living: #5cc59a; --money: #e2a253; --culture: #ef5b6b;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.7);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--w), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.brand b { font-weight: 700; }
.mark { width: 26px; height: 26px; color: var(--ink); flex: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .header-inner { height: auto; flex-wrap: wrap; padding: 12px 0 8px; gap: 8px; } .nav { width: calc(100% + 16px); margin: 0 -8px; } .nav a { padding: 6px 10px; font-size: 14px; } html { scroll-padding-top: 110px; } .toc { top: 120px; } }

/* type */
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.02em; line-height: 1.12; margin: 0; font-weight: 600; }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.lede { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 46ch; margin: 18px 0 0; }
.eyebrow { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; color: var(--sec, var(--muted)); }
.sec-travel { --sec: var(--travel); } .sec-living { --sec: var(--living); } .sec-money { --sec: var(--money); } .sec-culture { --sec: var(--culture); }

/* hero */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(28px, 5vw, 56px); }
.hero h1 { font-size: clamp(48px, 9vw, 104px); letter-spacing: -.035em; font-weight: 600; }
.hero h1 em { font-style: italic; font-weight: 500; background: linear-gradient(90deg, var(--red), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.pillars { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pillars a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid var(--rule); background: var(--card); padding: 8px 14px; border-radius: 999px; font-size: 15px; transition: border-color .2s, transform .2s; }
.pillars a:hover { border-color: var(--sec); transform: translateY(-1px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sec); }

/* section heads */
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--ink); padding-top: 14px; margin: 56px 0 22px; }
.section-head h2 { font-size: 15px; font-family: var(--sans); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--rule) 40%, var(--ink) 15%); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.card .meta { margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--muted); }
.glyph { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background:
  radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--sec) 22%, transparent), transparent 60%),
  repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--sec) 10%, transparent) 23px 24px),
  var(--paper-2); border-bottom: 1px solid var(--rule); }
.glyph span { position: absolute; right: 18px; bottom: -0.13em; font: 700 clamp(84px, 10vw, 132px)/1 var(--sans); letter-spacing: -.05em; color: var(--sec); opacity: .92; }
.glyph::before { content: ""; position: absolute; left: 22px; top: 22px; width: 28px; height: 4px; border-radius: 2px; background: var(--sec); }

.lead .card-lead .card-link { display: grid; grid-template-columns: 1.15fr 1fr; }
.lead .card-lead .glyph { aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--rule); }
.lead .card-lead .glyph span { font-size: clamp(130px, 17vw, 220px); right: 7%; bottom: -0.1em; }
.lead .card-lead .card-body { padding: clamp(24px, 4vw, 44px); justify-content: center; }
.lead .card-lead h3 { font-size: clamp(28px, 3.6vw, 42px); }
.lead .card-lead p { font-size: 18px; }
@media (max-width: 820px) { .lead .card-lead .card-link { grid-template-columns: 1fr; } .lead .card-lead .glyph { min-height: 200px; border-right: 0; border-bottom: 1px solid var(--rule); } }

/* sections band */
.sections-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .sections-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .sections-grid { grid-template-columns: 1fr; } }
.sec-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; min-height: 180px; text-decoration: none; border-radius: var(--radius); background: var(--card); border: 1px solid var(--rule); overflow: hidden; transition: border-color .2s, transform .2s; }
.sec-tile:hover { border-color: var(--sec); transform: translateY(-2px); }
.sec-tile strong { font: 600 22px/1.2 var(--serif); }
.sec-tile span { color: var(--ink-2); font-size: 15px; }
.sec-tile .count { margin-top: auto; font-size: 13px; color: var(--sec); font-weight: 600; }
.sec-ko { position: absolute; right: 14px; top: 8px; font: 700 54px/1 var(--sans) !important; color: color-mix(in srgb, var(--sec) 18%, transparent) !important; }

/* promise */
.promise { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; margin: 72px auto 24px; padding: 36px; background: var(--card); border: 1px solid var(--rule); border-radius: 20px; }
.promise h2 { font-size: 32px; margin-bottom: 8px; }
.promise-list { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.promise-list li::marker { font-family: var(--serif); font-weight: 700; color: var(--red); }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; gap: 16px; padding: 24px; } }

/* section page */
.section-hero { padding: clamp(40px, 7vw, 88px) 0 8px; }
.section-hero h1 { font-size: clamp(44px, 7vw, 80px); color: var(--ink); }
.section-hero .kicker span { color: var(--sec); font-size: 15px; letter-spacing: .05em; }
.empty { color: var(--muted); padding: 40px 0; }

/* article */
.article-head { padding: clamp(28px, 5vw, 56px) 0 28px; }
.article-head > * { max-width: 760px; }
@media (min-width: 1001px) { .article .article-head { padding-left: 276px; } }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; margin-bottom: 26px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.article-head h1 { font-size: clamp(36px, 5.4vw, 60px); }
.dek { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.5; color: var(--ink-2); margin: 18px 0 0; max-width: 52ch; font-family: var(--serif); }
.byline { margin: 22px 0 0; font-size: 14px; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--rule); }
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 56px; justify-content: start; padding-bottom: 24px; }
@media (max-width: 1000px) { .article-grid { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc-h { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: var(--muted); margin: 6px 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.toc li a:hover { color: var(--ink); border-left-color: var(--ink); }

.prose { font-size: 18px; line-height: 1.72; min-width: 0; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose > h2 + *, .prose > h3 + * { margin-top: .55em; }
.prose h2 { font-size: 30px; margin-top: 2.1em; }
.prose h3 { font-size: 22px; margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; }
.prose code { font: .86em var(--mono); background: var(--paper-2); padding: .1em .35em; border-radius: 5px; }
.prose blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--ink); font-family: var(--serif); font-size: 21px; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.prose [lang="ko"], .prose :lang(ko) { font-family: var(--sans); }
sup.fn { font-size: .62em; line-height: 0; margin-left: 1px; }
sup.fn a { text-decoration: none; color: var(--blue); font-weight: 700; padding: 0 2px; }

.keyfacts { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--red); border-radius: 12px; padding: 18px 22px; font-size: 16.5px; line-height: 1.6; }
.kf-h, .callout-title { font: 700 11px/1 var(--sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 2px 0 12px !important; }
.keyfacts ul { margin: 0; padding-left: 1.1em; }
.callout { background: var(--paper-2); border-radius: 12px; padding: 18px 22px; font-size: 16.5px; }
.callout > * { margin: 0; } .callout > * + * { margin-top: .6em; } .callout ul { padding-left: 1.2em; }
.callout-warn { border-left: 4px solid var(--money); }
.callout-tip { border-left: 4px solid var(--living); }
.callout-note, .callout-key { border-left: 4px solid var(--blue); }

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
@media (max-width: 640px) { table { min-width: 560px; font-size: 14.5px; } th { letter-spacing: .04em; } }
td :lang(ko), td { word-break: keep-all; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }

.glossary, .sources { margin-top: 3em !important; padding-top: 24px; border-top: 1px solid var(--ink); }
.glossary h2, .sources h2 { font: 700 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px; }
.glossary dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
@media (max-width: 560px) { .glossary dl { grid-template-columns: 1fr; } }
.term { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; }
.term dt { font-weight: 700; font-size: 17px; }
.term dt i { font-weight: 400; color: var(--muted); font-size: 14px; }
.term dd { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.sources ol { font-size: 15px; line-height: 1.55; padding-left: 1.4em; }
.sources li { scroll-margin-top: 100px; }
.sources li:target { background: color-mix(in srgb, var(--blue) 12%, transparent); border-radius: 6px; }
.sources a { word-break: break-word; }
.related { margin-bottom: 24px; }

/* pages */
.page { max-width: 760px; padding-bottom: 40px; }
.page .article-head { padding-bottom: 12px; }
.notfound { padding: 120px 0; }
.notfound h1 { font-size: clamp(36px, 6vw, 64px); }

/* footer */
.site-footer { margin-top: 88px; border-top: 1px solid var(--rule); background: var(--paper-2); padding: 48px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav a { text-decoration: none; color: var(--ink-2); }
.footer-grid nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-h { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.brand-footer { margin-bottom: 12px; }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.footer-base a { color: inherit; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .toc, .related { display: none; } body { background: #fff; color: #000; } }
