/* Vocdoni look, from the vocdoni.io brand kit (BRAND.md, DESIGN.md): warm cream surfaces,
   one ink, a single-weight serif for headings, a dark-ink pill for the main action, green only
   for accents, links and the focus ring, signal yellow only as the eyebrow dot. */

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-latin-ext-full-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-latin-full-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Hanken Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Hanken Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --background: #fdfbf3;
  --foreground: #202019;
  --ink: #1f1f18;
  --on-ink: #fcfaf1;
  --primary: #296948;
  --secondary: #e0f3e1;
  --accent: #f0ead2;
  --signal: #f6eb93;
  --muted: #5f5e55;
  --hairline: rgb(32 32 25 / 0.12);
  --control-border: rgb(32 32 25 / 0.55);
  --radius-panel: 20px;
  --radius-inner: 12px;
  --font-sans: "Hanken Grotesk Variable", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces Variable", Fraunces, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

.site-header,
.page {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding-inline: 1rem;
}

.site-header {
  padding-top: 1.5rem;
  color: var(--foreground);
}

.logo {
  display: block;
  width: auto;
  height: 2.125rem;
  max-width: 100%;
}

.page {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.panel {
  margin: 0 0 1rem;
  padding: 1.5rem 1.25rem;
  background: var(--background);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  box-shadow: 0 1px 2px rgb(32 32 25 / 0.06), 0 12px 28px -16px rgb(32 32 25 / 0.18);
}

@media (min-width: 40em) {
  .panel {
    padding: 2.25rem 2.25rem 2rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Eyebrow: signal-yellow dot, then an uppercase letter-spaced label. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1px rgb(32 32 25 / 0.2);
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* The working and error headings are the smaller, status-like headings. */
#working-heading,
#error-heading {
  font-size: clamp(1.625rem, 6.5vw, 2.25rem);
}

#working-heading {
  display: flex;
  align-items: center;
}

h1[tabindex="-1"]:focus {
  outline: none;
}

.lede {
  max-width: 36rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.hint,
.note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.note {
  margin: 1.25rem 0 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.select-wrap {
  position: relative;
}

/* The chevron is drawn here, not as a select background, so contrast can be measured. */
.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--foreground);
  border-bottom: 2px solid var(--foreground);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select {
  width: 100%;
  min-height: 3rem;
  padding: 0 2.75rem 0 1rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-inner);
  background-color: var(--background);
  color: var(--foreground);
  font: inherit;
  font-weight: 500;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
}

select:disabled {
  cursor: progress;
}

.message {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-inner);
}

/* Pill buttons. The primary one is the dark-ink pill of the brand. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  background: transparent;
  border: 1px solid var(--control-border);
  border-radius: 9999px;
  color: var(--foreground);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.pill:hover:not(:disabled) {
  background: var(--secondary);
}

.pill:active:not(:disabled) {
  transform: scale(0.96);
}

.pill.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
}

.pill.primary:hover:not(:disabled) {
  background: #35352b;
  border-color: #35352b;
}

.pill:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.spinner {
  display: inline-block;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  border: 3px solid var(--hairline);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success view */
.result-list {
  margin: 0 0 2rem;
}

.result-list > div {
  display: grid;
  gap: 0.125rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--hairline);
}

.result-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.result-list dt {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.result-list dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (min-width: 36em) {
  .result-list > div {
    grid-template-columns: 11rem 1fr;
    gap: 1rem;
  }

  .result-list dt {
    padding-top: 0.15rem;
  }
}

/* Error view */
.guidance {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.guidance li {
  margin: 0.375rem 0;
  padding-left: 0.25rem;
}

.guidance li::marker {
  color: var(--primary);
}

details {
  margin: 0 0 1rem;
  padding: 0 1rem;
  background: var(--accent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-inner);
}

summary {
  padding: 0.875rem 0;
  font-weight: 600;
  cursor: pointer;
}

details[open] summary {
  padding-bottom: 0.625rem;
}

pre {
  max-height: 24rem;
  margin: 0 0 1rem;
  padding: 0.75rem;
  overflow: auto;
  background: var(--background);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.actions .hint {
  margin: 0;
}

.notice {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  border-radius: var(--radius-inner);
  font-size: 0.9375rem;
}

@media (max-width: 29.999em) {
  .pill {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
