/* Product tour: the narration on paper, the product in its own quiet UI (the real app's palette and Geist). */
.tour { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); align-items: start; padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); padding-bottom: 4rem; }
.tour-head { padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.tour-head h1 { font-size: var(--step-3); line-height: 1.04; margin: .8rem 0 .8rem; }
.tour-head p { max-width: 60ch; color: var(--body); }

/* narration */
.narr { position: sticky; top: 84px; }
.tour-steps { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.tour-steps > li { counter-increment: t; border-top: 1px solid var(--rule); padding: 1.1rem 0 1.2rem; }
.tour-steps > li:last-child { border-bottom: 1px solid var(--rule); }
.tour-steps h2 { font-size: 1.3rem; line-height: 1.25; display: flex; gap: .8rem; align-items: baseline; }
.tour-steps h2::before { content: counter(t, decimal-leading-zero); font: 500 .74rem/1 var(--mono); color: var(--brass); }
.tour-steps p { margin-top: .5rem; font-size: .97rem; color: var(--body); }
.tour-steps .why { margin-top: .7rem; font: 400 .8rem/1.5 var(--mono); color: var(--muted); }
.tour-steps template { display: none; }
/* with JS: one step at a time */
.js .tour-steps > li { display: none; border: 0; padding: 0; }
.js .tour-steps > li.cur { display: block; }
.js .tour-steps h2 { font-size: var(--step-2); line-height: 1.12; flex-direction: column; gap: .7rem; }
.js .tour-steps h2::before { content: attr(data-n); }
.js .tour-steps p { font-size: 1.04rem; }
.ctrl { display: none; }
.js .ctrl { display: flex; align-items: center; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }
.ctrl .back { background: none; border: 0; font: 600 .95rem/1 var(--sans); color: var(--muted); cursor: pointer; padding: .9rem 0; }
.ctrl .back:hover { color: var(--ink); }
.ctrl .back[disabled] { opacity: .35; cursor: default; }
.dots { display: none; }
.js .dots { display: flex; gap: 6px; margin-top: 1.6rem; }
.dots button { width: 22px; height: 4px; border: 0; padding: 0; background: var(--rule-2); cursor: pointer; }
.dots button.on { background: var(--brass); }
.dots button.done { background: var(--ink); }
.hint { display: none; }
.js .hint { display: block; margin-top: 1rem; font: 500 .72rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--stamp); }
.endcta { display: none; }
.js .endcta.show { display: block; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }

/* the product window */
.win { display: none; }
.js .win { display: block; background: #fff; border: 1px solid var(--rule-2); box-shadow: 0 40px 80px -40px rgba(60, 45, 20, .45), 0 2px 0 var(--paper-2); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; background: #efece6; border-bottom: 1px solid #ddd8cf; }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d6d0c4; }
.win-bar .url { flex: 1; background: #fff; border: 1px solid #ddd8cf; border-radius: 6px; padding: .3rem .7rem; font: 500 .74rem/1.2 "Geist Mono", var(--mono); color: #7c7e84; max-width: 420px; margin: 0 auto; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-bar .demo { font: 500 .6rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--stamp); white-space: nowrap; }

.app { --bg: #f6f5f2; --s: #fff; --sunk: #f1efeb; --t: #16171a; --t2: #4a4c52; --m: #7c7e84; --r1: #e7e4de; --r2: #d9d5cd;
  --ok: #2f6b4f; --oks: #e4eee8; --fix: #a86812; --fixs: #f6ead6; --dup: #b23e2b; --dups: #f6e1dc; --miss: #2d5d8c; --misss: #e1e9f2; --pend: #6c6787; --pends: #e9e7f0;
  font: 400 13px/1.45 "Geist", var(--sans); color: var(--t); background: var(--bg); display: grid; grid-template-columns: 196px 1fr; min-height: 560px; position: relative; font-feature-settings: "tnum" 1; }
.app .rail { background: #fbfaf8; border-right: 1px solid var(--r1); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.app .org { display: flex; gap: 9px; align-items: center; padding: 2px 6px 14px; }
.app .org i { width: 26px; height: 26px; border-radius: 6px; background: var(--t); color: #fff; display: grid; place-items: center; font: 600 12px/1 "Geist", sans-serif; font-style: normal; }
.app .org b { display: block; font-weight: 600; font-size: 12.5px; }
.app .org span { color: var(--m); font-size: 11px; }
.app .nav a { display: flex; justify-content: space-between; padding: 6px 9px; border-radius: 6px; color: var(--t2); text-decoration: none; font-weight: 500; font-size: 12.5px; }
.app .nav a.on { background: var(--s); color: var(--t); box-shadow: 0 0 0 1px var(--r1); }
.app .nav a span { font: 500 11px/1.5 "Geist Mono", monospace; color: var(--m); }
.app .nav a span.hot { color: var(--dup); }
.app .body { padding: 18px 22px 24px; min-width: 0; position: relative; }
.app h3 { font: 600 18px/1.2 "Geist", sans-serif; letter-spacing: -.01em; margin: 0 0 4px; }
.app .sub { color: var(--m); font-size: 12.5px; margin: 0 0 14px; }
.app .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.app .between { justify-content: space-between; }
.app .b { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 "Geist", sans-serif; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--r2); background: var(--s); color: var(--t); cursor: default; white-space: nowrap; }
.app .b.dark { background: var(--t); color: #fff; border-color: var(--t); }
.app .panel { background: var(--s); border: 1px solid var(--r1); border-radius: 10px; margin-top: 12px; overflow: hidden; }
.app .ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--r1); }
.app .ph b { font-weight: 600; font-size: 13px; }
.app table { width: 100%; border-collapse: collapse; }
.app th { text-align: left; font: 500 10.5px/1 "Geist Mono", monospace; color: var(--m); text-transform: uppercase; letter-spacing: .06em; padding: 8px 14px; border-bottom: 1px solid var(--r1); background: #fcfbf9; }
.app td { padding: 8px 14px; border-bottom: 1px solid var(--r1); vertical-align: top; }
.app tr:last-child td { border-bottom: 0; }
.app .cd { font: 500 11px/1.4 "Geist Mono", monospace; color: var(--m); }
.app .pill { display: inline-block; font: 500 11px/1 "Geist", sans-serif; padding: 4px 7px; border-radius: 5px; white-space: nowrap; }
.app .p-ok { background: var(--oks); color: var(--ok); } .app .p-fix { background: var(--fixs); color: var(--fix); } .app .p-dup { background: var(--dups); color: var(--dup); }
.app .p-miss { background: var(--misss); color: var(--miss); } .app .p-pend { background: var(--pends); color: var(--pend); }
.app .stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--s); border: 1px solid var(--r1); border-radius: 10px; }
.app .stats div { padding: 12px 14px; border-right: 1px solid var(--r1); }
.app .stats div:last-child { border-right: 0; }
.app .stats small { display: block; color: var(--m); font-size: 11.5px; }
.app .stats b { display: block; font: 600 22px/1.25 "Geist", sans-serif; letter-spacing: -.02em; margin-top: 2px; }
.app .stats b.hot { color: var(--dup); }
.app .stats em { font-style: normal; color: var(--m); font-size: 11px; }
.app .case { border: 1px solid var(--r1); border-radius: 9px; margin: 10px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 10px 12px; align-items: center; background: var(--s); }
.app .case .v { font: 500 11px/1 "Geist", sans-serif; padding: 5px 8px; border-radius: 6px; border: 1px solid currentColor; color: var(--dup); }
.app .case h4 { margin: 0; font: 600 13px/1.3 "Geist", sans-serif; }
.app .case .w { color: var(--m); font-size: 11.5px; }
.app .case .st { color: var(--m); font-size: 11.5px; text-align: right; }
.app .case.open { grid-template-columns: auto 1fr auto; }
.app .case .detail { grid-column: 1 / -1; border-top: 1px solid var(--r1); margin-top: 8px; padding-top: 10px; display: grid; gap: 8px; }
.app .case .detail h5 { margin: 0; font: 600 11px/1 "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--m); }
.app .case .detail ul { margin: 0; padding-left: 16px; color: var(--t2); }
.app .case .detail pre { margin: 0; background: var(--sunk); border-radius: 7px; padding: 9px 11px; font: 400 11.5px/1.5 "Geist Mono", monospace; white-space: pre-wrap; color: var(--t2); }
.app .modal { position: absolute; inset: 0; background: rgba(22, 23, 26, .28); display: grid; place-items: center; padding: 20px; z-index: 5; }
.app .modal .m { background: var(--s); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); width: min(520px, 100%); padding: 16px 18px; display: grid; gap: 10px; }
.app .modal .m h4 { margin: 0; font: 600 15px/1.3 "Geist", sans-serif; }
.app .fld { display: grid; gap: 4px; }
.app .fld label { font-size: 11.5px; color: var(--m); }
.app .fld div { border: 1px solid var(--r2); border-radius: 7px; padding: 7px 9px; font-size: 12.5px; background: #fff; }
.app .sheet { font: 400 11px/1.4 "Geist Mono", monospace; }
.app .sheet td, .app .sheet th { padding: 6px 9px; border: 1px solid var(--r1); }
.app .toast { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--t); color: #fff; border-radius: 9px; padding: 9px 13px; font-size: 12px; max-width: 86%; z-index: 6; }
.app .pdf { background: #fff; border: 1px solid var(--r1); box-shadow: 0 8px 24px rgba(0,0,0,.08); max-width: 430px; margin: 10px auto 0; padding: 22px 24px; }
.app .pdf .t { font: 600 16px/1.25 "Geist", sans-serif; }
.app .pdf .k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.app .pdf .k div { border-top: 2px solid var(--t); padding-top: 6px; }
.app .pdf .k b { display: block; font: 600 20px/1.2 "Geist", sans-serif; }
.app .pdf .k span { font-size: 11px; color: var(--m); }
.app .bar { height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.app .bar i { display: block; height: 100%; background: var(--ok); }

/* hotspot: where to click */
.app [data-hot] { position: relative; cursor: pointer; }
.app [data-hot]::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--stamp, #b0392b); border-radius: 9px; animation: hot 1.6s ease-out infinite; pointer-events: none; }
@keyframes hot { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); } }
.app .fade { animation: in .45s cubic-bezier(.2,.7,.2,1); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1060px) {
  .tour { grid-template-columns: 1fr; }
  .narr { position: static; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; min-height: 0; }
  .app .rail { display: none; }
  .app .body { padding: 14px 12px 18px; }
  .app .stats { grid-template-columns: 1fr 1fr; }
  .app .stats div:nth-child(2) { border-right: 0; }
  .app .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--r1); }
  .app .hide-s { display: none; }
  .app .case, .app .case.open { grid-template-columns: 1fr; margin: 8px; }
  .app .case .v { justify-self: start; }
  .app .case .st { text-align: left; }
  .app th, .app td { padding: 7px 8px; }
  .win-bar .url { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app [data-hot]::after { animation: none; }
  .app .fade { animation: none; }
}
