/* Plain, readable styling. Headings use a book serif in the spirit of
   mathematical texts; everything else uses the system's sans-serif. */

:root {
  --ink: #1b2330;
  --muted: #586275;
  --background: #f4f6f9;
  --surface: #ffffff;
  --line: #d6dbe3;
  --accent: #22508f;
  --accent-dark: #173b6b;
  --danger: #a12622;
  --beta: #f2c230;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", P052, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

.container {
  max-width: 50rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main.container {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Header and footer */

/* Shown on every page while the service is being tested. */
.beta {
  background: var(--beta);
  color: var(--ink);
  font-size: 0.95rem;
  padding: 0.45rem 0;
}

.beta strong {
  font-size: 1.05rem;
  margin-right: 0.25rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1.25rem 0;
}

/* Text */

.lead {
  font-size: 1.15rem;
  max-width: 40rem;
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
}

.features dt {
  font-weight: 600;
  margin-top: 1rem;
}

.features dd {
  margin: 0.25rem 0 0;
  max-width: 40rem;
}

.event {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.25rem 1rem;
  margin-bottom: 1rem;
}

.event h3 {
  margin: 0.75rem 0 0.25rem;
}

.conference {
  border-left: 4px solid var(--accent);
  padding: 0.25rem 0.75rem;
  margin: 0.75rem 0;
}

/* Verified faculty e-mail address. */
.badge {
  display: inline-block;
  background: #e3f1e8;
  color: #1d6b45;
  border: 1px solid #1d6b45;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
}

.badge-small {
  padding: 0 0.4rem;
  font-size: 0.85rem;
}

.message {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
}

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

/* Forms */

label,
legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

form > div,
fieldset > div {
  margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  max-width: 32rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 7rem;
}

input[type="checkbox"],
input[type="radio"] {
  margin-right: 0.4rem;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  padding: 1rem;
  margin: 0 0 1rem;
}

.helptext {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.errorlist {
  color: var(--danger);
  padding-left: 1.2rem;
}

/* Django adds this class to labels of required fields (required_css_class). */
label.required::after,
legend.required::after {
  content: " *";
  color: var(--danger);
}

/* Buttons */

button,
.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

.button-secondary {
  background: var(--surface);
  color: var(--accent);
}

/* The main action of a long form stays in view while scrolling. */
.form-actions {
  position: sticky;
  bottom: 0;
  margin: 1.5rem -1rem 0;
  padding: 0.75rem 1rem;
  background: var(--background);
  border-top: 1px solid var(--line);
}

.button-large {
  font-size: 1.15rem;
  padding: 0.75rem 2.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.6rem;
  }

  .button-large {
    width: 100%;
  }
}
