/*
 * Trailmark Atlas auth pages (quick 261106-cqo). Served Worker-first by the
 * Atlas auth Worker under the pinned CSP (style-src 'self'): this file is the
 * ONLY style source; no page carries a style attribute or a style element.
 */

:root {
  --atlas-ink: #15183d;
  --atlas-ink-soft: #3d4166;
  --atlas-accent: #2f5fd6;
  --atlas-accent-strong: #1f47ad;
  --atlas-surface: #ffffff;
  --atlas-page: #eef1f8;
  --atlas-line: #c7cce0;
  --atlas-danger: #a3192b;
  --atlas-danger-bg: #fdecef;
  --atlas-ok: #1d5c35;
  --atlas-focus: #ffbf47;
  --atlas-radius: 10px;
  color-scheme: light;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  background: var(--atlas-page);
  color: var(--atlas-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.atlas-card {
  width: 100%;
  max-width: 440px;
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-line);
  border-radius: var(--atlas-radius);
  padding: 32px 28px;
  box-shadow: 0 8px 24px rgb(21 24 61 / 8%);
}

.atlas-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.atlas-brand img {
  width: 32px;
  height: 32px;
}

.atlas-wordmark {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.25;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.25rem;
}

h1:focus,
h2:focus {
  outline: none;
}

h1:focus-visible,
h2:focus-visible {
  outline: 3px solid var(--atlas-focus);
  outline-offset: 2px;
}

p {
  margin: 0 0 12px;
}

.atlas-lead {
  color: var(--atlas-ink-soft);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.atlas-field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  background: var(--atlas-surface);
  border: 1px solid #6b7092;
  border-radius: 6px;
}

input[readonly] {
  background: var(--atlas-page);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9375rem;
}

input[aria-invalid="true"] {
  border-color: var(--atlas-danger);
  border-width: 2px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--atlas-focus);
  outline-offset: 2px;
}

.atlas-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0;
}

.atlas-check input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.atlas-check label {
  font-weight: 400;
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

.atlas-primary {
  display: inline-block;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--atlas-accent);
  color: #ffffff;
  font-weight: 600;
}

.atlas-primary:hover:not(:disabled) {
  background: var(--atlas-accent-strong);
}

.atlas-primary:disabled {
  background: #8a90b0;
  cursor: not-allowed;
}

.atlas-secondary {
  padding: 8px 12px;
  border: 1px solid var(--atlas-accent);
  border-radius: 6px;
  background: var(--atlas-surface);
  color: var(--atlas-accent-strong);
  font-weight: 600;
}

.atlas-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--atlas-accent-strong);
  text-decoration: underline;
}

.atlas-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 16px;
}

.atlas-copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.atlas-copy-row input {
  flex: 1 1 auto;
  min-width: 0;
}

a {
  color: var(--atlas-accent-strong);
}

.atlas-turnstile {
  min-height: 65px;
  margin: 8px 0 16px;
}

.atlas-error {
  color: var(--atlas-danger);
  font-weight: 600;
}

.atlas-error:not(:empty) {
  background: var(--atlas-danger-bg);
  border-left: 4px solid var(--atlas-danger);
  padding: 8px 12px;
}

.atlas-status:not(:empty) {
  color: var(--atlas-ok);
}

.atlas-hint {
  color: var(--atlas-ink-soft);
  font-size: 0.875rem;
  margin-top: 20px;
}

.atlas-codes {
  margin: 12px 0;
  padding-left: 28px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
}

.atlas-codes li {
  padding: 2px 0;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}

/* Last, so it wins over every equal-specificity display rule above. */
[hidden] {
  display: none;
}
