:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #17211b;
  background: #f3f6f4;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f3f6f4;
}

.site-header,
footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 72px;
  border-bottom: 1px solid #d9e3dc;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #15231a;
  font-size: 20px;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  display: block;
  object-fit: contain;
}

.portal-label {
  color: #52635a;
  font-size: 14px;
  font-weight: 650;
}

.account-shell {
  width: min(560px, calc(100% - 32px));
  margin: auto;
  padding: 48px 0;
}

.account-panel {
  padding: 36px;
  background: #ffffff;
  border: 1px solid #d5dfd8;
  border-top: 4px solid #16872f;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(25, 48, 33, 0.1);
}

.compact-panel {
  max-width: 500px;
  margin: 0 auto;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #126f29;
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #122019;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  margin: 16px 0 28px;
  color: #526158;
  font-size: 17px;
  line-height: 1.55;
}

.form-stack {
  display: grid;
  gap: 10px;
}

label {
  margin-top: 6px;
  color: #24362b;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #aebeb4;
  border-radius: 6px;
  background: #ffffff;
  color: #17211b;
  font: inherit;
}

input:focus {
  border-color: #16872f;
  outline: 3px solid rgba(22, 135, 47, 0.16);
}

.button {
  min-height: 48px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: #16872f;
  color: #ffffff;
}

.button.primary:hover {
  background: #106c25;
}

.button.secondary {
  border-color: #aebeb4;
  background: #ffffff;
  color: #203329;
}

.full-width {
  width: 100%;
  margin-top: 18px;
}

.alert,
.notice {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid;
  background: #f4f7f5;
  line-height: 1.45;
}

.alert.error {
  border-color: #c33b32;
  background: #fff3f2;
  color: #7d241e;
}

.notice {
  border-color: #d5a51d;
  background: #fff9e8;
  color: #5d4a15;
}

.field-error {
  min-height: 18px;
  color: #a52b24;
  font-size: 13px;
}

.account-context,
.invitation-summary {
  margin: 8px 0 16px;
  padding: 14px 16px;
  border: 1px solid #d8e1db;
  border-radius: 6px;
  background: #f6f8f7;
}

.account-context {
  display: grid;
  gap: 4px;
}

.account-context span,
.invitation-summary span {
  color: #66756c;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

.account-context strong {
  overflow-wrap: anywhere;
}

.invitation-summary {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: 14px;
}

.invitation-summary div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.invitation-summary strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 24px 0 18px;
  padding: 3px;
  border: 1px solid #cbd7cf;
  border-radius: 7px;
  background: #edf2ef;
}

.mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4b5b52;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mode-tab.active {
  background: #ffffff;
  color: #126f29;
  box-shadow: 0 1px 4px rgba(19, 49, 29, 0.12);
}

.hidden {
  display: none;
}

.text-link {
  margin-top: 6px;
  color: #126f29;
  font-weight: 650;
  text-align: center;
}

.standalone-link {
  display: block;
  margin: 20px 0 4px;
}

.status-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
}

.status-icon.success {
  background: #dff4e4;
  color: #126f29;
}

footer {
  min-height: 68px;
  border-top: 1px solid #d9e3dc;
  color: #65736b;
  font-size: 13px;
}

footer a {
  color: #2f4939;
  font-weight: 650;
}

@media (max-width: 620px) {
  .site-header,
  footer {
    width: min(1120px, calc(100% - 28px));
  }

  .account-shell {
    width: min(560px, calc(100% - 20px));
    padding: 20px 0 32px;
  }

  .account-panel {
    padding: 26px 20px;
  }

  .invitation-summary {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .mode-tab,
  input {
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }
}
