﻿:root {
  --bg: #fbf2e8;
  --bg-2: #ffe8cf;
  --bg-3: #ffd5a9;
  --surface: #fffaf4;
  --line: #ebcda9;
  --ink: #2f2019;
  --muted: #6d5648;
  --red: #d64a2f;
  --orange: #ff9f2f;
  --teal: #0aa0a2;
  --teal-d: #067f80;
  --shadow-s: 0 10px 28px rgba(122, 74, 33, .12);
  --shadow-l: 0 20px 48px rgba(122, 74, 33, .18);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 30px;
  --max: 1180px;
  --header-h: 78px;
  --font-main: 'Candara', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: var(--header-h);
  color: var(--ink);
  background:
    radial-gradient(1200px 300px at 10% -10%, rgba(214,74,47,.18), transparent),
    radial-gradient(1100px 280px at 90% -14%, rgba(10,160,162,.22), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 44%, var(--bg) 100%);
  font-family: var(--font-main);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: #af321d; }

h1, h2, h3, h4 {
  letter-spacing: .2px;
  line-height: 1.22;
}

.page-hero h1,
.home-intro h1,
.content-body h2,
.legal-content h2 {
  color: #3a2219;
  text-wrap: balance;
}

p,
li {
  font-size: clamp(.98rem, 1.1vw, 1.05rem);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(255, 249, 241, .9);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  letter-spacing: .4px;
  font-size: clamp(1.1rem, 1.4vw, 1.34rem);
}
.logo-text {
  background: linear-gradient(90deg, var(--red) 0%, #ff7b33 30%, var(--teal) 70%, var(--red) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logoFlow 5s linear infinite;
  text-shadow: 0 0 1px rgba(0,0,0,.03);
}
@keyframes logoFlow {
  0% { background-position: 0 0; }
  100% { background-position: 220% 0; }
}

.main-nav { margin-left: auto; }
.nav-list { margin: 0; padding: 0; list-style: none; display: flex; gap: 6px; }
.nav-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: .93rem;
  transition: .2s ease;
}
.nav-list a:hover,
.nav-list a.active {
  border-color: #e7bc90;
  background: linear-gradient(135deg, #fff5e8, #ffe6cb);
  color: #9e2f1e;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e5bc90;
  background: #fff6e9;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 3px; transition: .2s ease; }

.breadcrumbs { padding: 14px 0 6px; font-size: .86rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li { color: var(--muted); }
.breadcrumbs li::after { content: '·'; margin-left: 6px; color: #bc9f82; }
.breadcrumbs li:last-child::after { content: ''; }
.breadcrumbs a { color: var(--muted); }

main { padding: 24px 0 66px; }

.page-hero, .home-intro {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(130deg, #fff4e4 0%, #fffaf4 60%, #ffe4c0 100%);
  box-shadow: var(--shadow-s);
}
.page-hero { padding: 40px 30px; margin-bottom: 20px; }
.home-intro { padding: 56px 30px; margin-bottom: 20px; text-align: center; }
.page-hero h1, .home-intro h1 { margin: 0 0 8px; line-height: 1.2; font-size: clamp(1.8rem, 2.6vw, 2.7rem); }
.page-hero p, .home-intro p { margin: 0; color: var(--muted); max-width: 760px; }
.home-intro p { margin-inline: auto; }
.home-intro .highlight { color: var(--red); }

.home-cta, .form-submit, .cookie-btn, .cookie-save-btn, .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  transition: .18s ease;
}
.home-cta {
  margin-top: 18px;
  padding: 12px 20px;
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--red), #ff6e3b 55%, var(--orange));
}
.home-cta:hover { color: #fff; transform: translateY(-1px); }

.hero-media {
  margin-bottom: 24px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
}
.hero-media img {
  width: 100%;
  height: clamp(240px, 38vw, 460px);
  object-fit: cover;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.section-card {
  border: 1px solid #edcda8;
  border-radius: var(--r-md);
  padding: 18px;
  background:
    radial-gradient(120px 70px at 10% 0, rgba(255, 140, 63, .12), transparent),
    radial-gradient(120px 70px at 90% 100%, rgba(10, 160, 162, .14), transparent),
    var(--surface);
  box-shadow: var(--shadow-s);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 212px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.section-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.card-icon { width: 44px; height: 44px; color: var(--red); }
.section-card h3 { margin: 0; font-size: 1.08rem; }
.section-card p { margin: 0; color: var(--muted); }
.card-link { margin-top: auto; font-weight: 800; color: #a63623; }

.start-route {
  margin: 0 0 30px;
  border-radius: var(--r-lg);
  padding: 28px;
  color: #f6fdfd;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.22), transparent 46%),
    linear-gradient(135deg, #0d7f80, #06a4a6 58%, #18c2c4);
  box-shadow: var(--shadow-l);
}
.start-route h2 { margin-top: 0; }
.route-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.route-steps li { display: flex; gap: 10px; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.26); font-weight: 800; flex: 0 0 30px; }

.content-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 260px;
  gap: 24px;
  align-items: start;
}
.content-body h2 { margin: 30px 0 10px; font-size: 1.45rem; border-bottom: 2px solid #efd3b1; padding-bottom: 8px; }
.content-body h2:first-child { margin-top: 0; }
.content-body h3 { margin: 18px 0 8px; }
.content-body p, .content-body li, .legal-content p, .legal-content li { color: var(--muted); }

.toc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fffaf4;
  padding: 16px;
  box-shadow: var(--shadow-s);
  align-self: start;
  height: fit-content;
  max-height: calc(100dvh - var(--header-h) - 20px);
  overflow: auto;
}
.toc-sidebar h4 { margin: 0 0 8px; font-size: .82rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.toc-sidebar ul { list-style: none; margin: 0; padding: 0; }
.toc-sidebar a { display: block; color: var(--muted); padding: 7px 8px; border-radius: 10px; font-size: .9rem; }
.toc-sidebar a:hover, .toc-sidebar a.active { background: #ffeacd; color: #9f311e; }
.toc-toggle {
  width: 100%;
  display: none;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e8c8a3;
  border-radius: 12px;
  background: #fff7ec;
  color: #6d4d3d;
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
}
.toc-toggle::after {
  content: '▾';
  font-size: .95rem;
  transition: transform .2s ease;
}
.toc-sidebar.open .toc-toggle::after { transform: rotate(180deg); }

.tool-section, .contact-info-block, .contact-form-block, .legal-content {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  padding: 20px;
}
.tool-section { margin-bottom: 16px; }
.tool-section h2 { margin-top: 0; }

.static-list { margin: 0; padding-left: 18px; }
.static-list li { margin-bottom: 8px; }

.budget-table { width: 100%; border-collapse: collapse; }
.budget-table th, .budget-table td { border-bottom: 1px solid #f1dcc1; padding: 10px 12px; text-align: left; }
.budget-table th { background: #fff1de; }
.budget-readonly td:nth-child(2) { font-weight: 800; color: #a33822; }

.checklist, .checklist-progress, .check-toggle, .progress-bar, .progress-fill, .progress-text, .budget-total, .budget-actions { display: none !important; }

.tip-box, .safety-note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 12px;
  background: #fff6e8;
  padding: 12px 14px;
  margin: 14px 0;
}
.safety-note { border-left-color: var(--red); }
.tip-box strong, .safety-note strong { display: block; margin-bottom: 4px; }

.related-content { margin-top: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.related-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff8ee;
  box-shadow: var(--shadow-s);
  padding: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: .15s ease;
}
.related-item:hover { transform: translateY(-2px); color: #a33421; border-color: #e3b786; }
.ri-icon { width: 22px; height: 22px; color: var(--orange); flex: 0 0 22px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-detail { display: flex; gap: 10px; margin-bottom: 12px; }
.contact-detail strong { display: block; color: var(--ink); }
.cd-icon { width: 20px; height: 20px; color: var(--red); flex: 0 0 20px; margin-top: 2px; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 800; margin-bottom: 6px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  border: 1px solid #dfbc95;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,160,162,.14); }
.required { color: var(--red); }

.consent-group { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 10px; }
.consent-toggle {
  border: 1px solid #ddbb94;
  border-radius: 10px;
  background: #fff2e1;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 800;
}
.consent-toggle[aria-pressed="true"] { background: linear-gradient(135deg, var(--teal), #15b2b4); color: #fff; border-color: var(--teal); }

.form-submit {
  border: 1px solid transparent;
  padding: 11px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #ff6a39 56%, var(--orange));
}
.form-submit:hover { transform: translateY(-1px); }
.form-submit:disabled { opacity: .65; cursor: not-allowed; }
.form-message { margin-top: 10px; padding: 10px 12px; border-radius: 10px; display: none; }
.form-message.success { display: block; background: #e9f8ef; border: 1px solid #bee1cb; color: #20653b; }
.form-message.error { display: block; background: #fff1f1; border: 1px solid #f0c9c9; color: #922f2f; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.toast-stack {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 14px;
  width: min(360px, calc(100vw - 20px));
  display: grid;
  gap: 8px;
  z-index: 2100;
  pointer-events: none;
}
.toast-card {
  pointer-events: auto;
  border-radius: 12px;
  border: 1px solid #dfc2a1;
  background: #fff7ee;
  box-shadow: var(--shadow-l);
  padding: 11px 12px;
  color: #4c3327;
  font-size: .95rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-card.success {
  border-color: #9fd3b3;
  background: #eaf8ef;
  color: #22573a;
}
.toast-card.error {
  border-color: #efc0c0;
  background: #fff1f1;
  color: #8a2f2f;
}

.legal-content h2 { margin: 20px 0 8px; }

.site-footer {
  margin-top: 34px;
  background: linear-gradient(180deg, #2b1d16, #221712);
  color: #decec2;
  padding: 34px 0 18px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; }
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: 7px; }
.site-footer a { color: #ffbe7a; }
.site-footer a:hover { color: #ffd7a6; }
.footer-bottom { margin-top: 14px; padding-top: 12px; border-top: 1px solid #493428; font-size: .86rem; }
.footer-bottom { text-align: center; }
.footer-bottom p { margin: 0 auto; }

.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 9, .56);
  z-index: 1700;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
}
.cookie-overlay.visible { display: flex; }
.cookie-banner {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #fffaf4;
  padding: 18px;
}
.cookie-banner p { margin: 0 0 10px; color: var(--muted); }
.cookie-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-btn {
  border: 1px solid #dfbc95;
  background: #fff2e2;
  color: var(--ink);
  padding: 10px 12px;
}
.cookie-btn-accept { background: var(--red); color: #fff; border-color: var(--red); }
.cookie-btn-accept:hover { background: #b93a24; }
.cookie-settings-panel { display: none; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0ddc6; }
.cookie-settings-panel.visible { display: block; }
.cookie-category { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f2e1ce; }
.cookie-category:last-child { border-bottom: 0; }
.cookie-switch {
  min-width: 110px;
  border: 1px solid #dfbb95;
  border-radius: 999px;
  background: #fff4e6;
  color: var(--ink);
  font-weight: 800;
  padding: 8px 10px;
}
.cookie-switch.is-on, .cookie-switch[aria-pressed="true"] { background: linear-gradient(135deg, var(--teal), #16b3b6); color: #fff; border-color: var(--teal); }
.cookie-save-btn { border: 1px solid transparent; background: var(--teal); color: #fff; padding: 10px 12px; }
.cookie-save-btn:hover { background: var(--teal-d); }
.cookie-reopen-btn { border: 1px solid transparent; border-radius: 10px; background: var(--red); color: #fff; padding: 10px 12px; }
.cookie-reopen-btn:hover { background: #b43a24; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .content-body { order: 2; }
  .toc-sidebar {
    order: 1;
    position: sticky;
    top: calc(var(--header-h) + 10px);
    margin-top: 0;
    margin-bottom: 14px;
    z-index: 6;
    background: linear-gradient(180deg, #fff6ea, #fffaf4);
  }
  .toc-sidebar.is-collapsible .toc-toggle { display: flex; }
  .toc-sidebar.is-collapsible ul { display: none; }
  .toc-sidebar.is-collapsible.open ul {
    display: grid;
    margin-top: 10px;
  }
  .toc-sidebar ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .toc-sidebar a {
    min-height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid #f1d8b8;
    background: #fffdfa;
  }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }
  p, li {
    font-size: 1rem;
    line-height: 1.72;
  }
  .page-hero h1, .home-intro h1 {
    font-size: clamp(1.6rem, 6vw, 2.05rem);
    line-height: 1.18;
  }
  .content-body h2 {
    font-size: clamp(1.24rem, 4.7vw, 1.45rem);
    line-height: 1.24;
  }
  .header-inner {
    gap: 12px;
    justify-content: space-between;
  }
  .site-logo {
    max-width: calc(100% - 64px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fffaf4;
    box-shadow: var(--shadow-l);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: .24s ease;
    padding: 10px 12px 14px;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-list { flex-direction: column; }
  .nav-list a { width: 100%; }
  body.nav-open { overflow: hidden; }

  .route-steps,
  .related-grid,
  .contact-grid,
  .footer-grid,
  .consent-group { grid-template-columns: 1fr; }
  .cookie-buttons { flex-direction: column; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 1rem); }
  .section-grid { grid-template-columns: 1fr; }
  .toc-sidebar ul { grid-template-columns: 1fr; }
  .page-hero, .home-intro { padding: 30px 18px; }
  .page-hero p, .home-intro p {
    font-size: 1.02rem;
    line-height: 1.74;
  }
  .site-logo {
    max-width: calc(100% - 72px);
    font-size: 1.14rem;
  }
  .toast-stack {
    left: 10px;
    right: 10px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .cookie-overlay, .toc-sidebar { display: none !important; }
  main { padding: 0; }
}
