:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #5d6875;
  --line: #d9dde2;
  --accent: #0f7b6c;
  --accent-dark: #09584e;
  --warm: #cf6f32;
  --soft: #eaf5f2;
  --shadow: 0 18px 45px rgba(29, 39, 51, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  background: #20313f;
  color: #ffffff;
  padding: 34px 24px 30px;
}

.header-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.site-header > div,
.layout,
.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.04;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.28rem;
}

.intro {
  max-width: 680px;
  margin: 16px 0 0;
  color: #d9e5e2;
  font-size: 1.05rem;
}

.hero-section {
  max-width: 860px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0 34px;
}

.builder,
.preview-wrap,
.content-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.builder,
.preview-wrap {
  padding: 20px;
}

.builder {
  align-self: start;
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.language-switch {
  width: min(240px, 100%);
  color: #ffffff;
}

.language-switch select {
  background: #ffffff;
  color: var(--ink);
}

input[type="text"],
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9c1ca;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
}

input[type="text"]:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 123, 108, 0.24);
  outline-offset: 2px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

legend {
  padding: 0 6px;
  font-weight: 800;
}

.hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-error {
  margin: 10px 0 0;
  color: #b42318;
  font-size: 0.92rem;
  font-weight: 700;
}

.has-error {
  border-color: #b42318;
}

.check-grid,
.check-list {
  display: grid;
  gap: 9px;
}

.check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 28px;
  font-weight: 600;
}

.check-row input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.preview-actions h2 {
  margin-bottom: 0;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  background: #8da8a2;
  cursor: not-allowed;
}

.print-sheet {
  min-height: 560px;
  border: 1px solid #c8d2d1;
  border-radius: 8px;
  padding: 22px;
  background: #fffdf8;
}

.sheet-head {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  text-align: center;
}

.sheet-label {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
  text-transform: uppercase;
}

.sheet-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.sheet-head p:last-child {
  margin: 0;
  color: var(--muted);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  border: 1px solid #aeb8c2;
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

th {
  background: var(--soft);
  color: #173d38;
}

th:first-child,
td:first-child {
  width: 34%;
  text-align: left;
}

.empty-box {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid #61707e;
  border-radius: 4px;
}

.sheet-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.note-line {
  border: 1px dashed #9aa6b2;
  border-radius: 6px;
  padding: 12px;
  color: var(--muted);
  min-height: 52px;
}

.seo-content {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.content-note {
  padding: 20px;
}

.content-note p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.content-note h3 {
  margin: 16px 0 6px;
  font-size: 1rem;
}

.content-note h3:first-of-type {
  margin-top: 0;
}

.faq-section p + h3 {
  margin-top: 18px;
}

.site-footer {
  padding: 0 0 28px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .check-grid,
  .sheet-notes,
  .seo-content {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .site-header,
  .builder,
  .preview-actions,
  .seo-content,
  .site-footer {
    display: none;
  }

  .layout {
    display: block;
    width: 100%;
    padding: 0;
  }

  .preview-wrap {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .print-sheet {
    min-height: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .table-scroll {
    overflow: visible;
  }

  table {
    min-width: 0;
    page-break-inside: avoid;
  }

  th,
  td {
    padding: 8px;
  }
}
