:root {
  --portal-navy: #06162c;
  --portal-navy-2: #0b203b;
  --portal-orange: #ff5a13;
  --portal-orange-dark: #d94708;
  --portal-teal: #079c9b;
  --portal-teal-soft: #e8f7f6;
  --portal-ink: #10233d;
  --portal-steel: #526276;
  --portal-rule: #d7dee6;
  --portal-mist: #f4f7f9;
  --portal-white: #fff;
  --portal-danger: #b42318;
  --portal-success: #067647;
  --head: "Barlow Condensed", Impact, sans-serif;
  --body: "Inter", Arial, sans-serif;
  --portal-shell: 1440px;
}

* { box-sizing: border-box; }
html { color: var(--portal-ink); background: var(--portal-white); font-family: var(--body); scroll-behavior: smooth; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #f6b73c; outline-offset: 3px; }

.portal-skip { position: fixed; left: 12px; top: 12px; z-index: 200; transform: translateY(-180%); padding: .75rem 1rem; color: #07182f; background: #f6b73c; font-weight: 800; }
.portal-skip:focus { transform: none; }
.portal-body { min-height: 100vh; background: var(--portal-mist); }
.portal-header { position: sticky; top: 0; z-index: 100; display: grid; grid-template-columns: 300px 1fr auto; align-items: stretch; min-height: 82px; color: white; background: var(--portal-navy); border-bottom: 1px solid rgba(255,255,255,.15); }
.portal-logo { display: flex; align-items: center; margin: 9px 20px; padding: 0 8px; overflow: hidden; background: white; border-radius: 6px; }
.portal-logo img { width: 245px; height: 62px; object-fit: cover; object-position: center 42%; filter: brightness(1.45) contrast(1.12); }
.portal-nav { display: flex; justify-content: center; align-items: stretch; }
.portal-nav a { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 0 30px; border-inline-start: 1px solid rgba(255,255,255,.14); color: #f4f7fb; font: 700 1.05rem/1 var(--body); text-decoration: none; }
.portal-nav a:hover { background: rgba(255,255,255,.055); }
.portal-nav a.active { color: #52d4cf; background: rgba(7,156,155,.1); }
.portal-nav a.active::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--portal-teal); }
.cart-count { display: grid; width: 24px; height: 24px; place-items: center; color: white; background: var(--portal-orange); border-radius: 50%; font-size: .76rem; }
.portal-account { display: flex; align-items: center; gap: 11px; min-width: 190px; padding: 0 28px; border: 0; border-left: 1px solid rgba(255,255,255,.14); color: white; background: transparent; font-weight: 700; cursor: pointer; }
.portal-account:hover { background: rgba(255,255,255,.055); }
.portal-nav-signout { display: none; min-height: 52px; padding: 0 18px; border: 0; border-top: 1px solid rgba(255,255,255,.12); color: white; background: transparent; font-weight: 800; text-align: left; }
.account-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: #5dd2cb; font-size: .72rem; }
.portal-menu { display: none; }
.portal-progress { position: fixed; top: 82px; left: 0; right: 0; z-index: 110; height: 3px; pointer-events: none; }
.portal-progress.loading { background: linear-gradient(90deg, transparent, var(--portal-teal), transparent); background-size: 55% 100%; animation: portal-progress 1.1s linear infinite; }
@keyframes portal-progress { from { background-position: -120% 0; } to { background-position: 220% 0; } }

.portal-main { width: min(100%, var(--portal-shell)); min-height: calc(100vh - 82px); margin: 0 auto; padding: 42px 40px 80px; background: white; }
.portal-main.auth-screen { display: grid; place-items: center; background: var(--portal-navy); }
.button-icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; }
.button-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-loading { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 18px; color: var(--portal-steel); }
.portal-loading span { width: 44px; height: 44px; border: 4px solid var(--portal-rule); border-top-color: var(--portal-orange); border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.portal-noscript { max-width: 700px; margin: 2rem auto; padding: 1rem; background: #fff3cd; }

.portal-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
.portal-heading-row h1, .builder-heading h1, .auth-copy h1 { margin: 0; color: var(--portal-navy); font: 800 clamp(2.65rem, 4vw, 4rem)/.95 var(--head); letter-spacing: -.02em; text-transform: uppercase; }
.portal-heading-row h1.normal-case { text-transform: none; }
.portal-heading-row p, .builder-heading p { max-width: 700px; margin: 10px 0 0; color: var(--portal-steel); line-height: 1.6; }
.heading-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.portal-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: .85rem 1.3rem; border: 2px solid transparent; border-radius: 5px; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease, border .15s ease; }
.portal-button:hover { transform: translateY(-1px); }
.portal-button.primary { color: white; background: var(--portal-orange); }
.portal-button.primary:hover { background: var(--portal-orange-dark); }
.portal-button.secondary { color: var(--portal-teal); background: white; border-color: var(--portal-teal); }
.portal-button.ghost { color: var(--portal-navy); background: white; border-color: var(--portal-navy); }
.portal-button.small { min-height: 38px; padding: .55rem .9rem; font-size: .84rem; }
.portal-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.portal-link-button { padding: 0; border: 0; color: #057f7f; background: none; font-weight: 800; text-decoration: underline; cursor: pointer; }

.portal-section { margin-top: 38px; }
.portal-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.portal-section-title h2, .cart-panel h2, .design-summary h2 { margin: 0; color: var(--portal-navy); font: 800 1.75rem/1 var(--head); }
.portal-section-title a { color: var(--portal-teal); font-weight: 800; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.dashboard-main { min-width: 0; }
.order-table-wrap { overflow-x: auto; border: 1px solid var(--portal-rule); border-radius: 6px; }
.order-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.order-table th, .order-table td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--portal-rule); }
.order-table tr:last-child td { border-bottom: 0; }
.order-table th { color: var(--portal-ink); background: #fbfcfd; font: 800 .78rem/1 var(--body); text-transform: uppercase; letter-spacing: .05em; }
.order-number { color: #0867c4; font-weight: 800; }
.status-text { display: inline-flex; align-items: center; gap: 8px; color: var(--portal-success); font-weight: 700; text-transform: capitalize; }
.status-text::before { content: ""; width: 9px; height: 9px; background: currentColor; border-radius: 50%; }
.status-text.pending, .status-text.open, .status-text.submitted { color: #b54708; }
.status-text.canceled, .status-text.declined { color: var(--portal-danger); }

.quote-rail { position: sticky; top: 106px; border: 1px solid var(--portal-teal); border-radius: 6px; overflow: hidden; background: white; }
.quote-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--portal-rule); }
.quote-rail-head h2 { margin: 0; font: 800 1.55rem/1 var(--head); }
.quote-rail-list { list-style: none; padding: 0 20px; margin: 0; }
.quote-rail-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--portal-rule); }
.quote-rail-list strong { display: block; margin-bottom: 4px; }
.quote-rail-list span { color: var(--portal-steel); font-size: .84rem; }
.quote-rail-empty { padding: 24px 20px; color: var(--portal-steel); line-height: 1.5; }
.quote-rail-foot { padding: 18px 20px; background: var(--portal-mist); }
.quote-rail-foot .portal-button { width: 100%; }

.design-band { padding: 24px; color: white; background: var(--portal-navy); border-radius: 6px; }
.design-band > h2 { margin: 0; font: 800 2rem/1 var(--head); }
.design-band > p { margin: 7px 0 22px; color: #cbd6e2; }
.design-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.design-choice { display: grid; grid-template-columns: 132px 1fr; gap: 18px; min-height: 210px; padding: 20px; color: var(--portal-ink); background: white; border-radius: 5px; text-decoration: none; }
.design-choice:hover { box-shadow: inset 0 0 0 2px var(--portal-teal); }
.design-choice-visual { position: relative; display: grid; place-items: center; min-height: 155px; background: var(--portal-mist); overflow: hidden; }
.design-choice h3 { margin: 12px 0 8px; font: 800 1.6rem/1 var(--head); }
.design-choice p { margin: 0 0 18px; color: var(--portal-steel); font-size: .9rem; line-height: 1.5; }
.mini-box { position: relative; width: 84px; height: 72px; background: #b9783c; transform: skewY(-5deg); box-shadow: inset -14px 0 0 rgba(72,39,16,.15); }
.mini-box::before { content: ""; position: absolute; left: 8px; top: -28px; width: 68px; height: 30px; background: #d49b61; transform: skewY(11deg); transform-origin: bottom; }
.mini-box::after { content: "YOUR BRAND"; position: absolute; inset: 25px 8px auto; color: #172231; font: 800 .62rem/1 var(--head); text-align: center; }
.mini-tape { width: 84px; height: 84px; border: 20px solid #f6f3e9; border-radius: 50%; box-shadow: 0 9px 18px rgba(6,22,44,.18), inset 0 0 0 5px #9a6b38; }
.help-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 18px 22px; border: 1px solid var(--portal-rule); border-radius: 5px; }
.help-strip strong { display: block; }
.help-strip a { color: var(--portal-teal); font-weight: 800; }

.empty-state { padding: 54px 30px; border: 1px dashed #aebbc9; text-align: center; background: #fbfcfd; }
.empty-state h2 { margin: 0 0 8px; font: 800 2rem/1 var(--head); }
.empty-state p { max-width: 560px; margin: 0 auto 24px; color: var(--portal-steel); }
.design-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.design-list article { padding: 22px; border: 1px solid var(--portal-rule); border-top: 4px solid var(--portal-teal); }
.design-list h3 { margin: 0 0 8px; font: 800 1.5rem/1 var(--head); }
.design-list p { color: var(--portal-steel); font-size: .88rem; }

.builder-shell { max-width: 1440px; }
.builder-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 18px; }
.breadcrumbs { margin-bottom: 12px; color: var(--portal-teal); font-size: .88rem; font-weight: 700; }
.breadcrumbs a { text-decoration: none; }
.stepper { display: flex; min-width: 360px; justify-content: flex-end; counter-reset: step; }
.stepper span { position: relative; min-width: 112px; padding-top: 34px; color: #7c8794; font-size: .76rem; text-align: center; }
.stepper span::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 50%; z-index: 2; display: grid; width: 28px; height: 28px; place-items: center; transform: translateX(-50%); color: white; background: #929aa4; border-radius: 50%; font-weight: 800; }
.stepper span:not(:first-child)::after { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; border-top: 1px solid #aeb6c0; }
.stepper span.active { color: var(--portal-teal); font-weight: 800; }
.stepper span.active::before { background: var(--portal-teal); }
.builder-grid { display: grid; grid-template-columns: minmax(390px, .83fr) minmax(0, 1.45fr); gap: 16px; align-items: start; }
.builder-form { padding: 20px 20px 22px; border: 1px solid var(--portal-rule); border-radius: 5px; background: white; }
.form-section { padding: 0 0 17px; margin: 0 0 17px; border: 0; border-bottom: 1px solid var(--portal-rule); }
.form-section:last-of-type { border-bottom: 0; }
.form-section legend { width: 100%; margin-bottom: 12px; color: var(--portal-navy); font: 800 1.25rem/1 var(--head); text-transform: uppercase; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field-grid.two { grid-template-columns: repeat(2, 1fr); }
.field-grid.four { grid-template-columns: repeat(4, 1fr); }
.portal-field { display: flex; flex-direction: column; gap: 7px; color: var(--portal-ink); font-size: .78rem; font-weight: 700; }
.portal-field.wide { grid-column: 1 / -1; }
.portal-field input, .portal-field select, .portal-field textarea { width: 100%; min-height: 44px; padding: .68rem .75rem; border: 1px solid #b7c1cc; border-radius: 4px; color: var(--portal-ink); background: white; }
.portal-field textarea { min-height: 84px; resize: vertical; }
.portal-field input:focus, .portal-field select:focus, .portal-field textarea:focus { border-color: var(--portal-teal); outline: 2px solid rgba(7,156,155,.18); }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.option-grid.five { grid-template-columns: repeat(5, 1fr); }
.option-control { position: relative; }
.option-control input { position: absolute; opacity: 0; pointer-events: none; }
.option-control span { display: flex; min-height: 48px; align-items: center; justify-content: center; padding: 8px; border: 1px solid var(--portal-rule); border-radius: 4px; color: var(--portal-ink); background: #fff; font-size: .76rem; font-weight: 700; text-align: center; cursor: pointer; }
.option-control input:checked + span { border-color: var(--portal-teal); color: #056c6c; background: var(--portal-teal-soft); box-shadow: inset 0 0 0 1px var(--portal-teal); }
.option-control input:focus-visible + span { outline: 3px solid #f6b73c; outline-offset: 2px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--portal-teal); }
.upload-zone { display: grid; min-height: 98px; place-items: center; padding: 18px; border: 1px dashed #8d9aa8; border-radius: 4px; background: #fbfcfd; text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--portal-teal); background: var(--portal-teal-soft); }
.upload-zone strong { display: block; margin-bottom: 4px; }
.upload-zone small { color: var(--portal-steel); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.artwork-name { margin: 8px 0 0; color: var(--portal-teal); font-size: .75rem; font-weight: 700; }
.builder-actions { display: flex; gap: 12px; margin-top: 8px; }
.builder-actions .portal-button { flex: 1; }
.builder-note { margin: 12px 0 0; color: var(--portal-steel); font-size: .72rem; line-height: 1.45; }

.preview-column { min-width: 0; }
.preview-panel { border: 1px solid var(--portal-rule); border-radius: 5px; overflow: hidden; background: white; }
.preview-stage { position: relative; display: grid; min-height: 540px; place-items: center; overflow: hidden; background: #f8fafb; }
.preview-dimension { position: absolute; color: var(--portal-steel); font: 800 .85rem/1 var(--body); }
.dimension-width { left: 50%; bottom: 38px; transform: translateX(-50%); }
.dimension-height { left: 44px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.dimension-depth { right: 54px; bottom: 82px; transform: rotate(-30deg); }
.box-model { position: relative; width: min(62%, 480px); aspect-ratio: 1.55 / 1; transform: translateY(-10px); }
.box-front { position: absolute; inset: 20% 13% 0 0; display: grid; place-items: center; overflow: hidden; background: #bc7e43; border: 1px solid #8d5929; box-shadow: 0 28px 34px rgba(19,32,45,.17), inset -35px 0 rgba(88,49,19,.08); }
.box-side { position: absolute; top: 9%; right: 0; width: 14%; height: 71%; background: #986033; border: 1px solid #77451e; transform: skewY(-35deg); transform-origin: left bottom; }
.box-top { position: absolute; top: 0; left: 4%; width: 83%; height: 21%; background: #d49b61; border: 1px solid #9a622f; transform: skewX(-28deg); transform-origin: left bottom; }
.print-area { position: relative; z-index: 2; display: grid; width: 55%; height: 48%; place-items: center; border: 2px dashed rgba(36,56,68,.6); color: rgba(31,47,57,.75); font: 800 1.35rem/1 var(--head); text-transform: uppercase; overflow: hidden; }
.print-area img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.preview-panel.hide-guides .print-area { border-color: transparent; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-top: 1px solid var(--portal-rule); }
.view-tabs, .zoom-controls { display: flex; }
.view-tabs button, .zoom-controls button, .zoom-controls span { min-width: 48px; min-height: 38px; display: grid; place-items: center; border: 1px solid var(--portal-rule); color: var(--portal-ink); background: white; font-weight: 700; }
.view-tabs button + button, .zoom-controls > * + * { border-left: 0; }
.view-tabs button.active { color: white; background: var(--portal-teal); border-color: var(--portal-teal); }
.guide-toggle { display: inline-flex; align-items: center; gap: 9px; font-size: .78rem; font-weight: 700; }
.guide-toggle input { width: 19px; height: 19px; accent-color: var(--portal-teal); }
.design-summary { margin-top: 14px; padding: 18px 20px; color: white; background: var(--portal-navy); border-radius: 5px; }
.design-summary h2 { color: white; margin-bottom: 14px; text-transform: uppercase; }
.summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.summary-grid > div { padding: 0 15px; border-left: 1px solid rgba(255,255,255,.24); }
.summary-grid > div:first-child { padding-left: 0; border: 0; }
.summary-grid strong { display: block; color: white; font-size: .85rem; }
.summary-grid span { display: block; margin-top: 3px; color: #bfcbd8; font-size: .68rem; }

.tape-stage { display: grid; grid-template-rows: 1fr 160px; min-height: 540px; align-items: center; }
.tape-roll { position: relative; width: 220px; height: 220px; margin: 20px auto; border: 52px solid #f2eee4; border-radius: 50%; box-shadow: 0 25px 32px rgba(13,31,48,.18), inset 0 0 0 13px #9f713e; }
.tape-roll::after { content: var(--tape-message, "YOUR LOGO"); position: absolute; left: 50%; top: -43px; width: 94px; padding: 10px 2px; transform: translateX(-50%); border: 1px dashed var(--portal-teal); color: var(--portal-teal); font: 800 1rem/1 var(--head); text-align: center; background: rgba(255,255,255,.82); }
.tape-roll.has-artwork::after { content: ""; height: 52px; background-color: rgba(255,255,255,.82); background-image: var(--artwork); background-size: contain; background-repeat: no-repeat; background-position: center; }
.tape-strip { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 44px; padding: 18px 54px; border-top: 1px solid var(--portal-rule); background: #f5f2e9; overflow: hidden; }
.tape-repeat { min-height: 88px; display: grid; place-items: center; border: 2px dashed var(--portal-teal); color: var(--portal-teal); font: 800 1.35rem/1 var(--head); text-align: center; background-size: contain; background-repeat: no-repeat; background-position: center; }
.tape-repeat.has-artwork { color: transparent; background-image: var(--artwork); }
.preview-panel.hide-guides .tape-repeat { border-color: transparent; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cart-items { border-top: 1px solid var(--portal-rule); }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--portal-rule); }
.cart-item h3 { margin: 0 0 8px; font: 800 1.55rem/1 var(--head); }
.cart-item dl { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; color: var(--portal-steel); font-size: .8rem; }
.cart-item dt { font-weight: 800; }
.cart-item dd { margin: 0; }
.remove-item { align-self: start; border: 0; color: var(--portal-danger); background: none; font-weight: 800; cursor: pointer; }
.cart-panel { position: sticky; top: 106px; padding: 24px; color: white; background: var(--portal-navy); }
.cart-panel h2 { color: white; }
.cart-panel p { color: #c8d3df; font-size: .85rem; line-height: 1.55; }
.cart-panel textarea { width: 100%; min-height: 110px; margin: 10px 0 16px; padding: .8rem; border: 1px solid #9aabba; }
.cart-panel .portal-button { width: 100%; }

.auth-layout { width: min(1050px, calc(100% - 32px)); display: grid; grid-template-columns: .85fr 1.15fr; min-height: 610px; background: white; box-shadow: 0 28px 70px rgba(0,0,0,.25); }
.auth-copy { padding: 70px 58px; color: white; background: var(--portal-navy); }
.auth-copy h1 { color: white; }
.auth-copy p { color: #cbd6e2; line-height: 1.65; }
.auth-copy ul { padding: 0; margin: 40px 0 0; list-style: none; }
.auth-copy li { padding: 15px 0; border-top: 1px solid rgba(255,255,255,.18); font-weight: 700; }
.auth-form-wrap { display: grid; place-items: center; padding: 64px; }
.auth-form { width: 100%; max-width: 430px; }
.auth-form h2 { margin: 0 0 10px; font: 800 2.5rem/1 var(--head); text-transform: uppercase; }
.auth-form > p { margin: 0 0 28px; color: var(--portal-steel); line-height: 1.55; }
.auth-form .portal-field { margin-bottom: 16px; }
.auth-form .portal-button { width: 100%; }
.auth-status { min-height: 48px; margin-top: 18px; padding: 12px; color: var(--portal-steel); background: var(--portal-mist); font-size: .83rem; line-height: 1.45; }
.auth-status.success { color: var(--portal-success); background: #ecfdf3; }
.auth-status.error, .portal-error { color: var(--portal-danger); background: #fef3f2; }
.setup-state { max-width: 760px; margin: 90px auto; padding: 42px; border: 1px solid var(--portal-rule); border-top: 5px solid var(--portal-orange); }
.setup-state h1 { margin: 0 0 12px; font: 800 3rem/1 var(--head); }
.setup-state p { color: var(--portal-steel); line-height: 1.6; }
.demo-notice { margin: -18px 0 26px; padding: 11px 15px; color: #7a2e0e; background: #fff4ed; border-left: 4px solid var(--portal-orange); font-size: .78rem; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: grid; gap: 10px; }
.toast { max-width: 390px; padding: 14px 18px; color: white; background: var(--portal-navy); border-left: 4px solid var(--portal-teal); box-shadow: 0 12px 30px rgba(0,0,0,.22); font-size: .84rem; }
.toast.error { border-color: #f97066; }

@media (max-width: 1180px) {
  .portal-header { grid-template-columns: 245px 1fr auto; }
  .portal-logo { margin-inline: 12px; }
  .portal-logo img { width: 205px; }
  .portal-nav a { padding-inline: 18px; font-size: .92rem; }
  .portal-account { min-width: auto; padding-inline: 18px; }
  .dashboard-layout, .cart-layout { grid-template-columns: 1fr; }
  .quote-rail, .cart-panel { position: static; }
  .builder-grid { grid-template-columns: 420px minmax(0, 1fr); }
  .preview-stage, .tape-stage { min-height: 480px; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 0; }
}

@media (max-width: 900px) {
  .portal-header { grid-template-columns: 1fr auto auto; min-height: 72px; }
  .portal-logo { margin-block: 10px; }
  .portal-logo img { width: 180px; height: 48px; }
  .portal-menu { display: block; align-self: center; margin-right: 14px; padding: .65rem .8rem; border: 1px solid rgba(255,255,255,.5); color: white; background: transparent; font-weight: 800; }
  .portal-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--portal-navy); box-shadow: 0 14px 28px rgba(0,0,0,.2); }
  .portal-nav.open { display: flex; }
  .portal-nav-signout { display: block; }
  .portal-nav a { min-height: 52px; border-top: 1px solid rgba(255,255,255,.12); border-left: 0; }
  .portal-nav a.active::after { inset: 0 auto 0 0; width: 4px; height: auto; }
  .portal-account { padding: 0 14px; border: 0; }
  .portal-account [data-account-name] { display: none; }
  .portal-progress { top: 72px; }
  .portal-main { min-height: calc(100vh - 72px); padding: 34px 24px 60px; }
  .portal-main.auth-screen { background: var(--portal-navy); }
  .portal-heading-row, .builder-top { align-items: flex-start; flex-direction: column; }
  .stepper { width: 100%; justify-content: flex-start; }
  .builder-grid { grid-template-columns: 1fr; }
  .preview-column { order: -1; }
  .preview-stage, .tape-stage { min-height: 430px; }
  .design-list { grid-template-columns: repeat(2, 1fr); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-copy { padding: 42px; }
  .auth-copy ul { display: none; }
}

@media (max-width: 620px) {
  .portal-header { grid-template-columns: 1fr auto; }
  .portal-logo { margin-left: 8px; padding-inline: 5px; }
  .portal-logo img { width: 164px; }
  .portal-account { display: none; }
  .portal-main { padding: 28px 16px 48px; }
  .portal-heading-row h1, .builder-heading h1 { font-size: 2.75rem; }
  .heading-actions, .builder-actions { width: 100%; flex-direction: column; }
  .heading-actions .portal-button, .builder-actions .portal-button { width: 100%; }
  .design-choice-grid, .design-list { grid-template-columns: 1fr; }
  .design-choice { grid-template-columns: 104px 1fr; }
  .help-strip { align-items: flex-start; flex-direction: column; }
  .stepper { min-width: 0; }
  .stepper span { min-width: 33.333%; }
  .field-grid, .field-grid.two, .field-grid.four { grid-template-columns: repeat(2, 1fr); }
  .option-grid, .option-grid.five { grid-template-columns: repeat(2, 1fr); }
  .preview-stage { min-height: 360px; }
  .box-model { width: 75%; }
  .tape-stage { min-height: 390px; grid-template-rows: 1fr 120px; }
  .tape-roll { width: 150px; height: 150px; border-width: 36px; }
  .tape-roll::after { top: -31px; width: 72px; font-size: .78rem; }
  .tape-strip { gap: 20px; padding: 14px 18px; }
  .tape-repeat { min-height: 65px; font-size: .9rem; }
  .preview-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cart-item { grid-template-columns: 1fr; }
  .auth-layout { width: 100%; }
  .auth-copy, .auth-form-wrap { padding: 34px 24px; }
  .order-table { min-width: 0; }
  .order-table thead { display: none; }
  .order-table tbody, .order-table tr, .order-table td { display: block; }
  .order-table tr { padding: 12px 16px; border-bottom: 1px solid var(--portal-rule); }
  .order-table tr:last-child { border-bottom: 0; }
  .order-table td { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px; padding: 7px 0; border: 0; overflow-wrap: anywhere; }
  .order-table td::before { color: var(--portal-steel); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .order-table td:nth-child(1)::before { content: "Order"; }
  .order-table td:nth-child(2)::before { content: "Date"; }
  .order-table td:nth-child(3)::before { content: "Items"; }
  .order-table td:nth-child(4)::before { content: "Status"; }
  .order-table td:nth-child(5)::before { content: "Total"; }
  .order-table td:nth-child(6)::before { content: "Action"; }
  .order-table td .portal-button { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
