@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/poppins-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-600-normal.woff2') format('woff2');
}

:root {
  --yellow: #FFD100;
  --navy: #2A2D64;
  --cream: #F4F1ED;
  --purple: #6001C0;
  --white: #FFFFFF;
  --line: #C9C6D3;
  --error: #A4133C;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
}
h1 { font-size: 1.75rem; margin-top: 0.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin-top: 1.5rem; }
p, ol, ul { margin: 0 0 1rem; }
ol, ul { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
strong, b { font-weight: 600; }
small, .hint { font-size: 0.875rem; }

a { color: var(--purple); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

code, pre {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace;
  font-size: 0.9rem;
}
code { overflow-wrap: anywhere; }
pre {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
pre code { overflow-wrap: normal; }

.site-header, main, .site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}
.site-header { padding-top: 1.25rem; }
.brand {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 4px solid var(--yellow);
}
.site-footer {
  margin-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.lede { font-size: 1.125rem; }
.card {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.notice {
  padding: 0.75rem 1rem;
  background: var(--white);
  border-left: 4px solid var(--purple);
  border-radius: 4px;
}
.notice.error { border-left-color: var(--error); color: var(--error); }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  background: var(--yellow);
  color: var(--navy);
  border: 2px solid var(--yellow);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { border-color: var(--navy); }
button.quiet, .button.quiet { background: transparent; border-color: var(--navy); }
button.quiet:hover, .button.quiet:hover { background: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1rem; }

.field { display: block; margin: 0 0 1rem; font-weight: 600; }
.field input, .field select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
}
fieldset { margin: 0 0 1rem; padding: 0; border: 0; }
legend { padding: 0; font-weight: 600; margin-bottom: 0.5rem; }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.switch small { display: block; }
.switch input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 3rem;
  height: 1.75rem;
  margin: 0;
  background: var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.switch input::before {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.375rem;
  height: 1.375rem;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.15s;
}
.switch input:checked { background: var(--purple); }
.switch input:checked::before { transform: translateX(1.25rem); }

.copy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.copy code {
  flex: 1 1 14rem;
  padding: 0.6rem 0.75rem;
  background: var(--cream);
  border-radius: 8px;
  font-size: 1rem;
  user-select: all;
  -webkit-user-select: all;
}

@media (prefers-reduced-motion: reduce) {
  .switch input, .switch input::before { transition: none; }
}
