/* Workspace tour: light product frame on the paper/surface palette. */
.tour-shell { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--white); overflow: clip; box-shadow: 0 40px 80px -48px rgba(28, 16, 24, .35); }
.tour-window-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: var(--pink); color: var(--white); }
.tour-appbrand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.tour-appbrand img { width: auto; height: 22px; }
.tour-search { flex: 0 1 340px; display: flex; align-items: center; height: 34px; padding: 0 16px; border: 1px solid var(--on-pink-line); border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; color: var(--on-pink-2); }
.tour-user { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--ink); font-size: 12px; font-weight: 700; }

.tour-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.tour-sidebar { padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.tour-firm { display: flex; align-items: center; gap: 10px; margin: 0 4px 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; line-height: 1.3; }
.tour-firm small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.tour-firm-badge { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--white); font-size: 11px; font-weight: 700; }
.tour-tabs { display: flex; flex-direction: column; gap: 4px; }
.tour-tab { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; font-weight: 500; line-height: 1.3; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.tour-tab svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tour-tab:hover { background: var(--white); color: var(--ink); }
.tour-tab[aria-selected="true"] { background: var(--pink); color: var(--white); }

.tour-main { min-width: 0; }
.tour-panel { padding: 32px; scroll-margin-top: 28px; }
.tour-panel + .tour-panel { border-top: 1px solid var(--line); }
[data-tour-enhanced] .tour-panel { display: flex; flex-direction: column; min-height: 600px; border-top: 0; }
.tour-panel:focus-visible, .tour-table-wrap:focus-visible { outline: 3px solid var(--pink); outline-offset: -3px; }
.tour-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.tour-breadcrumb { margin-bottom: 6px; font-size: 13px; color: var(--ink-3); }
.tour-panel h3 { font-size: 26px; font-weight: 700; font-stretch: 105%; line-height: 1.2; letter-spacing: -.015em; }
.tour-panel-heading > .tour-badge { flex-shrink: 0; margin-top: 4px; }

.tour-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--mint-tint); color: var(--mint-ink); font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.tour-badge-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); }
.tour-badge-pink { background: var(--pink-tint); color: var(--pink-deep); }

.tour-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.tour-metrics > div { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tour-metrics span { display: block; font-size: 13px; color: var(--ink-2); }
.tour-metrics strong { display: block; margin-top: 6px; font-size: 36px; font-weight: 800; font-stretch: 110%; line-height: 1.1; font-variant-numeric: tabular-nums; }

.tour-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tour-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.tour-card h4 { margin: 0 0 16px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.tour-rows, .tour-task-list, .tour-source-list, .tour-review-path, .tour-run-steps { list-style: none; margin: 0; padding: 0; }
.tour-rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 11px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.tour-rows li:first-child { padding-top: 0; border-top: 0; }
.tour-rows li:last-child { padding-bottom: 0; }
.tour-count { min-width: 26px; padding: 2px 6px; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; }
.tour-task-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.tour-task-list li:last-child { margin-bottom: 0; }
.tour-checkbox { display: grid; place-items: center; flex: 0 0 18px; height: 18px; margin-top: 2px; border: 1.5px solid var(--line-strong); border-radius: 5px; }
.tour-checkbox.is-checked { background: var(--mint); border-color: var(--mint); }
.tour-checkbox svg, .tour-run-node svg { width: 12px; height: 12px; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.tour-task-list strong, .tour-source-list strong, .tour-review-path strong, .tour-run-steps strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.tour-task-list div > span, .tour-source-list div > span, .tour-review-path small, .tour-run-steps small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.tour-explanation { margin-top: 24px; padding: 2px 0 2px 16px; border-left: 3px solid var(--mint); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
[data-tour-enhanced] .tour-explanation { margin-top: auto; }
[data-tour-enhanced] .tour-panel > :nth-last-child(2) { margin-bottom: 24px; }

.tour-context { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; padding-block: 16px; border-block: 1px solid var(--line); }
.tour-context span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--ink-3); }
.tour-context strong { font-size: 15px; font-weight: 600; }
.tour-card-note { margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }

.tour-file-path, .tour-workflow-lifecycle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.tour-file-path > span[aria-hidden], .tour-workflow-lifecycle > span[aria-hidden] { color: var(--ink-3); }
.tour-file-path > span:not([aria-hidden]), .tour-workflow-lifecycle > span:not([aria-hidden]) { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; }
.tour-workflow-lifecycle strong { padding: 6px 12px; border-radius: 999px; background: var(--pink); color: var(--white); font-weight: 600; }

.tour-table-wrap { position: relative; overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.tour-table { width: 100%; min-width: 540px; border-collapse: collapse; text-align: left; font-size: 14px; }
.tour-table caption { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; font-weight: 700; }
.tour-table th, .tour-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.tour-table thead { background: var(--surface); font-size: 13px; color: var(--ink-2); }
.tour-table th { font-weight: 600; }
.tour-table tbody th { font-weight: 500; }
.tour-table td { color: var(--ink-2); }
.tour-table tbody tr:last-child > * { border-bottom: 0; }
.tour-file-type { display: inline-block; min-width: 32px; margin-right: 10px; padding: 3px 5px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 10px; font-weight: 700; text-align: center; letter-spacing: .03em; }
.tour-compact-card { display: flex; align-items: flex-start; gap: 20px; }
.tour-compact-card h4 { flex: 0 0 32%; margin: 0; }
.tour-compact-card > p, .tour-control-card > p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.tour-source-list > li { display: flex; align-items: flex-start; gap: 12px; padding-block: 16px; border-top: 1px solid var(--line); }
.tour-source-list > li:first-child { padding-top: 0; border: 0; }
.tour-source-list .tour-file-type { margin: 1px 0 0; }
.tour-source-list .tour-source-state { margin-top: 8px; color: var(--pink-deep); font-weight: 600; }
.tour-source-list .tour-source-state.is-done { color: var(--mint-ink); }
.tour-review-path { display: flex; flex-direction: column; gap: 14px; }
.tour-review-path li { display: flex; gap: 12px; }
.tour-review-path li > span { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12px; font-weight: 700; }
.tour-scope-note { padding: 12px 14px; margin-top: 16px; border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; line-height: 1.6; color: var(--ink-2); }

.tour-automation-split { grid-template-columns: 1.55fr 1fr; }
.tour-run-steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; padding-bottom: 20px; }
.tour-run-steps li:last-child { padding-bottom: 0; }
.tour-run-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: var(--line); }
.tour-run-node { display: grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--white); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tour-run-node.is-done { background: var(--mint); border-color: var(--mint); }
.tour-run-steps .tour-badge { grid-column: 2; justify-self: start; margin-top: 4px; }
.tour-control-card { background: var(--surface); }
.tour-control-card h4 { font-size: 20px; font-weight: 800; font-stretch: 108%; line-height: 1.2; }
.tour-detail { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-strong); }
.tour-detail > summary { padding-block: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.tour-detail > p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

.tour-bottom-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.tour-bottom-bar > p { font-size: 13px; color: var(--ink-3); }
.tour-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.tour-controls > span { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tour-controls button { width: 40px; height: 40px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--white); color: var(--ink); font-size: 16px; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.tour-controls button:hover:not(:disabled) { background: var(--pink); border-color: var(--pink); color: var(--white); }
.tour-controls button:disabled { color: var(--line-strong); cursor: default; }

@media (max-width: 1100px) {
  .tour-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .tour-panel { padding: 26px; }
  .tour-panel-heading { flex-direction: column; gap: 10px; }
  .tour-automation-split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .tour-search { display: none; }
  .tour-layout { grid-template-columns: minmax(0, 1fr); }
  .tour-sidebar { min-width: 0; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tour-firm { display: none; }
  .tour-tabs { flex-direction: row; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
  .tour-tab { flex: 0 0 auto; }
  [data-tour-enhanced] .tour-panel { min-height: 640px; }
}
@media (max-width: 640px) {
  .tour-panel { padding: 22px 18px; }
  .tour-panel h3 { font-size: 22px; }
  .tour-metrics { gap: 8px; }
  .tour-metrics > div { padding: 14px 12px; }
  .tour-metrics span { font-size: 12px; }
  .tour-metrics strong { font-size: 28px; }
  .tour-split { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tour-context { gap: 10px; }
  .tour-context span { font-size: 12px; }
  .tour-context strong { font-size: 14px; }
  .tour-compact-card { display: block; }
  .tour-compact-card h4 { margin-bottom: 10px; }
  .tour-bottom-bar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 18px; }
  .tour-controls { align-self: flex-end; }
  [data-tour-enhanced] .tour-panel { min-height: 0; }
}
