:root {
  color-scheme: light;
  --ink: #1f2f35;
  --muted: #647177;
  --line: #d7e0e1;
  --paper: #ffffff;
  --page: #f1f5f4;
  --brand: #176f70;
  --brand-dark: #10585a;
  --warm: #bd8b36;
  --danger: #a23f3f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.portal-shell {
  width: min(760px, calc(100% - 32px));
  margin: 32px auto;
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.portal-header > div { min-width: 0; }

.portal-header img {
  width: 190px;
  height: auto;
  max-height: 90px;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
}

.portal-header h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px;
  font-weight: 600;
}

.portal-header p,
.portal-intro,
.portal-footer,
.field-help {
  color: var(--muted);
}

.portal-header p { margin: 3px 0 0; }

.portal-panel {
  margin-top: 22px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(31, 47, 53, .06);
}

.portal-panel h2 {
  margin: 0 0 8px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
}

.portal-languages section + section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.portal-languages p {
  margin: 8px 0 0;
}

.portal-intro { margin: 0 0 22px; }

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #aebbbc;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(23, 111, 112, .15);
}

.confirmation {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 22px;
}

.confirmation input {
  width: 20px;
  min-height: 20px;
  margin: 2px 0 0;
}

.confirmation label {
  margin: 0;
  font-weight: 400;
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 22px;
  padding: 10px 22px;
  border: 0;
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.portal-button:hover { background: var(--brand-dark); }

.portal-alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 4px solid var(--danger);
  background: #fff0f0;
  color: #762c2c;
}

.portal-success {
  border-left-color: var(--brand);
  background: #edf8f5;
  color: #174e48;
}

.portal-footer {
  margin: 22px 0 0;
  font-size: 13px;
  text-align: center;
}

.portal-footer p { margin: 8px 0 0; }

.portal-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}

.portal-contact a {
  color: var(--brand-dark);
  text-decoration: underline;
}

.portal-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 620px) {
  .portal-shell {
    width: calc(100% - 20px);
    max-width: 760px;
    margin: 16px auto;
  }

  .portal-header {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }

  .portal-header img {
    width: 120px;
    max-width: 100%;
    height: auto;
    max-height: 70px;
  }

  .portal-header h1 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }
  .portal-panel { padding: 20px 16px; }
  .portal-panel,
  .portal-languages,
  .portal-languages section {
    min-width: 0;
    max-width: 100%;
  }
  .portal-languages p { overflow-wrap: anywhere; }
  .portal-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .portal-button { width: 100%; }
  .portal-contact { display: grid; gap: 4px; }
}
