/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · macrostructure: Single-Purpose State · genre: modern-minimal · tone: utilitarian · anchor hue: cobalt · contrast: pass (40–41) · nav: none · footer: none · slop: pass (42–49) · mobile: pass (34, 49, 50–57) */
@import url("../tokens.css");

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

html,
body {
  min-width: 20rem;
  min-height: 100%;
  overflow-x: clip;
}

html {
  color-scheme: light;
  background: var(--color-paper);
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

.page-shell {
  min-height: 100svh;
  padding: clamp(7rem, 21vh, 12rem) var(--space-md) var(--space-xl);
}

.loading-panel {
  width: min(100%, 28rem);
  margin-inline: auto;
  text-align: center;
}

h1 {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.35rem, 4.8vw, 1.75rem);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.loader {
  width: 4.5rem;
  height: 4.5rem;
  margin: var(--space-xl) auto var(--space-lg);
  border: 0.25rem solid var(--color-track);
  border-top-color: var(--color-accent);
  border-radius: var(--radius-round);
  animation: spin var(--duration-spin) linear infinite;
}

.status-text {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

#countdown {
  display: inline-block;
  min-width: 1ch;
  margin-inline-start: var(--space-2xs);
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.manual-link {
  margin-block-start: var(--space-lg);
  color: var(--color-accent);
  font-size: 0.95rem;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}

.manual-link:not([hidden]) {
  display: inline-block;
}

.manual-link:focus-visible,
.noscript-notice a:focus-visible {
  border-radius: var(--radius-focus);
  outline: 0.1875rem solid var(--color-focus);
  outline-offset: 0.1875rem;
}

.manual-link:hover,
.noscript-notice a:hover {
  color: var(--color-focus);
}

.manual-link:active,
.noscript-notice a:active {
  text-decoration-thickness: 0.125rem;
}

.manual-link[aria-disabled="true"] {
  color: var(--color-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.noscript-notice {
  position: fixed;
  inset-inline: var(--space-md);
  inset-block-end: var(--space-md);
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  text-align: center;
}

.noscript-notice a {
  color: var(--color-accent);
}

body[data-state="error"] .loader {
  animation: none;
  border-color: var(--color-track);
  border-top-color: var(--color-muted);
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader {
    animation: none;
  }
}
