/* ==========================================================================
   EmotionShield Terms of Service - Design System Synchronized with Privacy & B2C Main
   Based on https://xchunsk.synology.me/EmotionShield/?view=analysis
   Brand Tokens: Deep Midnight Teal (#0B1B22), Brand Teal (#1A7B88),
   Accent Aqua (#38A3A5), Warm Peach Coral (#DE866D), Mint (#63D4C5)
   ========================================================================== */

:root {
  /* Core Brand Colors (Dark Theme as Primary Standard) */
  --bg-primary: #0B1B22;
  --bg-secondary: #08151B;
  --bg-surface: #0F2530;
  --bg-surface-elevated: #133342;
  --bg-header: rgba(11, 27, 34, 0.92);
  
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-ink: #061015;

  --border-subtle: rgba(26, 123, 136, 0.25);
  --border-medium: rgba(56, 163, 165, 0.45);
  --border-focus: #38A3A5;

  /* Brand Palette */
  --brand-deep: #174557;
  --brand-teal: #1A7B88;
  --accent-aqua: #38A3A5;
  --accent-mint: #63D4C5;
  --accent-mint-light: rgba(99, 212, 197, 0.15);
  --accent-coral: #DE866D;
  --accent-coral-light: rgba(222, 134, 109, 0.15);
  --accent-amber: #F4BA5B;
  --accent-red: #EF7F79;

  /* Callout Theme Colors */
  --callout-important-border: #38A3A5;
  --callout-important-bg: rgba(26, 123, 136, 0.14);
  --callout-tip-border: #DE866D;
  --callout-tip-bg: rgba(222, 134, 109, 0.12);
  --callout-note-border: #63D4C5;
  --callout-note-bg: rgba(99, 212, 197, 0.12);
  --callout-warning-border: #F4BA5B;
  --callout-warning-bg: rgba(244, 186, 91, 0.12);
  --callout-caution-border: #EF7F79;
  --callout-caution-bg: rgba(239, 127, 121, 0.12);

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 20px -3px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.6);

  /* Dimensions */
  --header-height: 70px;
  --max-width: 1240px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides (Optional user toggle, keeping Dark as default identity) */
[data-theme="light"] {
  --bg-primary: #F4F8F8;
  --bg-secondary: #E6EFF0;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #ECF5F5;
  --bg-header: rgba(255, 255, 255, 0.92);

  --text-primary: #0F2530;
  --text-secondary: #334E58;
  --text-muted: #5C7B85;

  --border-subtle: #D1E4E6;
  --border-medium: #A4CFD3;
  --border-focus: #1A7B88;

  --callout-important-border: #1A7B88;
  --callout-important-bg: #EAF6F7;
  --callout-tip-border: #C86950;
  --callout-tip-bg: #FDF3F0;
  --callout-note-border: #0D9488;
  --callout-note-bg: #F0FDFB;
  --callout-warning-border: #D97706;
  --callout-warning-bg: #FFFBEB;
  --callout-caution-border: #DC2626;
  --callout-caution-bg: #FEF2F2;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 40px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ==========================================================================
   Silver Platinum Metallic Typography (B2C Main & B2B Identical)
   ========================================================================== */
.text-metallic-silver {
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 30%, #94A3B8 65%, #F8FAFC 90%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

/* Light Mode: High Contrast Dark Teal Charcoal (B2C Main ?view=analysis /html/body/header/div/div[1]/div/a Identical) */
[data-theme="light"] .text-metallic-silver,
html[data-theme="light"] .text-metallic-silver,
[data-theme="light"] .brand-title,
[data-theme="light"] .brand-title-row a,
[data-theme="light"] header .brand-area .brand-title {
  background: linear-gradient(135deg, #0F2530 0%, #174557 40%, #1A7B88 75%, #0F2530 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 1px 1px rgba(15, 37, 48, 0.15)) !important;
}

/* Light Mode: Base Canvas & Color Scheme Lock */
html[data-theme="light"],
[data-theme="light"] body {
  background-color: #F4F8F8 !important;
  color: #0F2530 !important;
  color-scheme: light !important;
}

/* Light Mode: Header & Navigation (/html/body/header, /html/body/header/div) */
[data-theme="light"] .site-header,
html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #D1E4E6 !important;
  box-shadow: 0 2px 10px rgba(15, 37, 48, 0.05) !important;
}

[data-theme="light"] .header-container,
html[data-theme="light"] .header-container {
  background: transparent !important;
}

/* Light Mode: Hero Section Background Gradient */
[data-theme="light"] .hero-section,
html[data-theme="light"] .hero-section {
  background: radial-gradient(circle at 50% 10%, rgba(26, 123, 136, 0.12) 0%, rgba(244, 248, 248, 0.95) 60%),
              linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%) !important;
}

/* Light Mode: Hero 3 Core Stat Cards (/html/body/section/div[3]/div[3]/div[1~3]) */
[data-theme="light"] .pillar-card,
html[data-theme="light"] .pillar-card {
  background: #FFFFFF !important;
  border: 1px solid #D1E4E6 !important;
  box-shadow: 0 4px 16px rgba(15, 37, 48, 0.06) !important;
}

[data-theme="light"] .pillar-card:hover,
html[data-theme="light"] .pillar-card:hover {
  background: #FFFFFF !important;
  border-color: #38A3A5 !important;
  box-shadow: 0 8px 24px rgba(15, 37, 48, 0.12) !important;
  transform: translateY(-2px);
}

[data-theme="light"] .pillar-card h3,
html[data-theme="light"] .pillar-card h3 {
  color: #0F2530 !important;
}

[data-theme="light"] .pillar-card p,
html[data-theme="light"] .pillar-card p {
  color: #334E58 !important;
}

/* Light Mode: Pillar Card Icons */
[data-theme="light"] .pillar-icon-box.icon-emerald,
html[data-theme="light"] .pillar-icon-box.icon-emerald {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #059669 !important;
}

[data-theme="light"] .pillar-icon-box.icon-teal,
html[data-theme="light"] .pillar-icon-box.icon-teal {
  background: rgba(26, 123, 136, 0.15) !important;
  color: #0D9488 !important;
}

[data-theme="light"] .pillar-icon-box.icon-amber,
html[data-theme="light"] .pillar-icon-box.icon-amber {
  background: rgba(244, 186, 91, 0.2) !important;
  color: #D97706 !important;
}

/* Light Mode: Pillar Card Metric Tags */
[data-theme="light"] .pillar-metric-tag.tag-emerald,
html[data-theme="light"] .pillar-metric-tag.tag-emerald {
  background: #ECFDF5 !important;
  color: #059669 !important;
  border-color: #A7F3D0 !important;
}

[data-theme="light"] .pillar-metric-tag.tag-teal,
html[data-theme="light"] .pillar-metric-tag.tag-teal,
[data-theme="light"] .tag-teal,
html[data-theme="light"] .tag-teal {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border-color: #8CC3C8 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .pillar-metric-tag.tag-amber,
html[data-theme="light"] .pillar-metric-tag.tag-amber {
  background: #FFFBEB !important;
  color: #D97706 !important;
  border-color: #FDE68A !important;
}

/* Light Mode: High-Contrast Tags & Badges (WCAG AAA >= 7:1) */
[data-theme="light"] .meta-tag,
html[data-theme="light"] .meta-tag {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border-color: #8CC3C8 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(15, 37, 48, 0.06) !important;
}
[data-theme="light"] .meta-tag i,
html[data-theme="light"] .meta-tag i {
  color: #0D7A84 !important;
}

[data-theme="light"] .section-tag,
html[data-theme="light"] .section-tag {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border-color: #8CC3C8 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .ver-badge,
html[data-theme="light"] .ver-badge {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border-color: #8CC3C8 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .tech-pill,
html[data-theme="light"] .tech-pill {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border-color: #8CC3C8 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .status-info,
html[data-theme="light"] .status-info {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border-color: #8CC3C8 !important;
  font-weight: 700 !important;
}
[data-theme="light"] .status-info i,
html[data-theme="light"] .status-info i {
  color: #0D7A84 !important;
}

[data-theme="light"] .hl-mark,
html[data-theme="light"] .hl-mark {
  background: #E8F4F5 !important;
  color: #083B42 !important;
  border: 1px solid #8CC3C8 !important;
}

/* Light Mode: Callout Cards (No Left Bar, Clean 4-Side Borders) */
[data-theme="light"] .callout,
html[data-theme="light"] .callout {
  border-left: none !important;
  box-shadow: 0 1px 4px rgba(15, 37, 48, 0.04) !important;
}

[data-theme="light"] .callout-warning,
html[data-theme="light"] .callout-warning {
  background: #FFFBEB !important;
  border: 1px solid #FCD34D !important;
}
[data-theme="light"] .callout-warning .callout-title,
html[data-theme="light"] .callout-warning .callout-title {
  color: #B45309 !important;
}
[data-theme="light"] .callout-warning .callout-title i,
html[data-theme="light"] .callout-warning .callout-title i {
  background: #FEF3C7 !important;
  color: #D97706 !important;
}

[data-theme="light"] .callout-caution,
html[data-theme="light"] .callout-caution {
  background: #FEF2F2 !important;
  border: 1px solid #FCA5A5 !important;
}
[data-theme="light"] .callout-caution .callout-title,
html[data-theme="light"] .callout-caution .callout-title {
  color: #B91C1C !important;
}
[data-theme="light"] .callout-caution .callout-title i,
html[data-theme="light"] .callout-caution .callout-title i {
  background: #FEE2E2 !important;
  color: #DC2626 !important;
}

[data-theme="light"] .callout-important,
html[data-theme="light"] .callout-important {
  background: #F0FDFA !important;
  border: 1px solid #99F6E4 !important;
}
[data-theme="light"] .callout-important .callout-title,
html[data-theme="light"] .callout-important .callout-title {
  color: #0F766E !important;
}
[data-theme="light"] .callout-important .callout-title i,
html[data-theme="light"] .callout-important .callout-title i {
  background: #CCFBF1 !important;
  color: #0D9488 !important;
}

[data-theme="light"] .callout-note,
html[data-theme="light"] .callout-note {
  background: #F0FDF4 !important;
  border: 1px solid #BBF7D0 !important;
}
[data-theme="light"] .callout-note .callout-title,
html[data-theme="light"] .callout-note .callout-title {
  color: #15803D !important;
}
[data-theme="light"] .callout-note .callout-title i,
html[data-theme="light"] .callout-note .callout-title i {
  background: #DCFCE7 !important;
  color: #16A34A !important;
}

[data-theme="light"] .callout-tip,
html[data-theme="light"] .callout-tip {
  background: #FDF2F0 !important;
  border: 1px solid #FECDD3 !important;
}
[data-theme="light"] .callout-tip .callout-title,
html[data-theme="light"] .callout-tip .callout-title {
  color: #BE123C !important;
}
[data-theme="light"] .callout-tip .callout-title i,
html[data-theme="light"] .callout-tip .callout-title i {
  background: #FFE4E6 !important;
  color: #E11D48 !important;
}

[data-theme="light"] .callout-quote,
html[data-theme="light"] .callout-quote {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}
[data-theme="light"] .callout-quote .callout-title,
html[data-theme="light"] .callout-quote .callout-title {
  color: #334155 !important;
}
[data-theme="light"] .callout-quote .callout-title i,
html[data-theme="light"] .callout-quote .callout-title i {
  background: #E2E8F0 !important;
  color: #475569 !important;
}

/* ==========================================================================
   Top Compliance Banner (B2C, B2B & Privacy Synchronized)
   ========================================================================== */
.top-compliance-banner {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.compliance-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  word-break: keep-all;
}

.compliance-banner-inner i {
  color: var(--accent-aqua);
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.compliance-banner-inner strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo-link {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.brand-logo-link:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 14px rgba(56, 163, 165, 0.5));
}

.brand-logo-link:active {
  transform: scale(0.96);
}

/* Diagonal Slash Shine Sweep Overlay */
.brand-logo-link::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -130%;
  width: 65%;
  height: 220%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(56, 163, 165, 0.6) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: slashShineSweep 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: 2;
}

.brand-logo-link:hover::after {
  animation: slashShineFast 0.6s ease-out forwards;
}

@keyframes slashShineSweep {
  0%, 70% {
    left: -130%;
  }
  85%, 100% {
    left: 150%;
  }
}

@keyframes slashShineFast {
  0% {
    left: -130%;
  }
  100% {
    left: 150%;
  }
}

/* Brand Emblem Splash Pulse Animation */
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  will-change: transform;
  transform: translateZ(0);
  animation: splashLogoPulse 2.8s ease-in-out infinite;
}

@keyframes splashLogoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo-img,
  .brand-logo-link::after {
    animation: none !important;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(26, 123, 136, 0.35);
  border: 1px solid rgba(56, 163, 165, 0.55);
  color: #7ce7db;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Nav Capsule Button (B2C & B2B Match) */
.nav-capsule-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-capsule-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.nav-capsule-btn.primary {
  background: linear-gradient(135deg, #1A7B88, #146570);
  border-color: var(--accent-aqua);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(26, 123, 136, 0.35);
}

.nav-capsule-btn.primary:hover {
  background: linear-gradient(135deg, #1F8F9E, #1A7B88);
}

.nav-capsule-btn.coral {
  color: var(--accent-coral);
  border-color: rgba(222, 134, 109, 0.4);
}

.nav-capsule-btn.coral:hover {
  background: var(--accent-coral-light);
  color: #FFF;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 190px;
  padding: 6px 28px 6px 30px;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  width: 250px;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 163, 165, 0.2);
}

.search-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.clear-btn {
  position: absolute;
  right: 9px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

/* ==========================================================================
   Live Search Dropdown & Highlight Styles
   ========================================================================== */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: min(400px, calc(100vw - 24px));
  max-height: 420px;
  background: var(--bg-surface, #151922);
  border: 1px solid var(--border-medium, rgba(56, 163, 165, 0.4));
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: searchDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-dropdown-header strong {
  color: var(--accent-aqua, #38a3a5);
}

.search-dropdown-hint {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  max-height: 350px;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.18s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(56, 163, 165, 0.15);
}

.search-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.search-item-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 163, 165, 0.2);
  color: var(--accent-aqua, #38a3a5);
  border: 1px solid rgba(56, 163, 165, 0.35);
  white-space: nowrap;
}

.search-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-item-snippet {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item-snippet mark {
  background: rgba(56, 163, 165, 0.35);
  color: var(--accent-aqua, #5edcd3);
  font-weight: 700;
  border-radius: 2px;
  padding: 0 2px;
}

.search-no-results {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-no-results i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* 본문 내 하이라이트 */
mark.search-highlight {
  background: rgba(56, 163, 165, 0.32);
  color: #38f0d8;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 3px;
  box-shadow: 0 0 6px rgba(56, 163, 165, 0.4);
  transition: all 0.25s ease;
}

[data-theme="light"] mark.search-highlight {
  background: rgba(13, 148, 136, 0.25);
  color: #0f766e;
  box-shadow: 0 0 4px rgba(13, 148, 136, 0.3);
}

/* 목표 조항 및 단어 스포트라이트 집중 발광 효과 */
mark.search-highlight-focused {
  background: rgba(244, 186, 91, 0.85) !important;
  color: #0d131a !important;
  font-weight: 800 !important;
  box-shadow: 0 0 16px rgba(244, 186, 91, 0.95), 0 0 0 2px rgba(244, 186, 91, 0.5) !important;
  animation: highlightSpotlight 2.5s ease-out;
}

@keyframes highlightSpotlight {
  0% {
    transform: scale(1.18);
    box-shadow: 0 0 24px rgba(244, 186, 91, 1), 0 0 0 4px rgba(244, 186, 91, 0.8);
  }
  30% {
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(244, 186, 91, 0.9);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(244, 186, 91, 0.5);
  }
}

/* 타겟 섹션 하이라이트 애니메이션 */
.section-target-highlight {
  animation: sectionPulseHighlight 2.5s ease-out;
}

@keyframes sectionPulseHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 163, 165, 0.8);
    background-color: rgba(56, 163, 165, 0.12);
  }
  20% {
    box-shadow: 0 0 0 4px rgba(56, 163, 165, 0.5);
    background-color: rgba(56, 163, 165, 0.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 163, 165, 0);
    background-color: transparent;
  }
}

@media (max-width: 768px) {
  .search-results-dropdown {
    position: fixed;
    top: calc(var(--header-height, 52px) + 6px);
    left: 8px;
    right: 8px;
    width: auto;
    max-width: calc(100vw - 16px);
    max-height: 60vh;
  }
}


.theme-toggle-btn {
  padding: 6px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  color: var(--accent-aqua);
  border-color: var(--border-medium);
}

/* ==========================================================================
   Hero Section (EmotionShield Security Gate & Analysis Style)
   ========================================================================== */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 50% 10%, rgba(26, 123, 136, 0.25) 0%, rgba(11, 27, 34, 0.8) 60%),
              linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 48px 20px 42px;
  text-align: center;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: rgba(26, 123, 136, 0.18);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: rgba(222, 134, 109, 0.12);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Center Emblem Box (Exact Match to B2C Security Gate) */
.hero-emblem-box {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: rgba(23, 69, 87, 0.85);
  border: 2px solid rgba(26, 123, 136, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  position: relative;
}

.hero-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-emblem-lock {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F59E0B;
  border: 2px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #061015;
  font-size: 10px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.78rem;
}

.meta-tag {
  background: rgba(6, 22, 29, 0.9);
  color: #E6FFFA;
  font-weight: 800;
  padding: 4px 13px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 163, 165, 0.55);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  letter-spacing: -0.01em;
}

.meta-tag i {
  color: #5EDCD3;
  margin-right: 5px;
}

.meta-ver {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.meta-date {
  color: var(--text-muted);
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* 3 Core Zero-Knowledge Stat Cards (100% Match to B2C Security Gate) */
.hero-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
  margin-top: 10px;
}

.pillar-card {
  padding: 18px 20px;
  background: rgba(15, 37, 48, 0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.pillar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pillar-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.icon-teal { background: rgba(56, 163, 165, 0.15); color: #38A3A5; }
.icon-amber { background: rgba(244, 186, 91, 0.15); color: #F4BA5B; }

.pillar-metric-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.tag-emerald { background: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.4); }
.tag-teal { background: rgba(6, 22, 29, 0.9); color: #E6FFFA; border: 1px solid rgba(56, 163, 165, 0.55); font-weight: 800; }
.tag-amber { background: rgba(244, 186, 91, 0.2); color: #F4BA5B; border: 1px solid rgba(244, 186, 91, 0.4); }

.pillar-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pillar-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Main Layout (Sidebar + Article)
   ========================================================================== */
.main-layout {
  flex: 1;
  padding: 36px 20px 80px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 36px;
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Sticky Sidebar Table of Contents */
.sidebar-wrapper {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sidebar-inner {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  transition: var(--transition);
}

.sidebar-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-chevron {
  display: none;
  font-size: 0.75rem;
  color: var(--accent-aqua);
  transition: transform 0.25s ease;
}

.toc-badge-sub {
  display: none;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-title i {
  color: var(--accent-aqua);
}

.sidebar-indicator {
  font-size: 0.72rem;
  color: var(--accent-mint);
  font-weight: 700;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.toc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-aqua);
  width: 24px;
}

.toc-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-link:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.toc-link.active {
  background: rgba(26, 123, 136, 0.3);
  color: #7CE6DF;
  font-weight: 700;
  border: 1px solid rgba(56, 163, 165, 0.4);
}

/* Sidebar Quick Link Card */
.sidebar-contact-card {
  margin-top: 18px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.contact-header i {
  color: var(--accent-coral);
}

.sidebar-contact-card p {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.sidebar-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-aqua);
  transition: var(--transition);
}

.sidebar-contact-btn:hover {
  color: var(--accent-mint);
  text-decoration: underline;
}

/* ==========================================================================
   Policy Article & Sections
   ========================================================================== */
.policy-article {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.policy-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.policy-section:hover {
  border-color: var(--border-medium);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(6, 22, 29, 0.92);
  color: #E6FFFA;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 163, 165, 0.5);
  letter-spacing: 0.02em;
}

.section-title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.anchor-copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: var(--transition);
}

.anchor-copy-btn i {
  font-size: 1rem;
}

.section-header:hover .anchor-copy-btn {
  opacity: 1;
}

.anchor-copy-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--accent-aqua);
}

.lead-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Tags & Code Badges */
.tech-pill {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(6, 22, 29, 0.88);
  border: 1px solid rgba(56, 163, 165, 0.5);
  color: #E6FFFA;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 700;
}

.code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-aqua);
  font-weight: 700;
}

.hl-mark {
  background: rgba(6, 22, 29, 0.9);
  color: #E6FFFA;
  border: 1px solid rgba(56, 163, 165, 0.45);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* ==========================================================================
   Compliance Notice Cards (Modern Enterprise Style - No Left-Bar)
   ========================================================================== */
.callout {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 18px 0;
  border: 1px solid var(--border-subtle);
  border-left: none;
  font-size: 0.9rem;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.callout-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.callout-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.callout-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
}

.callout-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  color: var(--accent-aqua);
}

.callout-important {
  background: rgba(56, 163, 165, 0.1);
  border: 1px solid rgba(56, 163, 165, 0.35);
}
.callout-important .callout-title {
  color: var(--accent-aqua);
}
.callout-important .callout-title i {
  background: rgba(56, 163, 165, 0.2);
  color: var(--accent-aqua);
}

.callout-tip {
  background: rgba(224, 122, 95, 0.08);
  border: 1px solid rgba(224, 122, 95, 0.35);
}
.callout-tip .callout-title {
  color: var(--accent-coral);
}
.callout-tip .callout-title i {
  background: rgba(224, 122, 95, 0.2);
  color: var(--accent-coral);
}

.callout-note {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.callout-note .callout-title {
  color: #34D399;
}
.callout-note .callout-title i {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.callout-warning .callout-title {
  color: #FBBF24;
}
.callout-warning .callout-title i {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
}

.callout-caution {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.callout-caution .callout-title {
  color: #F87171;
}
.callout-caution .callout-title i {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.callout-quote {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}
.callout-quote .callout-title {
  color: var(--text-primary);
}
.callout-quote .callout-title i {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
}

/* ==========================================================================
   Visual Flow Diagram (Gemini 5W1H & No-Training)
   ========================================================================== */
.api-flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

.flow-step {
  flex: 1;
  text-align: center;
  padding: 12px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.flow-step.highlight {
  border-color: var(--accent-aqua);
  background: rgba(26, 123, 136, 0.25);
}

.step-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-surface-elevated);
  color: var(--accent-mint);
  margin-bottom: 6px;
}

.flow-step strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.flow-step p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.flow-arrow {
  color: var(--accent-aqua);
  font-size: 1.1rem;
  font-weight: bold;
}

/* ==========================================================================
   Table Styles (B2B HR Notification & System Log Matrix)
   ========================================================================== */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.policy-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  font-weight: 800;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.policy-table td {
  padding: 14px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.policy-table tr:last-child td {
  border-bottom: none;
}

.table-item-primary {
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: nowrap;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.2px;
  transition: var(--transition);
}

.badge-status i {
  font-size: 0.85em;
}

.badge-status.badge-multiline {
  white-space: normal;
  line-height: 1.4;
  text-align: left;
  display: inline-block;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.status-danger {
  background: rgba(239, 127, 121, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 127, 121, 0.3);
}

.status-info {
  background: rgba(6, 22, 29, 0.9);
  color: #E6FFFA;
  border: 1px solid rgba(56, 163, 165, 0.55);
  font-weight: 700;
}

.status-info i {
  color: #5EDCD3;
}

.status-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* 시스템 로그 & 감사 기준표 특화 레이아웃 */
.policy-table {
  min-width: 620px;
}

#section-log-policy .policy-table th:nth-child(1),
#section-log-policy .policy-table td:nth-child(1) {
  width: 210px;
  white-space: nowrap;
}

#section-log-policy .policy-table th:nth-child(2),
#section-log-policy .policy-table td:nth-child(2) {
  width: 230px;
  text-align: center;
  white-space: nowrap;
}

#section-log-policy .policy-table th:nth-child(3),
#section-log-policy .policy-table td:nth-child(3) {
  min-width: 220px;
}

#section-log-policy .policy-table th:nth-child(4),
#section-log-policy .policy-table td:nth-child(4) {
  min-width: 190px;
}

#section-log-policy .policy-table tbody tr:hover {
  background: var(--bg-surface-elevated);
}

/* ==========================================================================
   Clauses & Contact Cards
   ========================================================================== */
.article-clause {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.clause-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-aqua);
}

.clause-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.clause-content > strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.clause-content p strong {
  display: inline;
  font-size: inherit;
  color: var(--text-primary);
  font-weight: 700;
}

.clause-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.clause-content p + p {
  margin-top: 10px;
}

/* Contact Grid */
.contact-box-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.contact-box {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.contact-box.highlight-box {
  background: rgba(26, 123, 136, 0.25);
  border-color: rgba(56, 163, 165, 0.5);
}

.contact-box-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--accent-aqua);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-box-detail {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.detail-val {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
}

.detail-link {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--accent-mint);
  text-decoration: underline;
}

.ver-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(6, 22, 29, 0.9);
  color: #E6FFFA;
  border: 1px solid rgba(56, 163, 165, 0.5);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 44px 20px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-logo span {
  font-size: 1.15rem;
  font-weight: 900;
}

.footer-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--accent-aqua);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #174F54;
  color: #EFFFD;
  border: 1px solid #68C6C0;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .brand-sub {
    display: none;
  }
  .nav-capsule-btn {
    padding: 5px 9px;
    font-size: 0.73rem;
    gap: 5px;
  }
  .search-box input {
    width: 150px;
  }
  .search-box input:focus {
    width: 190px;
  }
}

/* Table Scroll Hint for Mobile */
.table-scroll-hint {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-aqua);
  padding: 6px 12px;
  background: rgba(26, 123, 136, 0.12);
  border: 1px dashed rgba(56, 163, 165, 0.35);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.table-scroll-hint i {
  color: var(--accent-mint);
  animation: pulseX 1.5s infinite ease-in-out;
}

@keyframes pulseX {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* Floating Back to Top Quick Button */
.back-to-top-btn {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  z-index: 99;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1A7B88, #146570);
  color: #FFFFFF;
  border: 1px solid rgba(124, 231, 219, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  touch-action: manipulation;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: linear-gradient(135deg, #1F8F9E, #1A7B88);
  transform: translateY(-2px);
}

.back-to-top-btn i {
  font-size: 0.9rem;
}

.back-to-top-btn span {
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 1px;
  letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 100%;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }
  .sidebar-wrapper {
    position: static;
    width: 100%;
    min-width: 0;
  }
  /* 모바일 아코디언 목차 접힘/펼침 제어 */
  .sidebar-header {
    cursor: pointer;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    padding: 4px 0;
  }
  .sidebar-wrapper.expanded .sidebar-header {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .toc-chevron {
    display: inline-block;
  }
  .toc-badge-sub {
    display: inline;
    font-size: 0.68rem;
    color: var(--accent-aqua);
    margin-left: 2px;
  }
  .sidebar-wrapper .toc-nav,
  .sidebar-wrapper .sidebar-contact-card {
    display: none;
  }
  .sidebar-wrapper.expanded .toc-nav,
  .sidebar-wrapper.expanded .sidebar-contact-card {
    display: block;
    animation: fadeIn 0.25s ease;
  }
  .sidebar-wrapper.expanded .toc-chevron {
    transform: rotate(180deg);
  }
  .hero-pillars-grid {
    grid-template-columns: 1fr;
  }
  .contact-box-grid {
    grid-template-columns: 1fr;
  }
  #print-btn {
    display: none;
  }
  .search-box input {
    width: 130px;
  }
  .search-box input:focus {
    width: 165px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  /* 키보드 활성화 시 상단 배너 임시 축소로 헤더 뷰포트 최상단 0px 밀착 */
  body.keyboard-open .top-compliance-banner {
    display: none !important;
  }
  .site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: auto;
    min-height: 52px;
    padding: 6px 12px;
    padding-top: max(6px, env(safe-area-inset-top, 0px));
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    box-sizing: border-box;
  }
  [data-theme="light"] .site-header,
  html[data-theme="light"] .site-header {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid #D1E4E6 !important;
  }
  .header-container {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    height: 100% !important;
    padding: 0 !important;
  }
  .brand-area {
    width: auto !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .brand-sub {
    display: none !important;
  }
  .brand-logo-link {
    width: 32px !important;
    height: 32px !important;
  }
  .brand-title {
    font-size: 1.05rem !important;
  }
  .header-actions {
    width: auto !important;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    overflow: visible;
    padding-bottom: 0;
  }
  .nav-capsule-btn span {
    display: none;
  }
  .nav-capsule-btn {
    padding: 7px 9px !important;
  }
  .search-box {
    flex: 1;
    min-width: 80px;
    max-width: 200px;
  }
  .search-box input {
    width: 100% !important;
    font-size: 13px !important;
    padding: 6px 28px 6px 30px !important;
  }
  .search-box input:focus {
    width: 100% !important;
  }
  /* 스마트폰 본문 및 목차/각 항 폭 완전 밀착 대응 */
  .main-layout {
    padding: 20px 12px 60px;
  }
  .content-wrapper {
    gap: 16px;
    width: 100%;
    min-width: 0;
  }
  .sidebar-wrapper {
    width: 100%;
    min-width: 0;
  }
  .sidebar-inner {
    padding: 16px 14px;
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
  }
  .policy-article {
    gap: 16px;
    width: 100%;
    min-width: 0;
  }
  .policy-section {
    padding: 18px 14px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  /* 모바일 가로 스크롤 힌트 노출 */
  .table-scroll-hint {
    display: flex;
  }
  /* 한국어 문맥 끊김 방지 및 읽기 편한 모바일 폰트 */
  .hero-section {
    padding: 24px 16px 32px;
  }
  .hero-emblem-box {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
  }
  .hero-emblem-img {
    width: 40px;
    height: 40px;
  }
  .hero-title {
    font-size: 1.55rem;
    line-height: 1.3;
    word-break: keep-all;
  }
  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: keep-all;
    margin-bottom: 20px;
  }
  .pillar-card {
    padding: 16px;
  }
  .pillar-card h3 {
    word-break: keep-all;
  }
  .pillar-card p {
    word-break: keep-all;
    line-height: 1.6;
  }
  .section-title {
    font-size: 1.2rem;
    line-height: 1.35;
    word-break: keep-all;
  }
  .policy-article p,
  .clause-content p,
  .lead-text,
  .callout-list li {
    word-break: keep-all;
    line-height: 1.7;
    font-size: 0.88rem;
  }
  .anchor-copy-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  /* Mobile specific text, clause, and table adjustments */
  .article-clause {
    gap: 10px;
  }
  .clause-num {
    font-size: 0.9rem;
  }
  .callout {
    padding: 14px 14px;
    margin: 14px 0;
  }
  .section-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
  .section-header {
    gap: 8px;
    margin-bottom: 14px;
  }
  .section-title {
    font-size: 1.15rem;
  }

  .api-flow-diagram {
    flex-direction: column;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 480px) {
  .main-layout {
    padding: 14px 8px 50px;
  }
  .content-wrapper {
    gap: 12px;
    width: 100%;
    min-width: 0;
  }
  .sidebar-inner {
    padding: 14px 10px;
    border-radius: var(--radius-md);
    width: 100%;
    box-sizing: border-box;
  }
  .policy-article {
    gap: 12px;
    width: 100%;
    min-width: 0;
  }
  .policy-section {
    padding: 16px 10px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .brand-title {
    font-size: 1.15rem;
  }
  .nav-capsule-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    gap: 4px;
  }
  .nav-capsule-btn span {
    font-size: 0.68rem;
  }
  .header-actions {
    gap: 4px;
  }
  .hero-meta-badges {
    gap: 6px;
  }
  .meta-badge {
    font-size: 0.68rem;
    padding: 4px 8px;
  }
  .hero-title {
    font-size: 1.4rem;
  }
  .article-clause {
    gap: 8px;
  }
  .clause-content p,
  .callout p {
    font-size: 0.84rem;
  }

}

@media print {
  .top-compliance-banner,
  .site-header,
  .sidebar-wrapper,
  .anchor-copy-btn,
  .hero-pillars-grid,
  .site-footer,
  .toast {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .content-wrapper {
    display: block !important;
  }
  .policy-section {
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid #CCC !important;
    padding: 16px 0 !important;
  }
  .callout {
    background: #F9F9F9 !important;
    border-left: 3px solid #333 !important;
  }
}
