:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #201f1c;
  --muted: #66645d;
  --line: #dfdacd;
  --green: #16734c;
  --green-soft: #e7f4ec;
  --rust: #a84225;
  --blue: #2f5f8f;
  --shadow: 0 20px 48px rgba(58, 47, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.9) 0, rgba(247, 245, 239, 0) 320px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 0;
  z-index: 20;
  transform: translateY(-110%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 12px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(32, 31, 28, 0.1);
  background: rgba(247, 245, 239, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #f9e7a6;
  font-size: 12px;
  font-weight: 800;
}

.brand-text {
  font-weight: 800;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-block: 8px;
}

.nav a {
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  align-items: center;
  gap: 42px;
  padding-block: 62px 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin-bottom: 22px;
  color: #4e4b43;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(32, 31, 28, 0.28);
  background: #f0eadc;
  outline: none;
}

.button-primary {
  border-color: #125f3f;
  background: var(--green);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #0f5d3d;
}

.tree-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tree-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tree-toolbar span:first-child {
  color: var(--ink);
}

.tree-visual {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 28px;
  padding: 30px 18px;
}

.tree-visual::before {
  content: "";
  position: absolute;
  inset: 92px 22% 92px;
  border-top: 2px solid #d5c6a8;
  border-bottom: 2px solid #d5c6a8;
  opacity: 0.9;
}

.branch-row {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.branch-row-wide {
  width: min(100%, 420px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.node {
  position: relative;
  z-index: 1;
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid #d8cfbd;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.node-root {
  width: min(100%, 260px);
  min-height: 76px;
  border-color: rgba(22, 115, 76, 0.34);
  background: var(--green-soft);
  color: #0d4c31;
}

.node-soft {
  min-height: 52px;
  background: #f5efe1;
  color: #595243;
  font-size: 12px;
}

.source-box {
  border-top: 1px solid var(--line);
  background: #fbf7ed;
  padding: 14px;
}

.source-box span,
.status-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-box a {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.source-box a:hover,
.source-box a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.status-band {
  border-block: 1px solid var(--line);
  background: #ece5d7;
  padding-block: 22px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.status-item {
  min-width: 0;
  border: 1px solid rgba(32, 31, 28, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.74);
  padding: 16px;
}

.status-item strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.status-item p {
  margin: 10px 0 0;
  color: #59554c;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 34px;
  padding-block: 56px;
}

.section-copy p:last-child {
  max-width: 550px;
  margin-bottom: 0;
  color: #4e4b43;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px;
}

.step span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f3e5cd;
  color: var(--rust);
  font-weight: 800;
}

.step p {
  margin-bottom: 0;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

@media (max-width: 940px) {
  .hero,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-block: 46px 40px;
  }

  .tree-panel {
    max-width: 620px;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .shell {
    width: calc(100% - 28px);
  }

  .header-inner {
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-block: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    white-space: normal;
  }

  .nav {
    width: 100%;
  }

  h1 {
    max-width: 340px;
    font-size: 32px;
    line-height: 1.06;
  }

  h2 {
    font-size: 26px;
  }

  .lead {
    font-size: 17px;
  }

  .actions,
  .button {
    width: 100%;
  }

  .tree-panel {
    width: 100%;
  }

  .tree-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .branch-row,
  .branch-row-wide {
    grid-template-columns: 1fr;
  }

  .tree-visual::before {
    inset: 86px 50% 86px;
    border-top: 0;
    border-left: 2px solid #d5c6a8;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
