/* Proof Sheet styling for the public entry and signed-in portal. */
header .brand .snail-mark { width: 32px; height: auto; }
body:has(#login:not([hidden])) { background: #f6f1e8; }
.entry-grid {
  color: #201d1a;
}
.entry-grid .entry-story h1 {
  color: #201d1a;
  font: 400 clamp(36px, 5vw, 64px)/1.05 "Instrument Serif", Georgia, serif;
  letter-spacing: -.035em;
}
.entry-grid .entry-copy { color: #62584f; }
.entry-guide { color: #922d25; text-decoration: underline; }
body:has(#login:not([hidden])) :focus-visible { outline: 2px solid #174e86; outline-offset: 2px; }

/* Signed-in Proof Sheet palette. Proof artwork retains its own colors. */
body:has(#desk:not([hidden])) {
  --ink: #201d1a;
  --muted: #62584f;
  --paper: #f6f1e8;
  --surface: #fffdf8;
  --line: #ded3c6;
  --orange: #922d25;
  --sage: #e4eee7;
}
#desk :focus-visible { outline: 2px solid #174e86; outline-offset: 2px; }
#desk .sidebar { border: 0; }
#desk .workspace-label { border: 0; padding-bottom: 12px; }
#desk .workspace-avatar { color: var(--ink); background: #eee4d6; }
#desk .sidebar nav button[aria-current="page"] {
  color: var(--orange);
  background: #f3e5dc;
  box-shadow: none;
}
#desk .view-heading h1 { font-size: 32px; line-height: 1.19; letter-spacing: -.025em; }
#desk .view-heading p { font-size: 16px; }
#desk .view-heading p:empty { display: none; }
#desk h2 { letter-spacing: -.02em; }
#mail-empty button,
#agent-connect-open,
#agent-setup .agent-setup-actions button:not(.secondary) {
  background-color: var(--orange);
  color: var(--surface);
}
#desk .workspace-content button:disabled { cursor: default; }
#desk .workspace-content .secondary { border-color: #8a7a6b; }
#desk .text-button { color: var(--orange); }
#history .mail-welcome {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 0 24px;
  padding: clamp(22px,4vw,40px);
  background: var(--surface);
  border-color: var(--line);
  border-radius: 8px;
}
.mail-welcome-mark { grid-column: 2; grid-row: 1 / span 2; }
#history .mail-welcome > :not(img) { grid-column: 1; }
#history .mail-welcome h2 { font-size: 22px; }
#history .mail-welcome button { justify-self: start; }
#mail-load-status {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
#history .card { border-radius: 8px; }
#history .mail-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 8px 16px;
  padding: 14px 0;
  color: var(--ink);
}
#history .mail-row strong { font-size: 15px; overflow-wrap: anywhere; }
#history .mail-row small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
#history .mail-status { color: var(--muted); font: 600 13px/1.4 'DM Sans', system-ui, sans-serif; }
#history .mail-status--qualified { max-width: 180px; }
#history .mail-status--qualified .mail-status-note { font-size: 11px; font-weight: 400; }
#history .row-arrow { display: block; color: var(--orange); }
#history .mail-row:hover { background: var(--paper); }
#order-details { background: var(--surface); }
#order-details .order-state-badge { display: inline-block; margin: 0 0 10px; color: #245845; background: #e4eee7; }
#order-details .order-state-badge[data-tone="attention"] { color: #68430c; background: #f8eacc; }
#order-details .order-details-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 16px 28px; }
#order-details .order-facts-grid { grid-template-columns: minmax(0,1fr); }
#order-delivery-unavailable { margin-top: 20px; }
#order-details .order-progress li { padding-block: 7px; }
#agent-setup .agent-setup-progress { border: 0; }
#agent-setup .agent-setup-progress button {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
#agent-setup .agent-setup-progress button[aria-current="step"] {
  color: var(--orange);
  background: #f3e5dc;
  border-color: #8a7a6b;
}
#agent-setup .workflow-card { background: var(--surface); }
#agent-setup .example-prompt { font: 400 16px/1.55 "DM Sans", system-ui, sans-serif !important; color: var(--ink); }
#agent-setup .connection-check > summary { cursor: pointer; font-weight: 700; }
#agent-setup .connection-check[open] > summary { margin-bottom: 12px; }
@media (max-width: 600px) {
  #history .mail-row { grid-template-columns: minmax(0,1fr) auto; }
  #history .mail-status { grid-column: 1; justify-self: start; text-align: left; }
  #history .mail-status--qualified { max-width: 100%; }
  #history .row-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  #order-details .order-details-grid { grid-template-columns: minmax(0,1fr); }
}

/* Keep the archived PDF within the submitted order panel on narrow screens. */
.vendor-pdf-preview[data-preview-url] {
  height: clamp(320px, 72vh, 720px);
  max-width: 100%;
}
