:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #16191d;
  --muted: #4d5560;
  --border: #d5d9df;
  --border-strong: #8a929c;
  --accent: #1f5c99;
  --accent-hover: #174a7d;
  --accent-soft: #eaf1f8;
  --error: #b42318;
  --error-soft: #fdf0ee;
  --success: #1e6b3a;
  --success-soft: #edf7f0;
  --focus: #1f5c99;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main.wrap { flex: 1; padding-top: 1.75rem; padding-bottom: 3rem; }

h1, h2 { line-height: 1.25; margin: 0 0 .75rem; }
h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.125rem; font-weight: 650; }
h1:focus { outline: none; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-hover); }

@media (min-width: 640px) {
  main.wrap { padding-top: 3.5rem; }
  h1 { font-size: 2rem; }
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  padding: .5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --- antraštė ir poraštė ------------------------------------------------ */

.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { padding-top: .875rem; padding-bottom: .875rem; }
.brand { color: var(--text); font-weight: 650; text-decoration: none; font-size: .9375rem; }
.brand:hover { color: var(--text); text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .875rem;
}
.site-footer .wrap { padding-top: 1.25rem; padding-bottom: 1.5rem; display: flex; flex-direction: column; gap: .25rem; }
@media (min-width: 640px) { .site-footer .wrap { flex-direction: row; gap: .5rem; } }
.site-footer .sep { display: none; }
@media (min-width: 640px) { .site-footer .sep { display: inline; } }

/* --- mygtukai ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .625rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:disabled { cursor: not-allowed; opacity: .6; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn-link {
  background: none; border: 0; padding: .5rem 0; min-height: 44px;
  color: var(--accent); text-decoration: underline; text-underline-offset: .15em;
  font: inherit; cursor: pointer;
}
.btn-large { min-height: 56px; padding: .875rem 1.75rem; font-size: 1.125rem; }

/* --- pradžia ------------------------------------------------------------- */

.lead { font-size: 1.1875rem; color: var(--muted); }
.cta { margin: 1.75rem 0 2rem; }
.cta .btn { width: 100%; }
.cta-note { margin: .625rem 0 0; color: var(--muted); font-size: .9375rem; }
@media (min-width: 480px) {
  .cta { display: flex; align-items: center; gap: 1rem; }
  .cta .btn { width: auto; }
  .cta-note { margin: 0; }
}
.examples {
  color: var(--muted);
  font-size: .9375rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.notice {
  padding: .875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* --- klausimai ----------------------------------------------------------- */

.progress { margin-bottom: 1.5rem; }
.progress-text { font-size: .875rem; color: var(--muted); margin: 0 0 .375rem; font-weight: 600; }
.progress progress {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.progress progress::-webkit-progress-bar { background: #e6e9ed; }
.progress progress::-webkit-progress-value { background: var(--accent); }
.progress progress::-moz-progress-bar { background: var(--accent); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; width: 100%; }
.hint { color: var(--muted); margin: 0 0 1.25rem; }

.options { display: grid; gap: .625rem; }
.option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-height: 52px;
  padding: .8125rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg);
}
.option:hover { border-color: var(--border-strong); }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option input {
  margin: .2rem 0 0;
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  accent-color: var(--accent);
}
.option input:focus-visible { outline: none; }

.field { margin-bottom: 1.25rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .375rem; }
.label-note { font-weight: 400; color: var(--muted); }
.field-hint { color: var(--muted); font-size: .9375rem; margin: -.125rem 0 .5rem; }

input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: .6875rem .875rem;
  min-height: 48px;
  width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--error); }

.number-input { display: flex; align-items: center; gap: .75rem; }
.number-input input { max-width: 11rem; font-size: 1.25rem; font-weight: 600; }
.number-input .unit { color: var(--muted); }

.error {
  color: var(--error);
  font-weight: 600;
  margin: .5rem 0 0;
  font-size: .9375rem;
}
.error:empty { display: none; }

.alert {
  border-radius: var(--radius);
  padding: .875rem 1rem;
  margin: 0 0 1.25rem;
  border: 1px solid;
}
.alert-error { color: var(--error); background: var(--error-soft); border-color: #f1c4bd; }
.alert:empty { display: none; }

.nav {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 2rem;
}
.nav .btn { flex: 1; }
@media (min-width: 480px) { .nav .btn { flex: 0 0 auto; min-width: 9rem; } }

/* --- rezultatai ---------------------------------------------------------- */

.figures { display: grid; gap: .75rem; margin: 1.5rem 0; }
@media (min-width: 560px) { .figures { grid-template-columns: 1fr 1fr; } }
.figure {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
}
.figure-wide { grid-column: 1 / -1; }
.figure-label { font-size: .9375rem; color: var(--muted); margin: 0 0 .25rem; font-weight: 600; }
.figure-value { font-size: 1.875rem; font-weight: 700; line-height: 1.2; margin: 0; font-variant-numeric: tabular-nums; }
.figure-unit { font-size: 1rem; font-weight: 500; color: var(--muted); }
.figure-note { font-size: .875rem; color: var(--muted); margin: .5rem 0 0; }
.figure-accent { border-color: var(--accent); background: var(--accent-soft); }
.tag {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  padding: .125rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  background: var(--bg);
  margin-bottom: .375rem;
}

.scenario { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; margin-top: .75rem; }
.scenario label { font-size: .9375rem; font-weight: 600; margin: 0; }
.scenario select { width: auto; min-height: 44px; padding: .375rem 2rem .375rem .75rem; }

.section {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
}
.section ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.section li { margin-bottom: .375rem; }
.formula {
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem .875rem;
  overflow-wrap: anywhere;
}
.formula p { margin: 0 0 .375rem; }
.formula p:last-child { margin: 0; }
.formula + .formula { margin-top: .5rem; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }

.actions { display: grid; gap: .75rem; margin-top: 2rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.actions-row .btn { flex: 1 1 12rem; }
.status { min-height: 1.5rem; margin: 0; color: var(--success); font-weight: 600; font-size: .9375rem; }

/* --- kontaktai ----------------------------------------------------------- */

.included {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .875rem 1rem;
  margin: 1.25rem 0;
  font-size: .9375rem;
}
.included summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.included pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: .75rem 0 0;
  font-size: .875rem;
}
.privacy { font-size: .9375rem; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.success {
  border: 1px solid #b7dcc3;
  background: var(--success-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.success h1 { color: var(--success); }
.success p:last-child { margin: 0; }

/* --- privatumo politika -------------------------------------------------- */

.prose h2 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.25rem; }
.placeholder { background: #fff6d6; padding: 0 .25rem; border-radius: 3px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
