:root {
  --navy: #042c53;
  --blue: #185fa5;
  --blue-2: #378add;
  --blue-pale: #eaf4ff;
  --green: #0f6e56;
  --green-pale: #edf8f3;
  --amber: #9a5b08;
  --amber-pale: #fff6e6;
  --red: #a32d2d;
  --ink: #172433;
  --muted: #607083;
  --line: #d7e0e8;
  --panel: #ffffff;
  --page: #f4f7fa;
  --shadow: 0 14px 40px rgba(4, 44, 83, 0.1);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #85b7eb;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: #fff;
  color: var(--navy);
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  background: var(--navy);
  color: white;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lockup { display: flex; align-items: baseline; gap: .7rem; }

.brand {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.brand span { color: #9cc8f4; }
.brand-descriptor { color: #b9d4ec; font-size: .78rem; }
.privacy-line { color: #d9e8f6; font-size: 0.86rem; }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.35rem, 3vw, 2.35rem) clamp(1rem, 4vw, 2rem) 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, .92fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.16; margin-top: 0; }
h1 { max-width: 760px; margin-bottom: .85rem; font-size: clamp(2.25rem, 5vw, 4rem); letter-spacing: -0.05em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -0.025em; }
h3 { font-size: 1.05rem; }

.lede { max-width: 700px; margin-bottom: 1rem; font-size: clamp(1rem, 1.7vw, 1.2rem); color: #44566a; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; }
.btn-large { min-height: 50px; padding-inline: 1.25rem; }
.text-button { min-height: 44px; padding: .55rem .2rem; border: 0; border-bottom: 2px solid #8fb6d9; background: transparent; color: var(--navy); font-weight: 800; }
.text-button:hover { border-color: var(--blue); }
.hero-reassurance { margin: .75rem 0 0; color: var(--muted); font-size: .88rem; }

.hero-map-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.hero-map-card > p { margin: .45rem .25rem 0; color: var(--muted); font-size: .86rem; }
.map-preview-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin: 0 .25rem .25rem; color: var(--muted); font-size: .78rem; }
.map-preview-heading strong { color: var(--navy); }
.hero-map { display: block; width: 100%; height: auto; border-radius: 12px; background-color: #f8fbfe; background-image: radial-gradient(#d5e1eb 1px, transparent 1px); background-size: 18px 18px; }
.preview-lines line { stroke: #8ea1b2; stroke-width: 2.5; }
.preview-node rect { stroke-width: 2; filter: drop-shadow(0 3px 4px rgba(4,44,83,.1)); }
.preview-node text { text-anchor: middle; font-size: 14px; font-weight: 800; fill: var(--ink); }
.preview-node-main rect { fill: var(--navy); stroke: var(--blue-2); }
.preview-node-main text { fill: #fff; }
.preview-node-device rect { fill: #f2f0ff; stroke: #6f62b5; }
.preview-node-person rect { fill: var(--green-pale); stroke: var(--green); }
.preview-node-service rect { fill: var(--amber-pale); stroke: var(--amber); }
.preview-node-new rect { fill: #fff6e6; stroke: var(--amber); stroke-dasharray: 6 4; }

.journey-overview {
  max-width: 1180px;
  margin: 0 auto 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: minmax(220px,.55fr) minmax(0,1.45fr);
  gap: 1.25rem;
  align-items: center;
}
.journey-overview h2 { margin: 0; font-size: clamp(1.2rem,2vw,1.55rem); }
.journey-overview ol { position: relative; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5,1fr); gap: .55rem; list-style: none; }
.journey-overview ol::before { content:""; position: absolute; top: 16px; left: 7%; right: 7%; height: 2px; background: #bfd1e1; }
.journey-overview li { position: relative; display: grid; justify-items: center; text-align: center; color: var(--muted); }
.journey-overview li > span { z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #9dbbd4; border-radius: 50%; background: var(--page); color: var(--navy); font-weight: 850; }
.journey-overview li strong { margin-top: .35rem; color: var(--ink); font-size: .86rem; }
.journey-overview li small { max-width: 110px; font-size: .72rem; }
.journey-overview li.is-current > span { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 4px #dcecff; }

.promise {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid #b4d0e9;
  border-bottom: 1px solid #b4d0e9;
  background: #f7fbff;
  color: #294d6e;
}
.promise strong { color: var(--navy); }

.page-shell { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 4rem; }

.continue-card {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.continue-card summary { min-height: 58px; padding: .8rem 1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; color: var(--navy); cursor: pointer; }
.continue-card summary::marker { color: var(--blue); }
.continue-card summary > span:first-child { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; }
.continue-card summary .eyebrow { margin: 0; }
.continue-card summary strong { font-size: 1rem; }
.summary-hint { color: var(--muted); font-size: .82rem; }
.continue-card-body { padding: 1rem 1.2rem; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; align-items: center; border-top: 1px solid var(--line); }
.continue-card p { margin: 0; color: var(--muted); }
.continue-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.continue-actions .field-label { flex-basis: 100%; margin: 0; }
.project-file-input { width: min(100%, 360px); color: var(--muted); font-size: .9rem; }
.project-file-input::file-selector-button {
  min-height: 44px;
  margin-right: .65rem;
  padding: .65rem .85rem;
  border: 1px solid #aabac8;
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font-weight: 750;
  cursor: pointer;
}
.file-status { min-height: 1.4rem; margin-top: .45rem !important; font-weight: 700; }
.file-status.error { color: var(--red); }
.file-status.success { color: var(--green); }

.experience {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.progress-wrap {
  padding: 1rem 1.3rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.progress-copy { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.86rem; }
.progress-track { height: 8px; margin-top: 0.55rem; border-radius: 999px; overflow: hidden; background: #dfe8f0; }
.progress-bar { width: 16.66%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); transition: width 260ms ease; }

.step { display: none; padding: clamp(1.2rem, 4vw, 2.2rem); }
.step.active { display: block; animation: fade 180ms ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.step-intro { max-width: 760px; margin-bottom: 1.4rem; }
.step-intro p { color: var(--muted); }
.plain-note { color: var(--green); font-weight: 650; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.choice {
  position: relative;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  min-height: 76px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.choice:hover { border-color: #8fb6d9; transform: translateY(-1px); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-pale); }
.choice input { margin-top: 0.22rem; accent-color: var(--blue); }
.choice strong { display: block; margin-bottom: 0.15rem; }
.choice small { color: var(--muted); }

.field { margin-top: 1rem; }
.field label { display: block; font-weight: 750; margin-bottom: 0.35rem; }
.field-help { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.86rem; }
input[type="text"], textarea, select {
  width: 100%;
  border: 1px solid #b8c5d1;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
}
textarea { min-height: 94px; resize: vertical; }

.generated-statement {
  margin: 1.2rem 0 0;
  border-left: 4px solid var(--blue-2);
  background: #f7fbff;
  padding: 1rem;
}
.generated-statement label { font-weight: 800; }

.tag-builder { display: flex; gap: 0.55rem; margin-top: 0.75rem; }
.tag-builder input { flex: 1; }
.tag-builder button { white-space: nowrap; }

.selected-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; min-height: 2rem; }
.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #a9c6df;
  background: var(--blue-pale);
  color: #0b477c;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.86rem;
}
.selected-tag button { border: 0; background: transparent; color: inherit; padding: 0 0.2rem; font-weight: 800; }

.actions { margin-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.actions-right { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-left: auto; }

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.72rem 1rem;
  font-weight: 750;
  transition: transform 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--navy); }
.btn-primary:hover { background: #0a426f; }
.btn-secondary { color: var(--navy); background: #fff; border-color: #aabac8; }
.btn-soft { color: #0b477c; background: var(--blue-pale); border-color: #b4d0e9; }
.btn-danger { color: var(--red); background: #fff; border-color: #e0b3b3; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.validation { min-height: 1.4rem; margin-top: 0.75rem; color: var(--red); font-size: 0.9rem; font-weight: 650; }

.example-disclosure {
  margin-top: 0.9rem;
  border: 1px solid #b4d0e9;
  border-radius: 12px;
  background: #f7fbff;
  padding: 0.8rem 1rem;
}
.example-disclosure summary,
.map-outline summary {
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}
.example-disclosure p { margin: 0.7rem 0 0; color: #44566a; }

.map-step { padding: 0; }
.map-heading { padding: 1.4rem 1.4rem 0; }
.map-promise { padding: .75rem .85rem; border-left: 4px solid var(--blue-2); background: #f7fbff; color: #294d6e; }
.map-instructions { margin: 1rem 0; padding-left: 1.35rem; color: #44566a; }
.map-instructions li + li { margin-top: .45rem; }
.mobile-map-hint { display: none; }
.workspace {
  height: clamp(570px, 72vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.canvas-wrap { position: relative; min-width: 0; overflow: auto; overscroll-behavior: contain; background-color: #f8fbfe; background-image: radial-gradient(#cbd8e3 1px, transparent 1px); background-size: 22px 22px; }
#mapCanvas, #mapCanvasV2, #mapCanvasQ { display: block; width: 100%; min-height: 100%; touch-action: pan-x pan-y; }
.canvas-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.map-panel { min-height: 0; border-left: 1px solid var(--line); padding: 1rem; overflow-y: auto; overscroll-behavior: contain; background: white; }
.panel-jump {
  position: sticky;
  top: -1rem;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: -1rem -1rem 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.97);
  box-shadow: 0 5px 14px rgba(4,44,83,.08);
}
.panel-jump .btn { min-height: 42px; padding: 0.5rem 0.55rem; font-size: 0.78rem; }
.panel-section + .panel-section { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.panel-section h3 { margin-bottom: 0.55rem; }
.panel-section p { margin: 0 0 0.65rem; color: var(--muted); font-size: 0.88rem; }
.map-outline > p { margin-top: 0.55rem; }
.compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.compact-grid .btn { padding: 0.55rem 0.65rem; font-size: 0.86rem; }

.node-list, .edge-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.node-list li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 38px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.node-list li.is-selected { border-color: #c97700; box-shadow: 0 0 0 2px #ffdca8; }
.node-list li.question-node-item { grid-template-columns: minmax(0, 1fr); }
.node-select { min-height: 48px; border: 0; background: #fff; color: var(--ink); padding: 0.55rem 0.65rem; text-align: left; }
.node-select:hover { background: var(--blue-pale); }
.node-select strong, .node-select small { display: block; }
.node-select small { margin-top: 0.1rem; color: var(--muted); font-size: 0.76rem; }
.node-delete { min-width: 38px; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--red); font-weight: 800; }
.node-delete:hover { background: #fff3f3; }
.edge-list li { border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem; font-size: 0.84rem; }
.edge-list button { float: right; min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--red); font-weight: 700; }

.map-toolbar { padding: 0.8rem 1rem; display: flex; gap: 0.55rem; flex-wrap: wrap; border-top: 1px solid var(--line); background: #fff; }

.svg-edge { stroke: #7d91a5; stroke-width: 2; }
.svg-edge.new { stroke: var(--amber); stroke-dasharray: 7 5; stroke-width: 3; }
.edge-label-bg { opacity: 0; fill: #fffdf8; stroke: #c97700; stroke-width: 2; filter: drop-shadow(0 3px 5px rgba(93,55,0,.22)); }
.edge-label-bg.active { opacity: 1; }
.edge-label { opacity: 0; font-size: 15px; font-weight: 850; fill: #563300; }
.node-group { cursor: grab; touch-action: none; }
.node-group:active { cursor: grabbing; }
.node-group text { pointer-events: none; font-size: 13px; font-weight: 750; fill: var(--ink); }
.node-group .node-shape { stroke-width: 2; filter: drop-shadow(0 3px 4px rgba(4,44,83,.12)); }
.node-group.selected .node-shape { stroke: #c97700 !important; stroke-width: 5; filter: drop-shadow(0 0 7px rgba(201,119,0,.45)); }
.node-group.dimmed { opacity: 0.4; }
.svg-edge.dimmed { opacity: 0.14; }
.edge-label.dimmed { opacity: 0; }
.svg-edge.active { stroke: #c97700; stroke-width: 4; }
.edge-label.active { opacity: 1; fill: #744500; }
.node-group.added-v2 .node-shape { stroke: var(--amber); stroke-dasharray: 6 4; }
.annotation-badge { fill: var(--navy); stroke: #fff; stroke-width: 3; pointer-events: none; }
.annotation-badge-text { fill: #fff !important; font-size: 12px !important; font-weight: 850 !important; pointer-events: none; }
.svg-edge.annotated { stroke: #5f3e96; stroke-width: 3; }

.question-experience { margin-top: 1rem; }
.experience-two-heading { padding: clamp(1.2rem, 4vw, 2.2rem); max-width: 850px; }
.experience-two-heading p:last-child { color: var(--muted); }
.question-workspace { border-top: 1px solid var(--line); }
.field-label { display: block; margin: .3rem 0 .35rem; font-weight: 750; font-size: .88rem; }
.question-prompt { margin: .75rem 0; padding: .75rem; border-left: 4px solid #6f62b5; background: #f6f4ff; color: #46377c; font-size: .9rem; }
.btn-block { width: 100%; }
.touch-only { display: none; }
.question-edge-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.question-edge-list button { float: none; min-width: auto; min-height: 40px; padding: .35rem .55rem; border: 1px solid #b4d0e9; border-radius: 8px; background: var(--blue-pale); color: #0b477c; }
.annotation-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.annotation-list li { border: 1px solid var(--line); border-radius: 9px; padding: .65rem; background: #fff; font-size: .84rem; }
.annotation-list strong, .annotation-list span { display: block; }
.annotation-list span { color: var(--muted); margin: .15rem 0 .35rem; }
.annotation-list button { border: 0; background: transparent; color: var(--red); padding: .25rem 0; font-weight: 750; }
.annotation-type { display: inline-block !important; width: fit-content; margin: 0 0 .25rem !important; padding: .15rem .4rem; border-radius: 999px; background: #f0ecff; color: #513c8d !important; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.empty-note { color: var(--muted); }
.question-results { margin: 0; padding: clamp(1.2rem, 4vw, 2.2rem); border-top: 1px solid var(--line); background: #fbfcfd; }
.question-validation { padding: .4rem 1rem 0; }

.reveal {
  border: 1px solid #e9c47f;
  background: var(--amber-pale);
  border-radius: 14px;
  padding: 1.1rem;
  margin: 1rem 0;
}
.reveal h3 { color: #6e4100; margin-bottom: 0.45rem; }
.reveal p { margin: 0.35rem 0; }
.reveal-choice-area { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e9c47f; }
.reveal-choice-area fieldset { margin: 0; padding: 0; border: 0; }
.reveal-choice-area legend { margin-bottom: .65rem; color: #5d3900; font-weight: 800; }
.reveal-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.reveal-choice { display: flex; align-items: flex-start; gap: .55rem; padding: .7rem; border: 1px solid #d9ad5f; border-radius: 10px; background: #fffdf8; }
.reveal-choice input { margin-top: .2rem; accent-color: var(--amber); }
.reveal-custom { margin-top: .75rem; }
.reveal-custom label { display: block; margin-bottom: .35rem; font-weight: 750; }
.reveal-where { margin-top: .75rem !important; padding: .65rem .75rem; border-radius: 8px; background: #fff; color: #563300 !important; }
.reveal-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.reflection-heading { margin: 1.5rem 0 .2rem; }
.modal-help { color: var(--muted); }
.relationship-choices { margin: 1rem 0 0; padding: 0; border: 0; }
.relationship-choices legend { margin-bottom: .55rem; font-weight: 750; }
.relationship-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
.relationship-choice-grid button { min-height: 42px; padding: .5rem; border: 1px solid #b4d0e9; border-radius: 8px; background: var(--blue-pale); color: #0b477c; font-weight: 700; }
.relationship-choice-grid button[aria-pressed="true"] { border-color: var(--blue); background: #d8ebff; box-shadow: 0 0 0 2px #85b7eb; }

.comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 1rem 0; }
.metric { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; }
.metric strong { display: block; font-size: 1.5rem; color: var(--navy); }
.metric span { color: var(--muted); font-size: 0.86rem; }

.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1rem; }
.download-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.download-card p { color: var(--muted); font-size: 0.88rem; }

.privacy-reminder { margin-top: 1rem; color: var(--muted); font-size: 0.86rem; }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2rem) 2.5rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.85rem; }
.site-footer strong { color: var(--navy); }

.undo-toast { position: fixed; left: 50%; bottom: 1.1rem; z-index: 80; width: min(92vw,560px); transform: translateX(-50%); display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border: 1px solid #9bb6cc; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 16px 45px rgba(4,44,83,.28); }
.undo-toast[hidden] { display: none; }
.undo-toast span { flex: 1; }
.undo-action, .undo-dismiss { min-height: 38px; border: 1px solid #9cc8f4; border-radius: 8px; background: #fff; color: var(--navy); font-weight: 800; }
.undo-action { padding: .4rem .75rem; }
.undo-dismiss { min-width: 38px; font-size: 1.1rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 1rem; background: rgba(5, 25, 45, 0.62); }
.modal-backdrop.open { display: grid; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: white; border-radius: 16px; padding: 1.25rem; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.modal-actions { margin-top: 1rem; display: flex; justify-content: flex-end; gap: 0.6rem; }

.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; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-map-card { max-width: 620px; }
  .journey-overview { grid-template-columns: 1fr; }
  .journey-overview ol { overflow-x: auto; grid-template-columns: repeat(5,minmax(105px,1fr)); padding: .3rem .2rem .65rem; }
  .promise { grid-template-columns: 1fr; margin-bottom: .75rem; }
  .continue-card-body { grid-template-columns: 1fr; }
  .continue-actions .btn, .project-file-input { flex: 1 1 100%; }
  .mobile-map-hint {
    display: block;
    margin: 0.9rem 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #b4d0e9;
    border-radius: 10px;
    background: var(--blue-pale);
    color: #294d6e;
    font-size: 0.9rem;
  }
  .workspace { height: auto; grid-template-columns: 1fr; overflow: visible; }
  .canvas-wrap {
    height: auto;
    min-height: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #mapCanvas, #mapCanvasV2, #mapCanvasQ { min-width: 820px; min-height: 0; }
  .map-panel { max-height: none; border-left: 0; border-top: 1px solid var(--line); overflow-y: visible; overscroll-behavior: auto; }
  .touch-only { display: block; }
  .map-toolbar {
    position: sticky;
    bottom: 0;
    z-index: 8;
    box-shadow: 0 -7px 18px rgba(4,44,83,.12);
  }
  .map-toolbar > .btn { flex: 1 1 100%; }
  .map-toolbar .actions-right { width: 100%; display: grid; grid-template-columns: 1fr; }
  .map-toolbar .btn { min-height: 48px; }
}

@media (max-width: 620px) {
  .page-shell { padding: 0 0.5rem 2rem; }
  .site-header { align-items: flex-start; flex-direction: column; }
  .brand-lockup { width: 100%; justify-content: space-between; }
  .hero { padding: 1.25rem 0.75rem 1rem; gap: 1rem; }
  h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .experience { border-radius: 14px; }
  .progress-wrap { padding: 0.85rem 1rem; }
  .step { padding: 1rem; }
  .map-step { padding: 0; }
  .map-heading { padding: 1.1rem 1rem 0; }
  .choice-grid, .download-grid, .comparison { grid-template-columns: 1fr; }
  .reveal-choice-grid, .relationship-choice-grid { grid-template-columns: 1fr; }
  .reveal-actions .btn { width: 100%; }
  .choice { min-height: 0; padding: 0.85rem; }
  .tag-builder { flex-direction: column; }
  .actions { flex-direction: column; }
  .actions-right { margin-left: 0; }
  .actions .btn { width: 100%; }
  input[type="text"], textarea, select { font-size: 16px; }
  .btn { min-height: 44px; }
  .canvas-wrap { height: auto; }
  .map-panel { max-height: none; padding: 0.85rem; }
  .panel-jump { top: -0.85rem; margin: -0.85rem -0.85rem 0.85rem; padding: 0.6rem 0.85rem; }
  .panel-jump .btn { min-height: 44px; }
  .map-toolbar { padding: 0.65rem; }
  .map-toolbar .actions-right { gap: 0.5rem; grid-template-columns: 1fr; }
  .map-toolbar .btn { padding: 0.65rem 0.55rem; font-size: 0.88rem; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; padding: 1rem; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .site-footer { flex-direction: column; }
  .undo-toast { bottom: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
