/* ==========================================================================
   Co-FunAI Editorial Light Design System (co-funai.com)
   Warm Alabaster Surface (#FAF9F6) + Crisp White Cards (#FFFFFF)
   Brand Palette: Orange (#e95412) | Plum (#611987) | LINE Emerald (#058f49)
   ========================================================================== */

:root {
  --bg-base: #faf9f6;
  --bg-elevated: #f3f1ec;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-subtle: #e5e7eb;
  --border-strong: #d1d5db;
  --border-accent: rgba(233, 84, 18, 0.42);

  --brand-orange: #e95412;
  --brand-orange-hover: #cf470b;
  --brand-orange-soft: #fff3ed;
  --brand-orange-ink: #b93805;

  --brand-purple: #611987;
  --brand-purple-soft: #f6effb;

  --line-green: #058f49;
  --line-green-hover: #04763c;
  --line-green-soft: #ecfdf3;
  --line-green-border: #a7f3d0;

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;

  --font-sans: "Plus Jakarta Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 28px -12px rgba(17, 24, 39, 0.07);
  --shadow-hover: 0 4px 12px rgba(17, 24, 39, 0.06), 0 18px 36px -14px rgba(17, 24, 39, 0.11);
  --container-max: 1160px;
  --header-h: 72px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-purple));
  z-index: 1200;
  transition: width 0.1s linear;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
  transition: opacity 0.2s ease;
}

.brand-link:hover { opacity: 0.85; }
.brand-logo { height: 28px; width: auto; }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.18s, background 0.18s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.94rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(233, 84, 18, 0.24);
}

.btn-primary:hover {
  background: var(--brand-orange-hover);
  box-shadow: 0 6px 16px rgba(233, 84, 18, 0.28);
}

.btn-line {
  background: var(--line-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 143, 73, 0.22);
}

.btn-line:hover {
  background: var(--line-green-hover);
  color: #ffffff;
}

.btn-fb {
  background: #1877f2;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.22);
}

.btn-fb:hover {
  background: #1466d1;
  color: #ffffff;
}

.btn-fb-soft {
  background: #eef5ff;
  color: #1565d8;
  border-color: #bfdbfe;
}

.btn-fb-soft:hover {
  background: #dbeafe;
  color: #1252b0;
  border-color: #93c5fd;
}

.btn-yt {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.22);
}

.btn-yt:hover {
  background: #b91c1c;
  color: #ffffff;
}

.btn-yt-soft {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.btn-yt-soft:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.yt-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.yt-embed-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-md);
}

.yt-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.yt-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-showcase-info {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.yt-showcase-info h3 {
  margin: 12px 0 12px;
  font-size: 1.24rem;
  line-height: 1.38;
}

.yt-highlights {
  margin: 0 0 18px;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.yt-highlights li + li {
  margin-top: 6px;
}

.btn-ghost {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: #9ca3af;
}

.btn-sm {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.87rem;
  border-radius: 8px;
}

.nav-line-desktop { display: none; }
.nav-fb-desktop { display: none; }
.nav-yt-desktop { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.08);
  padding: 16px 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 6px;
}

.mobile-drawer.open { display: flex; }

.mobile-drawer a:not(.btn) {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mobile-drawer a:not(.btn).active,
.mobile-drawer a:not(.btn):hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Hero Section (Clean Editorial Light + Architectural 3D Wireframe) */
.hero {
  position: relative;
  min-height: 580px;
  padding: 68px 0 64px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #ffffff;
  background-image:
    linear-gradient(to right, rgba(17, 24, 39, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 24, 39, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  border-bottom: 1px solid var(--border-subtle);
}

#hero-canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--brand-orange-soft);
  border: 1px solid rgba(233, 84, 18, 0.25);
  color: var(--brand-orange-ink);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-orange);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--text-primary);
}

.text-gradient {
  color: var(--brand-orange);
  background: linear-gradient(transparent 72%, rgba(233, 84, 18, 0.14) 72%);
  padding: 0 4px;
}

.hero-lead {
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 58ch;
  margin: 0 0 28px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 540px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.03);
}

.stat-num {
  display: block;
  font-size: clamp(0.95rem, 3.6vw, 1.22rem);
  white-space: nowrap;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.79rem;
  color: var(--text-muted);
}

.hero-side-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--brand-orange);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.hero-side-card h2 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.kw-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--brand-purple-soft);
  border: 1px solid rgba(97, 25, 135, 0.16);
  color: var(--brand-purple);
}

/* Sections */
.section {
  padding: 68px 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.section-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  margin: 8px 0 0;
  max-width: 62ch;
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  margin: -24px -24px 18px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-base);
}

.card-cover img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.card:hover .card-cover img {
  transform: scale(1.02);
}

.article-cover {
  margin: 0 0 26px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-base);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

/* Series 上/下篇 Navigation Cards */
.series-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--brand-purple-soft);
  border: 1px solid rgba(97, 25, 135, 0.2);
  font-size: 0.9rem;
}

.series-bar a {
  font-weight: 700;
  color: var(--brand-purple);
}

.series-jump-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 2.2rem;
}

@media (min-width: 640px) {
  .series-jump-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.series-jump-card {
  display: block;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-base);
  text-decoration: none !important;
  transition: border-color 0.18s, transform 0.18s;
}

.series-jump-card:hover {
  border-color: var(--brand-orange);
  transform: translateY(-2px);
}

.series-jump-card.next {
  background: var(--brand-orange-soft);
  border-color: rgba(233, 84, 18, 0.35);
}

.series-jump-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-orange-ink);
  margin-bottom: 4px;
}

.series-jump-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--brand-orange-soft);
  color: var(--brand-orange-ink);
  border: 1px solid rgba(233, 84, 18, 0.22);
}

.badge-purple {
  background: var(--brand-purple-soft);
  color: var(--brand-purple);
  border-color: rgba(97, 25, 135, 0.2);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  line-height: 1.42;
  color: var(--text-primary);
}

.card h3 a:hover { color: var(--brand-orange); }

.card p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-orange);
}

/* Interactive VRAM Recommender, ROI & Brief Tools */
.recommender-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.rec-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.rec-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.16s ease;
}

.pill-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: #ffffff;
}

.pill-btn.active {
  background: var(--brand-orange-soft);
  border-color: var(--brand-orange);
  color: var(--brand-orange-ink);
}

.rec-result {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
}

.rec-cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #18181b;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #fde68a;
  margin: 14px 0;
  overflow-x: auto;
}

.rec-cmd .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tool-strip {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

/* LINE Conversion Banner */
.line-banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  background: var(--line-green-soft);
  border: 1px solid var(--line-green-border);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.line-banner h2,
.line-banner h3 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  color: var(--text-primary);
}

/* Article Layout */
.article-hero {
  padding: 46px 0 32px;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumbs a:hover { color: var(--brand-orange); }

.article-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  line-height: 1.28;
  color: var(--text-primary);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: 40px 0 72px;
}

.article-content {
  min-width: 0;
  max-width: 74ch;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.article-content h2 {
  margin: 2.2rem 0 0.9rem;
  font-size: 1.45rem;
  line-height: 1.32;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  scroll-margin-top: 90px;
}

.article-content h3 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.15rem;
  color: var(--brand-purple);
  scroll-margin-top: 90px;
}

.article-content p { margin: 0 0 1.1rem; color: var(--text-secondary); }
.article-content ul,
.article-content ol { margin: 0 0 1.3rem; padding-left: 1.4rem; color: var(--text-secondary); }
.article-content li { margin-bottom: 0.5rem; }
.article-content a:not(.btn) { color: var(--brand-orange); text-decoration: underline; text-underline-offset: 3px; }

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--brand-purple);
}

.code-block-wrap {
  position: relative;
  margin: 1.2rem 0 1.5rem;
}

.article-content pre {
  margin: 0;
  background: #18181b;
  border-radius: 12px;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: #f4f4f5;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(39, 39, 42, 0.9);
  color: #e4e4e7;
  font-size: 0.76rem;
  font-weight: 600;
}

.copy-btn:hover { color: #ffffff; border-color: var(--brand-orange); }

.table-wrap {
  overflow-x: auto;
  margin: 1.3rem 0 1.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 520px;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.table-wrap th {
  background: #f9fafb;
  color: var(--text-primary);
  font-weight: 700;
}

.table-wrap td { color: var(--text-secondary); }
.table-wrap tr:last-child td { border-bottom: none; }

.callout {
  padding: 18px 20px;
  border-radius: 12px;
  margin: 1.4rem 0;
  border-left: 4px solid var(--brand-orange);
  background: var(--brand-orange-soft);
  color: var(--text-secondary);
}

.callout-tip {
  border-left-color: var(--line-green);
  background: var(--line-green-soft);
}

.sidebar-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.toc-list li { margin-bottom: 6px; }
.toc-list a {
  display: block;
  font-size: 0.89rem;
  color: var(--text-muted);
  padding: 4px 8px;
  border-left: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--text-primary);
  border-left-color: var(--brand-orange);
  font-weight: 600;
}

/* Search, Sort & Pagination */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1 1 360px;
  justify-content: flex-end;
}

.sort-select {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--brand-orange);
}

.search-input {
  width: 100%;
  max-width: 300px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--brand-orange);
}

.articles-status {
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.page-btn:hover:not(:disabled):not(.disabled) {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.page-btn.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

.page-btn:disabled,
.page-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.related-section {
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border-subtle);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (min-width: 720px) {
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.related-mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.related-mini-card:hover {
  border-color: var(--brand-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.related-mini-card h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.related-mini-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-base);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 15px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--text-secondary);
}

/* Interactive ROI & LINE Diagnostic Builder */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.range-row { margin-bottom: 16px; }

.range-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.range-head strong {
  color: var(--brand-orange);
  font-family: var(--font-mono);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand-orange);
  cursor: pointer;
}

.roi-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.roi-metric-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
}

.roi-val {
  display: block;
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--line-green);
}

.diag-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.diag-preview {
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line-green-border);
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 12px;
}

.view-count-pill {
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  padding: 48px 0 32px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.footer-links li { margin-bottom: 8px; }
.footer-links a:hover { color: var(--brand-orange); }

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

/* Mobile Sticky LINE Bar */
.mobile-line-bar {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line-green-border);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
  backdrop-filter: blur(12px);
}

.mobile-line-bar.hidden { display: none; }

.mobile-line-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  min-width: 32px;
  min-height: 32px;
}

/* Responsive Breakpoints */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line-banner { grid-template-columns: 1.5fr auto; padding: 38px 42px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .mobile-line-bar { display: none !important; }
  .article-content { padding: 38px 42px; }
}

@media (min-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .yt-showcase-grid { grid-template-columns: 1.45fr 1fr; gap: 28px; }
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-line-desktop { display: inline-flex; }
  .nav-fb-desktop { display: inline-flex; }
  .menu-toggle { display: none; }
  .hero-grid { grid-template-columns: 1.25fr 0.85fr; gap: 48px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr) 310px; align-items: start; }
  .article-sidebar { position: sticky; top: 94px; }
}

@media (min-width: 1180px) {
  .nav-yt-desktop { display: inline-flex; }
}

/* Commercial Skill Demo Showcase */
.skill-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.skill-tab-btn {
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.skill-tab-btn:hover {
  border-color: var(--brand-orange);
}

.skill-tab-btn.active {
  border-color: var(--brand-orange);
  background: #fff7ed;
  box-shadow: 0 6px 18px rgba(233, 84, 18, 0.08);
}

.skill-tab-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-orange);
  margin-bottom: 4px;
}

.skill-tab-title {
  display: block;
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--text-primary);
}

.skill-panel {
  display: none;
}

.skill-panel.active {
  display: block;
}

.demo-workspace {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.preset-chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.preset-chip:hover,
.preset-chip.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.demo-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 12px 0 6px;
}

.demo-input,
.demo-textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.55;
}

.demo-input:focus,
.demo-textarea:focus {
  outline: none;
  border-color: var(--brand-orange);
}

.demo-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.disclaimer-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 18px;
  color: #78350f;
  font-size: 0.92rem;
  line-height: 1.65;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 22px;
}

.compare-card {
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-base);
}

.compare-card.bad {
  border-color: #fecaca;
  background: #fef2f2;
}

.compare-card.good {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.compare-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.compare-output {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.94rem;
  line-height: 1.72;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.param-box {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
}

@media (min-width: 768px) {
  .skill-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-workspace { padding: 28px 30px; }
  .demo-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .brand-link { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
