/* Examples page. It shares the service pages' layout (service-page.css) and adds the inbox hero,
   the three playable examples and the closing points. See examples-page.js. */
.examples-page { --ease: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.4, .64, 1); }
.ex-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ex-logo { flex: none; display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: .72em; background: #fff; box-shadow: 0 0 0 1px #e4e6e2, 0 .3em .8em -.3em rgba(30, 34, 32, .18); }
.ex-logo svg { width: 62%; height: 62%; }
.xi-dots { display: flex; gap: .35em; }
.xi-dots i { width: .62em; height: .62em; border-radius: 50%; background: #dcdedb; }
@keyframes ex-spin { to { transform: rotate(360deg); } }
@keyframes ex-ping { 0% { transform: scale(.8); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }

/* Hero: the incoming work inbox. Sized in em from the hero's width, so it scales cleanly. */
.sp-hero-art.has-xi { container-type: inline-size; }
.xi { position: absolute; inset: 0; color: var(--ink); font-size: clamp(8.5px, 2.25cqw, 13.5px); line-height: 1.3; }
.xi-window { position: absolute; inset: 2% 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 1.3em; background: #fbfbfa; box-shadow: 0 2.6em 5em -2em rgba(30, 34, 32, .35), 0 0 0 1px rgba(30, 34, 32, .06); }
.xi-bar { display: flex; align-items: center; gap: .9em; padding: .95em 1.2em; border-bottom: 1px solid #e8e9e6; background: #fff; }
.xi-bar strong { font-weight: 500; }
.xi-live { position: relative; display: inline-flex; align-items: center; gap: .5em; margin-left: auto; padding: .3em .8em .3em .65em; border-radius: 2em; background: var(--ink); color: #fff; font-size: .85em; }
.xi-live i { position: relative; width: .5em; height: .5em; border-radius: 50%; background: #fff; }
.xi-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: ex-ping 1.6s ease-out infinite; }
.xi-counts { display: flex; gap: 1.4em; padding: .9em 1.2em .2em; color: #6b6e6c; font-size: .9em; }
.xi-counts b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.xi-today { margin-left: auto; }
.xi-list { position: relative; flex: 1; overflow: hidden; background: radial-gradient(circle, #dcdedb 1px, transparent 1.3px) 0 0 / 1.35em 1.35em; }
.xi-row { position: absolute; left: 1.2em; right: 1.2em; top: .8em; display: flex; align-items: center; gap: .8em; height: 4.1em; padding: 0 .8em; border-radius: .95em; background: #fff; box-shadow: 0 .7em 1.5em -1em rgba(30, 34, 32, .35), 0 0 0 1px #e8e9e6; transform: translateY(calc(var(--row, 0) * 4.75em)); transition: transform .7s var(--spring), opacity .45s, box-shadow .3s; }
.xi-list.is-settling .xi-row { transition: none; }
.xi-row.is-new { opacity: 0; transform: translateY(-1.6em) scale(.97); }
.xi-row.is-gone { opacity: 0; }
.xi-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: .8em; transition: opacity .2s, filter .2s; }
.xi-row.is-swap .xi-body { opacity: 0; filter: blur(2px); }
.xi-text { min-width: 0; }
.xi-text small { display: block; color: #6b6e6c; font-size: .8em; }
.xi-text strong { display: block; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.xi-state { flex: none; display: inline-flex; align-items: center; gap: .45em; padding: .3em .7em; border-radius: 2em; background: #eceeeb; color: #6b6e6c; font-size: .8em; white-space: nowrap; transition: background .3s, color .3s; }
.xi-row.is-reading { box-shadow: 0 .9em 1.8em -1em rgba(30, 34, 32, .45), 0 0 0 1.5px var(--ink); }
.xi-row.is-reading .xi-state::before { content: ""; width: .8em; height: .8em; box-sizing: border-box; border: 1.5px solid #cfd2ce; border-top-color: var(--ink); border-radius: 50%; animation: ex-spin .6s linear infinite; }
.xi-row.is-ok .xi-state { background: var(--ink); color: #fff; }
.xi-row.is-ok .xi-state::before { content: "✓"; font-size: .9em; }
.xi-row.is-flag .xi-state { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.xi-row.is-flag .xi-state::before { content: "!"; font-weight: 700; }
.xi-foot { flex: none; display: flex; align-items: center; gap: .7em; padding: .8em 1.2em; border-top: 1px solid #e8e9e6; background: #fff; color: #6b6e6c; font-size: .85em; }
.xi-portrait { display: block; flex: none; width: 2.2em; height: 2.2em; border-radius: 50%; }
.motion-paused .xi *, .motion-paused .xi *::before, .motion-paused .xi *::after { transition: none !important; animation: none !important; }

/* Intro */
.ex-disclosure { font-size: 14px; }

/* Each example: the heading and its time figure, then the playable window */
.ex-demo { padding-block: 85px; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.ex-head { display: grid; grid-template-columns: minmax(0, .46fr) minmax(0, .54fr); gap: 6%; align-items: end; }
.ex-head h2 { font-size: clamp(32px, 3.3vw, 48px); }
.ex-head .sp-kicker { margin-bottom: 18px; }
.ex-head-copy > p:first-child { max-width: 56ch; color: var(--muted); }
.ex-time { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 22px; margin-top: 26px; padding: 16px 20px; border-radius: 12px; background: #eeefec; }
.ex-time-label { flex: none; max-width: 9ch; color: var(--muted); font-size: 12px; line-height: 1.3; }
.ex-before, .ex-after { display: grid; }
.ex-time b { position: relative; justify-self: start; font-size: 28px; font-weight: 400; line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; transition: color .5s; }
.ex-time small { color: var(--muted); font-size: 12px; }
.ex-before b::after { content: ""; position: absolute; left: -3%; right: -3%; top: 55%; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s ease; }
.ex-arrow { position: relative; flex: none; width: 30px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s ease .15s; }
.ex-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transform: rotate(45deg); }
.ex-after { opacity: 0; transform: translateX(-8px); transition: opacity .45s .3s, transform .7s var(--spring) .3s; }
.ex-demo.is-after .ex-before b { color: #8b8e8c; }
.ex-demo.is-after .ex-before b::after, .ex-demo.is-after .ex-arrow { transform: scaleX(1); }
.ex-demo.is-after .ex-after { opacity: 1; transform: none; }
.ex-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.ex-note .text-link { font-size: 13px; }

.ex-stage { position: relative; margin-top: 46px; padding: 22px 28px 36px; border-radius: 16px; background: #e8e9e6 radial-gradient(circle, #d6d8d4 1px, transparent 1.3px) 0 0 / 14px 14px; container-type: inline-size; }
.ex-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; max-width: 1060px; margin: 0 auto 18px; }
.ex-switch { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 9px; border: 1px solid #cdd0cc; border-radius: 40px; background: #f7f7f5; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .25s, background .25s; }
.ex-switch:hover { border-color: #8b8e8c; }
.ex-switch i { position: relative; flex: none; width: 38px; height: 22px; border-radius: 20px; background: #8b8e8c; transition: background .3s; }
.ex-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .4s var(--spring); }
.ex-switch[aria-checked="true"] { border-color: var(--ink); background: #fff; }
.ex-switch[aria-checked="true"] i { background: var(--ink); }
.ex-switch[aria-checked="true"] i::after { transform: translateX(16px); }
.ex-switch strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; }
.ex-switch small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.ex-replay { display: inline-flex; align-items: center; gap: 10px; padding: 8px 4px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ex-replay:hover { text-decoration: underline; text-underline-offset: 4px; }
.ex-replay-icon { width: 13px; height: 13px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; transition: transform .5s var(--ease); }
.ex-replay:hover .ex-replay-icon { transform: rotate(-200deg); }
.ex-switch:focus-visible, .ex-replay:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* The window: what arrives, what happens and what is ready, with the person who checks it */
.ex-window { max-width: 1060px; margin: 0 auto; overflow: hidden; border-radius: 14px; background: #fbfbfa; box-shadow: 0 30px 60px -26px rgba(30, 34, 32, .45), 0 0 0 1px rgba(30, 34, 32, .05); font-size: 13px; line-height: 1.4; }
.ex-bar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #ecedea; background: #fff; }
.ex-bar .xi-dots { font-size: 12px; }
.ex-bar strong { font-weight: 500; }
.ex-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 4px 11px; border-radius: 20px; background: #eceeeb; color: #6b6e6c; font-size: 12px; transition: background .3s, color .3s, box-shadow .3s; }
.ex-status b { font-weight: 500; }
.ex-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ex-status.is-run i { width: 10px; height: 10px; box-sizing: border-box; border: 1.5px solid #cfd2ce; border-top-color: var(--ink); background: none; animation: ex-spin .6s linear infinite; }
.ex-status.is-ok { background: var(--ink); color: #fff; }
.ex-status.is-flag { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ex-flow { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1.12fr) 34px minmax(0, 1fr); align-items: start; padding: 22px 22px 26px; }
.ex-col-title { margin-bottom: 10px; color: #6b6e6c; font-size: 12px; }
.ex-card { padding: 14px 15px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e8e9e6, 0 12px 24px -18px rgba(30, 34, 32, .4); }
.ex-source, .ex-result { opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .45s, transform .7s var(--spring); }
.is-source .ex-source, .is-result .ex-result { opacity: 1; transform: none; }
.ex-link { position: relative; align-self: center; height: 1px; margin: 22px 6px 0; background: repeating-linear-gradient(90deg, #b9bdbc 0 4px, transparent 4px 8px); }
.ex-link::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.ex-link::after { content: ""; position: absolute; right: 0; top: -3.5px; width: 7px; height: 7px; border-top: 1px solid #b9bdbc; border-right: 1px solid #b9bdbc; transform: rotate(45deg); transition: border-color .3s .25s; }
.is-link-1 .ex-link:nth-of-type(1)::before, .is-link-2 .ex-link:nth-of-type(2)::before { transform: scaleX(1); }
.is-link-1 .ex-link:nth-of-type(1)::after, .is-link-2 .ex-link:nth-of-type(2)::after { border-color: var(--ink); }

/* What arrives */
.ex-src-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #ecedea; font-size: 11.5px; }
.ex-src-head small { display: block; color: #6b6e6c; }
.ex-src-head strong { display: block; font-size: 13.5px; font-weight: 500; }
.ex-fields { margin: 6px 0 0; }
.ex-fields div, .ex-returns tr { display: flex; justify-content: space-between; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 6px; }
.ex-fields dt { color: #6b6e6c; }
.ex-fields dd { margin: 0; font-weight: 500; text-align: right; }
.is-odd { background: #f0f1ee; box-shadow: inset 2px 0 0 var(--ink); }
.ex-files { margin: 8px 0 0; padding: 0; list-style: none; }
.ex-files li { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; }
.ex-files strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.ex-files small { display: block; color: #6b6e6c; font-size: 11.5px; }
.ex-file { flex: none; width: 13px; height: 16px; margin-top: 1px; border-radius: 2px; background: linear-gradient(#fff, #fff) 3px 5px / 7px 1px no-repeat, linear-gradient(#fff, #fff) 3px 8px / 7px 1px no-repeat, linear-gradient(#fff, #fff) 3px 11px / 4px 1px no-repeat, #a9adab; }
.ex-named .ex-file { background-color: var(--ink); }
.ex-returns { width: 100%; margin-top: 6px; border-collapse: collapse; }
.ex-returns thead tr { color: #6b6e6c; font-size: 11.5px; }
.ex-returns th { font-weight: 400; text-align: left; }
.ex-returns td:last-child, .ex-returns th:last-child { text-align: right; }
.ex-returns tbody td:last-child { font-weight: 500; }
.ex-returns tr.is-odd td:last-child { font-weight: 400; font-style: italic; }

/* What happens: each step runs, then ticks, flags or is held */
.ex-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ex-steps li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #ecedea; color: #6b6e6c; transition: color .3s, box-shadow .3s, opacity .3s; }
.ex-steps strong { display: block; font-weight: 500; }
.ex-steps small { display: block; max-height: 0; overflow: hidden; color: var(--muted); font-size: 12px; opacity: 0; transition: max-height .4s var(--ease), opacity .3s .1s; }
.ex-state { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: -1px; box-sizing: border-box; border: 1.5px solid #d6d8d4; border-radius: 50%; color: #fff; transition: background .25s, border-color .25s; }
.ex-state svg { width: 12px; height: 12px; opacity: 0; transition: opacity .2s; }
.ex-steps li.is-running { color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink), 0 10px 20px -14px rgba(30, 34, 32, .5); }
.ex-steps li.is-running .ex-state { border-top-color: var(--ink); animation: ex-spin .6s linear infinite; }
.ex-steps li.is-done, .ex-steps li.is-flag { color: var(--ink); }
.ex-steps li.is-done small, .ex-steps li.is-flag small, .ex-steps li.is-skip small { max-height: 3em; opacity: 1; }
.ex-steps li.is-done .ex-state { border-color: var(--ink); background: var(--ink); }
.ex-steps li.is-done .ex-state svg { opacity: 1; }
.ex-steps li.is-flag { background: #f0f1ee; box-shadow: 0 0 0 1.5px var(--ink); }
.ex-steps li.is-flag .ex-state { border-color: var(--ink); background: #fff; color: var(--ink); }
.ex-steps li.is-flag .ex-state::after { content: "!"; font-size: 12px; font-weight: 700; line-height: 1; }
.ex-steps li.is-flag .ex-state svg { display: none; }
.ex-steps li.is-flag small { color: var(--ink); }
.ex-steps li.is-skip { color: var(--muted); background: #f7f7f5; }
.ex-steps li.is-skip .ex-state { border-style: dashed; }

/* What is ready */
.ex-result > * + * { margin-top: 10px; }
.ex-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 20px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; }
.ex-badge::before { content: "✓"; }
.ex-badge.is-flag { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ex-badge.is-flag::before { content: "!"; font-weight: 700; }
.ex-lines { margin: 0; padding: 0; list-style: none; }
.ex-lines li { position: relative; padding: 7px 0 7px 18px; border-bottom: 1px solid #ecedea; }
.ex-lines li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 7px; height: 4px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }
.ex-result-text { color: var(--ink); }
.ex-foot { color: var(--muted); font-size: 12px; }
.ex-hold { padding: 9px 11px; border-radius: 8px; background: #f0f1ee; box-shadow: inset 2px 0 0 var(--ink); font-size: 12.5px; }
.ex-total { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.ex-total b { color: var(--ink); font-size: 44px; font-weight: 400; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ex-result > * { opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease); }
.is-result .ex-result > * { opacity: 1; transform: none; }
.is-result .ex-result > :nth-child(2) { transition-delay: .12s; }
.is-result .ex-result > :nth-child(3) { transition-delay: .24s; }
.is-result .ex-result > :nth-child(4) { transition-delay: .36s; }

/* The person who checks it */
.ex-review { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px 22px; border-top: 1px solid #ecedea; background: #fff; color: #6b6e6c; transition: color .4s; }
.ex-portrait { display: block; flex: none; width: 34px; height: 34px; border-radius: 50%; filter: grayscale(1); opacity: .55; transition: filter .5s, opacity .5s; }
.ex-review > span:not(.ex-portrait) { flex: 1 1 12em; }
.ex-review strong { display: block; font-weight: 500; }
.ex-review small { display: block; font-size: 12px; }
.ex-review em { position: relative; margin-left: auto; padding: 7px 15px; border-radius: 20px; background: #eceeeb; font-style: normal; font-size: 12.5px; white-space: nowrap; transition: background .4s, color .4s; }
.is-review .ex-review { color: var(--ink); }
.is-review .ex-review small { color: var(--muted); }
.is-review .ex-portrait { filter: none; opacity: 1; }
.is-review .ex-review em { background: var(--ink); color: #fff; }
.is-review .ex-review em { animation: ex-halo 1.8s ease-out 3; }
@keyframes ex-halo { 0% { box-shadow: 0 0 0 0 rgba(25, 26, 27, .35); } 100% { box-shadow: 0 0 0 10px rgba(25, 26, 27, 0); } }
.is-problem.is-review .ex-review em { background: #fff; color: var(--ink); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.ex-window.is-instant *, .ex-window.is-instant *::before, .ex-window.is-instant *::after { transition: none !important; animation: none !important; }
.motion-paused .ex-time *, .motion-paused .ex-switch *, .motion-paused .ex-replay-icon { transition: none !important; }

/* Mid-sized windows: what arrives and what happens side by side, the result full width below */
@container (min-width: 721px) and (max-width: 900px) {
  .ex-flow { grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1.12fr); row-gap: 22px; }
  .ex-flow > .ex-link:nth-of-type(2) { display: none; }
  .ex-flow > .ex-col:last-child { grid-column: 1 / -1; }
}

/* Narrow windows: the three columns stack, joined by downward arrows */
@container (max-width: 720px) {
  .ex-flow { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 20px; }
  .ex-link { justify-self: center; width: 1px; height: 30px; margin: 8px 0; background: repeating-linear-gradient(#b9bdbc 0 4px, transparent 4px 8px); }
  .ex-link::before { transform: scaleY(0); transform-origin: top; }
  .is-link-1 .ex-link:nth-of-type(1)::before, .is-link-2 .ex-link:nth-of-type(2)::before { transform: scaleY(1); }
  .ex-link::after { right: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  .ex-review { flex-wrap: wrap; padding: 13px 16px; }
  .ex-bar .xi-dots { display: none; }
  .ex-bar strong, .ex-status { white-space: nowrap; }
  .ex-bar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* Built around your version of the task */
.ex-context { display: grid; grid-template-columns: minmax(0, .38fr) minmax(0, .62fr); gap: 9%; padding-block: 85px; border-top: 1px solid var(--rule); }
.ex-context-lead { max-width: 52ch; color: var(--muted); }
.ex-context-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin: 36px 0 34px; padding: 0; list-style: none; }
.ex-context-list li { padding-top: 18px; border-top: 1px solid var(--ink); }
.ex-context-list span { color: var(--muted); font-size: 12px; }
.ex-context-list h3 { margin: 22px 0 10px; font-size: 20px; text-wrap: balance; min-height: 2.3em; line-height: 1.15; letter-spacing: -.02em; }
.ex-context-list p { color: var(--muted); font-size: 15px; }

@media (max-width: 1000px) {
  .ex-head { grid-template-columns: 1fr; gap: 24px; }
  .ex-context-list { grid-template-columns: 1fr; gap: 0; }
  .ex-context-list li { display: grid; grid-template-columns: 40px 1fr; padding-block: 18px 20px; }
  .ex-context-list li > * { grid-column: 2; }
  .ex-context-list span { grid-column: 1; grid-row: 1 / 3; }
  .ex-context-list h3 { min-height: 0; margin-top: 0; }
}
@media (max-width: 760px) {
  .ex-demo, .ex-context { padding-block: 64px; }
  .ex-context { grid-template-columns: 1fr; gap: 26px; }
  .ex-time { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px 14px; width: 100%; }
  .ex-time-label { grid-column: 1 / -1; max-width: none; }
  .ex-arrow { width: 22px; }
  .ex-time b { font-size: 24px; }
  .ex-stage { margin-top: 32px; padding: 14px 10px 18px; border-radius: 14px; }
  .ex-tools { padding-inline: 4px; }
}
