/* 3D PLAN MODEL (2026-11-05). The model is the biggest thing on the screen; the
   layers on the left and the panel on the right fold to their widths. Tokens on
   .m3-app, dark by default, html.light below (the same scheme as the Plans
   workspace). */
.m3-app {
    --m3-bg: #0d0d10; --m3-panel: #16161a; --m3-panel2: #1d1d22; --m3-line: rgba(255,255,255,.08); --m3-line2: rgba(255,255,255,.14);
    --m3-ink: #ececf1; --m3-ink2: #a6a6b0; --m3-ink3: #74747e; --m3-accent: #c41717; --m3-sel: #0b84f3; --m3-hover: rgba(255,255,255,.06);
}
html.light .m3-app {
    --m3-bg: #f3f3f6; --m3-panel: #ffffff; --m3-panel2: #f7f7f9; --m3-line: rgba(0,0,0,.08); --m3-line2: rgba(0,0,0,.14);
    --m3-ink: #111114; --m3-ink2: #4a4a52; --m3-ink3: #7a7a84; --m3-hover: rgba(0,0,0,.05);
}
[data-model3d-shell] { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.m3-app { flex: 1 1 auto; min-height: 560px; display: flex; flex-direction: column; background: var(--m3-bg); color: var(--m3-ink); border: 1px solid var(--m3-line); border-radius: 14px; overflow: hidden; font-size: 13px; }
.m3-app svg { width: 18px; height: 18px; flex: none; }
.m3-dim { color: var(--m3-ink3); font-size: 12.5px; }
.m3-pad { padding: 16px; }
.m3-bad { color: #ff6b6b; padding: 10px 0; } html.light .m3-bad { color: #c41717; }
.m3-grow { flex: 1 1 auto; }
.m3-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }

/* the bar along the top */
.m3-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--m3-panel); border-bottom: 1px solid var(--m3-line); min-height: 48px; }
.m3-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.m3-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.m3-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--m3-accent); white-space: nowrap; }
.m3-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,176,0,.16); color: #e0a000; white-space: nowrap; }
.m3-meta { color: var(--m3-ink3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-top-r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.m3-tb { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--m3-ink2); cursor: pointer; }
.m3-tb:hover { background: var(--m3-hover); color: var(--m3-ink); }
.m3-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--m3-line2); background-color: var(--m3-panel2); color: var(--m3-ink); cursor: pointer; }
.m3-btn:hover:not([disabled]) { border-color: var(--m3-accent); }
.m3-btn[disabled] { opacity: .5; cursor: default; }
.m3-btn.is-primary { background: linear-gradient(180deg, #d92222, #c41717 55%, #9e1010); border-color: #9e1010; color: #fff; }
.m3-btn.is-lg { padding: 11px 18px; font-size: 14px; }
.m3-link { font: inherit; font-size: 12.5px; color: var(--m3-sel); background: none; border: 0; padding: 0; cursor: pointer; }
.m3-link.is-danger { color: #ff6b6b; } html.light .m3-link.is-danger { color: #c41717; }
.m3-menu { position: relative; }
.m3-menu-l { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; display: flex; flex-direction: column; padding: 6px; border-radius: 10px; border: 1px solid var(--m3-line2); background-color: var(--m3-panel); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.m3-menu-l button { font: inherit; font-size: 13px; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--m3-ink); cursor: pointer; }
.m3-menu-l button:hover { background: var(--m3-hover); }

/* (2026-11-06, Landon: "the UI doesn't look good") nothing in the tool may make the pane wider than the window */
[data-model3d-shell], .m3-app, .m3-top > *, .m3-body > * { min-width: 0; }
.m3-meta { flex: 0 1 auto; min-width: 0; }

/* home: the drop zone and the three steps side by side, the saved models as cards with a picture of each */
.m3-home, .m3-stagebox { padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.m3-app.is-home .m3-home { padding: 24px 26px 32px; gap: 20px; }
.m3-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 18px; align-items: stretch; }
.m3-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 36px 24px; min-height: 240px; border: 1.5px dashed var(--m3-line2); border-radius: 16px;
    background-color: var(--m3-panel); background-image: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(196,23,23,.07), transparent 70%); color: var(--m3-ink); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.m3-drop:hover, .m3-drop.is-over { border-color: var(--m3-accent); background-color: rgba(196,23,23,.035); box-shadow: 0 10px 30px rgba(196,23,23,.08); }
.m3-drop-t { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.m3-drop-s { color: var(--m3-ink2); font-size: 13.5px; }
.m3-drop .m3-btn { pointer-events: none; }
.m3-drop:focus-visible { outline: 2px solid var(--m3-accent); outline-offset: 3px; }
.m3-drop-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m3-drop-col .m3-drop { flex: 1 1 auto; }
.m3-drop-alt { display: flex; gap: 8px; justify-content: center; align-items: baseline; font-size: 12.5px; }
.m3-drop-alt .m3-link { cursor: pointer; font-weight: 600; }
.m3-setup-add { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.m3-drop-i { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background-color: rgba(196,23,23,.1); color: var(--m3-accent); margin-bottom: 2px; }
.m3-drop-i svg { width: 30px; height: 30px; }
.m3-fmts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.m3-fmts i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--m3-line2); color: var(--m3-ink2); background-color: var(--m3-panel2); }
.m3-how { list-style: none; margin: 0; padding: 20px; display: flex; flex-direction: column; justify-content: center; gap: 18px; border: 1px solid var(--m3-line); border-radius: 16px; background-color: var(--m3-panel); }
.m3-how li { display: flex; gap: 12px; align-items: flex-start; }
.m3-how-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--m3-accent); background-color: rgba(196,23,23,.1); }
.m3-how b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.m3-how li span:not(.m3-how-n) { color: var(--m3-ink2); font-size: 12.5px; line-height: 1.5; }
.m3-sech { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.m3-sech h3 { margin: 0; font-size: 15px; font-weight: 750; color: var(--m3-ink); }
.m3-count { font-size: 11.5px; font-weight: 700; color: var(--m3-ink2); background-color: var(--m3-panel2); border: 1px solid var(--m3-line2); border-radius: 999px; padding: 1px 8px; }
.m3-count:empty { display: none; }
.m3-h3 { margin: 6px 0 0; font-size: 14px; color: var(--m3-ink2); font-weight: 650; }
.m3-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.m3-card { border: 1px solid var(--m3-line); border-radius: 14px; background-color: var(--m3-panel); display: flex; flex-direction: column; overflow: hidden; cursor: pointer; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .16s, border-color .16s, box-shadow .16s; }
.m3-card:hover { border-color: rgba(196,23,23,.45); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.1); }
.m3-card:focus-visible { outline: 2px solid var(--m3-accent); outline-offset: 2px; }
.m3-card-v { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--m3-line); background-color: #e6ebf1; background-image: linear-gradient(165deg, #dfe6ee, #f4f6f8); }
html:not(.light) .m3-card-v { background-color: #1a1d22; background-image: linear-gradient(165deg, #20242b, #15171b); }
.m3-card-v img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m3-card-art { color: #5f6e7e; display: grid; place-items: center; }
.m3-card-art svg { width: 128px; height: 98px; }
html:not(.light) .m3-card-art { color: #8d9aa8; }
.m3-card-badge { position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background-color: rgba(255,255,255,.92); color: #2b2f36; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.m3-card-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.m3-card-t { font-size: 14.5px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m3-card-f { font-size: 12px; color: var(--m3-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-card-s { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--m3-ink2); }
.m3-card-s b { color: var(--m3-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.m3-card-a { display: flex; align-items: center; gap: 2px; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--m3-line); font-size: 12px; }
.m3-ghost { font: inherit; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; border: 1px solid transparent; background-color: transparent; color: var(--m3-ink2); cursor: pointer; }
.m3-ghost:hover { background-color: var(--m3-hover); color: var(--m3-ink); border-color: var(--m3-line2); }
.m3-ghost.is-danger:hover { color: #c41717; border-color: rgba(196,23,23,.35); background-color: rgba(196,23,23,.06); }
html:not(.light) .m3-ghost.is-danger:hover { color: #ff7b7b; }
.m3-empty { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border: 1px dashed var(--m3-line2); border-radius: 14px; color: var(--m3-ink2); font-size: 12.5px; }
.m3-empty svg { width: 28px; height: 28px; color: var(--m3-ink3); }
.m3-empty b { display: block; color: var(--m3-ink); font-size: 13.5px; margin-bottom: 2px; }

.m3-card-job { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background-color: rgba(11,132,243,.1); color: #0b6fd0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not(.light) .m3-card-job { color: #6cb6ff; }
.m3-card-n { font-size: 12px; color: var(--m3-ink2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* a new model: its details and its files (2026-11-06, Landon: "select multiple PDF/CAD then type a title") */
.m3-setup { display: flex; flex-direction: column; gap: 16px; max-width: 1200px; }
.m3-setup-g { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.m3-setup-c { border: 1px solid var(--m3-line); border-radius: 14px; background-color: var(--m3-panel); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.m3-setup-c h3 { margin: 0; font-size: 14px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.m3-setup-c > .m3-dim { margin: -4px 0 0; line-height: 1.45; }
.m3-setup-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m3-fld { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--m3-ink2); font-weight: 600; }
.m3-fld em { font-style: normal; font-weight: 600; font-size: 10.5px; color: var(--m3-accent); margin-left: 4px; text-transform: uppercase; letter-spacing: .05em; }
.m3-fld input, .m3-fld select, .m3-fld textarea { font: inherit; font-size: 13.5px; font-weight: 400; color: var(--m3-ink); background-color: var(--m3-panel2); border: 1px solid var(--m3-line2); border-radius: 9px; padding: 9px 11px; width: 100%; box-sizing: border-box; }
.m3-fld textarea { resize: vertical; min-height: 64px; }
.m3-fld input:focus, .m3-fld select:focus, .m3-fld textarea:focus, .m3-file-o input:focus { outline: none; border-color: var(--m3-accent); box-shadow: 0 0 0 3px rgba(196,23,23,.12); }
.m3-files { display: flex; flex-direction: column; gap: 8px; border-radius: 12px; transition: background-color .15s, box-shadow .15s; }
.m3-files.is-over { background-color: rgba(196,23,23,.04); box-shadow: 0 0 0 2px rgba(196,23,23,.35); }
.m3-files-drop { text-align: center; padding: 12px; border: 1.5px dashed var(--m3-line2); border-radius: 10px; color: var(--m3-ink3); font-size: 12.5px; }
.m3-file { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 12px; border: 1px solid var(--m3-line); border-radius: 11px; background-color: var(--m3-panel2); }
.m3-file.is-bad { opacity: .7; }
.m3-file.is-bad .m3-file-n span { color: #c41717; }
.m3-file-i { flex: none; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: #fff; background-color: #8a929c; }
.m3-file-i.is-pdf { background-color: #c41717; }
.m3-file-i.is-dxf { background-color: #2f6fd6; }
.m3-file-i.is-ifc { background-color: #2c8a5a; }
.m3-file-i.is-step { background-color: #7a4fc4; }
.m3-file-i.is-mesh { background-color: #c47a12; }
.m3-file-i.is-mtl { background-color: #b0956a; }
.m3-file-n { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m3-file-n b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-file-n > span { font-size: 12px; color: var(--m3-ink3); }
.m3-file-w { margin-top: 4px; font-size: 12px; color: #8a4b00; background-color: #fff4e5; border: 1px solid #f0c48a; border-radius: 7px; padding: 4px 8px; }
html:not(.light) .m3-file-w { color: #ffc27a; background-color: rgba(255,170,60,.1); border-color: rgba(255,170,60,.3); }
.m3-scanwarn { padding: 10px 12px; border-radius: 10px; background-color: #fff4e5; border: 1px solid #f0c48a; color: #6b3a00; font-size: 12.5px; line-height: 1.45; max-width: 980px; }
html:not(.light) .m3-scanwarn { color: #ffc27a; background-color: rgba(255,170,60,.1); border-color: rgba(255,170,60,.3); }
.m3-file-o { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 8px; font-size: 11.5px; color: var(--m3-ink2); }
.m3-file-o label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; }
.m3-file-o input { font: inherit; font-size: 12.5px; font-weight: 400; width: 110px; color: var(--m3-ink); background-color: var(--m3-panel); border: 1px solid var(--m3-line2); border-radius: 7px; padding: 5px 7px; }
.m3-file-o details { flex-basis: 100%; }
.m3-file-o details summary { cursor: pointer; color: var(--m3-sel); font-weight: 600; font-size: 12px; }
.m3-file-o details[open] { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.m3-file-o details[open] summary { flex-basis: 100%; }
.m3-table td.m3-tf { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--m3-ink2); }
.m3-table td.m3-tf small { color: var(--m3-ink3); }
@media (max-width: 900px) { .m3-setup-g { grid-template-columns: 1fr; } }

/* reading and choosing sheets */
.m3-prog { display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.m3-prog b { display: block; height: 6px; border-radius: 6px; background: var(--m3-line2); overflow: hidden; }
.m3-prog i { display: block; height: 100%; width: 0; background: var(--m3-accent); transition: width .2s; }
.m3-log { font-size: 12.5px; color: var(--m3-ink2); display: flex; flex-direction: column; gap: 4px; max-width: 900px; }
.m3-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.m3-steps span { font-size: 12px; font-weight: 650; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--m3-line2); color: var(--m3-ink3); }
.m3-steps .is-done { color: var(--m3-ink2); }
.m3-steps .is-on { border-color: var(--m3-accent); color: var(--m3-ink); background: rgba(196,23,23,.1); }
.m3-lede { margin: 0; color: var(--m3-ink2); line-height: 1.55; max-width: 860px; }
.m3-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--m3-ink2); }
.m3-sum b { color: var(--m3-ink); font-size: 15px; }
.m3-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.m3-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--m3-ink3); padding: 6px 8px; border-bottom: 1px solid var(--m3-line2); position: sticky; top: 0; background-color: var(--m3-bg); }
.m3-table td { padding: 5px 8px; border-bottom: 1px solid var(--m3-line); vertical-align: middle; }
.m3-table td.m3-t { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-table select, .m3-table input[type=text], .m3-color select, .m3-asm input { font: inherit; font-size: 12.5px; color: var(--m3-ink); background-color: var(--m3-panel2); border: 1px solid var(--m3-line2); border-radius: 7px; padding: 4px 6px; }
.m3-table input[type=text] { width: 160px; }

/* the viewer */
.m3-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr) 340px; }
.m3-side, .m3-panel { background-color: var(--m3-panel); overflow: auto; min-height: 0; }
.m3-side { border-right: 1px solid var(--m3-line); padding: 10px 10px 18px; }
.m3-panel { border-left: 1px solid var(--m3-line); display: flex; flex-direction: column; }
.m3-stage { position: relative; min-width: 0; min-height: 0; }
.m3-canvas { position: absolute; inset: 0; }
.m3-canvas canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.m3-tools { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background-color: var(--m3-panel); border: 1px solid var(--m3-line2); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.m3-tool { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--m3-ink2); cursor: pointer; }
.m3-tool:hover { background: var(--m3-hover); color: var(--m3-ink); }
.m3-tool.is-on { background: rgba(196,23,23,.16); color: var(--m3-ink); }
.m3-sep { width: 1px; height: 22px; background: var(--m3-line2); margin: 0 4px; }
/* division preview chips along the foot of the model */
/* one row that scrolls sideways, not rows piled over the model; centred when it fits */
.m3-chips { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding: 4px 6px 6px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
.m3-chips > :first-child { margin-left: auto; }
.m3-chips > :last-child { margin-right: auto; }
.m3-chipb { flex: none; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--m3-line2); background-color: var(--m3-panel); color: var(--m3-ink2); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.m3-chipb i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.m3-chipb em { font-style: normal; color: var(--m3-ink3); font-size: 10.5px; }
.m3-chipb:hover { color: var(--m3-ink); border-color: var(--m3-accent); }
.m3-chipb.is-on { background-color: rgba(196,23,23,.16); color: var(--m3-ink); border-color: var(--m3-accent); }
.m3-disc { margin: 2px 0 6px; }
.m3-disc > summary { list-style: none; cursor: pointer; }
.m3-disc > summary::-webkit-details-marker { display: none; }
.m3-chk.is-disc span { font-weight: 700; }
.m3-disc .m3-cat { margin-left: 12px; }
/* a model the reader could not put together reliably says so over the view */
.m3-warn { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); box-sizing: border-box; padding: 10px 14px; border-radius: 10px; background: #fff4e5; border: 1px solid #f0b46a; color: #5a3500; font-size: 12.5px; line-height: 1.45; z-index: 3; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.m3-warn b { color: #8a3b00; }
.m3-warn .m3-link { margin-left: 8px; }
.m3-hud { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); padding: 8px 14px; border-radius: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.m3-secbox { position: absolute; right: 12px; top: 60px; width: 250px; padding: 10px 12px; border-radius: 12px; background-color: var(--m3-panel); border: 1px solid var(--m3-line2); box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 6px; }
.m3-secrow { display: grid; grid-template-columns: 1fr; gap: 2px; font-size: 11.5px; color: var(--m3-ink2); }
.m3-secrow input { width: 100%; accent-color: var(--m3-accent); }

/* layers */
.m3-side-h { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 8px; }
.m3-color { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; color: var(--m3-ink2); font-size: 12.5px; }
.m3-grp { margin: 10px 0 4px; }
.m3-grp-h { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--m3-ink3); margin: 12px 2px 6px; }
.m3-chk { display: flex; align-items: center; gap: 7px; padding: 4px 4px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.m3-chk:hover { background: var(--m3-hover); }
.m3-chk span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m3-chk small { color: var(--m3-ink3); }
.m3-chk em { font-style: normal; color: var(--m3-ink3); font-size: 11.5px; }
/* a column of checked boxes in the brand red read as a column of alarms: slate, the red kept for what is chosen */
.m3-chk input { accent-color: #39414c; margin: 0; width: 14px; height: 14px; flex: none; }
html:not(.light) .m3-chk input { accent-color: #b9bec8; }
.m3-chk.is-disc { margin-top: 4px; }
.m3-chk em { font-variant-numeric: tabular-nums; }
.m3-chk.is-sub { padding-left: 18px; }
.m3-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.25); }
.m3-iso { font: inherit; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--m3-line2); background: none; color: var(--m3-ink2); cursor: pointer; opacity: 0; }
.m3-chk:hover .m3-iso { opacity: 1; }
.m3-cat summary { list-style: none; cursor: pointer; }
.m3-cat summary::-webkit-details-marker { display: none; }
.m3-cat summary .m3-chk span::before { content: "▸ "; color: var(--m3-ink3); }
.m3-cat[open] summary .m3-chk span::before { content: "▾ "; }

/* the right panel */
.m3-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--m3-line); }
.m3-tab { flex: 1 1 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--m3-ink2); background: none; border: 0; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.m3-tab.is-on { background-color: var(--m3-panel2); color: var(--m3-ink); box-shadow: inset 0 0 0 1px var(--m3-line2); }
.m3-pbody { padding: 14px; overflow: auto; flex: 1 1 auto; }
/* the model at a glance, before anything is picked */
.m3-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.m3-stat { border: 1px solid var(--m3-line); border-radius: 10px; padding: 10px 12px; background-color: var(--m3-panel2); min-width: 0; }
.m3-stat b { display: block; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m3-stat span { font-size: 10.5px; color: var(--m3-ink3); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.m3-hint { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background-color: rgba(11,132,243,.07); border: 1px solid rgba(11,132,243,.16); color: var(--m3-ink2); font-size: 12.5px; line-height: 1.45; }
.m3-lvls { display: flex; flex-direction: column; margin-bottom: 12px; border: 1px solid var(--m3-line); border-radius: 10px; overflow: hidden; }
.m3-lvls > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; font-size: 12.5px; border-top: 1px solid var(--m3-line); }
.m3-lvls > div:first-child { border-top: 0; }
.m3-lvls em { font-style: normal; color: var(--m3-ink3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m3-kv { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.m3-kv th { text-align: left; font-weight: 600; color: var(--m3-ink3); padding: 5px 8px 5px 0; vertical-align: top; width: 42%; }
.m3-kv td { padding: 5px 0; }
.m3-note { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(255,176,0,.15); color: #d99a00; }
.m3-sheet canvas { max-width: 100%; border-radius: 8px; border: 1px solid var(--m3-line2); margin-top: 6px; }
.m3-qwrap { overflow: auto; }
.m3-qlist .m3-qh { font-weight: 700; font-size: 12px; color: var(--m3-ink); background-color: var(--m3-panel2); padding: 7px 8px; border-radius: 7px; margin: 10px 0 2px; }
.m3-qr { display: flex; gap: 10px; justify-content: space-between; padding: 7px 4px; border-bottom: 1px solid var(--m3-line); }
.m3-qi { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m3-qi b { font-weight: 600; font-size: 12.5px; }
.m3-qi small { color: var(--m3-ink3); font-size: 11.5px; }
.m3-qv { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.m3-qv em { font-style: normal; color: var(--m3-ink3); font-size: 11px; display: inline-block; min-width: 18px; }
.m3-q, .m3-mini { width: 100%; border-collapse: collapse; font-size: 12px; }
.m3-q th, .m3-mini th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--m3-ink3); padding: 5px 6px; border-bottom: 1px solid var(--m3-line2); }
.m3-q td, .m3-mini td { padding: 4px 6px; border-bottom: 1px solid var(--m3-line); vertical-align: top; }
.m3-q .m3-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m3-qh td { font-weight: 700; color: var(--m3-ink); background-color: var(--m3-panel2); padding-top: 8px; }
.m3-notes { margin: 0; padding-left: 18px; color: var(--m3-ink2); font-size: 12.5px; line-height: 1.5; }
.m3-asm { display: grid; grid-template-columns: 1fr 70px 22px; align-items: center; gap: 6px; font-size: 12.5px; color: var(--m3-ink2); margin: 4px 0; }
.m3-asm input { width: 70px; }
.m3-asm em { font-style: normal; color: var(--m3-ink3); }

@media (max-width: 900px) {
    .m3-hero { grid-template-columns: 1fr; }
    .m3-app.is-home .m3-home { padding: 16px; }
}
@media (max-width: 1100px) {
    .m3-body { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: minmax(420px, 1fr) auto; }
    .m3-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--m3-line); max-height: 46vh; }
}
@media (max-width: 720px) {
    .m3-body { grid-template-columns: 1fr; grid-template-rows: minmax(380px, 60vh) auto auto; }
    .m3-side { border-right: 0; border-top: 1px solid var(--m3-line); grid-row: 3; max-height: 40vh; }
    .m3-panel { grid-row: 2; }
    .m3-meta { display: none; }
}
