* { box-sizing: border-box; }
:root { color-scheme: light dark; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 42rem;
  padding: 1rem;
  color: #1a1a1a;
  background: #fff;
}
header { border-bottom: 1px solid #ccc; margin-bottom: 1.5rem; padding-bottom: 0.75rem; }
.brand { font-weight: 600; margin: 0 0 0.25rem; }
nav { font-size: 0.95rem; }
.signed-in { font-size: 0.9rem; color: #444; }
main { margin-bottom: 2rem; }
footer { border-top: 1px solid #ccc; font-size: 0.85rem; color: #555; padding-top: 0.75rem; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; margin-top: 2rem; }
a { color: #0b5cad; }
form.inline { display: inline; }
button, input[type="submit"] { font: inherit; padding: 0.4rem 0.9rem; cursor: pointer; }
button.link { background: none; border: none; padding: 0; color: #0b5cad; text-decoration: underline; font-size: inherit; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], textarea, select {
  font: inherit; padding: 0.4rem; max-width: 100%; width: 24rem;
}
textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }
.hint { font-size: 0.9rem; color: #555; margin: 0.25rem 0 0.75rem; font-weight: 400; }
.notice { border: 1px solid #2e7d32; background: #edf7ed; padding: 0.6rem 0.8rem; border-radius: 4px; }
.error { border: 1px solid #b3261e; background: #fbecea; padding: 0.6rem 0.8rem; border-radius: 4px; }
.key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem; overflow-wrap: anywhere; word-break: break-all;
  background: #f4f4f4; border: 1px solid #ccc; border-radius: 4px;
  padding: 0.75rem; white-space: pre-wrap;
}
table { border-collapse: collapse; width: 100%; margin: 0.75rem 0; font-size: 0.92rem; }
th, td { border: 1px solid #ccc; padding: 0.35rem 0.5rem; text-align: left; vertical-align: top; }
th { background: #f0f0f0; }
.card { border: 1px solid #ccc; border-radius: 4px; padding: 0.75rem 1rem; margin: 1rem 0; }
.card h2, .card h3 { margin-top: 0.25rem; }
.muted { color: #555; font-size: 0.9rem; }
@media (prefers-color-scheme: dark) {
  body { color: #e6e6e6; background: #121212; }
  header, footer { border-color: #444; }
  a, button.link { color: #8ab4f8; }
  .signed-in, .hint, .muted, footer { color: #aaa; }
  .key { background: #1e1e1e; border-color: #444; }
  th, td { border-color: #444; }
  th { background: #222; }
  .card { border-color: #444; }
  .notice { background: #10240f; border-color: #2e7d32; }
  .error { background: #2b0d0b; border-color: #b3261e; }
  input[type="text"], input[type="email"], input[type="number"], input[type="date"], textarea, select {
    background: #1e1e1e; color: #e6e6e6; border: 1px solid #555;
  }
  button, input[type="submit"] { background: #2a2a2a; color: #e6e6e6; border: 1px solid #555; }
}
@media (max-width: 30rem) {
  input[type="text"], input[type="email"], input[type="number"], input[type="date"], select { width: 100%; }
  table { display: block; overflow-x: auto; }
}
