@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --grey-900: #232326;
  --grey-800: #2e2e31;
  --grey-600: #5e5e63;
  --cream-50: #fcfaf6;
  --cream-100: #f5f0e6;
  --beige-200: #eadfcb;
  --beige-300: #dfd0b3;
  --beige-500: #bfa77c;
  --success: #2f6b4f;
  --success-bg: #e3f0e8;
  --warning: #8a5a00;
  --warning-bg: #fbebcb;
  --danger: #a12b2b;
  --danger-strong: #842222;
  --danger-bg: #f8dede;
  --success-border: var(--success);
  --warning-border: var(--warning);
  --danger-border: var(--danger);
  --info-bg: var(--cream-100);
  --info-border: var(--beige-300);
  --input-border: var(--grey-600);
  --overlay-color: rgb(35 35 38 / 58%);
  --beige-wash: rgb(234 223 203 / 18%);
  --beige-wash-strong: rgb(234 223 203 / 28%);
  --shadow-color: rgb(35 35 38 / 6%);
  --shadow-color-strong: rgb(35 35 38 / 9%);
  --color-charcoal: var(--grey-900);
  --color-concrete: var(--beige-300);
  --color-background: var(--cream-100);
  --color-broken-white: var(--cream-50);
  --color-paper: var(--cream-50);
  --color-row-alt: var(--beige-200);
  --color-row-hover: var(--beige-300);
  --color-muted: var(--grey-600);
  --color-border: var(--beige-300);
  --color-success: var(--success);
  --color-warning: var(--warning);
  --color-danger: var(--danger);
  --color-focus: var(--grey-800);
  --font-display: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-heavy: 800;
  --font-size-body: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --font-size-caption: 0.75rem;
  --font-size-title: clamp(1.25rem, 1.05rem + 1vw, 1.75rem);
  --font-size-display: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --radius-sm: 0.35rem;
  --radius-md: 0.7rem;
  --radius-lg: 1rem;
  --radius-card: 1.5rem;
  --radius-tile: 1.125rem;
  --radius-button: 1rem;
  --radius-field: 0.875rem;
  --radius-pill: 999px;
  --shadow-card: 0 0.75rem 2rem var(--shadow-color);
  --shadow-modal: 0 1.25rem 3rem var(--shadow-color-strong);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-charcoal);
  background: var(--color-background);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.5;
  animation: page-enter 180ms ease-out both;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-exit 180ms ease-in both;
}

::view-transition-new(root) {
  animation: page-enter 180ms ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes page-exit {
  to {
    opacity: 0;
  }
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.data-table thead {
  background: var(--color-row-alt);
}

.data-table tbody tr {
  transition: background-color 180ms ease;
}

.data-table tbody tr:nth-child(odd) {
  background: var(--color-paper);
}

.data-table tbody tr:nth-child(even) {
  background: var(--color-row-alt);
}

.data-table tbody tr:hover {
  background: var(--color-row-hover);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--color-charcoal);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 {
  margin-bottom: var(--space-3);
  font-size: clamp(1.45rem, 5vw, 2rem);
}

.muted {
  color: var(--color-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-2);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  color: var(--color-charcoal);
  background: var(--beige-wash-strong);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  padding: var(--space-5) var(--space-4);
  place-items: center;
  background:
    linear-gradient(135deg, var(--beige-wash), transparent 48%),
    var(--color-background);
}

.auth-shell {
  width: min(100%, 28rem);
}

.auth-card {
  padding: clamp(1.25rem, 5vw, 2.25rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  box-shadow: var(--shadow-card);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  color: var(--color-charcoal);
  text-decoration: none;
}

.brand-logo {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo--symbol {
  width: 3rem;
  height: 3rem;
}

.brand-logo--wordmark {
  width: min(100%, 9rem);
  height: auto;
}

.auth-topbar .brand-logo--wordmark {
  width: min(100%, 6rem);
}

.auth-shell > .auth-card {
  margin: 0 auto;
}

main.auth-shell {
  margin: var(--space-6) auto;
}

.section-enter {
  animation: section-enter 180ms ease-out both;
}

@keyframes section-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-heading {
  margin: var(--space-6) 0 var(--space-5);
}

.auth-heading p:last-child {
  margin-bottom: 0;
}

.auth-footer {
  padding: var(--space-4);
  color: var(--color-muted);
  font-size: var(--font-size-caption);
  letter-spacing: 0.16em;
  text-align: center;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 380px) {
  .auth-page {
    padding: var(--space-4) var(--space-3);
  }

  .auth-card {
    padding: var(--space-5) var(--space-4);
  }
}

@media (max-height: 700px) {
  .auth-page {
    align-content: start;
    padding-block: var(--space-3);
    place-items: start center;
  }

  main.auth-shell {
    margin-block: 0;
  }

  .auth-card {
    padding-block: clamp(1rem, 3vh, 1.5rem);
  }
}

@media (max-height: 520px) {
  .auth-page {
    padding-block: var(--space-2);
  }

  .form-stack {
    gap: var(--space-3);
  }

  .auth-help {
    margin-top: var(--space-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
