:root {
  --brand: #17798d;        /* tyrkysová z webu Poloviny nebe */
  --brand-dark: #0f5a69;
  --sky: #6f9fe6;          /* modrá z loga */
  --sky-soft: #eaf2fd;
  --ink: #17202e;
  --muted: #4a5568;
  --line: #c7d0dc;
  --bg: #f3f7fb;
  --card: #ffffff;
  --error: #b42318;
  --error-soft: #fdecea;
  --focus: #ffbf47;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 16px; top: 16px; }

.site-header { background: linear-gradient(120deg, #cfe3f6 0%, #b9dde8 100%); border-bottom: 3px solid var(--sky); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand img { display: block; height: auto; width: 148px; }
.tagline { margin: 0; color: #2f5fa8; font-style: italic; font-size: 0.95rem; }

main { padding-top: 28px; padding-bottom: 32px; outline: none; }
.card { background: var(--card); border-radius: var(--radius); padding: 28px 32px; box-shadow: 0 1px 2px rgba(23,32,46,.06), 0 6px 24px rgba(23,32,46,.06); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 14px; color: var(--brand-dark); }
.lead { font-size: 1.02rem; margin: 0 0 12px; }
.note { color: var(--muted); font-size: 0.92rem; margin: 18px 0 8px; }
.req { color: var(--error); font-weight: 600; font-size: 0.85em; white-space: nowrap; }

.section { border: 0; margin: 28px 0 0; padding: 22px 0 0; border-top: 2px solid var(--sky-soft); min-width: 0; }
.section > legend { font-size: 1.15rem; font-weight: 700; color: var(--brand-dark); padding: 0; display: flex; gap: 10px; align-items: baseline; float: left; width: 100%; margin-bottom: 12px; }
.section > legend + * { clear: both; }
.num { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 6px; border-radius: 999px; background: var(--sky-soft); color: var(--brand-dark); font-size: 0.95rem; flex-shrink: 0; }
.section-desc { color: var(--muted); margin: 0 0 12px; clear: both; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; clear: both; }
.field { grid-column: 1 / -1; min-width: 0; }
.field.half { grid-column: span 1; }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .card { padding: 22px 18px; }
  h1 { font-size: 1.35rem; }
}

label, .choice legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: 1rem; color: var(--ink); padding: 0; }
.field.half { display: flex; flex-direction: column; }
.field.half > input, .field.half > select, .field.half > textarea { margin-top: auto; }
.help { margin: -2px 0 8px; color: var(--muted); font-size: 0.9rem; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 48px;
}
textarea { resize: vertical; min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }

.choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.options { display: grid; gap: 8px; }
.options.inline { grid-template-columns: repeat(auto-fit, minmax(96px, max-content)); }
.option { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 0; padding: 10px 14px; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.option:hover { border-color: var(--brand); }
.option input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.option:has(input:checked) { border-color: var(--brand); background: #eef8fa; }
.option.consent { border-color: var(--sky); background: var(--sky-soft); font-weight: 600; }

.consent-text { font-size: 0.92rem; color: var(--muted); background: #f7f9fc; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.consent-text p { margin: 0 0 8px; }
.consent-text p:last-child { margin-bottom: 0; }

.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.has-error .option { border-color: #e7a59f; }
.error-msg { color: var(--error); font-weight: 600; margin: 0 0 8px; }
.alert { border: 3px solid var(--error); background: var(--error-soft); border-radius: 10px; padding: 14px 18px; margin: 18px 0; outline: none; }
.alert h2 { margin: 0 0 6px; font-size: 1.1rem; color: var(--error); }
.alert p { margin: 0 0 6px; }
.alert ul { margin: 0; padding-left: 20px; }
.alert a { color: var(--error); font-weight: 600; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.submit-row { margin-top: 32px; padding-top: 22px; border-top: 2px solid var(--sky-soft); }
.button { display: inline-block; font: inherit; font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--brand); border: 0; border-radius: 999px; padding: 14px 34px; cursor: pointer; text-decoration: none; min-height: 52px; }
.button:hover { background: var(--brand-dark); }
.button[disabled] { opacity: .7; cursor: progress; }
.submit-row .help { margin-top: 10px; }

.message { text-align: center; padding-top: 40px; padding-bottom: 40px; }
.message p { font-size: 1.05rem; max-width: 560px; margin: 0 auto 18px; }

.form-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.form-list li { border: 2px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.form-list a { font-weight: 700; font-size: 1.08rem; color: var(--brand-dark); }
.form-list p { margin: 4px 0 0; color: var(--muted); }

.site-footer { color: var(--muted); font-size: 0.9rem; padding: 0 0 40px; }
.site-footer .wrap { padding-top: 4px; }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--brand-dark); }

/* Podmíněná pole: bez JavaScriptu se zobrazí vše, s JS jen relevantní */
.js .cond[data-hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .option, input, select, textarea { transition: border-color .15s, background-color .15s; }
}
