:root {
  --ink: #12303a; --ink-2: #51666e; --line: #d9e2e4; --bg: #f4f7f7; --card: #fff;
  --teal: #16737b; --teal-d: #0e4f57; --teal-l: #e3f1f2;
  --ok: #1a7f52; --ok-bg: #e2f4eb; --warn: #9a6200; --warn-bg: #fcf0d9;
  --na: #45596b; --na-bg: #e7ecf1; --block: #b3261e; --block-bg: #fbe4e2;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; display: flex; flex-direction: column; min-height: 100vh; }
h2 { font-size: 13px; letter-spacing: .02em; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
button, input, select { font: inherit; color: inherit; }
button { background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; cursor: pointer; min-height: 34px; }
button:hover { border-color: var(--teal); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .host3d:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

.top { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--teal-d); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand small { display: block; opacity: .8; font-size: 12px; }
.logo { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--teal-d); display: grid; place-items: center; font-weight: 700; }
.seg { display: inline-flex; margin-left: auto; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.4); }
.seg button { border: 0; border-radius: 0; background: transparent; color: #fff; padding: 6px 14px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--teal-d); font-weight: 600; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.top-actions { display: flex; gap: 6px; }
.top-actions button { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.notice { margin: 0; padding: 6px 16px; background: var(--warn-bg); color: #6d4700; font-size: 12.5px; border-bottom: 1px solid #efdcb4; }

.steps { background: var(--card); border-bottom: 1px solid var(--line); padding: 6px 16px; }
.steps ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; }
.step { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 10px 4px 4px; border-radius: 99px; font-weight: 500; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--na-bg); color: var(--na); }
.step.done .n { background: var(--ok-bg); color: var(--ok); }
.step.current { background: var(--teal-l); color: var(--teal-d); font-weight: 700; }
.step.current .n { background: var(--teal); color: #fff; }
.step:disabled { color: #7c8d94; cursor: not-allowed; }
body.route-wizard .seg, body.route-wizard .top-actions { display: none; }

.wizard { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 16px 0; }
.wizard[hidden], .layout[hidden], .wiz-page[hidden], [hidden] { display: none !important; }
.wiz-page { max-width: 760px; margin: 0 auto; }
.wiz-page.wide { max-width: 1120px; }
.wiz-page h1 { font-size: 24px; margin: 0 0 6px; line-height: 1.2; }
.lead { font-size: 15px; color: var(--ink-2); margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 20px; border-radius: var(--r); }
.card strong { font-size: 17px; color: var(--teal-d); }
.card span { color: var(--ink-2); }
.primary { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; padding: 8px 18px; }
.primary:hover { background: var(--teal-d); }
.danger { color: var(--block); border-color: var(--block); }
.resume { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--teal-l); border: 1px solid #bfdfe2; border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.resume p { margin: 2px 0 0; color: var(--ink-2); }
.other { margin-top: 20px; }
.confirm { margin-top: 10px; padding: 12px; background: var(--warn-bg); border-radius: 8px; }
.confirm p { margin: 0 0 8px; }
.wiz-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.wiz-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.wcard h3 { margin: 0 0 8px; font-size: 16px; }
.wcard h4 { margin: 12px 0 4px; font-size: 12.5px; color: var(--ink-2); }
.field-err { display: block; color: var(--block); min-height: 0; margin-top: 2px; }
input[aria-invalid="true"] { border-color: var(--block) !important; }
.plain { margin: 0 0 10px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.consent input { margin-top: 3px; }
.preview-svg { display: block; width: 100%; height: 300px; }
.sticky-col { position: sticky; top: 10px; }
.thumb { display: block; width: 100%; padding: 0; overflow: hidden; margin-top: 8px; border-radius: 7px; }
.thumb img { display: block; width: 100%; max-height: 130px; object-fit: cover; }
.thumb.large img { max-height: 180px; object-fit: contain; background: #eef3f4; }
.linklike { display: inline; min-height: 0; padding: 0; margin: 0 0 0 8px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
#privacy-dlg p { font-size: 13.5px; }
#proposal-settings { margin-top: 10px; }
.photo-dlg { width: min(1100px, 94vw); padding: 12px; }
.photo-dlg img { display: block; width: 100%; max-height: 80vh; object-fit: contain; }
.draft { margin: 0 0 14px; padding: 8px 12px; background: var(--warn-bg); color: #6d4700; border-radius: 8px; font-weight: 600; font-size: 13px; }
.choices { border: 0; padding: 0; margin: 0; gap: 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--teal); background: var(--teal-l); }
.choice input { margin-top: 3px; }
.choice strong { display: block; }
.choice small { color: var(--ink-2); font-size: 12.5px; }
.cats { list-style: none; margin: 0; padding: 0; }
.cats li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cats li:first-child { border-top: 0; }
.avail { font-size: 11.5px; color: var(--ink-2); }
.avail.no_dimensions { color: var(--warn); }
.avail.not_in_library { color: var(--na); font-style: italic; }
.wiz-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 0 14px; background: var(--bg); border-top: 1px solid var(--line); }
.wiz-foot p { margin: 0; flex: 1; text-align: center; color: var(--ink-2); font-size: 13px; }
.dev-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 34px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.dev-want { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.dev-want input { margin-top: 3px; }
.dev-want strong { display: block; font-size: 13px; }
.dev-want small { color: var(--ink-2); font-size: 12px; }
.dev-own { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; white-space: nowrap; }
.dev-row .info { margin: 0; min-width: 34px; min-height: 34px; padding: 0; }
#wiz-device-groups h3, .add-group { margin: 10px 0 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
#wiz-device-groups h3:first-child { margin-top: 0; }
.wiz-foot .btn-row { flex-wrap: nowrap; }
.placed-row { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding: 2px 0; }
.placed-row:first-child { border-top: 0; }
.placed-row.sel { background: var(--teal-l); border-radius: 6px; }
.placed-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px 6px; }
.placed-name span { display: block; font-size: 13px; }
.placed-name small { color: var(--ink-2); font-size: 11.5px; }
.placed-row .info { margin: 0; min-width: 34px; min-height: 34px; padding: 0; }
.notice-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 0; font-size: 13px; }
.notice-row .info { margin: 0; min-width: 34px; min-height: 34px; padding: 0; }
.why, .why ul { list-style: none; margin: 0; padding: 0; }
.why { margin-top: 10px; }
.why > li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.why ul li { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
.kind { display: inline-block; padding: 0 6px; border-radius: 99px; font-size: 10.5px; font-weight: 600; background: var(--na-bg); color: var(--na); }
.kind.calculated { background: var(--teal-l); color: var(--teal-d); }
.kind.assumption { background: var(--warn-bg); color: var(--warn); }
.changed { display: block; color: var(--warn); font-style: normal; font-size: 12px; }
#proposal-panel h4 { margin: 10px 0 3px; font-size: 12.5px; color: var(--ink-2); }
.lang-seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.4); }
body.route-wizard .lang-seg { margin-left: auto; }
.lang-seg button { border: 0; border-radius: 0; background: transparent; color: #fff; padding: 6px 12px; min-height: 34px; }
.lang-seg button[aria-pressed="true"] { background: #fff; color: var(--teal-d); font-weight: 600; }
.quote-images figure { margin: 0; }
.quote-images figcaption { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
#quote-3d { display: block; width: 100%; height: 300px; object-fit: contain; background: #eef3f4; border-radius: 6px; }
#quote-draft, #quote-notes { display: block; width: 100%; font: 13px/1.45 ui-monospace, Consolas, monospace; padding: 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
#quote-notes { font-family: inherit; margin-top: 2px; }
.kv { display: flex; flex-direction: column; margin: 0 0 8px; font-size: 13px; }
.kv span { color: var(--ink-2); font-size: 12px; }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px minmax(0, 1fr) 350px; grid-template-rows: minmax(0, 1fr); gap: 10px; padding: 10px; }
.panel { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.panel section { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.stage { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.views { flex: 1; min-height: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.views.both { grid-template-columns: 1fr 1fr; }
.pane { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.pane[hidden] { display: none; }
.pane-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid var(--line); font-weight: 600; flex-wrap: wrap; }
.pane-head small { font-weight: 400; color: var(--ink-2); }
.cam { display: flex; gap: 4px; }
.cam button { min-height: 28px; padding: 2px 8px; font-size: 12px; font-weight: 400; }
#plan2d { flex: 1; width: 100%; min-height: 0; touch-action: none; user-select: none; display: block; }
.host3d { flex: 1; min-height: 0; position: relative; background: #eef3f4; }
.host3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.badge3d { position: absolute; left: 10px; bottom: 8px; margin: 0; padding: 3px 8px; font-size: 12px; color: #6d4700; background: rgba(252,240,217,.94); border-radius: 6px; pointer-events: none; z-index: 2; }
.host3d .no3d { padding: 24px; color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); padding: 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 18px; height: 12px; border: 1px solid #6d7f86; display: inline-block; border-radius: 2px; }
.sw.hatch { background: repeating-linear-gradient(45deg, #cfe3e5, #cfe3e5 2px, #fff 2px, #fff 5px); }
.sw.solid { background: #7fb9bf; }
.sw.dash { border-style: dashed; background: #fff; }
.sw.over { background: #f4c5c1; border-color: var(--block); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
label.f { display: block; font-size: 12px; color: var(--ink-2); }
label.f input, label.f select { display: block; width: 100%; margin-top: 2px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); min-height: 32px; }
.add-list { display: grid; gap: 5px; }
.add-list button { text-align: left; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.add-list small { color: var(--ink-2); font-size: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.msg { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; }
.msg.err { color: var(--block); }
.row-card { border: 1px solid var(--line); border-radius: 7px; padding: 8px; margin-bottom: 6px; }
.row-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; }
.link { border: 0; background: none; color: var(--block); padding: 2px 4px; min-height: 0; font-size: 12px; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip.OK { background: var(--ok-bg); color: var(--ok); }
.chip.HUOMIO { background: var(--warn-bg); color: var(--warn); }
.chip.NA { background: var(--na-bg); color: var(--na); }
.chip.ESTO { background: var(--block-bg); color: var(--block); }
.check { padding: 7px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; padding-top: 0; }
.check .h { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }
.check .h span.t { display: inline-flex; align-items: center; gap: 4px; }
.check p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-2); }
.info { border: 0; background: none; color: var(--teal); font-size: 16px; line-height: 1; padding: 6px; min-width: 44px; min-height: 44px; margin: -14px -8px -14px -6px; }
.dist { width: 100%; border-collapse: collapse; font-size: 13px; }
.dist td { padding: 4px 0; border-top: 1px solid var(--line); vertical-align: top; }
.dist tr:first-child td { border-top: 0; }
.dist td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 8px; }
.dist small { display: block; font-weight: 400; color: var(--ink-2); white-space: normal; }
.caveat { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }
.tips { display: flex; flex-wrap: wrap; gap: 5px; }
.tips button { font-size: 12.5px; min-height: 44px; }
details summary { font-size: 13px; font-weight: 600; cursor: pointer; min-height: 28px; }
.src { font-size: 12px; margin: 6px 0 0; padding-left: 16px; color: var(--ink-2); }
dialog { border: 0; border-radius: 12px; padding: 20px; width: min(520px, 92vw); max-height: 86vh; color: var(--ink); box-shadow: 0 20px 60px rgba(10,34,41,.35); }
dialog::backdrop { background: rgba(10,34,41,.4); }
dialog h3 { margin: 0 34px 10px 0; font-size: 17px; }
dialog p { margin: 0 0 9px; }
dialog h4 { margin: 12px 0 3px; font-size: 12.5px; color: var(--ink-2); }
dialog ul { margin: 0; padding-left: 18px; font-size: 13px; }
dialog .closing { font-weight: 600; margin-top: 10px; }
.tip-product { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #dbe4e6; }
.tip-product a { font-weight: 600; }
.tip-product small { display: block; color: var(--ink-2); margin-top: 2px; }
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 44vh; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 14px 16px; z-index: 20; }
.tip-btn { cursor: pointer; outline: none; }
.tip-btn:focus .vis, .tip-btn:hover .vis { fill: #0e4f57; stroke: #12303a; stroke-width: 3; }
.tip-close, .dlg-close { position: absolute; top: 8px; right: 8px; margin: 0; }
.tip-close button, .dlg-close button { border: 0; font-size: 22px; line-height: 1; min-width: 44px; min-height: 44px; background: none; }

svg text { font-family: system-ui, "Segoe UI", Arial, sans-serif; }
.dev { cursor: grab; outline: none; }
.dev:focus .body { stroke-width: 2.4; }
.handle { cursor: alias; }

@media print {
  .top, .notice, .steps, .no-print { display: none !important; }
  html, body { height: auto; display: block; }
  .wizard { overflow: visible; padding: 0; }
  .wcard { break-inside: avoid; }
  #quote-draft { display: none; }
}

@media (max-width: 700px) {
  .wiz-foot { flex-wrap: wrap; }
  .wiz-foot p { order: -1; flex: 1 0 100%; }
  .wiz-foot .btn-row { flex-wrap: wrap; }
  .grid3 { min-width: 0; }
  #wiz-quote .grid3 { grid-template-columns: minmax(0, 1fr); }
  .dev-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .dev-row .avail, .dev-row .dev-own { grid-column: 1; }
  .dev-row .info { grid-column: 2; grid-row: 1; }
}

@media (max-width: 1100px) {
  .layout { flex: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; }
  .wiz-cols, .cards { grid-template-columns: minmax(0, 1fr); }
  .sticky-col { position: static; }
  .panel { overflow: visible; }
  .stage { order: -1; min-height: auto; }
  .views { flex: none; height: 66vh; min-height: 380px; }
  .views.both { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr; height: 120vh; min-height: 720px; }
}

#wiz-quote .dist td:last-child { white-space: normal; }
#quote-plan, #quote-3d { height: 420px; }
@media (max-width: 700px) { #quote-plan, #quote-3d { height: 300px; } }

.optics-banner { margin: 0 0 8px; font-weight: 600; }
.attach-box { margin-top: 8px; display: grid; gap: 6px; }

.guide-btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
body.route-wizard .guide-btn { margin-left: auto; }
body.route-wizard .lang-seg { margin-left: 0; }
#guide-start { font-size: 14px; }
dialog.guide-panel { position: fixed; inset: 64px 12px auto auto; margin: 0; width: min(400px, calc(100vw - 24px)); max-height: calc(100vh - 76px); overflow: auto; z-index: 40; }
.guide-panel ol { margin: 0 0 8px; padding-left: 20px; font-size: 13.5px; }
.guide-panel details { border-top: 1px solid #e3ebee; padding: 7px 0; }
.guide-panel summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.guide-panel details p { margin: 6px 0 2px; font-size: 13.5px; }

#all-tips { max-height: 190px; overflow: auto; }
.stage-tip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; background: #e6f3f4; border: 1px solid #bedcdf; border-radius: 8px; padding: 6px 10px; margin: 0 0 8px; font-size: 13.5px; }
.stage-tip[hidden] { display: none; }
.clin-tip { background: #f0f8f8; border: 1px solid #bedcdf; border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: 13px; }
.clin-tip h3 { margin: 0 0 4px; font-size: 13.5px; }
.clin-tip p { margin: 0 0 6px; }
.clin-tip ul { margin: 0 0 6px; padding-left: 18px; }
#quote-need.field-err { font-weight: 600; }
.steps-hint { margin: 4px 0 0; font-size: 13px; color: #45596b; }
#quote-send-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid #dbe4e6; }
#quote-send-box h3 { margin: 0 0 6px; font-size: 15px; }
.quote-status { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; background: #eef3f4; color: #12303a; }
.quote-status[data-kind="ok"] { background: #e3f4ea; color: #145c3b; }
/* ERP-UX-01: onnistumisviesti on monirivinen; ensimmäinen rivi otsikkona, vihreä reunus. */
.quote-status[data-kind="ok"] { white-space: pre-line; font-weight: 400; line-height: 1.5; padding: 12px 14px; border-left: 4px solid #1e8a52; font-size: 15px; }
.quote-status[data-kind="ok"]::first-line { font-weight: 700; font-size: 17px; }
.quote-status[data-kind="error"] { background: #fdeceb; color: #8c1d15; }
.quote-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }


/* ERP-UX-VISUAL-01: one calm semantic palette.
   Teal = actions. Blue = clinical tips. Grey-green = device information. Amber = to check. Red = errors and removal. */
:root { --clin: #2b5c8a; --clin-bg: #eef4fb; --clin-line: #c9dcef; --prod-bg: #f5f8f8; --prod-line: #dde6e8; }

button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { box-shadow: 0 1px 0 rgba(10,34,41,.18); }
.primary:focus-visible { outline: 3px solid #0b3a40; outline-offset: 2px; }
.danger { background: #fff; color: var(--block); border-color: #e3a29c; }
.danger:hover { background: var(--block-bg); border-color: var(--block); }
.link { color: var(--block); font-weight: 600; text-decoration: none; }
.link:hover, .link:focus-visible { text-decoration: underline; }

/* Room devices: one light card per device, the selected one marked by colour, a side bar and bold text. */
#placed { display: grid; gap: 6px; }
.placed-row { background: var(--prod-bg); border: 1px solid var(--prod-line); border-left: 4px solid var(--prod-line); border-radius: 8px; padding: 2px 4px 2px 0; }
.placed-row:first-child { border-top: 1px solid var(--prod-line); }
.placed-row:hover { border-color: #b9cbd0; }
.placed-row.sel { background: var(--teal-l); border-color: var(--teal); border-left-color: var(--teal); }
.placed-row.sel .placed-name .pn { font-weight: 700; }
.placed-row.sel .placed-name .pn::after { content: " ●"; color: var(--teal); font-size: 10px; vertical-align: 2px; }
.placed-name .pn { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.placed-name .tags { font-size: 11px; }
.placed-name:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; border-radius: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pill { display: inline-block; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 600; line-height: 18px; background: #e8eef0; color: #45596b; border: 1px solid #d5e0e3; }
.pill.own { background: var(--teal-l); color: var(--teal-d); border-color: #bfdfe2; }

/* Clinical tips: the same blue everywhere, never the warning colour. */
.info { color: var(--clin); }
#all-tips button, .tips button { background: var(--clin-bg); border-color: var(--clin-line); color: var(--clin); text-align: left; }
#all-tips button:hover, .tips button:hover { border-color: var(--clin); }
.clin-tip { background: var(--clin-bg); border: 1px solid var(--clin-line); border-left: 4px solid var(--clin); }
.clin-tip h3 { color: var(--clin); }
.clin-tip button { background: #fff; border-color: var(--clin-line); color: var(--clin); }
.stage-tip { background: var(--clin-bg); border-color: var(--clin-line); border-left: 4px solid var(--clin); color: var(--ink); }
.stage-tip button { border-color: var(--clin-line); color: var(--clin); }
#tip { border-top: 5px solid var(--clin); }
#tip h3 { color: var(--clin); }
#tip h4 { color: var(--clin); text-transform: none; }

/* Device information: neutral card, separate from tips. */
.prod-info { background: var(--prod-bg); border: 1px solid var(--prod-line); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; }
.prod-info p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }
.prod-photo { margin: 0 0 8px; background: #fff; border: 1px solid var(--prod-line); border-radius: 8px; padding: 8px 10px; }
.prod-photo > img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; margin: 0 auto; }
.prod-photo figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 12.5px; color: var(--ink); }
.prod-photo figcaption .brand { width: auto; height: 16px; }
.prod-photo figcaption small { flex-basis: 100%; color: var(--ink-2); font-size: 11.5px; }
.tip-product { background: var(--prod-bg); border: 1px solid var(--prod-line); border-radius: 8px; padding: 8px 10px; }

/* To check: amber. Errors: red. Each state also has its own sign, so colour is not the only cue. */
.optics-banner { border-left: 4px solid #e2b35a; }
.chip { border: 1px solid transparent; }
.chip::before { margin-right: 4px; font-weight: 700; }
.chip.OK::before { content: "✓"; }
.chip.HUOMIO { border-color: #ecc77e; }
.chip.HUOMIO::before { content: "!"; }
.chip.NA::before { content: "?"; }
.chip.ESTO { border-color: #e3a29c; }
.chip.ESTO::before { content: "✕"; }
details.check summary { list-style: none; display: flex; justify-content: space-between; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }
details.check summary::-webkit-details-marker { display: none; }
details.check summary .t::before { content: "▸"; color: var(--ink-2); margin-right: 2px; font-size: 11px; }
details.check[open] summary .t::before { content: "▾"; }
.check[data-state="HUOMIO"] { background: #fffaf0; border-left: 3px solid #e2b35a; padding-left: 8px; }
.check[data-state="ESTO"] { background: #fdf4f3; border-left: 3px solid var(--block); padding-left: 8px; }

/* Quote request step. */
#quote-confirm { background: var(--warn-bg); border-left: 4px solid #e2b35a; border-radius: 6px; padding: 8px 10px; color: #5c4300; }
#quote-send-box { background: var(--prod-bg); border: 1px solid var(--prod-line); border-radius: 10px; padding: 12px; }
