/* =========================================================
   TABULIZER 7 - HOME MOTION SHOWCASE
   A mock online wizard: data source -> display type -> publish.
   Everything is scoped under .tab7-motion and sized by the
   component's own width (container queries), so it fits the hero
   column on desktop and the full width on phones.
   Palette: the #tab7-home tokens (#2348d8 -> #1687ee -> #08c7b8).
   ========================================================= */
.tab7-motion {
  --tm-primary: var(--tab7-primary, #1687ee);
  --tm-primary-dark: var(--tab7-primary-dark, #2348d8);
  --tm-light: var(--tab7-primary-light, #eef7ff);
  --tm-teal: #08c7b8;
  --tm-teal-dark: #08aeb1;
  --tm-green: #10b981;
  --tm-orange: #f39c12;
  --tm-yellow: #f0b429;
  --tm-purple: #7c5ce0;
  --tm-text: var(--tab7-text, #151821);
  --tm-soft: var(--tab7-text-soft, #626a78);
  --tm-border: var(--tab7-border, #dce9f5);
  --tm-line: #e6eef5;
  --tm-skel: #e3edf6;
  --tm-soft-bg: #f8fbfe;
  --tm-grad: linear-gradient(135deg, #2348d8, #1687ee);
  --tm-grad-3: linear-gradient(90deg, #2348d8, #1687ee, #08c7b8);
  --tm-grad-light: linear-gradient(135deg, #eaf5ff, #eefcfb);
  --tm-ease: cubic-bezier(.65, 0, .35, 1);
  --tm-out: cubic-bezier(.2, .8, .2, 1);
  container: tm / inline-size;
  position: relative;
  margin: 0;
  color: var(--tm-text);
  font-size: 16px;
  line-height: 1.35;
  text-align: start;
  -webkit-user-select: none;
  user-select: none;
}
.tab7-motion *, .tab7-motion *::before, .tab7-motion *::after { box-sizing: border-box; }
.tab7-motion .tm-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- icons (injected by the script) ---- */
.tab7-motion .tm-ico { display: inline-flex; flex: none; width: 1em; height: 1em; font-style: normal; }
.tab7-motion .tm-ico svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; overflow: visible;
}

/* ---- window ---- */
.tab7-motion .tm-window {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(22, 135, 238, .18);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 65px rgba(28, 100, 174, .13);
}
.tab7-motion .tm-bar { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 0 2px 10px 6px; }
.tab7-motion .tm-dots { display: flex; gap: 6px; }
.tab7-motion .tm-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ddd9e7; }
.tab7-motion .tm-bar-title {
  flex: 1; min-width: 0; overflow: hidden; color: var(--tm-soft);
  font-size: .78rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis;
}
.tab7-motion .tm-badge {
  flex: none; padding: 4px 10px; border: 1px solid rgba(22, 135, 238, .24); border-radius: 999px;
  background: var(--tm-grad-light); color: var(--tm-primary-dark);
  font-size: .7rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.tab7-motion .tm-pause {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: 0; padding: 0; border: 1px solid var(--tm-border); border-radius: 50%;
  background: #fff; color: var(--tm-primary-dark); font-size: 13px; cursor: pointer;
  transition: border-color .18s, background-color .18s;
}
.tab7-motion .tm-pause:hover { border-color: var(--tm-primary); background: var(--tm-light); }
.tab7-motion .tm-pause:focus-visible, .tab7-motion .tm-type:focus-visible { outline: 3px solid var(--tm-primary); outline-offset: 2px; }
.tab7-motion .tm-pause-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.tab7-motion .tm-pause [data-icon="play"] { display: none; }
.tab7-motion.is-paused .tm-pause [data-icon="play"] { display: inline-flex; }
.tab7-motion.is-paused .tm-pause [data-icon="pause"] { display: none; }
.tab7-motion .tm-pause [data-icon="play"] svg { fill: currentColor; }

.tab7-motion .tm-label {
  color: var(--tm-soft); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}

/* ---- data sources ---- */
.tab7-motion .tm-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 0 0 10px; }
.tab7-motion .tm-sources > .tm-label { display: none; }
.tab7-motion .tm-source {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 9px;
  border: 1px solid var(--tm-border); border-radius: 12px; background: #fff;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--tm-out);
}
.tab7-motion .tm-source > .tm-ico {
  width: 28px; height: 28px; padding: 6px; border-radius: 8px;
  background: var(--tm-grad-light); color: var(--tm-primary);
  transition: background .25s, color .25s;
}
.tab7-motion .tm-source > span { display: flex; flex-direction: column; min-width: 0; }
.tab7-motion .tm-source strong, .tab7-motion .tm-source small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab7-motion .tm-source strong { font-size: .78rem; font-weight: 800; }
.tab7-motion .tm-source small {
  display: -webkit-box; color: var(--tm-soft); font-size: .64rem; line-height: 1.25; white-space: normal;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.tab7-motion .tm-source.is-active {
  border-color: rgba(22, 135, 238, .55);
  box-shadow: 0 0 0 3px rgba(22, 135, 238, .12), 0 8px 22px rgba(35, 72, 216, .1);
}
.tab7-motion .tm-source.is-active > .tm-ico { background: var(--tm-grad); color: #fff; }

/* ---- main: rail + canvas ---- */
.tab7-motion .tm-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.tab7-motion .tm-rail {
  display: flex; flex-direction: column; justify-content: space-between; gap: 3px; padding: 6px;
  border: 1px solid var(--tm-line); border-radius: 14px; background: var(--tm-soft-bg);
}
.tab7-motion .tm-rail > .tm-label { display: none; padding: 4px 6px 6px; }
.tab7-motion .tm-type {
  position: relative; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px;
  margin: 0; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent;
  color: var(--tm-soft); font: inherit; font-size: .76rem; font-weight: 700; line-height: 1.2;
  text-align: start; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s;
}
.tab7-motion .tm-type .tm-ico { font-size: 17px; }
.tab7-motion .tm-type > span {            /* hidden but still the button name */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.tab7-motion .tm-type:hover { color: var(--tm-primary-dark); background: rgba(22, 135, 238, .06); }
.tab7-motion .tm-type.is-active {
  background: #fff; color: var(--tm-primary-dark);
  box-shadow: 0 0 0 1px rgba(22, 135, 238, .28), 0 6px 16px rgba(35, 72, 216, .1);
}
.tab7-motion .tm-type.is-active .tm-ico { color: var(--tm-primary); }

.tab7-motion .tm-canvas {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid #deebf6; border-radius: 14px; background: var(--tm-soft-bg);
}
.tab7-motion .tm-canvas-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px;
  padding: 8px 12px 8px 14px; border-bottom: 1px solid var(--tm-border); background: #fff;
}
.tab7-motion .tm-caption {
  min-width: 0; overflow: hidden; font-size: .88rem; font-weight: 800; white-space: nowrap; text-overflow: ellipsis;
  transition: opacity .25s, transform .25s;
}
.tab7-motion .tm-caption.is-swap { opacity: 0; transform: translateY(4px); }
.tab7-motion .tm-file {
  display: inline-flex; align-items: center; gap: 6px; max-width: 58%; min-width: 0; padding: 4px 9px;
  border-radius: 999px; background: var(--tm-light); color: var(--tm-primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .66rem; font-weight: 600;
  transition: opacity .3s, transform .3s var(--tm-out);
}
.tab7-motion .tm-file .tm-ico { font-size: 12px; }
.tab7-motion .tm-file-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab7-motion .tm-file.is-hidden { opacity: 0; transform: scale(.9); }

.tab7-motion .tm-stage { position: relative; overflow: hidden; height: clamp(240px, 52cqi, 330px); }
.tab7-motion .tm-scene {
  position: absolute; inset: 14px; display: flex; flex-direction: column;
  visibility: hidden; opacity: 0; transition: opacity .3s, transform .3s, visibility 0s .3s;
}
.tab7-motion .tm-scene.is-active { visibility: visible; opacity: 1; transition: opacity .3s, transform .3s, visibility 0s; }
.tab7-motion .tm-scene.is-leaving { opacity: 0; transform: scale(.97); }

/* Without the script the first scene is shown complete. */
.tab7-motion:not(.is-ready) .tm-s-table { visibility: visible; opacity: 1; }
.tab7-motion:not(.is-ready) .tm-cursor, .tab7-motion:not(.is-ready) .tm-flyer,
.tab7-motion:not(.is-ready) .tm-toast, .tab7-motion:not(.is-ready) .tm-pause { display: none; }

/* ---- shared keyframes ---- */
@keyframes tm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tm-pop { from { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes tm-grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes tm-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes tm-sink { to { opacity: 0; transform: scale(.3) translateY(8px); } }
@keyframes tm-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes tm-ring { from { opacity: .7; transform: translate(-50%, -50%) scale(.2); } to { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
@keyframes tm-blink { 50% { opacity: 0; } }
@keyframes tm-press { 50% { transform: scale(.94); } }

.tab7-motion .is-pressed { animation: tm-press .25s var(--tm-ease); }

/* ---- raw data (between the source and the display type) ---- */
.tab7-motion .tm-raw {
  position: absolute; inset: 22px 20px; display: grid; grid-template-columns: repeat(4, 1fr);
  align-content: center; gap: 11px 10px; pointer-events: none;
}
.tab7-motion .tm-raw i {
  height: 11px; border-radius: 6px; opacity: 0;
  background: linear-gradient(90deg, #dbe7f2 0%, #eef5fb 50%, #dbe7f2 100%) 0 0 / 200% 100%;
}
.tab7-motion .tm-raw i:nth-child(-n+4) { background-color: #b9d3ec; background-image: linear-gradient(90deg, #bcd6ef 0%, #d9eafa 50%, #bcd6ef 100%); }
.tab7-motion .tm-raw.is-on i { opacity: 1; animation: tm-pop .35s var(--tm-out) calc(var(--i) * 22ms) backwards, tm-shimmer 1.4s linear .4s infinite; }
.tab7-motion .tm-raw.is-out i { animation: tm-sink .32s var(--tm-ease) calc(var(--i) * 9ms) both; }

/* ---- TABLE ---- */
.tab7-motion .tm-tbl { font-size: .78rem; }
.tab7-motion .tm-tr {
  display: grid; grid-template-columns: 1.35fr .8fr 1fr; gap: 8px; align-items: center;
  height: 32px; padding: 0 9px; border-bottom: 1px solid var(--tm-line); background: #fff;
}
.tab7-motion .tm-tr span { position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab7-motion .tm-th {
  border: 0; border-radius: 8px; background: var(--tm-grad-light); color: var(--tm-primary-dark); font-weight: 800;
}
.tab7-motion .tm-sort::after {
  content: ""; display: inline-block; width: 0; height: 0; margin-inline-start: 6px; vertical-align: 2px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; opacity: .35;
  transition: opacity .2s, transform .3s;
}
.tab7-motion .tm-s-table.is-sorted .tm-sort::after { opacity: 1; }
.tab7-motion .tm-rows { position: relative; border: 1px solid var(--tm-line); border-top: 0; border-radius: 0 0 9px 9px; overflow: hidden; }
.tab7-motion .tm-rows .tm-tr:nth-child(even) { background: #fafcff; }
.tab7-motion .tm-rows .tm-tr:last-child { border-bottom: 0; }
.tab7-motion .tm-rows .tm-tr { transition: transform .7s var(--tm-ease), background-color .4s; }
.tab7-motion .tm-rows .tm-tr.is-top { background: var(--tm-light); color: var(--tm-primary-dark); font-weight: 800; }
.tab7-motion .tm-tr > span:nth-child(3) { display: flex; align-items: center; gap: 8px; }
.tab7-motion .tm-dbar {
  flex: none; width: calc(var(--w, 50%) * .5); height: 6px; border-radius: 3px;
  background: var(--tm-grad-3); opacity: .85; transform-origin: left;
}
.tab7-motion .tm-th .tm-sort { display: block; }
.tab7-motion .tm-pager { display: flex; justify-content: flex-end; gap: 5px; margin-top: auto; padding-top: 10px; }
.tab7-motion .tm-pager i { width: 20px; height: 20px; border: 1px solid var(--tm-border); border-radius: 6px; background: #fff; }
.tab7-motion .tm-pager i:first-child { border-color: var(--tm-primary); background: var(--tm-grad); }
.tab7-motion .tm-s-table.is-built .tm-th { animation: tm-rise .4s var(--tm-out) backwards; }
.tab7-motion .tm-s-table.is-built .tm-rows .tm-tr { animation: tm-rise .45s var(--tm-out) calc(80ms + var(--i) * 70ms) backwards; }
.tab7-motion .tm-s-table.is-built .tm-dbar { animation: tm-grow-x .6s var(--tm-out) calc(400ms + var(--i) * 70ms) backwards; }
.tab7-motion .tm-s-table.is-built .tm-pager i { animation: tm-pop .35s var(--tm-out) calc(500ms + var(--i) * 60ms) backwards; }
@keyframes tm-grow-x { from { transform: scaleX(0); } to { transform: none; } }

/* ---- CHART ---- */
.tab7-motion .tm-legend { display: flex; gap: 14px; padding-bottom: 8px; color: var(--tm-soft); font-size: .7rem; font-weight: 700; }
.tab7-motion .tm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tab7-motion .tm-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--tm-grad); }
.tab7-motion .tm-legend .is-b::before { height: 3px; border-radius: 2px; background: var(--tm-teal); }
.tab7-motion .tm-plot { position: relative; flex: 1; }
.tab7-motion .tm-gridlines, .tab7-motion .tm-cols, .tab7-motion .tm-line, .tab7-motion .tm-dots-layer { position: absolute; inset: 0 0 20px; }
.tab7-motion .tm-gridlines { display: flex; flex-direction: column; justify-content: space-between; }
.tab7-motion .tm-gridlines i { height: 1px; background: var(--tm-line); }
.tab7-motion .tm-gridlines i:last-child { background: #cfdeeb; }
.tab7-motion .tm-cols { display: flex; justify-content: space-around; align-items: flex-end; }
.tab7-motion .tm-col { position: relative; width: 10%; max-width: 34px; height: 100%; }
.tab7-motion .tm-col i {
  position: absolute; bottom: 0; left: 0; right: 0; height: var(--h, 50%); border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #35a5f6, #1687ee 60%, #2348d8); transform-origin: bottom;
  transition: filter .2s, box-shadow .2s;
}
.tab7-motion .tm-col.is-hot i { filter: brightness(1.08); box-shadow: 0 0 0 3px rgba(22, 135, 238, .18); }
.tab7-motion .tm-col em {
  position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%);
  color: var(--tm-soft); font-size: .64rem; font-style: normal; white-space: nowrap;
}
.tab7-motion .tm-line { width: 100%; height: calc(100% - 20px); overflow: visible; }
.tab7-motion .tm-line polyline { fill: none; stroke: var(--tm-teal); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tab7-motion .tm-dots-layer { pointer-events: none; }
.tab7-motion .tm-dots-layer i {
  position: absolute; width: 9px; height: 9px; margin: 0 0 -4.5px -4.5px; border: 2px solid var(--tm-teal);
  border-radius: 50%; background: #fff;
}
.tab7-motion .tm-tip {
  position: absolute; z-index: 2; padding: 4px 8px; border-radius: 7px; background: var(--tm-text); color: #fff;
  font-size: .7rem; font-weight: 700; white-space: nowrap; opacity: 0;
  transform: translate(-50%, 4px); transition: opacity .25s, transform .3s var(--tm-out);
}
.tab7-motion .tm-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--tm-text);
}
.tab7-motion .tm-tip.is-on { opacity: 1; transform: translate(-50%, 0); }
.tab7-motion .tm-s-chart.is-built .tm-legend { animation: tm-rise .4s var(--tm-out) backwards; }
.tab7-motion .tm-s-chart.is-built .tm-gridlines i { animation: tm-reveal .5s var(--tm-out) calc(var(--i) * 50ms) backwards; }
.tab7-motion .tm-s-chart.is-built .tm-col i { animation: tm-grow .6s var(--tm-out) calc(150ms + var(--i) * 70ms) backwards; }
.tab7-motion .tm-s-chart.is-built .tm-col em { animation: tm-rise .4s var(--tm-out) calc(150ms + var(--i) * 70ms) backwards; }
.tab7-motion .tm-s-chart.is-built .tm-line { animation: tm-reveal .9s var(--tm-ease) .7s backwards; }
.tab7-motion .tm-s-chart.is-built .tm-dots-layer i { animation: tm-pop .3s var(--tm-out) calc(750ms + var(--i) * 120ms) backwards; }

/* ---- EVENTS ---- */
.tab7-motion .tm-cal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; }
.tab7-motion .tm-cal-title { font-size: .82rem; font-weight: 800; text-transform: capitalize; }
.tab7-motion .tm-cal-nav { display: flex; gap: 4px; }
.tab7-motion .tm-cal-nav i { width: 20px; height: 20px; border: 1px solid var(--tm-border); border-radius: 6px; background: #fff; }
.tab7-motion .tm-cal-week, .tab7-motion .tm-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.tab7-motion .tm-cal-week span {
  overflow: hidden; padding-bottom: 3px; color: var(--tm-soft); font-size: .6rem; font-weight: 800;
  text-align: center; text-transform: uppercase; white-space: nowrap; text-overflow: clip;
}
.tab7-motion .tm-cal-grid { flex: 1; grid-auto-rows: minmax(0, 1fr); }
.tab7-motion .tm-day {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 0; padding: 3px 4px;
  border: 1px solid var(--tm-line); border-radius: 6px; background: #fff; color: var(--tm-soft);
  font-size: .6rem; font-weight: 600; transition: background-color .25s, border-color .25s, box-shadow .25s;
}
.tab7-motion .tm-day.is-pad { border-color: transparent; background: transparent; }
.tab7-motion .tm-day.is-today { border-color: var(--tm-primary); color: var(--tm-primary-dark); font-weight: 800; }
.tab7-motion .tm-day.is-picked { border-color: var(--tm-teal); background: #effcfa; box-shadow: 0 0 0 2px rgba(8, 199, 184, .2); }
.tab7-motion .tm-day b { display: block; height: 4px; border-radius: 2px; background: var(--tm-primary); }
.tab7-motion .tm-day b.c2 { background: var(--tm-teal); }
.tab7-motion .tm-day b.c3 { background: var(--tm-purple); }
.tab7-motion .tm-day b.c4 { background: var(--tm-orange); }
.tab7-motion .tm-event-card {
  position: absolute; z-index: 3; right: 4%; bottom: 6%; display: flex; flex-direction: column; gap: 2px;
  width: min(62%, 220px); padding: 10px 12px 10px 14px; border: 1px solid var(--tm-border); border-radius: 12px;
  background: #fff; box-shadow: 0 14px 34px rgba(28, 100, 174, .18); opacity: 0;
  transform: translateY(10px) scale(.94); transform-origin: 70% 100%;
  transition: opacity .3s, transform .4s var(--tm-out);
}
.tab7-motion .tm-event-card::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 4px; border-radius: 0 3px 3px 0; background: var(--tm-teal); }
.tab7-motion .tm-event-card.is-on { opacity: 1; transform: none; }
.tab7-motion .tm-event-time { align-self: flex-start; padding: 1px 7px; border-radius: 999px; background: #effcfa; color: var(--tm-teal-dark); font-size: .64rem; font-weight: 800; }
.tab7-motion .tm-event-card strong { overflow: hidden; font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.tab7-motion .tm-event-card small { color: var(--tm-soft); font-size: .66rem; }
.tab7-motion .tm-s-events.is-built .tm-cal-head, .tab7-motion .tm-s-events.is-built .tm-cal-week { animation: tm-rise .4s var(--tm-out) backwards; }
.tab7-motion .tm-s-events.is-built .tm-day { animation: tm-pop .35s var(--tm-out) calc(var(--i) * 14ms) backwards; }
.tab7-motion .tm-s-events.is-built .tm-day b { animation: tm-reveal .4s var(--tm-out) calc(650ms + var(--j, 0) * 90ms) backwards; }

/* ---- GALLERY ---- */
.tab7-motion .tm-photos { display: grid; flex: 1; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 8px; }
.tab7-motion .tm-photo {
  --sky1: #bfe3ff; --sky2: #eef7ff; --sun: #f0b429; --mtn: #2348d8; --hill: #1687ee;
  position: relative; display: block; overflow: hidden; border-radius: 10px;
  background: linear-gradient(180deg, var(--sky1), var(--sky2));
  transition: transform .3s var(--tm-out), box-shadow .3s;
}
.tab7-motion .tm-photo::before {
  content: ""; position: absolute; top: 16%; right: 18%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: var(--sun);
}
.tab7-motion .tm-photo::after {
  content: ""; position: absolute; inset: 30% 0 0; background: var(--mtn); opacity: .9;
  clip-path: polygon(0 100%, 0 62%, 22% 30%, 38% 52%, 60% 8%, 82% 44%, 100% 26%, 100% 100%);
}
.tab7-motion .tm-photo i {
  position: absolute; z-index: 1; inset: 62% -10% -20%; border-radius: 50% 50% 0 0; background: var(--hill);
}
.tab7-motion .tm-photo.p2 { --sky1: #ffd9b0; --sky2: #fff4e6; --sun: #f39c12; --mtn: #7c5ce0; --hill: #a48cf0; }
.tab7-motion .tm-photo.p3 { --sky1: #c3f2ec; --sky2: #effcfa; --sun: #fff; --mtn: #08aeb1; --hill: #10b981; }
.tab7-motion .tm-photo.p4 { --sky1: #163d8f; --sky2: #2f62d9; --sun: #eef7ff; --mtn: #0f2a6b; --hill: #1769aa; }
.tab7-motion .tm-photo.p5 { --sky1: #e4defd; --sky2: #f6f3ff; --sun: #f0b429; --mtn: #5b47c4; --hill: #08c7b8; }
.tab7-motion .tm-photo.p6 { --sky1: #d3ecff; --sky2: #f5faff; --sun: #fff; --mtn: #1769aa; --hill: #08bfc8; }
.tab7-motion .tm-photos .tm-photo.is-hot { transform: scale(1.04); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tm-primary); }
.tab7-motion .tm-lightbox {
  position: absolute; inset: -20px; z-index: 3; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 24, 39, .84); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s;
}
.tab7-motion .tm-lightbox.is-on { opacity: 1; visibility: visible; transition: opacity .3s, visibility 0s; }
.tab7-motion .tm-big { width: 66%; aspect-ratio: 16 / 10; border-radius: 10px; transform: scale(.6); transition: transform .45s var(--tm-out), opacity .25s; }
.tab7-motion .tm-lightbox.is-on .tm-big { transform: none; }
.tab7-motion .tm-big.is-swap { opacity: .2; }
.tab7-motion .tm-lb-prev, .tab7-motion .tm-lb-next {
  position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: rgba(255, 255, 255, .18);
}
.tab7-motion .tm-lb-prev { left: 4%; }
.tab7-motion .tm-lb-next { right: 4%; }
.tab7-motion .tm-lb-prev::after, .tab7-motion .tm-lb-next::after {
  content: ""; position: absolute; top: 9px; left: 10px; width: 7px; height: 7px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(45deg);
}
.tab7-motion .tm-lb-next::after { left: 7px; transform: rotate(-135deg); }
.tab7-motion .tm-lb-count { position: absolute; bottom: 8%; color: rgba(255, 255, 255, .85); font-size: .66rem; font-weight: 700; }
.tab7-motion .tm-s-gallery.is-built .tm-photos .tm-photo { animation: tm-pop .45s var(--tm-out) calc(var(--i) * 80ms) backwards; }

/* ---- PRICING ---- */
.tab7-motion .tm-plans { display: grid; flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 6px 2px 0; }
.tab7-motion .tm-plan {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
  padding: 12px 8px; border: 1px solid var(--tm-border); border-radius: 12px; background: #fff; text-align: center;
  transition: transform .35s var(--tm-out), box-shadow .35s;
}
.tab7-motion .tm-plan strong { max-width: 100%; overflow: hidden; color: var(--tm-soft); font-size: .72rem; white-space: nowrap; text-overflow: ellipsis; }
.tab7-motion .tm-price { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tab7-motion .tm-plan ul { display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 2px 0; padding: 0; list-style: none; }
.tab7-motion .tm-plan li { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.tab7-motion .tm-plan li::before {
  content: ""; flex: none; width: 10px; height: 6px; margin: -2px 0 0 2px; border: solid var(--tm-green);
  border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.tab7-motion .tm-plan li::after { content: ""; flex: 1; height: 6px; border-radius: 3px; background: var(--tm-skel); }
.tab7-motion .tm-plan li:nth-child(2)::after { flex: .7 1 0; }
.tab7-motion .tm-plan li.is-off::before { width: 8px; height: 8px; margin: 0 1px 0 3px; border: 0; transform: none; background:
  linear-gradient(45deg, transparent 43%, #c4cfdb 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #c4cfdb 43% 57%, transparent 57%); }
.tab7-motion .tm-plan li.is-off::after { opacity: .5; }
.tab7-motion .tm-plan-btn { width: 100%; height: 24px; margin-top: 2px; border: 1px solid var(--tm-border); border-radius: 7px; background: var(--tm-light); }
.tab7-motion .tm-plan.is-pop { z-index: 1; padding: 18px 8px 14px; border: 2px solid var(--tm-primary); box-shadow: 0 14px 34px rgba(22, 135, 238, .2); }
.tab7-motion .tm-plan.is-pop .tm-price { background: var(--tm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tab7-motion .tm-plan.is-pop .tm-plan-btn { border: 0; background: var(--tm-grad); }
.tab7-motion .tm-plan.is-pop em {
  position: absolute; top: -10px; left: 50%; max-width: 92%; overflow: hidden; padding: 2px 9px; border-radius: 999px;
  background: linear-gradient(135deg, #1687ee, #08c7b8); color: #fff; font-size: .58rem; font-style: normal;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis;
  transform: translateX(-50%);
}
.tab7-motion .tm-plan.is-hot { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(22, 135, 238, .26); }
.tab7-motion .tm-s-pricing.is-built .tm-plan { animation: tm-rise .5s var(--tm-out) calc(var(--i) * 110ms) backwards; }
.tab7-motion .tm-s-pricing.is-built .tm-plan li { animation: tm-rise .35s var(--tm-out) calc(380ms + var(--i) * 60ms) backwards; }

/* ---- CALCULATOR ---- */
.tab7-motion .tm-calc {
  display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 14px;
  border: 1px solid var(--tm-border); border-radius: 12px; background: #fff;
}
.tab7-motion .tm-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.tab7-motion .tm-field-label { overflow: hidden; color: var(--tm-soft); font-size: .72rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.tab7-motion .tm-field:first-child .tm-field-label { grid-column: 1; }
.tab7-motion .tm-slider { --p: 30%; position: relative; grid-column: 1 / -1; grid-row: 2; height: 6px; border-radius: 3px; background: var(--tm-skel); }
.tab7-motion .tm-fill { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: var(--tm-grad-3); }
.tab7-motion .tm-thumb {
  position: absolute; top: 50%; left: var(--p); width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 3px solid var(--tm-primary); border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(35, 72, 216, .25);
}
.tab7-motion .tm-slider.is-drag .tm-fill, .tab7-motion .tm-slider.is-drag .tm-thumb { transition: width 1s var(--tm-ease), left 1s var(--tm-ease); }
.tab7-motion .tm-out { grid-column: 2; grid-row: 1; font-size: .78rem; font-weight: 800; }
.tab7-motion .tm-stepper { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; }
.tab7-motion .tm-stepper i {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border: 1px solid var(--tm-border); border-radius: 6px; color: var(--tm-primary); font-style: normal; line-height: 1;
}
.tab7-motion .tm-toggle { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #d5e1ec; transition: background .3s; }
.tab7-motion .tm-toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .3s var(--tm-out);
}
.tab7-motion .tm-toggle.is-on { background: linear-gradient(135deg, #10b981, #08c7b8); }
.tab7-motion .tm-toggle.is-on::after { transform: translateX(14px); }
.tab7-motion .tm-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px;
  border-top: 1px dashed var(--tm-border); font-size: .74rem; font-weight: 700; color: var(--tm-soft);
}
.tab7-motion .tm-total strong {
  background: linear-gradient(135deg, #2348d8 10%, #1687ee 60%, #08aeb1); -webkit-background-clip: text; background-clip: text;
  color: transparent; font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
}
.tab7-motion .tm-total.is-bump strong { animation: tm-press .35s var(--tm-ease) reverse; }
.tab7-motion .tm-s-calc.is-built .tm-calc > * { animation: tm-rise .45s var(--tm-out) calc(var(--i) * 90ms) backwards; }

/* ---- CONTACT FORM ---- */
.tab7-motion .tm-form {
  display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--tm-border); border-radius: 12px; background: #fff;
}
.tab7-motion .tm-input-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tab7-motion .tm-input {
  position: relative; display: flex; align-items: center; height: 28px; min-width: 0; overflow: hidden; padding: 0 9px;
  border: 1px solid #cfdeeb; border-radius: 7px; background: #f8fbfd; color: var(--tm-text);
  font-size: .74rem; white-space: nowrap; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.tab7-motion .tm-textarea { flex: 1; align-items: flex-start; min-height: 30px; padding-top: 6px; white-space: normal; }
.tab7-motion .tm-input.is-typing { border-color: var(--tm-primary); background: #fff; box-shadow: 0 0 0 3px rgba(22, 135, 238, .12); }
.tab7-motion .tm-input.is-typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-inline-start: 1px; background: var(--tm-primary); animation: tm-blink 1s steps(1) infinite; }
.tab7-motion .tm-send {
  position: relative; display: inline-flex; align-self: flex-start; align-items: center; justify-content: center;
  height: 32px; padding: 0 16px; border-radius: 9px; background: var(--tm-grad); box-shadow: 0 8px 20px rgba(22, 135, 238, .24);
  color: #fff; font-size: .74rem; font-weight: 700; white-space: nowrap; transition: background .3s;
}
.tab7-motion .tm-send-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; transition: opacity .25s; }
.tab7-motion .tm-send-done .tm-ico { font-size: 14px; }
.tab7-motion .tm-send.is-done { background: linear-gradient(135deg, #10b981, #08aeb1); }
.tab7-motion .tm-send.is-done .tm-send-label { opacity: 0; }
.tab7-motion .tm-send.is-done .tm-send-done { opacity: 1; }
.tab7-motion .tm-s-form.is-built .tm-form > * { animation: tm-rise .45s var(--tm-out) calc(var(--i) * 90ms) backwards; }

/* ---- D3 ---- */
.tab7-motion .tm-net { flex: 1; width: 100%; height: 100%; overflow: visible; }
.tab7-motion .tm-net line { stroke: #c4d6e8; stroke-width: 1.3; transition: stroke .3s, opacity .3s, stroke-width .3s; }
.tab7-motion .tm-net circle { stroke: #fff; stroke-width: 2; transition: opacity .3s; }
.tab7-motion .tm-net .tm-node { transform-box: fill-box; transform-origin: center; }
.tab7-motion .tm-net.is-focus line { opacity: .25; }
.tab7-motion .tm-net.is-focus line.is-lit { opacity: 1; stroke: var(--tm-primary); stroke-width: 2.2; }
.tab7-motion .tm-net.is-focus .tm-node { opacity: .3; }
.tab7-motion .tm-net.is-focus .tm-node.is-lit { opacity: 1; }
.tab7-motion .tm-net .tm-halo { fill: none; stroke: var(--tm-primary); stroke-width: 2; opacity: 0; transition: opacity .3s; }
.tab7-motion .tm-net.is-focus .tm-halo { opacity: .5; }
.tab7-motion .tm-s-d3.is-built .tm-net line { animation: tm-fade .5s ease calc(300ms + var(--i) * 18ms) backwards; }
.tab7-motion .tm-s-d3.is-built .tm-node { animation: tm-pop .45s var(--tm-out) calc(var(--i) * 30ms) backwards; }
@keyframes tm-fade { from { opacity: 0; } }

/* ---- footer: steps + publish ---- */
.tab7-motion .tm-foot { display: flex; align-items: center; gap: 8px; padding: 10px 2px 0; }
.tab7-motion .tm-step {
  display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--tm-soft); font-size: .72rem; font-weight: 700;
  transition: color .25s;
}
.tab7-motion .tm-step .tm-ico, .tab7-motion .tm-publish .tm-ico {
  width: 18px; height: 18px; padding: 3px; border: 1.5px solid #cfdeeb; border-radius: 50%; color: transparent;
  transition: background .25s, border-color .25s, color .25s, transform .3s var(--tm-out);
}
.tab7-motion .tm-step .tm-ico svg, .tab7-motion .tm-publish .tm-ico svg { stroke-width: 3; }
.tab7-motion .tm-step.is-done { color: var(--tm-text); }
.tab7-motion .tm-step.is-done .tm-ico { border-color: transparent; background: var(--tm-grad); color: #fff; }
.tab7-motion .tm-step-line { flex: 1; min-width: 10px; height: 2px; border-radius: 1px; background: var(--tm-line); }
.tab7-motion .tm-publish {
  display: inline-flex; flex: none; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 9px;
  border-radius: 10px; background: var(--tm-grad); box-shadow: 0 8px 20px rgba(22, 135, 238, .24);
  color: #fff; font-size: .76rem; font-weight: 700; white-space: nowrap; transition: background .3s, box-shadow .3s;
}
.tab7-motion .tm-publish .tm-ico { border-color: rgba(255, 255, 255, .55); }
.tab7-motion .tm-publish.is-done { background: linear-gradient(135deg, #10b981, #08aeb1); box-shadow: 0 8px 20px rgba(16, 185, 129, .25); }
.tab7-motion .tm-publish.is-done .tm-ico { border-color: transparent; background: #fff; color: var(--tm-green); }

/* ---- toast, flyer, cursor ---- */
.tab7-motion .tm-toast {
  position: absolute; z-index: 4; right: -22px; bottom: 60px; display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: 240px; padding: 14px 16px; border: 1px solid rgba(22, 135, 238, .18); border-radius: 16px;
  background: #fff; box-shadow: 0 8px 28px rgba(35, 72, 216, .12); opacity: 0;
  transform: translateY(12px) scale(.96); transition: opacity .3s, transform .45s var(--tm-out); pointer-events: none;
}
.tab7-motion .tm-toast.is-on { opacity: 1; transform: none; }
.tab7-motion .tm-toast > .tm-ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: linear-gradient(135deg, #10b981, #08c7b8); color: #fff; }
.tab7-motion .tm-toast > .tm-ico svg { stroke-width: 3; }
.tab7-motion .tm-toast span { display: flex; flex-direction: column; min-width: 0; }
.tab7-motion .tm-toast small { color: var(--tm-soft); font-size: .7rem; }
.tab7-motion .tm-toast strong { font-size: .92rem; }

.tab7-motion .tm-flyer {
  position: absolute; z-index: 6; top: 0; left: 0; display: inline-flex; align-items: center; gap: 6px; max-width: 220px;
  padding: 5px 11px 5px 7px; border: 1px solid rgba(22, 135, 238, .4); border-radius: 999px; background: #fff;
  box-shadow: 0 10px 26px rgba(35, 72, 216, .2); color: var(--tm-primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; font-weight: 700;
  white-space: nowrap; opacity: 0; pointer-events: none;
}
.tab7-motion .tm-flyer .tm-ico { width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: var(--tm-grad); color: #fff; }
.tab7-motion .tm-flyer > span { overflow: hidden; text-overflow: ellipsis; }

.tab7-motion .tm-cursor {
  position: absolute; z-index: 8; top: 0; left: 0; width: 22px; height: 22px; opacity: 0; pointer-events: none;
  transition-property: transform, opacity; transition-duration: .6s, .3s; transition-timing-function: var(--tm-ease), ease;
  filter: drop-shadow(0 3px 5px rgba(16, 24, 39, .28));
}
.tab7-motion .tm-cursor.is-on { opacity: 1; }
.tab7-motion .tm-cursor svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.tab7-motion .tm-cursor::after {
  content: ""; position: absolute; top: 3px; left: 4px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(22, 135, 238, .35); opacity: 0;
}
.tab7-motion .tm-cursor.is-click::after { animation: tm-ring .5s ease-out; }

/* ---- paused: stop the endless loops (entrances are short and may finish) ---- */
.tab7-motion.is-paused .tm-raw i, .tab7-motion.is-paused .tm-input::after { animation-play-state: paused; }

/* =========================================================
   LAYOUTS BY COMPONENT WIDTH
   ========================================================= */
/* Wide (tablet, stacked hero): labelled rail, section labels. */
@container tm (min-width: 620px) {
  .tab7-motion .tm-window { padding: 14px; }
  .tab7-motion .tm-sources { grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tab7-motion .tm-sources > .tm-label { display: block; padding: 0 4px; }
  .tab7-motion .tm-source { padding: 8px 11px; }
  .tab7-motion .tm-rail { min-width: 0; max-width: 190px; }
  .tab7-motion .tm-rail > .tm-label { display: block; }
  .tab7-motion .tm-type > span { position: static; width: auto; height: auto; clip-path: none; text-overflow: ellipsis; }
  .tab7-motion .tm-scene { inset: 16px 18px; }
  .tab7-motion .tm-tbl { font-size: .84rem; }
  .tab7-motion .tm-tr { height: 36px; }
  .tab7-motion .tm-price { font-size: 1.75rem; }
  .tab7-motion .tm-day { font-size: .66rem; }
}

/* Phone: sources as compact tiles, rail as a row under the canvas. */
@container tm (max-width: 479px) {
  .tab7-motion .tm-window { padding: 10px; border-radius: 18px; }
  .tab7-motion .tm-bar { gap: 8px; }
  .tab7-motion .tm-dots { display: none; }
  .tab7-motion .tm-sources { gap: 6px; }
  .tab7-motion .tm-source { flex-direction: column; gap: 4px; padding: 7px 4px; text-align: center; }
  .tab7-motion .tm-source > span { align-items: center; max-width: 100%; }
  .tab7-motion .tm-source small { display: none; }
  .tab7-motion .tm-source strong { font-size: .72rem; }
  .tab7-motion .tm-source > .tm-ico { width: 26px; height: 26px; }
  .tab7-motion .tm-main { grid-template-columns: minmax(0, 1fr); }
  .tab7-motion .tm-rail { order: 2; flex-direction: row; padding: 4px; }
  .tab7-motion .tm-type { justify-content: center; min-height: 34px; padding: 6px 0; }
  .tab7-motion .tm-type .tm-ico { font-size: 16px; }
  .tab7-motion .tm-stage { height: 250px; }
  .tab7-motion .tm-scene { inset: 12px; }
  .tab7-motion .tm-file { max-width: 52%; }
  .tab7-motion .tm-tr { height: 30px; padding: 0 7px; gap: 6px; }
  .tab7-motion .tm-tbl { font-size: .74rem; }
  .tab7-motion .tm-price { font-size: 1.2rem; }
  .tab7-motion .tm-plan { padding: 10px 5px; }
  .tab7-motion .tm-foot { gap: 6px; }
  .tab7-motion .tm-toast { right: 10px; bottom: 58px; padding: 10px 12px; }
  .tab7-motion .tm-toast > .tm-ico { width: 28px; height: 28px; padding: 6px; }
  .tab7-motion .tm-cursor { width: 18px; height: 18px; }
}
@container tm (max-width: 359px) {
  .tab7-motion .tm-badge { display: none; }
  .tab7-motion .tm-step-line { min-width: 4px; }
  .tab7-motion .tm-step { font-size: .66rem; }
  .tab7-motion .tm-publish { padding: 0 10px 0 7px; font-size: .7rem; }
}

/* Reduced motion: no travelling cursor, no flying pill; scenes swap in place. */
@media (prefers-reduced-motion: reduce) {
  .tab7-motion *, .tab7-motion *::before, .tab7-motion *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  .tab7-motion .tm-cursor, .tab7-motion .tm-flyer { display: none; }
}
