/* ── Global keyboard focus indicator (D4-A11Y-006) ─────────────────────────
 * Ensures every interactive element shows a visible focus ring during keyboard
 * navigation. Uses :focus-visible so mouse users are unaffected. This rule
 * takes precedence over inline `outline: none` declarations when using a
 * keyboard (browser only activates :focus-visible for non-pointer input).
 * ────────────────────────────────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid #0a84ff !important;
  outline-offset: 2px !important;
}

:root {
  --ww-ink-900: #0b1220;
  --ww-ink-800: #121c30;
  --ww-ink-700: #243553;
  --ww-ink-500: #526684;
  --ww-muted: #66758f;
  --ww-line: rgba(18, 28, 48, 0.14);
  --ww-surface: #f5f5f7;
  --ww-card: rgba(255, 255, 255, 0.84);
  --ww-card-strong: rgba(255, 255, 255, 0.94);
  --ww-accent: #0a66ff;
  --ww-accent-soft: rgba(10, 102, 255, 0.14);
  --ww-success: #12b76a;
  --ww-danger: #d9534f;
  --ww-warning: #ffb224;
  --ww-radius-xl: 28px;
  --ww-radius-lg: 20px;
  --ww-radius-md: 14px;
  --ww-shadow-xl: 0 32px 84px rgba(11, 18, 32, 0.14);
  --ww-shadow-md: 0 16px 42px rgba(11, 18, 32, 0.1);
  --ww-font:
    "SF Pro Text",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

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

body.ww-light-shell *,
body.ww-light-shell *::before,
body.ww-light-shell *::after {
  box-sizing: border-box;
}

body.ww-light-shell {
  margin: 0;
  font-family: var(--ww-font);
  color: var(--ww-ink-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(
      1100px 520px at 18% 6%,
      rgba(10, 102, 255, 0.12),
      transparent 56%
    ),
    radial-gradient(
      900px 520px at 88% 18%,
      rgba(18, 183, 106, 0.1),
      transparent 58%
    ),
    radial-gradient(
      720px 460px at 52% 108%,
      rgba(10, 102, 255, 0.06),
      transparent 66%
    ),
    linear-gradient(180deg, #f5f5f7 0%, #fbfbfd 36%, #f4f6fb 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.ww-light-shell a {
  color: inherit;
  text-decoration: none;
}

body.ww-light-shell header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--ww-line);
  padding: 14px 18px;
}

body.ww-light-shell .wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.ww-light-shell a.logo {
  color: var(--ww-ink-900);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.ww-light-shell .logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: contain;
  object-position: left center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(18, 28, 48, 0.08);
  box-shadow: 0 12px 24px rgba(11, 18, 32, 0.08);
  padding: 4px 8px;
}

body.ww-light-shell main {
  flex: 1;
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 96px 0 32px;
}

body.ww-light-shell.ww-shell-centered main {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.ww-light-shell.ww-shell-runtime main {
  display: flex;
  width: calc(100% - 36px);
  max-width: none;
}

body.ww-light-shell .card {
  background: var(--ww-card);
  border: 1px solid rgba(18, 28, 48, 0.12);
  border-radius: var(--ww-radius-xl);
  box-shadow: var(--ww-shadow-xl);
  backdrop-filter: blur(18px) saturate(150%);
}

body.ww-light-shell .title {
  color: var(--ww-ink-900);
}

body.ww-light-shell .sub {
  color: var(--ww-ink-700);
}

body.ww-light-shell .actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.ww-light-shell button,
body.ww-light-shell a.btn {
  appearance: none;
  border: 1px solid rgba(18, 28, 48, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ww-ink-900);
  padding: 11px 14px;
  border-radius: var(--ww-radius-md);
  font-family: var(--ww-font);
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease;
}

body.ww-light-shell button:hover,
body.ww-light-shell a.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--ww-shadow-md);
  border-color: rgba(10, 102, 255, 0.24);
}

body.ww-light-shell button:focus-visible,
body.ww-light-shell a.btn:focus-visible {
  outline: 2px solid rgba(10, 102, 255, 0.45);
  outline-offset: 2px;
}

body.ww-light-shell button.primary,
body.ww-light-shell a.btn.primary {
  background: linear-gradient(135deg, #0b223f 0%, #0a66ff 100%);
  color: #ffffff;
  border-color: rgba(10, 102, 255, 0.3);
}

body.ww-light-shell button:disabled,
body.ww-light-shell a.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body.ww-light-shell label {
  color: var(--ww-ink-700);
  font-weight: 700;
}

body.ww-light-shell input,
body.ww-light-shell select,
body.ww-light-shell textarea {
  appearance: none;
  border: 1px solid rgba(18, 28, 48, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ww-ink-900);
  border-radius: 12px;
  font-family: var(--ww-font);
  font-size: 15px;
  line-height: 1.45;
  padding: 12px 14px;
  transition:
    box-shadow 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease;
}

body.ww-light-shell input::placeholder,
body.ww-light-shell textarea::placeholder {
  color: var(--ww-muted);
}

body.ww-light-shell input:focus-visible,
body.ww-light-shell select:focus-visible,
body.ww-light-shell textarea:focus-visible {
  outline: 2px solid rgba(10, 102, 255, 0.35);
  outline-offset: 2px;
  border-color: rgba(10, 102, 255, 0.32);
}
body.ww-light-shell .meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ww-ink-500);
  line-height: 1.6;
}

body.ww-light-shell .meta strong {
  color: var(--ww-ink-700);
}

body.ww-light-shell .tiny {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ww-muted);
  line-height: 1.6;
}

body.ww-light-shell code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-size: 12px;
  color: var(--ww-ink-800);
  background: rgba(18, 28, 48, 0.07);
  padding: 2px 6px;
  border-radius: 8px;
}

body.ww-light-shell .status {
  font-size: 12px;
  color: var(--ww-ink-500);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

body.ww-light-shell .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(18, 28, 48, 0.14);
  background: rgba(255, 255, 255, 0.8);
  padding: 7px 10px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(11, 18, 32, 0.08);
}

body.ww-light-shell .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 178, 36, 0.92);
  animation: ww-pulse 1.2s ease-in-out infinite;
  flex: 0 0 auto;
}

body.ww-light-shell .dot.ok {
  animation: none;
  background: var(--ww-success);
}

body.ww-light-shell .dot.err {
  animation: none;
  background: var(--ww-danger);
}

@keyframes ww-pulse {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.65;
  }
}

@media (max-width: 860px) {
  body.ww-light-shell header {
    padding: 12px 14px;
  }

  body.ww-light-shell main {
    width: calc(100% - 28px);
    padding-top: 92px;
  }

  body.ww-light-shell .logo-mark {
    width: 64px;
    height: 64px;
  }
}
