/* VCWD DocuManage — HTML manuals (screen + print / PDF) */

:root {
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --page-max: 210mm;
    --manual-chrome-h: 3.35rem;
}

* { box-sizing: border-box; }

html {
    font-size: 11pt;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.55;
    background: var(--bg);
}

/* —— Layout: TOC + content —— */
.manual-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    min-height: 100vh;
}

/* Sidebar — larger type & targets for easier reading (accessibility) */
.manual-toc {
    position: sticky;
    top: var(--manual-chrome-h);
    height: calc(100vh - var(--manual-chrome-h));
    overflow-y: auto;
    background: #fafbff;
    border-right: 2px solid #e0e7ff;
    padding: 1.35rem 1.1rem 1.5rem;
    font-size: 1.05rem;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.manual-toc__heading,
.manual-toc h2 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3730a3;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.manual-toc__intro {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0 0 1.1rem;
    line-height: 1.5;
}

.manual-toc__section-label,
.manual-toc .toc-section {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 1.15rem 0 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

.manual-toc__group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.manual-toc a,
.manual-toc__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #1e1b4b;
    text-decoration: none;
    padding: 0.65rem 0.75rem;
    min-height: 2.75rem;
    border-radius: 8px;
    margin-bottom: 0;
    font-size: 1.05rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.manual-toc a:hover,
.manual-toc__link:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #312e81;
}

.manual-toc a:focus-visible,
.manual-toc__link:focus-visible {
    outline: 3px solid #818cf8;
    outline-offset: 2px;
}

.manual-toc__num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4f46e5;
    background: #e0e7ff;
    border-radius: 6px;
}

.manual-toc__link--home .manual-toc__num {
    font-size: 1rem;
}

.manual-toc__link--soon,
.manual-toc a[aria-disabled="true"] {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
    font-weight: 500;
    opacity: 1;
}

.manual-toc__link--soon .manual-toc__num,
.manual-toc a[aria-disabled="true"] .manual-toc__num {
    background: #e5e7eb;
    color: #9ca3af;
}

.manual-toc__badge-soon {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.manual-toc .toc-back {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 2px solid #e0e7ff;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.manual-toc .toc-back a {
    font-size: 1rem;
    font-weight: 600;
    color: #4338ca;
}

/* In-page section links (module guides) — slightly compact but still readable */
.manual-toc:not(.manual-toc--index) a {
    font-size: 1rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.7rem;
}

.manual-toc:not(.manual-toc--index) > a::before {
    content: "§";
    flex-shrink: 0;
    width: 1.25rem;
    font-weight: 700;
    color: #818cf8;
    font-size: 0.9rem;
}

.manual-content {
    padding: 2rem 2.5rem 5rem;
    max-width: 52rem;
    background: #fff;
    margin: 0.75rem 0.75rem 0.75rem 0;
    border-radius: 14px 0 0 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(79, 70, 229, 0.06);
}

body.manual-has-chrome .manual-toc {
    padding-bottom: 3.75rem;
}

/* In-content badges & callouts */
.manual-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    vertical-align: middle;
}

.manual-pill--admin {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.manual-pill--url {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
    font-family: ui-monospace, Consolas, monospace;
    font-weight: 600;
}

.manual-callout {
    background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 100%);
    border: 1px solid #e0e7ff;
    border-left: 4px solid var(--brand);
    border-radius: 0 10px 10px 0;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.manual-callout strong {
    color: var(--brand-dark);
}

.manual-callout ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.manual-screen-list {
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
    padding: 0;
    list-style: none;
}

.manual-screen-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.92rem;
}

.manual-screen-list li::before {
    content: "▸";
    color: var(--brand);
    font-weight: 700;
    flex-shrink: 0;
}

.manual-table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 1.25rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.manual-table-wrap table {
    margin: 0;
}

.manual-table-wrap th {
    background: #f8fafc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}

/* —— Cover —— */
.manual-cover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    page-break-after: always;
}

.manual-cover .org {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0 0 0.25rem;
}

.manual-cover h1 {
    margin: 0 0 0.5rem;
    font-size: 1.85rem;
    font-weight: 700;
}

.manual-cover .meta {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

.manual-cover .badge {
    display: inline-block;
    margin-top: 1rem;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

/* Index cover: VCWD logo + title + author */
.manual-cover-top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.manual-cover-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 6px;
}

.manual-cover-titles {
    flex: 1;
    min-width: 0;
}

.manual-cover-titles .org {
    margin: 0 0 0.25rem;
}

.manual-cover-titles h1 {
    margin: 0;
}

.manual-cover-developer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 1rem;
}

.manual-cover-author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-size: 0.88rem;
    opacity: 0.95;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.manual-cover-author-name {
    font-weight: 600;
}

.manual-cover-author-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
}

/* Circular LinkedIn button (beside developer name) */
.manual-linkedin-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0a66c2;
    color: #fff !important;
    text-decoration: none;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    vertical-align: middle;
}

.manual-linkedin-circle i {
    font-size: 0.72rem;
    line-height: 1;
}

.manual-linkedin-circle:hover {
    background: #004182;
    transform: scale(1.06);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    color: #fff !important;
}

.manual-linkedin-circle--light {
    border-color: rgba(255, 255, 255, 0.9);
}

.manual-linkedin-circle--sm {
    width: 22px;
    height: 22px;
}

.manual-linkedin-circle--sm i {
    font-size: 0.62rem;
}

.manual-linkedin-circle--footer {
    border-color: var(--border);
    box-shadow: none;
}

/* Circular Facebook Messenger button */
.manual-facebook-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0084ff;
    color: #fff !important;
    text-decoration: none;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    vertical-align: middle;
}

.manual-facebook-circle i {
    font-size: 0.78rem;
    line-height: 1;
}

.manual-facebook-circle:hover {
    background: #006edc;
    transform: scale(1.06);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    color: #fff !important;
}

.manual-facebook-circle--light {
    border-color: rgba(255, 255, 255, 0.9);
}

.manual-facebook-circle--sm {
    width: 22px;
    height: 22px;
}

.manual-facebook-circle--sm i {
    font-size: 0.65rem;
}

.manual-facebook-circle--footer {
    border-color: var(--border);
    box-shadow: none;
}

.manual-cover-contact-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    margin-top: 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.95);
}

.manual-cover-contact-label a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.manual-cover-contact-label a:hover {
    color: #e0e7ff;
}

.manual-cover-contact-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.manual-fb-message-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    background: rgba(0, 132, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.manual-fb-message-text:hover {
    background: rgba(0, 132, 255, 0.55);
    color: #fff !important;
}

.manual-cover-author-link a.manual-cover-author-name {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.manual-cover-author-link a.manual-cover-author-name:hover {
    text-decoration: underline;
}

.manual-dev-byline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.manual-dev-byline--footer {
    gap: 0.3rem;
    vertical-align: middle;
}

.manual-cover-developer-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.manual-cover-author-role {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.95);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
}

.manual-tech-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-family: inherit;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.manual-tech-trigger:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.7);
}

.manual-cover-dev-print {
    display: none;
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Technology overview modal */
.manual-tech-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: min(720px, calc(100vw - 2rem));
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.manual-tech-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.manual-tech-modal__inner {
    padding: 0;
}

.manual-tech-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.manual-tech-modal__header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
    border: none;
    padding: 0;
}

.manual-tech-modal__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
}

.manual-tech-modal__close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.manual-tech-modal__intro {
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 0.92rem;
    color: var(--text);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.manual-tech-modal__intro p {
    margin: 0;
    line-height: 1.6;
}

.manual-tech-modal__ai {
    background: #f0f9ff;
    margin: 0 1rem 0.75rem;
    padding: 0.85rem 1rem !important;
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.manual-tech-modal__ai > p {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
}

.manual-tech-modal__ai > p:last-child {
    margin-bottom: 0;
}

.manual-tech-ai-models {
    margin: 0.35rem 0 0.5rem !important;
}

.manual-tech-ai-models .muted {
    color: var(--muted);
    font-weight: normal;
    font-size: 0.82em;
}

.manual-tech-ai-note {
    font-size: 0.85rem !important;
    color: var(--muted);
}

.manual-tech-modal__footer-dev {
    font-size: 0.88rem;
    color: var(--text);
}

.manual-tech-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
    padding: 1rem 1.5rem 0.5rem;
}

.manual-tech-modal__grid section h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.manual-tech-modal__grid ul {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
    font-size: 0.88rem;
    color: var(--text);
}

.manual-tech-modal__grid li {
    margin-bottom: 0.35rem;
}

.manual-tech-modal__full {
    grid-column: 1 / -1;
}

.manual-tech-modal__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid var(--border);
}

.manual-tech-modal__footer a:not(.manual-linkedin-circle) {
    color: var(--brand-dark);
    text-decoration: none;
}

.manual-tech-modal__footer a:not(.manual-linkedin-circle):hover {
    text-decoration: underline;
}

.manual-tech-modal__btn-close {
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.manual-tech-modal__btn-close:hover {
    background: var(--bg);
}

body.manual-modal-open {
    overflow: hidden;
}

.print-only {
    display: none;
}

/* —— Typography —— */
h2 {
    font-size: 1.35rem;
    color: var(--brand-dark);
    margin: 2rem 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 3px solid var(--brand);
    page-break-after: avoid;
}

h2:first-of-type { border-top: none; margin-top: 0; }

h3 {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
    page-break-after: avoid;
}

p { margin: 0 0 0.75rem; }

.lead { font-size: 1.05rem; color: var(--muted); }

.resume-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--brand);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.resume-box strong { color: var(--brand-dark); }

/* —— Tables —— */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1.25rem;
    font-size: 0.9rem;
    page-break-inside: avoid;
}

th, td {
    border: 1px solid var(--border);
    padding: 0.45rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f3f4f6;
    font-weight: 600;
}

/* —— Steps —— */
ol.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

ol.steps li {
    counter-increment: step;
    margin-bottom: 0.5rem;
    padding-left: 2.25rem;
    position: relative;
}

ol.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 1.6rem;
    height: 1.6rem;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.6rem;
}

/* —— Figures —— */
.figure {
    margin: 1rem 0 1.5rem;
    page-break-inside: avoid;
}

.figure img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.figure figcaption {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.35rem;
    text-align: center;
}

/* —— Lists & misc —— */
ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }

.note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 0.75rem 0;
}

.warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 0.75rem 0;
}

code {
    background: #f3f4f6;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.88em;
}

.manual-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

.manual-footer a {
    color: var(--brand-dark);
    text-decoration: none;
}

.manual-footer a:hover {
    text-decoration: underline;
}

/* —— Sticky header + footer chrome bars (all manual pages) —— */
body.manual-has-chrome,
body.manual-has-status-bar {
    padding-top: var(--manual-chrome-h);
    padding-bottom: var(--manual-chrome-h);
}

.manual-chrome-bar,
.manual-status-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.35;
    min-height: var(--manual-chrome-h);
}

.manual-chrome-bar--top {
    top: 0;
    border-bottom: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.35);
}

.manual-chrome-bar--bottom,
.manual-status-bar {
    bottom: 0;
    border-top: 1px solid #334155;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.35);
}

.manual-chrome-bar__inner,
.manual-status-bar__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    min-height: var(--manual-chrome-h);
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1rem;
}

.manual-chrome-bar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #f8fafc;
    text-decoration: none;
    min-width: 0;
}

.manual-chrome-bar__brand:hover {
    color: #fff;
}

.manual-chrome-bar__logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    padding: 2px;
}

.manual-chrome-bar__titles {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.manual-chrome-bar__titles strong {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manual-chrome-bar__titles small {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manual-chrome-bar__nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.manual-chrome-bar__link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.76rem;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #475569;
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.manual-chrome-bar__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: #64748b;
}

.manual-status-bar__copy {
    color: #cbd5e1;
}

.manual-status-bar__dev {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
}

.manual-status-bar__name {
    font-weight: 600;
    color: #f8fafc;
}

.manual-status-bar__links {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.manual-chrome-bar .manual-facebook-circle,
.manual-chrome-bar .manual-linkedin-circle,
.manual-status-bar .manual-facebook-circle,
.manual-status-bar .manual-linkedin-circle {
    border-color: #475569;
}

@media (max-width: 640px) {
    :root {
        --manual-chrome-h: 3.75rem;
    }

    .manual-chrome-bar__titles strong {
        font-size: 0.76rem;
    }

    .manual-chrome-bar__titles small {
        display: none;
    }

    .manual-chrome-bar__inner,
    .manual-status-bar__inner {
        flex-direction: row;
        align-items: center;
    }

    .manual-status-bar__inner {
        flex-wrap: wrap;
    }
}

@media print {
    body.manual-has-chrome,
    body.manual-has-status-bar {
        padding-top: 0;
        padding-bottom: 0;
    }

    .manual-chrome-bar,
    .manual-status-bar {
        display: none !important;
    }

    .manual-toc {
        top: 0;
        height: auto;
    }
}

/* —— Index page —— */
.index-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.index-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.index-card:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

.index-card h3 {
    margin: 0 0 0.35rem;
    color: var(--brand-dark);
    font-size: 1rem;
}

.index-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.index-card .status {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
}

/* —— Print / PDF —— */
@page {
    size: A4;
    margin: 18mm 16mm 20mm 16mm;
}

@media print {
    body { background: #fff; font-size: 10.5pt; }

    .no-print, .manual-toc, .manual-tech-modal { display: none !important; }

    .print-only {
        display: block !important;
    }

    .manual-layout {
        display: block;
    }

    .manual-content {
        padding: 0;
        max-width: none;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    .manual-cover {
        border-radius: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    h2 { page-break-before: always; }
    h2:first-of-type { page-break-before: avoid; }

    a[href^="http"]::after { font-size: 0.8em; color: #666; }
}

@media (max-width: 900px) {
    .manual-layout { grid-template-columns: 1fr; }
    .manual-toc {
        position: relative;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 2px solid #e0e7ff;
        padding: 1.25rem 1rem;
    }

    .manual-toc a,
    .manual-toc__link {
        font-size: 1.1rem;
        min-height: 3rem;
    }

    .manual-tech-modal__grid {
        grid-template-columns: 1fr;
    }
}
