* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
}
button:disabled,
input:disabled {
  opacity: 0.48;
}
button,
input,
select,
textarea {
  color: inherit;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2rem;
  letter-spacing: -0.035em;
  line-height: 1.25;
  font-weight: 700;
}
h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.4;
}
h3 {
  font-size: 1rem;
}
small {
  font-size: 0.8125rem;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
:focus-visible {
  outline: 3px solid #1aa897;
  outline-offset: 4px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 1px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.button:hover {
  background: #edf4f3;
  border-color: #a6c1bd;
}
.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.button.primary:hover {
  background: var(--brand-dark);
}
.button.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.button.soft {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: transparent;
}
.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.button.text {
  border-color: transparent;
  background: transparent;
  padding-inline: 8px;
  color: var(--brand);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}
.icon-button:hover {
  background: #eaf1f0;
  color: var(--ink);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 600;
  background: #eef2f3;
  color: #52676e;
}
.badge.good {
  background: var(--brand-soft);
  color: #086258;
}
.badge.pending {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge.info {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.error {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta {
  color: var(--muted);
  font-size: 0.875rem;
}
.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--brand);
}
.number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.muted {
  color: var(--muted);
}
.positive {
  color: var(--brand);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e4f0ed;
  color: #245c53;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar.blue {
  background: #e9edf8;
  color: #4e5e87;
}
.avatar.sand {
  background: #f4ede4;
  color: #816947;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label,
.field-label {
  font-size: 0.875rem;
  font-weight: 600;
}
.input,
.select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cad9da;
  background: white;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.input::placeholder {
  color: var(--muted);
}
.input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffcfc;
}
.field-error {
  color: var(--danger);
  font-size: 0.875rem;
}
.helper {
  font-size: 0.875rem;
  color: var(--muted);
}
.alert {
  display: flex;
  gap: 10px;
  border: 1px solid #badfd4;
  background: #f0faf6;
  color: #216656;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9375rem;
}
.alert.warning {
  background: var(--warning-soft);
  border-color: #f2d9a7;
  color: var(--warning);
}
.alert.error {
  background: var(--danger-soft);
  border-color: #f4c7ce;
  color: var(--danger);
}
.empty {
  padding: 48px 24px;
  text-align: center;
}
.empty .icon {
  width: 32px;
  height: 32px;
  color: var(--subtle);
  margin-bottom: 12px;
}
.empty h3 {
  margin-bottom: 6px;
}
.empty p {
  color: var(--muted);
  font-size: 0.9375rem;
}
.empty .button {
  margin-top: 16px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.progress {
  height: 6px;
  border-radius: 99px;
  background: #e8eeee;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  max-width: calc(100vw - 32px);
  width: 480px;
  color: var(--ink);
  box-shadow: 0 24px 90px #082b3940;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.dialog::backdrop {
  background: #112f3d66;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 0;
}
.dialog-content {
  padding: 20px 24px 24px;
}
.dialog-content p {
  color: var(--muted);
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.dialog dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  margin: 20px 0 0;
  font-size: 0.9375rem;
}
.dialog dt {
  color: var(--muted);
}
.dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.flow-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.flow-steps li {
  padding: 8px 12px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.875rem;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.9375rem;
}
.skeleton {
  background: linear-gradient(90deg, #edf2f2, #e1eaea, #edf2f2);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 6px;
  height: 16px;
}
.spinner {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 600px) {
  h1 {
    font-size: 1.625rem;
  }
  .card {
    padding: 20px;
  }
  .dialog {
    width: 100%;
    max-width: calc(100vw - 24px);
    border-radius: 20px;
  }
  .dialog-head {
    padding: 16px 18px 0;
  }
  .dialog-content {
    padding: 16px 18px 20px;
  }
  .dialog-actions .button {
    flex: 1;
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .dialog dl {
    grid-template-columns: 80px 1fr;
  }
}
