:root { color-scheme: dark; font: 15px/1.5 system-ui, sans-serif; color: #e0e7e4; background: #101615; --accent: #8cd6b6; --line: #303c37; --muted: #a2b2aa; }
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 2400px; padding: 0 40px; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
header { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.demo-account { border-left: 1px solid var(--line); padding-left: 20px; color: var(--accent); white-space: nowrap; }
main { padding: 24px 0; }
.eyebrow, legend, .step { text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .15em; }
.eyebrow, .step { color: var(--accent); }
h1 { font: 500 clamp(2.5rem, 3.2vw, 4rem)/1.1 system-ui, sans-serif; letter-spacing: -.045em; margin: 8px 0 12px; }
h2 { font: 500 1.55rem/1.2 system-ui, sans-serif; letter-spacing: -.025em; margin: 8px 0 14px; }
.intro { max-width: 1000px; color: var(--muted); font-size: .95rem; margin: 0; }
.workspace { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 32px; margin-top: 26px; align-items: start; border-top: 1px solid var(--line); }
form { min-width: 0; }
#settings { padding: 20px 24px 20px 0; border-right: 1px solid var(--line); max-height: calc(100vh - 280px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#settings > .step { margin-top: 0; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; margin: 16px 0 0; }
legend { padding: 0 8px 0 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 6px; margin-bottom: 14px; font-size: .8rem; }
input, select, button { font: inherit; }
input[type=number], input[type=text], select { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 3px; background: #1c2521; color: inherit; }
input:disabled { color: var(--muted); opacity: .6; }
input[type=range], input[type=checkbox] { accent-color: var(--accent); }
input[type=range] { width: 100%; }
label:has(input[type=range]) { grid-template-columns: 1fr auto; }
label:has(input[type=range]) input { grid-column: 1 / -1; }
output { font-variant-numeric: tabular-nums; color: var(--accent); }
#cell-layout { display: grid; gap: 5px; margin-top: 12px; }
#cell-layout button { aspect-ratio: 1; padding: 0; min-width: 0; background: #1c2521; color: var(--muted); border-color: var(--line); }
#cell-layout button[aria-pressed=true] { background: var(--accent); color: #101615; border-color: var(--accent); }
input[type=color] { width: 100%; height: 38px; border: 1px solid var(--line); background: #1c2521; border-radius: 3px; }
.check { display: flex; align-items: center; gap: 8px; }
small, .small { font-size: .78rem; color: var(--muted); }
summary { cursor: pointer; padding: 12px 0; font-size: .82rem; }
details .fields { padding-top: 12px; }
.actions, .export-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#settings .actions { position: sticky; bottom: -20px; padding: 14px 0; background: #101615; border-top: 1px solid var(--line); }
button, #download, .button { display: inline-block; padding: 10px 15px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #101615; font-weight: 600; font-size: .82rem; cursor: pointer; text-decoration: none; }
#cancel, .secondary, #download { background: transparent; color: var(--accent); border-color: var(--line); }
button:hover:not(:disabled), .button:hover, #download:hover { border-color: var(--accent); filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: default; }
.preview { overflow: hidden; min-width: 0; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 60px; padding: 10px 0; font-size: .8rem; }
#viewer { height: clamp(420px, 55vh, 800px); overflow: hidden; position: relative; background: #19231f; touch-action: none; }
#viewer canvas { display: block; max-width: 100%; }
.preview > .small { margin: 10px 0; }
.export-panel { padding: 20px 0; border-top: 1px solid var(--line); }
.export-panel p { margin: 0 0 14px; }
.export-panel label { max-width: 420px; }
.integration { margin-top: 32px; padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 60px; }
.integration p { max-width: 760px; color: var(--muted); }
.integration pre { background: #19231f; padding: 20px; border-left: 2px solid var(--line); }
pre { font: .75rem/1.6 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow: auto; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 20px; }
.presets button { background: transparent; color: var(--accent); border-color: var(--line); padding: 7px 10px; font-size: .75rem; }
.set-items { list-style: none; padding: 0; }
.set-items li { display: grid; grid-template-columns: minmax(0,1fr) 65px auto; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.set-items input { width: 100%; min-width: 0; }
#plate-layouts { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 14px; margin-top: 20px; }
#plate-layouts figure { margin: 0; }
#plate-layouts canvas { width: 100%; display: block; border: 1px solid var(--line); }
#plate-layouts figcaption { font-size: .76rem; margin-top: 6px; }
.dimension { font-variant-numeric: tabular-nums; color: var(--muted); }
#print-settings { font-size: .85rem; }
#print-settings dt { color: var(--muted); font-size: .75rem; }
#print-settings dd { font-size: 1.05rem; }
footer { border-top: 1px solid var(--line); padding: 24px 0 36px; font-size: .76rem; color: var(--muted); }
:focus-visible { outline: 3px solid #e7ad86; outline-offset: 3px; }
[hidden] { display: none !important; }
.set-panel { min-width: 0; padding: 20px 0 0; }
.set-panel > .step { margin-top: 0; }
.set-plan { border-top: 1px solid var(--line); padding-top: 8px; }
.set-export { border-top: 1px solid var(--line); margin-top: 20px; }
@media(min-width: 1150px) {
  .gridfinity-studio h1 { font-size: 2.4rem; margin: 6px 0 8px; }
  .gridfinity-studio .eyebrow { margin-top: 0; }
  .gridfinity-studio .intro { max-width: 1200px; }
  .gridfinity-studio .workspace { grid-template-columns: 300px minmax(0,1fr) 370px; gap: 24px; margin-top: 20px; }
  .gridfinity-studio #settings { max-height: calc(100vh - 220px); }
  .gridfinity-studio #viewer { height: clamp(300px, 43vh, 650px); }
  .gridfinity-studio .export-panel { padding: 14px 0; }
  .gridfinity-studio .set-panel { border-left: 1px solid var(--line); padding-left: 24px; display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 580px; }
  .set-plan { flex: 1; min-height: 100px; overflow-y: auto; scrollbar-width: thin; padding-right: 8px; }
  .set-export { flex-shrink: 0; margin-top: 12px; }
  .set-export .export-actions { gap: 8px; }
  .set-export .export-actions button { padding: 9px 10px; }
}
@media(min-width: 851px) and (max-width: 1149px) { .set-panel { grid-column: 2; border-top: 1px solid var(--line); } }
@media(min-width: 1500px) {
  .vessel-studio .preview { display: grid; grid-template-columns: minmax(0,1fr) 340px; column-gap: 28px; }
  .vessel-studio .preview > * { grid-column: 1; }
  .vessel-studio .preview > section.export-panel { grid-column: 2; grid-row: 1 / span 4; border-top: 0; border-left: 1px solid var(--line); padding: 20px 0 0 28px; }
}
@media(max-width: 850px) { body { padding: 0 16px; } header nav { gap: 12px; } .workspace, .integration { grid-template-columns: 1fr; gap: 24px; } #settings { max-height: none; border-right: 0; padding-right: 0; } #viewer { height: 390px; } main { padding-top: 24px; } }

.assembly-notes { min-width: 0; padding-top: 20px; }
.assembly-notes > .step { margin-top: 0; }
.assembly-notes ol { padding-left: 20px; font-size: .85rem; color: var(--muted); }
.assembly-notes li { margin-bottom: 16px; }
.assembly-notes strong { color: #e0e7e4; }
.rich-description { max-width: 1200px; margin: 24px auto 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 1rem; }
.rich-description figure { margin: 28px 0; }
.rich-description img { display: block; width: 100%; height: auto; }
.rich-description figcaption { color: var(--muted); font-size: .82rem; padding-top: 10px; }
.rich-description h3 { margin-top: 32px; font-size: 1.2rem; }
.rich-description table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.rich-description th, .rich-description td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.rich-description li { margin-bottom: 12px; }
@media(min-width: 1300px) {
  .assembly-studio h1 { font-size: 2.4rem; margin: 6px 0 8px; }
  .assembly-studio .eyebrow { margin-top: 0; }
  .assembly-studio .intro { max-width: 1200px; }
  .assembly-studio .workspace { grid-template-columns: 300px minmax(0,1fr) 320px; gap: 24px; margin-top: 20px; }
  .assembly-studio #settings, .assembly-notes { max-height: calc(100vh - 230px); overflow-y: auto; scrollbar-width: thin; }
  .assembly-studio #viewer { height: clamp(360px, 48vh, 760px); }
  .assembly-notes { border-left: 1px solid var(--line); padding-left: 24px; }
}
@media(min-width: 851px) and (max-width: 1299px) { .assembly-notes { grid-column: 2; border-top: 1px solid var(--line); } }

.assembly-studio .export-actions select { width: auto; max-width: 100%; }
