/* ═══════════════════════════════════════════════════════════
   TVI 탐구 가이드 — 지폐 판화(banknote) 팔레트
   display: Gowun Batang / body: IBM Plex Sans KR / data: IBM Plex Mono
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper: #F6F8F3;
  --surface: #FFFFFF;
  --text: #1E2A27;
  --muted: #5C6B64;
  --teal: #14695A;
  --teal-deep: #0B4A3F;
  --teal-soft: #E3EEE9;
  --red: #BE3B2C;
  --red-soft: #F9ECE8;
  --line: #D9E0D7;
  --shadow: 0 1px 3px rgba(20, 45, 38, 0.08);

  --font-display: "Gowun Batang", "Nanum Myeongjo", serif;
  --font-body: "IBM Plex Sans KR", -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

html[data-theme="dark"] {
  --paper: #0E1916;
  --surface: #15221E;
  --text: #E5EAE2;
  --muted: #94A49B;
  --teal: #5AB59E;
  --teal-deep: #0B4A3F;
  --teal-soft: #1B2F29;
  --red: #E0785F;
  --red-soft: #34211C;
  --line: #26352E;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }

/* ─────────────── 상단 바 ─────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--paper);
  background: var(--teal);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.06em;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
}

/* 한글 이름이 길어 좁은 화면에서는 D-day 칩과 부딪힌다 — 같이 줄인다 */
@media (max-width: 430px) {
  .topbar-inner { gap: 6px; }
  .brand { gap: 6px; }
  .brand-mark { font-size: 0.8rem; padding: 2px 5px; }
  .brand-name { font-size: 0.85rem; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 0.78rem; }
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.dday-chip {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.theme-toggle {
  font-size: 1.05rem;
  line-height: 1;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  width: 32px;
  height: 32px;
  cursor: pointer;
}

/* 탭 */
.tabs {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 8px;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  flex: 1 0 auto;
  text-align: center;
  padding: 9px 14px 11px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tabs a[aria-current="page"] {
  color: var(--teal);
  font-weight: 700;
  border-bottom-color: var(--teal);
}

/* ─────────────── 본문 공통 ─────────────── */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.view > * + * { margin-top: 16px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.35;
  margin-top: 2px;
}

.section-intro { color: var(--muted); font-size: 0.95rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.card .tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 4px;
  padding: 1px 7px;
  margin-bottom: 8px;
}

.analogy {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.55;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--teal);
  margin-bottom: 10px;
}

.definition { font-size: 0.95rem; margin-bottom: 8px; }

.points { list-style: none; }
.points li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 6px;
}
.points li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--teal);
  font-weight: 700;
}

/* 표 */
.tbl-wrap { overflow-x: auto; margin-top: 10px; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.tbl th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  padding: 6px 10px 6px 0;
  white-space: nowrap;
}
table.tbl td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 8px 0;
  vertical-align: top;
}
table.tbl tr:last-child td { border-bottom: none; }
table.tbl code, .mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--teal-soft);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ─────────────── 홈: 히어로 ─────────────── */

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.hero .quote {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero .big-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 6.4vw, 2.3rem);
  line-height: 1.3;
  color: var(--text);
}

.hero .big-q em {
  font-style: normal;
  color: var(--teal);
}

.hero .lead {
  margin-top: 14px;
  font-size: 0.93rem;
  color: var(--muted);
  text-align: left;
}

/* 시그니처: TVI 공식 머신 (지폐 판화 패널) */
.machine {
  position: relative;
  overflow: hidden;
  background: var(--teal-deep);
  color: #EAF3EE;
  border-radius: 14px;
  padding: 24px 20px 20px;
}

.machine::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    repeating-radial-gradient(circle at 15% -20%, transparent 0 7px, rgba(255,255,255,0.05) 7px 8px),
    repeating-radial-gradient(circle at 110% 120%, transparent 0 9px, rgba(255,255,255,0.04) 9px 10px);
  pointer-events: none;
}

.machine > * { position: relative; }

.machine .m-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #9CCDBD;
  margin-bottom: 12px;
}

.machine .formula {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(0.85rem, 3.4vw, 1.05rem);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 4px;
  white-space: nowrap;
}

.machine .formula .frac {
  display: inline-block;
  vertical-align: middle;
  text-align: center;
}
.machine .formula .frac .top { padding: 0 8px 2px; }
.machine .formula .frac .bottom {
  border-top: 2px solid #9CCDBD;
  padding: 2px 8px 0;
  color: #C9E4D8;
}

.machine .result {
  text-align: center;
  margin: 12px 0 16px;
}
.machine .result .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: 1.1;
}
.machine .result .unit {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-left: 4px;
}
.machine .result .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #9CCDBD;
  margin-top: 4px;
}

.machine .slider-row { margin-top: 12px; }
.machine .slider-row label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #C9E4D8;
  margin-bottom: 4px;
}
.machine .slider-row output { color: #FFFFFF; font-weight: 600; }

.machine input[type="range"] {
  width: 100%;
  accent-color: #7FD0B4;
  height: 22px;
}

.machine .m-note {
  margin-top: 14px;
  font-size: 0.76rem;
  color: #9CCDBD;
  text-align: center;
}

/* 나라 그리드 */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}
.country {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.country .cflag { font-size: 1.5rem; display: block; }
.country .cname { font-weight: 700; font-size: 0.92rem; }
.country .ccur {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

/* 타임라인 */
.timeline { list-style: none; }
.timeline li {
  position: relative;
  padding: 0 0 16px 26px;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}
.timeline li:last-child { padding-bottom: 2px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--muted);
}
.timeline li.now { border-left-color: var(--teal); }
.timeline li.now::before { background: var(--teal); border-color: var(--teal); }
.timeline .t-range {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}
.timeline .t-label { font-weight: 700; font-size: 0.97rem; }
.timeline li.now .t-label { color: var(--teal); }
.timeline .t-sub { font-size: 0.85rem; color: var(--muted); }
.now-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--teal);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}

/* 주간 일정 */
.week-list { list-style: none; }
.week-list li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.93rem;
}
.week-list li:last-child { border-bottom: none; }
.week-list .w-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  flex: 0 0 74px;
  padding-top: 2px;
}

/* 인용/핵심 문장 */
.key-line {
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  border-radius: 12px;
  padding: 18px;
}
.key-line p.line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text);
}
.key-line p.note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─────────────── 발표: 슬라이드 카드 ─────────────── */

.slide-card { position: relative; }
.slide-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.slide-no {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--paper);
  background: var(--text);
  border-radius: 5px;
  padding: 2px 7px;
}
.slide-card.star .slide-no { background: var(--red); }
.slide-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  flex: 1;
}
.slide-time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}
.slide-say {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--teal-soft);
  border-radius: 8px;
  font-size: 0.9rem;
}
.slide-tip {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--red-soft);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
}
.slide-tip::before { content: "TIP · "; font-weight: 700; color: var(--red); }

/* 체크리스트 */
.check-list { list-style: none; }
.check-list li { border-bottom: 1px dashed var(--line); }
.check-list li:last-child { border-bottom: none; }
.check-list label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  cursor: pointer;
  font-size: 0.93rem;
}
.check-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--teal);
  flex: 0 0 auto;
}
.check-list .c-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  flex: 0 0 66px;
  padding-top: 2px;
}
.check-list input:checked ~ .c-task { text-decoration: line-through; color: var(--muted); }

/* ─────────────── 스포일러 ─────────────── */

details.spoiler {
  border: 1.5px dashed var(--red);
  border-radius: 10px;
  background: var(--red-soft);
  margin-top: 10px;
}
details.spoiler summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--red);
  list-style: none;
}
details.spoiler summary::-webkit-details-marker { display: none; }
details.spoiler summary::before { content: "🔒 "; }
details.spoiler[open] summary::before { content: "🔓 "; }
details.spoiler .sp-body {
  padding: 0 14px 14px;
  font-size: 0.92rem;
}

.spoiler-warning {
  font-size: 0.86rem;
  color: var(--red);
  font-weight: 500;
}

/* ─────────────── 할 일 ─────────────── */

.ov-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ov {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "n label when" "n label dur";
  gap: 0 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
}
.ov-n {
  grid-area: n;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--teal);
}
.ov-label { grid-area: label; font-weight: 700; font-size: 0.97rem; }
.ov-when {
  grid-area: when;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--teal);
  text-align: right;
}
.ov-dur {
  grid-area: dur;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
}

.progress-wrap { margin-top: 14px; }
.progress-bar {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--teal);
  border-radius: 99px;
  transition: width 0.25s ease-out;
}
.progress-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  margin-top: 5px;
}

/* 데드라인 — 못박힌 단 하나의 날짜 */
.deadline-box {
  background: var(--teal-deep);
  color: #EAF3EE;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.dl-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #9CCDBD;
}
.dl-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  line-height: 1.2;
  margin-top: 4px;
}
.dl-dday {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--teal-deep);
  background: #9CCDBD;
  border-radius: 6px;
  padding: 2px 12px;
  margin-top: 8px;
}
.dl-note {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #C9E4D8;
  margin-top: 14px;
  text-align: left;
}

.todo-block.now { border-color: var(--teal); border-width: 2px; }
.todo-block.past { opacity: 0.66; }
.todo-block.deadline { border-color: var(--red); }
.todo-block.deadline .tb-date { color: var(--red); }

.done-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

.tb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.tb-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
}
.tb-dur {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 6px;
}
.tb-why {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 6px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

ol.tb-steps { list-style: none; counter-reset: ts; }
ol.tb-steps li {
  counter-increment: ts;
  position: relative;
  padding: 0 0 11px 27px;
}
ol.tb-steps li::before {
  content: counter(ts);
  position: absolute;
  left: 0;
  top: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-t { display: block; font-size: 0.94rem; font-weight: 500; line-height: 1.5; }
.st-d {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 2px;
}

.tb-seealso, .tb-extra {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 4px;
}

.tb-done {
  margin-top: 10px;
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.tb-done span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teal);
  display: block;
  margin-bottom: 2px;
}

.tb-checks { margin-top: 10px; border-top: 1px solid var(--line); }
.tb-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 14px; }
.tb-links a { font-size: 0.87rem; font-weight: 500; text-decoration: none; }

/* ─────────────── 따라하기: 복사 상자 · 단계 주의 · 누구와 ─────────────── */

.tb-head { flex-wrap: wrap; }
.tb-who {
  font-size: 0.72rem;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 4px;
  padding: 0 6px;
}
.st-code {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px 7px 10px;
  background: var(--teal-soft);
}
.st-code pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
}
.copy-btn {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  background: transparent;
  border: 1px solid var(--teal);
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
}
.st-warn {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.55;
  border-left: 3px solid var(--red);
  padding-left: 8px;
}
.tb-say {
  margin-top: 8px;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.tb-say span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 2px;
}

/* Numbeo 가이드 — STEP 본문 안에 들어감 */
.nb-guide {
  margin-top: 14px;
  background: var(--paper);
  border: 1.5px solid var(--teal);
  border-radius: 12px;
  padding: 15px 15px 16px;
}
.nb-guide-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal);
  margin-bottom: 7px;
}
.nb-guide .nb-h:first-of-type { border-top: none; padding-top: 0; margin-top: 16px; }

.nb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nb-chip {
  font-size: 0.79rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
}

.nb-ask {
  margin-top: 14px;
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 500;
}

.nb-cur {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.75;
}

.nb-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 18px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.nb-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nb-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #FFFFFF;
  background: var(--teal);
  border-radius: 8px;
  padding: 7px 13px;
  text-align: center;
  line-height: 1.25;
}
.nb-link::after { content: " ↗"; font-size: 0.78em; font-weight: 400; }
html[data-theme="dark"] .nb-link { color: #0E1916; }
.nb-note { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-top: 9px; }
.nb-en {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.nb-warn {
  background: var(--red-soft);
  border: 1.5px solid var(--red);
  border-radius: 10px;
  padding: 13px 14px;
  margin-top: 16px;
}
.nb-warn-h { font-weight: 700; color: var(--red); margin-bottom: 6px; font-size: 0.95rem; }
.nb-warn p { font-size: 0.9rem; line-height: 1.6; }
.nb-warn-why { margin-top: 8px; color: var(--muted); }
.nb-warn p + p { margin-top: 7px; }

.nb-gotcha {
  margin-top: 11px;
  border-left: 3px solid var(--red);
  padding: 3px 0 3px 12px;
  font-size: 0.88rem;
  line-height: 1.65;
}

@media (min-width: 560px) {
  .ov-grid { grid-template-columns: 1fr 1fr; }
}

/* ─────────────── 설계: 질문 블록 ─────────────── */

.db-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.db-n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--teal);
  flex: 0 0 auto;
}
.db-head h3 { margin-bottom: 0; }

.db-why {
  font-size: 0.88rem;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

ol.warmup {
  list-style: none;
  counter-reset: wu;
  margin-top: 12px;
}
ol.warmup li {
  counter-increment: wu;
  position: relative;
  padding: 0 0 10px 30px;
  font-size: 0.94rem;
  line-height: 1.6;
}
ol.warmup li::before {
  content: counter(wu);
  position: absolute;
  left: 0;
  top: 1px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-core {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.55;
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 4px;
}

/* 저장되는 입력란 */
.field { margin-top: 10px; }
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}
.field textarea:focus { border-color: var(--teal); outline: none; }
.field-saved {
  display: block;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  min-height: 1em;
  margin-top: 2px;
}

/* 약한 답 / 강한 답 */
.ws { margin-top: 12px; display: grid; gap: 8px; }
.ws p {
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 9px 12px;
  border-radius: 8px;
}
.ws p span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.ws-weak { background: var(--red-soft); }
.ws-weak span { color: var(--red); }
.ws-strong { background: var(--teal-soft); }
.ws-strong span { color: var(--teal); }

details.hintbox {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
details.hintbox summary {
  cursor: pointer;
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  list-style: none;
}
details.hintbox summary::-webkit-details-marker { display: none; }
details.hintbox summary::before { content: "▸ "; color: var(--teal); }
details.hintbox[open] summary::before { content: "▾ "; }
details.hintbox .sp-body { padding: 0 12px 12px; font-size: 0.9rem; }

/* ─────────────── 예시 발표 ─────────────── */

.ex-cover {
  background: var(--teal-deep);
  color: #EAF3EE;
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
}
.ex-cover-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.25;
}
.ex-cover-sub {
  font-size: 0.9rem;
  color: #C9E4D8;
  margin-top: 8px;
  line-height: 1.5;
}
.ex-cover-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #9CCDBD;
  margin-top: 14px;
}

.warnbox {
  background: var(--red-soft);
  border: 1.5px solid var(--red);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ex-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 6px;
}

.slide-screen {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 16px 16px;
}
.slide-screen p {
  font-size: 0.92rem;
  line-height: 1.6;
}
.slide-screen p:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
}
.slide-screen .sc-gap { height: 10px; }

.ex-script {
  border-left: 3px solid var(--teal);
  padding: 6px 0 6px 14px;
  font-size: 0.95rem;
  line-height: 1.75;
}
.script-break { display: block; height: 10px; }

.ex-key {
  margin-top: 14px;
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  border-radius: 10px;
  padding: 14px;
}
.ex-key .line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
}
.ex-key .note { font-size: 0.84rem; color: var(--muted); margin-top: 7px; }

.blank {
  margin-top: 14px;
  border: 2px dashed var(--red);
  border-radius: 10px;
  padding: 13px 14px;
  background: var(--red-soft);
}
.blank-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--red);
  margin-bottom: 5px;
}
.blank-hint { font-size: 0.87rem; line-height: 1.6; }
.blank .field textarea { background: var(--surface); }

.ex-teacher {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 0.89rem;
  line-height: 1.6;
  color: var(--muted);
}
.et-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 4px;
}

.ex-qhint {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--teal-soft);
  border-radius: 8px;
  font-size: 0.87rem;
  line-height: 1.6;
}

.ex-short {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.ex-short span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 7px;
}

.qna { padding-top: 15px; padding-bottom: 15px; }
.qna-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 7px;
}
.qna-q::before { content: "Q. "; color: var(--teal); }
.qna-a { font-size: 0.93rem; line-height: 1.7; }
.qna-a::before { content: "A. "; font-weight: 700; color: var(--muted); }
.qna-note {
  margin-top: 9px;
  font-size: 0.83rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

.card.known { border-color: var(--teal); }

/* ─────────────── 퀴즈 ─────────────── */

.quiz-sets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quiz-set-btn {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text);
  box-shadow: var(--shadow);
}
.quiz-set-btn:hover { border-color: var(--teal); }
.quiz-set-btn .qs-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  display: block;
}
.quiz-set-btn .qs-desc {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.quiz-set-btn .qs-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  display: block;
  margin-top: 8px;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.quiz-progress {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.quiz-quit {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-body);
}

.q-topic {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 6px;
}
.q-text {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.55;
  margin-bottom: 14px;
}

.choices { display: grid; gap: 8px; }
.choice-btn {
  text-align: left;
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}
.choice-btn:not(:disabled):hover { border-color: var(--teal); }
.choice-btn:disabled { cursor: default; opacity: 0.75; }
.choice-btn.correct {
  border-color: var(--teal);
  background: var(--teal-soft);
  font-weight: 700;
  opacity: 1;
}
.choice-btn.wrong {
  border-color: var(--red);
  background: var(--red-soft);
  opacity: 1;
}

.q-explain {
  margin-top: 14px;
  border-left: 3px solid var(--teal);
  padding: 4px 0 4px 12px;
  font-size: 0.9rem;
}
.q-explain .verdict { font-weight: 700; margin-bottom: 4px; }
.q-explain .verdict.ok { color: var(--teal); }
.q-explain .verdict.no { color: var(--red); }

.btn-primary {
  display: inline-block;
  background: var(--teal);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 14px;
}
.btn-primary:hover { background: var(--teal-deep); }
html[data-theme="dark"] .btn-primary { color: #0E1916; }
html[data-theme="dark"] .btn-primary:hover { background: var(--teal); opacity: 0.9; }

.quiz-result-score {
  text-align: center;
  padding: 8px 0 4px;
}
.quiz-result-score .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  color: var(--teal);
}
.quiz-result-score .den { font-family: var(--font-mono); color: var(--muted); }
.quiz-result-msg { text-align: center; font-size: 0.93rem; color: var(--muted); }

.wrong-review { margin-top: 14px; }
.wrong-review h4 { font-size: 0.9rem; margin-bottom: 6px; }
.wrong-review ol { padding-left: 20px; font-size: 0.88rem; }
.wrong-review li { margin-top: 8px; }
.wrong-review .wr-a { color: var(--teal); font-weight: 500; }

/* ─────────────── 푸터 ─────────────── */

.footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.footer-rule { margin-top: 4px; font-family: var(--font-mono); font-size: 0.72rem; }

/* ─────────────── 접근성 · 모션 ─────────────── */

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.view:not([hidden]) { animation: fadeUp 0.25s ease-out; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view:not([hidden]) { animation: none; }
}

@media (min-width: 560px) {
  .quiz-sets { grid-template-columns: 1fr 1fr 1fr; }
}

/* ─────────────── 3분 발표본 ─────────────── */

.three-hero {
  background: var(--teal-deep);
  color: #F1F5F0;
  border-radius: 14px;
  padding: 20px 18px 18px;
}
.th-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8FC7B6;
}
.th-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1.05;
  margin: 2px 0 14px;
}
.th-big span { font-size: 1.3rem; margin-left: 4px; }

/* 5장을 초에 비례한 막대로 — 3분이 얼마나 짧은지 눈으로 */
.tl-bar {
  display: flex;
  gap: 3px;
  height: 46px;
}
.tl-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 5px;
}
.tl-seg.p1 { background: rgba(255, 255, 255, 0.15); }
.tl-seg.p2 { background: rgba(143, 199, 182, 0.40); }
.tl-seg b {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.1;
}
.tl-seg i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.6rem;
  color: #C6DCD3;
}
.th-legend {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #D3E5DD;
}
.th-legend .tlg { display: flex; align-items: baseline; gap: 5px; }
.th-legend .tlg b {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border-radius: 3px;
  flex: none;
}
.th-legend .tlg-1 b { background: rgba(255, 255, 255, 0.22); color: #F1F5F0; }
.th-legend .tlg-2 b { background: rgba(143, 199, 182, 0.55); color: #08302A; }
.th-legend .tlg i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.68rem;
  color: #8FC7B6;
}
.th-sum {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #B8D2C8;
}

/* 평가 항목 두 가지 */
.part-card { border-left: 3px solid var(--line); }
.part-card.part-1 { border-left-color: var(--muted); }
.part-card.part-2 { border-left-color: var(--teal); }
.pc-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 13px;
}
.pc-no {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--text);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.part-card.part-2 .pc-no { background: var(--teal); }
.pc-head h3 { margin: 0; }
.pc-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.pc-asks { list-style: none; margin-bottom: 4px; }
.pc-asks li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}
.pc-asks li::before {
  content: "?";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-family: var(--font-mono);
}

/* 슬라이드 목록 안에서 두 부분을 갈라주는 줄 */
.part-divider {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  padding: 6px 0 2px;
  border-bottom: 2px solid var(--teal);
}
.pd-no {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.74rem;
  color: var(--paper);
  background: var(--teal);
  border-radius: 4px;
  padding: 1px 7px;
}
.pd-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}
.pd-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
}

.kl-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 7px;
}

.ex-slide.star { border-left: 3px solid var(--red); }

.prep-list {
  list-style: none;
  counter-reset: prep;
}
.prep-list li {
  counter-increment: prep;
  padding: 12px 0 12px 34px;
  position: relative;
  border-bottom: 1px dashed var(--line);
}
.prep-list li:last-child { border-bottom: none; }
.prep-list li::before {
  content: counter(prep);
  position: absolute;
  left: 0;
  top: 13px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}
.prep-t {
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.prep-dur {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 4px;
  padding: 1px 6px;
}
.prep-d {
  margin-top: 4px;
  font-size: 0.89rem;
  line-height: 1.7;
  color: var(--muted);
}
.prep-note {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

/* ─────────────── 9월부터: 로드맵 ─────────────── */

.week-plan { list-style: none; }
.week-plan li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 2px 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.week-plan li:last-child { border-bottom: none; }
.nw-n {
  grid-row: span 2;
  align-self: start;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--teal);
  border-radius: 5px;
  padding: 3px 0;
  text-align: center;
}
.nw-label { font-weight: 700; }
.ph-when { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.phase-plan li.now .nw-label { color: var(--teal); }
.brief-lines {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
}
.brief-lines dt { font-weight: 700; color: var(--teal); }
@media (max-width: 420px) {
  .brief-lines { grid-template-columns: 1fr; gap: 2px; }
  .brief-lines dd { margin-bottom: 6px; }
}
.nw-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

.next-block { border-left: 3px solid var(--teal); }
.nx-tag {
  flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--paper);
  background: var(--teal-deep);
  border-radius: 6px;
  padding: 1px 9px;
}
html[data-theme="dark"] .nx-tag { background: var(--teal); color: #08302A; }

/* 출처 카드 */
.src-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  margin-top: 12px;
  background: var(--paper);
}
.src-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}
.src-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
}
.src-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--teal);
  border-radius: 4px;
  padding: 2px 7px;
}
.src-badge.hand { background: var(--red); }
.src-where {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  word-break: break-all;
}
.src-lines {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  font-size: 0.88rem;
  line-height: 1.65;
}
.src-lines dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
  padding-top: 3px;
}
.src-lines dd { color: var(--text); }
.src-warns {
  list-style: none;
  margin-top: 11px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.src-warns li {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text);
  padding-left: 16px;
  position: relative;
  margin-top: 6px;
}
.src-warns li::before {
  content: "!";
  position: absolute;
  left: 2px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--red);
}
.src-good {
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 9px 11px;
}

/* 만들 것 — 입력 → 처리 → 출력 */
ol.pipe { list-style: none; counter-reset: pipe; margin-top: 8px; }
ol.pipe li {
  counter-increment: pipe;
  position: relative;
  padding: 8px 0 8px 26px;
}
ol.pipe li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
ol.pipe li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 25px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}
ol.pipe li b { display: block; font-size: 0.92rem; }
ol.pipe li span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 2px;
}

.ai-box {
  margin-top: 14px;
  border: 1px dashed var(--teal);
  border-radius: 10px;
  padding: 13px;
  background: var(--teal-soft);
}

/* ─────────────── 최종판 (2026-10-04) ─────────────── */

.fin-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.fin-links .btn-primary, .fin-links .btn-ghost { margin-top: 0; }
.btn-ghost {
  display: inline-block;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  background: transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--teal-soft); }
a.btn-primary { text-decoration: none; }
.fin-hero .big-q { font-size: clamp(1.4rem, 5.4vw, 2rem); }

.fin-result { position: relative; padding-left: 58px; }
.fin-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--teal); color: #fff;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; flex: 0 0 auto;
}
html[data-theme="dark"] .fin-n { color: #0E1916; }
.fin-result > .fin-n { position: absolute; left: 18px; top: 20px; }
.fin-src { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.fin-src a { color: var(--teal); }

.fin-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fin-tile {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.fin-tile:hover { border-color: var(--teal); }
.fin-tile b { display: block; color: var(--teal); margin-bottom: 4px; }
.fin-tile span { font-size: 0.86rem; color: var(--muted); }

.fin-road { list-style: none; padding: 0; border-left: 3px solid var(--teal-soft); margin-left: 6px; }
.fin-road > li { margin-left: 16px; position: relative; }
.fin-road > li::before {
  content: ""; position: absolute; left: -27px; top: 22px;
  width: 13px; height: 13px; border-radius: 50%; background: var(--teal); border: 3px solid var(--paper);
}
.fin-when { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--teal); margin-bottom: 2px; }
.fin-dl { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; margin-top: 10px; font-size: 0.9rem; }
.fin-dl dt { font-weight: 700; color: var(--muted); font-size: 0.82rem; padding-top: 2px; }
.fin-dl dd { margin: 0; }
@media (max-width: 520px) { .fin-dl { grid-template-columns: 1fr; } .fin-dl dd { margin-bottom: 6px; } }

.fin-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fin-stage {
  flex: 1 1 180px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--teal);
  border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow);
}
.fin-stage-k { font-weight: 700; margin-bottom: 6px; }
.fin-stage ul { padding-left: 16px; font-size: 0.86rem; }
.fin-stage-note { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.fin-arrow { display: none; }
@media (max-width: 760px) { .fin-arrow { display: none; } }

.fin-script summary { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; list-style: none; font-size: 0.93rem; }
.fin-script summary::-webkit-details-marker { display: none; }
.fin-script summary code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--teal); }
.fin-script[open] summary { margin-bottom: 10px; }
.fin-script .st-code pre { white-space: pre-wrap; word-break: break-all; }
.fin-ask { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: var(--teal-soft); font-size: 0.9rem; font-weight: 600; }
.fin-rule { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--teal); background: var(--teal-soft); font-size: 0.9rem; font-weight: 600; border-radius: 0 8px 8px 0; }

.fin-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111; border-radius: 8px; overflow: hidden; }
.fin-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fin-inline { color: var(--teal); }

.fin-video video { width: 100%; aspect-ratio: 16 / 9; background: #111; border-radius: 10px; display: block; margin-top: 8px; }
.fin-make { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fin-make-step { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.fin-make-step span { font-size: 1.6rem; display: block; }
.fin-make-step b { display: block; margin: 4px 0; }
.fin-make-step p { font-size: 0.84rem; color: var(--muted); }
ol.fin-try { list-style: decimal; padding-left: 20px; }
ol.fin-try li::before { content: none; display: none; }
ol.fin-try li { padding-left: 2px; }
