:root {
  --navy: #0f2236; --burgundy: #5e1111; --gold: #df7136; --gold-hover: #f08a3c;
  --gray: #4b4b4d; --gray-alt: #3c3c3e; --gray-pc: #6a6a6d; --ice: #f7f7f5; --white: #ffffff;
  --header-height: 52px; --legal-height: 34px; --actions-height: 80px;
  color: var(--navy); background: var(--ice); font: 16px "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 1px solid var(--gray-pc); border-radius: 4px; padding: 11px 20px; background: var(--white); color: var(--navy); min-height: 46px; font-weight: 600; }
button:hover { background: var(--ice); }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--gold); border-color: var(--gold); color: var(--white); }
.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.quiet { border-color: transparent; font-weight: 400; }
input, textarea, select { color: var(--navy); background: var(--ice); padding: 11px 12px; border: 1px solid var(--gray-pc); border-radius: 4px; min-width: 0; width: 100%; min-height: 45px; }
input::selection, textarea::selection { background: var(--gray); color: var(--white); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gray-pc); outline-offset: 1px; }
input[readonly] { color: var(--gray); }
input::placeholder, textarea::placeholder { color: var(--gray-pc); opacity: .85; }
textarea { resize: vertical; min-height: 105px; line-height: 1.5; }
input[type="checkbox"] { width: 19px; min-height: 19px; height: 19px; accent-color: var(--gold); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--burgundy); }
h1, h2, h3 { color: var(--burgundy); margin: 0 0 16px; line-height: 1.2; }
h1 { font-size: clamp(25px, 2.05vw, 32px); font-weight: 650; }
h2 { font-size: 21px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
p { line-height: 1.5; margin-top: 0; }
.titlebar { height: var(--header-height); min-height: var(--header-height); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--white); border-bottom: 1px solid var(--ice); }
.titlebar strong { color: var(--burgundy); font-size: 16px; white-space: nowrap; }
.titlebar strong span { color: var(--gold); }
.product-name { margin-left: auto; font-size: 12px; }
.product-name span { white-space: nowrap; }
#stage { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); flex: 1; min-width: 0; min-height: 0; position: relative; isolation: isolate; overflow: hidden; }
#stage > section { grid-area: 1 / 1; min-width: 0; background: var(--ice); }
.scene { display: flex; flex-direction: column; min-height: 0; }
.scene-enter { animation: scene-in 480ms ease both; z-index: 2; }
.scene-leave { position: absolute; inset: 0; overflow: hidden; animation: scene-out 480ms ease both; pointer-events: none; z-index: 1; }
@keyframes scene-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scene-out { from { opacity: 1; } to { opacity: 0; } }
.art-area { position: relative; flex: 1; min-height: 0; margin: 12px 30px 0; }
.home-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.slide-layer { position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0; opacity: 0; transition: opacity 450ms ease; }
.slide-layer.visible { opacity: 1; }
.home-actions, .scene-actions { min-height: var(--actions-height); height: var(--actions-height); flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 30px; }
.home-actions { justify-content: flex-start; }
.home-actions button { min-width: 240px; }
.scene-actions > span { font-size: 13px; }
.media-controls { display: flex; align-items: center; gap: 12px; }
.legal-footer { min-height: var(--legal-height); flex-shrink: 0; display: flex; align-items: center; padding: 8px 12px; font-size: 11px; background: var(--white); }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--burgundy); margin: 0 0 14px; letter-spacing: .015em; }
.accent-rule { width: 54px; height: 4px; background: var(--gold); margin-bottom: 24px; }
.video-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.video-scene { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 550ms ease; }
.video-scene.is-active { opacity: 1; pointer-events: auto; }
.concept-scene { display: grid; grid-template-columns: minmax(200px, 340px) auto minmax(190px, 260px); gap: 28px; justify-content: center; align-items: center; padding: 12px 38px; }
.concept-copy h1 { white-space: pre-line; font-size: clamp(28px, 2.5vw, 38px); }
.concept-copy > p:last-child { font-size: 17px; max-width: 300px; }
.concept-flow { max-width: 260px; }
.concept-flow > .eyebrow { color: var(--navy); font-size: 11px; }
.flow-node { padding: 14px 16px; border-left: 2px solid var(--gray-pc); margin: 10px 0; transition: background 400ms, border-color 400ms; }
.flow-node.active { background: var(--white); border-left: 3px solid var(--gold); }
.flow-node > span { color: var(--gold); font-size: 24px; font-weight: 600; }
.flow-node h2 { font-size: 19px; margin: 6px 0; }
.flow-node p { font-size: 14px; margin: 0; }
.video-frame { position: relative; overflow: hidden; background: var(--ice); }
.portrait-frame { height: 100%; max-height: calc(100dvh - 190px); aspect-ratio: 9 / 16; justify-self: center; }
.video-frame video { display: block; height: 100%; width: 100%; object-fit: contain; background: var(--ice); }
.video-frame progress { position: absolute; left: 3%; width: 94%; bottom: 8px; height: 4px; border: none; appearance: none; background: var(--gray-pc); }
.video-frame progress::-webkit-progress-bar { background: var(--gray-pc); }
.video-frame progress::-webkit-progress-value { background: var(--gold); }
.video-frame progress::-moz-progress-bar { background: var(--gold); }
.intro-scene { display: flex; align-items: center; justify-content: center; padding: 12px 30px; }
.landscape-frame { width: min(100%, calc((100dvh - 190px) * 1.77778)); aspect-ratio: 16 / 9; }
.media-notice { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: 80%; padding: 14px 20px; margin: 0; background: var(--white); color: var(--burgundy); border-left: 3px solid var(--gold); z-index: 5; }
.access-layout { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: minmax(280px, 500px) minmax(340px, 500px); justify-content: center; align-items: center; gap: clamp(30px, 5vw, 90px); padding: 30px 45px; }
.access-story h1 { font-size: clamp(30px, 3vw, 46px); }
.access-story > p { max-width: 420px; }
.access-story img { width: 100%; display: block; margin-top: 28px; }
.access-card { background: var(--white); border-radius: 8px; padding: 30px; }
.access-card form { display: grid; gap: 12px; margin: 24px 0; }
.access-card label { font-weight: 600; }
.access-card .field-help { margin: 0 0 4px; }
#token { max-width: 220px; letter-spacing: .35em; font-size: 23px; }
#access-status, .error { color: var(--burgundy); white-space: pre-line; }
.field-help { font-size: 14px; line-height: 1.5; margin: 8px 0 0; color: var(--gray); white-space: pre-line; }
.registration { display: flex; min-height: 0; }
.setup-sidebar { width: 242px; flex-shrink: 0; background: var(--white); display: flex; flex-direction: column; padding: 28px 20px 20px; }
.setup-sidebar > .eyebrow { margin-bottom: 16px; }
.setup-sidebar h2 { margin-bottom: 14px; }
#setup-nav { display: grid; gap: 12px; }
.step { display: flex; align-items: center; gap: 10px; text-align: left; border: none; min-height: 56px; padding: 14px 12px; font-size: 15px; font-weight: 400; }
.step > span { font-size: 14px; }
.step:hover { background: var(--gray); color: var(--white); }
.step.selected { background: var(--gold); color: var(--white); }
.sidebar-bottom { margin-top: auto; padding-top: 24px; display: grid; gap: 10px; }
.sidebar-bottom h3 { margin: 0; font-size: 18px; }
.sidebar-bottom p { font-size: 14px; margin-bottom: 6px; }
.sidebar-bottom button { font-size: 13px; padding: 10px 6px; }
.workspace { min-width: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ice); }
.workspace-header { padding: 24px 28px 18px; flex-shrink: 0; }
.workspace-header h1 { margin-bottom: 5px; }
.workspace-header p:last-child { margin: 0; }
.workspace-header .eyebrow { margin-bottom: 8px; }
.workspace-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 6px 20px 20px 28px; }
.setup-page { display: grid; gap: 18px; }
.card { background: var(--white); border-radius: 8px; padding: 24px; min-width: 0; }
.card > p { margin: 0 0 18px; }
.form-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 16px; }
.form-row > label { padding-top: 12px; }
.parameter-description { margin-bottom: 22px; }
.registration-footer { background: var(--white); min-height: var(--actions-height); flex-shrink: 0; padding-top: 8px; }
#setup-progress { display: block; margin: 0 28px; width: calc(100% - 56px); height: 4px; border: none; appearance: none; background: var(--ice); }
#setup-progress::-webkit-progress-bar { background: var(--ice); }
#setup-progress::-webkit-progress-value { background: var(--gold); }
#setup-progress::-moz-progress-bar { background: var(--gold); }
.registration-actions { min-height: 68px; display: flex; align-items: center; gap: 20px; padding: 10px 28px 12px; }
.registration-actions > span { flex: 1; font-size: 14px; }
.registration-actions > .primary { min-width: 205px; }
.thickness-fieldset { margin: 24px 0; border: none; padding: 0; }
.thickness-fieldset legend { font-size: 20px; font-weight: 600; color: var(--burgundy); margin-bottom: 14px; }
.thicknesses { display: flex; flex-wrap: wrap; gap: 16px; }
.thicknesses label { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ice); border-radius: 4px; cursor: pointer; }
.advanced { margin-top: 20px; }
.advanced > summary { display: list-item; color: var(--navy); font-weight: 600; padding: 14px 0; cursor: pointer; }
.advanced[open] > summary { margin-bottom: 14px; }
.advanced h3 { margin-top: 24px; }
.machine-card { background: var(--ice); border-radius: 6px; padding: 18px; margin: 20px 0; }
.machine-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.machine-heading input { flex: 1; min-width: 0; background: var(--white); }
.machine-heading button { flex-shrink: 0; }
.machine-card .form-row { grid-template-columns: minmax(180px, 30%) minmax(0, 1fr); }
.machine-card input, .machine-card select { background: var(--white); }
.empty-state { margin: 20px 0; padding: 18px; background: var(--ice); }
.pending { color: var(--burgundy); background: var(--ice); padding: 20px; border-left: 3px solid var(--gold); margin-bottom: 24px; }
.pending li { margin: 10px 0; }
.pending button { padding: 0; min-height: 0; text-align: left; border: none; font-weight: 400; text-decoration: underline; background: transparent; color: var(--burgundy); }
dl { margin: 0; }
dt { font-weight: 600; margin-top: 20px; color: var(--burgundy); }
dd { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-group { margin-top: 24px; }
.review-group h3 { margin-bottom: 12px; }
.review-group dt { color: var(--navy); font-size: 14px; margin-top: 14px; }
.review-group dd { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.invitation-required { max-width: 620px; margin: 15vh auto; padding: 30px; }
@media (max-height: 760px) and (min-width: 1000px) {
  .setup-sidebar { padding-top: 20px; }
  #setup-nav { gap: 6px; }
  .step { min-height: 49px; }
  .sidebar-bottom h3, .sidebar-bottom p { display: none; }
  .workspace-header { padding-top: 18px; padding-bottom: 14px; }
}
@media (max-width: 1050px) {
  .home-actions button { min-width: 0; flex: 1; }
  .concept-scene { grid-template-columns: minmax(180px, 280px) auto; gap: 24px; }
  .concept-flow { display: none; }
  .access-layout { gap: 30px; padding: 24px; }
  .setup-sidebar { width: 215px; padding-left: 14px; padding-right: 14px; }
  .form-row { grid-template-columns: 165px minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 720px) {
  body { min-height: 100dvh; height: auto; overflow: auto; }
  .titlebar { padding: 0 12px; position: relative; z-index: 5; }
  .product-name { font-size: 10px; max-width: 150px; }
  #stage { min-height: calc(100dvh - var(--header-height) - var(--legal-height)); overflow: visible; }
  .scene { min-height: calc(100dvh - var(--header-height) - var(--legal-height)); }
  .art-area { margin: 10px 12px 0; min-height: 280px; }
  .home-art { min-height: calc(100dvh - 295px); }
  .home-actions { height: auto; min-height: 200px; flex-direction: column; gap: 10px; padding: 14px 20px 20px; }
  .home-actions button { flex: none; width: 100%; }
  .scene-actions { padding: 12px 16px; gap: 10px; }
  .scene-actions button { padding: 11px 13px; font-size: 14px; }
  .media-controls { gap: 8px; }
  .video-stage { min-height: calc(100dvh - 170px); }
  .concept-scene { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 12px; padding: 18px; }
  .concept-copy { text-align: center; }
  .concept-copy .accent-rule, .concept-copy > p:last-child { display: none; }
  .concept-copy .eyebrow { font-size: 10px; margin-bottom: 8px; }
  .concept-copy h1 { font-size: 24px; margin: 0; }
  .portrait-frame { max-height: calc(100dvh - 290px); min-height: 230px; }
  .landscape-frame { width: 100%; }
  .intro-scene { padding: 12px; }
  .access-layout { grid-template-columns: 1fr; align-items: start; gap: 24px; padding: 24px 16px; overflow: visible; }
  .access-story h1 { font-size: 29px; }
  .access-story h1 br { display: none; }
  .access-story .accent-rule, .access-story > img { display: none; }
  .access-story > p { margin-bottom: 0; }
  .access-card { padding: 24px; }
  .registration { flex-direction: column; }
  .setup-sidebar { width: auto; padding: 14px 12px 0; }
  .setup-sidebar > .eyebrow, .setup-sidebar > h2 { display: none; }
  #setup-nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 10px; }
  .step { flex-shrink: 0; min-height: 44px; padding: 11px 12px; font-size: 14px; }
  .sidebar-bottom { padding-top: 0; display: flex; align-items: center; justify-content: space-between; }
  .sidebar-bottom h3, .sidebar-bottom p { display: none; }
  .sidebar-bottom button { min-height: 36px; padding: 7px; font-size: 12px; }
  .workspace-header { padding: 22px 16px 16px; }
  .workspace-header h1 { font-size: 25px; }
  .workspace-header .eyebrow { font-size: 10px; }
  .workspace-body { overflow: visible; padding: 4px 12px 20px; }
  .card { padding: 22px 16px; }
  .form-row, .machine-card .form-row { grid-template-columns: 1fr; gap: 8px; }
  .form-row > label { padding: 0; }
  .registration-footer { position: sticky; bottom: 0; z-index: 4; }
  .registration-actions { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .registration-actions > span { min-width: 100%; order: -1; }
  .registration-actions > .primary { min-width: 0; margin-left: auto; }
  .machine-card { padding: 14px; }
  .machine-heading { gap: 8px; }
  .machine-heading button { padding: 11px; font-size: 14px; }
  .legal-footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
