:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-muted: #f0f5f3;
  --ink: #17211e;
  --ink-secondary: #52615c;
  --ink-muted: #6b7974;
  --border: #d8e1de;
  --border-strong: #aebdb8;
  --accent: #087f6a;
  --accent-hover: #066b59;
  --accent-soft: #e5f4ef;
  --success: #187346;
  --success-soft: #e5f4eb;
  --warning: #93620b;
  --warning-soft: #fff4d6;
  --danger: #b4232f;
  --danger-soft: #fdecee;
  --focus: #086fba;
  --radius-sm: 6px;
  --radius-md: 8px;
  --shadow-tool: 0 2px 8px rgba(23, 33, 30, 0.08);
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; overflow-x: hidden; background: var(--bg); }

body {
	width: 100%;
	overflow-x: hidden;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { touch-action: manipulation; }

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 38%, transparent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(1120px, 100%);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand strong { color: var(--ink-secondary); font-weight: 550; }

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 17px;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.service-status span {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.intro { margin-bottom: 24px; }

.context-label,
.step-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.intro h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro > p:last-child {
  max-width: 58ch;
  margin: 8px 0 0;
  color: var(--ink-secondary);
}

.workspace-grid { display: grid; gap: 20px; }

.tool-panel {
  min-width: 0;
  padding: 24px 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-tool);
}

.tool-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-heading h2,
.support-panel h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0;
}

.text-button {
  min-height: 44px;
  margin: -7px -8px 0 0;
  padding: 8px;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 650;
}

.text-button:hover { background: var(--accent-soft); }

.stepper {
  position: relative;
  margin: 28px 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: var(--border);
}

.stepper li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 12px;
}

.stepper span {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  font-weight: 750;
}

.stepper em { font-style: normal; font-weight: 600; }
.stepper .is-current,
.stepper .is-complete { color: var(--accent); }
.stepper .is-current span { color: #fff; background: var(--accent); border-color: var(--accent); }
.stepper .is-complete span { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

.view { display: none; }
.view.is-active { display: block; animation: view-in var(--transition) both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.field-group label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
}

.input-action-row { display: flex; flex-direction: column; gap: 10px; }

input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input::placeholder { color: #63716d; opacity: 1; }
input:hover { border-color: #74847f; }
input:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); outline: none; }
input[aria-invalid="true"] { border-color: var(--danger); }

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}

.primary-button { color: #fff; background: var(--accent); border: 1px solid var(--accent); }
.primary-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.primary-button:active { background: #055a4b; }
.secondary-button { color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); }
.secondary-button:hover { background: var(--surface-muted); border-color: #82928d; }

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button.is-loading { position: relative; color: transparent; }
button.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  inset: 50% auto auto 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: #fff;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.field-hint,
.field-error,
.submit-note,
.polling-note {
  margin: 8px 0 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

.field-error { min-height: 21px; color: var(--danger); font-weight: 600; }

.notice {
  margin-bottom: 20px;
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f2c8cd;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.notice.is-info { color: #315b53; background: var(--accent-soft); border-color: #bdded4; }

.code-summary {
  margin-bottom: 28px;
  padding: 16px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.summary-topline,
.progress-header,
.progress-numbers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

code {
  color: var(--ink-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  color: #38534c;
  background: var(--surface-muted);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.status-ready,
.status-completed { color: var(--success); background: var(--success-soft); }
.status-running { color: var(--accent); background: var(--accent-soft); }
.status-pending { color: var(--warning); background: var(--warning-soft); }
.status-failed,
.status-expired { color: var(--danger); background: var(--danger-soft); }

.summary-grid,
.confirmation-task,
.progress-details {
  margin: 16px 0 0;
  display: grid;
  gap: 14px;
}

.summary-grid div,
.confirmation-task div,
.progress-details div { min-width: 0; }

dt { color: var(--ink-muted); font-size: 13px; }
dd { margin: 2px 0 0; overflow-wrap: anywhere; font-weight: 700; }

.confirmation-header { margin-bottom: 20px; }
.confirmation-header h3,
.progress-header h3,
.view#view-unavailable h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: 0;
  text-wrap: balance;
}

.target-record {
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.target-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
}

.target-avatar.has-image { background-position: center; background-size: cover; color: transparent; }
.target-details { min-width: 0; display: grid; gap: 2px; }
.target-details strong { overflow-wrap: anywhere; font-size: 18px; }
.target-details span,
.target-details p { color: var(--ink-secondary); }
.target-details p { margin: 4px 0 0; }

.confirmation-task { margin-top: 20px; }

.button-row {
  margin-top: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}

.progress-header { align-items: flex-start; }
.progress-header h3 { margin-top: 7px; }
.progress-numbers { margin-top: 28px; align-items: baseline; }
.progress-numbers strong { font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1; }
.progress-numbers small { color: var(--ink-muted); font-size: 18px; }
.progress-numbers > span { color: var(--accent); font-weight: 750; font-variant-numeric: tabular-nums; }

.progress-track {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  background: var(--border);
  border-radius: 999px;
}

.progress-track span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: inherit;
  transition: width 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-details {
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.terminal-message {
  margin-top: 20px;
  padding: 14px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.terminal-message strong { display: block; }
.terminal-message p { margin: 4px 0 0; color: var(--ink-secondary); }

.view#view-unavailable { padding: 8px 0; text-align: center; }
.view#view-unavailable > p { max-width: 50ch; margin: 8px auto 0; color: var(--ink-secondary); }
.state-symbol {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
}

.support-panel {
  padding: 8px 4px;
}

.support-panel ol {
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  list-style: none;
}

.support-panel li { display: flex; gap: 12px; }
.support-panel li > span {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 750;
}

.support-panel li strong { font-size: 15px; }
.support-panel li p,
.privacy-note p { margin: 2px 0 0; color: var(--ink-secondary); font-size: 14px; }
.privacy-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.privacy-note strong { font-size: 14px; }

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 calc(24px + env(safe-area-inset-bottom));
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.site-footer p { margin: 0; }

.is-hidden { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (min-width: 600px) {
  .page-shell { padding: 40px 24px 64px; }
  .header-inner { padding-inline: 24px; }
  .tool-panel { padding: 32px; }
  .input-action-row { flex-direction: row; align-items: stretch; }
  .input-action-row .primary-button { flex: 0 0 auto; min-width: 148px; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .confirmation-task,
  .progress-details { grid-template-columns: repeat(2, 1fr); }
  .progress-details { grid-template-columns: repeat(3, 1fr); }
  .button-row { flex-direction: row; justify-content: flex-end; }
  .button-row button { min-width: 136px; }
  .centered-actions { justify-content: center; }
}

@media (min-width: 960px) {
  .page-shell { padding-top: 48px; }
  .intro { margin-bottom: 30px; }
  .workspace-grid { grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); gap: 48px; align-items: start; }
  .support-panel { padding-top: 28px; }
}

@media (max-width: 420px) {
  .brand strong { display: none; }
  .service-status { font-size: 13px; }
  .intro h1 { font-size: 27px; }
  .tool-heading { align-items: center; }
  .text-button { max-width: 124px; text-align: right; }
	.stepper { margin-inline: -8px; }
	.stepper em { font-size: 11px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
