:root {
  color-scheme: light;
  --paper: #f4f4ec;
  --white: #fffefa;
  --ink: #17352b;
  --forest: #194735;
  --muted: #50675c;
  --line: #d6ded0;
  --lime: #dce7c7;
  --rust: #795032;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: #245840; text-underline-offset: 3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #87502c; outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.08; letter-spacing: -.035em; }
h2 { font-size: 1.7rem; }
.shell { width: min(1056px, calc(100% - 40px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); background: var(--white); }
.mast-inner { display: flex; justify-content: space-between; align-items: center; min-height: 77px; gap: 16px; }
.brand { display: flex; gap: 9px; align-items: center; text-decoration: none; color: var(--ink); }
.brand img { object-fit: contain; }
.brand span { display: grid; line-height: 1.25; }
.brand small { color: var(--muted); margin-top: 3px; }
.toolbar { display: flex; align-items: center; gap: 16px; font-size: .9rem; }
.lang { padding-block: 10px; }
.pilot { display: flex; align-items: center; gap: 8px; margin-block: 22px 14px; color: var(--rust); font-size: .82rem; font-weight: 650; }
.pilot span { background: #9a6137; border-radius: 50%; width: 7px; height: 7px; }
.notice { background: #e9eedb; border: 1px solid #ccd9bc; border-inline-start: 4px solid #6e895a; padding: 13px 16px; margin-bottom: 14px; }
.entry, .intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: stretch; }
.intro { grid-template-columns: 2.1fr 1fr; }
.route-panel {
  position: relative; display: grid; align-items: center;
  min-height: 278px; padding: clamp(28px, 5vw, 55px);
  background: var(--forest) url(route.svg) no-repeat 104% 100% / min(88%, 630px);
  color: var(--white); border-radius: 17px;
}
.entry .route-panel { min-height: 442px; }
.route-copy { max-width: 33rem; position: relative; }
.route-tag { margin-bottom: 10px; color: #e3ebd2; font-size: .87rem; font-weight: 650; }
.route-copy h1 { font-size: clamp(2.35rem, 7vw, 4rem); text-wrap: balance; }
.route-copy p:not(.route-tag) { color: #f1f4e8; max-width: 27rem; margin-top: 12px; }
.route-copy .btn { margin-top: 22px; }
.companion, .auth { padding: clamp(23px, 4vw, 32px); background: var(--white); border: 1px solid var(--line); border-radius: 13px; }
.companion { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.avatar { display: grid; place-items: center; width: 48px; aspect-ratio: 1; border-radius: 50%; background: var(--lime); margin-bottom: 14px; font-weight: 800; font-size: 1.2rem; }
.companion h2 { margin-top: 3px; }
.companion p:not(.hint) { margin: 10px 0 14px; }
.auth > p { margin: 9px 0 16px; color: var(--muted); }
.auth label { margin-top: 13px; }
.auth .btn { margin-top: 18px; width: 100%; }
.auth > p:last-child { margin-bottom: 0; }
.manifest { margin-top: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; overflow: clip; }
.manifest-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 17px 24px; align-items: center; padding: 24px clamp(17px, 4vw, 32px); }
.manifest-head p { color: var(--muted); margin-top: 6px; }
.meter { min-width: min(220px, 100%); }
.meter label { margin-bottom: 5px; font-size: .87rem; }
progress { appearance: none; display: block; width: 100%; height: 8px; border: none; border-radius: 5px; background: #e5eadf; accent-color: #527a4a; overflow: hidden; }
progress::-webkit-progress-bar { background: #e5eadf; }
progress::-webkit-progress-value { background: #527a4a; }
progress::-moz-progress-bar { background: #527a4a; }
.task { border-top: 1px solid var(--line); scroll-margin: 18px; }
.task summary {
  list-style: none; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 17px;
  gap: 13px; align-items: center; padding: 16px clamp(16px, 4vw, 32px); cursor: pointer;
}
.task summary::-webkit-details-marker { display: none; }
.task summary:hover, .task[open] summary { background: #f2f6ed; }
.task summary:focus-visible { outline-offset: -4px; }
.ordinal { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-title { font-weight: 700; }
.status { font-size: .77rem; font-weight: 700; background: #eaeee6; padding: 4px 8px; border-radius: 4px; justify-self: start; }
.status-correction { background: #f6e6ce; color: #6b3d15; }
.status-review, .status-ready, .status-approved { background: #e1ecd7; color: #294f36; }
.toggle { justify-self: end; width: 8px; height: 8px; border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(45deg); }
.task[open] .toggle { transform: rotate(225deg); }
.task-body { padding: 20px clamp(17px, 4vw, 32px) 25px; }
.task-body > p { margin-bottom: 12px; }
.correction { background: #fff4e4; border-inline-start: 4px solid #a87547; padding: 10px 13px; overflow-wrap: anywhere; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 650; }
.hint { color: var(--muted); font-size: .88rem; }
.field .hint, #password-hint { margin: 3px 0 7px; }
textarea, input:not([type=hidden]) { width: 100%; padding: 10px 11px; min-height: 44px; border: 1px solid #9daa9b; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
input[type=file] { padding: 7px; }
input::file-selector-button { font: inherit; padding: 4px 9px; border: 1px solid #a1ab99; border-radius: 3px; background: #e9eee3; color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px;
  border: 1px solid transparent; border-radius: 6px; font: inherit; line-height: 1.25; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--forest); color: var(--white); }
.btn.primary:hover { background: #276047; }
.btn.secondary { border-color: #a5b6a8; color: var(--forest); background: var(--white); }
.btn.secondary:hover { background: #ecf1e9; }
.btn.light { background: var(--lime); color: var(--ink); }
.btn.light:focus-visible { outline-color: #f3d3a5; }
.btn.small { font-size: .85rem; padding-inline: 12px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.send { border-top: 1px solid var(--line); padding: 16px clamp(17px, 4vw, 32px); }
.received { font-weight: 750; }
.footer { color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 14px; padding-block: 26px; }
@media (max-width: 710px) {
  .entry, .intro { grid-template-columns: 1fr; gap: 12px; }
  .entry .route-panel, .route-panel { min-height: 0; }
  .route-panel { background-position: 120% 100%; }
  .companion { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; }
  .companion .avatar { grid-row: 1 / 3; margin: 0; }
  .companion > :nth-child(n+4) { grid-column: 2; }
  .companion .btn { justify-self: start; }
}
@media (max-width: 435px) {
  .shell { width: calc(100% - 28px); }
  .mast-inner { flex-wrap: wrap; gap: 0 7px; padding-block: 6px; }
  .toolbar { gap: 9px; }
  .brand img { width: 45px; height: 45px; }
  .brand strong { font-size: .89rem; }
  .brand small { font-size: .72rem; }
  .task summary { grid-template-columns: 23px minmax(0, 1fr) 12px; gap: 3px 9px; }
  .task-title { grid-column: 2; }
  .status { grid-column: 2; grid-row: 2; }
  .toggle { grid-column: 3; grid-row: 1 / 3; }
  .buttons > .btn { flex: 1 0 100%; }
}

.workflow-panel { scroll-margin-top: 14px; }
.stage-track {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0 clamp(17px, 4vw, 32px) 23px; gap: 8px;
}
.stage-track li {
  display: flex; gap: 8px; align-items: center; padding: 9px;
  border: 1px solid var(--line); border-radius: 5px; font-size: .85rem; color: var(--muted);
}
.stage-track li > span { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; background: #e8eee3; font-weight: 750; }
.stage-track li.current { background: var(--forest); color: var(--white); border-color: var(--forest); }
.stage-track li.current > span { background: var(--lime); color: var(--ink); }
.stage-track li.passed { background: #edf2e8; color: var(--ink); }
.section-content { padding: 18px clamp(17px, 4vw, 32px) 24px; border-top: 1px solid var(--line); }
.section-content h2, .section-content h3 { margin: 0 0 9px; }
.section-content > p, .section-content > form { margin-bottom: 13px; }
.section-content > :last-child { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.formal-field { min-width: 0; }
.formal-field > span { display: block; margin-bottom: 4px; }
.formal-field:has(textarea) { grid-column: 1 / -1; }
.guided-question { grid-column: 1 / -1; min-width: 0; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.guided-question > legend { max-width: 100%; padding: 0 6px; font-weight: 650; }
.guided-options { display: flex; flex-wrap: wrap; gap: 8px; }
.guided-choice { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 12px; border: 1px solid #9daa9b; border-radius: 5px; cursor: pointer; }
.guided-choice:has(input:checked) { border-color: var(--forest); background: #e9eee3; }
.guided-choice input { flex: 0 0 18px; width: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--forest); }
.guided-details { margin: 12px 0 0; }
.guided-details[hidden] { display: none; }
.identity-files:empty { display: none; }
.identity-camera { margin-top: 16px; padding: clamp(12px, 3vw, 20px); border: 1px solid var(--line); border-radius: 6px; background: #fbfcf8; }
.identity-camera h3 { margin: 0 0 4px; }
.identity-camera video, .identity-camera img { display: block; width: 100%; max-width: 560px; max-height: 56vh; object-fit: contain; margin: 14px 0; border-radius: 5px; background: var(--ink); }
.identity-camera .buttons { margin-top: 12px; }
.identity-camera [role=status]:empty { display: none; }
.identity-camera button:disabled { opacity: .55; cursor: wait; }
select {
  width: 100%; min-height: 44px; padding: 8px 11px;
  border: 1px solid #9daa9b; border-radius: 5px; background: #fff; color: var(--ink); font: inherit;
}
.repeat { margin: 0 0 18px; }
.repeat h4 { margin: 0 0 9px; }
.repeat-row { margin: 0 0 10px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; }
.repeat-row > legend { padding: 0 5px; color: var(--muted); }
.check-line { display: flex; gap: 9px; align-items: flex-start; font-weight: 550; margin: 12px 0; }
.check-line input[type=checkbox] { width: 20px; min-height: 20px; margin: 2px 0 0; flex: 0 0 20px; accent-color: var(--forest); }
.attestation { padding: 12px 14px; border-left: 3px solid #9cac8f; background: #eef2e8; }
.offer-paper { background: #fbfcf8; }
.sample-ribbon { color: var(--rust); font-weight: 750; font-size: .87rem; }
.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; }
.terms div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.terms dt { color: var(--muted); font-size: .86rem; }
.terms dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.onboarding-list { padding: 0; margin: 0; list-style: none; }
.onboarding-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 10px 0; }
.onboarding-list li + li { border-top: 1px solid var(--line); }
@media (max-width: 710px) {
  .stage-track { grid-template-columns: 1fr; gap: 5px; }
  .stage-track li { padding: 7px 10px; }
  .form-grid, .terms { grid-template-columns: 1fr; }
}
.workflow-details summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  cursor: pointer; padding: 15px clamp(17px, 4vw, 32px);
}
.stage-track li.ongoing { background: #faf2df; border-color: #e4d5b4; color: #654924; }
.stage-track li.ongoing > span { background: #efe1bf; }
.stage-track li small { display: block; font-weight: 500; }
