:root {
  --cub-blue: #003F87;
  --cub-blue-dark: #002B5C;
  --cub-yellow: #FCD116;
  --scout-red: #CE1126;
  --ink: #14161A;
  --pewter: #5A6473;
  --mist: #F4F6FA;
  --white: #FFFFFF;
  --radius: 0.5rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--mist);
  line-height: 1.5;
}

h1, h2, h3 { color: var(--cub-blue); line-height: 1.2; }
a { color: var(--cub-blue); }

/* Header & footer */
.site-header { background: var(--cub-blue); border-bottom: 4px solid var(--cub-yellow); }
.site-header__inner {
  max-width: 60rem; margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.site-header__brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.15rem;
}
.site-header__mark {
  background: var(--cub-yellow); color: var(--cub-blue);
  border-radius: 50%; width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 800;
}
.site-header__nav { display: flex; align-items: center; gap: 1rem; }
.site-header__nav a { color: var(--white); text-decoration: none; font-weight: 600; }
.site-header__nav a:hover { color: var(--cub-yellow); }

.site-main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.site-footer {
  background: var(--cub-blue-dark); color: var(--mist);
  text-align: center; padding: 1rem; font-size: 0.9rem;
}
.site-footer a { color: var(--cub-yellow); }

/* Flash messages */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); font-weight: 600; }
.flash--notice { background: #E5F2E5; color: #1E5E1E; border: 1px solid #1E5E1E; }
.flash--alert { background: #FBE5E8; color: var(--scout-red); border: 1px solid var(--scout-red); }

/* Cards & sections */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.section-title {
  background: var(--cub-blue); color: var(--white);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  font-size: 1.1rem; margin: 0 0 1rem;
}

/* Forms */
label { font-weight: 600; display: block; margin-bottom: 0.25rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 0.5rem 0.65rem; font-size: 1rem;
  border: 1px solid var(--pewter); border-radius: var(--radius); background: var(--white);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--cub-yellow); outline-offset: 1px; border-color: var(--cub-blue);
}
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.hint { color: var(--pewter); font-size: 0.85rem; font-weight: 400; }
.field-label { font-weight: 600; display: block; margin-bottom: 0.25rem; }

.choice { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; font-weight: 400; }
.choice input { width: auto; }
.choice--with-fill { flex-wrap: wrap; }
.choice--with-fill input[type="text"] { flex: 1; min-width: 10rem; }

fieldset { border: 1px solid var(--pewter); border-radius: var(--radius); margin: 0 0 1rem; padding: 0.75rem 1rem; }
legend { font-weight: 700; color: var(--cub-blue); padding: 0 0.35rem; }

.errors {
  background: #FBE5E8; border: 1px solid var(--scout-red); border-radius: var(--radius);
  color: var(--scout-red); padding: 0.75rem 1rem 0.75rem 2rem; margin-bottom: 1rem;
}

/* Buttons */
.button, button[type="submit"], input[type="submit"] {
  background: var(--cub-blue); color: var(--white);
  font-size: 1rem; font-weight: 700; text-decoration: none;
  border: none; border-radius: var(--radius); padding: 0.65rem 1.25rem; cursor: pointer;
  display: inline-block;
}
.button:hover, button[type="submit"]:hover { background: var(--cub-blue-dark); }
.button--secondary { background: var(--white); color: var(--cub-blue); border: 2px solid var(--cub-blue); }
.button--secondary:hover { background: var(--mist); }
.button--danger { background: none; border: none; color: var(--scout-red); font-weight: 600; cursor: pointer; padding: 0; }
.link-button { background: none; border: none; color: var(--white); font-weight: 600; cursor: pointer; font-size: 1rem; padding: 0; }
.link-button:hover { color: var(--cub-yellow); }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
th { background: var(--cub-blue); color: var(--white); text-align: left; padding: 0.5rem 0.75rem; }
td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--mist); }
tr:hover td { background: var(--mist); }

/* Detail lists */
dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0; }
dt { font-weight: 600; color: var(--pewter); }
dd { margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0; columns: 2; }
.checklist li { margin-bottom: 0.25rem; break-inside: avoid; }
.checklist .done { color: #1E5E1E; }
.checklist .pending { color: var(--pewter); }

.actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.actions--top { margin: 0 0 1rem; }

.auth-card { max-width: 26rem; margin: 3rem auto; }
