/* Blocks added with the 2026-11 restructure (pilot, how-it-works, security,
   back-office, hubs, Social, Ukraine). Loaded after site.css and built only
   from its tokens, so the new pages sit in the same visual system; nothing here
   overrides an existing rule. Icons must come from the Phosphor SUBSET already
   shipped (see docs/tools/build-phosphor-subset.py); a class outside it renders
   as nothing, not as a fallback. */

/* Numbered rail: a process whose ORDER is the information (pilot steps, the
   four message-to-order steps). Not used for lists that merely have items. */
.rail{ counter-reset:rail; display:grid; grid-template-columns:minmax(0,1fr); max-width:46rem }
.rail > li{ position:relative; padding:0 0 1.75rem 3.5rem; counter-increment:rail }
.rail > li::before{
  content:counter(rail); position:absolute; left:0; top:0; width:2.25rem; height:2.25rem;
  display:grid; grid-template-columns:minmax(0,1fr); place-items:center; border-radius:50%; font-weight:700; font-size:.95rem;
  color:var(--accent); background:var(--accent-soft); border:1px solid var(--accent-bd);
}
.rail > li::after{ content:""; position:absolute; left:1.0625rem; top:2.5rem; bottom:.25rem; width:2px; background:var(--border) }
.rail > li:last-child{ padding-bottom:0 }
.rail > li:last-child::after{ display:none }
.rail h3{ font-size:1.125rem; line-height:1.3; margin-bottom:.25rem }
.rail p{ color:var(--ink-2); max-width:38rem }

/* Fact strip: three to five numbers or terms the reader should leave with. */
.fact-strip{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px;
  background:var(--border); border:1px solid var(--border); border-radius:var(--r-md); overflow:hidden;
}
.fact-strip:has(> :nth-child(3):last-child){ grid-template-columns:repeat(3,minmax(0,1fr)) }
@media (max-width:860px){ .fact-strip,.fact-strip:has(> :nth-child(3):last-child){ grid-template-columns:repeat(2,minmax(0,1fr)) } }
@media (max-width:420px){ .fact-strip,.fact-strip:has(> :nth-child(3):last-child){ grid-template-columns:minmax(0,1fr) } }
/* Grids size to their item count (design audit 2026-11-04, X3). A card grid
   whose last row is short reads as "forgot a card", so the common counts get
   a track count that divides them (2 and 4 -> 2 columns, 6 -> 3, 8 -> 4) and
   the counts that divide nothing (5, 7) are laid on a finer grid whose last
   row fills the width with wider cells. In the two-column bands an odd last
   item spans the row. Generic by count, never by page. */
@media (min-width:861px){
  .fact-strip:has(> :nth-child(5):last-child){ grid-template-columns:repeat(5,minmax(0,1fr)) }
  .fact-strip:has(> :nth-child(2):last-child){ grid-template-columns:repeat(2,minmax(0,1fr)) }
  .fact-strip:has(> :nth-child(6):last-child){ grid-template-columns:repeat(3,minmax(0,1fr)) }
}
@media (min-width:421px) and (max-width:860px){
  .fact-strip > :last-child:nth-child(odd){ grid-column:1 / -1 }
}
/* Words, not numbers: a strip whose values are terms ("Your ERP",
   "On-premise") at display size looked like stray headings (X12). Opt-in,
   because only the copy knows which strips hold words. */
.fact-strip--text b{ font-size:1.0625rem; line-height:1.35 }
.fact-strip > div{ background:var(--surface); padding:1.1rem 1.25rem; min-width:0 }
.fact-strip b{ display:block; font-size:clamp(1.25rem,2vw,1.625rem); line-height:1.2; color:var(--ink) }
.fact-strip span{ display:block; margin-top:.25rem; color:var(--ink-3); font-size:.9rem }

/* Tiles: parallel items with an icon, e.g. bot abilities or back-office modules. */
.tiles{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem }
.tiles--4{ grid-template-columns:repeat(4,minmax(0,1fr)) }
@media (max-width:1000px){ .tiles,.tiles--4{ grid-template-columns:repeat(2,minmax(0,1fr)) } }
@media (max-width:620px){ .tiles,.tiles--4{ grid-template-columns:minmax(0,1fr) } }
@media (min-width:1001px){
  .tiles:has(> :nth-child(4):last-child){ grid-template-columns:repeat(4,minmax(0,1fr)) }
  .tiles:has(> :nth-child(8):last-child){ grid-template-columns:repeat(4,minmax(0,1fr)) }
  .tiles--4:is(:has(> :nth-child(3):last-child), :has(> :nth-child(6):last-child)){ grid-template-columns:repeat(3,minmax(0,1fr)) }
  /* 5 = 3 + 2 and 7 = 4 + 3, every row full. */
  .tiles:has(> :nth-child(5):last-child){ grid-template-columns:repeat(6,minmax(0,1fr)) }
  .tiles:has(> :nth-child(5):last-child) > *{ grid-column:span 2 }
  .tiles:has(> :nth-child(5):last-child) > :nth-child(n+4){ grid-column:span 3 }
  .tiles:has(> :nth-child(7):last-child){ grid-template-columns:repeat(12,minmax(0,1fr)) }
  .tiles:has(> :nth-child(7):last-child) > *{ grid-column:span 3 }
  .tiles:has(> :nth-child(7):last-child) > :nth-child(n+5){ grid-column:span 4 }
}
@media (min-width:621px) and (max-width:1000px){
  .tiles > :last-child:nth-child(odd){ grid-column:1 / -1 }
}
.tile{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:1.25rem 1.25rem 1.375rem; min-width:0 }
.tile i{ font-size:1.5rem; color:var(--teal-ink) }
.tile h3{ margin:.625rem 0 .25rem; font-size:1.05rem; line-height:1.3 }
.tile p{ color:var(--ink-2); font-size:.95rem }
.tile .tile-meta{ margin-top:.75rem; font-size:.85rem; font-weight:600; color:var(--ink-3) }

/* Matrix: a comparison or criteria table that may be wider than the phone. */
.matrix-wrap{ overflow-x:auto; border:1px solid var(--border); border-radius:var(--r-md); background:var(--surface) }
.matrix{ width:100%; border-collapse:collapse }
.matrix th,.matrix td{ padding:.8rem 1rem; text-align:left; vertical-align:top; border-bottom:1px solid var(--border) }
.matrix thead th{ background:var(--surface-2); font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-3) }
.matrix tbody th{ font-weight:600; color:var(--ink) }
.matrix tbody tr:last-child > *{ border-bottom:0 }
/* On a phone three or four columns would break every cell to one word a line: keep a readable width and scroll the wrapper. */
@media (max-width:640px){ .matrix{ min-width:32rem } }
/* Equal plan columns: a table whose corner cell is empty compares its COLUMNS
   (plans, editions), so no column should be narrower than another and wrap
   "Set up for / you" while its neighbour has room. */
.matrix:has(> thead th:first-child:empty){ table-layout:fixed }
.matrix > thead th:first-child:empty{ width:26% }

/* Phones (design audit 2026-11-04, X2). A sideways-scrolling table hid the
   column that sells ("With Tarvyx", "Per month") off the right edge with
   nothing saying it was there.

   With the script: site.js copies each column's own <th> text onto that
   column's cells as data-label (no copy in the script) and marks the table
   data-stack, and each row becomes a card that labels its cells. A table that
   compares COLUMNS (empty corner cell: the plan matrix, Pro vs Enterprise) is
   also given a transposed twin, data-stack-alt, so a phone reads one card per
   plan rather than thirteen cards of four plans each; the wide original is
   then data-stack-wide. Only one of the two is ever displayed, so a screen
   reader meets the content once.

   Without the script: the table keeps its width and scrolls, its first column
   stays put, and a shadow on the edge that still has content says so (the two
   `local` layers cover the shadows once there is nothing left to scroll to). */
.matrix[data-stack-alt]{ display:none }
@media (max-width:640px){
  .matrix-wrap{
    background:
      linear-gradient(90deg, var(--surface) 35%, rgba(255,255,255,0)) left center / 2.5rem 100% no-repeat local,
      linear-gradient(270deg, var(--surface) 35%, rgba(255,255,255,0)) right center / 2.5rem 100% no-repeat local,
      linear-gradient(90deg, rgba(11,21,36,.16), rgba(11,21,36,0)) left center / .875rem 100% no-repeat scroll,
      linear-gradient(270deg, rgba(11,21,36,.16), rgba(11,21,36,0)) right center / .875rem 100% no-repeat scroll,
      var(--surface);
  }
  .matrix:not([data-stack]) tbody th{ position:sticky; left:0; z-index:1; background:var(--surface); box-shadow:1px 0 0 var(--border) }

  .matrix-wrap:has(> .matrix[data-stack]){ overflow:visible; border:0; border-radius:0; background:none }
  .matrix[data-stack]{ min-width:0; table-layout:auto }
  .matrix[data-stack], .matrix[data-stack] tbody, .matrix[data-stack] tr{ display:block }
  .matrix[data-stack] thead{ display:none }
  /* After the display:block above, and one attribute heavier, so it wins. */
  .matrix[data-stack][data-stack-wide]{ display:none }
  .matrix[data-stack] tbody tr{
    padding:.875rem 1rem 1rem; border:1px solid var(--border); border-radius:var(--r-md); background:var(--surface) }
  .matrix[data-stack] tbody tr + tr{ margin-top:.75rem }
  .matrix[data-stack] tbody th, .matrix[data-stack] tbody td{ display:block; padding:0; border:0 }
  .matrix[data-stack] tbody th{ font-size:1rem; line-height:1.35; padding-bottom:.625rem; margin-bottom:.625rem; border-bottom:1px solid var(--border) }
  .matrix[data-stack] tbody td + td{ margin-top:.625rem }
  .matrix[data-stack] td[data-label]::before{
    content:attr(data-label); display:block; margin-bottom:.125rem;
    font-size:.75rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--ink-3) }
  /* The last column is the answer in the site's row tables (With Tarvyx, Per
     month, Result): its label takes the accent. */
  .matrix[data-stack]:not([data-stack-alt]) tbody td:last-child:not(:first-child)[data-label]::before{ color:var(--accent) }
}

/* Placeholder for a product video that is not recorded yet. A static frame from
   the product with a play mark and a plain label: not a button, nothing loads,
   and it is swapped for a real <video> without moving the layout (16:9). */
.video-ph{
  position:relative; aspect-ratio:16/9; max-width:100%; overflow:hidden;
  border:1px solid var(--border-2); border-radius:var(--r-lg); background:var(--panel-from);
}
.video-ph img{ display:block; width:100%; height:100%; object-fit:cover; opacity:.35 }
.video-ph::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(7,23,38,.15),rgba(7,23,38,.78)) }
.video-ph .vp-play{ position:absolute; inset:0; z-index:1; display:grid; grid-template-columns:minmax(0,1fr); place-items:center }
.video-ph .vp-play i{
  display:grid; grid-template-columns:minmax(0,1fr); place-items:center; width:4.25rem; height:4.25rem; border-radius:50%;
  font-size:1.625rem; color:var(--panel-from); background:rgba(255,255,255,.92); box-shadow:var(--e3);
}
.video-ph .vp-label{
  z-index:1; position:absolute; left:1rem; bottom:1rem; right:1rem; color:var(--on);
  font-size:.9rem; font-weight:600; text-shadow:0 1px 8px rgba(7,23,38,.6);
}
.video-cap{ margin-top:1rem; max-width:72ch; color:var(--ink-3); font-size:.85rem; line-height:1.5 }
/* A caption that carries information (a link, a price rule, a pilot term) is a callout, not a footnote. */
.video-cap--note{ display:flex; align-items:flex-start; gap:.7rem; max-width:none; padding:.85rem 1.1rem; border:1px solid var(--border); border-radius:var(--r-md); background:var(--surface); color:var(--ink-2); font-size:.95rem }
.video-cap--note > i{ flex:none; display:inline-flex; align-items:center; height:calc(.95rem*1.5); margin-top:0; color:var(--accent); font-size:1.25rem; line-height:1 }
.video-cap--note a{ font-weight:600 }

/* Two-column section copy next to a media or form block. */
.split{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(1.5rem,4vw,3.5rem); align-items:start }
@media (max-width:860px){ .split{ grid-template-columns:minmax(0,1fr) } }

/* A customer's quote on a case-study page: the closing-note bar, without the
   browser's 40px blockquote indent. Plain markup only, never Review schema. */
.case-quote blockquote{ margin:0 }
.case-quote blockquote p{ font-size:1.0625rem; line-height:1.55 }
.case-quote figcaption{ margin-top:.5rem; font-size:.875rem; line-height:1.5; color:var(--ink-3) }

/* A row of links to sibling pages (hub spokes, "see also"). */
.link-cards{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem }
@media (max-width:960px){ .link-cards{ grid-template-columns:repeat(2,minmax(0,1fr)) } }
@media (max-width:600px){ .link-cards{ grid-template-columns:minmax(0,1fr) } }
@media (min-width:961px){
  .link-cards:is(:has(> :nth-child(2):last-child), :has(> :nth-child(4):last-child)){ grid-template-columns:repeat(2,minmax(0,1fr)) }
  .link-cards:has(> :nth-child(5):last-child){ grid-template-columns:repeat(6,minmax(0,1fr)) }
  .link-cards:has(> :nth-child(5):last-child) > *{ grid-column:span 2 }
  .link-cards:has(> :nth-child(5):last-child) > :nth-child(n+4){ grid-column:span 3 }
  .link-cards:has(> :nth-child(7):last-child){ grid-template-columns:repeat(12,minmax(0,1fr)) }
  .link-cards:has(> :nth-child(7):last-child) > *{ grid-column:span 3 }
  .link-cards:has(> :nth-child(7):last-child) > :nth-child(n+5){ grid-column:span 4 }
}
@media (min-width:1100px){
  .link-cards:has(> :nth-child(8):last-child){ grid-template-columns:repeat(4,minmax(0,1fr)) }
}
@media (min-width:601px) and (max-width:960px){
  .link-cards > :last-child:nth-child(odd){ grid-column:1 / -1 }
}
.link-card{
  display:block; text-decoration:none; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-md); padding:1.125rem 1.25rem; transition:border-color .15s, box-shadow .15s;
}
.link-card:hover,.link-card:focus-visible{ border-color:var(--accent-bd); box-shadow:var(--e2) }
.link-card b{ display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; font-size:1.02rem }
.link-card b i{ color:var(--accent); margin-top:.2em }
.link-card span{ display:block; margin-top:.3rem; color:var(--ink-2); font-size:.92rem }

/* A single link card beside its heading: centre it against the heading, and a lone
   link card in a grid spans the row instead of sitting in one third of it. */
.split:has(> .link-card),
.split:has(> .link-cards > .link-card:only-child){ align-items:center }
.link-cards:has(> .link-card:only-child){ grid-template-columns:minmax(0,1fr) }

/* paired cards in one row are one height (the before/after compare and the two lanes) */
.cmp-grid{ align-items:stretch }
.cmp-col > .cmp-card{ flex:1 1 auto }
.lanes{ align-items:stretch }
