:root {
  color-scheme: light;
  --ink: #07111f;
  --muted: #53657d;
  --blue: #155eef;
  --line: #c9d5e5;
  --paper: #fff;
  --base: #f7f9fc;
  --error: #ad1b1b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font:
    17px/1.65 system-ui,
    sans-serif;
}
a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}
a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  background: var(--paper);
  padding: 0.75rem;
  z-index: 2;
}
.skip-link:focus {
  top: 1rem;
}
.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - 76rem) / 2));
  background: #07111f;
  color: white;
}
.site-header a {
  color: white;
  display: inline-block;
  padding: 0.5rem 0;
  text-decoration: none;
}
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-right: auto;
}
.brand span {
  color: #84b2ff;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
main {
  max-width: 76rem;
  margin: auto;
  padding: 3rem 1.25rem 4rem;
}
.intro {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}
h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.045em;
  text-wrap: balance;
  margin: 0.7rem 0 1.25rem;
}
h2 {
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-top: 0;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.4;
}
p {
  max-width: 72ch;
}
.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.builder > section {
  min-width: 0;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
label {
  display: block;
  font-weight: 650;
  margin: 1rem 0 0.4rem;
}
label span,
small,
.hint,
.privacy {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}
small {
  display: block;
  margin-top: 0.4rem;
}
button,
input,
select,
textarea {
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--muted);
  border-radius: 0.35rem;
  min-height: 48px;
  padding: 0.65rem;
  max-width: 100%;
}
input,
select,
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
button {
  font-weight: 650;
  cursor: pointer;
  padding: 0.6rem 1rem;
}
button:hover:enabled {
  background: var(--base);
  border-color: var(--blue);
}
button.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
button.primary:hover {
  filter: brightness(0.9);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
textarea:disabled {
  background: var(--base);
}
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 0.35rem;
  padding: clamp(1rem, 3vw, 2rem);
}
#result {
  min-height: 32rem;
}
.privacy {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.error,
#form-status {
  color: var(--error);
  font-size: 0.9rem;
}
.error:empty,
#form-status:empty {
  display: none;
}
[aria-invalid='true'] {
  border: 2px solid var(--error);
}
#result-status {
  font-size: 0.9rem;
  min-height: 1.6em;
}
.tool-notes {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 2rem;
}
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
footer {
  border-top: 1px solid var(--line);
  max-width: 76rem;
  margin: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
}
footer a {
  padding: 0.5rem 0;
}
#print-sheet {
  display: none;
}
.notice {
  border: 1px solid var(--line);
  padding: 1rem;
}
p,
pre {
  overflow-wrap: anywhere;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e9f0fb;
    --muted: #b1c1d8;
    --blue: #8bb6ff;
    --line: #3f526d;
    --paper: #142237;
    --base: #0b1627;
    --error: #ffb0b0;
  }
  button.primary {
    background: #155eef;
    border-color: #155eef;
  }
}
@media (max-width: 52rem) {
  .builder,
  .notes-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  main {
    padding-top: 2rem;
  }
  nav {
    font-size: 0.85rem;
    gap: 1rem;
  }
  #result {
    min-height: 30rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@page {
  size: portrait;
  margin: 16mm;
}
@media print {
  body {
    background: white;
    color: black;
    font:
      11pt/1.5 system-ui,
      sans-serif;
  }
  .site-header,
  main,
  footer,
  .skip-link {
    display: none !important;
  }
  #print-sheet {
    display: block;
  }
  #print-sheet pre {
    white-space: pre-wrap;
    font: inherit;
  }
  #print-sheet p {
    font-size: 9pt;
  }
}
