/* 33-tour.css — Guided tours (js/ui/tour.js): the spotlight, its card, the ▶ in
   the page header, and the "Guided tour" screen. App tokens only, so both
   themes and both directions come for free. */

/* ── Spotlight ────────────────────────────────────────────────────────── */

.tour-layer {
  --tour-dim: color-mix(in srgb, #04060a 70%, transparent);
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
  visibility: hidden;
}
html[data-theme="light"] .tour-layer { --tour-dim: color-mix(in srgb, #0d1320 52%, transparent); }
.tour-layer.on { visibility: visible; pointer-events: auto; }

/* Catches every click outside the card: the page stays as it is during a tour. */
.tour-block { position: absolute; inset: 0; background: transparent; }
.tour-layer.dim-all .tour-block { background: var(--tour-dim); }

.tour-hole {
  position: fixed;
  left: 50%; top: 50%; width: 0; height: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow:
    0 0 0 2px var(--acc),
    0 0 0 7px color-mix(in srgb, var(--acc) 20%, transparent),
    0 0 0 200vmax var(--tour-dim);
  transition: left .32s var(--ease-out), top .32s var(--ease-out), width .32s var(--ease-out),
              height .32s var(--ease-out), border-radius .32s var(--ease-out), opacity .2s;
}
.tour-layer.on .tour-hole { animation: tourPulse 2.4s var(--ease) infinite; }
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--acc), 0 0 0 7px color-mix(in srgb, var(--acc) 20%, transparent), 0 0 0 200vmax var(--tour-dim); }
  50%      { box-shadow: 0 0 0 2px var(--acc), 0 0 0 12px color-mix(in srgb, var(--acc) 8%, transparent), 0 0 0 200vmax var(--tour-dim); }
}

/* ── The card ─────────────────────────────────────────────────────────── */

.tour-card {
  position: fixed;
  width: min(380px, calc(100vw - 24px));
  padding: 16px 18px 16px;
  background: var(--surf);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--sh-3), var(--hl);
  color: var(--ink);
  outline: none;
  transition: left .32s var(--ease-out), top .32s var(--ease-out);
}
.tour-card.in { animation: tourIn .26s var(--ease-out); }
@keyframes tourIn { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
.tour-card.nudge { animation: tourNudge .38s var(--ease); }
@keyframes tourNudge { 0%, 100% { transform: none; } 30% { transform: translateY(-4px); } 60% { transform: translateY(2px); } }

/* No element to light (not on screen yet): in the middle, or docked on a phone. */
.tour-card[data-side="center"] { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-card[data-side="center"].in { animation: tourInC .26s var(--ease-out); }
@keyframes tourInC { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.tour-card[data-side="dock"] {
  left: 10px !important; right: 10px !important; top: auto !important;
  bottom: 10px !important;
  width: auto;
}
.tour-card[data-side="dock-top"] {
  left: 10px !important; right: 10px !important; bottom: auto !important;
  top: 10px !important;
  width: auto;
}
.tour-card[data-side="center"].nudge { animation: none; }
/* Room under the last part of a page, so even it can be brought up beside the card. */
html.tour-on .screens { padding-bottom: 70vh; }

.tour-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tour-chip {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
  background: var(--acc-dim);
  color: var(--acc);
  font-size: var(--fs-2xs); font-weight: 700;
}
.tour-chip .ic { width: 13px; height: 13px; }
.tour-chip-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-count { color: var(--mute); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; margin-inline-start: auto; }
.tour-x {
  width: 32px; height: 32px; margin: -6px; margin-inline-start: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--mute); cursor: pointer;
}
.tour-x .ic { width: 16px; height: 16px; }
.tour-x:hover { background: var(--hover); color: var(--ink); }

.tour-card-t { font-size: 17px; line-height: 1.4; font-weight: 750; color: var(--ink); }
html[dir="ltr"] .tour-card-t { letter-spacing: -.01em; }
.tour-card-b { margin-top: 6px; font-size: 14.5px; line-height: 1.7; color: var(--dim); }
html[dir="rtl"] .tour-card-b { line-height: 1.9; }

.tour-steps { display: flex; gap: 4px; margin-top: 14px; }
.tour-steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--surf3); transition: background var(--t2); }
.tour-steps span.done { background: color-mix(in srgb, var(--acc) 55%, var(--surf3)); }
.tour-steps span.now { background: var(--acc); }

.tour-acts { display: flex; gap: 8px; margin-top: 14px; }
.tour-acts [data-tour-act="next"] { margin-inline-start: auto; min-width: 104px; }
.tour-acts .btn[hidden] { display: none; }
.tour-card button:focus-visible { outline: none; box-shadow: var(--ring); }

.tour-arrow {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--surf);
  border: 1px solid var(--line2);
  transform: rotate(45deg);
  pointer-events: none;
}
.tour-arrow[hidden] { display: none; }
.tour-card[data-side="below"] .tour-arrow { top: -8px; border-right: 0; border-bottom: 0; }
.tour-card[data-side="above"] .tour-arrow { bottom: -8px; border-left: 0; border-top: 0; }
.tour-card[data-side="right"] .tour-arrow { left: -8px; border-right: 0; border-top: 0; }
.tour-card[data-side="left"] .tour-arrow { right: -8px; border-left: 0; border-bottom: 0; }

/* The assistant's bubble and the dock stay under the spotlight's dim. */
html.tour-on .asst-hint { display: none; }

/* ── ▶ in the page header ─────────────────────────────────────────────── */

.page-tour {
  flex: 0 0 auto;
  width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: none;
  color: var(--dim);
  cursor: pointer;
  transition: border-color var(--t1), color var(--t1), background var(--t1);
}
.page-tour .ic { width: 13px; height: 13px; }
html[dir="rtl"] .page-tour .ic { transform: scaleX(-1); }
.page-tour:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-dim); }
.page-tour:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.page-tour[hidden] { display: none; }

/* ── The "Guided tour" screen ─────────────────────────────────────────── */

.tour-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 8px 28px;
  padding: 26px 28px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--acc) 10%, transparent), transparent 60%),
    var(--surf);
}
html[dir="rtl"] .tour-hero { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--acc) 10%, transparent), transparent 60%), var(--surf); }
.tour-hero-txt { order: -1; min-width: 0; }
.tour-hero-art { width: 100%; height: auto; }
html[dir="rtl"] .tour-hero-art { transform: scaleX(-1); }
.tour-path { fill: none; stroke: var(--line2); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.tour-dot { fill: var(--surf2); stroke: var(--line2); stroke-width: 2; }
.tour-dot.done { fill: var(--acc); stroke: var(--acc); }
.tour-dot.now { fill: var(--surf); stroke: var(--acc); stroke-width: 3; }
.tour-dot-tick { fill: none; stroke: var(--acc-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.tour-eyebrow {
  display: inline-flex;
  color: var(--acc);
  font-size: var(--fs-xs);
  font-weight: 700;
  margin-bottom: 8px;
}
html[dir="ltr"] .tour-eyebrow { letter-spacing: .06em; text-transform: uppercase; }
.tour-hero-t { font-size: clamp(22px, 4.2vw, 30px); line-height: 1.25; font-weight: 800; color: var(--ink); }
html[dir="ltr"] .tour-hero-t { letter-spacing: -.02em; }
.tour-hero-d { margin-top: 10px; max-width: 58ch; color: var(--dim); font-size: 15px; line-height: 1.75; }
html[dir="rtl"] .tour-hero-d { line-height: 1.95; }

.tour-meter-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; max-width: 460px; }
.tour-meter { flex: 1; height: 8px; border-radius: 8px; background: var(--surf3); overflow: hidden; }
.tour-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--acc); transition: width .6s var(--ease-out); }
.tour-meter-t { color: var(--dim); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.tour-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tour-hero-cta .btn { display: inline-flex; align-items: center; gap: 8px; }
.tour-hero-cta .btn .ic { width: 16px; height: 16px; }
html[dir="rtl"] #tourGo .ic { transform: scaleX(-1); }
.tour-hero-cta .btn[hidden] { display: none; }
.tour-alldone { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--up); font-size: var(--fs-sm); font-weight: 600; }
.tour-alldone[hidden] { display: none; }
.tour-alldone .ic { width: 16px; height: 16px; }

.tour-grp { margin-top: 26px; }
.tour-grp-h { font-size: var(--fs-xs); font-weight: 700; color: var(--mute); margin: 0 4px 10px; }
html[dir="ltr"] .tour-grp-h { letter-spacing: .07em; text-transform: uppercase; }
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }

.tour-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 14px;
  width: 100%;
  padding: 16px;
  text-align: start;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t1), background var(--t1), transform var(--t1);
}
.tour-item:hover { border-color: var(--line2); background: var(--surf2); }
.tour-item:active { transform: scale(.99); }
.tour-item:focus-visible { outline: none; box-shadow: var(--ring); }
.tour-item-ic {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--surf2);
  border: 1px solid var(--line);
  color: var(--ink);
}
.tour-item-ic .ic { width: 19px; height: 19px; }
.tour-item:hover .tour-item-ic { background: var(--surf3); }
.tour-item-main { display: grid; gap: 4px; min-width: 0; }
.tour-item-t { font-weight: 700; font-size: var(--fs-md); }
.tour-item-d { color: var(--dim); font-size: var(--fs-sm); line-height: 1.6; }
.tour-item-m { color: var(--mute); font-size: var(--fs-xs); margin-top: 2px; }
.tour-item-st {
  width: 28px; height: 28px; margin-top: 7px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--mute);
}
.tour-item-st .ic { width: 16px; height: 16px; }
.tour-item.done .tour-item-st { background: var(--acc); color: var(--acc-ink); }
.tour-item.done .tour-item-st .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.tour-item.done .tour-item-ic { color: var(--acc); }
.tour-item-st .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 720px) {
  .tour-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
  .tour-hero-art { order: -2; width: 128px; justify-self: start; margin-bottom: 4px; }
  .tour-hero-txt { order: 0; }
  .tour-hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .tour-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-card, .tour-meter span { transition: none; }
  .tour-layer.on .tour-hole, .tour-card.in, .tour-card.nudge, .tour-card[data-side="center"].in { animation: none; }
}

/* ── Example pictures (TOUR_EX in js/ui/tour.js) ──────────────────────────
   A small, still picture of the part a step is about, filled with an example.
   Built from the app's own tokens, so it follows the theme and direction. */

.tour-media {
  position: relative;
  margin: 2px 0 14px;
  padding: 22px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--acc) 7%, transparent), transparent 60%),
    color-mix(in srgb, var(--bg) 70%, var(--surf));
  overflow: hidden;
}
.tour-media[hidden] { display: none; }
.tour-media-lbl {
  position: absolute; top: 6px; inset-inline-end: 10px;
  font-size: 10px; font-weight: 700; color: var(--mute);
}
html[dir="ltr"] .tour-media-lbl { letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 639px) {
  .tour-media { max-height: 150px; padding: 20px 12px 12px; margin-bottom: 12px; }
}

.tx { display: grid; gap: 8px; font-size: 12.5px; color: var(--ink); line-height: 1.45; pointer-events: none; user-select: none; }
.tx .ic { width: 14px; height: 14px; flex: 0 0 auto; }
.tx .up { color: var(--up); }
.tx .dn { color: var(--dn); }
.tx .acc { color: var(--acc); }
.tx-sub { color: var(--mute); font-size: 11.5px; text-align: center; }
.tx-center { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.tx-mute { color: var(--mute); font-size: 11.5px; }

.tx-row, .tx-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tx-row span, .tx-kv span { color: var(--dim); }
.tx-row b, .tx-kv b { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-rows { display: grid; gap: 5px; }

.tx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-chip { padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--line2); background: var(--surf); color: var(--dim); font-size: 11.5px; font-weight: 600; }
.tx-chip.on { border-color: color-mix(in srgb, var(--acc) 55%, transparent); background: var(--acc-dim); color: var(--acc); }
.tx-chip.up { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, transparent); background: var(--up-dim); }
.tx-chip.on.dn, .tx-chip.dn { color: var(--dn); border-color: color-mix(in srgb, var(--dn) 45%, transparent); background: var(--dn-dim); }

.tx-seg { display: flex; padding: 3px; gap: 2px; background: var(--surf2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tx-seg span { flex: 1 1 0; min-width: 0; text-align: center; padding: 5px 4px; border-radius: 7px; color: var(--dim); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-seg span.on { background: var(--acc-fill); color: var(--acc-ink); }

.tx-trade { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surf); border: 1px solid var(--line); border-radius: 10px; }
.tx-sym { font-weight: 700; }
.tx-side { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); }
.tx-side.up { background: var(--up-dim); }
.tx-side.dn { background: var(--dn-dim); }
.tx-end { margin-inline-start: auto; display: inline-flex; align-items: baseline; gap: 8px; }
.tx-r { font-size: 11px; font-weight: 700; }

.tx-check { display: flex; align-items: center; gap: 8px; color: var(--dim); }
.tx-box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: 0 0 auto; }
.tx-check.on .tx-box { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--acc-ink); }
.tx-check.on { color: var(--ink); }
.tx-check.bad .tx-box { background: var(--dn); border-color: var(--dn); color: #fff; }
.tx-box .ic { width: 11px; height: 11px; stroke-width: 3; }

.tx-toggle { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.tx-toggle > span:first-of-type { flex: 1; color: var(--ink); }
.tx-toggle .ic { color: var(--dim); }
.tx-sw { width: 30px; height: 18px; border-radius: 9px; background: var(--surf3); position: relative; flex: 0 0 auto; }
.tx-sw::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--mute); }
.tx-sw.on { background: var(--acc-fill); }
.tx-sw.on::after { inset-inline-start: 14px; background: var(--acc-ink); }

.tx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px; font-weight: 700; font-size: 12px; border: 1px solid var(--line2); color: var(--ink); background: var(--surf); }
.tx-btn.pri { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--acc-ink); }
.tx-btn.red { background: var(--dn); border-color: var(--dn); color: #fff; }
.tx-btn.ghost { background: transparent; }
.tx-btn.sm { padding: 4px 9px; font-size: 11px; }

.tx-field { display: grid; gap: 2px; padding: 6px 10px; background: var(--surf); border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.tx-field span { color: var(--mute); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-field b { font-weight: 700; font-variant-numeric: tabular-nums; text-align: start; }
html[dir="rtl"] .tx-field b { text-align: end; }
.tx-field.up b { color: var(--up); }
.tx-field.dn b { color: var(--dn); }
.tx-field.acc { border-color: color-mix(in srgb, var(--acc) 55%, transparent); background: var(--acc-dim); }
.tx-field.acc b { color: var(--acc); }
.tx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tx-calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 10px 12px; background: var(--surf); border: 1px solid var(--line); border-radius: 10px; }

.tx-notif { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surf); border: 1px solid var(--line2); box-shadow: var(--sh-2); }
.tx-notif img { width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto; }
.tx-notif div { display: grid; gap: 2px; min-width: 0; }
.tx-notif b { font-size: 12px; display: flex; gap: 8px; }
.tx-notif b i { font-style: normal; font-weight: 500; color: var(--mute); margin-inline-start: auto; }
.tx-notif span { color: var(--dim); }

.tx-chat { display: grid; gap: 6px; }
.tx-q { justify-self: end; max-width: 85%; padding: 7px 12px; border-radius: 14px; border-end-end-radius: 4px; background: var(--acc-fill); color: var(--acc-ink); font-weight: 600; }
.tx-chat .tx-a { justify-self: start; display: flex; gap: 7px; max-width: 92%; padding: 8px 12px; border-radius: 14px; border-end-start-radius: 4px; background: var(--surf); border: 1px solid var(--line); color: var(--ink); }
.tx-chat .tx-a .ic { color: var(--acc); margin-top: 2px; }

.tx-search { display: grid; gap: 4px; }
.tx-sbox { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 10px; background: var(--surf); border: 1px solid color-mix(in srgb, var(--acc) 50%, var(--line2)); }
.tx-sbox .ic { color: var(--mute); }
.tx-caret { width: 1.5px; height: 14px; background: var(--acc); margin-inline-start: -6px; }
.tx-hit { display: flex; align-items: center; gap: 8px; padding: 5px 11px; color: var(--dim); border-radius: 8px; }
.tx-hit:first-of-type { background: var(--hover); color: var(--ink); }
.tx-hit em { margin-inline-start: auto; font-style: normal; color: var(--mute); font-size: 11px; }

.tx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px; }
.tx-tile { display: grid; justify-items: center; gap: 5px; padding: 9px 4px; text-align: center; background: var(--surf); border: 1px solid var(--line); border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--dim); }
.tx-tile .ic { width: 17px; height: 17px; color: var(--acc); }

.tx-warn { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--warn-dim); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: var(--ink); }
.tx-warn .ic { color: var(--warn); margin-top: 1px; }
.tx-toast { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--r-pill); background: var(--surf); border: 1px solid var(--line2); box-shadow: var(--sh-2); font-weight: 600; }
.tx-toast .ic { color: var(--up); }
.tx-pill { display: inline-flex; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surf2); border: 1px solid var(--line); color: var(--dim); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.tx-pill.up { color: var(--up); background: var(--up-dim); border-color: transparent; }
.tx-pill.acc { color: var(--acc); background: var(--acc-dim); border-color: transparent; }

.tx-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(135deg, var(--info), var(--acc)); color: var(--acc-ink); font-weight: 800; font-size: 12px; }
.tx-av.lg { width: 42px; height: 42px; font-size: 17px; }
.tx-prof { display: flex; align-items: center; gap: 10px; }
.tx-prof div { display: grid; gap: 2px; min-width: 0; }
.tx-prof div span { color: var(--dim); }

.tx-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); }
.tx-link > span { flex: 1; min-width: 0; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-link > .ic { color: var(--mute); }

.tx-hero { display: grid; gap: 2px; }
.tx-hero span { color: var(--dim); font-size: 11.5px; }
.tx-hero b { font-size: 24px; font-weight: 800; font-family: var(--mono); letter-spacing: -.02em; }
.tx-spark { width: 100%; height: 56px; display: block; }
.tx-bars { width: 100%; height: 66px; display: block; }
.tx-chart { position: relative; padding-top: 26px; }
.tx-chart .tx-q { position: absolute; top: 0; inset-inline-end: 0; width: 18px; height: 18px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 1px solid var(--line2); color: var(--mute); font-size: 10px; }
.tx-tip { position: absolute; top: 0; inset-inline-start: 22%; padding: 3px 9px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; white-space: nowrap; }

.tx-kpis { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.tx-ring { position: relative; width: 74px; display: grid; justify-items: center; gap: 2px; }
.tx-ring svg { width: 54px; height: 54px; }
.tx-ring b { position: absolute; top: 17px; font-size: 13px; font-weight: 800; }
.tx-ring span { color: var(--dim); font-size: 10.5px; text-align: center; }

.tx-folds { display: grid; gap: 6px; }
.tx-fold { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); }
.tx-fold .ic { color: var(--mute); transform: rotate(0deg); }
.tx-fold.open { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.tx-fold.open .ic { transform: rotate(180deg); color: var(--acc); }

.tx-media { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.tx-shot { width: 96px; height: 60px; display: block; }
.tx-media-t { display: grid; gap: 7px; color: var(--dim); }
.tx-wave { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surf); border: 1px solid var(--line); justify-self: start; }
.tx-wave > .ic { width: 11px; height: 11px; color: var(--acc); }
html[dir="rtl"] .tx-wave > .ic { transform: scaleX(-1); }
.tx-wave-b { display: inline-flex; align-items: center; gap: 2px; }
.tx-wave-b i { width: 2px; border-radius: 1px; background: var(--acc); opacity: .75; }
.tx-wave b { font-size: 11px; color: var(--dim); }

.tx-head { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.tx-head b { font-size: 20px; font-weight: 800; }
.tx-play { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--acc); color: var(--acc); background: var(--acc-dim); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 14%, transparent); }
.tx-play .ic { width: 12px; height: 12px; }
html[dir="rtl"] .tx-play .ic { transform: scaleX(-1); }

.tx-menu { display: grid; gap: 4px; padding: 5px; border-radius: 12px; background: var(--surf); border: 1px solid var(--line2); }
.tx-opt { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; }
.tx-opt b { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--dim); font-weight: 600; }
.tx-opt.on { background: var(--hover); }
.tx-opt .tx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.tx-opt.on .tx-dot { background: var(--acc); box-shadow: 0 0 0 3px var(--acc-dim); }
.tx-opt > .ic { color: var(--dim); }
.tx-opt .tx-pill.acc { margin-inline-start: auto; }

.tx-alarm, .tx-news, .tx-conn, .tx-plan { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); }
.tx-alarm > .ic { color: var(--warn); }
.tx-alarm > span { color: var(--dim); font-variant-numeric: tabular-nums; }
.tx-alarm .tx-pill { margin-inline-start: auto; }
.tx-cur { padding: 1px 6px; border-radius: 5px; background: var(--surf3); font-weight: 700; font-size: 11px; }
.tx-imp { color: var(--dn); font-size: 9px; letter-spacing: 1px; }
.tx-news-t { color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-week { display: flex; align-items: center; justify-content: space-between; padding: 6px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); }
.tx-arr { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surf2); color: var(--dim); }
.tx-clock { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tx-clock b { font-size: 30px; font-family: var(--mono); font-weight: 700; letter-spacing: -.02em; }
.tx-clocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tx-mclock { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); }
.tx-mclock .ic { color: var(--acc); }
.tx-mclock b { font-family: var(--mono); font-size: 14px; }
.tx-mclock span { color: var(--dim); font-size: 10.5px; }
.tx-live { width: 9px; height: 9px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-dim); }
.tx-conn span[dir] { color: var(--dim); font-variant-numeric: tabular-nums; }
.tx-conn .tx-pill { margin-inline-start: auto; }
.tx-plan .ic { color: var(--acc); }
.tx-plan b { font-size: 14px; }
.tx-plan span { color: var(--dim); margin-inline-start: auto; }
.tx-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tx-pc { position: relative; display: grid; gap: 5px; padding: 10px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); }
.tx-pc b { font-size: 14px; }
.tx-pc.pop { border-color: color-mix(in srgb, var(--acc) 60%, transparent); }
.tx-pc-badge { position: absolute; top: -8px; inset-inline-end: 8px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--acc-fill); color: var(--acc-ink); font-size: 9.5px; font-weight: 800; }
.tx-pc .tx-check { font-size: 11px; }
.tx-pc .tx-box { width: 14px; height: 14px; }
.tx-code { display: flex; justify-content: center; gap: 5px; }
.tx-code span { width: 26px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: var(--surf); border: 1px solid var(--line2); font-family: var(--mono); font-weight: 700; font-size: 15px; }
.tx-code span.gap { margin-inline-start: 8px; }
.tx-meter { height: 6px; border-radius: 6px; background: var(--surf3); overflow: hidden; }
.tx-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--up), var(--warn)); }
html[dir="rtl"] .tx-meter span { margin-inline-start: auto; background: linear-gradient(270deg, var(--up), var(--warn)); }
.tx-note { display: grid; gap: 5px; padding: 10px 12px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); border-inline-start: 3px solid var(--acc); }
.tx-note > span { color: var(--dim); }
.tx-note-m { display: flex; align-items: center; gap: 8px; }
.tx-note-m em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: var(--mute); font-size: 11px; margin-inline-start: auto; }
.tx-coach { display: grid; gap: 6px; }
.tx-cl { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 9px; background: var(--surf); border: 1px solid var(--line); }
.tx-cl.up .ic { color: var(--up); }
.tx-cl.dn .ic { color: var(--dn); }
.tx-cl.acc { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.tx-cl.acc .ic { color: var(--acc); }
.tx-cl .ic { margin-top: 2px; }
.tx-sel { display: grid; gap: 4px; }
.tx-sel .tx-check { padding: 6px 10px; border-radius: 9px; background: var(--surf); border: 1px solid var(--line); }

/* The picture on each card in the hub: a still preview of what the tour shows. */
.tour-item {
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  grid-template-areas: "pic pic pic" "ic main st";
}
.tour-item-pic {
  grid-area: pic;
  display: block;
  height: 132px;
  margin: -6px -6px 2px;
  padding: 16px 14px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--acc) 7%, transparent), transparent 60%),
    color-mix(in srgb, var(--bg) 70%, var(--surf));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.tour-item-pic .tx { transform-origin: top center; }
.tour-item-ic { grid-area: ic; }
.tour-item-main { grid-area: main; }
.tour-item-st { grid-area: st; }
.tour-item:hover .tour-item-pic { border-color: var(--line2); }
