:root {
  --bg: #f7f9f6;
  --surface: #ffffff;
  --text: #16201a;
  --muted: #596860;
  --line: #dfe8de;
  --accent: #4f8a32;
  --accent-dark: #3c6d24;
  --soft: #ebf4e6;
  --danger: #c0392b;
  --success: #267a45;
  --max: 940px;
  --r: 16px;
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────────── */

.inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* ── Header / Nav ─────────────────────────────────── */

header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

nav a:hover {
  background: var(--soft);
  color: var(--accent);
}

nav a.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}

/* ── Sections ─────────────────────────────────────── */

.hero,
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* ── Typography ───────────────────────────────────── */

h1 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
  color: var(--text);
}

.section > .tag + h2,
.section > h2:first-child {
  margin-top: 12px;
}

h3 {
  font-size: 15px;
  font-weight: 650;
  margin: 18px 0 6px;
}

p {
  margin-bottom: 10px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

li {
  margin: 5px 0;
  line-height: 1.6;
}

a {
  color: var(--accent);
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-dark);
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* ── Utilities ────────────────────────────────────── */

.muted {
  color: var(--muted);
}

.accent-text {
  color: var(--accent);
}

.meta {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.notice {
  background: var(--soft);
  border: 1px solid #c6dfc0;
  border-left: 3px solid var(--accent);
  padding: 13px 15px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
}

.notice strong {
  color: var(--accent);
}

.notice a {
  color: var(--accent);
  font-weight: 600;
}

/* ── Language jump links ──────────────────────────── */

.langs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.langs a {
  color: var(--accent);
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}

.langs a:hover {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* ── Document cards (homepage) ────────────────────── */

.doc-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  background: var(--bg);
}

.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(79, 138, 50, 0.12);
  background: var(--soft);
  color: inherit;
}

.doc-card-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: var(--soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.doc-card-text {
  flex: 1;
}

.doc-card-text strong {
  font-size: 14px;
  color: var(--accent);
  display: block;
  margin-bottom: 2px;
}

.doc-card-text span {
  font-size: 13px;
  color: var(--muted);
}

.doc-card-arrow {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

/* ── Contact layout ───────────────────────────────── */

.contact-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-bottom: 20px;
}

.form-section,
.info-section,
.faq-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.form-section h2,
.info-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 17px;
}

.faq-section {
  margin-bottom: 20px;
}

.faq-section > h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 17px;
}

/* ── Form elements ────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.required {
  color: var(--danger);
  margin-left: 1px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23596860' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 138, 50, 0.1);
  background: var(--surface);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-group.checkbox {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.form-group.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-group.checkbox label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.07);
}

.error-message {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.error-message.show {
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
}

.btn-submit:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-message {
  display: none;
  margin-top: 12px;
  padding: 11px 14px;
  background: #e5f3ea;
  color: var(--success);
  border: 1px solid #b5d9c0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.success-message.show {
  display: block;
}

/* ── Info cards ───────────────────────────────────── */

.info-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.info-card:last-of-type {
  border-bottom: none;
}

.info-icon {
  font-size: 18px;
  line-height: 1;
  padding-top: 1px;
  flex-shrink: 0;
}

.info-content h3 {
  font-size: 13px;
  margin: 0 0 3px;
  font-weight: 600;
}

.info-content p {
  font-size: 13px;
  margin: 0 0 2px;
}

.no-bullets {
  list-style: none;
  padding-left: 0;
}

.no-bullets li {
  font-size: 13px;
  margin: 4px 0;
}

/* ── FAQ accordion ────────────────────────────────── */

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 13px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  transition: background 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: var(--soft);
}

.faq-item[open] summary {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.faq-item summary::after {
  content: '+';
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.faq-answer p {
  margin-bottom: 6px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ── Footer ───────────────────────────────────────── */

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Back to top ──────────────────────────────────── */

#back-to-top {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(79, 138, 50, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  font-size: 16px;
  line-height: 1;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  transform: translateY(-2px);
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 700px) {
  .hero,
  .section {
    padding: 22px 18px;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .form-section,
  .info-section,
  .faq-section {
    padding: 22px 18px;
  }
}

@media (max-width: 480px) {
  .inner,
  main,
  footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  nav a {
    font-size: 12px;
    padding: 5px 9px;
  }

  .brand {
    font-size: 13px;
  }
}

  font-size: 14px;
  padding-top: 28px;
  padding-bottom: 28px;
  text-align: center;
}

footer a {
  text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 600px) {
  .inner,
  main,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero,
  .section {
    padding: 21px 19px;
    border-radius: 16px;
    margin-bottom: 20px;
  }

  h1 {
    font-size: clamp(24px, 4vw, 32px);
  }

  h2 {
    font-size: 19px;
    margin: 24px 0 12px;
  }

  nav {
    gap: 8px;
    margin-top: 12px;
  }

  nav a,
  .langs a {
    padding: 6px 11px;
    font-size: 12px;
  }

  .meta {
    gap: 6px 16px;
    font-size: 13px;
    margin-top: 12px;
  }

  .notice {
    padding: 14px 16px;
    font-size: 13px;
    margin: 16px 0;
  }
}

@media (max-width: 400px) {
  .inner,
  main,
  footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .section {
    padding: 16px;
  }

  h1 {
    font-size: clamp(20px, 3.5vw, 28px);
    margin-bottom: 8px;
  }

  h2 {
    font-size: 17px;
    margin: 20px 0 10px;
  }

  nav {
    flex-direction: column;
    gap: 8px;
  }

  nav a,
  .langs a {
    display: block;
    text-align: center;
  }

  .meta {
    gap: 6px 12px;
    font-size: 12px;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  nav {
    display: none;
  }

  .hero,
  .section {
    page-break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
  }

  a {
    color: var(--accent);
    text-decoration: underline;
  }
}
