/* ================================================================
   BPC User Guide — userguide.css
   BPC brand: orange #F0A948 · navy #0C243E · blue #44546A
   ================================================================ */

:root {
    --ug-o: #F0A948;
    --ug-n: #0C243E;
    --ug-b: #44546A;
    --ug-ol: rgba(240, 169, 72, 0.10);
    --ug-ob: rgba(240, 169, 72, 0.30);
}

/* ── LAYOUT ─────────────────────────────────────────────────── */

.ug-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.ug-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ug-n);
}

.ug-logo {
    height: 32px;
    width: auto;
}

.ug-company-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ug-n);
}

.ug-header-label {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ug-main {
    flex: 1;
    padding: 40px;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.ug-footer {
    padding: 20px 40px;
    border-top: 1px solid #e5e5e5;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

/* ── BREADCRUMB ─────────────────────────────────────────────── */

.ug-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ug-breadcrumb a {
    color: var(--ug-o);
    text-decoration: none;
}

.ug-breadcrumb a:hover {
    text-decoration: underline;
}

.ug-bc-sep {
    color: #ccc;
    font-size: 10px;
}

/* ── INDEX PAGE ─────────────────────────────────────────────── */

.ug-index-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--ug-n);
    margin: 0 0 32px;
}

.ug-version-block {
    margin-bottom: 36px;
}

.ug-version-badge {
    display: inline-block;
    background: var(--ug-n);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
}

.ug-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.ug-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ug-n);
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: center;
}

.ug-app-card:hover {
    border-color: var(--ug-o);
    box-shadow: 0 2px 12px rgba(240, 169, 72, 0.15);
}

.ug-app-icon {
    font-size: 28px;
    color: var(--ug-o);
}

.ug-app-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ug-n);
}

.ug-app-count {
    font-size: 12px;
    color: #888;
}

/* ── TOC PAGE ───────────────────────────────────────────────── */

.ug-toc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.ug-toc-icon {
    font-size: 40px;
    color: var(--ug-o);
}

.ug-toc-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--ug-n);
    margin: 0 0 4px;
}

.ug-toc-version {
    font-size: 13px;
    color: #888;
}

.ug-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ug-chapter-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ug-n);
    transition: border-color 0.15s, background 0.15s;
}

.ug-chapter-row:hover {
    border-color: var(--ug-o);
    background: var(--ug-ol);
}

.ug-chapter-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--ug-o);
    min-width: 36px;
}

.ug-chapter-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.ug-chapter-steps {
    font-size: 12px;
    color: #aaa;
}

.ug-chapter-arrow {
    color: #ccc;
    font-size: 12px;
}

/* ── CHAPTER PAGE ───────────────────────────────────────────── */

.ug-ch-header {
    margin-bottom: 20px;
}

.ug-ch-num {
    font-size: 56px;
    font-weight: 700;
    color: var(--ug-o);
    line-height: 1;
    letter-spacing: -2px;
}

.ug-ch-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--ug-n);
    margin: 4px 0 2px;
}

.ug-ch-meta {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.ug-intro {
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    margin: 0 0 24px;
}

.ug-diag-label {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.ug-flow-wrap {
    margin-bottom: 8px;
    overflow-x: auto;
}

.ug-flow-svg {
    display: block;
    min-width: 400px;
}

/* flow box colors */
.ug-flow-gray rect  { fill: #f5f5f5; stroke: #ccc; }
.ug-flow-gray text  { fill: #555; }
.ug-flow-blue rect  { fill: #deeefb; stroke: #7ab8ee; }
.ug-flow-blue text  { fill: #1a5f9e; }
.ug-flow-teal rect  { fill: #d4f0e6; stroke: #5dbfa0; }
.ug-flow-teal text  { fill: #0a6b4e; }
.ug-flow-green rect { fill: #dff0cc; stroke: #88c454; }
.ug-flow-green text { fill: #3a6b12; }
.ug-flow-red rect   { fill: #fde8e8; stroke: #e88; }
.ug-flow-red text   { fill: #a32d2d; }
.ug-flow-label { font-size: 13px; font-weight: 600; font-family: inherit; }
.ug-flow-sub   { font-size: 11px; fill: #999; font-family: inherit; }

.ug-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 28px 0;
}

/* ── STEPS ──────────────────────────────────────────────────── */

.ug-step {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0 14px;
    margin: 0 0 28px;
}

.ug-step-n {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ug-o);
    color: var(--ug-n);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.ug-step-content {}

.ug-step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ug-n);
    margin: 4px 0 10px;
}

.ug-step-body {
    font-size: 14px;
    line-height: 1.75;
    color: #444;
    margin: 0 0 10px;
}

/* ── NAV PATH ───────────────────────────────────────────────── */

.ug-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    background: var(--ug-ol);
    border: 1px solid var(--ug-ob);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    margin: 0 0 12px;
}

.ug-nav-seg {
    color: var(--ug-n);
    font-weight: 600;
}

.ug-nav-arrow {
    color: var(--ug-o);
    margin: 0 3px;
    font-size: 10px;
}

.ug-nav-btn {
    background: var(--ug-o);
    color: var(--ug-n);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 4px;
    font-size: 11px;
}

/* ── FIELD REFERENCE BOX ────────────────────────────────────── */

.ug-fbox {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 12px;
}

.ug-fbox-title {
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ug-frow {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 4px 12px;
    padding: 6px 0;
    border-bottom: 1px solid #efefef;
    font-size: 13px;
    align-items: start;
}

.ug-frow:last-child {
    border-bottom: none;
}

.ug-fl {
    font-weight: 600;
    color: #333;
}

.ug-req {
    color: var(--ug-o);
    font-size: 11px;
    margin-left: 2px;
}

.ug-fd {
    color: #666;
    line-height: 1.5;
}

/* ── TIP CALLOUT ────────────────────────────────────────────── */

.ug-tip {
    border-left: 3px solid var(--ug-o);
    background: var(--ug-ol);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    line-height: 1.65;
    color: #555;
    margin: 0 0 12px;
}

.ug-tip strong {
    color: var(--ug-n);
    display: block;
    margin-bottom: 4px;
}

/* ── PREV / NEXT ─────────────────────────────────────────────── */

.ug-chapter-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.ug-nav-btn-chapter {
    font-size: 13px;
    color: var(--ug-b);
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: border-color 0.15s;
}

.ug-nav-btn-chapter:hover {
    border-color: var(--ug-o);
    color: var(--ug-n);
}

.ug-pdf-btn {
    font-size: 13px;
    color: var(--ug-n);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--ug-o);
    border-radius: 6px;
    font-weight: 600;
}

.ug-pdf-btn:hover {
    opacity: 0.9;
}

/* ── PDF STYLES ──────────────────────────────────────────────── */

.ug-pdf-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11pt;
    color: #222;
}

.ug-pdf-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.ug-pdf-ch-num {
    font-size: 40pt;
    font-weight: 700;
    color: #F0A948;
    line-height: 1;
    min-width: 64px;
}

.ug-pdf-ch-title {
    font-size: 20pt;
    font-weight: 700;
    color: #0C243E;
    margin: 4px 0 2px;
}

.ug-pdf-ch-meta {
    font-size: 9pt;
    color: #888;
    margin: 0;
}

.ug-pdf-rule {
    height: 2px;
    background: #F0A948;
    margin: 12px 0 16px;
    border: none;
}

.ug-pdf-intro {
    font-size: 10.5pt;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;
}

.ug-pdf-step {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    page-break-inside: avoid;
}

.ug-pdf-step-n {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F0A948;
    color: #0C243E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10pt;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.ug-pdf-step-title {
    font-size: 12pt;
    font-weight: 700;
    color: #0C243E;
    margin: 0 0 6px;
}

.ug-pdf-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    background: rgba(240,169,72,0.10);
    border: 1px solid rgba(240,169,72,0.30);
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 9pt;
    margin-bottom: 8px;
}

.ug-pdf-nav-seg  { font-weight: 600; color: #0C243E; }
.ug-pdf-nav-arrow { color: #F0A948; margin: 0 3px; font-size: 8pt; }
.ug-pdf-nav-btn {
    background: #F0A948;
    color: #0C243E;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    margin-left: 3px;
    font-size: 8pt;
}

.ug-pdf-body {
    font-size: 10pt;
    line-height: 1.7;
    color: #444;
    margin: 0 0 8px;
}

.ug-pdf-fbox {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    page-break-inside: avoid;
}

.ug-pdf-fbox-title {
    font-size: 8pt;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ug-pdf-ftable {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
}

.ug-pdf-ftable tr {
    border-bottom: 1px solid #efefef;
}

.ug-pdf-ftable tr:last-child {
    border-bottom: none;
}

.ug-pdf-fl {
    font-weight: 600;
    color: #333;
    padding: 4px 8px 4px 0;
    width: 140px;
    vertical-align: top;
}

.ug-pdf-req {
    color: #F0A948;
}

.ug-pdf-fd {
    color: #666;
    padding: 4px 0;
    vertical-align: top;
}

.ug-pdf-tip {
    border-left: 3px solid #F0A948;
    background: rgba(240,169,72,0.08);
    padding: 8px 12px;
    border-radius: 0 5px 5px 0;
    font-size: 9pt;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
    page-break-inside: avoid;
}
