/* Browser-only journeys, scoped away from the live hero and other variants. */
.journey { margin: 0 0 30px; max-width: none; border: 1px solid var(--line-soft); border-radius: var(--radius-lg, 10px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03); background: var(--night-deep); min-width: 0; }
.journey:empty { display: none; }
.journey [hidden] { display: none !important; }
.journey-label { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--fg-dim); font-size: calc(12px + var(--mobile-type-increase, 0px)); }
.journey-stage { padding: 20px; }
.journey button { color: var(--bright); background: transparent; border: 1px solid var(--line); border-radius: var(--radius, 6px); padding: 7px 10px; font: inherit; font-size: calc(12px + var(--mobile-type-increase, 0px)); line-height: 1.4; cursor: pointer; }
.journey button:hover { border-color: var(--accent); }
.journey button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--night-deep); }
.journey button:focus-visible, .journey textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.journey-footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.journey-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.journey-help { font-size: calc(12px + var(--mobile-type-increase, 0px)); color: var(--fg-dim); line-height: 1.6; margin-top: 14px; max-width: 58ch; }
/* Three aligned pairs make the note/file relationship visible without prose. */
.journey-file-map { --map-row: 92px; --map-head: 36px; --map-pad: 12px; --map-gap: 12px; display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: start; }
.map-sidebar, .map-folder { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--night); }
.map-window-bar { height: var(--map-head); display: flex; align-items: center; gap: 8px; padding-inline: 10px; border-bottom: 1px solid var(--line); color: var(--fg); font-size: calc(12px + var(--mobile-type-increase, 0px)); }
.map-sidebar .map-window-bar { justify-content: space-between; }
.map-window-bar svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; }
.map-list { display: grid; grid-template-rows: repeat(3,var(--map-row)); gap: var(--map-gap); padding: var(--map-pad); }
.journey button.map-note { display: block; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.journey button.map-note[aria-pressed="true"] { background: transparent; outline: 2px solid var(--pair-paper); outline-offset: 3px; }
.map-paper, .map-paper .sheet { display: block; height: 100%; }
.map-paper .sheet { padding: 10px; }
.map-note-body { display: block; max-height: 100%; overflow: hidden; position: relative; }
.map-text-line { display: block; }
.map-text-line + .map-text-line { margin-top: 4px; }
.map-paper { font-size: calc(12px + var(--mobile-type-increase, 0px)); line-height: 1.45; }
.journey .map-note .journey-task { gap: 6px; margin-top: 5px; }
.journey .map-note .circle { width: 12px; height: 12px; border-width: 1px; margin-top: 2px; }
.journey .map-note .circle svg { width: 7px; height: 7px; }
.map-note .task-text { min-width: 0; overflow-wrap: anywhere; }
.map-links { display: grid; grid-template-rows: repeat(3,var(--map-row)); gap: var(--map-gap); padding-top: calc(var(--map-head) + var(--map-pad) + 1px); }
.map-link { display: flex; align-items: center; color: var(--pair-paper); opacity: .3; transition: opacity 250ms ease; }
.map-link svg { display: block; width: 100%; height: 20px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.map-link.is-current { opacity: 1; }
.map-packet { fill: currentColor; stroke: none; opacity: 0; }
.map-link.is-current .map-packet { animation: map-transfer 1s ease-in-out both; }
@keyframes map-transfer { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(40px); } }
.journey button.map-file { min-width: 0; padding: 10px; display: flex; align-items: center; gap: 10px; color: var(--fg); text-align: left; background: var(--night-deep); }
.journey button.map-file[aria-pressed="true"] { background: var(--night-deep); border-color: var(--pair-paper); color: var(--bright); }
.map-file-icon { width: 34px; height: 42px; flex: none; fill: none; stroke: var(--pair-paper); stroke-width: 1.5; stroke-linejoin: round; }
.map-file-fill { fill: var(--pair-paper); fill-opacity: .12; }
.map-file-icon text { font-family: var(--mono); font-size: calc(10px + var(--mobile-type-increase, 0px)); fill: var(--pair-paper); stroke: none; }
.map-file-meta { min-width: 0; }
.map-filename { display: block; font-size: calc(12px + var(--mobile-type-increase, 0px)); overflow-wrap: anywhere; }
.map-file-code { display: block; margin-top: 8px; color: var(--fg-dim); font-size: calc(10px + var(--mobile-type-increase, 0px)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-edit-details { margin-top: 22px; border-top: 1px solid var(--line); }
.journey-edit-details > summary { padding: 14px 0; color: var(--accent); cursor: pointer; font-size: calc(13px + var(--mobile-type-increase, 0px)); }
.journey-edit-details .journey-file-grid { margin-top: 6px; }
#files .file-reference { max-width: none; margin-top: 24px; border-top: 1px solid var(--line); }
.file-reference > summary { padding: 14px 0; cursor: pointer; color: var(--fg); }
.file-reference .rows { margin-top: 20px; }
.journey-file-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.journey-editor, .journey-render { min-width: 0; }
.journey-editor label, .journey-file-label { display: block; font-size: calc(12px + var(--mobile-type-increase, 0px)); color: var(--bright); margin-bottom: 10px; }
.journey-editor label span { color: var(--fg-dim); display: block; }
.journey-editor textarea { display: block; width: 100%; min-height: 185px; resize: vertical; background: var(--night); color: var(--bright); font: inherit; font-size: calc(12px + var(--mobile-type-increase, 0px)); line-height: 1.7; border: 1px solid var(--line); border-radius: var(--radius, 6px); padding: 12px; margin-bottom: 10px; }
.journey .journey-paper { --ink: rgba(0,0,0,.95); --ink-2: rgba(0,0,0,.60); color: var(--ink); font-size: calc(13px + var(--mobile-type-increase, 0px)); }
.journey-paper .sheet { padding: 20px 16px; min-height: 185px; overflow-wrap: anywhere; }
.journey-paper .sheet > * { position: relative; }
.journey-paper p + p { margin-top: 9px; }
.journey-markdown { max-height: 270px; overflow-y: auto; }
.journey-task { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; }
.journey .circle { width: 19px; height: 19px; padding: 0; border: 1.5px solid rgba(0,0,0,.60); color: rgba(0,0,0,.95); background: transparent; }
.journey .circle[aria-checked="true"] { background: rgba(0,0,0,.95); border-color: transparent; }
.journey button.circle:hover { border-color: rgba(0,0,0,.95); }
.journey span.circle { cursor: default; }
.journey .circle:focus-visible { outline-color: rgba(0,0,0,.95); }
.journey-task > span:first-child { flex-shrink: 0; }
.journey-task.is-done > span:last-child { text-decoration: line-through; color: rgba(0,0,0,.60); }
.journey-flow { margin-top: 18px; display: flex; align-items: center; gap: 10px; font-size: calc(11px + var(--mobile-type-increase, 0px)); color: var(--fg-dim); }
.journey-flow i { height: 1px; background: var(--line); flex: 1; position: relative; }
.journey-flow i::after { content: ''; position: absolute; inset: -1px 0; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 550ms ease; }
.journey-flow[data-step="1"] span:first-child, .journey-flow[data-step="2"] span { color: var(--green); }
.journey-flow[data-step="2"] i::after { transform: scaleX(1); }
.journey-flow[data-step="2"] i:last-of-type::after { transition-delay: 250ms; }
.journey-choices { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.journey-card-stage { min-height: 256px; }
.journey-card { max-width: 410px; }
.journey-clock { color: var(--accent); padding: 18px 0 24px; }
.journey-time { font-size: calc(clamp(34px, 5vw, 58px) + var(--mobile-type-increase, 0px)); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.04em; }
.journey-time svg { display: block; max-width: 100%; height: auto; fill: currentColor; }
.journey-city { margin-top: 12px; font-size: calc(14px + var(--mobile-type-increase, 0px)); }
.journey-city svg { display: block; max-width: 100%; height: auto; fill: currentColor; }
.journey-weather { min-height: 135px; display: flex; align-items: center; gap: 24px; }
.journey-weather-icon { font-size: calc(58px + var(--mobile-type-increase, 0px)); line-height: 1; color: var(--accent); }
.journey-weather-icon svg { display: block; width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.journey-temperature { font-size: calc(42px + var(--mobile-type-increase, 0px)); line-height: 1.2; color: var(--bright); }
.journey-forecast { font-size: calc(12px + var(--mobile-type-increase, 0px)); }
.journey-track { display: flex; align-items: center; gap: 16px; min-height: 104px; }
.journey-track strong { display: block; color: var(--bright); }
.journey-track div > span { display: block; color: var(--fg-dim); font-size: calc(12px + var(--mobile-type-increase, 0px)); margin-top: 5px; }
.journey-record { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--green); font-size: calc(28px + var(--mobile-type-increase, 0px)); }
.journey-progress { height: 3px; background: var(--line); margin: 10px 0 22px; }
.journey-progress span { display: block; background: var(--green); height: 100%; width: 28%; transition: width 1200ms linear; }
.journey-progress.is-playing span { width: 44%; }
.journey-video-scene { position: relative; height: 150px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.journey-browser-label { position: absolute; top: 8px; left: 10px; font-size: calc(10px + var(--mobile-type-increase, 0px)); color: var(--fg-dim); }
.journey-dock { position: absolute; right: 0; inset-block: 0; width: 32%; border-left: 1px solid var(--line); background: var(--night); }
.journey-video { position: absolute; left: 6%; top: 34px; width: 55%; height: 98px; display: grid; place-content: center; text-align: center; background: var(--surface); color: var(--bright); transition: left 650ms cubic-bezier(.2,.8,.2,1), width 650ms cubic-bezier(.2,.8,.2,1), top 650ms ease, height 650ms ease; }
.journey-editor textarea,.journey-command { font-family: var(--mono); }
.journey-video small { font-size: calc(9px + var(--mobile-type-increase, 0px)); }
.journey-video-scene.is-docked .journey-video { left: 70%; width: 28%; height: 68px; top: 54px; }
.journey-task-paper { margin-top: 8px; }
.journey-task-paper .sheet { min-height: 140px; }
.journey-install-path { display: flex; gap: 0; padding: 0; margin: 0 0 24px; list-style: none; counter-reset: steps; }
.journey-install-path li { flex: 1; font-size: calc(11px + var(--mobile-type-increase, 0px)); border-bottom: 2px solid var(--line); padding: 0 6px 10px 0; color: var(--fg-dim); }
.journey-install-path li::before { counter-increment: steps; content: counter(steps) '. '; }
.journey-install-path li[aria-current] { color: var(--green); border-color: var(--green); }
.journey-install-stage { min-height: 260px; }
.journey h3 { color: var(--bright); font-size: calc(14px + var(--mobile-type-increase, 0px)); margin: 0 0 14px; }
.journey-install-stage ul { padding-left: 18px; font-size: calc(13px + var(--mobile-type-increase, 0px)); }
.journey-install-stage li { margin-bottom: 10px; }
.journey-command { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--green); font: inherit; font-size: calc(13px + var(--mobile-type-increase, 0px)); padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--night); }
.journey-installed-panel { border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-width: 310px; }
.journey-installed-panel > span { display: flex; justify-content: space-between; font-size: calc(12px + var(--mobile-type-increase, 0px)); margin-bottom: 12px; }
.journey-installed-panel .sheet { min-height: 110px; }
@media (max-width: 640px) {
  .journey-stage { padding: 14px; }
  .journey button:not(.circle) { min-height: 44px; }
  .journey-editor textarea { font-size: calc(16px + var(--mobile-type-increase, 0px)); }
  .journey-file-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .journey-card-stage { min-height: 300px; }
  .journey-install-stage { min-height: 330px; }
  .journey-install-path li { font-size: calc(10px + var(--mobile-type-increase, 0px)); }
  .journey-install-path li::before { display: block; }
}
@media (max-width: 480px) {
  .journey-file-map { --map-row: 84px; --map-head: 30px; --map-pad: 6px; --map-gap: 10px; grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr); }
  .map-window-bar { padding-inline: 6px; gap: 4px; font-size: calc(10px + var(--mobile-type-increase, 0px)); }
  .map-window-bar svg { width: 16px; height: 16px; }
  .map-paper .sheet { padding: 8px; }
  .map-paper { font-size: calc(11px + var(--mobile-type-increase, 0px)); }
  .journey button.map-file { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 6px; }
  .map-file-icon { width: 24px; height: 30px; }
  .map-filename { font-size: calc(10px + var(--mobile-type-increase, 0px)); }
  .map-file-code { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .journey *, .journey *::after { transition: none !important; animation: none !important; }
}
.journey-is-suspended *, .journey-is-suspended *::after { transition: none !important; animation: none !important; }
@media (hover: none) {
  .journey button:not([aria-pressed="true"]):not(.map-note):not(.circle):hover { border-color: var(--line); }
}

/* Expanded widget marketplace: every local preview is available together. */
[data-journey="cards"] .journey-card-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; min-height: 0; }
[data-journey="cards"] .journey-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 0; }
[data-journey="cards"] h4 { margin: 0 0 20px; font: 600 calc(18px + var(--mobile-type-increase, 0px))/1.3 var(--sans); color: var(--bright); }
[data-journey="cards"] .journey-card > button { margin-top: 16px; }
[data-journey="cards"] .journey-help { margin-top: 14px; }
[data-journey="cards"] .journey-footer[hidden], [data-journey="cards"] .journey-label[hidden] { display: none; }
@media (max-width: 600px) { [data-journey="cards"] .journey-card-stage { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
[data-journey="cards"] .journey-video-scene, [data-journey="cards"] .journey-progress, [data-journey="cards"] .journey-paper { width: 100%; }

.journey-controls[hidden] { display: none; }
