:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2730;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 680px);
  background: #ffffff;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(32, 45, 56, 0.12);
  overflow: hidden;
}

.panel > *:not(.header-image) {
  margin-left: clamp(24px, 4vw, 40px);
  margin-right: clamp(24px, 4vw, 40px);
}

.panel > *:last-child {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.header-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  object-position: center 42%;
}

.branch-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.branch-nav a,
.button-link {
  display: inline-grid;
  min-height: 40px;
  align-items: center;
  border-radius: 6px;
  padding: 0 13px;
  border: 1px solid #b8c3cc;
  color: #224d42;
  background: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.branch-nav a[aria-current="page"],
.button-link {
  border-color: #2f6f5f;
  background: #edf5f2;
}

.mast {
  margin-top: clamp(24px, 4vw, 38px);
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #426b5f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.copy {
  max-width: 54ch;
  margin: 14px 0 0;
  color: #586775;
  font-size: 1rem;
  line-height: 1.55;
}

.about-list {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.about-list article {
  border-top: 1px solid #dce3e8;
  padding-top: 16px;
}

.about-list h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.about-list p {
  margin: 0;
  color: #586775;
  line-height: 1.55;
}

.story-context {
  border: 1px solid #d7e3df;
  border-radius: 8px;
  background: #f6faf8;
  padding: 15px;
}

.story-context h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.story-context p {
  margin: 8px 0 0;
  color: #586775;
  line-height: 1.5;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phone-start {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #c8d8d2;
  border-radius: 8px;
  background: #f7fbf9;
}

.phone-start h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.phone-start p {
  margin: 0;
  color: #586775;
  line-height: 1.5;
}

.home-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.home-summary article {
  border-top: 3px solid #2f6f5f;
  padding-top: 12px;
}

.home-summary h2 {
  margin: 0 0 7px;
  font-size: 1.05rem;
}

.home-summary p {
  margin: 0;
  color: #586775;
  line-height: 1.5;
}

.floating-alert {
  margin-bottom: 18px;
}

.form {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #2c3843;
  font-size: 0.92rem;
  font-weight: 700;
}

label em {
  color: #77848f;
  font-style: normal;
  font-weight: 600;
}

input,
select {
  min-height: 48px;
  width: 100%;
  border: 1px solid #b8c3cc;
  border-radius: 6px;
  background: #ffffff;
  color: #17212a;
  font: inherit;
  font-weight: 500;
  padding: 11px 13px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: #2c3843;
  font-size: 0.92rem;
  font-weight: 700;
}

.field-label em {
  color: #77848f;
  font-style: normal;
  font-weight: 600;
}

.image-picker {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid #cbd4dc;
  border-radius: 8px;
  background: #f8fafb;
  padding: 14px;
}

.image-preview {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 8px;
  background: #1e342f;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 900;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-controls {
  display: grid;
  gap: 10px;
}

input[type="file"] {
  padding: 10px;
  background: #ffffff;
}

input[readonly] {
  background: #eef2f4;
  color: #586775;
}

input::placeholder {
  color: #9aa6af;
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid rgba(47, 111, 95, 0.24);
  outline-offset: 2px;
  border-color: #2f6f5f;
}

.check {
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 600;
  line-height: 1.4;
}

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

button {
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: #2f6f5f;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.alert {
  border-radius: 6px;
  padding: 12px 14px;
  background: #edf5f2;
  border: 1px solid #b9d7cd;
  color: #224d42;
  font-weight: 700;
}

.alert.error {
  background: #fff0ef;
  border-color: #e6b9b3;
  color: #8c2e24;
}

.alert a,
.alert button {
  display: inline-grid;
  min-height: 38px;
  align-items: center;
  margin-top: 10px;
  margin-right: 8px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.92rem;
  text-decoration: none;
}

.alert a {
  background: #ffffff;
  border: 1px solid #95b9ae;
  color: #224d42;
}

.profile-card {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.profile-card img {
  width: 132px;
  height: 132px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-card h2 {
  margin: 0;
  font-size: 1.65rem;
}

.profile-card p {
  margin: 0;
  color: #586775;
  font-weight: 800;
}

.reset-instruction {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 16px;
  border: 1px solid #b9d7cd;
  border-radius: 8px;
  background: #edf5f2;
  color: #224d42;
  font-weight: 700;
  line-height: 1.45;
}

.reset-instruction strong {
  display: inline-grid;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #95b9ae;
  color: #173a32;
  font-size: 1.15rem;
}

@media (max-width: 640px) {
  .shell {
    padding: 14px;
    place-items: start center;
  }

  .panel {
    width: 100%;
  }

  .panel > *:not(.header-image) {
    margin-left: 22px;
    margin-right: 22px;
  }

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

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

  .image-picker {
    grid-template-columns: 1fr;
  }
}
