@import url('/fonts/fonts.css');

:root {
  /* Bodhi School palette. Tints are mixed from these tokens only. */
  --navy: #09152b;
  --navy-soft: #142540;
  --slate: #2d3a52;
  --purple: #4f38e0;
  --purple-deep: #3826c0;
  --purple-light: #d2caff;
  --purple-pale: #f1eeff;
  --gold: #f59e0b;
  --gold-pale: #fef3c7;
  --gold-ink: #92400e;
  --bg: #f4f1ec;
  --panel: #faf7f2;
  --paper: #ffffff;
  --ink: #1b2335;
  --ink-soft: #4a5568;
  --on-navy-soft: #b8c0d0;
  --line: #dcdee3;
  --field: #8b93a0;
  --error: #b91c1c;
  --error-pale: #fef2f2;
  --ok: #047857;
  --ok-pale: #ecfdf5;
  /* Figtree for text and every control; Bogart for the wordmark and headings. 'Bodhi Symbols'
     supplies the Greek letters, arrows and maths signs neither of them has (see fonts/fonts.css). */
  --font-body: 'Figtree', 'Bodhi Symbols', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Bogart', 'Bodhi Symbols', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.auth-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  background: var(--navy);
  border-bottom: 3px solid var(--purple);
  padding: 12px 20px;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.1;
  text-decoration: none;
  letter-spacing: 0;
}
.auth-mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.auth-brand b {
  color: var(--gold);
  font-weight: 600;
}
.auth-brand-sub {
  color: var(--on-navy-soft);
  font-size: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--slate);
}
.auth-top a:focus-visible {
  outline-color: var(--purple-light);
}

.auth-main {
  max-width: 520px;
  margin: 44px auto 60px;
  padding: 0 16px;
}
.auth-main.wide {
  max-width: 680px;
}
.card {
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(9, 21, 43, 0.05), 0 12px 32px rgba(9, 21, 43, 0.08);
  padding: 34px 32px 30px;
}
.card h1,
.legal h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}
.card h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
  color: var(--navy);
}
.lead {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 17px;
}

.field {
  margin: 0 0 18px;
}
.field > label,
.field > .label,
fieldset > legend {
  display: block;
  font-weight: 700;
  margin: 0 0 6px;
  padding: 0;
  color: var(--navy);
}
.hint {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  margin: -2px 0 8px;
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'] {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1.5px solid var(--field);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
}
input[type='text']:hover,
input[type='email']:hover,
input[type='password']:hover {
  border-color: var(--slate);
}
input:focus-visible,
button:focus-visible,
a:focus-visible,
.choice input:focus-visible + span {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}
input[aria-invalid='true'] {
  border-color: var(--error);
}
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 76px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--purple);
  font: 600 15px var(--font-body);
  padding: 6px 8px;
  cursor: pointer;
}
.pw-toggle:hover {
  background: var(--purple-pale);
}

fieldset {
  border: 0;
  margin: 0 0 18px;
  padding: 0;
  min-width: 0;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  position: relative;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice span {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--field);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  user-select: none;
}
.choice span:hover {
  border-color: var(--purple);
}
.choice input:checked + span {
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}
.choice input:checked + span::before {
  content: '✓ ';
}
.group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0 6px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--purple);
}
.check small {
  display: block;
  color: var(--ink-soft);
  font-size: 14px;
}

.notice {
  font-size: 14.5px;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple-light);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 4px 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 17px var(--font-body);
  border-radius: 10px;
  padding: 12px 22px;
  border: 1.5px solid var(--purple);
  cursor: pointer;
  text-decoration: none;
}
.btn.primary {
  background: var(--purple);
  color: #ffffff;
  width: 100%;
  box-shadow: 0 2px 0 var(--purple-deep);
}
.btn.primary:hover {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
}
.btn.ghost {
  background: #ffffff;
  color: var(--purple-deep);
}
.btn.ghost:hover {
  background: var(--purple-pale);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.msg {
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 15px;
}
.msg:empty {
  display: none;
}
.msg.error {
  background: var(--error-pale);
  color: var(--error);
}
.msg.ok {
  background: var(--ok-pale);
  color: var(--ok);
}

.links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 15px;
}
a {
  color: var(--purple);
  font-weight: 600;
}
a:hover {
  color: var(--purple-deep);
}
.foot {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* "Made by" line with the Bodhi School logo, under the card */
.maker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.maker img {
  display: block;
  width: auto;
  height: 46px;
}

[hidden] {
  display: none !important;
}

.done-panel {
  text-align: center;
}
.done-panel .big {
  font-size: 44px;
  line-height: 1;
  margin: 4px 0 12px;
  color: var(--purple);
}

/* Privacy notice and other long documents */
.legal-page {
  background: var(--paper);
}
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 80px;
  font-size: 16px;
}
.legal h1 {
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--navy);
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0;
  margin: 34px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--navy);
}
.legal li + li {
  margin-top: 4px;
}
.legal h3 {
  font-size: 18px;
  margin: 22px 0 6px;
  color: var(--navy);
}
.legal table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0 18px;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.legal th {
  background: var(--bg);
}

@media (max-width: 560px) {
  .auth-top {
    padding: 10px 16px;
  }
  .auth-brand {
    font-size: 22px;
  }
  .auth-mark {
    width: 36px;
    height: 36px;
  }
  .auth-main {
    margin-top: 20px;
  }
  .card {
    padding: 24px 18px;
  }
  .card h1 {
    font-size: 26px;
  }
  .auth-brand-sub {
    display: none;
  }
  /* Long documents on a phone: lists keep more of the narrow width for their text. */
  .legal {
    padding-top: 24px;
  }
  .legal h1 {
    font-size: 28px;
  }
  .legal h2 {
    font-size: 21px;
  }
  .legal ul,
  .legal ol {
    padding-left: 22px;
  }
}
.done-panel .field {
  text-align: left;
}
