* { box-sizing: border-box; }
body { margin: 0; }
header, main, footer { width: min(1060px, calc(100% - 48px)); margin: auto; }
header { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--border-subtle); gap: 20px; }
header img { object-fit: contain; height: auto; }
header span { font-size: 14px; color: var(--fg-2); }
.intro { max-width: 820px; padding: 64px 0 40px; }
h1 { font-size: clamp(36px, 6vw, 64px); margin: 16px 0 24px; }
.intro .vv-rule { margin-bottom: 24px; }
.intro > p + p { margin-top: 16px; }
details { margin-top: 24px; color: var(--fg-2); font-size: 14px; }
summary { cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.privacy { padding: 16px 0; }
.privacy p { font-size: 14px; color: var(--fg-2); }
.workspace { background: var(--bg-2); padding: 32px; border-top: 3px solid var(--vv-red); margin-bottom: 48px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 12px; }
h2 { font-size: 24px; text-transform: none; }
.badge { font-size: 12px; color: var(--fg-2); border: 1px solid var(--border-subtle); border-radius: 3px; padding: 4px 8px; }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0; }
button, textarea { font: inherit; }
button { cursor: pointer; padding: 12px 18px; background: var(--vv-red); color: white; border: 1px solid var(--vv-red); border-radius: 4px; line-height: 1.4; }
button:hover { background: var(--vv-red-700); }
.example, .secondary { background: var(--bg-1); color: var(--fg-1); border-color: var(--border-subtle); }
.example { text-align: left; font-size: 14px; padding: 14px; }
.example:hover, .secondary:hover { background: var(--vv-red-100); border-color: var(--vv-red); }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--vv-red); outline-offset: 3px; }
label { display: block; font-weight: 700; margin: 24px 0 10px; }
textarea { display: block; width: 100%; resize: vertical; padding: 14px; border: 1px solid var(--vv-grey-300); border-radius: 4px; background: white; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
#message { color: var(--vv-red-700); margin-top: 16px; }
#progress { color: var(--fg-2); font-size: 14px; }
.entry { background: white; padding: 24px; border: 1px solid var(--border-subtle); margin: 16px 0; overflow-x: auto; overflow-wrap: anywhere; }
.entry h3 { font-size: 16px; margin-bottom: 14px; }
.answer p, .answer ul, .answer ol { margin: 12px 0; }
.answer h1, .answer h2, .answer h3 { font-size: 20px; text-transform: none; margin-top: 20px; }
.answer table { border-collapse: collapse; font-size: 14px; width: 100%; margin: 16px 0; }
.answer th, .answer td { padding: 10px; border-bottom: 1px solid var(--border-subtle); text-align: left; white-space: normal; }
.answer th { background: var(--bg-2); }
.answer .align-left { text-align: left; }
.answer .align-center { text-align: center; }
.answer .align-right { text-align: right; }
.answer pre { overflow-x: auto; }
.answer-chart { margin: 24px 0; overflow-x: auto; }
.answer-chart svg { display: block; width: 100%; min-width: 480px; max-width: 800px; height: auto; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px 0 40px; border-top: 1px solid var(--border-subtle); font-size: 12px; color: var(--fg-2); }
@media (max-width: 640px) {
  header, main, footer { width: calc(100% - 32px); }
  header { align-items: flex-start; } header img { width: 128px; }
  .intro { padding-top: 40px; } .workspace { padding: 20px 16px; }
  .examples { grid-template-columns: 1fr; } .entry { padding: 16px; }
  .actions { flex-direction: column; }
}
/* The process panel reflects persisted events, including the actual correction edge. */
header, main, footer { width: min(1320px, calc(100% - 64px)); }
.work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 36px; align-items: start; }
.workspace { grid-column: 1; grid-row: 1; min-width: 0; }
.process-panel { grid-column: 2; grid-row: 1; position: sticky; top: 24px; margin: 0 0 48px; color: var(--fg-1); border-top: 3px solid var(--fg-1); padding-top: 24px; }
.process-panel > summary { font-size: 19px; font-weight: 700; text-decoration: none; }
.process-content { padding-top: 16px; }
.process-content > .meta { margin: 0; }
.process-diagram { width: 320px; max-width: 100%; height: 444px; position: relative; margin: 20px auto; }
.process-edges { position: absolute; width: 100%; height: 444px; overflow: visible; }
.process-edges path { fill: none; stroke: var(--vv-grey-300); stroke-width: 1.5; }
.process-edges marker path { fill: var(--vv-grey-300); stroke: none; }
.process-edges .correction-edge { stroke: #DD001A; stroke-dasharray: 4 4; }
.process-node { position: absolute; left: 20%; width: 60%; height: 52px; border: 1px solid #D8D9DA; border-radius: 6px; background: white; display: flex; justify-content: center; align-items: center; flex-direction: column; line-height: 1.3; }
.process-node:nth-of-type(1) { top: 5px; }
.process-node:nth-of-type(2) { top: 78px; }
.process-node:nth-of-type(3) { top: 151px; }
.process-node:nth-of-type(4) { top: 224px; }
.process-node:nth-of-type(5) { top: 297px; }
.process-node:nth-of-type(6) { top: 371px; }
.process-node strong { font-size: 13px; font-weight: 700; }
.process-node span { font-size: 12px; color: #595B5C; }
.process-node small { position: absolute; left: calc(100% + 6px); width: 63px; font-size: 10px; color: #595B5C; background: white; }
.process-node.idle { color: #868889; }
.process-node.active { border: 2px solid #DD001A; animation: active-node 2s ease-in-out infinite; }
.process-node.done { border-color: #0A0A0A; }
.process-node.static { animation: none; }
@keyframes active-node { 50% { box-shadow: 0 0 0 4px #DD001A12; } }
.timeline-frame { position: relative; }
.timeline-frame.has-earlier::before { content: ''; position: absolute; inset: 0 0 auto; height: 16px; background: linear-gradient(white, transparent); pointer-events: none; z-index: 1; }
.timeline { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; overflow-anchor: none; scrollbar-width: thin; }
.timeline li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid #EEEEEF; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.timeline time { color: #868889; font-variant-numeric: tabular-nums; }
.process-note { font-size: 11px; color: #868889; margin: 18px 0 0; }
.process-link { color: #595B5C; background: none; border: 0; padding: 10px 0 0; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.process-link:hover { color: #DD001A; background: none; }
.answer-chart img { display: block; width: 100%; height: auto; }
.answer-chart figcaption { font-size: 13px; color: #595B5C; margin-top: 8px; }
.validator-notice { border-left: 3px solid #DD001A; background: #F6F6F7; padding: 12px 16px; font-size: 14px; }
.mail-form { border-top: 1px solid #D8D9DA; padding-top: 8px; margin-top: 24px; }
.mail-form input { font: inherit; width: 100%; padding: 12px; border: 1px solid #D8D9DA; border-radius: 4px; }
.mail-form input:focus-visible { outline: 2px solid #DD001A; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .process-node.active { animation: none; } }
@media (min-width: 1100px) { .process-panel > summary { pointer-events: none; list-style: none; } }
@media (max-width: 1099px) {
  .work-layout { display: flex; flex-direction: column; gap: 20px; }
  .process-panel { position: static; width: 100%; margin: 0; padding: 20px; border: 1px solid #D8D9DA; border-radius: 6px; }
  .workspace { width: 100%; }
  .timeline { max-height: 240px; }
}
@media (max-width: 640px) { header, main, footer { width: calc(100% - 32px); } }
/* Shared Studio frame for registration, privacy, confirmation and notices. */
.public-site { min-width: 0; overflow-wrap: anywhere; }
.public-page { width: min(680px, calc(100% - 32px)); padding: 48px 0 64px; }
.public-page h1 { font-size: clamp(28px, 4.5vw, 36px); line-height: 1.2; margin: 0 0 28px; }
.public-page h2 { margin: 32px 0 16px; }
.public-page p { margin: 0 0 20px; line-height: 1.6; }
.public-page form { margin-top: 32px; }
.public-page label { font-weight: 400; margin: 24px 0 8px; }
.public-page input:not([type="checkbox"]):not([type="hidden"]) {
  display: block; width: 100%; max-width: 440px; height: 44px; padding: 12px;
  font: inherit; border: 1px solid #D8D9DA; border-radius: 4px; background: white;
}
.public-page input:focus-visible { outline: 2px solid #DD001A; outline-offset: 2px; }
.public-page .check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; line-height: 1.55; }
.public-page .check input {
  flex: 0 0 18px; width: 18px; height: 18px; margin: 3px 0 0; accent-color: #DD001A;
}
.public-page .check span { min-width: 0; }
.public-page #bot-check { margin-top: 16px; margin-bottom: 20px; display: block; max-width: 100%; }
.public-page #bot-check label { margin: 0; }
.public-page #request-access { display: block; margin-top: 16px; }
.public-page button:disabled { opacity: 1; background: #D8D9DA; border-color: #D8D9DA; color: #595B5C; cursor: not-allowed; }
.public-page a { color: var(--fg-1); text-underline-offset: 3px; }
.public-site footer a { color: var(--fg-2); text-underline-offset: 3px; }
.public-page .button { display: inline-block; background: var(--vv-red); color: white; padding: 12px 18px; border-radius: 4px; text-decoration: none; }
.public-page .field-error { color: var(--vv-red); margin: 8px 0; }
@media (max-width: 640px) {
  .public-site header { flex-wrap: wrap; gap: 12px; }
  .public-page { padding-top: 36px; }
}
.header-logout { display: inline; margin: 0; }
.header-logout button { background: none; border: 0; color: var(--fg-2); text-decoration: underline; padding: 0; }
