/* A connected research desk: cream, ink and a single emerald accent. */
:root {
  --ink: #263f35;
  --muted: #6c7b73;
  --green: #24634a;
  --green-hover: #174e38;
  --green-soft: #eaf4ed;
  --paper: #ffffff;
  --surface: #f7f8f5;
  --canvas: #fafbf8;
  --line: #e1e7df;
  --line-strong: #c8d6cb;
  --sidebar: #f4f6f1;
  --accent: #24634a;
  --studio-white: #ffffff;
  --studio-canvas: #fafbf8;
  --studio-line: #e1e7df;
  --studio-soft: #eff5ef;
  --studio-muted: #6c7b73;
  --map-connector: #c8d6cc;
}

/* Keep the established shell and mobile drawer; give the work more air. */
.topbar { background: #fff; border-color: #e6ebe4; }
.topbar .brand { color: #254e3c; }
.topbar .brand-caption { color: #7d8c80; }
.topbar .brand-symbol { background: #285c43; color: #fff; box-shadow: none; }
.topbar .prototype-status { background: #f5f8f3; border-color: #e4e9df; color: #697c69; }
.topbar .prototype-status::before { background: #779d7b; }
.topbar .usage-button { background: #f7f8f4; border-color: #e5e9df; }
.topbar .usage-connection { color: #75816d; }
.sidebar { background: var(--sidebar); border-right: 1px solid #e0e6dc; box-shadow: none; }
.sidebar #navigation { scrollbar-color: #c6d3c5 transparent; }
.sidebar .new-project-button { border: 1px solid #24634a; background: #24634a; color: #fff; box-shadow: 0 2px 4px #1b4e2910; font-weight: 550; }
.sidebar .new-project-button:hover { border-color: #174e38; background: #174e38; }
.studio-section-label, #navigation .nav-label { color: #899486; font-size: 9px; letter-spacing: .11em; }
#navigation .studio-nav-item, #navigation .nav-step { color: #627261; font-weight: 450; }
#navigation .studio-nav-item:hover, #navigation .nav-step:hover { color: #28563d; background: #eaf0e6; }
#navigation .studio-nav-item[aria-current="page"], #navigation .nav-step[aria-current="page"] { color: #225b40; background: #e0eddf; border-color: #d7e5d6; box-shadow: none; font-weight: 600; }
.studio-nav-icon, #navigation .nav-icon { color: #809478; }
#navigation .studio-nav-item[aria-current="page"] .studio-nav-icon, #navigation .nav-step[aria-current="page"] .nav-icon { color: #3b7853; }
.studio-nav-dot { background: #b4c0ae; }
.studio-nav-dot.reviewed { background: #4a8b63; }
#navigation .studio-nav-item.sub-agent { border-left-color: #c6d3c1; }
.nav-count { color: #69835d; background: #e6eddf; }
.sidebar-bottom { border-top-color: #e0e7d9; }
.sidebar-tutorial { border-color: #d6e3ce; background: #eaf2e2; color: #3c673e; }
.sidebar-tutorial:hover { border-color: #bad1ad; background: #e1edd6; }
.sidebar-tutorial small { color: #6c8360; }
.sidebar-tutorial > span:last-child, .tutorial-launch-icon { color: #6d8d5d; }
.sidebar-sample { color: #6c8060; }
.sidebar-sample:hover { background: #e8eee1; color: #345c36; }
.sidebar-local { color: #708568; }
.sidebar-local small { color: #899881; }
.local-dot { background: #7ca36b; }
.workspace-mode, .project-context, body.studio-mode .project-context { background: #f4f7ef; border-color: #e6ebdf; color: #7a8770; }
.btn { font-weight: 550; box-shadow: none; }
.btn.primary { box-shadow: 0 2px 4px #1c493b09; }
.btn.ghost { color: #71826d; }
:focus-visible { outline-color: #79a78a; }
.studio-heading h1 { font-weight: 560; letter-spacing: -.75px; }
.studio-conversation, .studio-side { border-color: #e0e6dc; box-shadow: 0 3px 12px #284e2a02; }
.studio-side, .studio-side-tabs { background: #fcfdf9; }
.studio-chat-head { color: #416046; border-color: #edf0e7; }
.studio-agent-emblem { color: #6b956c; background: #f1f7ed; border-color: #dfebd7; }
.studio-message-body { color: #4c6250; }
.studio-message[data-role="author"] .studio-message-content { background: #f5f8f1; border-color: #e4ebdc; }
.studio-composer { background: #fff; border-color: #ccd9c5; box-shadow: 0 2px 9px #29552a04; }
.studio-composer:focus-within { border-color: #80a882; box-shadow: 0 0 0 3px #76a27711; }
.studio-send { background: #24634a; border-color: #24634a; }
.studio-send:hover:not(:disabled) { background: #174e38; }
.studio-prompts > button { background: #fafcf7; border-color: #e3eadb; }
.studio-context-card { background: #f6f9f2; border-color: #e3eada; }
.studio-panel-content .studio-output-editor { background: #fff; color: #52694e; border-color: #e1e8d7; }
.studio-map-back { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin: 0 0 8px; border: 0; background: transparent; color: #728a69; font-size: 10px; line-height: 1.5; min-height: 24px; }
.studio-map-back:hover { color: #2a6446; }
.studio-map-back svg { width: 13px; height: 13px; }

/* Research flow: suggested paths and real, author-approved snapshots. */
body.map-mode .app-layout { height: auto; min-height: calc(100dvh - var(--studio-header)); }
body.map-mode .app-content { height: auto; min-height: 0; background: #f8faf7; }
body.map-mode #main { overflow: visible; min-height: 0; }
body.map-mode .project-context { padding: 8px 26px; font-size: 11px; }
body.map-mode .site-footer { padding: 10px 26px 20px; color: #758375; font-size: 11px; }
.research-map-page { width: 100%; max-width: 1820px; margin: 0 auto; padding: 26px; color: #293f34; }
.research-map-page button { cursor: pointer; }
.research-map-page button:focus-visible { outline: 3px solid #7dba98; outline-offset: 3px; }
.map-page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.map-page-head > div:first-child { min-width: 0; }
.map-page-head .eyebrow { display: block; max-width: 610px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #67796d; font-size: 11px; letter-spacing: .06em; margin-bottom: 7px; }
.map-page-head h1 { margin: 0; color: #244534; font-size: 29px; line-height: 1.25; letter-spacing: -.9px; font-weight: 580; }
.map-page-head .actions { gap: 8px; flex-shrink: 0; }
.map-page-head .btn { min-height: 38px; font-size: 12px; padding: 8px 12px; }
.map-stats { display: flex; align-items: center; gap: 26px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #e0e7dc; }
.map-stats > div { display: flex; align-items: baseline; gap: 9px; }
.map-stats strong { color: #345b42; font-size: 22px; font-weight: 550; letter-spacing: -.6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.map-stats strong span { font-size: 15px; color: #7e8e7b; font-weight: 450; letter-spacing: 0; }
.map-stats > div > span { color: #657664; font-size: 11px; line-height: 1.5; }
.map-stats > p { margin: 0 0 0 auto; max-width: 220px; color: #6f7d6f; font-size: 11px; line-height: 1.6; }
.map-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 18px; }
.map-canvas { min-width: 0; overflow: hidden; border: 1px solid #dce5d7; border-radius: 14px; background: #f5f8f1; box-shadow: 0 2px 12px #29412b03; }
.map-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e0e8da; background: #ffffffd9; }
.map-view-toggle, .map-filter { display: inline-flex; gap: 3px; }
.map-view-toggle { border-radius: 8px; padding: 3px; background: #f0f4ec; border: 1px solid #e2e8dd; }
.map-view-toggle button, .map-filter button { min-height: 31px; padding: 6px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #677961; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.map-view-toggle button.active { color: #285c3d; background: #fff; border-color: #dfe6d9; box-shadow: 0 1px 3px #28432b09; }
.map-filter button.active { color: #2c643e; background: #eaf2e4; border-color: #dce8d3; }
.map-filter button span { display: inline-block; margin-left: 5px; color: #4a7048; font-size: 10px; font-variant-numeric: tabular-nums; }
.map-filter button:hover, .map-view-toggle button:hover { color: #1d5637; background-color: #eaf2e5; }
.map-tree, .map-outline { padding: 20px; background-image: radial-gradient(#bac9ac68 .65px, transparent .65px); background-size: 16px 16px; }
.map-root-card { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 16px; border: 1px solid #d6e2cc; border-radius: 10px; background: #fff; }
.map-root-card.is-selected { border-color: #9cb88b; }
.map-root-icon { display: inline-flex; flex: 0 0 38px; width: 38px; height: 38px; justify-content: center; align-items: center; border: 1px solid #e1e9d9; border-radius: 10px; background: #f2f7ec; color: #5e824c; }
.map-root-icon svg { width: 21px; height: 21px; }
.map-root-copy { min-width: 0; flex: 1; }
.map-root-card .eyebrow { color: #6f8660; font-size: 10px; letter-spacing: .08em; margin-bottom: 5px; }
.map-root-card h2 { margin: 0; color: #3a5734; font-size: 14px; line-height: 1.6; font-weight: 540; overflow-wrap: anywhere; }
.map-root-card .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: 8px; flex: 0 0 auto; }
.research-map-page .studio-inline-link { font-size: 11px; line-height: 1.6; color: #416c3c; }
.map-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 24px; margin-top: 24px; }
.map-branch { min-width: 0; position: relative; }
.map-branch-header { position: relative; margin-bottom: 12px; }
.map-branch-header > button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 49px; padding: 2px 0; border: 0; background: transparent; text-align: left; color: #3a5c31; }
.map-phase-number { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 29px; height: 29px; border: 1px solid #c9d8bd; border-radius: 50%; background: #eff5e8; color: #66854c; font-size: 12px; font-weight: 600; }
.map-phase-name { min-width: 0; flex: 1; }
.map-phase-name strong { display: block; color: #3d5e34; font-size: 13px; font-weight: 600; line-height: 1.5; }
.map-phase-name small { display: block; color: #6e8062; font-size: 10px; line-height: 1.5; margin-top: 1px; }
.map-phase-progress { display: inline-flex; flex-shrink: 0; align-items: center; gap: 7px; color: #6c805d; font-size: 10px; font-variant-numeric: tabular-nums; }
.map-phase-progress > span { font-size: 18px; font-weight: 400; }
.map-tree .map-branch:nth-child(odd)::after { content: '→'; position: absolute; top: 15px; right: -18px; color: #849978; font-size: 13px; }
.map-branch-nodes { display: flex; flex-direction: column; gap: 9px; }
.map-branch-nodes[hidden] { display: none; }
.map-node { position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; min-height: 103px; padding: 13px 14px; border: 1px solid #dfe7d7; border-radius: 9px; color: #3f6036; background: #fff; text-align: left; box-shadow: 0 1px 2px #28452c04; transition: border-color .12s, background-color .12s; }
.map-node:hover { border-color: #94b481; background: #fbfdf7; }
.map-node.is-related { border-style: dashed; border-color: #9db68b; }
.map-node.is-selected { border: 1px solid #527d40; background: #f0f7e9; box-shadow: 0 0 0 2px #779f5b16; }
.map-node-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; }
.map-node-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid #e2ead9; border-radius: 6px; color: #6f9356; background: #f5f8ee; }
.map-node-icon svg { width: 15px; height: 15px; }
.map-node-status { display: inline-flex; align-items: center; gap: 5px; color: #6d7e64; font-size: 10px; line-height: 1.5; white-space: nowrap; }
.map-node.is-draft .map-node-status { color: #8b6c32; }
.map-node.is-reviewed .map-node-status { color: #447738; }
.map-node-copy { display: block; width: 100%; min-width: 0; }
.map-node-copy strong { display: block; color: #375630; font-size: 13px; font-weight: 560; line-height: 1.5; overflow-wrap: anywhere; }
.map-node-copy small { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; color: #6e8063; font-size: 10px; line-height: 1.5; }
.map-node-relation { margin-left: auto; color: #53753f; font-size: 9px; }
.map-phase-empty { padding: 19px 12px; margin: 0; border: 1px dashed #d6e2cb; border-radius: 8px; color: #728366; background: #f9fbf5; font-size: 11px; line-height: 1.6; }
.map-route { margin-top: 23px; padding-top: 17px; border-top: 1px solid #dfe8d5; }
.map-route-label { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #627b53; }
.map-dashed-line, .map-solid-line { display: inline-block; flex-shrink: 0; width: 20px; height: 1px; border-top: 1px dashed #749461; vertical-align: middle; }
.map-solid-line { border-top: 2px solid #5b854a; }
.map-route-path { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.map-route-neighbors { display: flex; flex-wrap: wrap; gap: 5px; }
.map-route-chip, .map-route-current { display: inline-flex; padding: 6px 8px; border: 1px dashed #b8c9aa; border-radius: 5px; color: #5e794d; background: #fafcf6; font-size: 10px; line-height: 1.4; }
.map-route-chip:hover { background: #eaf2e0; border-color: #779a5e; }
.map-route-current { border-style: solid; border-color: #b4c8a5; background: #eaf2e1; color: #436537; font-weight: 550; }
.map-route-arrow { color: #82996d; font-size: 13px; }
.map-route-end { color: #688157; font-size: 10px; }
.map-route p, .map-handoffs p { margin: 9px 0 0; color: #6b7e5e; font-size: 10px; line-height: 1.7; }
.map-handoffs { padding: 16px 20px; border-top: 1px solid #dce6d2; background: #fff; }
.map-handoffs > div:first-child { display: flex; align-items: center; gap: 8px; color: #65804f; font-size: 10px; line-height: 1.6; }
.map-handoffs strong { color: #3d6233; font-size: 11px; font-weight: 550; }
.map-handoffs > div:first-child > span:last-child { margin-left: auto; }
.map-handoff-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.map-handoff-link { padding: 7px 9px; border: 1px solid #b7cba6; border-radius: 6px; background: #f4f8ee; color: #476b39; font-size: 11px; line-height: 1.6; }
.map-handoff-link:hover { background: #eaf3df; border-color: #88ac6a; }
.map-handoff-link > span { padding: 0 5px; }
.map-handoff-link small { font-size: 10px; margin-left: 3px; }
.map-empty { display: flex; align-items: flex-start; flex-direction: column; gap: 9px; padding: 18px; margin-top: 18px; border: 1px dashed #cadabd; border-radius: 8px; background: #fbfdf8; color: #637d52; font-size: 12px; line-height: 1.6; }
.map-empty strong { color: #3f6535; font-size: 14px; font-weight: 550; }
.map-empty .btn { font-size: 11px; margin-top: 3px; }

/* A persistent selection inspector keeps actions beside the research canvas. */
.map-inspector { min-width: 0; padding: 20px; border: 1px solid #dfe6d9; border-radius: 13px; background: #fff; box-shadow: 0 2px 12px #29412b03; }
.map-inspector-head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.map-inspector-head .map-node-icon { width: 31px; height: 31px; flex-basis: 31px; }
.map-inspector-head .eyebrow { color: #6f825f; font-size: 9px; letter-spacing: .08em; }
.map-clear-selection { margin-left: auto; display: inline-flex; justify-content: center; align-items: center; width: 27px; height: 27px; border: 0; border-radius: 5px; color: #76866d; background: transparent; font-size: 20px; }
.map-clear-selection:hover { background: #f0f5e9; }
.map-inspector h2 { margin: 0 0 9px; color: #345b2d; font-size: 21px; letter-spacing: -.4px; line-height: 1.3; font-weight: 540; }
.map-inspector-summary > p { margin: 0; color: #657b59; font-size: 12px; line-height: 1.8; }
.map-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 15px 0; color: #6f825e; font-size: 10px; line-height: 1.6; }
.map-inspector-status { display: inline-flex; padding: 4px 7px; border-radius: 5px; border: 1px solid #e2e9d8; background: #f7f9f2; color: #6d7e5e; }
.map-inspector-status.is-draft { background: #fcf7eb; border-color: #ebe1c7; color: #866932; }
.map-inspector-status.is-reviewed { background: #eef6e6; border-color: #dbe8cd; color: #4c773d; }
.map-inspector-actions { display: flex; flex-direction: column; gap: 7px; }
.map-inspector-actions .btn { width: 100%; min-height: 37px; font-size: 12px; padding: 8px 10px; }
.map-open-workspace { display: flex; justify-content: center; align-items: center; gap: 10px; }
.map-review-draft { background: #fbfdf8; border-color: #d3e1c5; color: #466c37; }
.map-inspector > section { padding-top: 17px; margin-top: 20px; border-top: 1px solid #e6ebdf; min-width: 0; }
.map-section-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.map-section-label h3 { margin: 0; color: #5d774b; font-size: 11px; line-height: 1.5; font-weight: 550; }
.map-section-label h3 span { margin-left: 5px; color: #788a69; font-size: 10px; }
.map-preview h4 { color: #456c36; font-size: 12px; font-weight: 550; line-height: 1.7; margin: 0 0 8px; overflow-wrap: anywhere; }
.map-preview p { margin: 0 0 10px; color: #677e57; font-size: 11px; line-height: 1.85; overflow-wrap: anywhere; }
.map-provenance { display: inline-block; color: #687f56; background: #f2f7eb; border-radius: 4px; padding: 4px 6px; font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.map-input-list > div { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-bottom: 1px solid #ebf0e3; }
.map-input-list > div:last-child { border-bottom: 0; }
.map-input-list > div > span:first-child { flex: 0 0 12px; color: #6e8f54; font-size: 15px; line-height: 1.5; }
.map-input-list > div > span:last-child { min-width: 0; }
.map-input-list strong { display: block; color: #536f41; font-size: 11px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.map-input-list small { display: block; color: #70865d; font-size: 10px; line-height: 1.65; margin-top: 3px; }
.map-muted { color: #6b7e5d; font-size: 11px; line-height: 1.85; margin: 0; }
.map-input-list > .map-muted { margin-top: 5px; }
.map-footnote { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 14px; color: #6e8162; font-size: 10px; line-height: 1.7; }
.map-footnote > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.map-selected-shortcut { display: none; }

/* Outline trades spatial placement for a compact, keyboard-friendly list. */
.map-outline { background: #fff; }
.map-outline .map-branches { display: flex; flex-direction: column; gap: 16px; }
.map-outline .map-branch-header { margin-bottom: 0; }
.map-outline .map-branch-header > button { min-height: 56px; padding: 9px 12px; border-radius: 7px; background: #f3f7ed; }
.map-outline .map-branch-nodes { gap: 0; margin: 0; padding: 0 8px; }
.map-outline .map-node { flex-direction: row; align-items: center; gap: 13px; min-height: 65px; padding: 10px 8px; border: 0; border-bottom: 1px solid #e8eee0; border-radius: 0; box-shadow: none; }
.map-outline .map-node-top { display: contents; }
.map-outline .map-node-status { order: 3; margin-left: auto; }
.map-outline .map-node-copy { flex: 1; }
.map-outline .map-node-copy small { margin-top: 2px; }
.map-outline .map-node.is-selected { border-left: 2px solid #5d8747; }
.map-outline .map-node.is-related { border-left: 2px dashed #a3b98c; }
.map-outline .map-node.is-selected.is-related { border-left-style: solid; }
.map-outline .map-node:last-child { border-bottom: 0; }
.map-outline .map-phase-empty { margin: 8px 0; }

@media (min-width: 1720px) {
  .research-map-page { padding: 30px; }
  .map-workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
  .map-branches { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .map-tree .map-branch:not(:last-child)::after { content: '→'; position: absolute; top: 15px; right: -16px; color: #849978; font-size: 13px; }
  .map-node { min-height: 112px; }
  .map-phase-name strong { font-size: 12px; }
  .map-phase-name small { font-size: 9px; }
}
@media (max-width: 1200px) {
  .research-map-page { padding: 21px; }
  .map-workspace { grid-template-columns: minmax(0, 1fr) 260px; gap: 15px; }
  .map-tree, .map-outline { padding: 16px; }
  .map-inspector { padding: 17px; }
  .map-toolbar { padding: 11px 13px; gap: 8px; }
  .map-stats { gap: 22px; }
  .map-stats > div { display: block; }
  .map-stats > div > span { display: block; margin-top: 5px; }
  .map-stats > p { max-width: 195px; }
  .map-root-card { padding: 13px; gap: 10px; flex-wrap: wrap; }
  .map-root-copy { flex-basis: calc(100% - 60px); }
  .map-root-card .actions { flex-direction: row; width: calc(100% - 48px); min-width: 0; margin-left: 48px; justify-content: space-between; }
  .map-phase-name small { display: none; }
  .map-branches { gap: 22px 20px; }
  .map-phase-progress { gap: 5px; }
}
@media (max-width: 1050px) {
  .map-workspace { grid-template-columns: minmax(0, 1fr); }
  .map-inspector { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 23px; scroll-margin-top: 20px; }
  .map-inspector-summary { grid-row: 1 / span 2; }
  .map-inspector > .map-preview { border-top: 0; padding-top: 0; margin-top: 0; }
  .map-inspector > section { grid-column: 2; }
  .map-selected-shortcut { display: flex; justify-content: center; position: sticky; bottom: 14px; z-index: 5; margin: -1px 0; pointer-events: none; }
  .map-selected-shortcut .btn { pointer-events: auto; display: inline-flex; gap: 20px; align-items: center; padding: 10px 15px; border-color: #a9c195; border-radius: 10px; background: #fff; color: #375e2d; box-shadow: 0 5px 18px #24482b18; font-size: 12px; min-height: 42px; }
  .map-selected-shortcut .btn span { color: #668350; font-size: 11px; }
  .map-root-card { flex-wrap: nowrap; }
  .map-root-copy { flex-basis: auto; }
  .map-root-card .actions { width: auto; flex-direction: column; margin-left: 8px; }
  .map-phase-name small { display: block; }
}
@media (max-width: 760px) {
  .map-page-head { align-items: flex-start; gap: 13px; }
  .map-page-head h1 { font-size: 26px; }
  .map-page-head .actions { flex-direction: column-reverse; align-items: flex-end; }
  .map-page-head .btn { font-size: 11px; min-height: 35px; padding: 7px 9px; }
  .map-stats { flex-wrap: wrap; gap: 18px; }
  .map-stats > p { max-width: none; flex-basis: 100%; margin: 0; }
}
@media (max-width: 600px) {
  body.map-mode .project-context { padding: 9px 15px; }
  body.map-mode .site-footer { padding: 10px 15px 18px; }
  .research-map-page { padding: 18px 14px 23px; }
  .map-page-head { margin-bottom: 17px; }
  .map-page-head .eyebrow { max-width: 170px; font-size: 10px; }
  .map-page-head h1 { font-size: 25px; }
  .map-page-head .actions { gap: 6px; max-width: 160px; }
  .map-page-head .btn { white-space: normal; text-align: center; }
  .map-stats { gap: 18px; margin-bottom: 17px; padding-bottom: 15px; }
  .map-stats strong { font-size: 20px; }
  .map-stats > div > span { max-width: 105px; font-size: 10px; }
  .map-stats > p { font-size: 10px; }
  .map-toolbar { gap: 8px; }
  .map-filter { flex-wrap: wrap; }
  .map-filter button, .map-view-toggle button { min-height: 33px; padding: 6px 8px; }
  .map-tree, .map-outline { padding: 14px; }
  .map-root-card { flex-wrap: wrap; padding: 13px; }
  .map-root-copy { flex-basis: calc(100% - 60px); }
  .map-root-card h2 { font-size: 13px; }
  .map-root-card .actions { flex-direction: row; width: calc(100% - 48px); min-width: 0; margin-left: 48px; justify-content: space-between; }
  .map-branches { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 21px; }
  .map-tree .map-branch:nth-child(odd)::after { display: none; }
  .map-phase-name strong { font-size: 14px; }
  .map-phase-name small { font-size: 11px; }
  .map-branch-nodes { padding-left: 13px; margin-left: 14px; border-left: 1px dashed #b9cba7; }
  .map-node { min-height: 99px; }
  .map-node::before { content: ''; position: absolute; top: 50%; left: -14px; width: 13px; border-top: 1px dashed #b9cba7; }
  .map-node-copy strong { font-size: 14px; }
  .map-node-status, .map-node-copy small { font-size: 11px; }
  .map-node-relation { font-size: 10px; }
  .map-inspector { display: block; padding: 20px; }
  .map-inspector > .map-preview { border-top: 1px solid #e6ebdf; padding-top: 17px; margin-top: 20px; }
  .map-inspector-summary > p { font-size: 13px; }
  .map-preview p, .map-muted, .map-input-list strong { font-size: 12px; }
  .map-input-list small { font-size: 11px; }
  .map-route-chip, .map-route-current { font-size: 11px; padding: 7px 8px; }
  .map-handoffs { padding: 15px; }
  .map-handoffs > div:first-child { flex-wrap: wrap; }
  .map-handoffs > div:first-child > span:last-child { margin-left: 28px; }
  .map-outline .map-node::before { display: none; }
  .map-outline .map-branch-nodes { border: 0; }
  .map-selected-shortcut .btn { font-size: 11px; gap: 13px; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .map-node { transition: none; } }
