@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FeijoaWeb';
  src: url('/fonts/FeijoaWeb-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FeijoaWeb';
  src: url('/fonts/FeijoaWeb-MediumItalic.woff2') format('woff2');
  font-weight: 500; font-style: italic; font-display: swap;
}

:root {
  --bg: #fff5e5;          /* storybynumbers.com/writing background */
  --field: #f4e9d6;       /* input fill: a touch darker than --bg */
  --ink: #1d1d1d;
  --muted: #6f6557;
  --accent: #860000;      /* heading red, from /writing */
  --accent2: #771955;     /* highlighted-word plum, from /writing */
  --accent-dark: #6c0000;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wrap { width: 100%; max-width: 460px; }

/* logo pinned top-left, small */
.wordmark {
  position: absolute;
  top: 22px;
  left: 24px;
  display: block;
  color: var(--ink);
}
.wordmark svg { height: 21px; width: auto; display: block; }

/* header treatment from /writing: Fraunces, 600, uppercase, deep red,
   with one word highlighted in Feijoa italic lowercase plum */
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 55px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1 .hl {
  font-family: 'FeijoaWeb', Georgia, serif;
  font-weight: 500;
  font-style: italic;
  text-transform: lowercase;
  letter-spacing: 0;
  color: var(--accent2);
}

.lede {
  color: var(--ink);
  margin: 0 0 26px;
  max-width: 42ch;
}

/* fields: no border, filled with --field to signal the input */
textarea, select, #link, .plaintext {
  background: var(--field);
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
}
textarea:focus, select:focus, #link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(134, 0, 0, 0.28);
}

textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 13px 14px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.exp { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }

select { font-size: 14px; padding: 8px 10px; }

.primary {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.primary:hover { background: var(--accent-dark); }
.primary:disabled { opacity: 0.45; cursor: default; }

.linkbox { display: flex; gap: 8px; }
#link {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 11px 12px;
}

.plaintext {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  margin: 0 0 12px;
  padding: 14px;
}

.meta { font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.meta.destroyed { margin-top: 14px; }
a { color: var(--accent); }

.error { color: var(--accent); font-size: 14px; margin: 14px 0 0; }
