/* The private submission and review workspace. */
dialog.wf {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  margin: auto;
  width: min(760px, calc(100vw - 2.5rem));
  max-width: none;
  max-height: min(870px, calc(100dvh - 3rem));
  padding: 0;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--control) var(--paper);
  border: 1px solid var(--control);
  border-top: 3px solid var(--blue);
  border-radius: 13px;
  box-shadow: var(--dialog-shadow);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.7 var(--font);
  letter-spacing: .015em;
  text-align: left;
}
dialog.wf[open] { display: block; }
.wf *, .wf *::before, .wf *::after { box-sizing: border-box; }
.wf [hidden] { display: none !important; }
.wf .wf-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; z-index: 2;
  background: var(--pale); border-bottom: 1px solid var(--line);
  padding: 1.1rem clamp(1.15rem, 4vw, 2rem);
}
.wf h2, .wf h3, .wf h4, .wf p, .wf dl, .wf dd, .wf ul, .wf ol { margin: 0; }
.wf h2 { color: var(--ink); font-size: clamp(1.24rem, 3.6vw, 1.6rem); font-weight: 800; line-height: 1.4; letter-spacing: .015em; }
.wf h3 { color: var(--ink); font-size: 1.1rem; line-height: 1.5; }
.wf h4 { font-size: 1rem; }
.wf .wf-kicker { color: var(--blue); font: 700 .8rem/1.6 ui-monospace, monospace; letter-spacing: .11em; }
.wf .wf-body { padding: clamp(1.15rem, 4vw, 2rem); overflow-wrap: anywhere; }
.wf .wf-body > * + * { margin-top: 1.1rem; }
.wf button, .wf a { font: inherit; }
.wf button { 
  color: var(--ink); background: var(--paper); border: 1px solid var(--control);
  border-radius: 7px; font-size: .94rem; font-weight: 650; padding: .55rem 1rem;
  min-height: 42px; cursor: pointer; line-height: 1.45;
  transition: background-color .15s ease, border-color .15s ease;
}
.wf button:hover:not(:disabled) { background: var(--pale); border-color: var(--blue); }
.wf button:disabled { opacity: .56; cursor: not-allowed; }
.wf button.wf-close { display: inline-grid; place-items: center; flex-shrink: 0; min-width: 42px; padding: .45rem; background: var(--paper); }
.wf button.wf-primary, .wf a.wf-primary { color: var(--paper); background: var(--blue); border: 1px solid var(--blue); }
.wf button.wf-primary:hover:not(:disabled), .wf a.wf-primary:hover { background: var(--deep-blue); border-color: var(--deep-blue); }
.wf :is(button, a, input, textarea, select, summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wf a { color: var(--blue); text-underline-offset: .2em; }
.wf .wf-tabs { display: flex; flex-wrap: wrap; gap: .35rem; padding: .3rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.wf .wf-tabs button { flex: 1 1 auto; border-color: transparent; background: transparent; color: var(--muted); }
.wf .wf-tabs :is(.wf-active, [aria-selected="true"]) { background: var(--selected); color: var(--ink); border-color: var(--blue); box-shadow: inset 0 -2px var(--blue); }
.wf .wf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.wf .wf-wide { grid-column: 1 / -1; }
.wf .wf-field { display: flex; flex-direction: column; gap: .36rem; min-width: 0; color: var(--ink); font-size: .94rem; font-weight: 650; }
.wf :where(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  width: 100%; min-width: 0; min-height: 44px; padding: .63rem .78rem;
  border: 1px solid var(--control); border-radius: 6px; box-shadow: none;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 400; line-height: 1.5;
}
.wf input::placeholder, .wf textarea::placeholder { color: var(--muted); opacity: 1; }
.wf textarea { min-height: 88px; resize: vertical; }
.wf select:not([multiple]) {
  appearance: none;
  padding-inline-end: 2.4rem;
  background-image: linear-gradient(45deg, transparent 48%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 52%);
  background-position: right 1.08rem center, right .7rem center;
  background-size: .4rem .4rem;
  background-repeat: no-repeat;
}
@media (forced-colors: active) {
  .wf select:not([multiple]) { appearance: auto; background-image: none; }
}
.wf input:is([type="checkbox"],[type="radio"]) { width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--blue); }
.wf input[type="file"] { cursor: pointer; font-size: .88rem; border-style: dashed; padding: .44rem; }
.wf input[type="file"]::file-selector-button { background: var(--pale); border: 1px solid var(--control); border-radius: 4px; padding: .35rem .65rem; color: var(--ink); font: inherit; margin-right: .6rem; }
.wf .wf-check { display: flex; align-items: center; gap: .6rem; }
.wf .wf-check input { margin: 0; }
.wf .wf-hint, .wf .wf-muted, .wf small { color: var(--muted); font-size: .88rem; line-height: 1.65; font-weight: 400; }
.wf .wf-note, .wf .wf-alert, .wf .wf-summary, .wf .wf-match, .wf .wf-proof { padding: .8rem 1rem; border-radius: 7px; line-height: 1.7; }
.wf .wf-note, .wf .wf-summary { color: var(--text); background: var(--pale); border: 1px solid var(--line); }
.wf .wf-alert { color: var(--error); background: var(--error-wash); border: 1px solid #b36b61; }
.wf .wf-alert:empty { display: none; }
.wf .wf-match, .wf .wf-proof { background: var(--wash); border: 1px solid var(--line); }
.wf .wf-box { padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: var(--wash); min-width: 0; }
.wf .wf-box > * + * { margin-top: .65rem; }
.wf .wf-box summary { cursor: pointer; color: var(--deep-blue); font-weight: 700; }
.wf .wf-actions, .wf .wf-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.wf .wf-actions { margin-top: 1.25rem; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 1rem; }
.wf .wf-list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.wf .wf-item { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--wash); min-width: 0; }
.wf button.wf-item { width: 100%; text-align: left; }
.wf .wf-title { color: var(--ink); font-weight: 750; }
.wf .wf-pill { display: inline-flex; align-items: center; width: fit-content; padding: .15rem .55rem; border: 1px solid var(--control); border-radius: 999px; color: var(--deep-blue); background: var(--pale); font-size: .82rem; font-weight: 650; white-space: nowrap; }
.wf .wf-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px,100%),1fr)); align-items: start; gap: .7rem; }
.wf .wf-photos figure { margin: 0; min-width: 0; }
.wf .wf-img, .wf .wf-photos img { width: 100%; height: auto; max-height: 230px; object-fit: contain; display: block; background: var(--wash); border: 1px solid var(--line); border-radius: 6px; }
.wf .wf-empty { padding: 1.55rem .9rem; background: var(--wash); border: 1px dashed var(--control); border-radius: 8px; text-align: center; color: var(--muted); }
.wf .wf-file { overflow-wrap: anywhere; font-size: .95rem; }
.wf .wf-body code, .wf .wf-body pre { color: var(--deep-blue); background: var(--paper); padding: .2rem .4rem; border-radius: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  dialog.wf { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); border-radius: 10px; }
  .wf .wf-top { padding: .8rem 1rem; }
  .wf .wf-body { padding: 1rem; }
  .wf .wf-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .wf .wf-actions > button { flex: 1 1 auto; }
  .wf .wf-box, .wf .wf-item { padding: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wf *, .wf *::before, .wf *::after { transition: none !important; animation: none !important; }
}

.wf .wf-public-fields { margin-top: 1rem; }
