* { box-sizing: border-box; }
:root { color-scheme: dark; font: 16px/1.55 Inter, Arial, Helvetica, sans-serif; color: #f5f5f5; background: #111; --panel: #181818; --line: #444; --control: #252525; --muted: #b5b5b5; }
body { margin: 0; }
main { width: min(1080px, calc(100% - 2rem)); margin: 2.5rem auto; }
.marxi-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; min-height: 82px; padding: 18px 30px; background: #101010; border-bottom: 1px solid var(--line); }
.marxi-logo img { display: block; width: 150px; height: auto; }
.tool-title { font-size: 19px; font-weight: 500; }
.marxi-nav { margin-left: auto; font-size: .875rem; }
.marxi-nav a { text-decoration: none; }
.marxi-nav a:hover { text-decoration: underline; }
.page-heading { margin-bottom: 1.5rem; }
h1 { font-size: clamp(2.25rem, 7vw, 4rem); line-height: 1; margin: .4rem 0; }
h2 { font-size: 1.2rem; margin: 0 0 1rem; }
p { margin: .65rem 0; }
.eyebrow { color: #eee; font-size: .8rem; font-weight: 750; letter-spacing: .12em; }
.layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: clamp(1rem, 3vw, 1.5rem); margin-bottom: 1rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
label { display: grid; align-content: end; gap: .25rem; font-size: .9rem; }
[hidden] { display: none; }
input, select, button { min-height: 44px; font: inherit; border-radius: .5rem; border: 1px solid #666; }
input, select { background: var(--control); color: inherit; width: 100%; padding: .45rem .6rem; }
button { background: var(--control); color: #eee; font-weight: 700; padding: .45rem .9rem; cursor: pointer; }
button:hover:not(:disabled) { background: #353535; }
.primary-button { background: #f5f5f5; color: #111; }
.primary-button:hover:not(:disabled) { background: #ccc; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
[aria-invalid=true] { border-color: #ffad9e; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: .9rem; }
.number { font-size: clamp(1.65rem, 5vw, 2.85rem); font-weight: 750; line-height: 1.12; overflow-wrap: anywhere; }
dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .7rem; padding: .5rem 0; border-top: 1px solid var(--line); }
dd { margin: 0; font-weight: 650; }
.safety { border-left: 4px solid #aaa; }
li + li { margin-top: .35rem; }
a { color: #eee; text-underline-offset: 3px; }
@media (max-width: 720px) { .layout { display: block; } main { margin-top: 1.5rem; } }
@media (max-width: 650px) {
  .marxi-header { min-height: auto; padding: 14px 16px; }
  .marxi-logo img { width: 125px; }
  .tool-title { font-size: 16px; }
  .marxi-nav { width: 100%; margin-left: 0; }
}
@media (max-width: 400px) { .fields { grid-template-columns: 1fr; } }

summary { cursor: pointer; font-weight: 750; }
.table-scroll { overflow-x: auto; margin-top: .75rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem; border-bottom: 1px solid var(--line); }
#save-test { margin-top: .65rem; }
