/* Scout Apps sign-in. Follows the Scouts Design System used by the other Scout Apps:
   white page, soft grey cards, navy pill buttons, Nunito Sans. */
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-display: swap; src: url("/fonts/NunitoSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-display: swap; src: url("/fonts/NunitoSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 800 900; font-display: swap; src: url("/fonts/NunitoSans-Black.woff2") format("woff2"); }
:root {
  --sa-navy: #28265C;
  --sa-blue: #3D5C93;
  --sa-yellow: #FFC62E;
  --sa-lilac: #DCDDF0;
  --sa-text: #575756;
  --sa-page: #fff;
  --sa-panel: #F3F4F8;
  --sa-tonal: #ECEEF7;
  --sa-control-border: #7B8090;
  --sa-line: #D9DBE6;
  --sa-danger: #B3261E;
  --sa-success-text: #1E6B34;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.55 "Nunito Sans", Arial, sans-serif;
  color: var(--sa-text);
  background: var(--sa-page);
}

.top { background: var(--sa-navy); }
.top-inner { display: flex; align-items: center; gap: 16px; max-width: 808px; margin: 0 auto; padding: 14px 16px; }
.brand { display: inline-flex; align-items: center; gap: 16px; min-height: 52px; color: #fff; text-decoration: none; }
.brand img { display: block; width: 150px; height: auto; }
.brand span { padding-left: 16px; border-left: 1px solid rgb(255 255 255 / 30%); font-weight: 800; font-size: 1.0625rem; }
.top :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

main { flex: 1; width: 100%; max-width: 512px; margin: 0 auto; padding: 32px 16px 48px; }
main.wide { max-width: 808px; }
h1 { margin: 0 0 12px; font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--sa-navy); }
h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 800; line-height: 1.2; color: var(--sa-navy); }
p { margin: 0 0 12px; }
.lead { margin: 0 0 24px; }
.muted { font-size: 0.875rem; }
a { color: var(--sa-blue); font-weight: 700; }

/* Cards: soft grey panels, no outline, no shadow. */
.card, section { margin-top: 16px; padding: 24px; background: var(--sa-panel); border-radius: 24px; }
@media (min-width: 768px) { .card, section { padding: 32px; } }
.card > :last-child, section > :last-child { margin-bottom: 0; }

.stack { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.stack label:not(:first-child) { margin-top: 12px; }
.stack button { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.row input { flex: 1 1 220px; }
.inline { display: inline; }
label { font-weight: 700; color: var(--sa-navy); }
input, select {
  font: inherit;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--sa-control-border);
  border-radius: 12px;
  background: #fff;
  color: var(--sa-navy);
}
input[type="file"] { padding: 12px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%2328265C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5'/%3E%3C/svg%3E") right 16px center/14px 9px no-repeat;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sa-blue);
  outline-offset: 2px;
}
#code { font-size: 1.5rem; font-weight: 800; letter-spacing: 6px; text-align: center; }

/* Buttons: fully rounded. Navy for the main action, soft blue for the rest. */
button {
  font: inherit;
  font-weight: 800;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--sa-navy);
  color: #fff;
  cursor: pointer;
}
button:hover { background: #1C1B45; }
button:disabled { opacity: 0.6; cursor: progress; }
button.secondary { background: var(--sa-tonal); color: var(--sa-navy); }
.card button.secondary, section button.secondary { background: #fff; }
button.secondary:hover { background: var(--sa-lilac); }
button.link { background: none; color: var(--sa-blue); padding: 4px; min-height: 44px; text-decoration: underline; font-weight: 700; border-radius: 6px; }
button.danger { background: var(--sa-danger); color: #fff; }
button.link.danger { background: none; color: var(--sa-danger); }
#passkey { width: 100%; }
.or { text-align: center; margin: 16px 0; font-size: 0.875rem; }

.message { margin: 16px 0 0; font-weight: 700; }
.message:empty { display: none; }
.message.error { color: var(--sa-danger); }
.message.ok { color: var(--sa-success-text); }

.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { margin-bottom: 4px; }
.profile-head p { margin: 0; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; width: 40px; height: 40px; font-size: 15px; }
.avatar.large { width: 72px; height: 72px; font-size: 28px; }
.initials { display: inline-flex; align-items: center; justify-content: center; background: var(--sa-yellow); color: var(--sa-navy); font-weight: 800; }

ul.list, ul.apps { list-style: none; padding: 0; margin: 8px 0 16px; }
ul.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sa-line); flex-wrap: wrap; }
ul.apps li { padding: 6px 0; }
ul.apps a { display: inline-flex; align-items: center; min-height: 44px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 8px 0; }
th { color: var(--sa-navy); }
th, td { text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--sa-line); vertical-align: middle; }
td.right { text-align: right; }
dl.secret dt { font-weight: 700; color: var(--sa-navy); }
dl.secret dd { margin: 0 0 12px; }
dl.secret code { word-break: break-all; background: #fff; padding: 4px 8px; border-radius: 6px; display: inline-block; }
details summary { cursor: pointer; font-weight: 700; color: var(--sa-danger); min-height: 44px; display: flex; align-items: center; }
details[open] summary { margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.foot { background: var(--sa-navy); color: var(--sa-lilac); font-size: 0.875rem; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; max-width: 808px; margin: 0 auto; padding: 16px; }
.foot p { margin: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
.foot :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* The hidden attribute must win over layout rules such as display: flex. */
[hidden] { display: none !important; }
