* { box-sizing: border-box; }
:root { color-scheme: dark; font: 16px/1.55 Inter, Arial, Helvetica, sans-serif; color: #f5f5f5; background: #111; --panel: #181818; --line: #555; --control: #252525; --muted: #bfbfbf; }
body { margin: 0; }
[hidden] { display: none !important; }
main { width: min(1080px, calc(100% - 2rem)); margin: 2.5rem auto; }
.marxi-header, .marxi-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 18px clamp(16px, 4vw, 30px); background: #101010; }
.marxi-header { min-height: 82px; border-bottom: 1px solid var(--line); }
.marxi-footer { border-top: 1px solid var(--line); }
.marxi-logo img { display: block; width: 150px; height: auto; }
.marxi-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .8rem; }
a { color: inherit; }
a[aria-current] { font-weight: 750; }
.eyebrow { font-size: .8rem; font-weight: 750; letter-spacing: .12em; }
h1 { font-size: clamp(2rem, 6vw, 4rem); line-height: 1.1; margin: .4rem 0; }
h1 small { font-size: .38em; white-space: nowrap; }
h2 { font-size: 1.25rem; }
fieldset, .panel { min-width: 0; padding: clamp(.7rem, 2vw, 1.25rem); margin: 1rem 0; background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; }
legend { padding: 0 .35rem; font-weight: 700; }
label { display: inline-block; margin: .3rem; max-width: 100%; }
input, select, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, button { min-height: 44px; border-radius: .5rem; border: 1px solid #777; background: var(--control); padding: .4rem .6rem; max-width: 100%; }
input[type=number] { width: 7rem; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; vertical-align: middle; }
button { margin: .2rem; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
#run { background: #f5f5f5; color: #111; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
small, .muted, figcaption { color: var(--muted); }
.part-table { overflow-x: auto; margin-top: .75rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
td:last-child { overflow-wrap: anywhere; }
#layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }
figure { margin: 0; min-width: 0; }
figure svg { width: 100%; height: 15rem; background: #252525; }
#status, #move-status, #comparison, #project-status { overflow-wrap: anywhere; }
@media (max-width: 540px) {
  main { margin-top: 1.3rem; }
  .marxi-nav { margin-left: 0; }
  th, td { padding-inline: .3rem; }
  td input[type=number] { width: 4.5rem; }
}

.part-name { width: 11em; max-width: 100%; }
.part-thumbnail { width: 3rem; height: 3rem; vertical-align: middle; margin-right: .5rem; background: #252525; fill: #9fdfd2; }
@media (max-width: 540px) { .part-thumbnail { display: block; margin: 0 0 .25rem; } }

#stock-preview:empty { display:none; }
#stock-preview svg { height:11rem; }
#anchor-preview svg { height:11rem; }
#anchor-preview svg, #stock-preview svg { cursor:crosshair; }
.placement-anchor { pointer-events:none; }
.rejected { fill:#ce5b4e; fill-opacity:.5; stroke:#ff534b; stroke-width:.5; }
#repair-previews { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:1rem; }
#repair-review { overflow-wrap:anywhere; }
#repair-previews svg { height:10rem; }
