/* normal.shifft
   Tokens: indigo ink on white, one violet accent, Hahmlet display + IBM Plex Sans KR text.
   The one bold move: the shift headline (each clause steps right). Everything else stays quiet. */

@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter-tight-latin-800-normal.woff2") format("woff2"); }

:root {
  /* Dark only. normal.shifft runs on a single deep-indigo surface. */
  --paper: #12142a;
  --ink: #e8e9f3;
  --muted: #a6aac6;
  --line: #2b2e4c;
  --accent: #a49bff;
  --accent-ink: #12142a;
  --wash: #24224d;
  --soft: #1a1c36;
  --glass: rgba(18, 20, 42, 0.86);
  --display: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --text: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --brand: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --step: 1.6em;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;
  --head-h: 64px;
  --bar-h: 46px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--stack-h, 110px) + 16px); background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: 16px; line-height: 1.75;
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, main:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
main:focus { outline: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.loading, .empty { color: var(--muted); padding-block: 80px; }

/* ---------- Header ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 40; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: var(--glass); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 12px 28px; min-height: var(--head-h); }
.logo {
  font-family: var(--brand); font-weight: 800; font-size: 21px; line-height: .86; letter-spacing: -0.055em;
  text-decoration: none; color: var(--ink); flex: none; display: inline-flex; flex-direction: column; padding: 4px 2px;
}
.logo span { display: block; white-space: nowrap; }
.logo span + span { padding-left: 0.62em; }

.carousel--nav { flex: 1 1 auto; min-width: 0; }
.nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
}
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--wash); }
.badge { font-size: 11.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.head-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); cursor: pointer;
}
.search-btn:hover { color: var(--ink); border-color: var(--ink); }
.kbd { font-family: var(--text); font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; color: var(--muted); }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }
@media (max-width: 900px) {
  .head-row { flex-wrap: wrap; padding-block: 10px 0; gap: 8px 12px; }
  .logo { order: 1; }
  .head-tools { order: 2; margin-left: auto; }
  .carousel--nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
  .nav::-webkit-scrollbar { display: none; }
  .search-label, .search-btn .kbd { display: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
}

/* ---------- Shift headline (the signature) ---------- */
.shift { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.36; margin: 0; max-width: 21em; text-wrap: balance; }
.shift span { display: inline; }
.shift span + span::before { content: " "; }

/* ---------- Shared bits ---------- */
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 14.5px; margin: 0; }
.pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 11px; background: var(--wash); color: var(--accent); white-space: nowrap; }
.pill.ink { background: var(--ink); color: var(--paper); }
.pill.line { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid var(--ink); cursor: pointer; background: transparent; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:not(.primary):hover { background: var(--soft); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500; border-color: var(--line); }
.btn[aria-pressed="true"] { background: var(--wash); border-color: var(--accent); color: var(--accent); }
.h2 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; margin: 0; letter-spacing: -0.015em; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.more-link { font-size: 14.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.page-title { font-family: var(--display); font-weight: 500; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; line-height: 1.15; margin: 56px 0 12px; }
.lede { color: var(--muted); max-width: 62ch; margin: 0 0 28px; font-size: 16.5px; }
.block { padding-block: 40px; }

/* ---------- Home ---------- */
.hero { padding-block: 64px 40px; display: grid; gap: 28px; }
.hero .shift { font-size: clamp(30px, 3.6vw, 50px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; min-width: 0; background: var(--paper); }
.tile.wash { background: var(--wash); border-color: transparent; }
.tile.ink { background: var(--ink); color: var(--paper); border-color: transparent; }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-12 { grid-column: span 12; }
.span-4 { grid-column: span 4; } .span-8 { grid-column: span 8; }
@media (max-width: 960px) { .span-7, .span-5, .span-4, .span-8 { grid-column: span 12; } }
@media (max-width: 640px) { .tile { padding: 22px 20px; border-radius: 18px; } }
.tile h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.tile.ink h3 { color: var(--paper); opacity: .8; }
.tldr { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.tldr li { font-size: 16px; line-height: 1.75; padding-left: 18px; position: relative; }
.tldr li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.flow-mini { display: grid; gap: 0; }
.flow-mini a { display: block; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; font-weight: 600; line-height: 1.5; }
.flow-mini a:first-child { border-top: 0; padding-top: 0; }
.flow-mini a:hover { color: var(--accent); }
.stat-row { display: flex; flex-wrap: wrap; gap: 24px 48px; }
@media (max-width: 640px) { .stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .stat b { font-size: 30px; } .stat span { font-size: 12.5px; } }
.stat b { display: block; font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.stat span { font-size: 14px; opacity: .8; }
.topic-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .topic-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.topic-tile { display: grid; gap: 4px; padding: 18px 18px 16px; border-radius: var(--r-md); background: var(--soft); text-decoration: none; min-height: 96px; align-content: space-between; }
.topic-tile:hover { background: var(--wash); }
.topic-tile b { font-size: 15.5px; line-height: 1.4; }
.topic-tile span { font-size: 13px; color: var(--muted); }

/* Notes rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ---------- Cards / lists ---------- */
.note-card { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; background: var(--paper); min-height: 240px; transition: border-color .15s, transform .15s; }
.note-card:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .note-card:hover { transform: translateY(-2px); } }
.note-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.note-no { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.note-card h3 { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 700; }
.note-card p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }

.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 36px; }
.entry { display: grid; gap: 8px; padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; align-content: start; }
.entry h3 { margin: 0; font-size: 17.5px; line-height: 1.5; font-weight: 700; }
.entry p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.7; }
.entry .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.entry:hover h3 { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chip { font-size: 14.5px; font-weight: 500; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { font-size: 12.5px; opacity: .7; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filter-input { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; font: inherit; font-size: 15px; background: var(--paper); color: var(--ink); width: min(100%, 320px); }
.count { color: var(--muted); font-size: 14px; }
.more { margin-top: 24px; }

/* Issue list */
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.issues a { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; }
.issues a:hover { border-color: var(--accent); background: var(--soft); }
.issues .vol { font-family: var(--display); font-weight: 600; font-size: 26px; color: var(--accent); line-height: 1; }
.issues .vol small { display: block; font-family: var(--text); font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.issues .hl { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.45; letter-spacing: -0.01em; }
.issues .side { display: grid; gap: 6px; justify-items: end; font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .issues a { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .issues .vol { font-size: 22px; } .issues .vol small { display: inline; margin-left: 8px; }
  .issues .side { justify-items: start; grid-auto-flow: column; justify-content: start; gap: 10px; }
}

/* ---------- Article (issue & note) ---------- */
.doc-top { padding-block: 56px 32px; display: grid; gap: 22px; border-bottom: 1px solid var(--line); }
.doc-top .shift { font-size: clamp(26px, 3vw, 40px); }
.doc-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-block: 40px; }
@media (max-width: 960px) { .doc-body { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.carousel.carousel--toc { position: sticky; top: calc(var(--stack-h, 110px) + 20px); align-self: start; }
.toc { display: grid; gap: 2px; font-size: 14.5px; max-height: calc(100vh - var(--stack-h, 110px) - 40px); overflow: auto; }
.toc p { margin: 0 0 8px; font-weight: 700; }
.toc a { text-decoration: none; color: var(--muted); padding: 8px 0 8px 14px; border-left: 2px solid var(--line); line-height: 1.45; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 960px) {
  .carousel.carousel--toc { top: var(--stack-h, 110px); z-index: 5; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-inline: -16px; padding: 10px 16px; }
  .toc { display: flex; gap: 8px; overflow-x: auto; max-height: none; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc p { display: none; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
  .toc a[aria-current="true"] { background: var(--wash); border-color: var(--accent); }
}
.reading { min-width: 0; display: grid; gap: 64px; }
.sec-title { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 4px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.summary-box { background: var(--wash); border-radius: var(--r-lg); padding: 28px; }
.summary-box h2 { margin: 0 0 16px; font-size: 15px; }
.flow { display: grid; gap: 12px; margin-top: 20px; }
.flow-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; display: grid; gap: 8px; }
.flow-item h3 { margin: 0; font-size: 18px; line-height: 1.5; }
.flow-item p { margin: 0; color: var(--muted); font-size: 15px; max-width: 72ch; }
.flow-item p.insight { color: var(--ink); background: var(--wash); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 4px; }
.flow-item p.insight b, .apply b { color: var(--accent); font-weight: 700; margin-right: 6px; }
.story { padding: 30px 0; border-bottom: 1px solid var(--line); display: grid; gap: 14px; max-width: 74ch; }
.story .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); margin: 0; }
.story .meta b { color: var(--ink); font-weight: 600; }
.story h3 { margin: 0; font-size: clamp(19px, 2vw, 23px); line-height: 1.45; font-weight: 700; letter-spacing: -0.01em; }
.story p { margin: 0; font-size: 16.5px; line-height: 1.85; }
.story ul { margin: 2px 0 0; padding: 16px 20px 16px 36px; background: var(--soft); border-radius: var(--r-md); display: grid; gap: 4px; font-size: 15px; }
.story-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14.5px; }
.story-foot a { color: var(--accent); font-weight: 600; }
.save-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.save-btn:hover { border-color: var(--ink); color: var(--ink); }
.save-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--wash); }
.takeaways { margin-top: 28px; padding: 24px 26px; border: 1px solid var(--accent); border-radius: var(--r-md); max-width: 74ch; }
.takeaways h3 { margin: 0 0 10px; font-size: 16px; color: var(--accent); }
.takeaways ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.75; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { text-decoration: none; display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); }
.pager a:hover { border-color: var(--accent); }
.pager a span { font-size: 13px; color: var(--muted); }
.pager a b { font-family: var(--display); font-size: 17px; line-height: 1.45; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; text-align: left; } }

/* Note detail */
.note-top { padding-block: 56px 28px; display: grid; gap: 18px; max-width: 860px; }
.note-top h1 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.2; letter-spacing: -0.03em; margin: 0; }
.note-body { display: grid; gap: 28px; max-width: 760px; padding-bottom: 40px; }
.note-body .lead { font-size: 19px; line-height: 1.8; margin: 0; }
.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: p; }
.points li { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px 16px 56px; position: relative; font-size: 16px; line-height: 1.7; }
.points li::before { counter-increment: p; content: counter(p); position: absolute; left: 18px; top: 15px; width: 26px; height: 26px; border-radius: 999px; background: var(--wash); color: var(--accent); font-weight: 700; font-size: 13.5px; display: grid; place-items: center; }
.points.bullets li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); top: 25px; left: 26px; }
.apply { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 26px 28px; font-size: 16.5px; line-height: 1.8; margin: 0; }
.apply b { color: var(--accent); display: block; margin-bottom: 6px; }
.apply b { color: var(--accent-ink); background: var(--accent); display: inline-block; padding: 0 8px; border-radius: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 13.5px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 4px 12px; }

/* About */
.about { padding-bottom: 64px; max-width: 68ch; }
.about p { font-size: 17px; line-height: 1.9; }
.about h2 { font-family: var(--display); font-size: 24px; margin: 40px 0 8px; }

/* ---------- Search dialog ---------- */
.search { width: min(680px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 80px)); margin: 72px auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); color: var(--ink); overflow: hidden; }
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: rgba(18, 20, 42, .45); backdrop-filter: blur(3px); }
.search-box { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); min-height: 40px; }
.search-box input:focus { outline: none; }
.search-close { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--muted); min-height: 32px; }
.search-results { overflow-y: auto; padding: 8px; flex: 1; }
.search-results .grp { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 12px 12px 6px; }
.search-results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; }
.search-results a span { font-size: 13px; color: var(--muted); }
.search-results a[aria-selected="true"], .search-results a:hover { background: var(--wash); }
.search-results strong { font-weight: 500; }
.search-results mark { background: transparent; color: var(--accent); font-weight: 700; }
.search-hint { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .search { margin-top: 12px; max-height: calc(100vh - 24px); } .search-hint { display: none; } }

/* ---------- Floating ---------- */
.to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; z-index: 20; }
.to-top[hidden] { display: none; }
.to-top:hover { border-color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.site-foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--soft); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 64px; padding-block: 40px 24px; }
.foot-about { max-width: 52ch; }
.foot-about p { margin: 0; color: var(--muted); font-size: 14.5px; }
  .foot-about .foot-name, .foot-name { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--ink) !important; margin-bottom: 8px !important; }
.foot-links { display: grid; gap: 2px; align-content: start; font-size: 14.5px; }
.foot-links a { padding: 6px 0; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 16px 32px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

/* Archive strip (top of home) */
.arc-strip { padding-top: 24px; }
.arc-strip .sec-head { margin-bottom: 12px; }
.arc-strip h2 { font-size: 16px; font-weight: 600; margin: 0; }
.arc-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.arc-row::-webkit-scrollbar { display: none; }
.arc-row a { flex: 0 0 248px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 6px; text-decoration: none; }
.arc-row a:hover { border-color: var(--accent); }
.arc-row a span { font-size: 12.5px; color: var(--muted); }
.arc-row a b { font-weight: 500; font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arc-row a.cur { background: var(--wash); border-color: var(--accent); }
.arc-row a.cur span { color: var(--accent); }
.hero { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 48px !important; }

/* ---------- Footer logo ---------- */
.foot-logo { font-size: 30px; }

/* ---------- Pinned issue bar (지난 호 바로가기) ---------- */
.issue-bar { border-top: 1px solid var(--line); }
.issue-row { display: flex; align-items: center; gap: 12px; min-height: var(--bar-h); }
.issue-all {
  flex: none; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-right: 12px; border-right: 1px solid var(--line);
}
.issue-all:hover { color: var(--accent); }
.issue-track {
  flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; padding-block: 6px;
}
.issue-track::-webkit-scrollbar { display: none; }
.issue-track a {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: baseline; gap: 6px;
  min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; font-size: 13px; color: var(--muted); white-space: nowrap; max-width: 320px;
}
.issue-track a b { color: var(--ink); font-weight: 600; }
.issue-track a .hl { overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.issue-track a:hover { border-color: var(--accent); color: var(--ink); }
.issue-track a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.issue-track a[aria-current="page"] b { color: var(--accent-ink); }
@media (max-width: 640px) {
  .issue-track a .hl { display: none; }
  .issue-all { font-size: 13px; padding-right: 10px; }
}

/* ---------- Thumbnails ---------- */
.thumb {
  position: relative; display: block; overflow: hidden; border-radius: var(--r-md);
  aspect-ratio: 16 / 9; background: var(--soft); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.thumb:hover img { transform: scale(1.03); }
.thumb .play {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(18, 20, 42, .82); color: #fff; border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 13px; font-weight: 600;
}
.thumb .play svg { width: 22px; height: 22px; }
.thumb.gen { display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; background: var(--wash); }
.thumb.gen .g-src { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.thumb.gen .g-word {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; font-size: clamp(18px, 2.2vw, 24px);
  display: flex; flex-direction: column;
}
.thumb.gen .g-word span:nth-child(2) { padding-left: .9em; }
.thumb.gen .g-word span:nth-child(3) { padding-left: 1.8em; color: var(--accent); }
.thumb.gen[data-topic="ai"] { background: #1f2550; }
.thumb.gen[data-topic="service"] { background: #1c2c40; }
.thumb.gen[data-topic="brand"] { background: #2c1f45; }
.thumb.gen[data-topic="org"] { background: #22243f; }
.thumb.gen[data-topic="research"] { background: #1d2a3a; }
.thumb.gen[data-topic="voices"], .thumb.gen[data-topic="industry"] { background: #262a46; }
.story .thumb { margin: 4px 0 18px; max-width: 640px; }
.entry.has-thumb { display: grid; grid-template-columns: 1fr; gap: 12px; }
.entry.has-thumb .thumb { border-radius: var(--r-sm); }

/* ---------- Carousel: every horizontal scroller gets arrow buttons at both ends ---------- */
.carousel { position: relative; min-width: 0; }
.carousel > .car-track { scroll-behavior: smooth; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 0 0 6px var(--paper);
  transition: opacity .2s, border-color .2s, color .2s;
}
.car-btn:hover { border-color: var(--accent); color: var(--accent); }
.car-btn.prev { left: -6px; }
.car-btn.next { right: -6px; }
.car-btn[disabled] { opacity: 0; pointer-events: none; }
.car-btn[hidden] { display: none; }
.car-btn svg { width: 18px; height: 18px; }
.carousel.has-prev > .car-track { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 56px); mask-image: linear-gradient(90deg, transparent 0, #000 56px); }
.carousel.has-next > .car-track { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.carousel.has-prev.has-next > .car-track { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent); }
/* compact variant for chip rows (nav, issue bar, toc chips) */
.carousel--sm .car-btn { width: 32px; height: 32px; box-shadow: 0 0 0 4px var(--paper); }
.carousel--sm .car-btn svg { width: 15px; height: 15px; }
.carousel--sm .car-btn.prev { left: 0; }
.carousel--sm .car-btn.next { right: 0; }
.site-head .carousel--sm .car-btn { background: var(--paper); }
.carousel--issues { flex: 1 1 auto; min-width: 0; }
@media (hover: none) { .carousel--sm .car-btn { width: 30px; height: 30px; } }
.story .thumb.gen { aspect-ratio: 16 / 5; max-width: 640px; }
@media (max-width: 640px) { .story .thumb.gen { aspect-ratio: 16 / 7; } }
.thumb.gen::after {
  content: ""; position: absolute; right: 18px; top: 18px; width: 64px; height: 40px;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 40px 4px no-repeat,
              linear-gradient(var(--accent), var(--accent)) 12px 18px / 40px 4px no-repeat,
              linear-gradient(var(--accent), var(--accent)) 24px 36px / 40px 4px no-repeat;
  opacity: .55;
}
