:root {
  --ink: #17392F;
  --text: #2E3833;
  --muted: #59625D;
  --paper: #FFFFFF;
  --mist: #F3F3EF;
  --line: #DADDD6;
  --green: #B48A4E;
  --green-ink: #7A5A2B;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--green-ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.measure { max-width: 68ch; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.08; margin: 0 0 24px; max-width: 21ch; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; margin: 0 0 20px; max-width: 24ch; }
h3 { font-size: 1.35rem; line-height: 1.3; margin: 0 0 8px; }
p { margin: 0 0 16px; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 60ch; }
.small { font-size: 0.95rem; color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.wordmark { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark span { border-bottom: 3px solid var(--green); padding-bottom: 1px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-size: 0.98rem; color: var(--text); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav .lang { color: var(--muted); font-size: 0.9rem; }
.nav .btn { padding: 9px 16px; font-size: 0.95rem; }
.menu-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-block; background: var(--ink); color: #fff !important;
  text-decoration: none; font-weight: 600; padding: 14px 22px; border-radius: 4px;
  border: 1px solid var(--ink);
}
.btn:hover { background: #0E2620; }
.btn-ghost { background: transparent; color: var(--ink) !important; }
.btn-ghost:hover { background: var(--mist); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* Sections */
section { padding: 88px 0; }
section.alt { background: var(--mist); }
section.cta { background: var(--paper); border-top: 1px solid var(--line); }
.hero { padding: 96px 0 64px; }
.hero .who { margin-top: 28px; font-size: 0.98rem; color: var(--muted); }

/* The process line: the one memorable element */
.line { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; counter-reset: fase; }
.line::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 13px;
  height: 3px; background: var(--green);
}
.line li { position: relative; padding: 52px 28px 0 0; counter-increment: fase; }
.line li::before {
  content: counter(fase); position: absolute; top: 0; left: 0;
  width: 29px; height: 29px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--green);
  color: var(--ink); font-weight: 600; font-size: 0.85rem;
  display: grid; place-items: center; line-height: 1;
}
section.alt .line li::before { background: var(--mist); }
.line h3 { font-size: 1.6rem; }
.line p { font-size: 1rem; }

/* Two-column blocks */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.signs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.signs li { padding: 14px 0; border-bottom: 1px solid var(--line); }

.work { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 12px; }
.work article { border-top: 3px solid var(--ink); padding-top: 18px; }
.work .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 6px; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; margin-top: 8px; }
.rules h3 { font-size: 1.2rem; }
.rules p { font-size: 1rem; }

/* Content pages */
.page-head { padding-top: 80px; padding-bottom: 40px; }
.block { padding: 40px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; }
.block ul, .block ol { padding-left: 1.2em; margin: 0 0 16px; }
.block li { margin-bottom: 8px; }
dl.facts { display: grid; grid-template-columns: 220px 1fr; gap: 14px 28px; margin: 0; }
dl.facts dt { font-weight: 600; color: var(--ink); }
dl.facts dd { margin: 0; }
.phase-tag { display: inline-block; font-size: 0.9rem; color: var(--green-ink); font-weight: 600; margin-bottom: 6px; }

/* Qualifier */
.qualifier { max-width: 560px; }
.qualifier label { display: block; font-weight: 600; color: var(--ink); margin: 0 0 16px; font-size: 1rem; }
.qualifier select, .qualifier textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  font: inherit; font-weight: 400; font-size: 16px; color: var(--ink);
  border: 1px solid #BFC6BE; border-radius: 4px; background: #fff;
}
.qualifier button { font: inherit; cursor: pointer; }
.qualifier .error { color: #B42318; display: none; margin-top: 10px; }
.qualifier .result { margin-top: 22px; }
.qualifier .result .actions { margin-top: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

@media (max-width: 860px) {
  body { font-size: 17px; }
  section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  .split, .work, .rules { grid-template-columns: 1fr; gap: 32px; }
  dl.facts { grid-template-columns: 1fr; gap: 2px 0; }
  dl.facts dd { margin-bottom: 12px; }
  .line { grid-template-columns: 1fr; }
  .line::before { left: 13px; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
  .line li { padding: 0 0 36px 52px; }
  .menu-toggle {
    display: inline-block; margin-left: auto; background: none; border: 1px solid var(--line);
    border-radius: 4px; padding: 8px 12px; font: inherit; font-size: 0.95rem; color: var(--ink); cursor: pointer;
  }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
         flex-direction: column; align-items: flex-start; padding: 16px 24px 24px; gap: 14px; }
  .nav.open { display: flex; }
  .site-header .wrap { position: relative; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ===== v2: illustrations ===== */
.ic { width: 48px; height: 48px; flex: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-art { width: 100%; height: auto; }
.hero-art .node { opacity: 0; animation: nodeIn .5s ease-out forwards; animation-delay: var(--d); }
.hero-art .arrow { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .5s ease-out .2s forwards; }
@keyframes nodeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-art .node { opacity: 1; animation: none; }
  .hero-art .arrow { stroke-dashoffset: 0; animation: none; }
}

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { background: var(--paper); border-radius: 10px; padding: 26px 22px; border-top: 4px solid var(--green); }
.tile h3 { margin: 14px 0 6px; font-size: 1.25rem; }
.tile p { font-size: 0.98rem; margin: 0; }

.line .ic { position: relative; z-index: 1; background: var(--paper); margin-bottom: 10px; }
.line.line-icons li::before { display: none; }
.line.line-icons::before { top: 24px; }
.line.line-icons li { padding-top: 0; }
.line.line-icons .ic { display: block; padding: 0 6px 0 0; box-sizing: content-box; }

.pains { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pains li { display: flex; align-items: center; gap: 16px; background: var(--paper); border-radius: 10px; padding: 18px 20px; font-weight: 500; color: var(--ink); line-height: 1.35; }

.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.case { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 22px; }
.case:hover { border-color: var(--ink); color: var(--text); }
.case-art { width: 100%; height: auto; display: block; margin-bottom: 16px; }
.case .meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 4px; }
.case .num { font-family: var(--serif); font-size: 2.3rem; line-height: 1.1; color: var(--ink); font-weight: 600; margin: 0 0 6px; }
.case .more { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.who-block { grid-template-columns: 1fr 1fr; align-items: center; }
.route { width: 100%; height: auto; }

dl.facts dt { display: flex; align-items: center; gap: 12px; }
dl.facts dt .ic { width: 40px; height: 40px; }
.phase-tag { display: flex; align-items: center; gap: 12px; }
.phase-tag .ic { width: 40px; height: 40px; }
.page-head > .ic { width: 56px; height: 56px; margin-bottom: 12px; }
article.block .case-art { max-width: 420px; margin-bottom: 20px; }

@media (max-width: 960px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .pains { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid, .cases, .who-block { grid-template-columns: 1fr; }
  .hero-art { max-width: 480px; }
  .line.line-icons::before { left: 23px; top: 24px; bottom: 40px; }
  .line.line-icons li { padding: 0 0 32px 68px; position: relative; }
  .line.line-icons .ic { position: absolute; left: 0; top: 0; padding: 0 0 6px; }
}
@media (max-width: 560px) {
  .tiles, .pains { grid-template-columns: 1fr; }
}

/* ===== v3: brand Flow Mark — header on dark green ===== */
.site-header { background: #17392F; border-bottom: 0; }
.wordmark { display: flex; align-items: center; }
.wordmark .logo { height: 30px; width: auto; display: block; }
.site-header .nav a { color: #E6ECE8; }
.site-header .nav a:hover { color: #FFFFFF; }
.site-header .nav a[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -2px 0 #B48A4E; }
.site-header .nav .lang { color: #B9C7BF; }
.site-header .nav .btn { background: #FFFFFF; color: #17392F !important; border-color: #FFFFFF; }
.site-header .nav .btn:hover { background: #F3F3EF; }
.site-header :focus-visible { outline-color: #B48A4E; }
.menu-toggle { color: #FFFFFF !important; border-color: rgba(255,255,255,.35) !important; }
@media (max-width: 860px) {
  .site-header .nav { background: #17392F; border-bottom: 1px solid rgba(255,255,255,.12); }
  .wordmark .logo { height: 24px; }
}

/* ===== v4: FAQ ===== */
.faq-list details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: #8A6530; font-weight: 600; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin: 10px 0 0; }
.faq-list details ul { margin: 10px 0 0; padding-left: 20px; }
.faq-list details li { margin: 4px 0; }
.faq-list details li::marker { color: #8A6530; }

/* ===== v9: hero calculator ===== */
.calc { background: var(--mist); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.calc .calc-title { font-size: 1.45rem; margin: 0 0 8px; max-width: none; }
.calc label { display: flex; justify-content: space-between; gap: 16px; font-size: 0.98rem; color: var(--ink); font-weight: 500; margin-top: 6px; }
.calc output { font-weight: 600; white-space: nowrap; }
.calc input[type=range] { width: 100%; accent-color: #B48A4E; min-height: 28px; }
.calc-result { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--ink); }
.calc-num { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 2.9rem); font-weight: 600; line-height: 1.05; }
.calc-hrs { flex-basis: 100%; color: var(--muted); font-size: 0.98rem; }
.calc-note { font-size: 0.85rem; color: var(--muted); margin: 4px 0 6px; }
.calc .btn { align-self: flex-start; }

/* ===== v10: problems and focus ===== */
.section-lead { margin: -8px 0 28px; }
.problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.problem { background: var(--paper); border-radius: 12px; padding: 24px 22px; display: flex; flex-direction: column; gap: 10px; }
.problem h3 { font-size: 1.22rem; margin: 6px 0 2px; }
.problem p { margin: 0; font-size: 0.98rem; }
.problem .tag { display: block; font-size: 0.8rem; font-weight: 600; color: #7A5A2B; margin-bottom: 2px; }
.problem .result { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.focus { background: #F3F3EF; border-radius: 10px; padding: 14px 16px; font-size: 0.98rem; color: var(--ink); }
@media (max-width: 960px) { .problems { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .problems { grid-template-columns: 1fr; } }

/* ===== v11: text-only hero ===== */
.hero h1 { max-width: 20ch; }
.hero .lead { max-width: 62ch; }
.outcomes { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.outcomes li { border-top: 3px solid #B48A4E; padding-top: 14px; font-weight: 600; color: var(--ink); font-size: 1.05rem; line-height: 1.4; }
@media (max-width: 860px) { .outcomes { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; } }
