/* BevDirector Enterprise Suite — Standalone & Printable Master User Manual Stylesheet (CSP Compliant, v170) */
:root {
  --bg: #03060c;
  --panel: #080d1a;
  --panel-alt: #0f172a;
  --border: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #10b981;
  --blue: #38bdf8;
  --purple: #c084fc;
  --warn: #c084fc;
  --danger: #f43f5e;
  --coral: #fb923c;
}

/* ==========================================================================
   22-CATEGORY SEMANTIC COLOR SYSTEM (UNIFIED SPIRIT & SOMMELIER PALETTE)
   ========================================================================== */
.cat-agave          { --s-rgb: 0, 229, 153;   --s-hex: #34d399; --s-light: #047857; }
.cat-whiskey        { --s-rgb: 245, 158, 11;  --s-hex: #fbbf24; --s-light: #b45309; }
.cat-gin            { --s-rgb: 132, 204, 22;  --s-hex: #a3e635; --s-light: #3f6212; }
.cat-vodka          { --s-rgb: 56, 189, 248;  --s-hex: #38bdf8; --s-light: #0284c7; }
.cat-rum            { --s-rgb: 249, 115, 22;  --s-hex: #fb923c; --s-light: #c2410c; }
.cat-brandy         { --s-rgb: 225, 95, 115;  --s-hex: #fda4af; --s-light: #9f1239; }
.cat-liqueur        { --s-rgb: 232, 121, 249; --s-hex: #e879f9; --s-light: #86198f; }
.cat-fortified      { --s-rgb: 217, 70, 239;  --s-hex: #d946ef; --s-light: #701a75; }
.cat-wine,
.cat-wine-red       { --s-rgb: 244, 63, 94;   --s-hex: #f43f5e; --s-light: #be123c; }
.cat-wine-white     { --s-rgb: 190, 242, 100; --s-hex: #bef264; --s-light: #4d7c0f; }
.cat-wine-sparkling { --s-rgb: 253, 224, 71;  --s-hex: #fde047; --s-light: #a16207; }
.cat-wine-rose      { --s-rgb: 249, 168, 212; --s-hex: #f9a8d4; --s-light: #be185d; }
.cat-wine-orange    { --s-rgb: 251, 146, 60;  --s-hex: #fb923c; --s-light: #c2410c; }
.cat-beer           { --s-rgb: 234, 179, 8;   --s-hex: #facc15; --s-light: #a16207; }
.cat-coffee         { --s-rgb: 217, 119, 6;   --s-hex: #f59e0b; --s-light: #92400e; }
.cat-dessert        { --s-rgb: 236, 72, 153;  --s-hex: #f472b6; --s-light: #9d174d; }
.cat-prep           { --s-rgb: 168, 85, 247;  --s-hex: #c084fc; --s-light: #6b21a8; }
.cat-citrus         { --s-rgb: 255, 87, 51;   --s-hex: #ff6b4a; --s-light: #c2410c; }
.cat-mixer          { --s-rgb: 99, 102, 241;  --s-hex: #818cf8; --s-light: #3730a3; }
.cat-zeroproof      { --s-rgb: 20, 184, 166;  --s-hex: #2dd4bf; --s-light: #0f766e; }
.cat-ice            { --s-rgb: 6, 182, 212;   --s-hex: #22d3ee; --s-light: #0e7490; }
.cat-generic        { --s-rgb: 56, 189, 248;  --s-hex: #7dd3fc; --s-light: #0369a1; }

.bd-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, rgba(var(--s-rgb), 0.22) 0%, rgba(var(--s-rgb), 0.09) 100%);
  color: var(--s-hex);
  border: 1px solid rgba(var(--s-rgb), 0.52);
  line-height: 1.25;
}

tr.ug-cat-row td:first-child {
  border-left: 4px solid var(--s-hex);
}

tr.ug-cat-row td:last-child {
  border-right: 4px solid var(--s-hex);
}

/* Vector SVG Icons (.bd-ico) */
.bd-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.15em;
  margin-right: 4px;
  line-height: 1;
  color: currentColor;
  flex-shrink: 0;
}

.bd-ico svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: rgba(var(--s-rgb, 56, 189, 248), 0.14);
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.ug-section h2 .bd-ico svg {
  width: 18px;
  height: 18px;
}

.bd-cat-pill .bd-ico {
  margin-right: 2px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  line-height: 1.58;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Top Sticky Navigation Bar */
.ug-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 13, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ug-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ug-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
}

.ug-brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.ug-brand-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ug-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ug-search {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.84rem;
  min-width: 240px;
  outline: none;
}

.ug-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.ug-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.81rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ug-btn:hover {
  border-color: var(--blue);
}

.ug-btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #ffffff;
}

.ug-btn-primary {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.ug-btn-purple {
  background: rgba(192, 132, 252, 0.16);
  border-color: rgba(192, 132, 252, 0.45);
  color: #e9d5ff;
}

/* Layout Container */
.ug-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 64px 24px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* Sidebar Table of Contents */
.ug-sidebar {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 94px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}

.ug-toc-details {
  margin: 0;
}

.ug-toc-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin: 0 0 10px 0;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.ug-toc-title::-webkit-details-marker {
  display: none;
}

.ug-toc-hint {
  display: none;
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}

.ug-mob-label {
  display: none;
}

.ug-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ug-toc-list a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.ug-toc-list a:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
}

/* Main Content Area */
.ug-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
}

.ug-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(56, 189, 248, 0.10) 50%, rgba(192, 132, 252, 0.10) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 26px 28px;
  min-width: 0;
}

.ug-hero h1 {
  margin: 0 0 8px 0;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ug-hero-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  vertical-align: -5px;
  margin-right: 8px;
}

.ug-hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.95rem;
  max-width: 880px;
}

.ug-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ug-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
}

/* Section Cards */
.ug-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  scroll-margin-top: 84px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.ug-subblock {
  margin-bottom: 14px;
  min-width: 0;
}

.ug-subblock:last-child {
  margin-bottom: 0;
}

.ug-section h2 {
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.3;
}

.ug-section h3 {
  margin: 16px 0 8px 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.35;
}

.ug-subblock:first-of-type > h3 {
  margin-top: 4px;
}

.ug-section h4 {
  margin: 12px 0 6px 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}

.ug-section p {
  margin: 0 0 10px 0;
  color: #cbd5e1;
}

.ug-section ul, .ug-section ol {
  margin: 6px 0 12px 20px;
  padding: 0;
  color: #cbd5e1;
}

.ug-section li {
  margin-bottom: 6px;
}

.ug-section strong {
  color: #ffffff;
}

code {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.83em;
  color: #38bdf8;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Callout Boxes */
.ug-callout {
  border: 1px solid rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.08);
  border-radius: 10px;
  padding: 11px 15px;
  margin: 12px 0;
  font-size: 0.87rem;
  color: #e2e8f0;
}

.ug-callout-blue {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.08);
}

.ug-callout-purple {
  border-color: rgba(192, 132, 252, 0.42);
  background: rgba(192, 132, 252, 0.08);
}

.ug-callout-warn {
  border-color: rgba(192, 132, 252, 0.42);
  background: rgba(192, 132, 252, 0.08);
}

/* 4-Stage Architecture Flow Grid (Always Even Columns) */
.ug-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.ug-flow-step {
  background: var(--panel-alt);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}

.ug-flow-step-num {
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
  letter-spacing: 0.05em;
}

.ug-flow-step-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffffff;
  margin: 3px 0;
}

.ug-flow-step-desc {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Tables */
.ug-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 100%;
}

table.ug-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

table.ug-table th {
  background: var(--panel-alt);
  color: #f8fafc;
  font-weight: 800;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.ug-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  vertical-align: middle;
}

.ug-nowrap {
  white-space: nowrap;
}

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

/* Formula Cards (Even 2-Column Grid) */
.ug-formula-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.ug-formula-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  min-width: 0;
}

.ug-formula-title {
  font-size: 0.81rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 5px;
}

.ug-formula-eq {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.80rem;
  color: #ffffff;
  background: rgba(3, 6, 12, 0.7);
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  overflow-wrap: break-word;
  word-break: break-word;
}

.ug-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ug-footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.80rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   TABLET & MOBILE RESPONSIVE OPTIMIZATION
   ========================================================================== */
@media (max-width: 1024px) {
  .ug-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 14px 48px 14px;
    gap: 14px;
  }
  .ug-sidebar {
    position: static !important;
    max-height: none !important;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.10), rgba(56, 189, 248, 0.10));
    border: 1px solid rgba(56, 189, 248, 0.4);
  }
  .ug-toc-title {
    margin: 0;
    font-size: 0.88rem;
  }
  .ug-toc-details[open] .ug-toc-title {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  }
  .ug-toc-hint {
    display: inline;
  }
  .ug-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 10px;
  }
  .ug-toc-list a {
    font-size: 0.88rem;
    padding: 8px 10px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.18);
  }
  .ug-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html, body {
    font-size: 16px;
    line-height: 1.62;
    color: #f8fafc;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .ug-topbar,
  .ug-layout,
  .ug-main,
  .ug-sidebar,
  .ug-hero,
  .ug-section,
  .ug-subblock {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .ug-nowrap {
    white-space: normal !important;
  }
  .ug-topbar {
    position: relative;
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .ug-brand {
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  .ug-brand-title {
    font-size: 1.05rem;
  }
  .ug-brand-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
  }
  .ug-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .ug-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    font-size: 0.92rem;
    padding: 10px 12px;
  }
  .ug-actions .ug-btn {
    width: 100%;
    min-width: 0;
    padding: 9px 8px;
    font-size: 0.80rem;
    white-space: normal;
    text-align: center;
  }
  .ug-actions .ug-btn:last-child {
    grid-column: 1 / -1;
  }
  .ug-layout {
    padding: 12px 12px 44px 12px;
    gap: 14px;
  }
  .ug-hero {
    padding: 18px 16px;
    border-radius: 14px;
  }
  .ug-hero h1 {
    font-size: 1.38rem;
    line-height: 1.3;
  }
  .ug-hero p {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.55;
  }
  .ug-meta-pills {
    gap: 6px;
  }
  .ug-pill {
    font-size: 0.78rem;
    padding: 5px 10px;
  }
  .ug-toc-list {
    grid-template-columns: 1fr;
  }
  .ug-section {
    padding: 18px 16px;
    border-radius: 14px;
    border-color: rgba(56, 189, 248, 0.26);
  }
  .ug-section h2 {
    font-size: 1.2rem;
    line-height: 1.32;
    color: #38bdf8;
  }
  .ug-section h3 {
    font-size: 1.04rem;
    line-height: 1.35;
    color: #34d399;
  }
  .ug-section p,
  .ug-section li {
    font-size: 0.96rem;
    color: #e2e8f0;
    line-height: 1.6;
  }
  .ug-section li {
    margin-bottom: 9px;
  }
  .ug-section ul, .ug-section ol {
    margin-left: 18px;
  }
  .ug-flow-grid,
  .ug-formula-grid {
    grid-template-columns: 1fr;
  }
  .ug-flow-step-title {
    font-size: 0.98rem;
  }
  .ug-flow-step-desc {
    font-size: 0.90rem;
    color: #e2e8f0;
  }

  /* Responsive Mobile Stacked Cards for Tables */
  .ug-table-wrap {
    border: none;
    background: transparent;
    overflow-x: hidden;
    max-width: 100%;
  }
  table.ug-table,
  table.ug-table tbody,
  table.ug-table tr,
  table.ug-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  table.ug-table thead {
    display: none;
  }
  table.ug-table tr {
    background: var(--panel-alt);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
  }
  table.ug-table tr.ug-cat-row {
    border-left: 5px solid var(--s-hex);
    border-right: 5px solid var(--s-hex);
  }
  table.ug-table td {
    padding: 5px 0;
    border-bottom: none;
    font-size: 0.93rem;
    color: #f1f5f9;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  table.ug-table tr.ug-cat-row td:first-child,
  table.ug-table tr.ug-cat-row td:last-child {
    border-left: none;
    border-right: none;
  }
  table.ug-table tr.ug-cat-row td:first-child {
    padding-bottom: 8px;
  }
  .bd-cat-pill {
    font-size: 0.88rem;
    padding: 5px 12px;
    white-space: normal;
  }
  .ug-swatch {
    width: 15px;
    height: 15px;
  }
  table.ug-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 800;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .ug-mob-label {
    display: inline;
    font-weight: 800;
    color: #38bdf8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  table.ug-table td:has(.ug-mob-label)::before {
    display: none;
  }
}

/* ==========================================================================
   PRINT & PDF EXPORT STYLING (PUBLICATION-GRADE PAGINATION & EXACT COLORS)
   ========================================================================== */
@media print {
  @page {
    size: letter;
    margin: 0.45in 0.48in 0.48in 0.48in;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9.6pt !important;
    line-height: 1.42 !important;
    overflow: visible !important;
  }

  .ug-topbar, .ug-sidebar, .ug-emoji {
    display: none !important;
  }

  .bd-ico {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: -0.15em !important;
    margin-right: 3px !important;
    color: currentColor !important;
  }

  .bd-ico svg {
    width: 11px !important;
    height: 11px !important;
    stroke: currentColor !important;
    fill: rgba(var(--s-rgb, 2, 132, 199), 0.14) !important;
    stroke-width: 2.15 !important;
  }

  .ug-section h2 .bd-ico svg {
    width: 14px !important;
    height: 14px !important;
  }

  .ug-layout {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ug-main {
    display: block !important;
  }

  .ug-hero {
    background: #f8fafc !important;
    border: 1.5px solid #0f172a !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    padding: 9px 14px !important;
    margin-bottom: 8px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-hero h1 {
    color: #0f172a !important;
    font-size: 14pt !important;
    margin-bottom: 3px !important;
  }

  .ug-hero-logo {
    width: 16pt !important;
    height: 16pt !important;
    border-radius: 4pt !important;
    vertical-align: -2.5pt !important;
    margin-right: 5pt !important;
  }

  .ug-hero p {
    font-size: 8.6pt !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }

  .ug-hero p, .ug-section p, .ug-section li, table.ug-table td {
    color: #1e293b !important;
  }

  .ug-meta-pills {
    margin-top: 6px !important;
    gap: 5px !important;
  }

  .ug-pill {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
    font-size: 7.6pt !important;
    padding: 1px 7px !important;
  }

  /* Eliminate outer card box borders in print so sections never slice mid-border across pages */
  .ug-section {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0 8px 0 !important;
    break-inside: auto;
  }

  .ug-print-break {
    break-before: page !important;
    page-break-before: always !important;
  }

  .ug-section h2 {
    background: #f1f5f9 !important;
    color: #0369a1 !important;
    border-top: 1px solid #cbd5e1 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    border-left: 4px solid #0284c7 !important;
    border-right: 4px solid #0284c7 !important;
    border-radius: 5px !important;
    padding: 4px 10px !important;
    margin: 0 0 5px 0 !important;
    font-size: 11.5pt !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-section h3 {
    color: #047857 !important;
    font-size: 9.8pt !important;
    margin: 6px 0 2px 0 !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-section h4, .ug-section strong {
    color: #0f172a !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  .ug-section p {
    margin: 0 0 5px 0 !important;
    orphans: 3;
    widows: 3;
  }

  .ug-section ul, .ug-section ol {
    margin: 3px 0 6px 18px !important;
  }

  .ug-section li {
    margin-bottom: 3px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-subblock {
    margin-bottom: 5px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-sec2-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px 8px !important;
    font-size: 7.6pt !important;
    line-height: 1.18 !important;
  }

  .ug-sec2-grid .ug-subblock {
    margin-bottom: 0 !important;
  }

  .ug-sec2-grid h3 {
    font-size: 8.2pt !important;
    margin: 1px 0 1px 0 !important;
  }

  .ug-sec2-grid p {
    margin: 0 0 1px 0 !important;
    font-size: 7.6pt !important;
  }

  .ug-sec2-grid ul, .ug-sec2-grid ol {
    margin: 1px 0 1px 13px !important;
  }

  .ug-sec2-grid li {
    margin-bottom: 0.5px !important;
  }

  .ug-sec2-grid code {
    font-size: 7.2pt !important;
    padding: 0 2px !important;
  }

  .ug-subblock-flow {
    margin-bottom: 8px !important;
    break-inside: auto !important;
  }

  code {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 8.5pt !important;
    padding: 0 4px !important;
  }

  .bd-cat-pill {
    background: rgba(var(--s-rgb), 0.16) !important;
    color: var(--s-light) !important;
    border: 1px solid rgba(var(--s-rgb), 0.65) !important;
    font-size: 8pt !important;
    padding: 2px 7px !important;
  }

  .ug-swatch {
    border: 1px solid #475569 !important;
  }

  .ug-callout {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-top: 1px solid #94a3b8 !important;
    border-bottom: 1px solid #94a3b8 !important;
    border-left: 4px solid #059669 !important;
    border-right: 4px solid #059669 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    margin: 8px 0 !important;
    font-size: 9pt !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-callout-blue {
    border-left-color: #0284c7 !important;
    border-right-color: #0284c7 !important;
  }

  tr.ug-cat-row td:first-child {
    border-left: 4px solid var(--s-hex) !important;
  }

  tr.ug-cat-row td:last-child {
    border-right: 4px solid var(--s-hex) !important;
  }

  .ug-flow-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 8px 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-flow-step, .ug-formula-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    padding: 5px 8px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-formula-title {
    font-size: 8.2pt !important;
    margin-bottom: 2px !important;
  }

  .ug-flow-step-title, .ug-formula-eq {
    color: #0f172a !important;
    background: #ffffff !important;
    font-size: 8pt !important;
    padding: 3px 6px !important;
  }

  .ug-flow-step-desc {
    color: #334155 !important;
    font-size: 8pt !important;
  }

  .ug-formula-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px 8px !important;
    margin-top: 6px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .ug-table-wrap {
    border: 1px solid #cbd5e1 !important;
    margin: 8px 0 !important;
    overflow: visible !important;
  }

  table.ug-table {
    display: table !important;
    width: 100% !important;
    font-size: 8.5pt !important;
  }

  table.ug-table thead {
    display: table-header-group !important;
  }

  table.ug-table tbody {
    display: table-row-group !important;
  }

  table.ug-table tr {
    display: table-row !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  table.ug-table th {
    display: table-cell !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
    padding: 4px 6px !important;
    border-bottom: 1.5px solid #94a3b8 !important;
  }

  table.ug-table td {
    display: table-cell !important;
    padding: 3px 6px !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  table.ug-table td[data-label]::before {
    content: none !important;
  }

  .ug-footer {
    margin-top: 6px !important;
    padding: 6px 0 0 0 !important;
    color: #475569 !important;
    font-size: 8.0pt !important;
    break-inside: avoid !important;
  }

  /* Compact print fitting for Sec 1 + Sec 2, Sec 6, Sec 7, Sec 8/8.5 + Sec 9, Sec 10 + Sec 11 + Sec 12.1, and Sec 13 + Sec 14 */
  #sec-1, #sec-2 {
    margin-bottom: 4px !important;
  }
  #sec-1 h2, #sec-2 h2, #sec-6 h2, #sec-7 h2, #sec-8 h2, #sec-9 h2 {
    padding: 3px 9px !important;
    margin: 0 0 3px 0 !important;
    font-size: 10.6pt !important;
  }
  #sec-1 p, #sec-7 p, #sec-7 li {
    font-size: 8.0pt !important;
    line-height: 1.22 !important;
    margin-bottom: 1.5px !important;
  }
  #sec-1 .ug-flow-grid {
    margin: 4px 0 !important;
    gap: 6px !important;
  }
  #sec-1 .ug-flow-step {
    padding: 4px 7px !important;
  }
  #sec-1 .ug-callout, #sec-7 .ug-callout {
    padding: 5px 10px !important;
    margin: 4px 0 !important;
    font-size: 8.1pt !important;
    line-height: 1.22 !important;
  }
  #sec-7 h3 {
    font-size: 8.8pt !important;
    margin: 3px 0 1px 0 !important;
  }
  #sec-7 ul, #sec-7 ol {
    margin: 1.5px 0 2px 15px !important;
  }
  #sec-7 .ug-subblock {
    margin-bottom: 2.5px !important;
  }
  #sec-1 code, #sec-7 code {
    font-size: 7.6pt !important;
    padding: 0 3px !important;
  }
  #sec-6 h3, #sec-8 h3 {
    font-size: 9.0pt !important;
    margin: 3px 0 1px 0 !important;
  }
  #sec-6 p, #sec-6 li, #sec-8 p, #sec-8 li, #sec-9 p, #sec-9 li {
    font-size: 8.1pt !important;
    line-height: 1.24 !important;
    margin-bottom: 1.5px !important;
  }
  #sec-6 ul, #sec-6 ol, #sec-8 ul, #sec-8 ol, #sec-9 ul, #sec-9 ol {
    margin: 1.5px 0 2.5px 15px !important;
  }
  #sec-6 .ug-subblock, #sec-8 .ug-subblock, #sec-9 .ug-subblock {
    margin-bottom: 3px !important;
  }
  #sec-6 code, #sec-8 code, #sec-9 code {
    font-size: 7.7pt !important;
    padding: 0 3px !important;
  }
  #sec-10, #sec-11 {
    margin-bottom: 5px !important;
  }
  #sec-10 h2, #sec-11 h2, #sec-12 h2, #sec-13 h2, #sec-14 h2 {
    padding: 3px 9px !important;
    margin: 0 0 4px 0 !important;
    font-size: 10.6pt !important;
  }
  #sec-10 p, #sec-10 li, #sec-11 p, #sec-11 li, #ug-sec12-db p, #ug-sec12-db li {
    font-size: 8.1pt !important;
    line-height: 1.24 !important;
    margin-bottom: 2px !important;
  }
  #sec-10 ol, #sec-11 ul, #ug-sec12-db ol, #ug-sec12-db ul {
    margin: 2px 0 3px 16px !important;
  }
  #ug-sec12-db h3 {
    font-size: 9.1pt !important;
    margin: 3px 0 2px 0 !important;
  }
  #ug-sec12-db code, #sec-10 code, #sec-11 code, #sec-14 code {
    font-size: 7.7pt !important;
    padding: 0 3px !important;
  }
  #sec-13 {
    margin-bottom: 6px !important;
  }
  #sec-13 .ug-formula-grid {
    gap: 3px 6px !important;
    margin-top: 3px !important;
  }
  #sec-13 .ug-formula-card {
    padding: 3px 6px !important;
  }
  #sec-13 .ug-formula-title {
    font-size: 7.8pt !important;
    margin-bottom: 1px !important;
  }
  #sec-13 .ug-formula-eq {
    font-size: 7.5pt !important;
    padding: 2px 5px !important;
    line-height: 1.2 !important;
  }
  #sec-14 .ug-subblock {
    margin-bottom: 3px !important;
  }
  #sec-14 h3 {
    font-size: 9.0pt !important;
    margin: 4px 0 1px 0 !important;
  }
  #sec-14 p, #sec-14 li {
    font-size: 7.9pt !important;
    line-height: 1.23 !important;
    margin-bottom: 2px !important;
  }
  #sec-14 ul {
    margin: 2px 0 3px 15px !important;
  }
}
