* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #111827;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.topbar {
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  background: #e8eefc;
  color: #16315c;
  border: 1px solid #cfdcf8;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  margin-bottom: 24px;
  text-align: center;
}

.brand {
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #3b82f6;
  margin-bottom: 14px;
}

h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 auto;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.5;
  max-width: 760px;
}

.card,
.output-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.card {
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field.full {
  grid-column: 1 / -1;
}

.checkbox-field {
  justify-content: flex-end;
}

label {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  margin-top: 8px;
}

.checkbox-label input {
  width: auto;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #111827;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

#generateBtn {
  background: #0f172a;
  color: white;
}

#copyBtn,
#pdfBtn,
#resetBtn {
  background: #e5e7eb;
  color: #111827;
}

.disclaimer {
  margin-top: 10px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

.microcopy {
  margin-top: 14px;
  font-size: 13px;
  color: #6b7280;
}

.output-header {
  margin-bottom: 16px;
}

.output-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.output-header p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.output-wrap {
  border-radius: 14px;
  padding: 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.output-wrap.highlight {
  background: #f4f8ff;
  box-shadow: 0 0 0 2px #cfe0ff inset;
  padding: 14px;
}

#contractOutput {
  min-height: 480px;
  background: #fafafa;
}

.site-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.site-footer a {
  color: #6b7280;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.print-sheet {
  display: none;
}

.print-doc {
  max-width: 800px;
  margin: 0 auto;
  color: #111;
}

.print-doc-header {
  margin-bottom: 28px;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 16px;
}

.print-doc-header h1 {
  font-size: 24px;
  margin: 0 0 8px;
  letter-spacing: 0;
}

.print-doc-header p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.print-content {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

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

  .field.full {
    grid-column: auto;
  }

  .actions {
    flex-direction: column;
  }

  .brand {
    font-size: 56px;
  }

  h1 {
    font-size: 30px;
  }

  .subtitle {
    font-size: 17px;
  }
}

@page {
  size: A4;
  margin: 18mm 15mm;
}

@media print {
  body {
    background: white;
  }

  .container {
    display: none !important;
  }

  .print-sheet {
    display: block !important;
  }

  .print-doc {
    display: block;
  }
}
