@font-face {
  font-family: 'Noto Sans Display';
  src: url('/assets/fonts/NotoSansDisplay-Medium.ttf') format('truetype');
  font-style: normal; font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Display';
  src: url('/assets/fonts/NotoSansDisplay-SemiBold.ttf') format('truetype');
  font-style: normal; font-weight: 600; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans';
  src: url('/assets/fonts/NotoSans-Regular.ttf') format('truetype');
  font-style: normal; font-weight: 400; font-display: swap;
}
:root {
  color-scheme: dark;
  --iris: #C6AEFF;
  --dark: #29233D;
  --milk: #F6F2EC;
  --ink: #38285A;
  --canvas: #171420;
  --surface: #211C2E;
  --raised: #29233D;
  --field: #1C1827;
  --muted: #C0B7D0;
  --line: #625574;
  --danger: #FFBCCB;
  --heading: 'Noto Sans Display', sans-serif;
  --body: 'Noto Sans', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); color: var(--milk); font-family: var(--body); font-size: 16px; line-height: 1.55; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, input, summary { min-height: 44px; }
button { touch-action: manipulation; }
a { color: var(--iris); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--iris); outline-offset: 4px; }
.site-shell { width: min(640px, calc(100% - 48px)); margin: 0 auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 108px; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; font: 500 26px/1 var(--heading); letter-spacing: .012em; }
.brand img { display: block; width: 40px; height: 44px; object-fit: contain; }
.language-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; gap: 2px; }
.language-switch button { padding: 0 12px; min-width: 44px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font: 500 13px/1 var(--heading); }
.language-switch button[aria-pressed='true'] { background: var(--raised); color: var(--iris); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.workspace > * { min-width: 0; }
.active-pane { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--iris); border-radius: 8px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; }
h1 { font-size: clamp(25px, 4vw, 32px); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 16px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.product-context { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.phase-description { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
form { margin: 0; }
form > label:not(.consent-row) { display: block; margin: 0 0 8px; font: 600 14px/1.5 var(--heading); }
.field-help { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
/* Keep text fields readable before focus; do not trigger small-text iOS focus zoom. */
input[type='text'], textarea { width: 100%; min-width: 0; border: 1px solid #80708F; border-radius: 4px; background: var(--field); color: var(--milk); padding: 12px 14px; font-size: 16px; }
input[type='text'] { height: 52px; }
textarea { display: block; min-height: 140px; max-height: 480px; resize: vertical; font-family: ui-monospace, monospace; line-height: 1.6; tab-size: 2; overflow-wrap: anywhere; white-space: pre-wrap; }
input:disabled, textarea:disabled { background: var(--field); border-color: var(--line); color: var(--muted); cursor: not-allowed; opacity: 1; }
textarea[aria-invalid='true'] { border-color: var(--danger); outline-color: var(--danger); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; max-width: 100%; padding: 12px 20px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font: 500 14px/1.5 var(--heading); text-align: center; overflow-wrap: anywhere; white-space: normal; transition: background-color 120ms ease, color 120ms ease; }
.button-primary { margin-top: 18px; width: 100%; background: var(--iris); color: var(--ink); border-color: var(--iris); text-decoration: none; }
.button-primary:hover:not(:disabled) { background: var(--milk); }
.button-secondary { background: transparent; color: var(--milk); }
.button-secondary:hover:not(:disabled) { background: var(--raised); }
.button:disabled { border-color: var(--line); background: var(--raised); color: var(--muted); cursor: not-allowed; }
.security-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.refresh-row { margin-top: 16px; }
.security-note { background: var(--raised); border-left: 2px solid var(--iris); padding: 14px 16px; margin-bottom: 18px; }
.security-note p { margin: 0; font-size: 12px; line-height: 1.7; }
.summary-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.format-details { margin: 8px 0 12px; font-size: 12px; }
summary { display: list-item; width: fit-content; max-width: 100%; padding: 11px 0; cursor: pointer; font-family: var(--heading); font-weight: 500; overflow-wrap: anywhere; }
.format-details p { margin: 0 0 12px; color: var(--muted); line-height: 1.7; }
.consent-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 0 0 12px; cursor: pointer; font-size: 12px; line-height: 1.7; }
.consent-row input { flex: 0 0 22px; width: 22px; height: 22px; min-height: 22px; margin: 3px 0 0; accent-color: var(--iris); }
.consent-row span { flex: 1; padding: 3px 0; }
.feedback { padding: 12px 14px; margin: 0 0 20px; border: 1px solid var(--danger); color: var(--danger); font-size: 13px; line-height: 1.7; }
.monitor p { color: var(--muted); font-size: 13px; line-height: 1.7; }
dl { margin: 0; }
dd { margin: 0; overflow-wrap: anywhere; }
.status-details > div { display: flex; gap: 12px; font-size: 13px; }
.status-details dt { color: var(--muted); }
.status-details dd { font-family: var(--heading); font-weight: 600; }
.trace-pane { padding: 16px 32px; }
.trace-notice { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0 0 16px; }
.execution-rail { list-style: none; padding: 0; margin: 0; }
.execution-rail li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 14px; min-height: 54px; position: relative; font: 500 14px/1.5 var(--heading); }
.execution-rail li:not(:last-child)::before { content: ''; position: absolute; top: 16px; bottom: 0; left: 6px; width: 1px; background: var(--line); }
.rail-dot { width: 13px; height: 13px; margin-top: 4px; border: 1px solid var(--line); border-radius: 50%; background: var(--canvas); z-index: 1; }
.execution-rail small { display: block; color: var(--muted); font: 400 11px/1.6 var(--body); }
.execution-rail [data-state='started'] .rail-dot { border: 3px solid var(--iris); }
.execution-rail [data-state='confirmed'] .rail-dot { background: var(--iris); border-color: var(--iris); position: relative; }
.execution-rail [data-state='confirmed'] .rail-dot::after { content: '✓'; position: absolute; inset: -4px; color: var(--ink); text-align: center; font: 600 14px/18px var(--heading); }
.execution-rail [aria-current='step'] { color: var(--iris); }
.execution-rail [aria-current='step'] > div { background: var(--raised); border-left: 2px solid var(--iris); padding: 6px 10px; margin: -6px 0 12px; border-radius: 3px; }
.execution-rail [data-state='blocked'] .rail-dot, .execution-rail [data-state='unknown'] .rail-dot { border: 2px solid var(--danger); border-radius: 2px; }
.event-journal { border-top: 1px solid var(--line); margin-top: 8px; font-size: 12px; }
.event-journal p { color: var(--muted); line-height: 1.7; }
.journal-entries { white-space: pre-line; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.site-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 20px 0 32px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.site-footer > details { min-width: 0; }
.help-content { padding: 4px 0; line-height: 1.7; }
.help-content p { margin: 0 0 10px; }
.footer-signoff { white-space: nowrap; padding-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 2; left: 16px; top: 8px; transform: translateY(-160%); padding: 12px 18px; background: var(--iris); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
@media (min-width: 1280px) { .masthead { min-height: 128px; } }
@media (max-width: 759px) {
  .site-shell { width: min(640px, calc(100% - 32px)); }
  .active-pane { padding: 24px; }
  .trace-pane { padding: 12px 24px; }
  .site-footer { flex-wrap: wrap; gap: 0 16px; }
}
@media (max-width: 359px) {
  .site-shell { width: calc(100% - 24px); }
  .active-pane { padding: 20px 18px; }
  .trace-pane { padding-inline: 18px; }
  .masthead { gap: 8px; }
  .brand { gap: 10px; font-size: 24px; }
  .language-switch button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
