/* Базовий reset + типографіка + layout-примітиви — AI_BUILD_PROMPT.md, Частина 3 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 var(--space-4); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
p { margin: 0 0 var(--space-4); }

a { color: var(--brand-primary-hover); }
a:hover { color: var(--text-primary); }

img, video { max-width: 100%; display: block; }

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

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

.content-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--space-4);
}
.content-container.narrow { max-width: var(--form-max); }
.content-container.reading { max-width: var(--reading-max); }

main { flex: 1; padding-block: var(--space-6); }

/* --- Форми --- */
label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: var(--space-1); }
input, select, textarea {
  width: 100%;
  min-height: var(--tap-target);
  padding: 0 var(--space-3);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}
textarea { min-height: 120px; padding-block: var(--space-2); }
.field { margin-bottom: var(--space-4); }
.field .errorlist { list-style: none; margin: var(--space-1) 0 0; padding: 0; color: var(--state-error); font-size: 0.875rem; }
.help-text { color: var(--text-secondary); font-size: 0.8125rem; margin-top: var(--space-1); }

ul.errorlist { list-style: none; margin: 0 0 var(--space-4); padding: var(--space-3); background: rgba(255, 113, 134, 0.12); border-radius: var(--radius-control); color: var(--state-error); }
