:root {
  color-scheme: light;
  --oparo-blue: #3b82f6;
  --oparo-blue-accessible: #2563eb;
  --oparo-navy: #0f172a;
  --oparo-surface: #ffffff;
  --oparo-background: #f7f8fa;
  --oparo-border: #dbe3ef;
  --oparo-text: #111315;
  --oparo-muted: #5c6570;
  --oparo-focus-ring: #2563eb;
  --oparo-info-bg: #eff6ff;
  --oparo-info-border: #bfdbfe;
  --oparo-info-text: #1e3a5f;
  --oparo-danger: #b91c1c;
  --oparo-danger-bg: #fef2f2;
  --oparo-radius-lg: 14px;
  --oparo-radius-md: 10px;
  --oparo-shadow-sm: 0 1px 3px rgb(15 23 42 / 0.08);
  --oparo-touch-min: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--oparo-background);
  color: var(--oparo-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  min-height: var(--oparo-touch-min);
  padding: 0.625rem 1rem;
  background: var(--oparo-navy);
  color: #fff;
  z-index: 1000;
  border-radius: var(--oparo-radius-md);
  text-decoration: none;
  font-weight: 600;
}

.op-id-header {
  border-bottom: 1px solid var(--oparo-border);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(180%) blur(16px);
}

.op-id-header__inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.op-id-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.op-id-brand__logo {
  display: block;
  height: 1.625rem;
  width: auto;
  max-width: 10rem;
}

main {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.op-id-card,
.card {
  background: var(--oparo-surface);
  border: 1px solid var(--oparo-border);
  border-radius: var(--oparo-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--oparo-shadow-sm);
}

.op-id-card h1,
.card h1 {
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--oparo-text);
}

.op-id-card h2,
.card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
  color: var(--oparo-text);
}

.op-id-card p,
.card p {
  margin: 0 0 1rem;
  color: var(--oparo-muted);
}

.op-id-notice,
.notice,
.status-notice {
  background: var(--oparo-info-bg);
  border: 1px solid var(--oparo-info-border);
  border-radius: var(--oparo-radius-md);
  padding: 1rem;
  margin: 1rem 0 1.25rem;
  color: var(--oparo-info-text);
}

.op-id-notice p:last-child,
.notice p:last-child {
  margin-bottom: 0;
}

.op-id-actions,
.links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.op-id-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--oparo-touch-min);
  border-radius: var(--oparo-radius-md);
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
}

.op-id-btn--primary,
.btn-primary {
  background: var(--oparo-blue-accessible);
  color: #fff;
  width: 100%;
}

.op-id-btn--primary:hover,
.btn-primary:hover {
  background: #1d4ed8;
}

.op-id-btn--secondary,
.btn-ghost {
  background: transparent;
  color: var(--oparo-blue-accessible);
  border-color: var(--oparo-border);
  width: 100%;
}

.op-id-btn:focus-visible,
.op-id-link:focus-visible,
.op-id-brand:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
a.action:focus-visible {
  outline: 2px solid var(--oparo-focus-ring);
  outline-offset: 2px;
}

.op-id-link,
a.action {
  display: inline-flex;
  align-items: center;
  min-height: var(--oparo-touch-min);
  color: var(--oparo-blue-accessible);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.op-id-footer,
footer {
  border-top: 1px solid var(--oparo-border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--oparo-muted);
  background: var(--oparo-surface);
}

.op-id-footer p,
footer p {
  margin: 0 0 0.5rem;
  color: var(--oparo-muted);
}

.op-id-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.75rem;
}

.alert-danger {
  background: var(--oparo-danger-bg);
  border: 1px solid #fecaca;
  border-radius: var(--oparo-radius-md);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  color: var(--oparo-danger);
}

.form-field {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--oparo-text);
}

.field-hint {
  font-size: 0.875rem;
  color: var(--oparo-muted);
  margin-top: 0.25rem;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  min-height: var(--oparo-touch-min);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--oparo-border);
  border-radius: var(--oparo-radius-md);
  font: inherit;
  color: var(--oparo-text);
  background: #fff;
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: 2px solid var(--oparo-focus-ring);
  outline-offset: 1px;
  border-color: var(--oparo-blue-accessible);
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--oparo-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--oparo-border);
}

details.url-panel {
  margin-top: 1rem;
  border-top: 1px solid var(--oparo-border);
  padding-top: 1rem;
}

details.url-panel summary {
  cursor: pointer;
  color: var(--oparo-blue-accessible);
  font-weight: 600;
  list-style: none;
  min-height: var(--oparo-touch-min);
  display: flex;
  align-items: center;
}

details.url-panel summary::-webkit-details-marker {
  display: none;
}

details.url-panel summary::before {
  content: "▸ ";
}

details.url-panel[open] summary::before {
  content: "▾ ";
}

details.url-panel summary:focus-visible {
  outline: 2px solid var(--oparo-focus-ring);
  outline-offset: 2px;
}

.url-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0;
}

.url-row input {
  flex: 1;
}

.url-suffix {
  color: var(--oparo-muted);
  white-space: nowrap;
  font-size: 0.9rem;
}

.footer-nav {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

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

.workspace-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.workspace-item {
  border: 1px solid var(--oparo-border);
  border-radius: var(--oparo-radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.workspace-consume-btn {
  margin-top: 0.75rem;
  width: auto;
}
