/* ARI Showcase — shared tokens, stage, rail and device frames. See ../CONTRACT.md. Extend; never rename. */
:root {
  /* presenter chrome (Allternit) */
  --stage: #101214; --stage-2: #181b1f; --stage-line: #2a2e34;
  --chrome-ink: #f3f4f5; --chrome-dim: #9aa1ab; --chrome-accent: #e07a5f;
  --paper: #ffffff; --fill: #f3f4f2; --line: #e3e5e1; --ink: #1a1a1a; --dim: #5d6168;
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --rail-h: 64px; --banner-h: 28px;
  --chrome-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* business theme: set on <html> by shell.js from PACKET.theme */
  --b-primary: #1f4fd8; --b-primary-ink: #ffffff; --b-accent: #f2a541;
  --b-surface: #ffffff; --b-ink: #14171a;
  --b-display: "Fraunces", Georgia, serif; --b-body: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: radial-gradient(1200px 700px at 50% -10%, #1d2126 0%, var(--stage) 60%); color: var(--chrome-ink);
  font: 15px/1.45 var(--chrome-font); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* layout: banner, stage, rail */
.banner { height: var(--banner-h); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px;
  font-size: 11.5px; letter-spacing: .01em; color: var(--chrome-dim); border-bottom: 1px solid var(--stage-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage { position: absolute; inset: var(--banner-h) 0 var(--rail-h) 0; }
.scene { position: absolute; inset: 0; display: none; padding: 18px 22px; overflow: hidden; }
.scene.is-on { display: flex; }
.rail { position: absolute; left: 0; right: 0; bottom: 0; height: var(--rail-h); display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: color-mix(in srgb, var(--stage) 86%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--stage-line); }
.rail-mark { font: 600 13px/1 var(--chrome-font); letter-spacing: .08em; color: var(--chrome-ink); padding: 12px 6px; user-select: none; -webkit-user-select: none; }
.rail-tabs { display: flex; gap: 6px; margin: 0 auto; }
.rail-tab { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--chrome-dim); font-weight: 500; }
.rail-tab.is-on { background: var(--chrome-ink); color: var(--stage); }
.rail-act { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--stage-line); background: transparent; color: var(--chrome-dim); font-size: 13px; }

/* browser frame: <div class="browser"><div class="browser-bar"><i></i><i></i><i></i><div class="browser-url"></div></div><div class="browser-view"></div></div> */
.browser { display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: var(--r-m); overflow: hidden; background: var(--b-surface);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); }
.browser-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #eceeed; border-bottom: 1px solid #d9dcd8; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #c9cdc8; }
.browser-url { margin-left: 10px; flex: 1; max-width: 520px; height: 24px; border-radius: 7px; background: #fff; color: #4a4f55; font-size: 12px; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.browser-view { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; color: var(--b-ink); font-family: var(--b-body); background: var(--b-surface); }

/* phone frame: <div class="phone"><div class="phone-screen"></div></div>  logical screen 390x844; scale with --phone-scale */
.phone { --phone-scale: 1; position: relative; flex: none; width: calc(414px * var(--phone-scale)); height: calc(868px * var(--phone-scale)); }
.phone::before { content: ""; position: absolute; inset: 0; border-radius: calc(56px * var(--phone-scale)); background: #0b0c0d;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1.5px #3a3e44, 0 0 0 1px #000; }
.phone-screen { position: absolute; left: calc(12px * var(--phone-scale)); top: calc(12px * var(--phone-scale)); width: 390px; height: 844px;
  transform: scale(var(--phone-scale)); transform-origin: 0 0; border-radius: 44px; overflow: hidden; background: var(--b-surface); color: var(--b-ink); font-family: var(--b-body); }
.phone-screen::after { content: ""; position: absolute; left: 50%; top: 11px; width: 112px; height: 30px; margin-left: -56px; border-radius: 20px; background: #0b0c0d; pointer-events: none; z-index: 50; }

/* small shared pieces */
.tag-sample { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font: 500 11px/1 var(--chrome-font); letter-spacing: .02em;
  background: color-mix(in srgb, var(--b-ink) 8%, transparent); color: color-mix(in srgb, var(--b-ink) 70%, transparent); }
.scene-side { flex: none; width: 300px; padding: 6px 4px 6px 22px; display: flex; flex-direction: column; gap: 14px; color: var(--chrome-ink); }
.scene-side h2 { margin: 0; font: 600 22px/1.2 var(--chrome-font); letter-spacing: -.01em; }
.scene-side p { margin: 0; color: var(--chrome-dim); }

/* bare mode: one scene, no chrome */
html.is-bare .banner, html.is-bare .rail { display: none; }
html.is-bare .stage { inset: 0; }
html.is-bare .scene { padding: 0; }
html.is-bare .browser, html.is-bare .browser-view { border-radius: 0; box-shadow: none; }
html.is-bare .browser-bar { display: none; }

/* phone-sized viewport: rail becomes a bottom tab bar */
@media (max-width: 700px) {
  :root { --rail-h: 58px; }
  .scene { padding: 10px; flex-direction: column; }
  .scene-side { width: auto; padding: 4px 6px; }
  .rail { padding: 0 6px; gap: 2px; }
  .rail-mark, .rail-act { display: none; }
  .rail-tabs { width: 100%; justify-content: space-between; gap: 0; }
  .rail-tab { padding: 0 9px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- appended by A1 (shell): rail labels, notes drawer, errors --- */
.rail-short { display: none; }
.rail-tab:focus-visible, .rail-act:focus-visible { outline: 2px solid var(--chrome-accent); outline-offset: 2px; }
.notes { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 1000; display: flex; flex-direction: column;
  background: var(--stage-2); color: var(--chrome-ink); border-left: 1px solid var(--stage-line); box-shadow: -30px 0 60px rgba(0,0,0,.5);
  transform: translateX(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
.notes.is-open { transform: none; visibility: visible; transition: transform .22s ease; }
.notes-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--stage-line); }
.notes-track { font-size: 12px; color: var(--chrome-dim); border: 1px solid var(--stage-line); border-radius: 999px; padding: 3px 9px; }
.notes-x { margin-left: auto; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--stage-line); background: transparent; }
.notes-body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; }
.notes-sec h3 { margin: 18px 0 6px; font-size: 12px; font-weight: 600; color: var(--chrome-dim); letter-spacing: .02em; }
.notes-sec p, .notes-sec li { margin: 0; font-size: 14px; line-height: 1.5; }
.notes-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.notes-sec a { color: #9cc3ff; word-break: break-all; }
.notes-acts { margin-top: 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notes-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--chrome-ink); color: var(--stage); font-weight: 600; }
.notes-meta { font-size: 12px; color: var(--chrome-dim); }
.shell-error { margin: auto; color: var(--chrome-dim); }
@media (max-width: 700px) {
  .rail-long { display: none; }
  .rail-short { display: inline; }
  .rail-tab { padding: 0 6px; min-width: 44px; }
}

/* v2: fixed price button in the rail */
.rail-price { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--chrome-accent, #fff); color: var(--stage, #111); font-weight: 650; font-size: 14px; white-space: nowrap; cursor: pointer; }
.rail-price.is-off { display: none; }
.rail-price:focus-visible { outline: 2px solid var(--chrome-ink); outline-offset: 2px; }
@media (max-width: 700px) {
  .rail { flex-wrap: wrap; height: auto; min-height: var(--rail-h); padding-bottom: 4px; }
  .rail-price { order: -1; width: 100%; min-height: 40px; margin-top: 4px; }
}
.notes-video video { display: block; width: 100%; margin-top: 10px; border-radius: 12px; background: #000; }

/* ===== v5 rail: wordmark, segmented track with sliding thumb, globe, coral price, ghost reset ===== */
:root { --rail-ease: cubic-bezier(.2, .8, .2, 1); }
.rail { min-height: var(--rail-h); gap: 12px; padding: 0 18px; border-top: 1px solid color-mix(in srgb, var(--chrome-ink) 9%, transparent); }
.rail .rail-mark { padding: 0; display: flex; align-items: center; flex: none; color: var(--chrome-ink); overflow: hidden; }
.rail .rail-mark svg { display: block; flex: none; }
@media (max-width: 1000px) { .rail .rail-mark { width: 42px; } }
.rail .rail-tabs { position: relative; display: flex; gap: 2px; margin: 0 auto; padding: 4px; border-radius: 999px; background: var(--stage-2); border: 1px solid var(--stage-line); }
.rail .rail-thumb { position: absolute; left: 0; top: 0; border-radius: 999px; background: var(--chrome-ink); opacity: 0; pointer-events: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 4px 14px rgba(0,0,0,.35); transition: transform 220ms var(--rail-ease), width 220ms var(--rail-ease); will-change: transform; }
.rail .rail-thumb.is-set { opacity: 1; }
.rail .rail-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; background: transparent;
  color: var(--chrome-dim); font-weight: 550; font-size: 14px; white-space: nowrap; transition: color 160ms ease-out; }
.rail .rail-tab:hover { color: var(--chrome-ink); }
.rail .rail-tab.is-on, .rail .rail-tab.is-on:hover { background: transparent; color: var(--stage); }
.rail .rail-tab:active .rail-ic { transform: scale(.9); }
.rail-ic { flex: none; transition: transform 100ms ease-out; }
.rail .rail-lang { border-color: var(--stage-line); color: var(--chrome-dim); }
.rail .rail-lang:hover { color: var(--chrome-ink); }
.rail .rail-price { display: inline-flex; align-items: center; gap: 8px; background: #D97757; color: #fff; padding: 0 18px 0 14px; box-shadow: 0 6px 18px rgba(217,119,87,.28); transition: transform 100ms ease-out, filter 120ms ease-out; }
.rail .rail-price:hover { filter: brightness(1.06); }
.rail .rail-price:active { transform: scale(.97); }
.rail .rail-price.is-off { display: none; }
.rail .rail-act-t { white-space: nowrap; }
.rail .rail-act { display: inline-flex; align-items: center; gap: 8px; border-color: transparent; background: transparent; color: var(--chrome-dim); padding: 0 12px; }
.rail .rail-act:hover { color: var(--chrome-ink); background: var(--stage-2); }
@media (max-width: 1499px) { .rail .rail-act { padding: 0; width: 44px; justify-content: center; } .rail .rail-act-t { display: none; } }
@media (max-width: 860px) { .rail .rail-tab { padding: 0 12px; gap: 6px; font-size: 13px; } }
@media (max-width: 700px) {
  .rail { height: auto; padding: 0 6px 0; gap: 0 6px; }
  .rail .rail-mark { display: none; }
  .rail .rail-tabs { width: 100%; padding: 0; gap: 0; border: 0; border-radius: 0; background: transparent; justify-content: space-between; }
  .rail .rail-tab { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px 4px; min-height: 50px; font-size: 11px; font-weight: 600; letter-spacing: .01em; border-radius: 0; }
  .rail .rail-tab.is-on, .rail .rail-tab.is-on:hover { color: var(--chrome-ink); }
  .rail .rail-thumb { background: transparent; box-shadow: none; height: 50px !important; }
  .rail .rail-thumb::after { content: ""; position: absolute; top: 0; left: 50%; width: 30px; height: 3px; margin-left: -15px; border-radius: 0 0 3px 3px; background: #D97757; }
  .rail .rail-price { width: calc(100% - 50px); }
  .rail .rail-act { display: none; }
}
/* Tablet portrait (iPad 834 px): six tabs + wordmark + globe + price + reset overflowed by ~160 px (ipad_check 2026-11-11).
   Tabs share the space with the icon above the label, like the phone layout. */
@media (min-width: 701px) and (max-width: 1000px) {
  .rail { gap: 6px; padding: 0 8px; }
  .rail .rail-tabs { flex: 1 1 auto; min-width: 0; margin: 0; }
  .rail .rail-tab { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 4px; min-height: 50px; font-size: 11px; letter-spacing: -.005em; }
  .rail .rail-tab > .rail-long { max-width: 100%; white-space: normal; text-align: center; line-height: 1.1; overflow-wrap: normal; word-break: normal; hyphens: manual;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .rail .rail-price { padding: 0 14px; font-size: 13px; }
  .rail .rail-price > svg { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rail .rail-thumb { transition: none !important; } }
.rail { user-select: none; -webkit-user-select: none; }
@media (max-width: 1259px) and (min-width: 701px) {
  .rail { padding: 0 14px; gap: 10px; }
  .rail .rail-lang { padding: 0; width: 44px; justify-content: center; }
  .rail .rail-lang .rail-lang-cur { display: none; }
}

/* A white or very pale logo would vanish on a white tile: give it the business's dark primary (or ink) behind it. */
html[data-logo-light] .ops-logo, html[data-logo-light] .ws-brand, html[data-logo-light] .cv-logo { background: var(--b-primary, #1a1a1a) !important; border-radius: 10px; padding: 4px 8px; }
html[data-logo-light] .ops-logo img, html[data-logo-light] .ws-logo, html[data-logo-light] .cv-logo img { background: transparent !important; }

/* v6: a seventh rail item (Walkthrough) must still fit at tablet width: tighter tabs between 861 and 1320 px. */
@media (min-width: 861px) and (max-width: 1320px) { .rail .rail-tab { padding: 0 11px; gap: 6px; } .rail { gap: 8px; padding: 0 12px; } }

/* R7 lang: long tab labels (Somali "Marinka dukaanka", Amharic) wrap to two lines between words at tablet-landscape widths
   instead of pushing the rail ~24 px past the screen. Words are never split; short English labels stay on one line. */
@media (min-width: 1001px) and (max-width: 1320px) {
  .rail .rail-tab { gap: 6px; }
  .rail .rail-tab > .rail-long { max-width: 7.5em; white-space: normal; overflow-wrap: normal; word-break: normal; text-align: center; line-height: 1.12; font-size: 13px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
