:root {
  --ink: #262c32;
  --muted: #68717b;
  --line: #dce1e7;
  --red: #a52f3d;
  --red-soft: #fbf0f1;
  --green: #227559;
  --teal: #187b8c;
  --paper: #fff;
  --bg: #f4f6f8;
  --radius: 6px;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  letter-spacing: 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: var(--red);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #207f9b;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.4;
  font-weight: 650;
}
h2 {
  font-size: 20px;
  line-height: 1.5;
}
h3 {
  font-size: 17px;
  line-height: 1.6;
}
p {
  line-height: 1.8;
}
small,
.meta {
  font-size: 13px;
  color: var(--muted);
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  margin-bottom: 46px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-family: serif;
  font-size: 23px;
  border-radius: 5px;
}
.brand strong {
  display: block;
  font-size: 22px;
}
.brand small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.side-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 15px;
}
.nav-item:hover {
  background: var(--bg);
  text-decoration: none;
}
.nav-item.active {
  background: var(--red-soft);
  color: var(--red);
  font-weight: 600;
}
.nav-item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.nav-item .nav-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.side-bottom {
  margin-top: auto;
  padding: 26px 10px 0;
}
.side-bottom p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.8;
}
.release {
  font-size: 12px;
  color: var(--muted);
}
.release b {
  color: var(--ink);
  margin-left: 8px;
}
.storage-status {
  font-size: 12px;
  color: var(--green);
  margin-top: 20px;
}
.workspace {
  width: calc(100% - 236px);
  margin-left: 236px;
}
.topbar {
  height: 72px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.breadcrumb {
  display: flex;
  gap: 13px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
select,
input[type="text"],
input[type="search"],
input[type="url"],
input[type="date"],
textarea {
  background: #fff;
  border: 1px solid #cbd2da;
  border-radius: 5px;
  padding: 10px 12px;
  max-width: 100%;
}
select {
  font-size: 14px;
}
textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.8;
  min-height: 140px;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
}
.icon-button:hover {
  background: var(--bg);
}
svg {
  width: 18px;
  height: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.btn:hover {
  background: var(--bg);
  text-decoration: none;
}
.btn.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn.primary:hover {
  background: #8e2633;
}
.btn.danger {
  color: var(--red);
}
.btn.teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn.small {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  padding: 6px 0;
}
.text-button:hover {
  text-decoration: underline;
}
main {
  padding: 32px 36px;
  max-width: 1600px;
  margin: auto;
  min-height: calc(100vh - 125px);
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 7px;
}
.eyebrow {
  color: var(--red);
  font-size: 12px;
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
.head-actions,
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar {
  margin-bottom: 22px;
}
.muted {
  color: var(--muted);
}
.notice {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.7;
  background: #eef6f7;
  border-left: 3px solid var(--teal);
  margin: 16px 0;
}
.notice.warning {
  background: #fff8ec;
  border-color: #b3831d;
}
.notice.success {
  background: #edf7f2;
  border-color: var(--green);
}
.notice p + p {
  margin-top: 6px;
}
#storage-warning {
  margin: 16px 36px 0;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 3px;
  background: #eef1f4;
  border-radius: 5px;
}
.segmented button {
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.segmented button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #0000000d;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 22px 0;
  margin-bottom: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.metric {
  border-right: 1px solid var(--line);
  padding-right: 15px;
}
.metric:last-child {
  border-right: 0;
}
.metric label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 3px;
}
.metric small {
  font-size: 13px;
  margin-left: 4px;
  font-weight: 400;
  color: var(--muted);
}
.metric .note {
  font-size: 12px;
  color: var(--muted);
}
.journey-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 26px;
}
.stop-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.stop-button {
  position: relative;
  display: flex;
  align-items: flex-start;
  text-align: left;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 20px 12px;
  background: transparent;
}
.stop-button.active {
  background: #fff;
  border-left: 3px solid var(--red);
  padding-left: 9px;
}
.stop-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 50%;
  font-size: 12px;
  background: white;
}
.stop-button.active .stop-number {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.stop-button strong {
  display: block;
  font-size: 17px;
}
.stop-button small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.stop-button .check {
  margin-left: auto;
  color: var(--green);
  width: 15px;
}
.stop-detail {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.stop-heading {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 23px;
}
.stop-heading h2 {
  font-size: 26px;
  margin: 5px 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.5;
  border-radius: 3px;
  background: #f0f2f5;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
}
.pill.red {
  background: var(--red-soft);
  color: var(--red);
}
.pill.green {
  background: #edf7f2;
  color: var(--green);
}
.pill.amber {
  background: #fff8ec;
  color: #946812;
}
.dimensions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.dimension {
  padding: 23px 18px 23px 0;
  border-bottom: 1px solid var(--line);
}
.dimension:nth-child(even) {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.dimension h3 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 9px;
}
.dimension h3 span {
  font-size: 12px;
  color: var(--red);
  margin-right: 8px;
}
.dimension p {
  font-size: 15px;
  line-height: 1.8;
}
.source-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  font-size: 13px;
  margin-top: 18px;
  line-height: 1.8;
}
.detail-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-foot {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 12px;
}
.section-title {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 14px;
}
.section-title h2 {
  font-size: 18px;
}
.chain {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
}
.chain-item {
  flex: 1;
  min-width: 130px;
  border-top: 3px solid #c3d2dc;
  padding: 12px 10px;
  background: #fff;
}
.chain-item:nth-child(3) {
  border-color: var(--teal);
}
.chain-item:nth-child(4) {
  border-color: var(--red);
}
.chain-item strong {
  font-size: 13px;
}
.chain-item p {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 8px;
  color: var(--muted);
}
.chain svg {
  flex-shrink: 0;
  align-self: center;
  color: #adb5bd;
}
.research-preview {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 25px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 25px;
}
.research-preview figure {
  margin: 0;
  min-width: 0;
}
.research-preview img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}
.research-preview figcaption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.7;
}
.research-preview h3 {
  font-size: 19px;
  margin: 5px 0 10px;
}
.research-preview p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 15px;
}
.route-atlas {
  margin: 26px 0;
  border-top: 3px solid var(--red);
  background: #fff;
  min-width: 0;
}
.route-atlas-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 15px;
}
.route-atlas-head h2 {
  margin-top: 5px;
  font-size: 21px;
}
.route-atlas-key {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 3px;
}
.map {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
}
.map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
}
.map .map-point {
  cursor: pointer;
}
.map text {
  font-family: inherit;
}
.atlas-region text {
  fill: #7c8a83;
  font-size: 14px;
  letter-spacing: 0;
}
.atlas-route-base,
.atlas-route-progress {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.atlas-route-base {
  stroke: #f7e3e4;
  stroke-width: 11px;
}
.atlas-route-progress {
  stroke: var(--red);
  stroke-width: 3px;
  stroke-dasharray: 5 9;
}
.map-halo {
  fill: #fff;
  opacity: .88;
}
.map-node {
  fill: #fff;
  stroke: var(--red);
  stroke-width: 2px;
  transition: fill .18s ease, transform .18s ease;
}
.map-point.active .map-node {
  fill: var(--red);
}
.map-number {
  fill: var(--red);
  font-size: 11px;
  font-weight: 700;
}
.map-point.active .map-number {
  fill: #fff;
}
.map-label {
  fill: #25313a;
  font-size: 16px;
  font-weight: 700;
}
.map-year {
  fill: #64717a;
  font-size: 11px;
}
.map-point:hover .map-node,
.map-point:focus .map-node {
  fill: var(--red);
}
.map-point:hover .map-number,
.map-point:focus .map-number {
  fill: #fff;
}
.route-atlas-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}
.route-atlas-step {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 7px;
  align-content: center;
  text-align: left;
  padding: 11px 12px;
  color: #33414a;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
.route-atlas-step:last-child { border-right: 0; }
.route-atlas-step span {
  grid-row: 1 / 3;
  align-self: center;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid #c6d3d5;
  border-radius: 50%;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
}
.route-atlas-step strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.route-atlas-step small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.route-atlas-step:hover,
.route-atlas-step:focus-visible,
.route-atlas-step.active {
  background: #f9eeee;
}
.route-atlas-step.active span {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.map-caption {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 16px 12px;
  line-height: 1.6;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr);
  gap: 24px;
}
.question-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 660px;
  overflow-y: auto;
}
.question-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
}
.question-item:last-child {
  border-bottom: 0;
}
.question-item:hover {
  background: var(--bg);
}
.question-item.active {
  background: var(--red-soft);
  color: var(--red);
  border-left: 3px solid var(--red);
  padding-left: 13px;
}
.question-item small {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}
.answer-panel {
  min-width: 0;
  border-top: 3px solid var(--red);
  background: #fff;
  padding: 28px;
  border-radius: 0 0 6px 6px;
}
.answer-panel h2 {
  font-size: 22px;
  line-height: 1.7;
  margin: 16px 0;
}
.answer-panel .answer {
  font-size: 16px;
  line-height: 2;
  white-space: pre-wrap;
}
.followup {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.followup small {
  color: var(--teal);
}
.followup p {
  font-size: 15px;
  margin-top: 5px;
}
.search-form {
  display: flex;
  gap: 10px;
}
.search-form input {
  flex: 1;
  min-width: 0;
}
.search-area {
  margin: 20px 0 24px;
}
.search-area label {
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}
.search-area .meta {
  display: block;
  margin-top: 8px;
}
.matches {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0;
}
.matches button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: left;
  padding: 11px 13px;
  font-size: 14px;
}
.matches button small {
  margin-left: 10px;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.scenario-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.scenario-list button {
  border: 1px solid var(--line);
  background: #fff;
  min-height: 42px;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
}
.scenario-list button.active {
  background: var(--red-soft);
  border-color: #d5a5ad;
  color: var(--red);
}
.research-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
}
.unframed-block {
  padding: 0 0 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.unframed-block h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.unframed-block p,
.unframed-block li {
  font-size: 15px;
  line-height: 1.9;
}
.unframed-block ol {
  padding-left: 22px;
  margin: 0;
}
.research-form {
  background: white;
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 6px;
  align-self: start;
}
.research-form h2 {
  font-size: 20px;
  margin-bottom: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 17px;
}
.field > label,
.field > legend {
  font-size: 14px;
  font-weight: 500;
}
.field input {
  width: 100%;
}
.field textarea {
  min-height: 200px;
}
.field small {
  font-size: 12px;
  line-height: 1.7;
}
.citation-options {
  margin: 12px 0 20px;
  border: 0;
  padding: 0;
}
.citation-options legend {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 9px;
}
.citation-options label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 8px;
}
.citation-options input {
  margin-top: 6px;
  accent-color: var(--red);
}
.rubric {
  padding-left: 20px;
  line-height: 1.8;
  color: var(--muted);
  font-size: 14px;
}
.quiz-layout {
  max-width: 950px;
  margin: auto;
}
.quiz-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.quiz-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 30px;
}
.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.quiz-progress {
  height: 4px;
  background: #e8ecf0;
  margin: 16px 0 25px;
}
.quiz-progress > div {
  height: 100%;
  background: var(--red);
}
.quiz-card h2 {
  margin: 16px 0 23px;
  font-size: 21px;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 11px;
  text-align: left;
  font-size: 15px;
  line-height: 1.7;
}
.option > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}
.option.selected {
  border-color: var(--red);
  background: var(--red-soft);
}
.option.correct {
  border-color: var(--green);
  background: #edf7f2;
}
.option.wrong {
  border-color: var(--red);
  background: var(--red-soft);
}
.option:disabled {
  opacity: 1;
}
.quiz-result {
  text-align: center;
  padding: 30px 0;
}
.quiz-result strong {
  font-size: 48px;
  color: var(--red);
  display: block;
}
.quiz-result p {
  margin: 10px 0 24px;
  color: var(--muted);
}
.progress-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}
.progress-table th,
.progress-table td {
  text-align: left;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.progress-table th {
  background: #eef1f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.bar-track {
  height: 6px;
  background: #e5e9ee;
  border-radius: 2px;
  width: 100%;
  min-width: 100px;
}
.bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
}
.profile-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
}
.activity-list {
  background: white;
  border-top: 1px solid var(--line);
}
.activity-item {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item p {
  font-size: 14px;
  white-space: pre-wrap;
}
.activity-item small {
  display: block;
  margin-top: 5px;
}
.recommendation {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.recommendation h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
.recommendation p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}
.review-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 22px;
  margin-bottom: 16px;
}
.review-item .submission {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.9;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.review-item textarea {
  min-height: 100px;
  margin-bottom: 10px;
}
.review-item h3 {
  font-size: 16px;
}
.source-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.source-item h3 {
  margin-bottom: 6px;
}
.source-item p {
  font-size: 14px;
  margin: 12px 0;
  color: var(--muted);
}
.source-item .url {
  font-size: 12px;
  word-break: break-all;
}
.source-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.approval-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.approval-row > div {
  min-width: 0;
}
.approval-row p {
  margin-bottom: 5px;
}
.approval-row .btn {
  flex-shrink: 0;
}
.approval-filters {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.approval-filters input {
  min-width: 0;
  flex: 1;
  width: 150px;
}
.source-form {
  max-width: 720px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 20px;
}
.source-form textarea {
  min-height: 100px;
}
footer {
  margin: 0 36px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #26312e;
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  max-width: calc(100% - 32px);
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 8px 30px #0002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.visible {
  opacity: 1;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 20px 80px #0003;
}
dialog::backdrop {
  background: #1118;
}
dialog h2 {
  font-size: 21px;
  margin-bottom: 14px;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 15px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 260px;
  top: -50px;
  background: #fff;
  padding: 12px;
  z-index: 99;
}
.skip-link:focus {
  top: 5px;
}
.inline-feedback {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 12px;
  white-space: pre-wrap;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.desktop-label {
  display: inline;
}
.busy {
  color: var(--teal);
  font-size: 14px;
  margin-top: 18px;
}
.print-heading {
  display: none;
}
@media (min-width: 1700px) {
  main {
    padding-top: 42px;
  }
  .journey-grid {
    grid-template-columns: 270px 1fr;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
    padding: 26px 15px;
  }
  .workspace {
    margin-left: 210px;
    width: calc(100% - 210px);
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 28px 24px;
  }
  .journey-grid {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
  }
  .stop-detail {
    padding: 22px;
  }
  .research-layout {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr 1.3fr;
  }
  .profile-columns {
    grid-template-columns: 1fr;
  }
  .research-preview {
    grid-template-columns: 1fr 1fr;
  }
  .stats-strip {
    gap: 12px;
  }
  footer {
    margin: 0 24px;
  }
  .metric strong {
    font-size: 25px;
  }
}
@media (max-width: 780px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    width: 100%;
    padding: 16px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin-bottom: 14px;
  }
  .brand strong {
    font-size: 21px;
  }
  .side-label,
  .side-bottom {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 5px;
    margin: 0 -18px;
    padding: 0 12px;
  }
  .nav-item {
    flex-shrink: 0;
    border-radius: 0;
    padding: 12px 10px;
    font-size: 13px;
    gap: 6px;
    border-bottom: 2px solid transparent;
  }
  .nav-item.active {
    background: transparent;
    border-bottom-color: var(--red);
  }
  .nav-item svg {
    width: 16px;
  }
  .nav-count {
    display: none;
  }
  .workspace {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 12px;
    gap: 7px;
  }
  .breadcrumb > span:first-child {
    display: none;
  }
  .breadcrumb > span:nth-child(2) {
    display: none;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions select {
    max-width: 156px;
    font-size: 12px;
    padding: 7px;
  }
  .icon-button {
    width: 32px;
    height: 32px;
  }
  main {
    padding: 25px 18px;
  }
  h1 {
    font-size: 25px;
  }
  .page-head {
    align-items: flex-start;
    gap: 14px;
  }
  .page-head p {
    font-size: 13px;
  }
  .head-actions .btn {
    font-size: 12px;
    padding: 7px 10px;
  }
  .head-actions svg {
    width: 16px;
  }
  .stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 18px 0;
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric strong {
    font-size: 25px;
  }
  .journey-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .stop-list {
    flex-direction: row;
    overflow: auto;
    margin: 0 -18px;
    padding: 0 18px;
  }
  .stop-button {
    min-width: 150px;
    padding: 14px 10px;
    border-bottom: 2px solid var(--line);
    align-items: center;
    gap: 8px;
  }
  .stop-button.active {
    border-left: 0;
    border-bottom-color: var(--red);
    padding-left: 10px;
  }
  .stop-button strong {
    font-size: 15px;
  }
  .stop-button small {
    font-size: 11px;
  }
  .stop-number {
    width: 24px;
    height: 24px;
  }
  .stop-button .check {
    display: none;
  }
  .stop-detail {
    padding: 20px;
  }
  .stop-heading h2 {
    font-size: 24px;
  }
  .dimensions {
    grid-template-columns: 1fr;
  }
  .dimension {
    padding: 18px 0;
  }
  .dimension:nth-child(even) {
    padding: 18px 0;
    border-left: 0;
  }
  .dimension p {
    font-size: 14px;
  }
  .research-preview {
    grid-template-columns: 1fr;
  }
  .research-preview img {
    height: auto;
    max-height: 260px;
  }
  .research-preview figure {
    order: 2;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .question-list {
    max-height: 240px;
  }
  .answer-panel {
    padding: 22px;
  }
  .answer-panel h2 {
    font-size: 20px;
  }
  .answer-panel .answer {
    font-size: 15px;
  }
  .search-form .btn {
    padding: 9px 12px;
  }
  .scenario-list {
    flex-wrap: nowrap;
    overflow: auto;
    margin-right: -18px;
    padding-right: 18px;
  }
  .scenario-list button {
    flex-shrink: 0;
    font-size: 13px;
  }
  .research-form {
    padding: 20px;
  }
  .quiz-controls {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .quiz-controls .field:last-child {
    grid-column: 1/-1;
  }
  .quiz-card {
    padding: 20px;
  }
  .quiz-card h2 {
    font-size: 19px;
  }
  .option {
    font-size: 14px;
    padding: 13px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar select {
    font-size: 13px;
  }
  .profile-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .source-header {
    display: block;
  }
  .source-header .pill {
    margin-top: 10px;
  }
  .source-item h3 {
    font-size: 16px;
  }
  .approval-row {
    font-size: 13px;
  }
  .review-item {
    padding: 18px;
  }
  footer {
    margin: 0 18px;
    flex-direction: column;
    font-size: 11px;
  }
  .chain-item {
    min-width: 150px;
  }
  #storage-warning {
    margin: 12px 18px 0;
  }
  .desktop-label {
    display: none;
  }
  .map {
    border-left: 0;
    border-right: 0;
  }
  .route-atlas {
    margin-left: -18px;
    margin-right: -18px;
  }
  .route-atlas-head {
    align-items: start;
    padding: 17px 18px 13px;
  }
  .route-atlas-head h2 {
    font-size: 18px;
  }
  .route-atlas-key {
    display: none;
  }
  .map svg {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
  }
  .route-atlas-steps {
    grid-template-columns: repeat(5, 132px);
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .route-atlas-step {
    min-height: 70px;
    padding: 9px 10px;
  }
  .map-caption {
    font-size: 11px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .page-head .head-actions {
    max-width: 145px;
    justify-content: flex-end;
  }
  .skip-link {
    left: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  footer,
  .toolbar,
  .head-actions,
  .icon-button,
  .btn,
  .text-button,
  #toast,
  .notice,
  #storage-warning,
  .approval-filters,
  .quiz-controls {
    display: none !important;
  }
  .workspace {
    margin: 0;
    width: 100%;
  }
  main {
    padding: 0;
    max-width: none;
    min-height: 0;
  }
  .stats-strip,
  .source-item,
  .review-item,
  .activity-item {
    break-inside: avoid;
  }
  .page-head {
    margin-top: 0;
  }
  .progress-table {
    font-size: 10pt;
  }
  .profile-columns {
    grid-template-columns: 1fr;
  }
  .print-heading {
    display: block;
  }
  .table-scroll {
    overflow: visible;
  }
  .research-form textarea {
    border: 0;
  }
  h1 {
    font-size: 22pt;
  }
  p {
    font-size: 11pt;
  }
  .source-item .url {
    font-size: 9pt;
  }
  a {
    color: #000;
  }
}
