/* ROTOCON Configurator — styles. Built on brand tokens (assets/colors_and_type.css). */
:root { --ui-accent: #FF0000; --nav-h: 60px; --specs-h: 92px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: var(--rwo-font); color: var(--rwo-text); background: var(--rwo-cream); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }

/* ===== Machine catalogue (full-screen) ===== */
.cat { position: fixed; inset: 0; z-index: 120; background: var(--rwo-cream); display: flex; flex-direction: column; opacity: 1; animation: catin var(--rwo-dur-mid) var(--rwo-ease); }
@keyframes catin { from { transform: translateY(8px); } to { transform: none; } }
.cat__head { padding: 1.6rem 2.4rem 1.2rem; border-bottom: 1px solid var(--rwo-line); position: relative; flex-shrink: 0; }
.cat__brand { display: flex; align-items: center; gap: .9rem; }
.cat__med { height: 38px; }
.cat__h1 { font-size: 26px; font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; margin: 1px 0 0; line-height: 1; }
.cat__intro { font-size: 14px; color: var(--rwo-text-muted); margin: .9rem 0 0; max-width: 760px; line-height: 1.55; }
.cat__intro .de { font-style: italic; }
.cat__close { position: absolute; top: 1.4rem; right: 1.6rem; border: 1px solid var(--rwo-line-strong); background: #fff; width: 38px; height: 38px; border-radius: var(--rwo-r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); }
.cat__close:hover { border-color: var(--rwo-black-grey); }
.cat__scroll { overflow-y: auto; padding: 1.6rem 2.4rem; flex: 1; min-height: 0; }
.cat__group { margin-bottom: 1.8rem; }
.cat__grouplbl { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rwo-text-muted); display: flex; align-items: center; gap: .5em; margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--rwo-line); }
.cat__grouplbl svg { color: var(--ui-accent); }
.cat__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1.4rem; align-items: start; }
.cat__pad { height: 1.5rem; }
.fcard { text-align: left; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); overflow: hidden; cursor: pointer; background: #fff; transition: all var(--rwo-dur-fast) var(--rwo-ease); display: flex; flex-direction: column; }
.fcard:hover { box-shadow: var(--rwo-shadow-md); transform: translateY(-2px); }
.fcard.on { border-color: var(--ui-accent); box-shadow: 0 0 0 1px var(--ui-accent); }
.fcard__photo { aspect-ratio: 16 / 9; background: var(--rwo-bg-warm, #efe9dd); overflow: hidden; }
.fcard__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--rwo-dur-mid) var(--rwo-ease); }
.fcard:hover .fcard__photo img { transform: scale(1.04); }
.fcard__body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.fcard__top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.fcard__name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.fcard__tag { display: inline-flex; align-items: center; gap: .25em; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .45rem; border-radius: var(--rwo-r-pill); }
.fcard__tag.is3d { background: color-mix(in srgb, var(--ui-accent) 12%, #fff); color: var(--ui-accent); }
.fcard__tag.isspec { background: rgba(64,62,61,.08); color: var(--rwo-text-muted); }
.fcard__kind { font-size: 12.5px; color: var(--rwo-text-muted); margin-top: 2px; }
.fcard__models { font-size: 11.5px; font-weight: 600; color: var(--rwo-text); margin-top: .5rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.fcard__cta { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--rwo-line); font-size: 12.5px; font-weight: 600; color: var(--ui-accent); display: inline-flex; align-items: center; gap: .35em; }

/* nav machines button */
.nav__machines, .nav__wiz, .nav__ai { display: inline-flex; align-items: center; gap: .4em; border: 1px solid var(--rwo-line-strong); background: #fff; border-radius: var(--rwo-r-sm); padding: .4rem .7rem; font-size: 12.5px; font-weight: 600; color: var(--rwo-text); cursor: pointer; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.nav__machines:hover, .nav__wiz:hover, .nav__ai:hover { border-color: var(--rwo-black-grey); background: rgba(64,62,61,.04); }
.nav__machines svg { color: var(--ui-accent); }

/* sidebar current-machine row */
.side__machine { display: flex; align-items: center; gap: .6rem; padding: .65rem .7rem; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); background: var(--rwo-cream); margin-bottom: 1.1rem; }
.side__machine-info { flex: 1; min-width: 0; }
.side__machine-name { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.side__machine-kind { display: block; font-size: 11px; color: var(--rwo-text-muted); margin-top: 1px; }
.side__machine-change { display: inline-flex; align-items: center; gap: .3em; border: 1px solid var(--rwo-line-strong); background: #fff; border-radius: var(--rwo-r-sm); padding: .35rem .55rem; font-size: 11.5px; font-weight: 600; color: var(--rwo-text); cursor: pointer; white-space: nowrap; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.side__machine-change:hover { border-color: var(--rwo-black-grey); }
.side__machine-change svg { color: var(--ui-accent); }
.wbtn__model { font-size: 9px; font-weight: 600; color: var(--rwo-text-muted); letter-spacing: .03em; margin-top: 1px; }

/* ===== Spec sheet modal ===== */
.modal__box.spec { width: min(960px, 100%); max-height: 92vh; }
.spec__grid { display: grid; grid-template-columns: 320px 1fr; max-height: 92vh; }
.spec__visual { background: var(--rwo-cream); display: flex; flex-direction: column; }
.spec__visual img { width: 100%; flex: 1; object-fit: cover; min-height: 0; }
.spec__vcap { padding: 1rem 1.2rem; border-top: 1px solid var(--rwo-line); }
.spec__vcap strong { display: block; font-size: 15px; font-weight: 600; margin-top: 3px; }
.spec__trims { display: flex; gap: .35rem; margin-top: .6rem; }
.spec__trim { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .18rem .5rem; border-radius: var(--rwo-r-pill); background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.spec__trimrow { display: flex; align-items: center; gap: .4rem; margin: .2rem 0 .1rem; font-size: 12px; color: var(--rwo-text-muted); }
.spec__trim.on { background: var(--rwo-cream); color: var(--rwo-text); border: 1px solid var(--rwo-line-strong); }
.spec__panel { padding: 1.7rem 1.9rem; overflow-y: auto; }
.spec__tag { font-size: 14px; font-weight: 500; color: var(--rwo-text); margin: .5rem 0 .7rem; line-height: 1.5; }
.spec__blurb { font-size: 13px; color: var(--rwo-text-muted); margin: 0 0 1.3rem; line-height: 1.6; }
.spec__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.spec__lbl { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rwo-text-muted); margin-bottom: .6rem; }
.spec__params { width: 100%; border-collapse: collapse; }
.spec__params td { padding: .4rem 0; border-bottom: 1px solid var(--rwo-line); font-size: 12.5px; vertical-align: top; }
.spec__params td:first-child { color: var(--rwo-text-muted); width: 52%; }
.spec__params td:last-child { font-weight: 600; text-align: right; }
.spec__opts { list-style: none; margin: 0; padding: 0; }
.spec__opts li { font-size: 12.5px; padding: .28rem 0 .28rem 1rem; position: relative; color: var(--rwo-text); }
.spec__opts li::before { content: ''; position: absolute; left: 0; top: .72rem; width: 5px; height: 5px; background: var(--ui-accent); border-radius: 50%; }
.spec__feats { display: flex; flex-wrap: wrap; gap: .35rem; }
.spec__feat { font-size: 11.5px; font-weight: 500; background: var(--rwo-cream); border: 1px solid var(--rwo-line); padding: .25rem .55rem; border-radius: var(--rwo-r-sm); }
.spec__cta { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--rwo-line); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.spec__form { display: flex; gap: .5rem; flex: 1; min-width: 260px; }
.spec__form input { font-family: inherit; font-size: 13px; padding: .55rem .6rem; border: 1px solid var(--rwo-line-strong); border-radius: var(--rwo-r-sm); width: 100%; }
.spec__form input:focus { outline: none; border-color: var(--ui-accent); }
.spec__ok { margin-top: 1.5rem; padding: .9rem 1.1rem; background: rgba(31,122,68,.08); color: #1f6e3f; border-radius: var(--rwo-r-md); font-size: 13px; display: flex; align-items: center; gap: .5em; line-height: 1.5; }
@media (max-width: 760px) { .spec__grid { grid-template-columns: 1fr; } .spec__cols { grid-template-columns: 1fr; } .cat__grid { grid-template-columns: 1fr; } }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ui-accent); margin: 0; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: .5em; border: none; border-radius: var(--rwo-r-sm); cursor: pointer; font-weight: 600; letter-spacing: .01em; transition: all var(--rwo-dur-fast) var(--rwo-ease); white-space: nowrap; }
.btn--sm { font-size: 13px; padding: .5rem .75rem; }
.btn--md { font-size: 14px; padding: .6rem .9rem; }
.btn--lg { font-size: 15px; padding: .8rem 1.3rem; }
.btn--primary { background: var(--ui-accent); color: #fff; }
.btn--primary:hover { filter: brightness(.92); transform: translateY(-1px); }
.btn--dark { background: var(--rwo-black-grey); color: #fff; }
.btn--dark:hover { background: #2d2c2b; }
.btn--ghost { background: transparent; color: var(--rwo-text); border: 1px solid var(--rwo-line-strong); }
.btn--ghost:hover { border-color: var(--rwo-black-grey); background: rgba(64,62,61,.04); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---- segmented ---- */
.seg { display: inline-flex; background: rgba(64,62,61,.06); border-radius: var(--rwo-r-sm); padding: 3px; gap: 2px; }
.seg--full { display: flex; }
.seg--full .seg__b { flex: 1; justify-content: center; }
.seg__b { border: none; background: transparent; padding: .45rem .8rem; border-radius: 3px; font-size: 13px; font-weight: 600; color: var(--rwo-text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: .4em; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.seg__b.on { background: #fff; color: var(--rwo-text); box-shadow: var(--rwo-shadow-sm); }

/* ---- stepper ---- */
.stepper { display: inline-flex; align-items: center; gap: .35rem; }
.stepper button { width: 34px; height: 34px; border: 1px solid var(--rwo-line-strong); background: #fff; border-radius: var(--rwo-r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.stepper button:hover:not(:disabled) { border-color: var(--rwo-black-grey); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper__v { min-width: 52px; text-align: center; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.stepper__v em { font-size: 12px; font-style: normal; color: var(--rwo-text-muted); margin-left: 2px; }

/* ================= layout ================= */
.cfg { display: grid; grid-template-rows: var(--nav-h) 1fr var(--specs-h); height: 100vh; }
.cfg__main { display: grid; grid-template-columns: 1fr 384px; min-height: 0; }

/* ---- top nav ---- */
.nav { display: flex; align-items: center; gap: 1.2rem; padding: 0 1.1rem; background: #fff; border-bottom: 1px solid var(--rwo-line); }
.nav__brand { display: flex; align-items: center; gap: .6rem; }
.nav__med { height: 26px; }
.nav__wm { height: 17px; }
.nav__sep { width: 1px; height: 22px; background: var(--rwo-line-strong); margin: 0 .2rem; }
.nav__app { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--rwo-text-muted); }
.nav__wiz { margin-left: .7rem; border: 1px solid var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 6%, #fff); color: var(--ui-accent); font-family: inherit; font-weight: 600; font-size: 12.5px; padding: .4rem .7rem; border-radius: var(--rwo-r-pill); cursor: pointer; display: inline-flex; align-items: center; gap: .4em; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.nav__wiz:hover { background: var(--ui-accent); color: #fff; }
.nav__ai { margin-left: .4rem; border: 1px solid var(--rwo-line-strong); background: var(--rwo-black-grey); color: #fff; font-family: inherit; font-weight: 600; font-size: 12.5px; padding: .4rem .7rem; border-radius: var(--rwo-r-pill); cursor: pointer; display: inline-flex; align-items: center; gap: .4em; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.nav__ai:hover { background: #2d2c2b; }
.nav__ai svg { color: var(--ui-accent); }

/* AI assistant */
.ai__input { width: 100%; font-family: inherit; font-size: 14.5px; line-height: 1.5; padding: .8rem .9rem; border: 1.5px solid var(--rwo-line-strong); border-radius: var(--rwo-r-md); resize: none; color: var(--rwo-text); margin-bottom: .8rem; }
.ai__input:focus { outline: none; border-color: var(--ui-accent); }
.ai__ex { display: flex; flex-wrap: wrap; gap: .4rem; }
.ai__exchip { font-size: 11.5px; color: var(--rwo-text-muted); background: var(--rwo-cream); border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-pill); padding: .3rem .6rem; cursor: pointer; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.ai__exchip:hover { border-color: var(--ui-accent); color: var(--ui-accent); }
.ai__loading { text-align: center; padding: 3rem 1rem; }
.ai__spin { width: 38px; height: 38px; border: 3px solid var(--rwo-line); border-top-color: var(--ui-accent); border-radius: 50%; margin: 0 auto 1.1rem; animation: aispin .8s linear infinite; }
@keyframes aispin { to { transform: rotate(360deg); } }
.ai__loading p { font-size: 16px; font-weight: 600; margin: 0 0 .3rem; }
.ai__loading span { font-size: 13px; color: var(--rwo-text-muted); }
.ai__note { font-size: 11.5px; color: var(--rwo-text-muted); display: flex; align-items: center; gap: .35em; background: var(--rwo-cream); border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-sm); padding: .5rem .7rem; margin: 0 0 .4rem; }
.nav__roles { display: flex; gap: 2px; background: rgba(64,62,61,.06); border-radius: var(--rwo-r-sm); padding: 3px; margin-left: .4rem; }
.nav__role { border: none; background: transparent; padding: .4rem .7rem; border-radius: 3px; font-size: 12.5px; font-weight: 600; color: var(--rwo-text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: .4em; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.nav__role.on { background: #fff; color: var(--rwo-text); box-shadow: var(--rwo-shadow-sm); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.nav__price { text-align: right; margin-right: .3rem; line-height: 1.1; }
.nav__pricelbl { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--rwo-text-muted); }
.nav__priceval { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }

/* ---- viewport ---- */
.vp { position: relative; overflow: hidden; background: var(--rwo-cream); }
.vp__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* photo stage */
.pstage { position: absolute; inset: 0; overflow: hidden; }
.pstage__photo { position: absolute; inset: 0; }
.pstage__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.pstage__scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 56%; background: linear-gradient(to bottom, rgba(64,62,61,0) 0%, rgba(64,62,61,.04) 45%, rgba(64,62,61,.14) 100%); pointer-events: none; }
.pstage__cap { display: none; }
.pstage__line { position: absolute; left: 0; right: 0; bottom: 0; padding: .75rem 1.1rem 1rem; background: linear-gradient(to top, rgba(255,255,255,.94) 60%, rgba(255,255,255,0)); }
.pstage__linehdr { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.pstage__linelbl { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rwo-text-muted); }
.pstage__linelen { font-size: 11px; font-weight: 600; color: var(--rwo-text); font-variant-numeric: tabular-nums; }
.pstage__chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pstage__chips::-webkit-scrollbar { height: 5px; }
.pstage__chips::-webkit-scrollbar-thumb { background: var(--rwo-line-strong); border-radius: 3px; }
.pchip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 84px; max-width: 150px; padding: .5rem .6rem; border: 1px solid var(--rwo-line-strong); border-top: 2px solid var(--pstage-accent, var(--ui-accent)); border-radius: var(--rwo-r-sm); background: #fff; cursor: pointer; text-align: left; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.pchip:hover { border-color: var(--rwo-black-grey); box-shadow: var(--rwo-shadow-sm); transform: translateY(-1px); }
.pchip.on { box-shadow: 0 0 0 1px var(--pstage-accent, var(--ui-accent)); border-color: var(--pstage-accent, var(--ui-accent)); }
.pchip__pos { font-size: 9.5px; font-weight: 600; color: var(--rwo-text-muted); font-variant-numeric: tabular-nums; }
.pchip__lbl { font-size: 12px; font-weight: 600; color: var(--rwo-text); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pchip--base { background: var(--rwo-black-grey); border-top-color: var(--pstage-accent, var(--ui-accent)); }
.pchip--base .pchip__pos { color: rgba(255,255,255,.6); }
.pchip--base .pchip__lbl { color: #fff; }

/* unit configurator */
.unit__params { width: 100%; border-collapse: collapse; }
.unit__params td { padding: .4rem 0; border-bottom: 1px solid var(--rwo-line); font-size: 12.5px; vertical-align: top; }
.unit__params td:first-child { color: var(--rwo-text-muted); width: 54%; }
.unit__params td:last-child { font-weight: 600; text-align: right; }
.unit__specbtn { display: inline-flex; align-items: center; gap: .4em; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; border-radius: var(--rwo-r-sm); padding: .55rem .8rem; font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.unit__specbtn:hover { background: rgba(255,255,255,.12); }
.vp__topbar { position: absolute; top: 18px; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.vp__title h1 { font-size: 26px; font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; margin: 2px 0 0; line-height: 1; }
.vp__title h1 span { color: var(--rwo-text-muted); font-weight: 500; }
.vp__hint { font-size: 12px; color: var(--rwo-text-muted); display: flex; align-items: center; gap: .4em; background: rgba(255,255,255,.7); backdrop-filter: blur(6px); padding: .35rem .6rem; border-radius: var(--rwo-r-pill); }
.vp__tip { position: absolute; pointer-events: none; background: var(--rwo-black-grey); color: #fff; font-size: 12px; font-weight: 600; padding: .3rem .55rem; border-radius: var(--rwo-r-sm); z-index: 6; white-space: nowrap; box-shadow: var(--rwo-shadow-md); }

.vp__tools { position: absolute; left: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 6px; }
.vp__tools button { width: 40px; height: 40px; border: 1px solid var(--rwo-line); background: rgba(255,255,255,.86); backdrop-filter: blur(8px); border-radius: var(--rwo-r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.vp__tools button:hover { background: #fff; box-shadow: var(--rwo-shadow-sm); }
.vp__tools button.on { background: var(--rwo-black-grey); color: #fff; border-color: var(--rwo-black-grey); }

.vp__swatches { position: absolute; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.86); backdrop-filter: blur(8px); padding: 8px 10px; border-radius: var(--rwo-r-pill); border: 1px solid var(--rwo-line); }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform var(--rwo-dur-fast) var(--rwo-ease); }
.sw:hover { transform: scale(1.12); }
.sw.on { border-color: var(--rwo-text); }
.sw--black { background: #222324; } .sw--blue { background: #163a5e; } .sw--graphite { background: #3b4045; } .sw--white { background: #e9e8e4; }
.vp__swdiv { width: 1px; height: 20px; background: var(--rwo-line-strong); }

/* real-machine reference photo */
.vp__ref { position: absolute; right: 22px; bottom: 78px; width: 248px; background: #fff; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); overflow: hidden; box-shadow: var(--rwo-shadow-md); }
.vp__ref img { width: 100%; height: 132px; object-fit: cover; display: block; background: var(--rwo-cream); }
.vp__ref-cap { font-size: 11px; font-weight: 600; color: var(--rwo-text-muted); padding: .5rem .6rem; display: flex; align-items: center; gap: .4em; border-top: 1px solid var(--rwo-line); }
.vp__ref-cap svg { color: var(--ui-accent); flex-shrink: 0; }
.vp__ref-x { position: absolute; top: 6px; right: 6px; border: none; background: rgba(255,255,255,.85); backdrop-filter: blur(4px); width: 22px; height: 22px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); }
.vp__ref-x:hover { background: #fff; }
.vp__ref-show { position: absolute; right: 22px; bottom: 78px; width: 40px; height: 40px; border: 1px solid var(--rwo-line); background: rgba(255,255,255,.86); backdrop-filter: blur(8px); border-radius: var(--rwo-r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); }
.vp__ref-show:hover { background: #fff; box-shadow: var(--rwo-shadow-sm); }
.cfg.is-dark .vp__ref { background: #222426; border-color: rgba(255,255,255,.1); }
.cfg.is-dark .vp__ref img { background: #161719; }
.cfg.is-dark .vp__ref-cap { color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.1); }
.cfg.is-dark .vp__ref-show { background: rgba(40,42,45,.8); border-color: rgba(255,255,255,.12); color: #fff; }

/* module detail card */
.modcard { position: absolute; left: 22px; top: 70px; width: 290px; background: #fff; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); padding: 1rem 1.1rem 1.1rem; box-shadow: var(--rwo-shadow-lg); z-index: 7; animation: pop var(--rwo-dur-mid) var(--rwo-ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.modcard__x { position: absolute; top: 10px; right: 10px; border: none; background: rgba(64,62,61,.06); width: 26px; height: 26px; border-radius: var(--rwo-r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text-muted); }
.modcard__x:hover { background: rgba(64,62,61,.12); }
.modcard h3 { font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; margin: .3rem 0 .5rem; line-height: 1.05; padding-right: 1.5rem; }
.modcard__desc { font-size: 13px; line-height: 1.5; color: var(--rwo-text-muted); margin: 0 0 .8rem; }
.modcard__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: 12px; padding-top: .7rem; border-top: 1px solid var(--rwo-line); }
.modcard__meta b { color: var(--rwo-text-muted); font-weight: 600; margin-right: .35rem; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; }
.modcard__rm { margin-top: .85rem; width: 100%; border: 1px solid var(--rwo-line-strong); background: #fff; color: var(--rwo-text); padding: .5rem; border-radius: var(--rwo-r-sm); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4em; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.modcard__rm:hover { border-color: var(--ui-accent); color: var(--ui-accent); }
.modphoto { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--rwo-line); }
.modphoto__add { width: 100%; border: 1px dashed var(--rwo-line-strong); background: rgba(64,62,61,.02); color: var(--rwo-text-muted); padding: .6rem; border-radius: var(--rwo-r-sm); font-weight: 600; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .45em; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.modphoto__add:hover { border-color: var(--ui-accent); color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 4%, #fff); }
.modphoto__has img { width: 100%; height: 96px; object-fit: cover; border-radius: var(--rwo-r-sm); border: 1px solid var(--rwo-line); display: block; }
.modphoto__act { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.modphoto__act > span { font-size: 11px; color: #1f7a44; font-weight: 600; display: inline-flex; align-items: center; gap: .35em; }
.modphoto__act > div { display: flex; gap: .35rem; }
.modphoto__act button { border: 1px solid var(--rwo-line-strong); background: #fff; border-radius: 4px; font-size: 11px; font-weight: 600; padding: .3rem .55rem; cursor: pointer; color: var(--rwo-text); display: inline-flex; align-items: center; gap: .3em; }
.modphoto__act button:hover { border-color: var(--rwo-black-grey); }
.cfg.is-dark .modphoto { border-color: rgba(255,255,255,.1); }
.cfg.is-dark .modphoto__add { background: rgba(255,255,255,.03); color: rgba(255,255,255,.6); }
.cfg.is-dark .modphoto__act button { background: transparent; color: #fff; border-color: rgba(255,255,255,.2); }

/* ================= sidebar ================= */
.side { background: #fff; border-left: 1px solid var(--rwo-line); display: flex; flex-direction: column; min-height: 0; }
.side__scroll { overflow-y: auto; overflow-x: hidden; }
.side__sec { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--rwo-line); }
.side__h { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rwo-text-muted); display: flex; align-items: center; gap: .5em; margin-bottom: 1rem; }
.side__seclabel { padding: .9rem 1.2rem .3rem; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rwo-text); }
.side__seclabel span { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--rwo-text-muted); font-size: 11px; }
.side__pad { height: 1.5rem; }

.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: .5rem; }
.field__note { font-size: 12px; color: var(--rwo-text-muted); margin: .5rem 0 0; line-height: 1.45; }
.field--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.field--row label { margin-bottom: 0; }
.field--row .field__note { margin-top: .2rem; }

.widths { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.wbtn { border: 1.5px solid var(--rwo-line); background: #fff; border-radius: var(--rwo-r-sm); padding: .55rem .2rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.wbtn:hover { border-color: var(--rwo-line-strong); }
.wbtn.on { border-color: var(--ui-accent); box-shadow: 0 0 0 1px var(--ui-accent); }
.wbtn strong { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.wbtn em { font-size: 10px; font-style: normal; color: var(--rwo-text-muted); }

/* accordions */
.acc { border-bottom: 1px solid var(--rwo-line); }
.acc__h { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .85rem 1.2rem; background: none; border: none; cursor: pointer; text-align: left; transition: background var(--rwo-dur-fast) var(--rwo-ease); }
.acc__h:hover { background: rgba(64,62,61,.025); }
.acc__sicon { color: var(--rwo-text-muted); }
.acc__title { font-size: 13.5px; font-weight: 600; flex: 1; }
.acc__cnt { background: var(--ui-accent); color: #fff; font-size: 11px; font-weight: 600; min-width: 19px; height: 19px; border-radius: var(--rwo-r-pill); display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.acc__chev { color: var(--rwo-text-muted); transition: transform var(--rwo-dur-fast) var(--rwo-ease); }
.acc.open .acc__chev { transform: rotate(180deg); }
.acc__body { padding: 0 1.2rem 1rem; display: flex; flex-direction: column; gap: .4rem; }

/* module rows */
.row { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-sm); cursor: pointer; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.row:hover { border-color: var(--rwo-line-strong); }
.row.on { border-color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 5%, #fff); }
.row.sel { box-shadow: 0 0 0 1px var(--ui-accent); }
.row.na { opacity: .5; cursor: not-allowed; }
.row__ico { color: var(--rwo-text-muted); flex-shrink: 0; display: inline-flex; }
.row.on .row__ico { color: var(--ui-accent); }
.row__main { flex: 1; min-width: 0; }
.row__name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.row__inspect { border: none; background: rgba(64,62,61,.08); width: 20px; height: 20px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text-muted); padding: 0; }
.row__inspect:hover { color: var(--ui-accent); }
.row__code { display: block; font-size: 10.5px; color: var(--rwo-text-muted); letter-spacing: .03em; margin-top: 1px; font-variant-numeric: tabular-nums; }
.row__price { font-size: 12px; font-weight: 600; color: var(--rwo-text-muted); white-space: nowrap; }
.row__lock { color: var(--rwo-text-muted); }
.sw-toggle { width: 34px; height: 20px; border-radius: var(--rwo-r-pill); background: rgba(64,62,61,.18); position: relative; flex-shrink: 0; transition: background var(--rwo-dur-fast) var(--rwo-ease); }
.sw-toggle span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--rwo-shadow-sm); transition: transform var(--rwo-dur-fast) var(--rwo-ease); }
.sw-toggle.on { background: var(--ui-accent); }
.sw-toggle.on span { transform: translateX(14px); }

/* single-select group */
.sgroup { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-sm); padding: .6rem .65rem; }
.sgroup__lbl { font-size: 12px; font-weight: 600; color: var(--rwo-text); display: flex; align-items: center; gap: .45em; margin-bottom: .5rem; }
.sgroup__lbl svg { color: var(--rwo-text-muted); }
.sgroup__opts { display: flex; flex-direction: column; gap: 3px; }
.opt { display: flex; align-items: center; gap: .55rem; padding: .4rem .45rem; border: none; background: none; border-radius: 4px; cursor: pointer; text-align: left; width: 100%; transition: background var(--rwo-dur-fast) var(--rwo-ease); }
.opt:hover:not(:disabled) { background: rgba(64,62,61,.04); }
.opt:disabled, .opt.na { opacity: .45; cursor: not-allowed; }
.opt__radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--rwo-line-strong); flex-shrink: 0; position: relative; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.opt.on .opt__radio { border-color: var(--ui-accent); }
.opt.on .opt__radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--ui-accent); }
.opt__name { flex: 1; font-size: 12.5px; font-weight: 500; min-width: 0; }
.opt.on .opt__name { font-weight: 600; }
.opt__code { display: block; font-size: 10px; color: var(--rwo-text-muted); font-style: normal; letter-spacing: .03em; margin-top: 1px; }
.opt__na { font-size: 10.5px; color: var(--rwo-text-muted); display: inline-flex; align-items: center; gap: .25em; }
.opt__inspect { border: none; background: rgba(64,62,61,.08); width: 20px; height: 20px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text-muted); padding: 0; }
.sgroup__req { font-size: 11px; color: var(--rwo-text-muted); display: flex; align-items: center; gap: .35em; margin: .5rem 0 0; }

/* ================= specs bar ================= */
.specs { background: var(--rwo-black-grey); color: #fff; display: flex; align-items: center; padding: 0 1.4rem; gap: 1.5rem; }
.specs__tiles { display: flex; gap: 1.7rem; flex: 1; overflow: hidden; }
.spec { display: flex; align-items: center; gap: .6rem; }
.spec__ico { color: rgba(255,255,255,.5); display: inline-flex; }
.spec__txt b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; display: block; line-height: 1; }
.spec__txt b em { font-size: 11px; font-style: normal; font-weight: 500; color: rgba(255,255,255,.55); margin-left: 2px; }
.spec__txt small { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.specs__price { display: flex; align-items: center; gap: 1.3rem; }
.disc { text-align: right; }
.disc label { font-size: 11px; color: rgba(255,255,255,.6); display: block; }
.disc label b { color: #fff; }
.disc input { width: 110px; accent-color: var(--ui-accent); }
.specs__total { text-align: right; line-height: 1.05; }
.specs__list { font-size: 12px; color: rgba(255,255,255,.5); text-decoration: line-through; margin-right: .4rem; }
.specs__big { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.specs__big--req { font-size: 19px; color: var(--ui-accent); }
.specs__cur { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }

/* ================= toast ================= */
.toast { position: fixed; bottom: calc(var(--specs-h) + 16px); left: 50%; transform: translateX(-50%); background: var(--rwo-black-grey); color: #fff; padding: .7rem 1.1rem; border-radius: var(--rwo-r-md); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: .55em; box-shadow: var(--rwo-shadow-lg); z-index: 50; animation: toastin var(--rwo-dur-mid) var(--rwo-ease); max-width: 80vw; }
.toast--alert { background: var(--ui-accent); }
.toast--ok { background: #1f7a44; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ================= modal ================= */
.modal { position: fixed; inset: 0; background: rgba(28,27,26,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 2rem; animation: fade var(--rwo-dur-mid) var(--rwo-ease); }
@keyframes fade { from { opacity: 0; } }
.modal__box { background: #fff; border-radius: var(--rwo-r-lg); width: min(880px, 100%); max-height: 90vh; overflow: hidden; position: relative; box-shadow: var(--rwo-shadow-lg); animation: pop var(--rwo-dur-mid) var(--rwo-ease); }
.modal__x { position: absolute; top: 14px; right: 14px; z-index: 3; border: none; background: rgba(64,62,61,.08); width: 34px; height: 34px; border-radius: var(--rwo-r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); }
.modal__x:hover { background: rgba(64,62,61,.16); }
.modal__grid { display: grid; grid-template-columns: 320px 1fr; max-height: 90vh; }
.modal__visual { background: var(--rwo-cream); display: flex; flex-direction: column; }
.modal__visual img { width: 100%; flex: 1; object-fit: cover; min-height: 0; }
.modal__vsum { padding: 1rem 1.2rem; border-top: 1px solid var(--rwo-line); }
.modal__vsum strong { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; }
.modal__panel { padding: 1.8rem 1.9rem; overflow-y: auto; }
.modal__h { font-size: 24px; font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; margin: .4rem 0 .5rem; line-height: 1.05; }
.modal__sub { font-size: 13.5px; line-height: 1.55; color: var(--rwo-text-muted); margin: 0 0 1.2rem; }
.modal__sub .de { font-style: italic; }
.qform { display: flex; flex-direction: column; gap: .7rem; }
.qform label { font-size: 12px; font-weight: 600; display: flex; flex-direction: column; gap: .3rem; }
.qform label span { font-weight: 500; color: var(--rwo-text-muted); }
.qform input, .qform textarea { font-family: inherit; font-size: 14px; padding: .6rem .7rem; border: 1px solid var(--rwo-line-strong); border-radius: var(--rwo-r-sm); color: var(--rwo-text); resize: none; }
.qform input:focus, .qform textarea:focus { outline: none; border-color: var(--ui-accent); }
.modal__cta { display: flex; align-items: center; gap: 1rem; margin-top: 1.3rem; }
.modal__note { font-size: 12px; color: var(--rwo-text-muted); font-weight: 600; }
.qok { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--ui-accent) 12%, #fff); color: var(--ui-accent); display: flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.qsteps { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.qsteps div { font-size: 13px; display: flex; align-items: center; gap: .55em; color: var(--rwo-text); }
.qsteps svg { color: #1f7a44; }
.crm { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); overflow: hidden; margin-top: .8rem; }
.crm__h { display: flex; justify-content: space-between; align-items: center; padding: .55rem .8rem; background: var(--rwo-cream); border-bottom: 1px solid var(--rwo-line); font-size: 12px; font-weight: 600; }
.crm__h span { display: inline-flex; align-items: center; gap: .4em; }
.crm__h button { border: 1px solid var(--rwo-line-strong); background: #fff; border-radius: 4px; font-size: 11px; font-weight: 600; padding: .25rem .6rem; cursor: pointer; }
.crm pre { margin: 0; padding: .8rem; font-size: 10.5px; line-height: 1.5; max-height: 180px; overflow: auto; color: var(--rwo-text); font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ===== Manufacturing output modal ===== */
.modal__box.mfg { width: min(960px, 100%); display: flex; flex-direction: column; }
.mfg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.6rem 1.8rem 1.1rem; border-bottom: 1px solid var(--rwo-line); }
.mfg__sub { font-size: 13px; color: var(--rwo-text-muted); margin: .3rem 0 0; }
.mfg__valid { font-size: 12px; font-weight: 600; color: #1f7a44; display: inline-flex; align-items: center; gap: .4em; background: rgba(31,122,68,.08); padding: .4rem .7rem; border-radius: var(--rwo-r-pill); white-space: nowrap; }
.mfg__scroll { overflow-y: auto; padding: 1.2rem 1.8rem; flex: 1; min-height: 0; }
.mfg__block { margin-bottom: 1.4rem; }
.mfg__blabel { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rwo-text-muted); display: flex; align-items: center; gap: .5em; margin-bottom: .7rem; }
.mfg__blabel svg { color: var(--ui-accent); }
.mfg__ga { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); padding: .6rem .8rem; background: #fff; }
.mfg__util { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-bottom: 1.4rem; }
.mfg__chip { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-sm); padding: .6rem .7rem; background: var(--rwo-cream); }
.mfg__chip b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; display: block; line-height: 1; }
.mfg__chip small { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--rwo-text-muted); }
table.bom { width: 100%; border-collapse: collapse; }
table.bom th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--rwo-text-muted); border-bottom: 1px solid var(--rwo-line-strong); padding: .55rem .5rem; }
table.bom td { padding: .55rem .5rem; border-bottom: 1px solid var(--rwo-line); font-size: 13px; }
table.bom td.c, table.bom th.c { text-align: center; }
table.bom td.r, table.bom th.r { text-align: right; }
table.bom td.muted { color: var(--rwo-text-muted); font-size: 12px; }
table.bom .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
table.bom tfoot td { border: none; padding-top: .9rem; font-weight: 600; }
table.bom tfoot td.big { font-size: 20px; letter-spacing: -.02em; }
.mfg__foot { font-size: 11.5px; color: var(--rwo-text-muted); margin: .9rem 0 0; line-height: 1.5; }
.mfg__actions { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.8rem; border-top: 1px solid var(--rwo-line); }
.mfg__count { background: var(--rwo-black-grey); color: #fff; font-size: 10px; font-weight: 600; min-width: 17px; height: 17px; border-radius: var(--rwo-r-pill); display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; margin-left: .2rem; }
.draw { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-sm); margin-bottom: .35rem; }
.draw.best { border-color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 4%, #fff); }
.draw__ico { color: var(--rwo-text-muted); display: inline-flex; }
.draw.best .draw__ico { color: var(--ui-accent); }
.draw__main { flex: 1; min-width: 0; }
.draw__model { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.draw__badge { font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--ui-accent); padding: .1rem .4rem; border-radius: var(--rwo-r-pill); }
.draw__meta { font-size: 11.5px; color: var(--rwo-text-muted); }
.draw__btn { width: 30px; height: 30px; border: 1px solid var(--rwo-line-strong); border-radius: var(--rwo-r-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); text-decoration: none; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.draw__btn:hover { border-color: var(--rwo-black-grey); background: rgba(64,62,61,.04); }
.draw__note { font-size: 11.5px; color: var(--rwo-text-muted); margin: .5rem 0 .7rem; line-height: 1.5; }
.draw__toggle { border: none; background: none; color: var(--ui-accent); font-weight: 600; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: .35em; padding: .2rem 0; }
.draw__all { margin-top: .7rem; }
.draw__fam { margin-bottom: .8rem; }
.draw__famlbl { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rwo-text-muted); margin-bottom: .4rem; }

/* ===== Saved & Compare ===== */
.modal__box.saved { width: min(940px, 100%); display: flex; flex-direction: column; }
.saved__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 1.8rem 1.1rem; border-bottom: 1px solid var(--rwo-line); }
.saved__head .btn:disabled { opacity: .4; }
.saved__body { overflow-y: auto; padding: 1.4rem 1.8rem; flex: 1; min-height: 0; }
.saved__empty { text-align: center; padding: 3rem 1rem; color: var(--rwo-text-muted); }
.saved__empty svg { color: var(--rwo-line-strong); margin-bottom: .8rem; }
.saved__empty p { font-size: 16px; font-weight: 600; color: var(--rwo-text); margin: 0 0 .3rem; }
.saved__empty span { font-size: 13px; }
.saved__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.scard { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); overflow: hidden; position: relative; transition: all var(--rwo-dur-fast) var(--rwo-ease); display: flex; flex-direction: column; }
.scard:hover { box-shadow: var(--rwo-shadow-sm); }
.scard.sel { border-color: var(--ui-accent); box-shadow: 0 0 0 1px var(--ui-accent); }
.scard__cmp { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; border-radius: var(--rwo-r-sm); border: none; background: rgba(255,255,255,.9); backdrop-filter: blur(4px); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text-muted); }
.scard.sel .scard__cmp { background: var(--ui-accent); color: #fff; }
.scard__thumb { height: 116px; background: var(--rwo-cream); cursor: pointer; overflow: hidden; }
.scard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.scard__body { padding: .7rem .8rem; flex: 1; }
.scard__name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.scard__name svg { color: var(--rwo-text-muted); opacity: 0; transition: opacity var(--rwo-dur-fast); }
.scard__name:hover svg { opacity: 1; }
.scard__edit { font-family: inherit; font-size: 13.5px; font-weight: 600; width: 100%; border: 1px solid var(--ui-accent); border-radius: 4px; padding: .2rem .35rem; }
.scard__edit:focus { outline: none; }
.scard__meta { font-size: 11.5px; color: var(--rwo-text-muted); margin-top: 3px; }
.scard__price { font-size: 13px; font-weight: 600; margin-top: 4px; }
.scard__acts { display: flex; border-top: 1px solid var(--rwo-line); }
.scard__acts button { flex: 1; border: none; background: #fff; padding: .55rem; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35em; color: var(--rwo-text); transition: background var(--rwo-dur-fast); }
.scard__acts button:hover { background: rgba(64,62,61,.04); }
.scard__acts .del { flex: 0 0 42px; border-left: 1px solid var(--rwo-line); color: var(--rwo-text-muted); }
.scard__acts .del:hover { color: var(--ui-accent); }

/* compare */
.cmp__back { border: none; background: none; color: var(--ui-accent); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: .4em; margin-bottom: 1rem; padding: 0; }
.cmp__heads { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.cmp__head { text-align: center; }
.cmp__head img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--rwo-r-sm); border: 1px solid var(--rwo-line); background: var(--rwo-cream); }
.cmp__head strong { display: block; font-size: 13.5px; font-weight: 600; margin-top: .5rem; }
.cmp__vs { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rwo-text-muted); }
.cmp__table { width: 100%; border-collapse: collapse; }
.cmp__table td { padding: .55rem .6rem; border-bottom: 1px solid var(--rwo-line); font-size: 13px; }
.cmp__table td.k { color: var(--rwo-text-muted); width: 26%; }
.cmp__table td.va, .cmp__table td.vb { font-weight: 600; width: 30%; }
.cmp__table td.d { width: 14%; text-align: right; }
.cmp__delta { font-size: 12px; font-weight: 600; padding: .1rem .4rem; border-radius: var(--rwo-r-pill); }
.cmp__delta.up { color: #1f7a44; background: rgba(31,122,68,.1); }
.cmp__delta.down { color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 10%, #fff); }
.cmp__same { color: var(--rwo-text-muted); }
.cmp__diff { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.4rem; }
.cmp__difflbl { display: flex; align-items: center; gap: .4em; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rwo-text-muted); margin-bottom: .6rem; }
.cmp__chip { display: inline-block; font-size: 12px; font-weight: 500; padding: .25rem .55rem; border-radius: var(--rwo-r-sm); margin: 0 .35rem .35rem 0; }
.cmp__chip.add { background: rgba(31,122,68,.1); color: #1f7a44; }
.cmp__chip.rm { background: color-mix(in srgb, var(--ui-accent) 9%, #fff); color: var(--ui-accent); text-decoration: line-through; }
.cmp__none { font-size: 12.5px; color: var(--rwo-text-muted); }

/* ===== Guided build wizard ===== */
.modal__box.wiz { width: min(620px, 100%); padding: 1.9rem 2rem 1.6rem; }
.wiz__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; }
.wiz__dots { display: flex; gap: 5px; }
.wiz__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rwo-line-strong); transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.wiz__dot.on { background: var(--ui-accent); width: 20px; border-radius: var(--rwo-r-pill); }
.wiz__dot.done { background: var(--ui-accent); opacity: .4; }
.wiz__q { font-size: 24px; font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; margin: 0 0 .3rem; line-height: 1.08; }
.wiz__sub { font-size: 13.5px; color: var(--rwo-text-muted); margin: 0 0 1.3rem; }
.wiz__q + .wiz__opts, .wiz__q + .wiz__num { margin-top: 1.2rem; }
.wiz__opts { display: grid; gap: .6rem; }
.wiz__opts.two { grid-template-columns: 1fr 1fr; }
.wopt { display: flex; align-items: flex-start; gap: .7rem; text-align: left; background: #fff; border: 1.5px solid var(--rwo-line); border-radius: var(--rwo-r-md); padding: .85rem 1rem; cursor: pointer; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.wopt:hover { border-color: var(--rwo-line-strong); }
.wopt.on { border-color: var(--ui-accent); box-shadow: 0 0 0 1px var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 4%, #fff); }
.wopt__check { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rwo-line-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px; }
.wopt.on .wopt__check { background: var(--ui-accent); border-color: var(--ui-accent); }
.wopt__t { font-weight: 600; font-size: 14px; display: block; }
.wopt__d { font-size: 12px; color: var(--rwo-text-muted); display: block; margin-top: 1px; }
.wiz__num { display: flex; align-items: center; gap: 1rem; padding: 1rem 0 .5rem; }
.wiz__num .stepper__v { font-size: 32px; }
.wiz__numlbl { font-size: 14px; color: var(--rwo-text-muted); }
.wiz__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 1.6rem; }
.wiz__back { border: none; background: none; color: var(--rwo-text-muted); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: .4em; padding: .4rem 0; }
.wiz__back:disabled { opacity: .35; cursor: not-allowed; }
.wiz__back:not(:disabled):hover { color: var(--rwo-text); }
/* review */
.wiz__review .modal__h { margin: .35rem 0 .4rem; }
.wiz__rsub { font-size: 13.5px; color: var(--rwo-text-muted); line-height: 1.55; margin: 0 0 1.1rem; }
.wiz__chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.2rem; }
.wiz__chip { font-size: 12.5px; font-weight: 600; background: var(--rwo-cream); border: 1px solid var(--rwo-line); padding: .35rem .6rem; border-radius: var(--rwo-r-pill); display: inline-flex; align-items: center; gap: .35em; }
.wiz__chip svg { color: #1f7a44; }
.wiz__why { background: var(--rwo-cream); border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); padding: .9rem 1.1rem; }
.wiz__why b { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--rwo-text-muted); }
.wiz__why ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.wiz__why li { font-size: 13px; line-height: 1.5; margin-bottom: .2rem; }
.wiz__actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }

/* ===== Formal CPQ — quotes ===== */
.modal__box.quotes { width: min(820px, 100%); display: flex; flex-direction: column; }
.qlist { display: flex; flex-direction: column; gap: .55rem; }
.qrow { display: grid; grid-template-columns: 150px 1fr auto auto; align-items: center; gap: 1rem; padding: .75rem .9rem; border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); }
.qrow__no { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.qrow__no em { font-style: normal; font-size: 11px; color: var(--rwo-text-muted); margin-left: 5px; }
.qrow__status { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .5rem; border-radius: var(--rwo-r-pill); margin-top: 4px; }
.s-draft { background: rgba(64,62,61,.1); color: var(--rwo-text-muted); }
.s-pending { background: rgba(245,166,35,.16); color: #b5740a; }
.s-issued { background: rgba(42,111,219,.14); color: #1f5fc0; }
.s-sent { background: rgba(31,122,68,.12); color: #1f7a44; }
.s-expired { background: color-mix(in srgb, var(--ui-accent) 12%, #fff); color: var(--ui-accent); }
.qrow__mid { min-width: 0; }
.qrow__cust { display: block; font-size: 13.5px; font-weight: 600; }
.qrow__mach { display: block; font-size: 11.5px; color: var(--rwo-text-muted); }
.qrow__price { text-align: right; }
.qrow__price b { font-size: 15px; font-weight: 600; }
.qrow__valid { display: block; font-size: 11px; color: var(--rwo-text-muted); }
.qrow__valid.exp { color: var(--ui-accent); }
.qrow__acts { display: flex; gap: .3rem; }
.qbtn { width: 30px; height: 30px; border: 1px solid var(--rwo-line-strong); border-radius: var(--rwo-r-sm); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--rwo-text); transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.qbtn:hover { border-color: var(--rwo-black-grey); }
.qbtn.ok { color: #1f7a44; border-color: rgba(31,122,68,.4); }
.qbtn.del:hover { color: var(--ui-accent); border-color: var(--ui-accent); }

/* issue panel */
.qissue__head { margin: .6rem 0 1.1rem; }
.qissue__head .modal__h { margin-top: .3rem; }
.qissue__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.1rem; }
.qissue__grid label { font-size: 12px; font-weight: 600; display: flex; flex-direction: column; gap: .3rem; }
.qissue__grid input { font-family: inherit; font-size: 14px; padding: .55rem .7rem; border: 1px solid var(--rwo-line-strong); border-radius: var(--rwo-r-sm); }
.qissue__grid input:focus { outline: none; border-color: var(--ui-accent); }
.qissue__disc { margin-bottom: 1.1rem; }
.qissue__disclbl { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: .4rem; }
.qissue__disc input[type=range] { width: 100%; accent-color: var(--ui-accent); }
.qrate { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); padding: .7rem 1rem; margin-bottom: 1rem; }
.qrate__row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: 14px; border-bottom: 1px solid var(--rwo-line); }
.qrate__row:last-child { border-bottom: none; }
.qrate__row span { color: var(--rwo-text-muted); }
.qrate__row b { font-weight: 600; }
.qrate__row.sub { font-size: 12.5px; }
.qrate__row.margin b { color: #1f7a44; }
.qrate__row.margin.low b { color: var(--ui-accent); }
.qguard { display: flex; align-items: flex-start; gap: .55em; padding: .8rem 1rem; border-radius: var(--rwo-r-md); font-size: 13px; line-height: 1.5; margin-bottom: 1.2rem; }
.qguard svg { flex-shrink: 0; margin-top: 1px; }
.qguard.ok { background: rgba(31,122,68,.08); color: #1f6e3f; }
.qguard.warn { background: rgba(245,166,35,.12); color: #8a5a06; }
.qissue__actions { display: flex; align-items: center; }

/* ===== Integrations / API ===== */
.modal__box.integ { width: min(960px, 100%); display: flex; flex-direction: column; }
.integ__body { overflow-y: auto; padding: 1.3rem 1.8rem; flex: 1; min-height: 0; }
.integ__conns { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1.3rem; }
.conn { text-align: left; border: 1.5px solid var(--rwo-line); border-radius: var(--rwo-r-md); padding: .8rem .85rem; cursor: pointer; background: #fff; transition: all var(--rwo-dur-fast) var(--rwo-ease); display: flex; flex-direction: column; gap: 2px; }
.conn:hover { border-color: var(--rwo-line-strong); }
.conn.on { border-color: #1f7a44; background: rgba(31,122,68,.04); }
.conn__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.conn__ico { color: var(--rwo-text-muted); }
.conn.on .conn__ico { color: var(--rwo-text); }
.conn__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rwo-line-strong); }
.conn__dot.on { background: #1f7a44; box-shadow: 0 0 0 3px rgba(31,122,68,.15); }
.conn__name { font-size: 14px; font-weight: 600; }
.conn__sys { font-size: 11px; color: var(--rwo-text-muted); }
.conn__state { font-size: 11px; font-weight: 600; margin-top: .3rem; color: var(--rwo-text-muted); }
.conn.on .conn__state { color: #1f7a44; }
.integ__cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.3rem; }
.integ__tabs { display: flex; gap: 3px; background: rgba(64,62,61,.06); border-radius: var(--rwo-r-sm); padding: 3px; margin-bottom: .6rem; }
.itab { flex: 1; border: none; background: transparent; padding: .4rem; border-radius: 3px; font-size: 12.5px; font-weight: 600; color: var(--rwo-text-muted); cursor: pointer; transition: all var(--rwo-dur-fast) var(--rwo-ease); }
.itab.on { background: #fff; color: var(--rwo-text); box-shadow: var(--rwo-shadow-sm); }
.integ__pl { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); overflow: hidden; }
.integ__plhead { display: flex; justify-content: space-between; align-items: center; padding: .5rem .7rem; background: var(--rwo-cream); border-bottom: 1px solid var(--rwo-line); }
.integ__plhead code { font-size: 11.5px; font-weight: 600; color: var(--rwo-text); font-family: ui-monospace, Menlo, monospace; }
.integ__plhead button { border: 1px solid var(--rwo-line-strong); background: #fff; border-radius: 4px; font-size: 11px; font-weight: 600; padding: .25rem .55rem; cursor: pointer; display: inline-flex; align-items: center; gap: .3em; color: var(--rwo-text); }
.integ__pl pre { margin: 0; padding: .8rem; font-size: 10.5px; line-height: 1.5; max-height: 280px; overflow: auto; font-family: ui-monospace, Menlo, monospace; color: var(--rwo-text); }
.integ__sublbl { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rwo-text-muted); margin-bottom: .5rem; }
.integ__log { border: 1px solid var(--rwo-line); border-radius: var(--rwo-r-md); min-height: 90px; max-height: 150px; overflow: auto; padding: .3rem; }
.integ__logempty { font-size: 12px; color: var(--rwo-text-muted); padding: .9rem; line-height: 1.5; }
.logrow { display: flex; align-items: center; gap: .55rem; padding: .35rem .5rem; font-family: ui-monospace, Menlo, monospace; font-size: 11px; border-bottom: 1px solid var(--rwo-line); }
.logrow:last-child { border-bottom: none; }
.logrow__code { color: #1f7a44; font-weight: 700; }
.logrow__ep { flex: 1; color: var(--rwo-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logrow__ms { color: var(--rwo-text-muted); }
.integ__eps { display: flex; flex-direction: column; gap: .3rem; }
.eprow { display: grid; grid-template-columns: 44px 1fr; gap: .5rem; align-items: baseline; font-size: 11px; }
.eprow code { font-family: ui-monospace, Menlo, monospace; font-weight: 600; color: var(--rwo-text); }
.epm { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-align: center; padding: .15rem .2rem; border-radius: 3px; }
.m-get { background: rgba(42,111,219,.14); color: #1f5fc0; }
.m-post { background: rgba(31,122,68,.14); color: #1f7a44; }
.epd { grid-column: 2; font-size: 10.5px; color: var(--rwo-text-muted); margin-top: -1px; }
@media (max-width: 820px) { .integ__cols { grid-template-columns: 1fr; } .integ__conns { grid-template-columns: 1fr 1fr; } }
.cfg.is-dark ~ .modal .modal__box.mfg, .modal__box.mfg { }

/* ================= DARK STAGE ================= */
.cfg.is-dark .vp { background: #161719; }
.cfg.is-dark .vp__title h1 { color: #fff; }
.cfg.is-dark .vp__title h1 span { color: rgba(255,255,255,.5); }
.cfg.is-dark .vp__hint { background: rgba(40,42,45,.7); color: rgba(255,255,255,.7); }
.cfg.is-dark .vp__tools button { background: rgba(40,42,45,.8); border-color: rgba(255,255,255,.12); color: #fff; }
.cfg.is-dark .vp__tools button:hover { background: rgba(60,62,66,.9); }
.cfg.is-dark .vp__swatches { background: rgba(40,42,45,.82); border-color: rgba(255,255,255,.12); }
.cfg.is-dark .vp__swdiv { background: rgba(255,255,255,.18); }
.cfg.is-dark .sw.on { border-color: #fff; }
.cfg.is-dark .modcard { background: #222426; border-color: rgba(255,255,255,.1); color: #fff; }
.cfg.is-dark .modcard h3 { color: #fff; }
.cfg.is-dark .modcard__desc { color: rgba(255,255,255,.6); }
.cfg.is-dark .modcard__meta { border-color: rgba(255,255,255,.1); }
.cfg.is-dark .modcard__x { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.cfg.is-dark .modcard__rm { background: transparent; color: #fff; border-color: rgba(255,255,255,.2); }

@media (max-width: 1080px) {
  .cfg__main { grid-template-columns: 1fr 340px; }
  .specs__tiles { gap: 1.1rem; }
}
@media (max-width: 900px) {
  .nav__roles { display: none; }
  .vp__title h1 { font-size: 20px; }
}
