@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
  accent-color: var(--color-primary);
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-surface);
}

::selection,
::-moz-selection {
  background: #000000;
  color: #ffffff;
}

html[data-theme="dark"] ::selection,
html[data-theme="dark"] ::-moz-selection {
  background: #f0f0f0;
  color: #18191c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) ::selection,
  :root:not([data-theme="light"]) ::-moz-selection {
    background: #f0f0f0;
    color: #18191c;
  }
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  font-weight: 600;
  color: var(--color-text);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1 0 auto;
  width: 100%;
  /* Same inset as .admin-main — back-link is the first public content */
  padding-top: var(--space-inset);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

.page-main:has(> .hero) {
  padding-top: 0;
  padding-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: unset;
}

.back-link:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* Beat `.prose a` / global link rules on public pages */
.prose a.back-link,
.document-prose a.back-link,
a.back-link {
  color: var(--color-text-muted);
  text-decoration: none;
}

.prose a.back-link:hover,
.document-prose a.back-link:hover,
a.back-link:hover {
  color: var(--color-text);
  text-decoration: none;
}

.back-link__chevron {
  display: block;
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

button,
.btn,
input,
textarea,
select {
  font: inherit;
}

button,
.btn {
  cursor: pointer;
}

input,
textarea,
select {
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-placeholder);
}

.error-page {
  padding: var(--space-8) 0;
}

@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;
  }
}
