@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/Fraunces-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --background: #fbf7ee;
  --card: #fffdf8;
  --line: #e6dcc6;
  --text: #111114;
  --muted: #4f4a40;
  --accent: #b23a1a;
  --full-stop: #e4572e;
  --on-accent: #ffffff;
  --field-border: #8a7f6a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1814;
    --card: #23201b;
    --line: #3a352d;
    --text: #f6f0e2;
    --muted: #d8ceb9;
    --accent: #f08a68;
    --on-accent: #1a1814;
    --field-border: #7a7062;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark span { color: var(--full-stop); }

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
  font-size: 15px;
}

nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current='page'] { color: var(--text); }

h1, h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: 40px; margin: 0 0 16px; }
h2 { font-size: 22px; margin: 40px 0 8px; }

p, li { color: var(--text); }
.lead { font-size: 20px; color: var(--muted); }
.muted { color: var(--muted); font-size: 15px; }

a { color: var(--accent); }

ul { padding-left: 20px; }
li { margin: 6px 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 24px 0;
}

.card h2 { margin-top: 0; }

.result-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 8px;
}

.notice {
  border-left: 3px solid var(--full-stop);
  padding: 4px 0 4px 16px;
  margin: 0 0 32px;
}

form label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
}

input, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 10px 12px;
}

textarea { min-height: 96px; resize: vertical; }

button {
  margin-top: 20px;
  font: inherit;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }

input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--full-stop);
  outline-offset: 2px;
}

footer.site {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer.site a { color: var(--muted); }

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  .lead { font-size: 18px; }
}
