:where(.review-surface) * { box-sizing:border-box; }
body.review-page { display:flex; flex-direction:column; min-height:100dvh; margin:0; background:var(--paper); color:var(--ink); font:16px/1.5 var(--ui-font); }
.review-page header,.review-page main { width:min(calc(100% - 96px),1320px); margin-inline:auto; }
.review-page header .brand { margin-right:auto; }
.review-page header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:30px 0; }
.review-page .brand { font-size:26px; text-decoration:none; }
.review-page main { padding:20px 0 64px; }
:where(.review-surface) h1,:where(.review-surface) h2,:where(.review-surface) h3,:where(.review-surface) p { margin-top:0; }
:where(.review-surface) h1 { font-size:clamp(36px,4.1vw,60px); line-height:1.05; margin-bottom:6px; letter-spacing:-.052em; }
:where(.review-surface) h2 { font-size:24px; line-height:1.2; letter-spacing:-.035em; margin-bottom:24px; }
:where(.review-surface) h3 { font-size:18px; }
:where(.review-surface) .review-heading { margin-bottom:16px; }
:where(.review-surface) [data-review="proof-caption"],:where(.review-surface) [data-review="status"] { color:var(--muted); }
:where(.review-surface) .review-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,340px); align-items:start; gap:clamp(20px,3vw,44px); }
:where(.review-surface) .preview { min-width:0; padding:clamp(12px,2vw,26px); border:1px solid #d9d2c6; border-radius:6px; background:#eeeae1; }
:where(.review-surface) .review-members { display:flex; align-items:center; gap:8px; overflow-x:auto; padding:6px 4px 14px; margin-bottom:12px; }
:where(.review-surface) .review-members button { flex:0 0 auto; max-width:260px; padding:9px 16px; border-radius:24px; font-size:14px; font-weight:500; white-space:normal; overflow-wrap:anywhere; }
:where(.review-surface) .review-members button[aria-pressed=true] { background:var(--accent); color:var(--paper); }
:where(.review-surface) .preview-stage { --preview-limit:min(62vh,650px); display:grid; place-items:center; min-height:390px; height:var(--preview-limit); container-type:inline-size; }
:where(.review-surface) .preview-stage>*,:where(.review-surface) figure { margin:0; min-width:0; max-width:100%; max-height:100%; }
:where(.review-surface) [data-review="proof-video"] { display:block; width:auto; height:auto; max-width:100%; max-height:var(--preview-limit); margin:auto; object-fit:contain; }
/* Size the scrollable box to the turned bounds, then center the unchanged image within it. */
:where(.review-surface) .artwork-frame { position:relative; overflow:hidden; margin-inline:auto; width:calc(var(--artwork-zoom,1) * min(100cqw,var(--preview-limit) * var(--artwork-ratio,1))); aspect-ratio:var(--artwork-ratio,1); }
:where(.review-surface) .artwork-frame img { display:block; position:absolute; left:50%; top:50%; width:var(--artwork-width,100%); height:auto; max-width:none; transform:translate(-50%,-50%) rotate(var(--artwork-turn,0deg)); }
:where(.review-surface) .preview-stage:has([data-enlarged]) { min-height:0; height:auto; }
:where(.review-surface) [data-review="flat-preview"][data-enlarged] { width:100%; max-height:var(--preview-limit); overflow:auto; }
:where(.review-surface) [data-enlarged] .artwork-frame { --artwork-zoom:2.5; }
:where(.review-surface) [data-review="retry-media"] { display:block; margin:12px auto 0; }
:where(.review-surface) .preview-tools { display:none; gap:12px; flex-wrap:wrap; justify-content:center; align-items:center; margin-top:16px; }
:where(.review-surface) .preview-tools:has(> :not([hidden])) { display:flex; }
:where(.review-surface) .view-switch { display:flex; gap:4px; padding:4px; border-radius:28px; background:#eee8df; }
:where(.review-surface) .view-switch button { min-height:36px; padding:7px 20px; border-radius:22px; font-size:14px; }
:where(.review-surface) .view-switch button[aria-pressed=true] { background:#fffdfa; box-shadow:0 2px 6px #30251412; }
:where(.review-surface) .review-card { min-width:0; padding:clamp(20px,2.5vw,34px); border:1px solid #d9d2c6; border-radius:6px; background:#fffcf6; }
:where(.review-surface) form { display:grid; gap:16px; margin:0; }
:where(.review-surface) [data-review="access"] { margin:24px 0 0; }
:where(.review-surface) [data-review="code-form"] { margin-top:28px; }
:where(.review-surface) input,:where(.review-surface) textarea { width:100%; border:1px solid #d9cfc0; border-radius:10px; padding:12px; color:var(--ink); background:#fffdfa; font:inherit; }
:where(.review-surface) textarea { resize:vertical; min-height:140px; }
:where(.review-surface) button { min-height:46px; padding:11px 18px; border:1px solid transparent; border-radius:10px; color:var(--ink); background:transparent; font:inherit; font-weight:600; cursor:pointer; }
:where(.review-surface) button:not(.text-action):hover { background:#eee8df; }
:where(.review-surface) button.primary { min-height:46px; border-radius:10px; }
:where(.review-surface) button:disabled { opacity:.5; cursor:default; }
:where(.review-surface) .secondary { border-color:#d9cfc0; }
:where(.review-surface) .quiet { font-size:14px; font-weight:400; }
:where(.review-surface) :focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
:where(.review-surface) .actions { display:grid; gap:12px; }
:where(.review-surface) [data-review="decision-form"] h2 { margin-bottom:0; }
:where(.review-surface) [data-review="decision-feedback"] { white-space:pre-wrap; overflow-wrap:anywhere; }
:where(.review-surface) [data-review="decision-feedback"]:empty { display:none; }
:where(.review-surface) [data-review="delivery"] { border-top:1px solid #e8e0d4; margin-top:24px; padding-top:24px; }
:where(.review-surface) [data-review="delivery-files"] { display:grid; gap:20px; }
:where(.review-surface) [data-review="delivery-files"] section { display:grid; gap:12px; }
:where(.review-surface) [data-review="delivery-files"] h4 { margin:0; font-size:16px; overflow-wrap:anywhere; }
:where(.review-surface) [data-review="retry"] { width:100%; margin-top:16px; }
:where(.review-surface) [data-review="status"] { margin:24px 0 0; }
:where(.review-surface) [data-review="status"]:empty { display:none; }
:where(.review-surface) dialog { width:min(calc(100% - 32px),480px); padding:32px; border:1px solid #e8e0d4; border-radius:20px; background:var(--paper); color:var(--ink); box-shadow:0 24px 80px #211b1929; }
:where(.review-surface) dialog::backdrop { background:#211b1947; }
:where(.review-surface) dialog p { color:var(--muted); margin-bottom:28px; }
:where(.review-surface) .confirmation-members { max-height:32vh; overflow:auto; padding-left:20px; margin:0 0 28px; }
:where(.review-surface) .confirmation-members li { margin:8px 0; overflow-wrap:anywhere; }
:where(.review-surface) .confirmation-actions { display:flex; gap:12px; justify-content:flex-end; }
:where(.review-surface) [hidden] { display:none!important; }
@media (max-width:800px) {
.review-page header,.review-page main { width:calc(100% - 40px); }
:where(.review-surface) .review-layout { grid-template-columns:minmax(0,1fr); gap:28px; }
:where(.review-surface) .preview-stage { --preview-limit:42vh; min-height:280px; }
:where(.review-surface) .review-card { width:100%; }
:where(.review-surface) .confirmation-actions { flex-direction:column-reverse; }
.review-page header { padding:24px 0; } }
@media (max-width:520px) {
:where(.review-surface) .review-members:has(> button:nth-child(2):last-child) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; overflow:visible; }
:where(.review-surface) .review-members:has(> button:nth-child(2):last-child)>button { min-width:0; max-width:none; padding-inline:10px; }
:where(.review-surface) .preview-stage:has([data-review="flat-preview"]:not([hidden])) { min-height:0; height:auto; }
:where(.review-surface) .preview-tools { margin-top:16px; }
:where(.review-surface) .view-switch button { min-height:44px; } }
@media (max-width:360px) {
:where(.review-surface) .review-members { flex-wrap:wrap; overflow:visible; }
:where(.review-surface) .review-members button { max-width:min(260px,100%); } }
@media (max-height:480px) {
:where(.review-surface) dialog[open] { display:grid; gap:8px; width:min(calc(100% - 16px),480px); max-height:calc(100dvh - 24px); padding:12px; }
:where(.review-surface) dialog[open]:has(.confirmation-members:not([hidden])) { grid-template-rows:auto auto minmax(3em,1fr) auto; }
:where(.review-surface) dialog h2,:where(.review-surface) dialog p,:where(.review-surface) .confirmation-members { margin:0; }
:where(.review-surface) .confirmation-members { max-height:none; }
:where(.review-surface) .confirmation-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
:where(.review-surface) .confirmation-actions button { padding-inline:8px; } }
@media (prefers-reduced-motion:reduce) {
:where(.review-surface) * { scroll-behavior:auto!important; } }

:where(.review-surface) section { margin-block:0; }
:where(.review-surface) form { max-width:none; }
:where(.review-surface) [data-review="close-review"] { margin-bottom:12px; }

.review-surface.files-ready .review-layout {
  align-items:start; gap:clamp(24px,3vw,48px);
  grid-template-columns:minmax(0,1fr) minmax(300px,.65fr);
}
.review-surface :is(.review-layout,.review-heading) { max-width:1120px; margin-inline:auto; }
.review-surface .review-layout { align-items:center; }
.review-surface .review-card :is([data-review="decision-actions"],[data-review="decision-form"]) h2 { margin-inline:auto; max-width:20ch; text-align:center; text-wrap:balance; }
.review-surface .review-card [data-review="decision-form"] { gap:18px; }
.review-surface [data-review="delivery-heading"]:focus { outline:none; }

.review-surface:has([data-review="access"]:not([hidden])) {
  box-sizing:border-box; width:min(100%,540px); margin-inline:auto; padding:clamp(22px,4vw,44px);
  border:1px solid #d9d2c6; border-radius:6px; background:#fffcf6;
}
.review-page main:has([data-review="access"]:not([hidden])) { width:min(calc(100% - 32px),540px); margin-top:clamp(16px,4vw,58px); }
.review-surface .review-heading p { margin-bottom:0; }
.review-surface [data-review="status"]:not(:empty) { overflow-wrap:anywhere; }
.review-surface .review-card h2 { font-size:clamp(1.55rem,2.3vw,2.05rem); }
.review-surface [data-review="delivery-files"] button { display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:start; }
.review-surface .download-icon { flex:none; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.review-surface .artifact-size { margin:0 0 4px; font-size:.83rem; color:var(--muted); font-variant-numeric:tabular-nums; }

.review-surface.files-ready .preview-stage { --preview-limit:clamp(190px,34vh,360px); min-height:0; }
.review-surface.files-ready [data-review="recorded"] { display:none; }
.review-surface.files-ready [data-review="delivery"] { padding-top:0; margin-top:0; border:0; }
.review-surface.files-ready [data-review="delivery-heading"] { font-size:clamp(1.8rem,3vw,2.5rem); line-height:1.1; margin:0 0 1rem; letter-spacing:-.035em; }
.file-roles { display:grid; color:var(--ink); margin:1.1rem 0 0; }
.file-roles > div { display:flex; align-items:baseline; gap:.8rem; border-top:1px solid #e9e5df; padding:.55rem 0; }
.file-roles dt { min-width:3.1em; font-family:ui-monospace,monospace; font-size:.8rem; font-weight:650; letter-spacing:.04em; color:var(--accent); }
.file-roles dd { margin:0; font-size:.94rem; }
.review-surface [data-review="delivery-files"] section { gap:4px; padding-top:12px; border-top:1px solid #e2ded6; }
.review-surface .delivery-revision { font-size:.875rem; color:var(--muted); margin:0 0 .4rem; }
.review-surface [data-review="refresh-files"] { margin-top:8px; }
@media(max-width:800px) {
  .review-surface.files-ready .review-layout { grid-template-columns:minmax(0,1fr); }
  .review-surface.files-ready .review-card { max-width:none; }
}
@media(max-width:520px) {
  .review-surface.files-ready .preview-stage { --preview-limit:clamp(128px,19vh,180px); }
  .review-surface.files-ready .preview-tools { margin-top:8px; }
}
