.order-portal {padding-block:clamp(32px,5vw,76px) clamp(45px,7vw,96px)}
.order-portal [hidden] {display:none!important}
.portal-heading,.portal-orders-header,.portal-tools,.portal-account,.portal-switch,.portal-auth-links {display:flex;align-items:center;gap:1rem}
.portal-heading,.portal-orders-header {justify-content:space-between}
.portal-heading {align-items:end;margin-bottom:clamp(1.5rem,3.6vw,3rem)}
.portal-heading h1 {font-size:clamp(2.7rem,5.7vw,5.3rem);line-height:.98}
.portal-heading em {color:var(--signal-ink);font-style:normal}
.portal-heading p,.portal-orders-header p,.portal-auth-panel>p,.portal-empty p {color:var(--text-2);margin:.6rem 0 0}
.order-portal h2 {font-size:clamp(1.55rem,2.4vw,2.15rem);letter-spacing:-.035em;line-height:1.1;text-transform:none}
.order-portal h3 {font-size:1.08rem;line-height:1.3}
.portal-account {flex-wrap:wrap;column-gap:.8rem;row-gap:0;justify-content:flex-end;font-size:.85rem;overflow-wrap:anywhere}
.portal-status {font-size:.92rem;line-height:1.45;color:var(--text-2)}
.portal-status:empty {margin:0}
.portal-guest {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.94fr);gap:clamp(1.2rem,3.5vw,3rem);align-items:stretch}
.portal-auth-panel,.portal-empty,.portal-order {background:var(--card);border:1px solid var(--line-2);border-radius:4px}
.portal-auth-panel {padding:clamp(1.2rem,3.2vw,2.6rem)}
.portal-auth-panel form {display:grid;justify-items:start;gap:.85rem;margin-top:1.45rem}
.portal-auth-panel form>div,.portal-auth-panel form>.btn {width:100%}
.portal-auth-panel label,.portal-update label {display:block;font-size:.87rem;font-weight:650}
.order-portal input,.order-portal select,.order-portal textarea {display:block;width:100%;min-width:0;min-height:44px;margin:.3rem 0 0;padding:.63rem .72rem;border:1px solid var(--line-2);border-radius:3px;background:#fff;color:var(--ink);font:inherit;font-size:1rem;line-height:1.35}
.order-portal textarea {resize:vertical}
.portal-auth-panel form>.btn {justify-content:center}
.portal-link {display:inline-flex;align-items:center;min-height:34px;border:0;padding:0;background:transparent;color:var(--signal-ink);font-size:.88rem;font-weight:650;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.portal-auth-links {flex-wrap:wrap;gap:.25rem .65rem;margin-top:1.2rem;padding-top:1rem;border-top:1px solid var(--line);font-size:.88rem}
.portal-builder-card {display:flex;flex-direction:column;overflow:hidden;border-radius:4px;background:var(--ink);color:#faf8f5}
.portal-builder-card img {width:100%;height:clamp(145px,19vw,275px);display:block;object-fit:cover;object-position:50% 49%}
.portal-builder-card>div {padding:clamp(1.2rem,2.75vw,2.3rem)}
.portal-builder-card p {color:#e4ded5;margin:.65rem 0 1rem;max-width:40ch}
.portal-builder-card a {font-weight:650;font-size:.95rem;text-underline-offset:4px}
.portal-builder-card a span {margin-left:.3rem}
.portal-workspace {border-top:2px solid var(--ink);padding-top:clamp(1.1rem,2vw,1.7rem)}
.portal-tools {flex-wrap:wrap;justify-content:flex-end}
.portal-orders-header p {font-size:.9rem}
.portal-switch {gap:.25rem;flex-wrap:wrap;margin:1.25rem 0 .3rem}
.portal-switch button {min-height:42px;border:1px solid var(--line-2);border-radius:3px;padding:.45rem .82rem;cursor:pointer;background:#fff;font-weight:600;font-size:.86rem}
.portal-switch button[aria-pressed=true] {color:white;background:var(--ink);border-color:var(--ink)}
.portal-orders {display:grid;gap:.75rem;margin-top:1.25rem}
.portal-order summary {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.85rem;padding:1.1rem 1.25rem;cursor:pointer;list-style:none}
.portal-order summary::-webkit-details-marker {display:none}
.portal-order summary::after {content:"";width:.55rem;height:.55rem;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:-.25rem .18rem 0 .3rem}
.portal-order[open]>summary::after {transform:rotate(225deg);margin-top:.2rem}
.portal-order summary:focus-visible {outline-offset:-3px}
.portal-order-name,.portal-order-meta {display:block;overflow-wrap:anywhere}
.portal-order-name {font-family:var(--display);font-size:1.08rem;font-weight:750;line-height:1.35}
.portal-order-meta {color:var(--muted);font-size:.79rem;margin-top:.2rem}
.portal-tag {display:inline-block;max-width:100%;border-radius:3px;padding:.3rem .55rem;background:#ece9e4;color:#463e35;font-size:.78rem;line-height:1.3;font-weight:700;overflow-wrap:anywhere}
.portal-tag[data-stage="action"] {background:#f6e4c7;color:#704211}
.portal-tag[data-stage="active"] {background:#e7edf2;color:#344d5a}
.portal-tag[data-stage="done"] {background:#e4ecdf;color:#3d5334}
.portal-order-body {border-top:1px solid var(--line);padding:1rem 1.25rem 1.2rem}
.portal-order-body section+section {margin-top:1rem}
.portal-order-body section h3,.portal-update legend {font-family:var(--body);font-weight:650;font-size:.87rem;color:var(--ink)}
.portal-order-body p,.portal-schedule {white-space:pre-wrap;overflow-wrap:anywhere;margin:.35rem 0 0;color:var(--text-2);font:inherit;font-size:.9rem;line-height:1.55}
.portal-schedule {background:var(--paper);border-left:2px solid var(--line-2);padding:.75rem 1rem}
.portal-update {display:grid;align-items:start;gap:.8rem;margin:1.25rem 0 0;border-top:1px solid var(--line);padding-top:1rem}
.portal-update .btn {justify-self:start}
.portal-update select {max-width:28rem}
.portal-empty {padding:clamp(1.2rem,2.6vw,2rem);margin:1.25rem 0}
.portal-error {padding:.65rem .85rem;background:#fbefeb;border-left:3px solid #a44c34;color:#783322;font-size:.92rem;overflow-wrap:anywhere}
.portal-contact {font-size:.9rem;color:var(--text-2);margin-top:1.65rem}
.portal-contact a {font-weight:650;text-underline-offset:3px}
.order-portal button:disabled {opacity:.6;cursor:wait}
@media (max-width:740px) {
  .portal-guest {grid-template-columns:1fr}
  .portal-builder-card {display:grid;grid-template-columns:33% minmax(0,1fr)}
  .portal-builder-card img {height:100%;min-height:140px}
  .portal-heading,.portal-orders-header {align-items:start}
  .portal-heading {display:block}
  .portal-account {justify-content:start;margin-top:.75rem}
}
@media (max-width:500px) {
  .portal-orders-header {display:block}
  .portal-tools {justify-content:start;margin-top:.6rem}
  .portal-order summary {grid-template-columns:minmax(0,1fr) auto;gap:.5rem}
  .portal-order summary .portal-tag {grid-row:2;justify-self:start}
  .portal-order summary::after {grid-column:2;grid-row:1}
  .portal-builder-card {display:block}
  .portal-builder-card img {height:114px;min-height:0}
}
