:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #18202b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

main {
  width: min(100%, 38rem);
  padding: clamp(1.5rem, 5vw, 2.75rem);
  background: #fff;
  border: 1px solid #d9dde4;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(25, 35, 50, .08);
}

h1, h2 { margin: 0 0 .65rem; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1.25rem; color: #526070; }
section + section { margin-top: 1.5rem; }
label { display: block; margin: 0 0 .45rem; font-weight: 650; }
.back-link { color: #175cd3; font-weight: 650; text-underline-offset: .2em; }

input, textarea, button {
  width: 100%;
  font: inherit;
  border-radius: .6rem;
}

input, textarea {
  padding: .75rem .85rem;
  border: 1px solid #aeb6c2;
  background: #fff;
  color: #18202b;
}

textarea { min-height: 13rem; resize: vertical; line-height: 1.5; }
button { padding: .75rem 1rem; border: 0; background: #175cd3; color: #fff; font-weight: 700; cursor: pointer; }
button.secondary { background: #e9eef7; color: #243247; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, textarea:focus-visible, .back-link:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.actions { display: flex; gap: .75rem; margin-top: 1rem; }
.actions > * { flex: 1; }
.help { margin: .5rem 0 0; font-size: .9rem; }
#status { min-height: 1.5rem; margin-top: 1.5rem; color: #334155; font-weight: 650; }
[hidden] { display: none !important; }

@media (max-width: 30rem) {
  body { display: block; padding: 0; background: #fff; }
  main { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .actions { flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  :root { background: #0d1117; color: #f2f5f8; }
  main, input, textarea { background: #151b23; color: #f2f5f8; border-color: #475569; }
  p, #status { color: #bdc7d5; }
  .back-link { color: #8cb4ff; }
  button.secondary { background: #2c3644; color: #f2f5f8; }
}
