@font-face {
  font-family: Studio Serif;
  src: url('/assets/fonts/NotoSerif-Regular.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Studio Serif;
  src: url('/assets/fonts/NotoSerif-Bold.woff') format('woff');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Studio Serif;
  src: url('/assets/fonts/NotoSerif-Italic.woff') format('woff');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Studio Sans;
  src: url('/assets/fonts/NotoSans-Regular.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #202020;
  --muted: #606060;
  --rule: #d9d9d9;
  --error: #a12622;
  --sans: 'Studio Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
:focus-visible { outline: 2px solid #244b91; outline-offset: 4px; }
::selection { background: #e0e7f0; color: var(--ink); }
.site-wrap { width: min(100%, 1168px); margin: auto; padding: 0 48px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.site-header a { text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.wordmark { font-size: 28px; letter-spacing: -1px; line-height: 1.2; }
.site-header > a:last-child { font-size: 14px; }
.page-heading { padding: 44px 0 36px; }
h1 { max-width: 900px; margin: 0; font-size: clamp(34px, 4vw, 48px); font-weight: 400; line-height: 1.18; letter-spacing: -1.5px; }
.page-heading p { margin: 16px 0 0; color: var(--muted); }
.generator-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; padding-bottom: 56px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.field { margin-bottom: 20px; }
.template-field { margin-bottom: 28px; }
label { display: block; margin-bottom: 7px; font-size: 14px; }
input, textarea, select { display: block; width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid #ababab; border-radius: 3px; background: var(--paper); color: var(--ink); font-size: 16px; }
select { padding-right: 24px; }
input:hover, textarea:hover, select:hover { border-color: var(--ink); }
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); }
textarea { min-height: 82px; resize: vertical; line-height: 1.6; }
.field-help, .input-meta { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.input-meta { display: flex; justify-content: space-between; gap: 12px; }
.input-meta > span:last-child { white-space: nowrap; }
.field-error { margin: 7px 0 0; color: var(--error); font-size: 13px; }
.primary-button, .download-button { width: 100%; min-height: 48px; padding: 11px 16px; border: 1px solid var(--ink); border-radius: 3px; }
.primary-button { background: var(--ink); color: var(--paper); }
.primary-button:hover:not(:disabled) { background: #3f3f3f; }
.status { min-height: 21px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.status.error, .notice { color: var(--error); }
.preview-area { min-width: 0; }
.preview-heading { margin: 0 0 7px; font-size: 14px; }
.preview-figure { margin: 0; }
.preview-figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
figcaption > span:last-child { white-space: nowrap; }
.download-button { margin-top: 18px; background: var(--paper); color: var(--ink); }
.download-button:hover:not(:disabled) { background: #f5f5f5; }
.how-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; padding: 40px 0 48px; border-top: 1px solid var(--rule); }
h2 { margin: 0; font-size: 24px; font-weight: 400; line-height: 1.4; letter-spacing: -.5px; }
.how-copy > p { margin: 0; }
.how-copy ol { margin: 28px 0; padding-left: 24px; }
.how-copy li { padding-left: 5px; margin-bottom: 20px; }
.how-copy li:last-child { margin-bottom: 0; }
h3 { margin: 0 0 4px; font-size: 15px; font-weight: 400; }
.how-copy li p { margin: 0; color: var(--muted); font-size: 14px; }
.how-copy .privacy-note { color: var(--muted); font-size: 13px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--rule); padding: 24px 0 32px; color: var(--muted); font-size: 13px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
.skip-link { position: fixed; top: 10px; left: 10px; transform: translateY(-200%); z-index: 10; background: var(--ink); color: white; padding: 10px 18px; }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.not-found { max-width: 680px; margin: 15vh auto; padding: 24px; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .site-wrap { max-width: 568px; padding: 0 24px; }
  .site-header { padding: 22px 0; }
  .wordmark { font-size: 25px; }
  .page-heading { padding: 32px 0; }
  h1 { font-size: 36px; letter-spacing: -1px; }
  .generator-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 40px; }
  .how-section { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 32px 0; }
}
@media (max-width: 360px) {
  .site-wrap { padding: 0 16px; }
  h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
