/* Duplex shares typography, controls, surfaces and semantic colors with DEM/OBS.
   Logos remain specific to the serving hostname. */
:root { --navy: var(--ce-text); --blue: var(--ce-primary); --ink: var(--ce-text); --muted: var(--ce-muted); --line: var(--ce-border); --paper: var(--ce-bg); --white: var(--ce-surface); --green: var(--ce-success); --radius: var(--ce-radius); font-family: var(--ce-font); color: var(--ink); background: var(--paper); font-synthesis: none; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 16px; line-height: 1.5; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }
:where(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
[hidden] { display: none !important; }
.topbar { min-height: 88px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 10px max(24px, calc((100vw - 1232px)/2)); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1rem; font-weight: 700; }
.brand small { display: block; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.brand-logo { display: block; width: 164px; height: 50px; object-fit: contain; background: white; padding: 4px 6px; border-radius: var(--radius); }
.brand-logo.cbox-logo { height: 60px; padding: 2px 6px; }
.header-right { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 16px; font-size: .8125rem; }
.header-right a { display: inline-flex; align-items: center; min-height: var(--ce-target); text-decoration: none; color: var(--blue); }
.header-right a:hover { text-decoration: underline; }
.header-right a span { margin-left: 6px; }
.header-tag { border: 1px solid var(--line); background: var(--ce-surface-subtle); border-radius: var(--radius); padding: 6px 10px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.workspace { max-width: 1232px; margin: 0 auto; padding: 32px 24px 0; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .05em; margin: 0 0 8px; color: var(--muted); }
.intro .eyebrow { display: flex; align-items: center; gap: 10px; }
.blue-line { height: 2px; width: 24px; background: var(--blue); }
h1 { font-size: clamp(2rem, 4vw, 2.625rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 750; margin: 0; }
h1 span { color: var(--blue); }
.intro-text { font-size: .9375rem; line-height: 1.6; color: var(--muted); max-width: 520px; margin: 12px 0 0; }
.intro-meta { font-size: .75rem; color: var(--muted); font-weight: 600; text-align: right; }
.intro-meta small { display: block; font-size: .75rem; margin-top: 8px; font-weight: 400; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 7px; }
.stepper { display: flex; gap: 4px; border: 1px solid var(--line); padding: 4px; background: var(--white); border-radius: var(--radius); margin-bottom: 24px; }
.step-button { flex: 1; min-width: 0; min-height: var(--ce-target); display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 10px 8px; border-radius: 4px; background: transparent; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.step-button:hover { background: var(--ce-surface-subtle); }
.step-button span { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); font-size: .75rem; }
.step-button.active { color: var(--blue); background: var(--ce-primary-soft); }
.step-button.active span { background: var(--ce-action-bg); color: white; border-color: var(--ce-action-bg); }
.step-button.done span { background: var(--ce-success-soft); color: var(--green); border-color: var(--ce-success-border); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.editor { min-width: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.section-heading .eyebrow { margin-bottom: 6px; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.015em; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 8px 0 0; }
.text-button { border: 0; min-height: var(--ce-target); padding: 8px 4px; background: none; font-size: .8125rem; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.section-heading .text-button { white-space: nowrap; }
.families { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.family-card { position: relative; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; background: var(--white); transition: border-color .15s, background .15s; min-height: 370px; display: flex; flex-direction: column; align-items: stretch; }
.family-card:hover { border-color: var(--blue); background: var(--ce-surface-subtle); }
.family-card.selected { border-color: var(--blue); background: var(--ce-primary-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.family-number { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.radio-mark { height: 18px; width: 18px; border: 1px solid var(--muted); border-radius: 50%; background: var(--white); }
.selected .radio-mark { border: 5px solid var(--ce-action-bg); }
.family-icon { color: var(--muted); margin-bottom: 12px; }
.selected .family-icon { color: var(--blue); }
.family-name { font-size: 1.1875rem; font-weight: 750; line-height: 1.3; margin: 0 0 6px; }
.family-tagline { font-size: .8125rem; line-height: 1.5; color: var(--muted); min-height: 40px; }
.family-features { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; font-size: .75rem; line-height: 1.5; }
.family-features span::before { content: '✓'; color: var(--blue); margin-right: 6px; }
.family-use { margin-top: auto; padding-top: 16px; font-size: .75rem; color: var(--muted); line-height: 1.5; }
.feature-ribbon { position: absolute; top: -12px; left: 16px; color: var(--blue); background: var(--ce-primary-soft); border: 1px solid var(--line); font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.range-note { background: var(--ce-surface-subtle); border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 12px; align-items: flex-start; padding: 16px; margin-top: 20px; color: var(--muted); }
.range-note svg { flex-shrink: 0; color: var(--blue); }
.range-note strong { font-size: .875rem; color: var(--ink); }
.range-note p { font-size: .8125rem; line-height: 1.6; margin: 5px 0 0; }
.editor-navigation { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
#navigation-note { color: var(--muted); font-size: .75rem; line-height: 1.5; flex: 1; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); padding: 10px 16px; font-size: .875rem; font-weight: 600; min-height: var(--ce-target); line-height: 1.4; text-align: center; }
.primary { border: 1px solid var(--ce-action-bg); background: var(--ce-action-bg); color: white; }
.primary:hover { background: var(--ce-action-hover); }
.primary span { margin-left: 12px; }
.secondary { background: var(--white); border: 1px solid var(--line); color: var(--blue); }
.secondary:hover { background: var(--ce-surface-subtle); border-color: var(--blue); }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: not-allowed; }
.summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: sticky; top: 20px; }
.summary-top { padding: 16px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.summary-top .eyebrow { margin: 0; }
.duplex-tag { font-size: .75rem; font-weight: 600; border: 1px solid var(--line); border-radius: 4px; padding: 4px 7px; color: var(--muted); }

/* The cabinet is an illustration: its material colors and miniature engraving
   intentionally remain independent of the interface theme. */
.panel-scene { height: 225px; position: relative; background: radial-gradient(ellipse at 50% 40%, #e7edf3, #f3f6f9 70%); display: grid; place-items: center; border-block: 1px solid var(--line); }
.panel-scene::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#b4c5d5 1px, transparent 1px); background-size: 15px 15px; opacity: .28; }
.cabinet { width: 133px; height: 178px; background: linear-gradient(110deg, #edf0f2, #fff 43%, #e4e9ec); border: 1px solid #aab7c1; border-radius: 3px; box-shadow: 9px 8px 0 #c6d0d780, 12px 15px 20px #12334f22; position: relative; z-index: 1; padding: 12px; }
.cabinet::before, .cabinet::after { content: ''; position: absolute; left: -4px; width: 4px; height: 13px; background: #97a6b2; top: 33px; }
.cabinet::after { top: auto; bottom: 29px; }
.cabinet-brand { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #26445f; }
.cabinet-family { font-size: 5px; color: #647d8f; letter-spacing: .6px; margin-top: 2px; }
.cabinet-display { height: 42px; background: #102c49; border: 4px solid #4b5b68; border-radius: 3px; color: #7cc8ee; font: 8px monospace; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 4px; margin-top: 15px; }
.cabinet-lights { display: flex; justify-content: space-evenly; margin-top: 15px; }
.cabinet-lights i { width: 9px; height: 9px; background: #3b9371; border-radius: 50%; border: 2px solid #b6c4bd; box-shadow: 0 0 3px #26735555; }
.cabinet-lights i:last-child { background: #d27c53; border-color: #dfc5b9; }
.cabinet-controls { display: flex; justify-content: space-around; margin-top: 10px; }
.cabinet-controls i { width: 15px; height: 15px; background: #334451; border: 3px solid #9caab4; border-radius: 50%; }
.cabinet-labels { display: flex; justify-content: space-around; font-size: 4px; letter-spacing: .7px; color: #5e7282; margin-top: 5px; }
.cabinet-handle { position: absolute; right: 5px; top: 105px; width: 4px; height: 18px; background: #576a79; border-radius: 2px; }
.cabinet-bottom { height: 5px; position: absolute; bottom: 7px; left: 12px; right: 12px; background: #1688e8; }
.preview-callout { position: absolute; bottom: 8px; font-size: .75rem; color: #526a80; }
.summary-body { padding: 20px; }
.summary-product { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.summary-product .eyebrow { margin-bottom: 6px; }
.summary-product h3 { font-size: 1.375rem; font-weight: 750; margin: 0; line-height: 1.25; }
.summary-code { font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.summary-description { font-size: .8125rem; line-height: 1.6; color: var(--muted); margin: 10px 0 16px; }
.summary dl { border-block: 1px solid var(--line); padding: 14px 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; line-height: 1.5; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; max-width: 175px; overflow-wrap: anywhere; }
.option-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 8px; }
.option-pills span { color: var(--muted); background: var(--ce-surface-subtle); border: 1px solid var(--line); border-radius: 4px; padding: 4px 7px; font-size: .75rem; }
.quote-note { display: flex; align-items: flex-start; margin: 16px 0; }
.quote-note .status-dot { margin-top: 6px; flex-shrink: 0; }
.quote-note strong { font-size: .875rem; }
.quote-note p { font-size: .75rem; color: var(--muted); margin: 5px 0 0; line-height: 1.5; }
.summary-review { width: 100%; font-size: .8125rem; }
.illustration-note { font-size: .75rem; line-height: 1.5; text-align: center; color: var(--muted); margin: 12px 0 0; }
.bottom-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--line); padding: 24px 0; margin-top: 32px; }
.bottom-strip > div { display: flex; gap: 12px; align-items: center; }
.strip-number { font-size: 1.5rem; color: var(--muted); font-weight: 600; }
.bottom-strip p { margin: 0; }
.bottom-strip strong { display: block; font-size: .8125rem; font-weight: 600; }
.bottom-strip small { font-size: .75rem; color: var(--muted); display: block; line-height: 1.5; margin-top: 4px; }
footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; align-items: center; font-size: .75rem; color: var(--muted); padding: 16px max(24px, calc((100vw - 1184px)/2)); background: var(--white); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0 0 16px; }
.form-card h3 { font-size: .9375rem; margin: 0 0 18px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; color: var(--muted); min-width: 0; }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ce-input); color: var(--ink); padding: 10px 12px; width: 100%; min-height: var(--ce-target); font-size: 1rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field small { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.field.full { grid-column: 1/-1; }
.field textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: .8125rem; color: var(--muted); line-height: 1.6; margin: 16px 0 0; }
.check-row { display: flex; gap: 12px; align-items: flex-start; min-height: var(--ce-target); margin: 12px 0; font-size: .875rem; line-height: 1.5; cursor: pointer; }
.check-row input { accent-color: var(--ce-action-bg); width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.check-row small { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.tile-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice-tile { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 14px 12px; min-height: var(--ce-target); font-size: .875rem; text-align: left; line-height: 1.5; }
.choice-tile.active { border-color: var(--blue); background: var(--ce-primary-soft); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.choice-tile:disabled { opacity: .5; cursor: not-allowed; }
.choice-tile small { display: block; color: var(--muted); font-size: .75rem; margin-top: 5px; }
.included-card { display: flex; gap: 12px; border: 1px solid var(--ce-success-border); background: var(--ce-success-soft); padding: 16px; border-radius: var(--radius); margin-bottom: 16px; color: var(--green); }
.included-card strong { font-size: .875rem; }
.included-card p { font-size: .8125rem; line-height: 1.6; margin: 6px 0 0; }
.review-table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.5; }
.review-table td { padding: 12px 0; border-bottom: 1px solid var(--ce-border-soft); }
.review-table td:first-child { width: 43%; color: var(--muted); padding-right: 12px; }
.review-table td:last-child { font-weight: 600; overflow-wrap: anywhere; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.error-box { padding: 16px; background: var(--ce-danger-soft); border: 1px solid var(--ce-danger-border); border-radius: var(--radius); font-size: .875rem; color: var(--ce-danger); line-height: 1.6; margin-top: 16px; }
.error-box p { margin: 0; }
dialog { border: 1px solid var(--line); border-radius: var(--ce-radius-large); background: var(--white); color: var(--ink); padding: 28px; max-width: 850px; width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--ce-shadow-menu); }
dialog::backdrop { background: rgb(15 28 45 / 55%); }
.dialog-header { display: flex; gap: 20px; justify-content: space-between; margin-bottom: 24px; }
.close-button { width: var(--ce-target); height: var(--ce-target); flex-shrink: 0; font-size: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.comparison-wrap { overflow-x: auto; }
.comparison-table { border-collapse: collapse; width: 100%; font-size: .8125rem; min-width: 590px; }
.comparison-table td, .comparison-table th { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; line-height: 1.5; }
.comparison-table th { color: var(--ink); background: var(--ce-surface-subtle); }
.comparison-table th:first-child { color: var(--muted); }
.comparison-table td:first-child { font-weight: 600; }
.dialog-note { font-size: .8125rem; line-height: 1.6; color: var(--muted); margin: 20px 0 0; }
#reset-dialog { max-width: 530px; }
#reset-dialog p { font-size: .9375rem; line-height: 1.6; color: var(--muted); margin: 18px 0; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 20px; z-index: 20; background: var(--ce-text); color: var(--ce-surface); border-radius: var(--radius); box-shadow: var(--ce-shadow-menu); font-size: .875rem; max-width: 90vw; text-align: center; }
.account-button { min-height: var(--ce-target); background: var(--white); border: 1px solid var(--line); color: var(--blue); border-radius: var(--radius); padding: 8px 12px; font-size: .8125rem; font-weight: 600; }
.account-button:hover { background: var(--ce-surface-subtle); border-color: var(--blue); }
#account-dialog { max-width: 520px; }
#account-dialog .field { margin-bottom: 16px; }
.account-copy { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 10px 0 20px; }
.account-submit { width: 100%; margin: 18px 0; }
.account-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.account-links a { display: inline-flex; min-height: var(--ce-target); align-items: center; }
.account-microsoft { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.account-link { display: flex; text-align: center; text-decoration: none; margin: 12px 0; }
.account-link.disabled { opacity: .5; cursor: not-allowed; }
.account-success { background: var(--ce-success-soft); border: 1px solid var(--ce-success-border); color: var(--green); font-size: .875rem; line-height: 1.6; padding: 16px; border-radius: var(--radius); }
.account-identity { font-weight: 600; font-size: 1rem; overflow-wrap: anywhere; }
.account-microsoft .account-copy { font-size: .75rem; margin-bottom: 0; }
.print-sheet { display: none; }
.request-submit { width: 100%; margin-top: 20px; }
#request-error { margin-top: 16px; }
.request-receipt { border: 1px solid var(--ce-success-border); border-left: 4px solid var(--green); background: var(--ce-success-soft); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.request-receipt h3 { font-size: 1.25rem; margin: 8px 0; overflow-wrap: anywhere; }
.request-receipt p { font-size: .875rem; line-height: 1.6; margin: 8px 0; }
.request-receipt button { margin-top: 12px; }
button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 1080px) {
    .layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
    .families { grid-template-columns: 1fr; }
    .family-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 12px; min-height: 0; padding: 20px; }
    .card-top { grid-column: 1/-1; margin-bottom: 12px; }
    .family-icon { grid-row: 2/4; margin: 0; }
    .family-tagline { min-height: 0; }
    .family-features { grid-column: 2; margin-top: 12px; padding-top: 12px; }
    .family-use { grid-column: 2; padding-top: 12px; }
    .section-heading { flex-wrap: wrap; gap: 8px; }
    .editor-navigation { flex-wrap: wrap; }
    #navigation-note { order: 3; flex-basis: 100%; }
    .editor-navigation .primary { margin-left: auto; }
}
@media (max-width: 800px) {
    .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .header-right { justify-content: flex-start; }
    .layout { grid-template-columns: minmax(0, 1fr); }
    .workspace { padding: 24px 16px 0; }
    .summary { position: static; }
    .panel-scene { height: 215px; }
    .intro-meta { display: none; }
    .intro { margin-bottom: 24px; }
    .stepper { flex-wrap: wrap; }
    .step-button { flex: 1 1 calc(33.333% - 8px); }
    .bottom-strip { grid-template-columns: 1fr; gap: 16px; }
    footer { padding: 16px; flex-wrap: wrap; }
}
@media (max-width: 520px) {
    .brand-logo { width: 148px; height: 45px; }
    .brand-logo.cbox-logo { height: 54px; }
    .header-tag { display: none; }
    .header-right { width: 100%; justify-content: space-between; }
    .intro-text { font-size: .875rem; }
    .step-button { flex-direction: column; gap: 6px; padding: 10px 6px; }
    .form-grid, .tile-options { grid-template-columns: minmax(0, 1fr); }
    .form-card { padding: 18px 16px; }
    .choice-tile { padding: 12px 14px; }
    .review-actions { flex-direction: column; }
    .review-actions button { width: 100%; }
    dialog { padding: 20px; }
    .dialog-actions { flex-direction: column; }
    .summary-body { padding: 18px; }
    .summary-row { gap: 8px; }
    .summary dd { max-width: 60%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
    body { background: white; color: #26282c; }
    .topbar, .workspace, footer, dialog, .toast, noscript { display: none !important; }
    .print-sheet { display: block !important; padding: 20px; max-width: 800px; margin: auto; }
    .print-sheet h1 { font-size: 28px; margin-bottom: 8px; }
    .print-sheet > p, .print-sheet .project-print { font-size: 12px; line-height: 1.6; }
    .print-sheet .review-table { font-size: 12px; }
    .print-sheet .review-table td { padding: 7px 0; }
    .print-sheet .project-print { white-space: pre-wrap; }
    .print-sheet tr { break-inside: avoid; }
    @page { size: letter; margin: 14mm; }
}
