.zf {
  --ink: #241d31;
  --muted: #584c64;
  --accent: #632d56;
  --line: #ccbaca;
  --paper: #faf6fa;
  --panel: #efe5ee;
  max-width: 66rem;
  padding: 0 clamp(.75rem, 3vw, 1.5rem) 3rem;
  margin: 0 auto;
  color: var(--ink);
}
.zf *, .zf *::before, .zf *::after { box-sizing: border-box; }
.zf [hidden] { display: none !important; }
.zf :is(h1,h2,h3,p) { margin: 0; }
.zf p { line-height: 1.55; }
.zf a { color: var(--accent); text-underline-offset: .18em; }
.zf :is(a,input,select,button,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.zf-intro { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 1rem; margin-bottom: 1.5rem; }
.zf-intro h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1.1; letter-spacing: -.04em; margin-bottom: .5rem; }
.zf-intro p { max-width: 54ch; color: var(--muted); font-size: 1.1rem; }
.zf label { display: grid; gap: .3rem; min-width: 0; font-weight: 650; }
.zf :is(input, select, button) { font: inherit; color: var(--ink); background: #fff; border: 1px solid #9a7b98; border-radius: .55rem; min-height: 44px; padding: .5rem .65rem; min-width: 0; max-width: 100%; }
.zf input[type="checkbox"] { min-height: auto; margin: 0; width: 1.125rem; height: 1.125rem; accent-color: var(--accent); }
.zf-form { border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); display: grid; gap: .9rem; padding: clamp(.8rem, 3vw, 1.6rem); }
.zf-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .6rem; }
.zf form > label { max-width: 22rem; }
.zf button { justify-self: start; font-weight: 700; color: #fff; background: var(--accent); cursor: pointer; }
.zf button:disabled { opacity: .6; cursor: wait; }
.zf-message:empty { display: none; }
.zf-message { color: #8a2042; font-weight: 650; }
.zf-privacy, .zf-count, .zf-disclaimer { font-size: .93rem; color: var(--muted); }
.zf-result { margin-top: 1.5rem; overflow-wrap: anywhere; }
.zf-result-head { padding: clamp(1rem, 4vw, 1.7rem); border-radius: .95rem; background: linear-gradient(120deg,#352442,#5f2a56); color: #fff; }
.zf-result-head h2 { font-size: clamp(1.45rem,4vw,2.3rem); line-height: 1.18; }
.zf-summary { display: grid; gap: .35rem; margin-top: .55rem; }
.zf-summary .zf-birth-receipt { color: #ede3ef; font-size: .84rem; }
.zf-summary .zf-warning { border-inline-start: 3px solid #ffe4a6; padding-inline-start: .55rem; margin-top: .25rem; }
.zf-range { font-weight: 700; }
.zf-controls { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.zf-controls .zf-toggle { display: flex; gap: .5rem; align-items: center; min-height: 44px; }
.zf-overlay-note { background: var(--panel); border-radius: .55rem; padding: .6rem .8rem; margin-top: .65rem !important; }
.zf-count { margin: .95rem 0 .35rem !important; }
.zf-events { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.zf-event { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr); gap: .35rem 1rem; padding: .8rem .3rem .85rem; border-bottom: 1px solid var(--line); }
.zf-event-date { display: grid; align-content: start; gap: .2rem; }
.zf-event-date time { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.zf-event-kind { color: var(--muted); font-size: .87rem; }
.zf-event-body h3 { line-height: 1.35; font-size: 1.12rem; }
.zf-event details { margin-top: .3rem; }
.zf-event details p, .zf-event details a { margin-top: .35rem; }
.zf-event[data-kind="bio"] { background: var(--paper); }
.zf summary { cursor: pointer; color: var(--accent); font-weight: 650; min-height: 28px; }
.zf-method { margin-block: 1.3rem .65rem; }
.zf-method p { margin-top: .45rem; }
@media(max-width: 750px) { .zf-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 510px) {
  .zf-intro { grid-template-columns: 1fr; gap: .6rem; }
  .zf-language { justify-self: start; }
  .zf-fields, .zf-event { grid-template-columns: 1fr; }
  .zf-event-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .65rem; }
}
