/* ========================================================================
   로컬 LLM 2026 — Stylesheet
   기반: modern-design-system / 04_ux_spec.md §3
   ======================================================================== */

/* -------- 1. Tokens -------- */
:root {
  /* Color (oklch) */
  --bg-deep: oklch(12% 0.02 270);
  --bg-base: oklch(18% 0.03 270);
  --surface-1: oklch(24% 0.04 270);
  --surface-2: oklch(30% 0.04 270);
  --border-subtle: oklch(100% 0 0 / 0.08);
  --border-strong: oklch(100% 0 0 / 0.18);

  --text-1: oklch(96% 0.01 270);
  --text-2: oklch(78% 0.02 270);
  --text-3: oklch(58% 0.03 270);

  --accent-violet: oklch(70% 0.20 290);
  --accent-cyan: oklch(78% 0.16 210);
  --accent-amber: oklch(82% 0.16 70);
  --accent-rose: oklch(68% 0.20 15);

  --gradient-aurora: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-cyan) 100%);
  --gradient-amber: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-rose) 100%);
  --gradient-rose: linear-gradient(135deg, var(--accent-rose) 0%, var(--accent-amber) 100%);

  /* Type */
  --font-sans: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --fs-hero: clamp(3rem, 6vw + 1rem, 7.5rem);
  --fs-display: clamp(2.25rem, 4vw + 1rem, 5rem);
  --fs-h1: clamp(1.875rem, 2.5vw + 1rem, 3rem);
  --fs-h2: clamp(1.375rem, 1.6vw + 0.8rem, 2rem);
  --fs-h3: clamp(1.125rem, 1vw + 0.8rem, 1.4rem);
  --fs-body-lg: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.75rem;
  --fs-mono-lg: clamp(2rem, 3vw + 1rem, 3.75rem);

  --tracking-tight: -0.04em;
  --tracking-normal: -0.01em;
  --tracking-wide: 0.12em;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Easing */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/*
 * 디자인 콘셉트가 "Dark Editorial · Generative Aurora"라 페이지 전체를 다크 모드로
 * 통일한다. light 모드에서도 동일한 시각 정체성을 유지하되, OS 라이트 환경 사용자가
 * 잠시 페이지를 볼 때 본문이 너무 어두워지지 않도록 본문 가독성만 한 단계 보정.
 *
 * color-scheme: dark가 메타로 설정되어 있어 폼 위젯/스크롤바도 다크 톤으로 통일된다.
 */
:root {
  color-scheme: dark;
}

/* -------- 2. Reset / base -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-2);
  background-color: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-feature-settings: 'ss01', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-1);
}

ul,
ol {
  list-style: none;
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
}

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

::selection {
  background: var(--accent-violet);
  color: var(--bg-deep);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
  letter-spacing: -0.01em;
}

.gradient-text {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Fallback */
  -webkit-text-fill-color: transparent;
}

.gradient-text.rose-grad {
  background: var(--gradient-rose);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.amber {
  color: var(--accent-amber);
  font-weight: 600;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.eyebrow-strong {
  color: var(--text-2);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-4);
  background: var(--accent-violet);
  color: var(--bg-deep);
  padding: var(--space-2) var(--space-4);
  border-radius: 8px;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--bg-deep);
}

/* -------- 3. Layout primitives -------- */
.section {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
  padding-inline: clamp(1rem, 5vw, 4rem);
  scroll-margin-top: 96px;
}

.section-head {
  max-width: 760px;
  margin: 0 auto var(--space-16);
  text-align: center;
}

.section-title {
  font-size: var(--fs-display);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text-1);
  margin-block: var(--space-4) var(--space-4);
}

.section-sub {
  font-size: var(--fs-body-lg);
  color: var(--text-2);
  max-width: 60ch;
  margin-inline: auto;
}

/* -------- 4. Background canvas / cursor glow / progress -------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  /* Animation engineer가 채울 캔버스 */
  background:
    radial-gradient(ellipse at 15% 10%, oklch(70% 0.20 290 / 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 80%, oklch(78% 0.16 210 / 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, oklch(82% 0.16 70 / 0.04) 0%, transparent 40%),
    var(--bg-deep);
}

/* cursor-glow: JS는 transform/opacity만 갱신, 정적 외형은 CSS가 책임진다.
   - 480x480 원형 글로우 — 보라+시안 듀얼톤에 옐로우 액센트 살짝 (브랜드 톤)
   - mix-blend-mode: screen — 어두운 배경 위에서 자연스러운 빛 합성
   - opacity는 JS가 0↔1로 토글, transform: translate3d로 위치만 갱신 */
.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 480px;
  height: 480px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle,
    oklch(78% 0.18 290 / 0.18) 0%,
    oklch(75% 0.16 210 / 0.08) 35%,
    transparent 70%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transform: translate3d(-9999px, -9999px, 0);
  transition: opacity 0.4s ease;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }
}

@media (hover: none) {
  .cursor-glow {
    display: none;
  }
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: var(--progress, 0%);
  background: var(--gradient-aurora);
  z-index: 100;
  transition: width 0.1s linear;
}

/* -------- 5. Page header -------- */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) clamp(1rem, 5vw, 4rem);
  z-index: 50;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: oklch(12% 0.02 270 / 0.55);
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-wide);
  color: var(--text-1);
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--gradient-aurora);
  box-shadow: 0 0 14px oklch(70% 0.20 290 / 0.6);
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
}

.brand-year {
  color: var(--accent-amber);
}

.top-nav {
  display: flex;
  gap: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

.top-nav a {
  position: relative;
  padding-block: var(--space-1);
}

.top-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 -3px 0;
  height: 1px;
  background: var(--accent-amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-expo);
}

.top-nav a:hover::after {
  transform: scaleX(1);
}

.top-nav .cta-link {
  color: var(--accent-amber);
}

@media (max-width: 768px) {
  .top-nav a:not(.cta-link) {
    display: none;
  }
}

/* -------- 6. Nav dots (left side) -------- */
.nav-dots {
  position: fixed;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
}

.nav-dots ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nav-dots a {
  display: block;
  padding: 6px;
}

.nav-dots a span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.3;
  transition: all 0.3s var(--ease-out-expo);
}

.nav-dots a:hover span {
  opacity: 0.8;
  transform: scale(1.3);
}

.nav-dots a.active span {
  background: var(--accent-amber);
  opacity: 1;
  transform: scale(1.5);
  box-shadow: 0 0 12px oklch(82% 0.16 70 / 0.6);
}

@media (max-width: 1100px) {
  .nav-dots {
    display: none;
  }
}

/* -------- 7. Hero -------- */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 120px;
  text-align: left;
}

.hero-inner {
  max-width: 1280px;
  width: 100%;
  margin-inline: auto;
}

.hero-title {
  font-size: var(--fs-hero);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--text-1);
  margin-block: var(--space-8) var(--space-6);
}

.hero-title .line {
  display: block;
}

.hero-sub {
  max-width: 60ch;
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  color: var(--text-2);
  margin-block: var(--space-6) var(--space-12);
}

.hero-sub strong {
  color: var(--text-1);
  font-weight: 600;
}

.hero-meta {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  color: var(--text-3);
  text-transform: uppercase;
  padding-block: var(--space-6);
  border-block: 1px solid var(--border-subtle);
}

.hero-meta li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.hero-meta li .mono {
  color: var(--text-1);
  font-size: var(--fs-body);
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  color: var(--text-3);
}

.scroll-indicator .arrow {
  font-size: 1.5rem;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-indicator .arrow {
    animation: none;
  }
}

/* -------- 8. Glass card primitive -------- */
.glass-card {
  position: relative;
  background: oklch(100% 0 0 / 0.04);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.06),
    0 20px 40px oklch(0% 0 0 / 0.3);
  transition: transform 0.3s var(--ease-out-expo),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.1),
    0 30px 60px oklch(0% 0 0 / 0.4),
    0 0 0 1px oklch(70% 0.20 290 / 0.2);
}

/* -------- 9. TL;DR -------- */
.tldr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1280px;
  margin-inline: auto;
}

.tldr-grid li {
  list-style: none;
}

.tldr-card {
  position: relative;
  padding: var(--space-8);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 280px;
}

.tldr-card.wide {
  grid-column: span 3;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.tldr-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-aurora);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.tldr-card-no {
  position: absolute;
  top: var(--space-6);
  right: var(--space-8);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--text-3);
  opacity: 0.6;
}

.tldr-card-key {
  font-size: var(--fs-h3);
  color: var(--text-1);
  font-weight: 600;
  margin-top: var(--space-2);
  line-height: 1.3;
}

.tldr-card-line {
  color: var(--text-2);
  flex: 1;
}

.tldr-card-metric {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.tldr-card-metric .value {
  font-family: var(--font-mono);
  font-size: var(--fs-h2);
  color: var(--accent-amber);
  font-weight: 700;
}

.tldr-card-metric .unit {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-3);
}

.tldr-card-metric .label {
  font-size: var(--fs-tiny);
  color: var(--text-3);
  margin-left: auto;
}

.tldr-card.wide .tldr-content {
  flex: 1 1 320px;
}

@media (max-width: 980px) {
  .tldr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tldr-card.wide {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .tldr-grid {
    grid-template-columns: 1fr;
  }
  .tldr-card.wide {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* -------- 10. Why now -------- */
.why-grid {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: var(--space-16);
  max-width: 1280px;
  margin-inline: auto;
  align-items: start;
}

.big-quote {
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-6);
}

.big-quote p + p {
  margin-top: 0.1em;
}

.quote-cite {
  display: block;
  margin-top: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-3);
  font-style: normal;
}

.trigger-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.trigger-card {
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-5);
  align-items: start;
}

.trigger-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: oklch(100% 0 0 / 0.04);
  border: 1px solid var(--border-subtle);
}

.trigger-title {
  font-size: var(--fs-h3);
  color: var(--text-1);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.trigger-body {
  color: var(--text-2);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
}

/* -------- 11. Models -------- */
.category-tabs {
  position: sticky;
  top: 80px;
  z-index: 20;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  margin-block: var(--space-8) var(--space-12);
  border-radius: 999px;
  background: oklch(12% 0.02 270 / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  width: fit-content;
  margin-inline: auto;
  flex-wrap: wrap;
  justify-content: center;
}

.category-tab {
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all 0.2s var(--ease-out-expo);
}

.category-tab .count {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--text-3);
  background: oklch(100% 0 0 / 0.06);
  padding: 0 6px;
  border-radius: 999px;
}

.category-tab:hover {
  color: var(--text-2);
  background: oklch(100% 0 0 / 0.04);
}

.category-tab.active {
  background: var(--gradient-aurora);
  color: var(--bg-deep);
  font-weight: 600;
}

.category-tab.active .count {
  background: oklch(0% 0 0 / 0.2);
  color: var(--bg-deep);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 1280px;
  margin-inline: auto;
}

.model-card-wrap {
  perspective: 1200px;
  height: 280px;
  list-style: none;
}

.model-card-wrap.dim {
  opacity: 0.18;
  filter: saturate(0.4);
  transform: scale(0.96);
  pointer-events: none;
  transition: all 0.4s var(--ease-out-expo);
}

.model-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease-out-expo);
  transform-style: preserve-3d;
}

.model-card-wrap:hover .model-card,
.model-card-wrap:focus-within .model-card {
  transform: rotateY(180deg);
}

.model-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: var(--space-6);
  border-radius: 1.25rem;
  border: 1px solid var(--border-subtle);
  background: oklch(100% 0 0 / 0.04);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.model-face.back {
  transform: rotateY(180deg);
  background: oklch(24% 0.04 270 / 0.6);
  justify-content: space-between;
}

.model-card-wrap:hover .model-face.front,
.model-card-wrap:focus-within .model-face.front {
  /* keep border subtle */
}

.model-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.model-name {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.license-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.license-mit,
.license-apache {
  background: oklch(78% 0.16 210 / 0.18);
  color: var(--accent-cyan);
  border: 1px solid oklch(78% 0.16 210 / 0.35);
}

.license-llama {
  background: oklch(70% 0.20 290 / 0.18);
  color: var(--accent-violet);
  border: 1px solid oklch(70% 0.20 290 / 0.35);
}

.license-custom {
  background: oklch(82% 0.16 70 / 0.18);
  color: var(--accent-amber);
  border: 1px solid oklch(82% 0.16 70 / 0.35);
}

.params-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
}

.params-active {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: -0.02em;
}

.params-total {
  font-size: 1rem;
  color: var(--text-3);
}

.params-sep {
  color: var(--text-3);
}

.params-tag {
  font-size: var(--fs-tiny);
  margin-left: var(--space-2);
  padding: 2px 6px;
  border-radius: 4px;
  background: oklch(100% 0 0 / 0.06);
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.korean-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.korean-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.3;
}

.korean-dots .dot.on {
  background: var(--gradient-aurora);
  background-color: var(--accent-cyan);
  opacity: 1;
}

.korean-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-small);
  color: var(--text-3);
}

.korean-row .label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
}

.env-row {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-2);
  padding: var(--space-2) var(--space-3);
  background: oklch(100% 0 0 / 0.04);
  border-radius: 8px;
}

.oneline {
  font-size: var(--fs-small);
  color: var(--text-2);
  margin-top: auto;
  line-height: 1.5;
}

.model-back-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--fs-small);
}

.model-back-list dt {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
}

.model-back-list dd {
  color: var(--text-2);
  margin-bottom: var(--space-3);
}

.source-link {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.source-link:hover {
  color: var(--text-1);
}

/* trends */
.trends-block {
  margin-top: var(--space-24);
  max-width: 1280px;
  margin-inline: auto;
}

.trends-title {
  font-size: var(--fs-h2);
  color: var(--text-1);
  font-weight: 600;
  margin-bottom: var(--space-8);
  text-align: center;
}

.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.trend-card {
  padding: var(--space-6);
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: oklch(100% 0 0 / 0.03);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: all 0.3s var(--ease-out-expo);
}

.trend-card:hover {
  border-color: var(--accent-violet);
  background: oklch(70% 0.20 290 / 0.06);
}

.trend-no {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.1em;
  color: var(--accent-amber);
}

.trend-title {
  font-size: var(--fs-h3);
  color: var(--text-1);
  font-weight: 600;
}

.trend-line {
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.5;
}

/* -------- 12. Infra matrix -------- */
.matrix-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-12);
  max-width: 1440px;
  margin-inline: auto;
  align-items: start;
}

.matrix-controls {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  background: oklch(100% 0 0 / 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.control-label {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

.control-value {
  font-size: var(--fs-mono-lg);
  font-weight: 700;
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.control-value .unit {
  font-size: 0.4em;
  margin-left: 0.25em;
  font-weight: 500;
}

input[type='range'] {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent-violet) 0%,
    var(--accent-violet) var(--range-percent, 44%),
    oklch(100% 0 0 / 0.1) var(--range-percent, 44%),
    oklch(100% 0 0 / 0.1) 100%
  );
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-amber);
  border: 3px solid var(--bg-deep);
  box-shadow: 0 0 16px oklch(82% 0.16 70 / 0.6);
  cursor: grab;
  transition: transform 0.2s var(--ease-out-expo);
}

input[type='range']::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-amber);
  border: 3px solid var(--bg-deep);
  box-shadow: 0 0 16px oklch(82% 0.16 70 / 0.6);
  cursor: grab;
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin-top: var(--space-2);
}

.slider-marks span {
  position: relative;
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.slider-marks span.emphasis {
  color: var(--accent-amber);
  font-weight: 700;
}

.slider-tier {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: oklch(100% 0 0 / 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.seg {
  padding: var(--space-3) var(--space-2);
  border-radius: 8px;
  font-size: var(--fs-small);
  color: var(--text-3);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  transition: all 0.2s var(--ease-out-expo);
}

.seg em {
  font-style: normal;
  font-size: var(--fs-tiny);
  color: var(--text-3);
  letter-spacing: 0.05em;
}

.seg.small {
  font-size: var(--fs-tiny);
}

.seg:hover {
  background: oklch(100% 0 0 / 0.04);
  color: var(--text-2);
}

.seg.active {
  background: var(--gradient-aurora);
  color: var(--bg-deep);
  font-weight: 600;
}

.seg.active em {
  color: oklch(0% 0 0 / 0.7);
}

.chip-group {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.chip {
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-size: var(--fs-small);
  color: var(--text-3);
  background: oklch(100% 0 0 / 0.04);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s var(--ease-out-expo);
}

.chip:hover {
  color: var(--text-2);
}

.chip.active {
  background: oklch(82% 0.16 70 / 0.18);
  color: var(--accent-amber);
  border-color: oklch(82% 0.16 70 / 0.4);
}

.matrix-result {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: 1.5rem;
  border: 1px solid var(--border-subtle);
  background: oklch(24% 0.04 270 / 0.4);
  overflow: hidden;
  isolation: isolate;
}

.aurora-bg {
  position: absolute;
  inset: -50px;
  z-index: -1;
  opacity: 0.3;
  background: conic-gradient(
    from 180deg at 50% 50%,
    var(--accent-violet) 0deg,
    var(--accent-cyan) 120deg,
    var(--accent-amber) 240deg,
    var(--accent-violet) 360deg
  );
  filter: blur(80px);
  animation: aurora-rotate 30s linear infinite;
}

@keyframes aurora-rotate {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-bg {
    animation: none;
  }
}

.recommend-main {
  position: relative;
}

.recommend-head {
  margin-bottom: var(--space-6);
}

.recommend-label {
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

.recommend-model {
  font-size: var(--fs-h1);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  margin-block: var(--space-2);
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.recommend-tagline {
  color: var(--text-2);
  font-size: var(--fs-body);
}

.recommend-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-block: 1px solid var(--border-subtle);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

.stat-value {
  font-size: var(--fs-h2);
  color: var(--text-1);
  font-weight: 700;
}

.stat-value .unit {
  font-size: 0.6em;
  color: var(--text-3);
  font-weight: 500;
}

.bar-gauge {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.06);
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0;
  width: calc(var(--ratio, 0) * 100%);
  background: linear-gradient(
    to right,
    var(--accent-rose) 0%,
    var(--accent-amber) 50%,
    var(--accent-cyan) 100%
  );
  transition: width 0.4s var(--ease-out-expo);
}

.bar-value {
  position: absolute;
  top: 50%;
  right: var(--space-3);
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--text-1);
  font-weight: 700;
}

.context-pills {
  display: flex;
  gap: var(--space-2);
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--text-3);
  background: oklch(100% 0 0 / 0.04);
  border: 1px solid var(--border-subtle);
}

.pill.active {
  background: var(--accent-amber);
  color: var(--bg-deep);
  border-color: var(--accent-amber);
  font-weight: 700;
}

.recommend-foot {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

.meta-pill {
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: oklch(100% 0 0 / 0.04);
  border: 1px solid var(--border-subtle);
}

.recommend-secondary {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
}

.sec-title {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}

#recommend-secondary-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.secondary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-radius: 10px;
  background: oklch(100% 0 0 / 0.03);
  border: 1px solid var(--border-subtle);
  font-size: var(--fs-small);
}

.secondary-item .name {
  color: var(--text-1);
  font-weight: 500;
}

.secondary-item .role {
  color: var(--text-3);
  font-size: var(--fs-tiny);
  font-family: var(--font-mono);
}

@media (max-width: 1100px) {
  .matrix-grid {
    grid-template-columns: 1fr;
  }
  .matrix-controls {
    position: static;
  }
}

/* -------- 13. Scenarios -------- */
.scenarios-rail-wrapper {
  position: relative;
  max-width: 100%;
  margin-inline: auto;
}

.scenarios-rail {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: clamp(1rem, 5vw, 4rem);
  padding-block: var(--space-4);
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.scenarios-rail::-webkit-scrollbar {
  display: none;
}

.scenarios-rail::before,
.scenarios-rail::after {
  content: '';
  flex: 0 0 auto;
  width: max(0px, calc((100vw - 1280px) / 2));
}

.scenarios-rail > li,
.scenario-wrap {
  flex: 0 0 380px;
  scroll-snap-align: start;
  list-style: none;
}

.scenario-card {
  width: 100%;
  height: 100%;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-3) var(--space-5);
  min-height: 360px;
}

.scenario-no {
  grid-row: 1 / 4;
  font-family: var(--font-mono);
  font-size: 4rem;
  color: var(--text-3);
  opacity: 0.5;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.scenario-name {
  font-size: var(--fs-h2);
  color: var(--text-1);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.scenario-sub {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}

.scenario-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  grid-column: 2;
}

.scenario-row {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-small);
  color: var(--text-2);
  line-height: 1.5;
}

.scenario-row .icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 12px;
  margin-top: 2px;
  border-radius: 50%;
}

.scenario-row.local .icon {
  background: oklch(78% 0.16 210 / 0.2);
  color: var(--accent-cyan);
}

.scenario-row.cloud .icon {
  background: oklch(82% 0.16 70 / 0.2);
  color: var(--accent-amber);
}

.roi-gauge {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.roi-svg {
  width: 120px;
  height: 70px;
}

.roi-svg .track {
  fill: none;
  stroke: oklch(100% 0 0 / 0.08);
  stroke-width: 10;
  stroke-linecap: round;
}

.roi-svg .fill {
  fill: none;
  stroke: url(#roi-gradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--ease-out-expo);
}

.roi-value {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roi-value .num {
  font-family: var(--font-mono);
  font-size: var(--fs-h1);
  color: var(--accent-amber);
  font-weight: 700;
  line-height: 1;
}

.roi-value .max {
  font-size: var(--fs-tiny);
  color: var(--text-3);
  font-family: var(--font-mono);
}

.roi-label {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
}

.rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--text-1);
  background: oklch(24% 0.04 270 / 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  z-index: 10;
  transition: all 0.2s var(--ease-out-expo);
}

.rail-arrow:hover {
  background: var(--accent-violet);
  color: var(--bg-deep);
  transform: translateY(-50%) scale(1.1);
}

.rail-prev { left: var(--space-3); }
.rail-next { right: var(--space-3); }

@media (max-width: 768px) {
  .scenarios-rail::before,
  .scenarios-rail::after {
    width: 0;
  }
  .scenarios-rail > li,
  .scenario-wrap {
    flex: 0 0 calc(100vw - 4rem);
  }
  .scenario-card {
    min-height: 320px;
  }
  .rail-arrow { display: none; }
}

/* -------- 14. Decide matrix -------- */
.decide-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-10);
  max-width: 1280px;
  margin-inline: auto;
  align-items: start;
}

.decide-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.decide-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-radius: 14px;
  background: oklch(100% 0 0 / 0.03);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  min-height: 64px;
}

.decide-item:hover {
  background: oklch(100% 0 0 / 0.06);
  border-color: var(--border-strong);
}

.decide-item.checked {
  background: oklch(82% 0.16 70 / 0.08);
  border-color: oklch(82% 0.16 70 / 0.4);
}

.decide-item.checked.negative {
  background: oklch(68% 0.20 15 / 0.08);
  border-color: oklch(68% 0.20 15 / 0.4);
}

.decide-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  transition: all 0.2s var(--ease-out-expo);
}

.decide-item.checked .decide-checkbox {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: var(--bg-deep);
}

.decide-item.checked.negative .decide-checkbox {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
}

.decide-checkbox svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

.decide-item.checked .decide-checkbox svg {
  opacity: 1;
}

.decide-label-text {
  font-size: var(--fs-small);
  color: var(--text-2);
  line-height: 1.5;
}

.decide-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 14px;
  color: var(--accent-violet);
  font-family: var(--font-mono);
}

.decide-item.negative .decide-stars {
  color: var(--accent-rose);
}

.decide-result {
  position: sticky;
  top: 96px;
}

.result-card {
  padding: var(--space-8);
  background: oklch(100% 0 0 / 0.04);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.result-label-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

.result-label {
  font-size: clamp(1.75rem, 3vw + 1rem, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  line-height: 1;
  transition: all 0.4s var(--ease-out-expo);
}

.result-label.local {
  background: var(--gradient-amber);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.result-label.hybrid {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.result-label.cloud {
  color: var(--accent-rose);
}

.result-label.pulse {
  animation: pulse-scale 0.6s var(--ease-out-expo);
}

@keyframes pulse-scale {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.result-score {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
}

.result-score .mono {
  font-size: var(--fs-mono-lg);
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: -0.02em;
}

.result-score .score-sep,
.result-score .score-max {
  font-size: var(--fs-h3);
  color: var(--text-3);
}

.result-desc {
  font-size: var(--fs-small);
  color: var(--text-2);
  line-height: 1.6;
}

.donut {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.donut svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: oklch(100% 0 0 / 0.06);
  stroke-width: 14;
}

.donut-segment {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: calc(2 * 3.14159 * 48);
  stroke-dashoffset: calc(2 * 3.14159 * 48 * (1 - var(--length, 0)));
  transform-origin: 60px 60px;
  transform: rotate(calc(var(--offset, 0) * 360deg));
  transition: all 0.5s var(--ease-out-expo);
}

.donut-segment.seg-privacy { stroke: var(--accent-amber); }
.donut-segment.seg-roi { stroke: var(--accent-violet); }
.donut-segment.seg-offline { stroke: var(--accent-cyan); }

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--fs-tiny);
  font-family: var(--font-mono);
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-privacy { background: var(--accent-amber); }
.dot-roi { background: var(--accent-violet); }
.dot-offline { background: var(--accent-cyan); }

@media (max-width: 980px) {
  .decide-grid {
    grid-template-columns: 1fr;
  }
  .decide-result {
    position: static;
  }
}

/* -------- 15. Tiers (3-step pricing) -------- */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
  font-family: var(--font-mono);
  letter-spacing: var(--tracking-wide);
}

.step-indicator .step {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-small);
  color: var(--text-3);
  cursor: pointer;
}

.step-indicator .step::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--border-subtle);
  margin-left: var(--space-3);
}

.step-indicator .step:last-child::after {
  display: none;
}

.step-indicator .step.active {
  color: var(--accent-amber);
}

.step-num {
  font-size: 1.2rem;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1280px;
  margin-inline: auto;
  align-items: stretch;
}

.tier-card {
  position: relative;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  border-radius: 1.5rem;
  border: 1px solid var(--border-subtle);
  background: oklch(100% 0 0 / 0.03);
  transition: all 0.4s var(--ease-out-expo);
}

.tier-card.featured {
  transform: translateY(-12px);
  background: oklch(24% 0.04 270 / 0.5);
  border-color: transparent;
  background-image:
    linear-gradient(oklch(24% 0.04 270 / 0.8), oklch(24% 0.04 270 / 0.8)),
    var(--gradient-aurora);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 2px solid transparent;
  box-shadow: 0 30px 60px oklch(70% 0.20 290 / 0.15);
}

.tier-card:hover {
  transform: translateY(-16px);
}

.tier-card.featured:hover {
  transform: translateY(-20px);
}

.tier-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  background: var(--accent-amber);
  color: var(--bg-deep);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tier-step {
  font-family: var(--font-mono);
  font-size: var(--fs-display);
  color: var(--text-3);
  opacity: 0.5;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tier-label {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
}

.tier-name {
  font-size: var(--fs-h1);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
}

.tier-cost {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-lg);
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: -0.03em;
  line-height: 1;
}

.tier-cost.gradient {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.tier-cost-label {
  font-size: var(--fs-small);
  color: var(--text-3);
  margin-top: var(--space-2);
}

.tier-equipment {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--fs-small);
  color: var(--text-2);
  padding-block: var(--space-3);
  border-block: 1px solid var(--border-subtle);
}

.tier-models {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tier-models .model-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  background: oklch(100% 0 0 / 0.06);
  color: var(--text-2);
  border: 1px solid var(--border-subtle);
}

.tier-tasks {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tier-tasks li {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-small);
  color: var(--text-2);
}

.tier-tasks li::before {
  content: '✓';
  color: var(--accent-cyan);
  flex: 0 0 auto;
}

.tier-breakeven {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  align-self: flex-start;
  padding: var(--space-2) var(--space-3);
  background: oklch(82% 0.16 70 / 0.12);
  border: 1px solid oklch(82% 0.16 70 / 0.3);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--accent-amber);
  letter-spacing: 0.03em;
}

.tier-cta {
  margin-top: auto;
  padding-top: var(--space-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--bg-deep);
  background: var(--gradient-aurora);
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.3s ease;
  position: relative;
  isolation: isolate;
}

.btn:hover {
  color: var(--bg-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px oklch(70% 0.20 290 / 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text-1);
  background: oklch(100% 0 0 / 0.05);
  box-shadow: none;
}

@media (max-width: 980px) {
  .tier-grid {
    grid-template-columns: 1fr;
  }
  .tier-card.featured {
    transform: none;
  }
  .tier-card.featured:hover,
  .tier-card:hover {
    transform: translateY(-4px);
  }
}

/* -------- 16. Limits -------- */
.limits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  max-width: 1280px;
  margin-inline: auto;
}

.limit-col {
  padding: var(--space-8);
  border-radius: 1.5rem;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.col-permanent {
  background: oklch(68% 0.20 15 / 0.05);
  border-color: oklch(68% 0.20 15 / 0.2);
}

.col-closing {
  background: oklch(70% 0.20 290 / 0.05);
  border-color: oklch(70% 0.20 290 / 0.2);
}

.col-hidden {
  background: oklch(82% 0.16 70 / 0.05);
  border-color: oklch(82% 0.16 70 / 0.2);
}

.limit-col header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.limit-col h3 {
  font-size: var(--fs-h3);
  color: var(--text-1);
  font-weight: 600;
}

.limit-badge {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: 700;
}

.col-permanent .limit-badge {
  background: oklch(68% 0.20 15 / 0.2);
  color: var(--accent-rose);
}

.col-closing .limit-badge {
  background: oklch(70% 0.20 290 / 0.2);
  color: var(--accent-violet);
}

.col-hidden .limit-badge {
  background: oklch(82% 0.16 70 / 0.2);
  color: var(--accent-amber);
}

.limit-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.limit-col ul li {
  list-style: none;
  padding-left: var(--space-4);
  position: relative;
  border-left: 2px solid var(--border-subtle);
}

.col-permanent ul li { border-color: oklch(68% 0.20 15 / 0.4); }
.col-closing ul li { border-color: oklch(70% 0.20 290 / 0.4); }
.col-hidden ul li { border-color: oklch(82% 0.16 70 / 0.4); }

.limit-item-title {
  font-size: var(--fs-small);
  color: var(--text-1);
  font-weight: 600;
  margin-bottom: 4px;
}

.limit-item-body {
  font-size: var(--fs-tiny);
  color: var(--text-2);
  line-height: 1.55;
}

.electricity-chart {
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.chart-title {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chart-bar {
  display: grid;
  grid-template-columns: 80px 1fr 70px;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--fs-tiny);
  font-family: var(--font-mono);
}

.chart-bar .name {
  color: var(--text-2);
}

.chart-bar .bar-track {
  height: 12px;
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.06);
  overflow: hidden;
}

.chart-bar .bar-inner {
  height: 100%;
  border-radius: inherit;
  width: var(--w, 0%);
  transition: width 1s var(--ease-out-expo);
}

.chart-bar.color-rose .bar-inner { background: linear-gradient(90deg, var(--accent-amber), var(--accent-rose)); }
.chart-bar.color-amber .bar-inner { background: linear-gradient(90deg, var(--accent-amber), var(--accent-amber)); }
.chart-bar.color-cyan .bar-inner { background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet)); }

.chart-bar .value {
  color: var(--text-1);
  text-align: right;
}

@media (max-width: 960px) {
  .limits-grid {
    grid-template-columns: 1fr;
  }
}

/* -------- 17. This week -------- */
.this-week-grid {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: var(--space-12);
  max-width: 1280px;
  margin-inline: auto;
  align-items: start;
}

.this-week-intro {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.this-week-intro .section-title {
  text-align: left;
}

.this-week-intro .section-sub {
  text-align: left;
  margin-inline: 0;
}

.this-week-progress {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-2);
}

.this-week-progress .mono {
  font-size: var(--fs-h3);
  color: var(--accent-amber);
  font-weight: 700;
}

.this-week-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.action-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.action-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: 1.25rem;
  border: 1px solid var(--border-subtle);
  background: oklch(100% 0 0 / 0.03);
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}

.action-card:hover {
  background: oklch(100% 0 0 / 0.06);
}

.action-card.done {
  background: oklch(82% 0.16 70 / 0.08);
  border-color: oklch(82% 0.16 70 / 0.3);
}

.action-card.done .action-title {
  text-decoration: line-through;
  text-decoration-color: var(--accent-amber);
  color: var(--text-3);
}

.action-check {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  margin-top: 4px;
  transition: all 0.2s var(--ease-out-expo);
}

.action-card.done .action-check {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: var(--bg-deep);
}

.action-check svg {
  width: 18px;
  height: 18px;
  opacity: 0;
  transition: opacity 0.2s;
}

.action-card.done .action-check svg {
  opacity: 1;
}

.action-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.action-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
}

.action-no {
  color: var(--accent-amber);
  font-weight: 700;
}

.action-title {
  font-size: var(--fs-body-lg);
  color: var(--text-1);
  font-weight: 500;
  line-height: 1.5;
}

.action-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-tiny);
  font-family: var(--font-mono);
  color: var(--text-3);
}

.action-meta .duration {
  padding: 3px 8px;
  border-radius: 999px;
  background: oklch(82% 0.16 70 / 0.15);
  color: var(--accent-amber);
}

.action-meta .tool {
  padding: 3px 8px;
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.05);
  border: 1px solid var(--border-subtle);
}

.action-meta .tool a {
  color: var(--accent-cyan);
}

.action-verify {
  font-size: var(--fs-tiny);
  color: var(--text-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-subtle);
}

.action-verify::before {
  content: '검증: ';
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .this-week-grid {
    grid-template-columns: 1fr;
  }
  .this-week-intro {
    position: static;
  }
}

/* -------- 18. Footer -------- */
.site-footer {
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem);
  border-top: 1px solid var(--border-subtle);
  background: oklch(15% 0.02 270);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10);
  max-width: 1280px;
  margin-inline: auto;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.foot-title {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-3);
}

.foot-line {
  font-size: var(--fs-small);
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

.src-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.src-badge.a { background: oklch(78% 0.16 210 / 0.18); color: var(--accent-cyan); }
.src-badge.b { background: oklch(70% 0.20 290 / 0.18); color: var(--accent-violet); }
.src-badge.c { background: oklch(82% 0.16 70 / 0.18); color: var(--accent-amber); }

.source-details {
  margin-top: var(--space-4);
  font-size: var(--fs-small);
}

.source-details summary {
  cursor: pointer;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-block: var(--space-2);
}

.source-details summary:hover {
  color: var(--text-2);
}

.source-details ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.source-details li {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-size: var(--fs-tiny);
}

.source-details a {
  color: var(--text-2);
  flex: 1;
}

.source-details a:hover {
  color: var(--accent-cyan);
}

.tier-badge-tiny {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.tier-a { background: oklch(78% 0.16 210 / 0.18); color: var(--accent-cyan); }
.tier-b { background: oklch(70% 0.20 290 / 0.18); color: var(--accent-violet); }
.tier-c { background: oklch(82% 0.16 70 / 0.18); color: var(--accent-amber); }

.foot-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.foot-links a {
  font-size: var(--fs-small);
  color: var(--text-2);
  transition: color 0.2s;
}

.foot-links a:hover {
  color: var(--accent-cyan);
}

.agents-diagram {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.agent-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: oklch(100% 0 0 / 0.03);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  cursor: help;
  transition: all 0.2s;
}

.agent-node:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  background: oklch(82% 0.16 70 / 0.08);
  transform: translateY(-2px);
}

.agent-node-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-aurora);
}

.agent-arrow {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-bottom {
  max-width: 1280px;
  margin: var(--space-10) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-tiny);
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-align: center;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* -------- 19. Toast -------- */
.toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: var(--space-4) var(--space-6);
  background: oklch(24% 0.04 270 / 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--accent-amber);
  border-radius: 999px;
  color: var(--text-1);
  font-size: var(--fs-small);
  box-shadow: 0 20px 40px oklch(0% 0 0 / 0.4);
  z-index: 200;
  transition: transform 0.4s var(--ease-out-expo);
  max-width: 90vw;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* -------- 20. Reduced motion / utilities -------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

/* -------- 21. file:// 가드 배너 --------
   ESM 모듈이 file:// 오리진에서 CORS 차단되어 페이지가 비는 경우 안내.
   기본 hidden, 인라인 스크립트가 location.protocol === 'file:' 일 때만 해제. */
.file-guard {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(60% 60% at 30% 20%, oklch(70% 0.20 290 / 0.18) 0%, transparent 60%),
    radial-gradient(50% 50% at 80% 80%, oklch(82% 0.16 70 / 0.16) 0%, transparent 65%),
    color-mix(in oklch, var(--bg-deep) 92%, black);
  color: var(--text-1, #f5f5f7);
  overflow: auto;
}
.file-guard[hidden] { display: none; }

.file-guard-inner {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, oklch(22% 0.04 270 / 0.94), oklch(16% 0.03 270 / 0.96));
  border: 1px solid oklch(82% 0.16 70 / 0.35);
  border-radius: 20px;
  box-shadow:
    0 30px 80px -20px oklch(0% 0 0 / 0.5),
    inset 0 1px 0 oklch(100% 0 0 / 0.06);
  backdrop-filter: blur(12px);
}

.file-guard-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 28px;
  background: linear-gradient(135deg, oklch(82% 0.16 70 / 0.18), oklch(70% 0.20 290 / 0.18));
  border: 1px solid oklch(82% 0.16 70 / 0.4);
  color: var(--accent-amber, #f2c641);
  flex-shrink: 0;
}

.file-guard-body {
  display: grid;
  gap: clamp(0.6rem, 1.4vw, 0.9rem);
  min-width: 0;
}

.file-guard-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-amber, #f2c641);
  margin: 0;
}

.file-guard-title {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
  color: var(--text-1, #f5f5f7);
  letter-spacing: -0.01em;
}
.file-guard-title code {
  font-size: 0.95em;
  padding: 0.05em 0.4em;
  border-radius: 6px;
  background: oklch(100% 0 0 / 0.08);
  color: var(--accent-cyan, #7fd0f2);
}

.file-guard-desc {
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  line-height: 1.65;
  color: oklch(82% 0.02 270);
  margin: 0;
  word-break: keep-all;
}
.file-guard-desc code {
  padding: 0.05em 0.4em;
  border-radius: 6px;
  background: oklch(100% 0 0 / 0.08);
  color: var(--accent-cyan, #7fd0f2);
  font-size: 0.92em;
}

.file-guard-code {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: oklch(8% 0.01 270);
  border: 1px solid oklch(100% 0 0 / 0.08);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--accent-amber, #f2c641);
  overflow-x: auto;
  user-select: all;
}
.file-guard-code code {
  color: inherit;
  background: none;
  padding: 0;
}

.file-guard-link {
  color: var(--accent-cyan, #7fd0f2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.file-guard-link:hover,
.file-guard-link:focus-visible {
  color: var(--accent-amber, #f2c641);
}

/* 파일 프로토콜에서는 본문 스크롤 잠금 */
html.is-file-protocol,
html.is-file-protocol body {
  overflow: hidden;
  height: 100%;
}

@media (max-width: 520px) {
  .file-guard-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .file-guard-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
}

/* -------- 22. 의사결정 매트릭스 — 신호 분리 시각화 (M-2) --------
   로컬 신호 / 클라우드 신호를 두 개의 가로 게이지로 나란히 표시.
   기존 도넛(.donut)은 카테고리별 비율 시각화로 유지. */
.result-signals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.6rem, 1.6vw, 1rem);
  margin: var(--space-3) 0 var(--space-2);
}

.signal {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: oklch(100% 0 0 / 0.03);
  border: 1px solid var(--border-subtle, oklch(100% 0 0 / 0.08));
}

.signal-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3, oklch(70% 0.02 270));
}

.signal-value {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
}
.signal-value .mono {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.signal-local .signal-value .mono {
  color: var(--accent-amber, #f2c641);
}
.signal-cloud .signal-value .mono {
  color: var(--accent-violet, #b89eff);
}
.signal-max {
  font-size: 0.78rem;
  color: var(--text-3, oklch(70% 0.02 270));
}

.signal-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.06);
  overflow: hidden;
}
.signal-bar-fill {
  position: absolute;
  inset: 0;
  width: calc(var(--ratio, 0) * 100%);
  border-radius: inherit;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.local-fill {
  background: linear-gradient(90deg, var(--accent-amber, #f2c641), var(--accent-rose, #f08aa8));
}
.cloud-fill {
  background: linear-gradient(90deg, var(--accent-violet, #b89eff), var(--accent-cyan, #7fd0f2));
}

@media (max-width: 520px) {
  .result-signals {
    grid-template-columns: 1fr;
  }
}
