:root {
  color-scheme: light;
  --ink: #172e27;
  --muted: #4d6259;
  --line: #c9d7ce;
  --green: #185e4d;
  --paper: #f4f6f1;
  --surface: #fff;
  font: 16px/1.55 system-ui, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
main { width: min(100% - 48px, 980px); margin: auto; padding: 38px 0 24px; }
header { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.brand { font-size: .83rem; font-weight: 700; color: var(--green); }
h1 { font-size: clamp(2.47rem, 5vw, 4.15rem); line-height: 1; letter-spacing: -.055em; margin: 6px 0 10px; }
h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
p { margin: 0 0 12px; color: var(--muted); }
header p { font-size: 1.05rem; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.person { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.person[data-person="b"] h2 { color: #7b3d36; }
.switcher { display: flex; gap: 6px; margin: 15px 0; background: var(--paper); padding: 4px; border-radius: 10px; }
.switcher button { flex: 1; color: var(--muted); background: transparent; padding: 7px 6px; font-size: .87rem; }
.switcher button[aria-pressed=true] { background: white; color: var(--green); box-shadow: 0 1px 4px #1d3b2a25; }
.birth-fields { display: grid; gap: 11px; }
.field-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 9px; }
label { display: grid; gap: 4px; min-width: 0; font-size: .89rem; font-weight: 650; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 43px; border: 1px solid #a9bdb0; border-radius: 8px;
  padding: 8px 10px; font: inherit; font-size: 1rem; font-weight: 400; background: white; color: var(--ink);
}
input[type=date], input[type=time] { padding-inline-end: 9px; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-inline-end: 36px; }
.select-wrap::after { content: ""; position: absolute; inset-inline-end: 13px; top: 46%; width: 8px; height: 8px;
  border: solid var(--green); border-width: 0 2px 2px 0; transform: translateY(-35%) rotate(45deg); pointer-events: none; }
textarea { resize: vertical; }
button, .primary, .secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 40px;
  padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: .91rem;
  font-weight: 680; background: var(--green); color: white; text-decoration: none; cursor: pointer; }
button:disabled { opacity: .68; cursor: wait; }
.secondary { color: var(--green); background: transparent; border-color: #9cb9aa; }
:focus-visible { outline: 2px solid #22715b; outline-offset: 3px; }
.options { margin-top: 14px; border-top: 1px solid var(--line); padding: 12px 0; }
.options label:not(.choice) { margin: 12px 0; max-width: 680px; }
.choice { display: flex; align-items: center; gap: 8px; }
.choice input { width: 17px; min-height: auto; height: 17px; accent-color: var(--green); }
.country, small, .time-hint, footer { font-size: .82rem; color: var(--muted); }
.country label { max-width: 160px; padding-top: 6px; }
summary { cursor: pointer; color: var(--green); font-weight: 650; }
.time-hint { margin: 0; }
.field-error { color: #8c2f28; background: #fff4f0; padding: 9px 12px; border-radius: 8px; margin-top: 12px; }
.candidates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.actions p { margin: 0; }
.result { margin-top: 20px; border: 1px solid #9cb9aa; border-radius: 16px; background: #e9f3ec; padding: 19px; }
.result p { margin-top: 8px; }
.action-links { display: flex; flex-wrap: wrap; gap: 7px; }
footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 620px) {
  main { width: calc(100% - 28px); padding-top: 23px; }
  .people { grid-template-columns: 1fr; gap: 11px; }
  .person { padding: 15px; }
  .actions button { width: 100%; }
}
