/* Deliberately plain scaffolding. Replace with your own brand -- the class
   names here are the only thing the templates depend on. */

:root {
  --ink: #16202a;
  --muted: #5b6b78;
  --accent: #000000;
  --accent-hover: #6e6e6e;
  --border: #dce3e7;
  --surface: #f3f5f6;
  --danger: #9e2f27;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}

/* --- Chrome ------------------------------------------------------------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: baseline;
  font-size: 0.9375rem;
}

.topbar-nav a { color: var(--muted); text-decoration: none; }
.topbar-nav a:hover { color: var(--ink); text-decoration: underline; }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- Type --------------------------------------------------------------- */

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.lead { color: var(--muted); margin-top: 0; }

.note {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* --- Controls ----------------------------------------------------------- */

.button, .button-small, .button-quiet {
  display: inline-block;
  font: inherit;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
}

.button { background: var(--accent); color: #fff; }
.button:hover { background: var(--accent-hover); }

.button-small {
  background: var(--accent);
  color: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.875rem;
}

.button-quiet {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
  margin-left: 0.5rem;
}

.inline-form { display: inline; margin: 0; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
}

/* allauth renders unstyled inputs; these selectors catch them too. */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"] {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

label { display: block; font-size: 0.9375rem; margin-bottom: 0.3rem; }

form p { margin: 0 0 1rem; }

/* --- Calculator --------------------------------------------------------- */

.calc {
  display: grid;
  gap: 1rem;
  max-width: 22rem;
  margin: 2rem 0;
}

.result {
  display: block;
  background: var(--surface);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  max-width: 22rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
}

.result-row strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* --- Messages ----------------------------------------------------------- */

.messages { list-style: none; padding: 0; margin: 0 0 1.5rem; }

.message {
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  margin-bottom: 0.5rem;
}

.message-error { border-left-color: var(--danger); }

.error { color: var(--danger); }

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
