@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #003866;
  --muted: #4b6b86;
  --accent: #003866;
  --accent-hover: #002a4c;
  --danger: #cf250e;
  --border: rgba(0, 56, 102, 0.18);
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

/* Ensure [hidden] always wins over component display rules (e.g. .profile { display:flex }). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: radial-gradient(ellipse at top, #ffffff 0%, var(--bg) 65%);
  color: var(--text);
  padding: 1.25rem 1rem 2.5rem;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.shell {
  width: min(1080px, 100%);
  margin-top: 0.25rem;
  display: grid;
  gap: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tabpanel[hidden] {
  display: none !important;
}

.brand {
  margin-bottom: 0.25rem;
  padding: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: nowrap;
}

.brand-logo {
  height: 40px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-divider {
  width: 1px;
  height: 44px;
  background: rgba(0, 56, 102, 0.2);
}

.brand-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-title {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 560px) {
  .brand-row {
    flex-wrap: wrap;
    gap: 0.6rem 0.9rem;
  }
  .brand-divider {
    display: none;
  }
  .brand-text {
    min-width: 0;
  }
}

.card {
  width: 100%;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
}

.aboutGrid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1.5rem;
  align-items: center;
}

.aboutArt {
  display: flex;
  justify-content: flex-end;
  align-self: start;
}

.aboutImg {
  width: 100%;
  max-width: 340px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  margin-right: -0.25rem;
}

@media (max-width: 640px) {
  .aboutGrid {
    grid-template-columns: 1fr;
  }
  .aboutArt {
    justify-content: flex-start;
  }
  .aboutImg {
    max-width: 420px;
  }
}

.hero .actions {
  margin-top: 0.9rem;
}

.h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.h4 {
  margin: 1.1rem 0 0.55rem;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.status {
  min-height: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.status.error {
  color: var(--danger);
}

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

.auth #actions {
  margin-bottom: 1rem;
}

button {
  cursor: pointer;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ctaButton {
  border-radius: 999px;
}

/* Tabs are buttons, so restyle them after the global button rules. */
button.tab {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-weight: 800;
}

button.tab:hover {
  background: rgba(0, 56, 102, 0.06);
}

button.tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button#signOut {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

button#signOut:hover {
  color: var(--text);
  border-color: rgba(0, 56, 102, 0.35);
  background: rgba(0, 56, 102, 0.04);
}

.account {
  margin-top: 1.25rem;
  padding: 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  background: rgba(0, 56, 102, 0.06);
  border-radius: 8px;
  overflow: auto;
  max-height: 240px;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.signupBanner {
  margin-top: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 56, 102, 0.22);
  background: rgba(0, 56, 102, 0.06);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
}

.signupBanner.is-positive {
  border-color: rgba(34, 139, 34, 0.35);
  background: rgba(34, 139, 34, 0.08);
}

.signupBanner.is-muted {
  font-weight: 700;
  color: var(--muted);
}

.signupSaveRow {
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.profile > .h3:first-child {
  margin-top: 0;
}

.profile > .h3 {
  margin: 0;
}

.profile > fieldset {
  margin: 0;
}

.profile-section > .h3 {
  margin: 0 0 0.65rem;
}

.profile-fieldset {
  margin: 0;
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  box-sizing: border-box;
  min-width: 0;
}

.profile-fieldset > legend {
  padding: 0 0.35rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.profile-fieldset .mutedHelp {
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
}

.profile-fieldset--nested {
  padding: 0.95rem 1rem 1rem;
  border-style: dashed;
  border-color: rgba(0, 56, 102, 0.22);
  background: rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
  min-width: 0;
}

.profile-fieldset--nested > legend {
  font-size: 0.98rem;
}

.signupForm > .profile-fieldset {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
}

.signupForm .profile-fieldset--nested {
  padding: 1.05rem 1.1rem 1.15rem;
}

.signupForm .split2 {
  gap: 1.45rem 1.85rem;
  row-gap: 1.45rem;
}

.signupForm .split3 {
  gap: 1.45rem 1.85rem;
  row-gap: 1.45rem;
}

.signupForm .split2 + .split2,
.signupForm .split3 + .split2 {
  margin-top: 0.85rem;
}

.signupForm .split3 + .h4,
.signupForm .split2 + .h4 {
  margin-top: 1.35rem;
}

/* Enrollment: toggle switches (checkbox + role="switch") */
.signupForm .enrollmentSwitches.split2 {
  align-items: flex-start;
}

.switchRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  min-width: 0;
  margin: 0;
}

.switchRow-copy {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.switchRow-title {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
}

.switchRow-sub {
  display: block;
  margin-top: 0.28rem;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
}

.switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 52px;
  height: 30px;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 56, 102, 0.22);
  border-radius: 999px;
  transition: background 0.2s ease;
  pointer-events: none;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input[type="checkbox"]:checked + .switch-slider {
  background: var(--accent);
}

.switch input[type="checkbox"]:checked + .switch-slider::before {
  transform: translateX(22px);
}

.switch input[type="checkbox"]:focus-visible + .switch-slider {
  box-shadow: 0 0 0 3px rgba(0, 56, 102, 0.35);
}

.enrollmentReminderBlock {
  min-width: 0;
}

.enrollmentReminderHelp {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.signupForm .actions {
  margin-top: 1rem;
  gap: 0.95rem;
}

.signupForm .profile-fieldset--nested .actions:first-of-type {
  margin-top: 1.1rem;
}

.signupForm .mutedHelp {
  margin-bottom: 0.55rem;
}

.formGrid {
  display: grid;
  gap: 1.25rem;
  margin-top: 0;
}

.signupForm .h3 {
  margin: 0 0 0.65rem;
}

.fieldRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.fieldRow label {
  font-weight: 800;
  font-size: 0.9rem;
}

.fieldRow input,
.fieldRow select {
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  min-width: 0;
}

.fieldRow input[readonly] {
  background: rgba(0, 56, 102, 0.04);
  color: var(--muted);
}

.mutedHelp {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.15rem 0 0;
}

.pillList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.pillList li {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 56, 102, 0.08);
  border: 1px solid rgba(0, 56, 102, 0.16);
  font-size: 0.85rem;
  font-weight: 700;
}

.pillRow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 56, 102, 0.08);
  border: 1px solid rgba(0, 56, 102, 0.16);
  font-size: 0.85rem;
  font-weight: 700;
}

.pillRemove {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(0, 56, 102, 0.28);
  color: var(--muted);
}

.pillRemove:hover {
  background: rgba(0, 56, 102, 0.06);
  border-color: rgba(0, 56, 102, 0.45);
  color: var(--text);
}

.split2 {
  display: grid;
  gap: 1.1rem 1.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.signupForm .split2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split3 {
  display: grid;
  gap: 1.1rem 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.signupForm .split3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signupForm .fieldRow {
  min-width: 0;
}

@media (max-width: 720px) {
  .split2 {
    grid-template-columns: 1fr;
  }
  .split3 {
    grid-template-columns: 1fr;
  }
}

.faq {
  display: grid;
  gap: 0.6rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.7);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-item p {
  margin: 0.6rem 0 0;
}

