@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   DESIGN TOKENS & COLOR PALETTE
   ========================================================================== */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Base Light Colors */
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #ffffff;
  --card-hover: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.95);
  --hero-bg: linear-gradient(135deg, #091a3e 0%, #0d275a 50%, #133a82 100%);
  
  /* Text & Inks */
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  
  /* Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --navy: #091a3e;
  --navy-light: #1e3a8a;
  
  --emerald: #059669;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;
  
  --amber: #d97706;
  --amber-light: #fffbeb;
  --amber-border: #fde68a;
  
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;

  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 48px -8px rgba(15, 23, 42, 0.12);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --container-max: 1200px;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --card: #131d33;
  --card-hover: #182440;
  --header-bg: rgba(15, 23, 42, 0.95);
  --hero-bg: linear-gradient(135deg, #070d1d 0%, #0b1736 50%, #0e2254 100%);
  
  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --muted-light: #64748b;
  
  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-light: #0f2b48;
  --primary-border: #1e3a5f;
  
  --emerald: #34d399;
  --emerald-light: #064e3b;
  --emerald-border: #047857;
  
  --amber: #fbbf24;
  --amber-light: #78350f;
  --amber-border: #b45309;
  
  --purple: #a78bfa;
  --purple-light: #4c1d95;
  --purple-border: #6d28d9;

  --line: #1e293b;
  --line-subtle: #162032;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 48px -8px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   STRICT OVERFLOW & MOBILE RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
}

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

body.modern-okof {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, b, span, p, a, div {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s ease;
}
a:hover {
  color: var(--primary-hover);
}

.mo-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.mo-main {
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.mo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.mo-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

.mo-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.mo-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.mo-brand span b {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.1;
  color: var(--ink);
}

.mo-brand span small {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mo-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.mo-nav a {
  padding: 6px 10px;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mo-nav a:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

.mo-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.mo-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mo-spotlight-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mo-spotlight-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--card);
}

.mo-spotlight-btn kbd {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
}

.mo-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  cursor: pointer;
  font-size: 0.9375rem;
  transition: all 0.15s ease;
}

.mo-theme-btn:hover {
  background: var(--card);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.mo-menu-btn {
  display: none;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.mo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 0.8125rem;
  color: var(--muted);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}

.mo-breadcrumb a { color: var(--muted); font-weight: 500; }
.mo-breadcrumb a:hover { color: var(--primary); }
.mo-breadcrumb-sep { color: var(--muted-light); font-size: 0.75rem; flex-shrink: 0; }
.mo-breadcrumb span[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   HERO SECTIONS (Always High-Contrast & Crisp)
   ========================================================================== */
.mo-hero {
  background: var(--hero-bg) !important;
  color: #ffffff !important;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 12px 0 20px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.mo-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(37, 99, 235, 0) 70%);
  pointer-events: none;
}

.mo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #93c5fd;
  margin-bottom: 12px;
}

.mo-hero h1 {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: #ffffff !important;
  word-break: break-word;
}

.mo-lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #cbd5e1 !important;
  max-width: 840px;
  margin-bottom: 20px;
}

/* ==========================================================================
   SEARCH FORM
   ========================================================================== */
.mo-search-form {
  position: relative;
  width: 100%;
  max-width: 840px;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.mo-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 2px solid transparent;
  transition: all 0.2s ease;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.mo-search-wrapper:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.35);
}

.mo-search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 0.9375rem;
  pointer-events: none;
}

.mo-search-input {
  width: 100%;
  height: 48px;
  padding: 0 100px 0 42px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #0f172a;
  background: transparent;
  border: none;
  outline: none;
  box-sizing: border-box;
}

.mo-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.mo-search-btn {
  position: absolute;
  right: 4px;
  height: 40px;
  padding: 0 16px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mo-search-btn:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

.mo-search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  padding: 6px;
  box-sizing: border-box;
}

.mo-search-res-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.12s ease;
}

.mo-search-res-item:hover,
.mo-search-res-item.selected {
  background: var(--primary-light);
  color: var(--primary);
}

.mo-search-res-code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.mo-search-res-name {
  font-size: 0.875rem;
  font-weight: 500;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mo-search-res-group {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-light);
  border: 1px solid var(--emerald-border);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Quick Search Pills */
.mo-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mo-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.mo-pill:hover {
  background: #ffffff;
  color: var(--navy);
  transform: translateY(-1px);
}

/* Quick Scenario Grid */
.mo-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.mo-quick-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.mo-quick-card:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.mo-quick-card b {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.mo-quick-card span {
  display: block;
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.mo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.mo-panel {
  padding: 22px;
  margin-bottom: 18px;
}

.mo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.mo-card-head h2 {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Guide Cards Grid */
.mo-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.mo-guide-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.mo-guide-card:hover {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.mo-guide-card b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.35;
}

.mo-guide-card span {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Detail Box Grid */
.mo-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 14px 0;
  width: 100%;
}

.mo-detail-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-sizing: border-box;
}

.mo-detail-box small {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 3px;
}

.mo-detail-box b {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.mo-detail-box span {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   HIERARCHY TIMELINE & PATH FLOW
   ========================================================================== */
.mo-hierarchy-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  margin: 14px 0;
  padding: 0;
  list-style: none;
  width: 100%;
  box-sizing: border-box;
}

.mo-timeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.mo-timeline-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--bg-alt);
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  flex-shrink: 0;
}

.mo-timeline-step.active .mo-timeline-node {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.mo-timeline-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex-grow: 1;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s ease;
  min-width: 0;
  box-sizing: border-box;
}

.mo-timeline-content:hover {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.mo-timeline-step.active .mo-timeline-content {
  background: var(--primary-light);
  border-color: var(--primary-border);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.mo-timeline-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--primary);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.mo-timeline-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  flex-grow: 1;
  min-width: 0;
}

.mo-timeline-level {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.mo-sibling-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.mo-sibling-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mo-sibling-btn:hover {
  background: var(--card);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   BUTTONS & ACTIONS BAR
   ========================================================================== */
.mo-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

.mo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  box-sizing: border-box;
  text-align: center;
}

.mo-btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.mo-btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff !important;
}

.mo-btn-secondary {
  background: var(--bg-alt);
  border-color: var(--line);
  color: var(--ink);
}

.mo-btn-secondary:hover {
  background: var(--card);
  border-color: var(--primary);
  color: var(--primary);
}

.mo-copy-btn.copied, .mo-copy-link-btn.copied {
  background: var(--emerald) !important;
  color: #ffffff !important;
  border-color: var(--emerald) !important;
}

/* ==========================================================================
   CODE LIST (Directories)
   ========================================================================== */
.mo-code-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.mo-code-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.mo-code-list-item:hover {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.mo-code-list-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.mo-code-list-body {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.mo-code-list-body b {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.mo-code-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.mo-tag-group {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--emerald-light);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.mo-tag-group.none {
  background: var(--bg-alt);
  color: var(--muted);
  border-color: var(--line);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.mo-table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-sizing: border-box;
}

.mo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8125rem;
}

.mo-table th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.mo-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-secondary);
  line-height: 1.5;
}

.mo-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   CATEGORIES TREE GRID (100–700)
   ========================================================================== */
.mo-tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 14px 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.mo-group-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.mo-group-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.mo-group-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mo-group-card__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.mo-group-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.mo-group-card__desc {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
}

.mo-group-card__sub {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.mo-group-card__sub a {
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
}

.mo-group-card__sub a:hover {
  color: var(--primary);
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.mo-faq details {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  padding: 12px 16px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.mo-faq details[open] {
  background: var(--card);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.mo-faq summary {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mo-faq summary::-webkit-details-marker { display: none; }
.mo-faq summary::after {
  content: "+";
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.mo-faq details[open] summary::after {
  content: "−";
}

.mo-faq p {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* ==========================================================================
   CALCULATOR FORM
   ========================================================================== */
.mo-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.mo-form-group {
  margin-bottom: 14px;
}

.mo-form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.mo-form-control {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.mo-form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.mo-calc-result-box {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--card) 100%);
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  box-sizing: border-box;
}

.mo-calc-metric {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.mo-calc-metric small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.mo-calc-metric b {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.mo-footer {
  background: #091a3e;
  color: #94a3b8;
  padding: 44px 0 20px;
  margin-top: 40px;
  border-top: 1px solid #1e293b;
  width: 100%;
  box-sizing: border-box;
}

.mo-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
  width: 100%;
}

.mo-footer-brand .mo-brand {
  color: #ffffff;
  margin-bottom: 12px;
}

.mo-footer-brand p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #94a3b8;
}

.mo-footer-links h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 10px;
}

.mo-footer-links a {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 3px 0;
}

.mo-footer-links a:hover {
  color: #38bdf8;
}

.mo-copy {
  padding-top: 16px;
  border-top: 1px solid #1e293b;
  font-size: 0.6875rem;
  color: #64748b;
  text-align: center;
}

/* ==========================================================================
   MOBILE RESPONSIVE RULES (Full-Width, Zero Overflow)
   ========================================================================== */
@media (max-width: 992px) {
  .mo-footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .mo-calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }
  .mo-container {
    padding: 0 12px !important;
  }
  .mo-header__in {
    height: 54px;
  }
  .mo-spotlight-btn kbd {
    display: none;
  }
  .mo-menu-btn {
    display: block;
  }
  .mo-nav {
    display: none;
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-xl);
    z-index: 200;
  }
  .mo-nav.open {
    display: flex;
  }
  .mo-hero {
    padding: 20px 14px !important;
    border-radius: var(--radius);
    margin: 8px 0 14px;
    width: 100% !important;
  }
  .mo-hero h1 {
    font-size: 1.25rem !important;
    line-height: 1.25;
    word-break: break-word !important;
  }
  .mo-lead {
    font-size: 0.8125rem !important;
    margin-bottom: 14px;
  }
  .mo-actions-bar {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .mo-actions-bar .mo-btn {
    width: 100% !important;
    justify-content: center;
    box-sizing: border-box;
  }
  .mo-search-input {
    font-size: 0.875rem;
    height: 44px;
    padding: 0 76px 0 36px;
  }
  .mo-search-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 0.75rem;
  }
  .mo-search-icon {
    left: 10px;
    font-size: 0.8125rem;
  }
  .mo-panel {
    padding: 14px;
    border-radius: var(--radius);
    width: 100% !important;
  }
  .mo-tree-grid {
    grid-template-columns: 1fr !important;
  }
  .mo-quick-grid {
    grid-template-columns: 1fr !important;
  }
  .mo-detail-grid {
    grid-template-columns: 1fr !important;
  }
  .mo-hierarchy-timeline {
    padding: 0;
  }
  .mo-timeline-step {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .mo-timeline-content {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 6px;
  }
  .mo-sibling-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .mo-sibling-btn {
    width: 100%;
    justify-content: center;
  }
/* ==========================================================================
   PRINT STYLESHEET (Official Form OS-6 & Document Layout)
   ========================================================================== */
@media print {
  body.modern-okof {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  .mo-header,
  .mo-footer,
  .mo-actions-bar,
  .mo-search-form,
  .mo-spotlight-btn,
  .mo-theme-btn,
  .mo-menu-btn,
  .mo-quick,
  .mo-quick-grid,
  .mo-breadcrumb,
  .mo-sibling-nav {
    display: none !important;
  }

  .mo-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .mo-hero {
    background: none !important;
    color: #000000 !important;
    padding: 10px 0 !important;
    box-shadow: none !important;
    border-bottom: 2px solid #000000;
    border-radius: 0 !important;
    margin-bottom: 15px !important;
  }

  .mo-hero h1 {
    color: #000000 !important;
    font-size: 16pt !important;
  }

  .mo-lead {
    color: #333333 !important;
    font-size: 10pt !important;
  }

  .mo-kicker {
    color: #666666 !important;
    border-color: #999999 !important;
    background: none !important;
  }

  .mo-card, .mo-panel, .mo-detail-box {
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    page-break-inside: avoid;
    margin-bottom: 12px !important;
  }

  .mo-table {
    border: 1px solid #000000 !important;
  }

  .mo-table th, .mo-table td {
    border: 1px solid #cccccc !important;
    color: #000000 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: none !important;
  }
}

