:root { --bg: #101b20; --panel: #152329; --panel-raised: #1c3035; --text: #e8eee9; --muted: #a2b5b3; --accent: #a8e3c9; --border: #304347; --warning: #eac590; }
body { background: radial-gradient(ellipse at 80% -10%, #25464366, transparent 55%), #101b20; }
main { width: min(1280px, 92vw); margin: 0 auto 2rem; }
a { text-decoration-thickness: 1px; }
.skip-link { position: absolute; top: -80px; left: 1rem; padding: .7rem; background: var(--bg); z-index: 5; }
.skip-link:focus { top: 0; }
.topbar { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); font-size: .73rem; letter-spacing: .09em; }
.brand { text-decoration: none; color: var(--text); font-weight: 700; display: flex; gap: .75rem; align-items: center; }
.brand-mark { color: var(--accent); font-size: 1.8rem; line-height: 1; }
.brand-divider { color: #628078; margin: 0 .3rem; }
.topbar-right { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.issue { margin-left: 1.4rem; padding-left: 1.4rem; border-left: 1px solid var(--border); }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin: 3.8rem 0 3.3rem; }
.eyebrow { font-size: .68rem; font-weight: 600; letter-spacing: .14em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.7rem, 5.5vw, 4.9rem); font-weight: 520; letter-spacing: -.055em; line-height: 1.04; margin: 0 0 1.45rem; max-width: 20ch; }
h1 span { color: var(--accent); }
.lede { color: var(--muted); font-size: 1rem; line-height: 1.85; margin-bottom: 0; }
.hero-note { min-width: 245px; margin-bottom: .2rem; font-size: .8rem; }
.hero-note p { color: var(--muted); margin: 1rem 0; }
.hero-note a { font-size: .73rem; color: var(--muted); text-decoration: none; }
.hero-note a:hover { color: var(--accent); }
.outline-badge { display: inline-flex; gap: .5rem; align-items: center; color: #d9c7a3; border: 1px solid #655e47; padding: .4rem .65rem; border-radius: 3px; font-size: .64rem; letter-spacing: .06em; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.1rem; }
.section-heading h2, .panel-heading h2 { font-size: 1.06rem; font-weight: 500; margin: 0; letter-spacing: -.015em; }
.section-no { color: #80928d; font-size: .68rem; font-weight: normal; margin-right: .75rem; font-family: ui-monospace, monospace; }
.section-heading p { font-size: .75rem; color: var(--muted); margin: 0; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; margin-bottom: 1.5rem; }
.preset-card { border-radius: 8px; background: #142228; padding: 1.15rem 1.4rem; text-align: left; position: relative; transition: border-color .2s, background .2s; }
.preset-card:hover { background: #20363a; }
.preset-card.active { border-color: #a8e3c9; background: #223a3a; box-shadow: inset 3px 0 0 #a8e3c9; }
.preset-card > span, .preset-card strong { display: block; }
.preset-card .preset-number { font-family: ui-monospace, monospace; font-size: .62rem; color: var(--muted); margin-bottom: .65rem; letter-spacing: .055em; }
.preset-card strong { font-size: 1.22rem; font-weight: 540; margin-bottom: .15rem; }
.preset-card > span:not(.preset-number):not(.preset-indicator) { color: var(--muted); font-size: .75rem; }
.preset-card .preset-indicator { position: absolute; top: 1rem; right: 1.2rem; color: #607d75; font-size: 1.2rem; }
.preset-card.active .preset-indicator { color: var(--accent); }
.workbench { display: grid; grid-template-columns: 330px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel); scroll-margin-top: 1rem; }
.controls { padding: 1.5rem; border-right: 1px solid var(--border); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.unit-chip { border: 1px solid #40544f; border-radius: 4px; padding: .05rem .4rem; color: var(--muted); font-size: .66rem; font-family: monospace; }
.control-description { font-size: .76rem; color: var(--muted); margin: .8rem 0 1.4rem; }
fieldset { border: 0; border-top: 1px solid #2b403f; padding: 1rem 0 0; margin: 0 0 1.25rem; }
legend { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: #b6c9bf; padding: 0 .65rem 0 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem .7rem; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { font-size: .69rem; display: flex; flex-direction: column; gap: .32rem; color: var(--muted); margin: 0; }
input, select { width: 100%; padding: .56rem .5rem; background: #111e23; font-size: .85rem; border-color: #38504f; border-radius: 4px; color: var(--text); line-height: 1.3; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
select { min-height: 2.35rem; }
.full-label { margin-top: 1rem; }
.full-label select { font-size: .74rem; }
.field-help { margin: .75rem 0 0; font-size: .67rem; line-height: 1.6; color: #8da4a1; }
.quiet-button { background: transparent; border: 0; padding: .1rem 0; color: var(--accent); font-size: .76rem; }
.design-area { min-width: 0; display: flex; flex-direction: column; }
.preview-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.8rem; gap: 1rem; }
.preview-header .eyebrow { font-size: .56rem; color: #89a8a0; letter-spacing: .1em; margin: 0; }
.preview-header h3 { font-size: 1.25rem; font-weight: 500; margin: .3rem 0 0; }
.view-toggle { display: flex; border: 1px solid #36514b; border-radius: 6px; padding: 3px; }
.view-toggle button { font-size: .65rem; border: 0; border-radius: 3px; padding: .3rem .65rem; background: transparent; color: #95b0a7; }
.view-toggle button[aria-pressed="true"] { color: #e8eee9; background: #2c4943; }
.drawing-stage { background-color: #eeeede; background-image: linear-gradient(#b6c3b022 1px, transparent 1px), linear-gradient(90deg, #b6c3b022 1px, transparent 1px); background-size: 24px 24px; position: relative; min-height: 360px; flex: 1; display: flex; flex-direction: column; padding: 1.1rem 1.4rem .9rem; }
.stage-coordinate { position: absolute; top: 1.05rem; left: 1.4rem; color: #8e9a88; font-size: .6rem; letter-spacing: .08em; font-family: ui-monospace, monospace; }
#preview { width: 100%; flex: 1; display: flex; align-items: center; justify-content: center; color: #425f5b; min-height: 320px; }
#preview svg { width: 100%; max-height: 370px; display: block; overflow: visible; }
.stage-caption { font-size: .62rem; color: #4e6760; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.stage-caption span:last-child { margin-left: auto; color: #68796a; font-size: .57rem; }
.swatch { display: inline-block; width: 8px; height: 8px; margin-right: .4rem; border-radius: 2px; }
.swatch.tray { background: #c3a67d; }
.swatch.insert { background: #439c88; }
.live-status { font-size: .72rem; color: var(--accent); padding: .85rem 1.5rem .3rem; min-height: 2.5rem; }
.live-status.warn { color: var(--warning); }
.invalid-message { padding: .7rem 1.5rem; color: #ffb7ad; background: #4b282840; font-size: .76rem; }
.invalid-message ul { margin: .2rem 0; padding-left: 1.2rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1rem 1.5rem; }
.metric-grid > div { padding: 0 1.2rem; border-left: 1px solid var(--border); }
.metric-grid > div:first-child { padding-left: 0; border-left: 0; }
.metric-grid > div:last-child { padding-right: 0; }
.metric-label { font-size: .56rem; color: var(--muted); letter-spacing: .07em; display: block; }
.metric-grid strong { font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.75rem); display: block; margin: .2rem 0; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-grid small { font-size: .6rem; line-height: 1.3; color: #90a6a1; display: block; }
.fit-strip { padding: .8rem 1.5rem 1.1rem; border-top: 1px solid #283d3c; color: #99b4a9; font-size: .66rem; min-height: 3.4rem; line-height: 1.8; }
.fit-strip strong { color: #c6d9ce; font-weight: 500; }
.fit-strip .hold-text { color: var(--warning); }
.download-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border: 1px solid var(--border); border-radius: 10px; margin: 1.5rem 0 3rem; padding: 1.65rem 1.9rem; background: linear-gradient(120deg, #20393277, #132328); }
.download-panel h2 { font-weight: 520; font-size: 1.5rem; margin: 0 0 .65rem; }
.download-panel .eyebrow { font-size: .58rem; margin-bottom: .55rem; }
.download-panel p { font-size: .78rem; color: var(--muted); margin: .2rem 0 .7rem; }
.download-panel p.small-note, .small-note { font-size: .63rem; color: #8fab9f; }
.download-actions { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.primary-button { background: #b4e8cf; color: #143229; font-weight: 620; font-size: .86rem; border-color: #b4e8cf; border-radius: 5px; padding: .8rem 1rem; width: 100%; }
.primary-button:hover:not(:disabled) { background: #ccf7e1; border-color: #ccf7e1; }
.primary-button span { margin-right: .6rem; }
.individual-downloads { display: flex; flex-wrap: wrap; gap: .65rem .9rem; margin: .95rem 0 .7rem; }
.individual-downloads button, .individual-downloads a { border: 0; background: transparent; border-radius: 0; color: #b9d4c9; padding: 0; font-size: .68rem; text-decoration: underline; text-underline-offset: 3px; }
.comparison-table { border: 1px solid var(--border); border-radius: 8px; background: #14242a; }
.comparison-table th { font-size: .64rem; color: #91a8a2; font-weight: 500; white-space: nowrap; padding: .85rem 1.15rem; }
.comparison-table td { font-size: .76rem; padding: 1.25rem 1.15rem; }
.comparison-table tbody th { font-size: .83rem; color: var(--text); text-transform: none; padding: 1.25rem 1.15rem; }
.comparison-table tr:last-child > * { border-bottom: 0; }
.comparison-table tbody th small { display: block; color: #8da69d; font-size: .65rem; font-weight: normal; margin-top: .2rem; }
.material-bar { display: block; height: 3px; width: 90px; background: #30453f; margin-top: .45rem; }
.material-bar i { display: block; height: 100%; background: var(--accent); }
.comparison-notes { display: flex; gap: 2rem; }
.comparison-notes p { font-size: .68rem; color: var(--muted); flex: 1; line-height: 1.7; }
.comparison-notes strong { color: #cfddd4; font-weight: 500; }
.method { border: 1px solid var(--border); border-radius: 6px; margin: .5rem 0 3rem; font-size: .76rem; color: var(--muted); }
.method summary { padding: .9rem 1.1rem; cursor: pointer; color: #c4d9ce; }
.method > div { padding: 0 1.1rem 1.1rem; }
.method p { max-width: 110ch; }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-bottom: 3.5rem; }
.review-card { border: 1px solid var(--border); border-radius: 8px; padding: 1.45rem; background: #15272b; }
.review-symbol { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border: 1px solid #4b7d66; color: var(--accent); border-radius: 50%; font-size: .85rem; }
.review-symbol.physical { border-color: #737261; color: #d9c7a3; }
.review-symbol.hold { border-color: #967247; color: #e4b471; }
.review-card h3 { font-size: .98rem; font-weight: 500; margin: .95rem 0 .9rem; }
.review-card ul { padding-left: 1rem; color: var(--muted); font-size: .72rem; margin-bottom: 1.3rem; }
.review-card li { padding-left: .1rem; margin: .4rem 0; }
.review-card a { font-size: .7rem; }
.review-card p { font-size: .75rem; color: var(--muted); }
.hold-card { background: #2a2a22; border-color: #4e4a35; }
.hold-card h3, .hold-card strong { color: #e9d4ae; font-weight: 500; }
.hold-card a { color: #e6c391; }
.pack-meter { display: flex; align-items: center; gap: .5rem; font-family: ui-monospace, monospace; font-size: .63rem; color: #e5b06d; margin: 1rem 0; }
.pack-meter > div { height: 28px; background: #72634a55; border: 1px solid #897554; border-right: 2px dashed #d8b277; width: 82%; padding: .25rem .4rem; color: #c0ac86; }
.assembly-section { border-top: 1px solid var(--border); padding: 2.6rem 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; }
.assembly-section h2 { font-size: 2rem; font-weight: 500; letter-spacing: -.035em; margin: 0 0 1rem; }
.assembly-section > div p:not(.eyebrow) { color: var(--muted); font-size: .8rem; }
.assembly-section > div a { font-size: .73rem; }
.assembly-steps { list-style: none; padding: 0; margin: 0; }
.assembly-steps li { display: flex; gap: 1.3rem; padding: 0 0 1.3rem; }
.assembly-steps li > span { color: #759f8a; font-family: monospace; font-size: .85rem; border-top: 1px solid #4b6f5e; padding-top: .4rem; min-width: 1.6rem; }
.assembly-steps h3 { font-size: .91rem; font-weight: 500; margin: .4rem 0; }
.assembly-steps p { font-size: .73rem; color: var(--muted); margin: 0; }
footer { border-top: 1px solid var(--border); padding-top: 1.8rem; display: flex; justify-content: space-between; gap: 3rem; font-size: .66rem; color: #9cb2a8; }
footer strong { font-size: .8rem; letter-spacing: .08em; color: var(--text); font-weight: 500; }
footer p { font-size: .65rem; color: #809d91; }
footer > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: .7rem 1rem; }
footer > div:last-child span { display: block; width: 100%; text-align: right; font-size: .58rem; letter-spacing: .07em; color: #81998b; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
@media (max-width: 1000px) {
  .workbench { grid-template-columns: 290px minmax(0, 1fr); }
  .controls { padding: 1.2rem; }
  .hero-note { min-width: 205px; }
  .comparison-table td, .comparison-table th, .comparison-table tbody th { padding: .85rem; }
  .review-grid { gap: .7rem; }
  .review-card { padding: 1.1rem; }
  .metric-grid { padding: .8rem 1rem; }
  .metric-grid > div { padding: 0 .7rem; }
  .assembly-section { gap: 3rem; }
}
@media (max-width: 760px) {
  main { width: 92vw; }
  .topbar { min-height: 70px; }
  .topbar-right { font-size: 0; gap: 0; }
  .topbar-right .status-dot { margin-right: .6rem; }
  .issue { margin-left: 0; padding-left: .6rem; font-size: .7rem; }
  .hero { margin: 2.5rem 0; align-items: flex-start; flex-direction: column; gap: 1.5rem; }
  .hero-note { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
  .hero-note p { font-size: .72rem; margin: 0; }
  .hero-note a { display: none; }
  .lede { font-size: .87rem; }
  .preset-card { padding: .9rem .8rem; }
  .preset-card strong { font-size: 1.03rem; }
  .preset-card .preset-number { font-size: .55rem; }
  .preset-card > span:not(.preset-number):not(.preset-indicator) { font-size: .66rem; }
  .preset-card .preset-indicator { display: none; }
  .preset-grid { gap: .5rem; }
  .workbench { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid var(--border); }
  #parameters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
  #parameters fieldset:nth-child(3) { grid-column: 1 / -1; }
  #parameters fieldset:nth-child(3) .field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #parameters fieldset:nth-child(3) .full-label { max-width: 350px; }
  .quiet-button { text-align: left; }
  .drawing-stage { min-height: 330px; }
  #preview { min-height: 280px; }
  #preview svg { max-height: 330px; }
  .download-panel { grid-template-columns: 1fr; padding: 1.5rem; gap: 1rem; margin-bottom: 2rem; }
  .download-actions { width: 100%; }
  .review-grid { grid-template-columns: 1fr; }
  .review-card { padding: 1.35rem; }
  .comparison-notes { flex-direction: column; gap: 0; margin: .6rem 0; }
  .comparison-notes p { margin: .3rem 0; }
  .assembly-section { grid-template-columns: 1fr; gap: 2rem; }
  footer { flex-direction: column; gap: 1rem; }
  footer > div:last-child { justify-content: flex-start; }
  footer > div:last-child span { text-align: left; }
}
@media (max-width: 420px) {
  .brand { font-size: .65rem; gap: .45rem; }
  .preset-card strong { font-size: .91rem; }
  .preset-card .preset-number { font-size: .49rem; }
  #parameters { grid-template-columns: 1fr; }
  #parameters fieldset:nth-child(3) .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-header { padding: 1rem; }
  .view-toggle button { padding: .25rem .4rem; }
  .metric-grid { padding: .8rem; }
  .metric-grid > div { padding: 0 .5rem; }
  .metric-label { font-size: .5rem; }
  .metric-grid small { font-size: .54rem; }
  .stage-caption span:last-child { margin-left: 0; width: 100%; }
  .desktop-break { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
