/* Manual library page. Fluid on purpose: columns are proportions and minimums,
   never fixed pixel widths, so panels line up at any window size. */

.mn-page { padding: clamp(1rem, 3vw, 2.5rem); max-width: 90rem; margin: 0 auto; }

.mn-intro { margin-bottom: 1.25rem; }
.mn-eyebrow { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-red); font-weight: 700; margin: 0 0 0.4rem; }
.mn-h1 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0 0 0.6rem; color: var(--text-primary); }
.mn-lede { color: var(--text-secondary); max-width: 46rem; margin: 0 0 1rem; line-height: 1.55; }

.mn-banner { padding: 0.8rem 1rem; border-radius: var(--radius-md); background: var(--bg-inset); border: 1px solid var(--border-strong); color: var(--text-primary); line-height: 1.5; }
.mn-banner a { color: var(--accent-blue); font-weight: 600; }
.mn-banner.is-warn { border-color: var(--accent-gold); }

.mn-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border-strong); margin-bottom: 1rem; overflow-x: auto; }
.mn-tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.7rem 1rem; font: inherit; font-weight: 600; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.mn-tab.is-active { color: var(--text-primary); border-bottom-color: var(--accent-red); }
.mn-tab:focus-visible, .mn-btn:focus-visible, .mn-chip:focus-visible, .mn-open:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

.mn-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.mn-input { flex: 1 1 16rem; min-width: 0; padding: 0.65rem 0.85rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.mn-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mn-chip { appearance: none; padding: 0.4rem 0.8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-full); background: var(--bg-surface); color: var(--text-secondary); font: inherit; font-size: 0.85rem; cursor: pointer; }
.mn-chip.is-active { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-surface); }



.mn-detail { min-width: 0; }
.mn-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.mn-detail-head h2 { margin: 0; font-family: var(--font-heading); font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
.mn-code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

.mn-eqmini { padding: 0.75rem 1rem; margin-bottom: 1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); line-height: 1.5; }
.mn-eqmini .mn-link { margin-left: 0.5rem; }

.mn-set { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); margin-bottom: 0.6rem; }
.mn-set > summary { list-style: none; cursor: pointer; padding: 0.8rem 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; }
.mn-set > summary::-webkit-details-marker { display: none; }
.mn-set > summary::before { content: '\25B8'; color: var(--text-muted); transition: transform 0.15s; }
.mn-set[open] > summary::before { transform: rotate(90deg); }
.mn-set-title { font-weight: 600; flex: 1 1 14rem; min-width: 0; }
.mn-meta { color: var(--text-muted); font-size: 0.85rem; }
.mn-files { border-top: 1px solid var(--border-subtle); }
.mn-file { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; padding: 0.55rem 1rem; }
.mn-file + .mn-file { border-top: 1px solid var(--border-subtle); }
.mn-file-title { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }

.mn-badge { display: inline-block; padding: 0.12rem 0.55rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; background: var(--bg-inset); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.mn-badge.ja { background: #fff4e0; color: var(--accent-gold); border-color: #ecd1a0; }
.mn-badge.excellent { background: #e2f6ee; color: var(--accent-emerald); border-color: #b5e2cf; }
.mn-badge.good { background: #e6eefc; color: var(--accent-blue); border-color: #bccdf3; }
.mn-badge.thin { background: #fff4e0; color: var(--accent-gold); border-color: #ecd1a0; }
.mn-badge.none { background: var(--bg-inset); color: var(--text-muted); }

.mn-btn, .mn-open { appearance: none; padding: 0.45rem 0.85rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: none; }
.mn-btn:hover, .mn-open:hover { background: var(--bg-card-hover); }
.mn-btn-strong, .mn-open.is-primary { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }
.mn-btn-strong:hover { background: var(--accent-red); filter: brightness(1.08); }
.mn-btn[disabled], .mn-open[disabled] { opacity: 0.5; cursor: default; }
.mn-link { appearance: none; background: none; border: 0; padding: 0; color: var(--accent-blue); font: inherit; cursor: pointer; text-decoration: underline; }

.mn-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); }

/* US equivalents */
.mn-note { max-width: 52rem; color: var(--text-secondary); line-height: 1.55; margin: 0 0 1rem; }
.mn-eq-group h3 { font-family: var(--font-heading); margin: 1.5rem 0 0.6rem; font-size: 1.05rem; color: var(--text-primary); }
.mn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 0.75rem; }
.mn-card { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.mn-card h4 { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: baseline; }
.mn-card p { margin: 0; line-height: 1.5; color: var(--text-secondary); font-size: 0.92rem; }
.mn-card ul { margin: 0; padding-left: 1.1rem; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.45; }
.mn-card .mn-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; }
.mn-evidence { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; font-size: 0.8rem; }
.mn-evidence a { color: var(--accent-blue); }
.mn-unconfirmed { color: var(--accent-gold); font-size: 0.85rem; }

/* Viewer */
.mn-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--bg-main); }
.mn-viewer[hidden] { display: none; }
.mn-v-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.6rem clamp(0.75rem, 2vw, 1.25rem); background: var(--bg-surface); border-bottom: 1px solid var(--border-strong); }
.mn-v-heading { display: flex; flex-direction: column; min-width: 0; flex: 1 1 14rem; }
.mn-v-title { font-weight: 700; overflow-wrap: anywhere; }
.mn-v-sub { color: var(--text-muted); font-size: 0.82rem; }
.mn-v-controls { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; }
.mn-v-page { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; }
.mn-v-page input { width: 4.5em; padding: 0.35rem 0.4rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; }
.mn-v-auto { font-size: 0.85rem; display: inline-flex; gap: 0.35rem; align-items: center; }
.mn-v-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.mn-v-body.has-tr { grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr); }
@media (max-width: 52rem) { .mn-v-body.has-tr { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } }
.mn-v-stage { overflow: auto; padding: 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; background: #5b6472; }
.mn-v-stage canvas { max-width: none; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.mn-v-status { color: #fff; font-size: 0.9rem; }
.mn-v-status:empty { display: none; }
.mn-v-tr { overflow: auto; padding: 0.9rem 1rem; background: var(--bg-surface); border-left: 1px solid var(--border-strong); }
.mn-v-tr-head { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; }
.mn-v-tr-warn { font-size: 0.82rem; color: var(--accent-gold); line-height: 1.4; }
.mn-v-tr-text, .mn-v-tr-ja { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-family: var(--font-main); font-size: 0.95rem; margin: 0; }
.mn-v-tr-ja { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--border-strong); color: var(--text-secondary); }


/* Parts cross-reference */
.pc-block { margin: 1.25rem 0; }
.pc-block h3 { font-family: var(--font-heading); font-size: 1.05rem; margin: 0 0 0.5rem; }
.pc-list { margin: 0; padding-left: 1.2rem; line-height: 1.55; color: var(--text-secondary); }
.pc-empty { color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; margin: 0; }
.pc-scroll { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); }
.pc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pc-table th, .pc-table td { padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-subtle); }
.pc-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); background: var(--bg-inset); white-space: nowrap; }
.pc-table tr:last-child td { border-bottom: 0; }
.pc-pn { font-family: var(--font-mono); font-size: 0.82rem; white-space: nowrap; }
.pc-select { flex: 1 1 12rem; }
.mn-badge.st-same { background: #e2f6ee; color: var(--accent-emerald); border-color: #b5e2cf; }
.mn-badge.st-similar { background: #e6eefc; color: var(--accent-blue); border-color: #bccdf3; }
.mn-badge.st-different { background: #fff4e0; color: var(--accent-gold); border-color: #ecd1a0; }
.mn-badge.st-jdm-only, .mn-badge.st-us-only { background: #fde8ee; color: var(--accent-red); border-color: #f5bccb; }


/* Embedded in the members' Service tab: no page header, no page title, tighter padding. */
.embed .app-header, .embed .mn-eyebrow, .embed .mn-h1, .embed .mn-lede { display: none; }
.embed .mn-page { padding: 0.75rem clamp(0.5rem, 2vw, 1rem); }
.embed .mn-intro { margin-bottom: 0.5rem; }

/* Make and Model drop-down boxes: side by side when there is room, stacked when there is not. */
.mn-pickers { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1rem; }
.mn-pickers label { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.mn-pickers select { flex: none; width: 100%; text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 0.95rem; color: var(--text-primary); }
