@font-face {
  font-family: "Akrobat";
  src: url("/assets/fonts/Akrobat-Light.otf") format("opentype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Akrobat";
  src: url("/assets/fonts/Akrobat-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Akrobat";
  src: url("/assets/fonts/Akrobat-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Akrobat";
  src: url("/assets/fonts/Akrobat-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Akrobat";
  src: url("/assets/fonts/Akrobat-ExtraBold.otf") format("opentype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --green: #59665c;
  --green-2: #245242;
  --wood: #d5792a;
  --sand: #f4eee4;
  --paper: #fffaf2;
  --line: #dfd4c3;
  --ink: #17231e;
  --muted: #66746d;
  --danger: #9b2f21;
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
.shell {
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--sand);
  font-family: "Akrobat", "Arial Narrow", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.startup-screen {
  display: grid;
  min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) calc(24px + env(safe-area-inset-left, 0px));
  place-items: center;
  color: var(--paper);
  background: var(--green);
  text-align: center;
}

.startup-panel {
  display: grid;
  width: min(100%, 420px);
  justify-items: center;
  gap: 12px;
}

.startup-logo {
  width: min(190px, 58vw);
  height: auto;
  margin-bottom: 18px;
}

.startup-panel h1,
.startup-panel p {
  margin: 0;
}

.startup-panel h1 {
  color: inherit;
  font-size: 30px;
}

.startup-panel p {
  color: rgba(255, 250, 242, 0.82);
}

.startup-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 250, 242, 0.3);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: startup-spin 0.8s linear infinite;
}

.startup-panel .primary {
  min-width: 150px;
  margin-top: 8px;
}

@keyframes startup-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .startup-spinner { animation: none; }
}

.native-app body {
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px)) 14px calc(18px + env(safe-area-inset-left, 0px));
  color: white;
  background: var(--green);
}

.connection-status {
  position: sticky;
  top: calc(80px + env(safe-area-inset-top, 0px));
  z-index: 9;
  padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  color: var(--green-2);
  background: var(--sand);
  border-bottom: 2px solid var(--wood);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.connection-status button {
  margin-left: 10px;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.connection-status.is-checking {
  background: var(--paper);
}

.connection-status button:disabled {
  cursor: wait;
  opacity: 0.78;
}

@media (max-width: 520px) {
  .connection-status {
    display: grid;
    gap: 6px;
  }

  .connection-status button {
    margin-left: 0;
    justify-self: center;
  }
}

.connection-status[hidden] {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-header {
  min-width: 0;
}

button.brand-header {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.brand-logo {
  display: block;
  width: clamp(118px, 23vw, 156px);
  height: 52px;
  object-fit: contain;
}

.brand-mark {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 250, 242, 0.96);
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.phone {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.content {
  width: min(1100px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 16px 100px;
}

.hero {
  display: grid;
  gap: 18px;
  padding: 24px 0 18px;
}

.hero.compact {
  gap: 12px;
  padding-bottom: 10px;
}

.eyebrow {
  width: fit-content;
  padding: 6px 10px;
  color: var(--green);
  background: #eadfce;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(31px, 7vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--green);
  font-weight: 800;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.journal-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.journal-notification-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.journal-notification-toggle .nav-icon {
  width: 20px;
  height: 20px;
}

.journal-notification-toggle.active {
  border-color: var(--wood);
  color: var(--green);
  background: #eadfce;
}

.hero .journal-new-note,
.hero .journal-notification-note {
  max-width: 720px;
  padding: 8px 10px;
  border-left: 3px solid var(--wood);
  color: var(--green);
  background: rgba(234, 223, 206, 0.58);
  font-size: 16px;
  line-height: 1.35;
}

@media (max-width: 620px) {
  .journal-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .journal-notification-toggle {
    width: 100%;
    justify-content: center;
  }
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.check {
  color: var(--muted);
  font-size: 16px;
}

.field span small {
  font-size: 0.9em;
  font-weight: 400;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  outline: none;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--wood);
  box-shadow: 0 0 0 3px rgba(213, 121, 42, 0.16);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 11px 15px;
  color: white;
  background: var(--wood);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.btn.secondary {
  color: var(--green);
  background: #e9dfcf;
}

.btn.ghost {
  color: var(--green);
  background: transparent;
  border: 1px solid var(--line);
}

.message {
  min-height: 18px;
  color: var(--muted);
  font-size: 16px;
}

.lead-form-head {
  margin: 4px 0 18px;
}

.lead-form-head h2 {
  margin: 0 0 6px;
}

.lead-form-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.lead-form {
  gap: 14px;
}

.lead-consent {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ink);
  line-height: 1.35;
}

.lead-consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--wood);
}

.lead-consent a {
  color: var(--green);
  text-underline-offset: 3px;
}

.lead-form .btn:disabled {
  cursor: not-allowed;
  background: #b8afa2;
  opacity: 1;
}

.lead-success-panel {
  min-height: min(460px, 90vh);
}

.lead-success {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 14px;
  min-height: 330px;
  padding: 28px 4px;
}

.lead-success h2,
.lead-success p {
  margin: 0;
}

.lead-success p {
  max-width: 520px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.45;
}

.lead-success-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 30px;
  font-weight: 700;
}

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

.project-head {
  margin-bottom: 10px;
}

.project-tools {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-filter-group {
  display: grid;
  gap: 6px;
}

.project-filter-group > span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.project-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 42px;
  padding: 3px;
  background: #e6dccd;
  border-radius: 8px;
}

.segmented-control.kind-segments {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented-control.area-segments {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented-control button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  padding: 7px 8px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented-control button.active {
  color: var(--green);
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(23, 59, 47, 0.12);
}

.project-reset {
  justify-self: start;
  border: 0;
  padding: 0;
  color: var(--wood);
  background: transparent;
  font-weight: 700;
}

.project-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  min-height: 220px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cover {
  width: 100%;
  min-width: 0;
  min-height: 116px;
  aspect-ratio: 2.75 / 1;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(23, 59, 47, 0.86), rgba(36, 82, 66, 0.78)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 22px);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.card-cover-open {
  display: block;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: inherit;
  appearance: none;
  cursor: pointer;
}

.card-cover-open:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px auto;
  width: 76px;
  height: 44px;
  background: var(--wood);
  clip-path: polygon(0 45%, 50% 0, 100% 45%, 100% 100%, 0 100%);
  opacity: 0.92;
}

.cover.has-image::after {
  display: none;
}

.video-cover {
  display: grid;
  place-items: center;
}

.play-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: var(--green);
  background: rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(255, 250, 242, 0.65);
  border-radius: 999px;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 32px rgba(23, 35, 30, 0.2);
}

.play-badge.large {
  width: 64px;
  height: 64px;
  font-size: 28px;
}

.type {
  width: fit-content;
  padding: 5px 8px;
  color: var(--green);
  background: #eadfce;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.card h3 {
  margin: 0;
  color: var(--green);
  font-size: 24px;
  letter-spacing: 0;
}

.publication-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.publication-date svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: var(--wood);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 .title-link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.title-link {
  display: inline;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.18;
  text-align: left;
}

.title-link:hover,
.title-link:focus-visible {
  color: var(--wood);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.title-link:focus-visible {
  outline: 2px solid rgba(213, 121, 42, 0.35);
  outline-offset: 3px;
  border-radius: 4px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #39564a;
  background: #efe6d8;
  font-size: 15px;
}

.card-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.card-actions .btn {
  flex: 1 1 auto;
}

.card-actions .card-open {
  min-width: 0;
}

.favorite-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: transparent;
}

.favorite-btn .nav-icon {
  width: 22px;
  height: 22px;
}

.favorite-btn.active {
  color: var(--wood);
  border-color: rgba(213, 121, 42, 0.42);
  background: #f2e4d2;
}

.favorite-btn.active .nav-icon {
  fill: currentColor;
}

.topic-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 18px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.topic-tabs button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--green);
  background: var(--paper);
  font-weight: 700;
}

.topic-tabs button.active {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.video-card {
  min-height: 280px;
}

.knowledge-map {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.knowledge-stage {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.knowledge-stage:hover,
.knowledge-stage:focus-visible {
  border-color: rgba(213, 121, 42, 0.7);
  background: #fff6e9;
}

.knowledge-stage:focus-visible {
  outline: 3px solid rgba(213, 121, 42, 0.2);
  outline-offset: 2px;
}

.stage-number {
  color: var(--wood);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.stage-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stage-copy strong {
  color: var(--green);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
}

.stage-copy small {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.28;
}

.stage-counts {
  justify-self: end;
  min-width: 54px;
  color: #39564a;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.knowledge-detail {
  display: grid;
  gap: 14px;
}

.knowledge-back {
  justify-self: start;
}

.knowledge-detail-head,
.knowledge-checklist,
.knowledge-materials,
.knowledge-point-answer {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.knowledge-detail-head h2,
.knowledge-checklist h3 {
  margin: 0;
  color: var(--green);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.knowledge-detail-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.knowledge-point-answer {
  border-left: 5px solid var(--wood);
}

.knowledge-point-answer span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: #eadfce;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.knowledge-point-answer p {
  margin: 0;
  color: var(--green);
  font-size: 22px;
  line-height: 1.36;
  font-weight: 600;
}

.knowledge-check {
  position: relative;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px 10px 28px;
  color: var(--ink);
  background: transparent;
  line-height: 1.34;
  text-align: left;
}

.knowledge-check::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 1.05em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--wood);
}

.knowledge-check:hover,
.knowledge-check:focus-visible {
  border-color: rgba(213, 121, 42, 0.42);
  color: var(--green);
  background: #fff6e9;
}

.knowledge-check:focus-visible {
  outline: 3px solid rgba(213, 121, 42, 0.2);
  outline-offset: 2px;
}

.section-head.slim {
  margin: 0 0 2px;
}

.section-head.slim h2 {
  font-size: 28px;
}

.knowledge-material {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 6px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.knowledge-material:first-of-type {
  border-top: 0;
}

.material-kind {
  width: fit-content;
  height: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: #eadfce;
  font-size: 15px;
  font-weight: 700;
}

.knowledge-material .title-link {
  align-self: center;
  color: var(--green);
  font-size: 21px;
}

.knowledge-favorite {
  align-self: start;
}

.knowledge-material p,
.knowledge-material .meta {
  grid-column: 2 / 4;
  margin: 0;
}

.knowledge-material p {
  color: var(--muted);
  line-height: 1.36;
}

.scenario-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 14px 0;
  padding: 18px;
  border: 1px solid rgba(213, 121, 42, 0.42);
  border-left: 5px solid var(--wood);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(23, 59, 47, 0.08);
}

.scenario-entry h2,
.scenario-panel h1 {
  margin: 0;
  color: var(--green);
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.scenario-entry p,
.scenario-panel > p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.scenario-entry-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 190px;
}

.scenario-entry-side strong {
  color: var(--green-2);
  font-size: 17px;
}

.scenario-shell {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}

.scenario-back {
  justify-self: start;
  min-height: 42px;
}

.scenario-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.scenario-exit {
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.scenario-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.scenario-panel > span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--green);
  background: #eadfce;
  font-size: 15px;
  font-weight: 800;
}

.scenario-intro {
  min-height: 420px;
  align-content: center;
}

.scenario-intro-list {
  display: grid;
  gap: 7px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.scenario-intro-list li {
  position: relative;
  padding-left: 23px;
  color: var(--green-2);
}

.scenario-intro-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wood);
}

.scenario-progress-line {
  display: grid;
  gap: 7px;
}

.scenario-progress-line > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.scenario-progress-line strong {
  color: var(--green);
}

.scenario-progress-line i {
  display: block;
  height: 9px;
  border-radius: 8px;
  overflow: hidden;
  background: #e6dccd;
}

.scenario-progress-line b {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: var(--wood);
  transition: width 0.2s ease;
}

.scenario-question {
  min-height: 480px;
  align-content: start;
}

.scenario-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scenario-options button {
  min-height: 60px;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #fffdf8;
  font-weight: 700;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.scenario-options button:hover,
.scenario-options button:focus-visible,
.scenario-options button.selected {
  border-color: var(--wood);
  background: #fff6e9;
  transform: translateY(-1px);
}

.scenario-options button:disabled,
.scenario-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.scenario-check {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: 1px solid #bcae9a;
  border-radius: 4px;
  color: #fff;
  background: #fff;
  font-size: 15px;
}

.scenario-options button.selected .scenario-check {
  border-color: var(--wood);
  background: var(--wood);
}

.scenario-actions,
.scenario-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.scenario-save-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.scenario-save-status.saving {
  color: var(--green-2);
  background: rgba(36, 82, 66, 0.08);
}

.scenario-save-status.saving span {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(36, 82, 66, 0.24);
  border-top-color: var(--green-2);
  border-radius: 50%;
  animation: scenario-spin 0.8s linear infinite;
}

.scenario-save-status.error {
  border: 1px solid rgba(213, 121, 42, 0.48);
  color: #7b3715;
  background: #fff1e3;
}

@keyframes scenario-spin {
  to { transform: rotate(360deg); }
}

.scenario-program-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.scenario-program-summary > div {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scenario-program-summary span,
.scenario-program-summary strong,
.scenario-program-summary p {
  display: block;
}

.scenario-program-summary span {
  color: var(--muted);
  font-size: 15px;
}

.scenario-program-summary strong {
  margin-top: 2px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.08;
}

.scenario-program-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.scenario-program-warning {
  padding: 13px 14px;
  border-left: 5px solid var(--wood);
  color: #6c3518;
  background: #fff1e3;
}

.scenario-program-warning strong {
  font-size: 20px;
}

.scenario-program-warning p {
  margin: 5px 0 0;
}

.scenario-program-section {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.scenario-program-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.scenario-program-heading h2 {
  margin: 0;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.scenario-program-heading span {
  color: var(--muted);
}

.scenario-space-list {
  display: grid;
}

.scenario-space-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) 100px minmax(220px, 1fr);
  gap: 6px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.scenario-space-row > div strong,
.scenario-space-row > div span {
  display: block;
}

.scenario-space-row > div strong {
  color: var(--green);
  font-size: 20px;
  line-height: 1.05;
}

.scenario-space-row > div span,
.scenario-space-row small {
  color: var(--muted);
  font-size: 14px;
}

.scenario-space-row b {
  color: var(--wood);
  font-size: 18px;
}

.scenario-space-row p {
  margin: 0;
  color: var(--ink);
  line-height: 1.3;
}

.scenario-space-row small {
  grid-column: 1 / 4;
}

.scenario-driver-list {
  display: grid;
}

.scenario-driver-list p {
  position: relative;
  margin: 0;
  padding: 9px 0 9px 22px;
  border-bottom: 1px solid var(--line);
}

.scenario-driver-list p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wood);
}

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

.scenario-advice-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.scenario-advice-grid article:first-child {
  border-left: 5px solid var(--wood);
}

.scenario-advice-grid span {
  color: var(--wood);
  font-size: 15px;
  font-weight: 800;
}

.scenario-advice-grid h3 {
  margin: 4px 0 8px;
  color: var(--green);
  font-size: 21px;
}

.scenario-advice-grid p,
.scenario-advice-grid ul {
  margin: 0;
}

.scenario-advice-grid ul {
  padding-left: 19px;
}

.scenario-advice-grid li + li {
  margin-top: 7px;
}

.scenario-print-report {
  display: none;
}

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

.scenario-project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.scenario-project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
}

.scenario-project-card > div {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.scenario-project-card h3,
.scenario-project-card p {
  margin: 0;
}

.scenario-project-card h3 {
  color: var(--green);
  font-size: 20px;
  line-height: 1.08;
}

.scenario-project-card p {
  color: var(--muted);
  line-height: 1.3;
}

.scenario-project-card .btn {
  width: 100%;
  margin-top: auto;
}

.scenario-program-note {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

@media (max-width: 860px) {
  .scenario-projects {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .scenario-entry {
    grid-template-columns: 1fr;
  }

  .scenario-entry-side {
    justify-items: start;
    min-width: 0;
  }

  .scenario-entry,
  .scenario-panel {
    padding: 14px;
  }

  .scenario-entry h2,
  .scenario-panel h1 {
    font-size: 29px;
  }

  .scenario-question {
    min-height: 0;
  }

  .scenario-options,
  .scenario-program-summary,
  .scenario-advice-grid {
    grid-template-columns: 1fr;
  }

  .scenario-space-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .scenario-space-row p,
  .scenario-space-row small {
    grid-column: 1 / 3;
  }

  .scenario-program-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-final-actions .btn {
    width: 100%;
  }
}

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.96);
  backdrop-filter: blur(12px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}

.nav button {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  font-size: 14px;
}

.nav button.active {
  color: var(--green);
  box-shadow: inset 0 3px 0 var(--wood);
}

.nav-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-logo-icon {
  width: 28px;
  height: 30px;
  fill: currentColor;
  stroke: none;
}

.nav button:focus-visible {
  outline: 2px solid rgba(213, 121, 42, 0.45);
  outline-offset: -8px;
}

/* Client cabinet */
.cabinet-page {
  display: grid;
  gap: 18px;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 20px 18px 112px;
}

.cabinet-hero,
.cabinet-section {
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(23, 35, 30, 0.06);
}

.cabinet-hero {
  display: grid;
  gap: 20px;
  color: var(--paper);
  background: linear-gradient(145deg, var(--green-2), var(--green));
  border-color: transparent;
}

.cabinet-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 250, 242, 0.72);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cabinet-hero h1,
.cabinet-hero p,
.cabinet-section h2,
.cabinet-section h3,
.cabinet-message p {
  margin: 0;
}

.cabinet-hero h1 { color: inherit; font-size: clamp(30px, 7vw, 46px); }
.cabinet-hero p { color: rgba(255, 250, 242, 0.82); }

.cabinet-progress { display: grid; gap: 8px; }
.cabinet-progress-copy { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.cabinet-progress-copy strong { font-size: 30px; }
.cabinet-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255, 250, 242, 0.2); }
.cabinet-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--wood); }

.cabinet-project-select { display: grid; gap: 6px; }
.cabinet-project-select span { font-size: 14px; font-weight: 700; }
.cabinet-project-select select { width: 100%; padding: 11px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; color: var(--paper); background: rgba(0,0,0,.12); }

.cabinet-tabs {
  position: sticky;
  top: calc(78px + env(safe-area-inset-top, 0px));
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.96);
  backdrop-filter: blur(12px);
}

.cabinet-tabs button { min-width: 0; padding: 9px 8px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 15px; font-weight: 700; }
.cabinet-tabs button.active { color: var(--paper); background: var(--green); }
.cabinet-section { scroll-margin-top: 150px; }
.cabinet-section-head, .cabinet-stage-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cabinet-section-head { margin-bottom: 18px; }
.cabinet-section-head span, .cabinet-stage-title span, .cabinet-muted { color: var(--muted); }

.cabinet-timeline { display: grid; }
.cabinet-stage { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding-bottom: 22px; }
.cabinet-stage:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.cabinet-stage-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 4px; border: 3px solid var(--paper); border-radius: 50%; background: var(--wood); box-shadow: 0 0 0 1px var(--wood); }
.cabinet-stage.is-complete .cabinet-stage-dot { background: var(--green-2); box-shadow: 0 0 0 1px var(--green-2); }
.cabinet-stage small, .cabinet-document small, .cabinet-message small { color: var(--muted); }
.cabinet-report { margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--sand); }
.cabinet-report p { margin: 4px 0 0; }
.cabinet-report-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cabinet-report-media button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-2); background: var(--paper); font-weight: 700; }
.cabinet-report-media button span { color: var(--wood); }

.cabinet-document-list, .cabinet-messages { display: grid; gap: 10px; }
.cabinet-document { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.cabinet-document > div > span { color: var(--wood); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.cabinet-document button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--sand); }

.cabinet-message { width: min(86%, 560px); padding: 11px 13px; border-radius: 14px; background: var(--sand); }
.cabinet-message.is-client { justify-self: end; background: #e2eadf; }
.cabinet-message small { display: block; margin-top: 5px; font-size: 13px; }
.cabinet-composer { display: grid; gap: 9px; margin-top: 16px; }
.cabinet-composer label { font-weight: 700; }
.cabinet-composer textarea { resize: vertical; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; }
.cabinet-draft-status { min-height: 18px; color: var(--muted); font-size: 13px; }
.cabinet-draft-conflict { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid rgba(243, 108, 50, 0.45); border-radius: 10px; background: rgba(243, 108, 50, 0.08); }
.cabinet-draft-conflict button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--wood); border-radius: 9px; color: var(--wood); background: var(--paper); font-weight: 700; }
.cabinet-composer button { justify-self: end; }
.cabinet-feedback-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.cabinet-feedback-actions button { min-height: 44px; padding: 9px 13px; border: 1px solid var(--wood); border-radius: 10px; color: var(--wood); background: transparent; font-weight: 700; }
.cabinet-feedback-actions button.is-active { color: var(--paper); background: var(--wood); }
.cabinet-feedback-actions span { color: var(--muted); font-size: 14px; }
.cabinet-notice { margin: 10px 0 0; color: var(--green-2); font-weight: 600; }
.cabinet-camera-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.cabinet-camera { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--sand); }
.cabinet-camera-preview { display: grid; min-height: 170px; place-items: center; color: rgba(255,255,255,.75); background: #1d2924; font-size: 42px; }
.cabinet-camera-preview video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #111; }
.cabinet-camera-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; }
.cabinet-camera-copy h3 { margin: 0; }
.cabinet-camera-copy small { color: var(--muted); }
.cabinet-camera-copy button { padding: 8px 12px; border: 0; border-radius: 9px; color: var(--paper); background: var(--green); font-weight: 700; }
.cabinet-camera-copy button:disabled { color: var(--muted); background: var(--line); cursor: not-allowed; }
.cabinet-state { width: min(100% - 36px, 700px); margin: 32px auto; padding: 28px; border-radius: 18px; background: var(--paper); text-align: center; }
.cabinet-auth-page { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 18px; width: min(100% - 36px, 980px); margin: 24px auto 112px; }
.cabinet-auth-brand, .cabinet-auth-card { padding: clamp(24px, 5vw, 42px); border-radius: 22px; }
.cabinet-auth-brand { display: grid; align-content: end; min-height: 430px; color: var(--paper); background: linear-gradient(145deg, var(--green-2), var(--green)); }
.cabinet-auth-brand h1 { max-width: 620px; margin: 4px 0 12px; color: inherit; font-size: clamp(36px, 7vw, 58px); line-height: .95; }
.cabinet-auth-brand p { max-width: 520px; margin: 0; color: rgba(255,250,242,.8); font-size: 18px; }
.cabinet-auth-card { align-self: center; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 16px 38px rgba(23,35,30,.08); }
.cabinet-auth-form { display: grid; gap: 16px; }
.cabinet-auth-form label { display: grid; gap: 7px; font-weight: 700; }
.cabinet-auth-form input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; font: inherit; }
.cabinet-auth-form input:focus-visible { outline: 3px solid rgba(213,121,42,.26); border-color: var(--wood); }
.cabinet-auth-form button { width: 100%; min-height: 48px; }
.cabinet-auth-notice { margin: 16px 0 0; color: var(--green-2); font-weight: 700; }
.cabinet-auth-help { margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.cabinet-signout { justify-self: start; padding: 8px 12px; border: 1px solid rgba(255,250,242,.35); border-radius: 9px; color: var(--paper); background: rgba(0,0,0,.12); font-weight: 700; }
.cabinet-push-toggle { justify-self: start; padding: 8px 12px; border: 1px solid rgba(255,250,242,.45); border-radius: 8px; color: var(--paper); background: transparent; font-weight: 700; }
.cabinet-push-toggle.is-active { color: var(--green); background: var(--paper); border-color: var(--paper); }
.cabinet-push-toggle:disabled { opacity: .7; cursor: wait; }
.cabinet-push-consent { max-width: 520px; display: grid; gap: 8px; }
.cabinet-push-consent p { margin: 0; color: rgba(255,250,242,.82); font-size: 13px; line-height: 1.45; }

@media (max-width: 520px) {
  .cabinet-page { padding: 14px 12px 112px; }
  .cabinet-hero, .cabinet-section { border-radius: 16px; }
  .cabinet-section-head, .cabinet-stage-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .cabinet-document { align-items: flex-start; flex-direction: column; }
  .cabinet-document button, .cabinet-composer button, .cabinet-feedback-actions button { width: 100%; }
  .cabinet-tabs { gap: 3px; padding: 5px; }
  .cabinet-tabs button { padding: 8px 3px; font-size: 13px; }
}

@media (max-width: 760px) {
  .cabinet-auth-page { grid-template-columns: 1fr; width: min(100% - 24px, 560px); margin-top: 12px; }
  .cabinet-auth-brand { min-height: 230px; border-radius: 16px; }
  .cabinet-auth-card { border-radius: 16px; }
}

.company-hero h1 {
  font-size: clamp(38px, 9vw, 64px);
}

.company-section {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.technology-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.technology-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.company-link-card {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.company-link-card::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--wood);
  font-size: 28px;
  line-height: 1;
  opacity: 0.72;
}

.company-link-card:hover,
.company-link-card:focus-visible {
  border-color: rgba(213, 121, 42, 0.55);
  box-shadow: 0 10px 24px rgba(23, 59, 47, 0.08);
  transform: translateY(-1px);
}

.company-link-card:focus-visible {
  outline: 2px solid rgba(213, 121, 42, 0.36);
  outline-offset: 2px;
}

.tech-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: #eadfce;
}

.tech-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.technology-card h3,
.trust-item h3 {
  margin: 0;
  color: var(--green);
  font-size: 22px;
  line-height: 1.04;
  font-weight: 800;
}

.technology-card p,
.trust-item p,
.review-card p,
.contact-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.founder-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--wood);
  border-radius: 8px;
  background: var(--paper);
}

.founder-panel blockquote {
  margin: 0;
  display: grid;
  gap: 12px;
}

.founder-panel p {
  margin: 0;
  max-width: 820px;
  color: var(--green);
  font-size: 25px;
  line-height: 1.22;
  font-weight: 600;
}

.founder-panel cite {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trust-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border: 1px solid rgba(213, 121, 42, 0.28);
  border-radius: 8px;
  background: #fff6e9;
}

.trust-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-icon .accent {
  stroke: var(--wood);
}

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

.section-count {
  color: var(--muted);
  font-size: 16px;
}

.review-scroll {
  max-height: min(560px, 68vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 8px;
  scroll-behavior: smooth;
}

.review-scroll:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 4px;
}

.review-scroll::-webkit-scrollbar {
  width: 8px;
}

.review-scroll::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #b8aa95;
}

.review-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6e9;
}

.review-card::before {
  content: "“";
  display: block;
  height: 20px;
  color: var(--wood);
  font-size: 44px;
  line-height: 0.8;
  font-weight: 800;
}

.review-card strong,
.review-card span {
  display: block;
}

.review-card strong {
  margin-top: 14px;
  color: var(--green);
  font-size: 18px;
}

.review-card span {
  color: var(--muted);
  font-size: 15px;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-top: 14px;
  padding: 18px;
  border-radius: 8px;
  color: white;
  background: var(--green);
}

.contact-band h2 {
  margin: 8px 0;
  font-size: 32px;
  line-height: 1;
}

.contact-band p {
  color: rgba(255, 255, 255, 0.76);
}

.contact-band .type {
  color: var(--green);
  background: #f3dfc7;
}

.contact-band .contact-list a {
  color: white;
  text-decoration-color: rgba(213, 121, 42, 0.8);
}

.contact-actions {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.contact-actions .btn.ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.28);
}

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

.info-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.info-panel h2 {
  margin: 0;
  color: var(--green);
  font-size: 22px;
  letter-spacing: 0;
}

.info-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.clean-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.contact-panel {
  background: #f8f2e8;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-list a {
  width: fit-content;
  color: var(--green);
  font-weight: 760;
  text-decoration-color: rgba(213, 121, 42, 0.55);
  text-underline-offset: 4px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 14px;
}

.section-head h2 {
  margin: 0;
  color: var(--green);
  font-size: 34px;
  letter-spacing: 0;
  font-weight: 800;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  background: rgba(23, 35, 30, 0.42);
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  overscroll-behavior: contain;
}

.drawer.open {
  display: grid;
  align-items: end;
}

.drawer-panel {
  max-height: min(760px, 92vh);
  overflow: auto;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px;
  border-radius: 8px;
  background: var(--paper);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.drawer-open {
  overflow: hidden;
}

.drawer-close-bar {
  position: sticky;
  top: -18px;
  z-index: 8;
  display: flex;
  margin: -18px -18px 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.98);
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  padding: 6px 4px;
  color: var(--green);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.drawer-close span {
  font-size: 24px;
  line-height: 1;
}

.drawer-panel h2 {
  margin: 8px 0;
  color: var(--green);
  font-size: 34px;
  font-weight: 800;
}

.drawer-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.article-body p {
  margin: 0 0 14px;
}

.offline-article-preview {
  display: grid;
  gap: 16px;
}

.offline-preview-notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: var(--beige);
  color: var(--green);
}

.offline-preview-notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
}

.drawer-panel .offline-preview-notice p {
  margin: 0;
  color: var(--green-2);
}

.offline-article-summary {
  margin: 0;
}

.rich-article-body {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
}

.rich-article-body h3 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.rich-article-body blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--orange);
  background: var(--beige, #f4eee4);
  color: var(--green, #245242);
}

.rich-article-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.article-media {
  margin: 22px 0;
}

.article-media-open {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line, #dfd4c3);
  border-radius: 8px;
  background: #f4eee4;
  cursor: zoom-in;
}

.article-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70dvh, 720px);
  object-fit: contain;
}

.article-media figcaption {
  margin-top: 7px;
  color: var(--muted, #66766f);
  font-size: 0.88rem;
  line-height: 1.35;
}

.article-media-open:focus-visible {
  outline: 3px solid rgba(213, 121, 42, 0.45);
  outline-offset: 3px;
}

.guide-article {
  display: grid;
  gap: 16px;
}

.guide-lead {
  margin: 0;
  font-size: 19px;
}

.guide-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.guide-section h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 23px;
  line-height: 1.08;
}

.guide-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.guide-section li {
  color: var(--muted);
  line-height: 1.4;
}

.guide-section li::marker {
  color: var(--wood);
}

.checklist-article {
  display: grid;
  gap: 12px;
}

.checklist-lead {
  margin: 0;
  color: var(--muted);
}

.checklist-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.76);
}

.checklist-section h3 {
  margin: 0;
  color: var(--green);
  font-size: 23px;
  line-height: 1.08;
}

.checklist-note {
  margin: 0;
  color: #607368;
  font-size: 16px;
  line-height: 1.32;
}

.checklist-items {
  display: grid;
  gap: 8px;
}

.checklist-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid rgba(214, 202, 184, 0.68);
}

.checklist-item:first-child {
  border-top: 0;
}

.check-marker {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid rgba(23, 59, 47, 0.45);
  border-radius: 5px;
  background: #fffaf2;
}

.checklist-item strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
}

.checklist-item small {
  display: block;
  margin-top: 3px;
  color: #6d7a71;
  font-size: 15px;
  line-height: 1.25;
}

.article-note {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #f4eadb;
  line-height: 1.35;
}

.project-video {
  display: grid;
  gap: 12px;
  margin: 4px 0 24px;
}

.project-video h3 {
  margin: 0;
  color: var(--green);
  font-size: 27px;
  font-weight: 700;
}

.project-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #59665c;
  overflow: hidden;
}

.project-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content-video-frame {
  margin: 8px 0 20px;
}

.content-video {
  margin-bottom: 20px;
}

.content-video .content-video-frame {
  margin-bottom: 8px;
}

.media-external-link {
  width: fit-content;
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.media-unavailable:not(.cover) {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 18px;
  cursor: default;
  background: #f4eee4;
}

.media-unavailable-label {
  max-width: 260px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

button.media-unavailable:disabled {
  opacity: 1;
}

.project-gallery {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
}

.project-gallery h3 {
  margin: 0;
  color: var(--green);
  font-size: 27px;
  font-weight: 700;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-detail-panel {
  width: min(920px, 100%);
}

.detail-project-cover {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #efe6d8;
  overflow: hidden;
}

.detail-project-cover img {
  display: block;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.project-detail-head h2 {
  max-width: 780px;
  margin: 0;
  font-size: 36px;
  line-height: 1.08;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.project-facts div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 84px;
  padding: 13px 15px;
  background: rgba(255, 250, 242, 0.98);
}

.project-facts dt {
  color: var(--muted);
  font-size: 15px;
}

.project-facts dd {
  margin: 0;
  color: var(--green);
  font-size: 24px;
  font-weight: 750;
}

.project-program {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
}

.project-program h3 {
  margin: 0;
  color: var(--green);
  font-size: 27px;
}

.project-program ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.project-program li {
  position: relative;
  min-width: 0;
  padding: 10px 8px 10px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.project-program li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wood);
}

.project-detail-summary {
  margin: 16px 0 22px;
}

.project-detail-actions {
  padding-top: 4px;
}

.image-trigger {
  cursor: zoom-in;
}

.detail-cover.image-trigger {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
}

.project-gallery-item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #efe6d8;
  overflow: hidden;
}

.project-gallery-item:focus-visible,
.detail-cover:focus-visible {
  outline: 3px solid rgba(213, 121, 42, 0.45);
  outline-offset: 3px;
}

.project-gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #efe6d8;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 24, 20, 0.86);
}

.image-viewer-panel {
  position: relative;
  width: min(1180px, 100%);
  height: min(820px, 92vh);
  display: grid;
  place-items: center;
}

.image-viewer-panel img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  transform-origin: center;
  will-change: transform;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.image-viewer.is-zoomed .image-viewer-panel img {
  cursor: grab;
}

.image-viewer.is-zoomed .image-viewer-panel:active img {
  cursor: grabbing;
}

.image-viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 250, 242, 0.45);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 250, 242, 0.94);
  font-size: 28px;
  line-height: 1;
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 242, 0.45);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 250, 242, 0.94);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
  touch-action: manipulation;
}

.image-viewer-prev {
  left: 10px;
}

.image-viewer-next {
  right: 10px;
}

.image-viewer-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  min-width: 64px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--paper);
  background: rgba(23, 59, 47, 0.9);
  text-align: center;
  transform: translateX(-50%);
}

.image-viewer-nav:focus-visible,
.image-viewer-close:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .image-viewer {
    padding: 8px;
  }

  .image-viewer-panel {
    height: 94dvh;
  }

  .image-viewer-nav {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .image-viewer-prev {
    left: 4px;
  }

  .image-viewer-next {
    right: 4px;
  }
}

.empty {
  padding: 22px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.58);
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technology-grid,
  .review-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .drawer {
    padding: calc(6px + env(safe-area-inset-top, 0px)) calc(6px + env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) calc(6px + env(safe-area-inset-left, 0px));
  }

  .drawer.open {
    align-items: stretch;
  }

  .drawer-panel {
    max-height: calc(100dvh - 12px);
    padding: 14px;
  }

  .drawer-close-bar {
    top: -14px;
    margin: -14px -14px 12px;
    padding: 8px 14px;
  }

  .topbar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) 10px calc(14px + env(safe-area-inset-left, 0px));
  }

  .brand-logo {
    width: 126px;
    height: 44px;
  }

  .phone {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content {
    padding-inline: 12px;
  }

  .project-tools {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .project-filter-row {
    grid-template-columns: 1fr;
  }

  .segmented-control button {
    padding-inline: 5px;
    font-size: 14px;
  }

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

  .cover {
    min-height: 0;
  }

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

  .technology-grid,
  .trust-list,
  .review-strip,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    min-width: 0;
  }

  .hero h1 {
    font-size: 38px;
  }

  .card-actions {
    flex-direction: row;
  }

  .knowledge-stage {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .stage-number {
    font-size: 18px;
  }

  .stage-counts {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .knowledge-detail-head h2,
  .knowledge-checklist h3 {
    font-size: 27px;
  }

  .knowledge-material {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .knowledge-material .material-kind {
    grid-column: 1 / 3;
  }

  .knowledge-material p,
  .knowledge-material .meta {
    grid-column: 1 / 3;
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-head h2 {
    font-size: 29px;
  }

  .detail-project-cover img {
    max-height: 360px;
    aspect-ratio: 4 / 3;
  }

  .project-facts {
    grid-template-columns: 1fr 1fr;
  }

  .project-facts div {
    min-height: 72px;
    padding: 11px 12px;
  }

  .project-facts div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .project-facts dt {
    font-size: 14px;
  }

  .project-facts dd {
    font-size: 21px;
  }

  .project-program ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .review-scroll {
    max-height: min(500px, 62vh);
    padding-right: 5px;
  }
}

@media print {
  body.printing-scenario-report > *:not(.scenario-print-report) {
    display: none !important;
  }

  body.printing-scenario-report {
    color: #59665c;
    background: #fff;
  }

  body.printing-scenario-report .scenario-print-report {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.35;
  }

  .scenario-print-report header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d5792a;
  }

  .scenario-print-report h1,
  .scenario-print-report h2 {
    margin: 0 0 8px;
  }

  .scenario-print-report h2 {
    margin-top: 20px;
    font-size: 16pt;
  }

  .scenario-print-report .summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .scenario-print-report .summary > div {
    padding: 8px;
    border: 1px solid #dfd4c3;
  }

  .scenario-print-report .summary span,
  .scenario-print-report .summary strong,
  .scenario-print-report .summary small,
  .scenario-print-report td small,
  .scenario-print-report ol small {
    display: block;
  }

  .scenario-print-report table {
    width: 100%;
    border-collapse: collapse;
  }

  .scenario-print-report th,
  .scenario-print-report td {
    padding: 7px;
    border-bottom: 1px solid #dfd4c3;
    text-align: left;
    vertical-align: top;
  }

  .scenario-print-report ul,
  .scenario-print-report ol {
    padding-left: 20px;
  }

  .scenario-print-report .note {
    margin-top: 18px;
    padding: 10px;
    background: #f4eee4;
  }
}


/* Knowledge navigation */
.knowledge-hero { padding-bottom: 10px; }
.knowledge-browser { display: grid; gap: 8px; }
.knowledge-search {
  position: sticky;
  top: 66px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.96);
  backdrop-filter: blur(8px);
}
.knowledge-search input {
  min-width: 0;
  border: 0;
  padding: 8px 10px;
  color: var(--green);
  background: transparent;
  font: inherit;
  font-size: 18px;
  outline: 0;
}
.knowledge-search button {
  width: 42px;
  height: 42px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 28px;
  line-height: 1;
}
.knowledge-search-status {
  min-height: 20px;
  margin: 0 4px 2px;
  color: var(--muted);
  font-size: 15px;
}
.knowledge-point-arrow { justify-self: center; font-size: 20px; line-height: 1; }
@media (max-width: 640px) { .knowledge-search { top: 52px; } }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* v1.0: labeled navigation, full article covers and one-page knowledge stages */
.nav button {
  min-width: 0;
  min-height: 72px;
  grid-template-rows: 30px auto;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 7px 3px 5px;
}

.nav-label {
  max-width: 100%;
  color: currentColor;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
}

.article-detail-cover {
  width: 100%;
  display: grid;
  place-items: center;
  margin: 12px 0 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #efe6d8;
}

.article-detail-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(520px, 58vh);
  object-fit: contain;
}

.knowledge-stage-list {
  display: grid;
  gap: 8px;
}

.knowledge-stage-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--paper);
  text-align: left;
}

.knowledge-stage-card:hover,
.knowledge-stage-card:focus-visible {
  border-color: var(--wood);
  background: #fff6e9;
}

.knowledge-stage-card[hidden] {
  display: none;
}

.knowledge-stage-card .stage-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.knowledge-stage-card .stage-copy strong {
  font-size: 22px;
  line-height: 1.05;
}

.knowledge-stage-card .stage-copy small {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
}

.knowledge-stage-page {
  max-width: 860px;
  margin: 0 auto;
}

.knowledge-stage-back {
  position: sticky;
  top: 76px;
  z-index: 8;
  margin: -2px 0 14px;
  background: rgba(255, 250, 242, 0.96);
  backdrop-filter: blur(8px);
}

.knowledge-stage-article-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px 0 22px;
  border-bottom: 2px solid var(--green);
}

.knowledge-stage-article-head .stage-number {
  padding-top: 6px;
  font-size: 20px;
}

.knowledge-stage-article-head h1 {
  margin: 0;
  color: var(--green);
  font-size: clamp(34px, 7vw, 54px);
  line-height: 0.98;
}

.knowledge-stage-article-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.4;
}

.knowledge-inline-materials {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.knowledge-inline-material {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.knowledge-inline-material h3 {
  margin: 0;
  color: var(--green);
  font-size: 23px;
  line-height: 1.1;
}

.knowledge-inline-material .article-body,
.knowledge-inline-material .article-body p,
.knowledge-inline-material > p {
  margin: 0;
}

.knowledge-inline-material .content-video-frame {
  margin: 0;
}

@media (max-width: 640px) {
  .content {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .native-app .content {
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
  }

  .native-app .nav {
    padding-right: max(2px, env(safe-area-inset-right, 0px));
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    padding-left: max(2px, env(safe-area-inset-left, 0px));
  }

  .nav button {
    min-height: 70px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .nav-logo-icon {
    width: 25px;
    height: 27px;
  }

  .nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .knowledge-stage-card {
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    gap: 8px;
    padding: 12px 10px;
  }

  .knowledge-stage-card .stage-counts {
    display: none;
  }

  .knowledge-stage-card .stage-copy strong {
    font-size: 20px;
  }

  .knowledge-stage-card .stage-copy small {
    font-size: 15px;
  }

  .knowledge-stage-back {
    top: 64px;
  }

  .knowledge-stage-article-head {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .knowledge-stage-article-head p {
    font-size: 18px;
  }

  .knowledge-stage-section {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 20px 0;
  }

  .knowledge-stage-section h2 {
    font-size: 24px;
  }

  .knowledge-inline-material {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 19px;
  }

  .native-app .nav-label {
    font-size: 10px;
  }
}


/* Knowledge base: one stage equals one route article */
.knowledge-stage-card {
  grid-template-columns: 42px minmax(0, 1fr) 24px;
}

.knowledge-route-body {
  display: grid;
  gap: 0;
}

.knowledge-route-lead {
  margin: 0;
  padding: 24px 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.55;
  border-bottom: 1px solid var(--line);
}

.knowledge-route-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.knowledge-route-section h2 {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 29px;
  line-height: 1.05;
}

.knowledge-route-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.knowledge-route-list li {
  position: relative;
  padding-left: 26px;
  line-height: 1.45;
}

.knowledge-route-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--wood);
  border-radius: 2px;
}

.knowledge-option-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-option-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.knowledge-option-list h3 {
  margin: 0;
  color: var(--green);
  font-size: 22px;
  line-height: 1.08;
}

.knowledge-option-list p,
.knowledge-control-section > p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-control-section {
  padding: 20px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--wood);
  border-radius: 8px;
  background: #fff6e9;
}

.knowledge-control-section .knowledge-route-list {
  margin-top: 14px;
}

.knowledge-video-section .knowledge-inline-material {
  padding: 0;
  border: 0;
  background: transparent;
}

.knowledge-video-section .knowledge-resource-head {
  display: none;
}

.knowledge-route-actions {
  padding-top: 18px;
}

@media (max-width: 760px) {
  .knowledge-stage-card {
    grid-template-columns: 32px minmax(0, 1fr) 20px;
  }

  .knowledge-route-lead {
    font-size: 20px;
  }

  .knowledge-option-list {
    grid-template-columns: 1fr;
  }

  .knowledge-route-section h2 {
    font-size: 26px;
  }
}
