* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #F7F8F5;
  color: #171B1A;
  font-family: Manrope, system-ui, sans-serif;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 18px;
  background: #171B1A;
}
.bar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}
.bar img { width: auto; height: 28px; max-width: min(168px, 58vw); display: block; }
.bar .dd-wordmark {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 18px;
}
main {
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
.card {
  background: #fff;
  border: 1px solid #DCE3D8;
  border-radius: 16px;
  padding: 22px 20px 20px;
}
h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #171B1A;
}
p { margin: 0 0 16px; line-height: 1.5; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
}
input {
  font: inherit;
  /* 16px or more stops iOS Safari zooming into the field (labels are 14px). */
  font-size: 16px;
  font-weight: 500;
  color: #171B1A;
  background: #fff;
  border: 1px solid #768479;
  border-radius: 12px;
  padding: 12px;
}
button, .linkish {
  font: inherit;
  font-weight: 700;
  background: #A5CF46;
  color: #171B1A;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}
button.secondary, .linkish {
  background: #fff;
  color: #171B1A;
  border: 1px solid #768479;
}
.bar button.secondary,
.bar .logout {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  text-decoration: none;
}
.bar button.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}
button:disabled { cursor: default; opacity: 0.6; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #465E21;
  outline-offset: 2px;
}
.bar button:focus-visible, .bar a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button.textlink {
  background: transparent;
  color: #171B1A;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
}
.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #DCE3D8;
  background: #F7F8F5;
  color: #171B1A;
  font-weight: 700;
}
.alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #a3271f;
  background: #fff;
  color: #171B1A;
  font-weight: 700;
}
.secret, .codes {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
  word-break: break-all;
}
label.trust {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 14px;
  font-weight: 700;
}
label.trust .row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
label.trust input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #465E21;
  flex: 0 0 auto;
}
label.trust .hint {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  color: #3E4A3A;
}
.qr svg { width: 220px; height: 220px; }
.qr svg rect { fill: #171B1A; }
[hidden] { display: none !important; }
/* Space "Use another way" below the passkey and code buttons on the Confirm it's you card. */
button.textlink[data-another-way]:not([hidden]) {
  display: inline-block;
  margin-top: 20px;
}
/* Email and text options sit in one row with a clear gap; the hint sits below with space. */
form .actions { margin-top: 18px; }
p.hint { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: #4A4F4D; }
p.switch { margin: 18px 0 0; }
/* "New to DearDoctor?" / "Already have an account?" under the email form. */
.modeswitch {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #DCE3D8;
}
.modeswitch p { margin: 0 0 12px; font-weight: 700; }
a.cta {
  display: inline-block;
  font-weight: 700;
  background: #A5CF46;
  color: #171B1A;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
}
h1[tabindex="-1"]:focus { outline: none; }
