/* Sentinel v2 - tour.css: the visual tour (v2/tour.js, SNT-155). A full-screen layer: the miniature of the app on a stage, the words
   under it, the scenes' progress and the controls. The miniature is drawn at 880 x 550 design units in the app's own tokens (it wears
   the reader's theme) and scaled to the stage (--tour-fit); its camera and cursor are moved by tour.js. Animations always on. */
.v2tour {
  position: fixed; inset: 0; z-index: calc(var(--z-modal, 1000) + 20);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); gap: 18px;
  padding: 18px 28px 24px;
  background: radial-gradient(1200px 600px at 50% 30%, color-mix(in srgb, var(--brand, #4f5bd5) 9%, var(--bg-app, var(--canvas, #fff))), var(--bg-app, var(--canvas, #fff)) 70%);
  color: var(--ink, var(--text-primary, #1a2330));
  font-family: var(--font-sans, var(--font-ui, Inter, system-ui, sans-serif));
  animation: v2tour-in .35s cubic-bezier(.22,1,.36,1) both;
}
.v2tour.is-leaving { animation: v2tour-out .26s ease-in both; }
@keyframes v2tour-in { from { opacity: 0; transform: scale(.985); } }
@keyframes v2tour-out { to { opacity: 0; transform: scale(1.01); } }
.v2tour-top { display: flex; align-items: center; gap: 10px; }
.v2tour-mark { width: 22px; height: 22px; color: var(--ink, currentColor); }
.v2tour-brand { font-weight: 600; letter-spacing: -.01em; }
.v2tour .tm-grow { flex: 1 1 auto; }
.v2tour-skip { border: 0; background: transparent; color: var(--ink-3, var(--text-muted)); font: 500 14px var(--font-sans, inherit); cursor: pointer; padding: 8px 10px; border-radius: 8px; }
.v2tour-skip:hover { color: var(--ink); background: var(--surface-hover, rgba(0,0,0,.05)); }

/* the stage: the miniature centred, scaled to fit */
/* the miniature is out of the layout's flow (a scaled box keeps its unscaled size there - 880 px - and widened a phone's page) */
.v2tour-stage { position: relative; min-height: 0; overflow: hidden; }
.v2tour-fit {
  position: absolute; left: 50%; top: 50%; margin: -275px 0 0 -440px;
  width: 880px; height: 550px; transform: scale(var(--tour-fit, 1)); transform-origin: center;
  border-radius: 16px; overflow: hidden; flex: none;
  box-shadow: 0 30px 80px -30px color-mix(in srgb, #000 45%, transparent), 0 0 0 1px var(--line-2, rgba(0,0,0,.12));
  background: var(--bg-app, var(--canvas, #fff));
}
.v2tour-cam { width: 880px; height: 550px; transform-origin: 0 0; will-change: transform; }

/* the words */
.v2tour-caption { text-align: center; display: grid; gap: 6px; justify-items: center; max-width: 720px; margin: 0 auto; }
.v2tour-caption.tm-in { animation: tm-rise .5s cubic-bezier(.22,1,.36,1) both; }
.v2tour-eyebrow { font: 600 12px/16px var(--font-sans, inherit); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink, var(--brand, #4f5bd5)); }
.v2tour-title { margin: 0; font: 500 clamp(24px, 3vw, 34px)/1.15 var(--font-doc, var(--serif, Georgia, serif)); letter-spacing: -.015em; }
.v2tour-line { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2, var(--text-secondary)); }
.v2tour-foot { display: flex; align-items: center; gap: 18px; justify-content: space-between; max-width: 880px; width: 100%; margin: 0 auto; flex-wrap: wrap; }
.v2tour-dots { display: flex; gap: 6px; flex: 1 1 240px; }
.v2tour-dot { position: relative; flex: 1 1 0; height: 4px; border-radius: 999px; overflow: hidden; background: var(--line-2, rgba(0,0,0,.12)); }
.v2tour-dot > i { position: absolute; inset: 0; background: var(--brand, #4f5bd5); transform: scaleX(0); transform-origin: left; }
.v2tour-dot.is-done > i { transform: scaleX(1); }
.v2tour-nav, .v2tour-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.v2tour-nav [hidden], .v2tour-end[hidden] { display: none; }

/* ---- the miniature app ---- */
.tm-app { position: relative; width: 880px; height: 550px; display: grid; grid-template-columns: 168px 1fr; background: var(--bg-app, var(--canvas, #fff)); font-size: 13px; color: var(--ink); text-align: left; }
.tm-side { border-right: 1px solid var(--line, rgba(0,0,0,.08)); background: var(--bg-pane, var(--surface-pane, transparent)); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.tm-brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px 14px; font-size: 14px; }
.tm-logo { width: 18px; height: 18px; }
.tm-nav { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; color: var(--ink-2, var(--text-secondary)); }
.tm-nav > i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; opacity: .6; }
.tm-nav.is-on { background: var(--surface-hover, rgba(0,0,0,.05)); color: var(--ink); font-weight: 600; }
.tm-body { display: grid; grid-template-rows: 48px minmax(0, 1fr); min-width: 0; }
.tm-top { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.tm-search { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; width: 260px; border-radius: 8px; background: var(--bg-sunken, var(--surface-sunken, rgba(0,0,0,.04))); color: var(--ink-3, var(--text-muted)); }
.tm-search > i { width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; }
.tm-grow { flex: 1 1 auto; }
.tm-btn { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line-2, rgba(0,0,0,.14)); background: var(--surface-card, var(--canvas, #fff)); font-weight: 500; white-space: nowrap; transition: transform .12s, background-color .2s, color .2s; }
.tm-btn.is-primary { background: var(--brand, #4f5bd5); border-color: transparent; color: var(--on-brand, #fff); }
.tm-btn.is-lg { height: 38px; padding: 0 22px; font-size: 14px; }
.tm-btn.is-done { background: var(--ok, #2f8a57); color: #fff; }
.tm-btn.is-pressed, .tm-card.is-pressed, .tm-nav.is-pressed, .tm-menu > span.is-pressed { animation: tm-press .32s ease-out; }
.tm-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft, rgba(79,91,213,.15)); color: var(--brand-ink, var(--brand)); font-weight: 600; font-size: 12px; }
.tm-main { position: relative; padding: 22px 26px; min-width: 0; overflow: hidden; }
.tm-h { margin: 0 0 14px; font: 500 22px/1.2 var(--font-doc, var(--serif, Georgia, serif)); }
.tm-muted { color: var(--ink-3, var(--text-muted)); margin: 0; }
.tm-small { font-size: 12px; }
.tm-in { animation: tm-rise .45s cubic-bezier(.22,1,.36,1) both; }
@keyframes tm-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes tm-press { 40% { transform: scale(.94); } }

/* the cursor: a pointer with a ring that answers a tap */
.tm-cursor { position: absolute; left: 62%; top: 70%; width: 18px; height: 22px; z-index: 20; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 26'%3E%3Cpath d='M2 1.5 L2 21 L7.4 16.5 L10.6 23.4 L13.6 22 L10.5 15.4 L17.5 15.4 Z' fill='%23ffffff' stroke='%23111' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.tm-cursor.is-on { opacity: 1; }
.tm-cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--brand, #4f5bd5); opacity: 0; }
.tm-cursor.is-tap::after { animation: tm-tap .55s ease-out; }
@keyframes tm-tap { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.2); } }

/* welcome */
.tm-welcome { position: absolute; inset: 0; display: grid; place-items: center; }
.tm-paper { position: absolute; left: 50%; top: 50%; width: 250px; height: 330px; margin: -165px 0 0 -230px; padding: 34px 28px; border-radius: 10px; background: var(--bg-doc, var(--canvas, #fff)); box-shadow: 0 18px 50px -20px rgba(0,0,0,.35), 0 0 0 1px var(--line, rgba(0,0,0,.08)); display: grid; gap: 14px; align-content: start; overflow: hidden; }
.tm-paper > i { display: block; height: 8px; border-radius: 4px; background: var(--line-2, rgba(0,0,0,.12)); }
.tm-paper > i:nth-child(3n) { width: 70%; } .tm-paper > i:nth-child(4) { width: 85%; background: color-mix(in srgb, var(--sev-high, #d97706) 45%, transparent); }
.tm-scan { position: absolute; left: 0; right: 0; height: 40px; top: -40px; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--brand, #4f5bd5) 22%, transparent), transparent); animation: tm-scan 2.6s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes tm-scan { to { top: 100%; } }
.tm-turn { position: absolute; left: 50%; top: 50%; margin: -60px 0 0 60px; width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-card, var(--canvas, #fff)); box-shadow: 0 18px 50px -20px rgba(0,0,0,.35), 0 0 0 1px var(--line, rgba(0,0,0,.08)); perspective: 300px; }
.tm-big { width: 58px; height: 58px; color: var(--ink); animation: tm-turn 6s linear infinite; }
@keyframes tm-turn { to { transform: rotateY(360deg); } }

/* contracts list (upload) */
.tm-table { border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 12px; overflow: hidden; background: var(--surface-card, transparent); }
.tm-tr { display: grid; grid-template-columns: 1fr 130px 110px; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line, rgba(0,0,0,.06)); }
.tm-tr.is-head { border-top: 0; color: var(--ink-3, var(--text-muted)); font-size: 12px; padding-top: 10px; padding-bottom: 10px; }
.tm-tr > span:first-child { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tm-tr[hidden] { display: none; }
.tm-pdf { display: inline-grid; place-items: center; width: 26px; height: 30px; border-radius: 4px; font: 700 8px/1 var(--font-sans, inherit); font-style: normal; color: #fff; background: #d0453b; flex: none; }
.tm-pdf.is-doc { background: #2f6fd0; }
.tm-reading { color: var(--brand-ink, var(--brand)); animation: tm-blink 1s ease-in-out infinite; }
@keyframes tm-blink { 50% { opacity: .45; } }
.tm-flash { animation: tm-rise .4s ease-out; font-weight: 600; }
.tm-sev { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tm-sev.is-c { color: var(--sev-critical, #c0392b); } .tm-sev.is-h { color: var(--sev-high, #d97706); } .tm-sev.is-m { color: var(--sev-medium, #b58900); } .tm-sev.is-l { color: var(--ink-3, var(--text-muted)); }
.tm-menu { position: absolute; top: 6px; right: 26px; z-index: 5; display: grid; gap: 2px; min-width: 210px; padding: 6px; border-radius: 10px; background: var(--surface-raised, var(--canvas, #fff)); box-shadow: 0 14px 40px -12px rgba(0,0,0,.35), 0 0 0 1px var(--line-2, rgba(0,0,0,.12)); }
.tm-menu.is-right { top: 44px; }
.tm-menu > span { padding: 9px 10px; border-radius: 6px; }
.tm-menu > span:first-child { background: var(--surface-hover, rgba(0,0,0,.05)); font-weight: 500; }
.tm-menu[hidden], .tm-drop[hidden], .tm-sheet[hidden], .tm-ladder[hidden], .tm-ov[hidden], .tm-pane-in[hidden], .tm-keys[hidden], .tm-ask[hidden], .tm-home[hidden], .tm-answer[hidden], .tm-pane-empty[hidden] { display: none; }
.tm-drop { position: absolute; left: 50%; top: 40%; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--surface-raised, var(--canvas, #fff)); box-shadow: 0 20px 50px -14px rgba(0,0,0,.45); transform: translateX(-50%); animation: tm-drop .9s cubic-bezier(.22,1,.36,1) both; font-weight: 500; }
@keyframes tm-drop { from { opacity: 0; transform: translate(-50%, -120px) rotate(-6deg) scale(1.08); } 70% { transform: translate(-50%, 6px) rotate(1deg); } }

/* a contract's workspace (analyse, findings, report) */
.tm-ws { display: grid; gap: 14px; }
.tm-ws-h { display: flex; align-items: center; gap: 10px; font: 500 20px var(--font-doc, var(--serif, Georgia, serif)); }
.tm-chip { font: 500 11px/1 var(--font-sans, inherit); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line-2, rgba(0,0,0,.14)); color: var(--ink-2); }
.tm-tabs { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); padding-bottom: 9px; color: var(--ink-2, var(--text-secondary)); }
.tm-tabs > span.is-on { color: var(--ink); font-weight: 600; box-shadow: 0 10px 0 -8px var(--brand, #4f5bd5); }
.tm-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand-soft, rgba(79,91,213,.15)); color: var(--brand-ink, var(--brand)); font: 600 11px/1 var(--font-sans, inherit); font-style: normal; }
.tm-ov { display: grid; justify-items: center; gap: 12px; padding: 64px 0; border: 1px dashed var(--line-2, rgba(0,0,0,.14)); border-radius: 14px; }
.tm-ladder { display: grid; gap: 12px; padding: 18px 20px; border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 14px; background: var(--surface-card, transparent); max-width: 420px; }
.tm-bar { display: block; height: 4px; border-radius: 999px; background: var(--line-2, rgba(0,0,0,.12)); overflow: hidden; }
.tm-bar > i { display: block; height: 100%; width: 2%; background: var(--brand, #4f5bd5); transition: width .8s linear; }
.tm-ladder ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--ink-3, var(--text-muted)); }
.tm-ladder li { display: flex; align-items: center; gap: 10px; }
.tm-ladder li > i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2, rgba(0,0,0,.2)); flex: none; position: relative; }
.tm-ladder li.is-now { color: var(--ink); font-weight: 600; }
.tm-ladder li.is-now > i { border-color: var(--brand, #4f5bd5); border-top-color: transparent; animation: tm-spin .8s linear infinite; }
.tm-ladder li.is-done { color: var(--ink-2); }
.tm-ladder li.is-done > i { background: var(--ok, #2f8a57); border-color: var(--ok, #2f8a57); }
@keyframes tm-spin { to { transform: rotate(360deg); } }
.tm-chips { display: flex; gap: 6px; }
.tm-chips > span { padding: 5px 10px; border-radius: 8px; background: var(--bg-sunken, rgba(0,0,0,.04)); font-size: 12px; color: var(--ink-2); }
.tm-chips > span.is-on { background: var(--surface-card, #fff); box-shadow: 0 0 0 1px var(--line-2, rgba(0,0,0,.14)); color: var(--ink); font-weight: 600; }
.tm-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tm-list { display: grid; gap: 8px; align-content: start; }
.tm-card { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, rgba(0,0,0,.08)); background: var(--surface-card, transparent); transition: border-color .2s, box-shadow .2s; }
.tm-card > i { display: block; height: 6px; width: 80%; border-radius: 3px; background: var(--line-2, rgba(0,0,0,.1)); }
.tm-card.is-sel { border-color: var(--brand, #4f5bd5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #4f5bd5) 18%, transparent); }
.tm-pane { position: relative; padding: 16px; border-radius: 12px; border: 1px solid var(--line, rgba(0,0,0,.08)); background: var(--surface-card, transparent); min-height: 260px; }
.tm-pane-empty { display: grid; place-items: center; height: 220px; color: var(--ink-3); }
.tm-pane-in { display: grid; gap: 10px; animation: tm-rise .4s ease-out both; }
.tm-pane-in > b { font: 500 17px/1.25 var(--font-doc, var(--serif, Georgia, serif)); }
.tm-pane-in > i { display: block; height: 7px; border-radius: 4px; background: var(--line-2, rgba(0,0,0,.1)); }
.tm-pane-in > i.is-short { width: 60%; }
.tm-acts { display: flex; gap: 8px; margin-top: 6px; }
.tm-keys { position: absolute; left: 16px; bottom: 14px; font-size: 12px; color: var(--ink-3); animation: tm-rise .4s ease-out both; }
.tm-keys kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2, rgba(0,0,0,.18)); border-bottom-width: 2px; font: 600 11px var(--font-sans, inherit); color: var(--ink); background: var(--surface-card, #fff); }
.tm-rpt { display: grid; gap: 12px; }
.tm-hero { display: grid; gap: 8px; padding: 18px; border-radius: 14px; background: color-mix(in srgb, var(--sev-high, #d97706) 10%, var(--surface-card, transparent)); border: 1px solid color-mix(in srgb, var(--sev-high, #d97706) 25%, transparent); }
.tm-eyebrow { font: 600 11px/1 var(--font-sans, inherit); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tm-hero > b { font: 500 22px/1.2 var(--font-doc, var(--serif, Georgia, serif)); }
.tm-hero > i, .tm-line { display: block; height: 7px; border-radius: 4px; background: var(--line-2, rgba(0,0,0,.1)); }
.tm-hero > i.is-short, .tm-line.is-short { width: 55%; }
.tm-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tm-strip > span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, rgba(0,0,0,.08)); color: var(--ink-2); font-size: 12px; }
.tm-strip b { font-size: 20px; color: var(--ink); }
.tm-sheet { position: absolute; right: 34px; bottom: 26px; z-index: 6; width: 150px; height: 190px; padding: 16px; border-radius: 8px; background: var(--bg-doc, #fff); box-shadow: 0 24px 60px -18px rgba(0,0,0,.5), 0 0 0 1px var(--line, rgba(0,0,0,.1)); display: grid; gap: 9px; align-content: start; animation: tm-fly 1s cubic-bezier(.22,1,.36,1) both; }
.tm-sheet > b { display: block; height: 10px; width: 70%; border-radius: 4px; background: color-mix(in srgb, var(--sev-high, #d97706) 40%, transparent); }
.tm-sl { display: block; height: 6px; border-radius: 3px; background: var(--line-2, rgba(0,0,0,.12)); }
.tm-sl.is-short { width: 50%; }
@keyframes tm-fly { from { opacity: 0; transform: translate(-260px, -200px) scale(.4) rotate(-8deg); } }

/* home and ask (keep watch) */
.tm-hello { margin: 4px 0 18px; font: 500 26px/1.15 var(--font-doc, var(--serif, Georgia, serif)); }
.tm-lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tm-lane { display: grid; gap: 8px; align-content: start; padding: 14px; min-height: 150px; border-radius: 12px; border: 1px solid var(--line, rgba(0,0,0,.08)); background: var(--surface-card, transparent); }
.tm-lane > b { font: 600 11px/1.3 var(--font-sans, inherit); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tm-lane > span { padding: 8px 10px; border-radius: 8px; background: var(--bg-sunken, rgba(0,0,0,.035)); font-size: 12.5px; }
.tm-lane:first-child > span { box-shadow: inset 3px 0 0 var(--sev-critical, #c0392b); }
.tm-ask { display: grid; justify-items: center; gap: 14px; padding-top: 18px; animation: tm-rise .45s ease-out both; }
.tm-askbox { width: 520px; min-height: 64px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--brand, #4f5bd5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #4f5bd5) 14%, transparent); font-size: 16px; display: flex; align-items: flex-start; }
.tm-caret { display: inline-block; width: 2px; height: 20px; margin-left: 2px; background: var(--ink); animation: tm-blink .9s steps(1) infinite; }
.tm-answer { width: 520px; display: grid; gap: 8px; animation: tm-rise .45s ease-out both; }
.tm-answer > i { display: block; height: 8px; border-radius: 4px; background: var(--line-2, rgba(0,0,0,.12)); }
.tm-answer > i.is-short { width: 70%; }
.tm-cite { justify-self: start; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2, rgba(0,0,0,.14)); font-size: 12px; color: var(--brand-ink, var(--brand)); background: var(--surface-card, transparent); }

/* a phone: the stage takes the width, the words and the controls stack */
@media (max-width: 640px) {
  .v2tour { padding: 12px 16px 18px; gap: 12px; }
  .v2tour-title { font-size: 22px; }
  .v2tour-line { font-size: 14.5px; }
  .v2tour-foot { flex-direction: column; align-items: stretch; }
  .v2tour-nav, .v2tour-end { justify-content: flex-end; }
  .v2tour-end .btn { flex: 1 1 auto; }
}
