:root {
  color-scheme: light;
  --bg: #f4f7f7;
  --panel: #ffffff;
  --text: #151d29;
  --muted: #64748b;
  --line: #d9e4e6;
  --line-strong: #b7d7d4;
  --accent: #0f7f73;
  --accent-strong: #0b635a;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 30px;
  font-weight: 950;
}

h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

p {
  margin: 5px 0 0;
  color: var(--muted);
}

.card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.section-title {
  margin-bottom: 9px;
  font-size: 16px;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: #fbfcfd;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.password-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.password-summary p {
  margin-top: 2px;
}

button.secondary {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 850;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(15, 127, 115, .16);
  border-color: var(--accent);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 900;
}

.segmented input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.region {
  display: grid;
  gap: 2px;
  min-height: 72px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 6px;
  background: #f8fcfb;
  color: var(--text);
  font: inherit;
  font-weight: 900;
}

.region small {
  color: var(--muted);
  font-weight: 800;
}

.region:active {
  transform: translateY(1px);
}

.region:disabled {
  cursor: wait;
  opacity: .62;
}

.status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
}

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

.note p {
  font-size: 13px;
}

@media (max-width: 520px) {
  .region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
