/* High Agency KR — adapted from _source/sample-styles.css */
:root {
  --paper: #EEF0F2;
  --card: #FFFFFF;
  --ink: #14171C;
  --muted: #666F7B;
  --rule: #D3D8DE;
  --accent: #1B4FD8;
  --accent-soft: rgba(27, 79, 216, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --kr: "Apple SD Gothic Neo", Pretendard, "Malgun Gothic", "Noto Sans KR", var(--sans);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1116;
    --card: #161A21;
    --ink: #E7EAEE;
    --muted: #8C97A5;
    --rule: #262C36;
    --accent: #7FA0FF;
    --accent-soft: rgba(127, 160, 255, 0.10);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--kr);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* —— Permission banner —— */
.perm-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.perm-banner-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.perm-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.perm-banner .en {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.perm-banner a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  font-weight: 600;
}
.perm-banner a:hover { background: var(--accent-soft); }

.sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (max-width: 600px) {
  .sheet { padding: 28px 18px 72px; gap: 32px; }
  body { font-size: 16px; }
  .perm-banner-inner { padding: 10px 18px; }
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

h1, h2, h3, h4 { text-wrap: balance; margin: 0; font-family: var(--kr); }

h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 .sub {
  display: block;
  font-size: clamp(18px, 3.2vw, 24px);
  font-weight: 400;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-top: 12px;
}

h3 {
  font-size: 1.15em;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: 8px;
}

h4 {
  font-size: 1.02em;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}
.byline img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}
.warning {
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 14px 16px;
  font-size: 15.5px;
  line-height: 1.6;
}
.warning strong { color: var(--accent); }

.toc {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 20px 22px;
}
.toc h2 {
  font-size: 14px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}
.toc ol {
  margin: 0;
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc a { color: var(--ink); border-bottom-color: var(--rule); }
.toc a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 65ch;
}
.prose > * { margin: 0; }
.prose p { margin: 0; }
.prose strong { font-weight: 650; }
.prose em { font-style: italic; }
.prose blockquote {
  margin: 4px 0;
  padding: 12px 0 12px 18px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.05em;
  line-height: 1.55;
  color: var(--ink);
}
.prose blockquote cite {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-style: normal;
  color: var(--muted);
}
.prose ul, .prose ol {
  margin: 0;
  padding-left: 1.35em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prose li { padding-left: 2px; }
.prose li::marker { color: var(--accent); }

.quote-en {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 0.98em;
}
.quote-kr {
  margin-top: 6px;
  font-size: 0.95em;
  color: var(--ink);
}

.figure {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 65ch;
}
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--paper);
}
.figure.narrow img { max-width: 280px; margin: 0 auto; }
.figure.author img {
  max-width: 200px;
  border-radius: 4px;
}
.figure figcaption {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.figure figcaption .credit {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tri-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 65ch;
}
@media (min-width: 640px) {
  .tri-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.remote-note {
  background: var(--card);
  border: 1px dashed var(--rule);
  border-radius: 3px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 65ch;
}
.remote-note a { color: var(--accent); }

.steps {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 65ch;
}
.steps .step-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.signoff {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  max-width: 65ch;
}
.signoff .name { font-family: var(--serif); font-size: 22px; }
.signoff .who { color: var(--muted); font-size: 14.5px; }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { background: var(--accent-soft); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 1px; }

.foot {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  max-width: 65ch;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 80px;
}

hr.sep {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 8px 0;
  max-width: 65ch;
}

.pill {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 5px 9px;
}

.hero .sub { display: block; font-size: clamp(18px, 3.2vw, 24px); font-weight: 400; color: var(--muted); margin-top: 8px; letter-spacing: 0; font-family: var(--kr); }
.figure .credit { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
.prose .quote-en { display: block; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.98em; }
.prose .quote-kr { display: block; margin-top: 6px; font-size: 0.95em; color: var(--ink); }

.author-photo img { max-width: 220px; border-radius: 4px; }
.author-photo { max-width: 65ch; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step-n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.quote-en { font-family: var(--serif); font-style: italic; color: var(--muted); }
.quote-kr { display: block; margin-top: 6px; }

/* —— Original images, portraits, videos, tweets (2026-09-24) —— */
.prose > .figure { margin: 8px 0; }
.figure.narrow img { max-width: 320px; }
.portrait-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0;
}
.portrait-grid figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portrait-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border-radius: 2px;
  display: block;
}
.portrait-grid figcaption { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 480px) { .portrait-grid { grid-template-columns: repeat(2, 1fr); } }

.video-link { position: relative; display: block; border: 0; }
.video-link:hover { background: none; }
.video-link img { aspect-ratio: 16 / 9; object-fit: cover; }
.video-link .play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0,0,0,0.72);
  color: #fff;
  display: grid; place-items: center;
  font-size: 24px;
  padding-left: 4px;
}
.video-link:hover .play { background: var(--accent); }

.prose blockquote.tweet-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 14px 16px;
  font-family: var(--kr);
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tweet-card p { margin: 0; }

/* Narrow figures (phone screenshots, portraits): card hugs the image and sits centred */
.figure.narrow { width: 354px; max-width: 100%; align-self: center; }
.figure.narrow img { width: 320px; max-width: 100%; }
