/* /use-cases: the live examples grid and viewer (js/examples.js). Arix tokens from css/arix.css; reuses the showcase's .sc-* card parts. */
.examples { padding-top: 1rem; }
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.75rem; }
.ex-item { position: relative; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.ex-item.is-out { opacity: 0; transform: scale(0.94); }
.ex-item[hidden] { display: none; }
.ex-shot { position: relative; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--bg-sunken); cursor: pointer; box-shadow: 0 1px 0 var(--rule-soft); }
.ex-bar { display: flex; gap: 5px; align-items: center; height: 26px; padding: 0 12px; background: var(--bg-raised); border-bottom: 1px solid var(--rule); }
.ex-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.ex-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.ex-item:hover .ex-shot img, .ex-item:focus-within .ex-shot img { transform: scale(1.03); }
.ex-item:hover .sc-over, .ex-item:focus-within .sc-over { opacity: 1; }
.ex-live { position: absolute; top: 38px; left: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(11, 11, 12, 0.78); color: #fff; border-radius: var(--radius-chip); padding: 5px 10px; font: 500 0.64rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.ex-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }
.ex-live--real::before { background: var(--accent, #3b82f6); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
.ex-foot { margin: 2rem 0 0; text-align: center; font-size: 0.82rem; color: var(--ink-55); }
.ex-open:focus-visible, .ex-dev:focus-visible, .ex-newtab:focus-visible, .ex-plan:focus-visible, .ex-next-btn:focus-visible, .ex-about summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The closing call to action */
.ex-next__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: end; border-top: 1px solid var(--rule); padding-top: 2.5rem; }
.ex-next__grid h2 { margin: 0.4rem 0 0; }
.ex-next__go { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.5rem; }

/* Viewer */
.ex-viewer { position: fixed; inset: 0; z-index: 220; background: rgba(11, 11, 12, 0.55); opacity: 0; transition: opacity 0.3s var(--ease); }
.ex-viewer.on { opacity: 1; }
.ex-viewer[hidden] { display: none; }
.ex-vwrap { position: absolute; inset: clamp(0px, 2vw, 18px); display: flex; flex-direction: column; background: var(--bg); border-radius: var(--radius-card); overflow: hidden; transform: translateY(14px); transition: transform 0.45s var(--ease); }
.ex-viewer.on .ex-vwrap { transform: none; }
.ex-vtop { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 1rem 0.7rem 1.2rem; border-bottom: 1px solid var(--rule); background: var(--bg); }
.ex-vname { display: flex; align-items: baseline; gap: 0.7rem; min-width: 0; flex-wrap: wrap; }
.ex-vname h2 { margin: 0; font: 500 1.1rem/1.2 var(--font-display); }
.ex-chip { border: 1px solid var(--accent); color: var(--accent); border-radius: var(--radius-chip); padding: 3px 9px; font: 500 0.62rem/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; align-self: center; }
.ex-vsector { color: var(--ink-55); font-size: 0.82rem; }
.ex-vtools { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.ex-devs { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius-control); overflow: hidden; }
.ex-dev { appearance: none; background: none; border: 0; padding: 0.5rem 0.75rem; cursor: pointer; font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-55); }
.ex-dev + .ex-dev { border-left: 1px solid var(--rule); }
.ex-dev[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ex-newtab { font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); padding: 0.55rem 0.7rem; border: 1px solid var(--rule); border-radius: var(--radius-control); text-decoration: none; }
.ex-newtab:hover { border-color: var(--ink); }
.ex-vbody { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 340px; }
.ex-stage { position: relative; min-height: 0; background: var(--bg-sunken); display: grid; place-items: center; overflow: auto; }
.ex-device { position: relative; width: 100%; height: 100%; background: #fff; }
.ex-stage--phone .ex-device { width: 390px; height: min(780px, calc(100% - 2.5rem)); border: 10px solid var(--ink); border-radius: 36px; overflow: hidden; box-shadow: 0 20px 50px rgba(11, 11, 12, 0.25); }
.ex-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.ex-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 0.8rem; background: var(--bg-sunken); color: var(--ink-55); font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; transition: opacity 0.3s var(--ease); }
.ex-loading span { width: 26px; height: 26px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: ex-spin 0.8s linear infinite; }
.ex-loading.done { opacity: 0; pointer-events: none; }
@keyframes ex-spin { to { transform: rotate(360deg); } }
.ex-about { border-left: 1px solid var(--rule); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
.ex-about summary { list-style: none; cursor: pointer; padding: 1rem 1.2rem 0; font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-55); }
.ex-about summary::-webkit-details-marker { display: none; }
.ex-about__body { padding: 0.4rem 1.2rem 1.4rem; }
.ex-about .sc-ph { margin-top: 1.3rem; }
.ex-about .sc-tick { margin: 0; font-size: 0.9rem; color: var(--ink-70); }
.ex-about .sc-tick li { margin: 0.35rem 0; }
.ex-line { margin: 0.6rem 0 0; font-size: 1rem; }
.ex-plans { display: grid; gap: 0.45rem; margin-bottom: 1rem; }
.ex-plan { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; border: 1px solid var(--rule); border-radius: var(--radius-control); padding: 0.7rem 0.8rem; color: var(--ink); text-decoration: none; background: var(--bg-raised); font-weight: 500; transition: border-color 0.2s var(--ease); }
.ex-plan:hover { border-color: var(--accent); color: var(--accent); }
.ex-plan svg, .ex-next-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.ex-start { width: 100%; justify-content: center; }
.ex-demo { margin-top: 1.2rem; border: 1px solid var(--rule); background: var(--accent-wash); padding: 0.9rem; border-radius: var(--radius-control); }
.ex-demo p { margin: 0 0 0.7rem; font-size: 0.88rem; color: var(--ink-70); }
.ex-next-btn { appearance: none; width: 100%; margin-top: 1.4rem; display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 0.1rem 0.6rem; align-items: center; background: none; border: 0; border-top: 1px solid var(--rule); padding: 1rem 0 0; cursor: pointer; color: var(--ink); font: inherit; }
.ex-next-btn span { font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-55); grid-column: 1; }
.ex-next-btn b { grid-column: 1; font-weight: 500; }
.ex-next-btn svg { grid-column: 2; grid-row: 1 / span 2; }
.ex-next-btn:hover b { color: var(--accent); }

@media (max-width: 1100px) { .ex-grid { grid-template-columns: repeat(2, 1fr); } .ex-vbody { grid-template-columns: 1fr 300px; } }
@media (max-width: 900px) {
  .ex-vbody { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .ex-about { border-left: 0; border-top: 1px solid var(--rule); max-height: 50vh; }
  .ex-about summary { padding: 0.9rem 1.2rem; display: flex; justify-content: space-between; }
  .ex-about summary::after { content: "+"; font-size: 1rem; line-height: 0.7; }
  .ex-about[open] summary::after { content: "\2212"; }
  .ex-about[open] summary { padding-bottom: 0.2rem; }
  .ex-next__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ex-grid { grid-template-columns: 1fr; }
  .ex-vwrap { inset: 0; border-radius: 0; }
  .ex-vtop { padding: 0.6rem 0.75rem; }
  .ex-vsector, .ex-devs, .ex-newtab { display: none; }
  .ex-vname h2 { font-size: 0.98rem; }
  .ex-stage--phone .ex-device { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ex-item, .ex-viewer, .ex-vwrap, .ex-shot img { transition: none; }
  .ex-loading span { animation: none; }
}

/* ==== Shop-style cards (30 Nov 2026) ==== */
/* The page follows the shop (/products, css/arix.css "THE SHOP"): raised cards with rounded corners, the shop's artwork behind each picture, chips for filters, tighter sections. */
.examples { padding-block: clamp(2.5rem, 5vw, 4rem); }
.ex-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.ex-tools h2 { margin: 0; text-transform: uppercase; }
.examples .sc-tabs { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.4rem; margin: 0; padding: 0; border: 0; }
.examples .sc-tab { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.6rem; padding: 0 0.9rem; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--bg-raised); color: var(--ink-70); font: 500 0.875rem/1 var(--font-body); letter-spacing: 0; text-transform: none; cursor: pointer; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease); }
.examples .sc-tab::after, .examples .sc-tab::before { content: none; }
.examples .sc-tab:hover { border-color: var(--ink-40); color: var(--ink); }
.examples .sc-tab[aria-pressed="true"] { border-color: transparent; background: var(--accent-wash); color: var(--accent); font-weight: 600; }
.examples .sc-tab sup { position: static; margin: 0; font: 500 0.6875rem/1 var(--font-mono); color: var(--ink-40); vertical-align: baseline; }
.examples .sc-tab[aria-pressed="true"] sup { color: var(--accent); }
.ex-grid { gap: 1.1rem; border-top: 0; padding-top: 0; }
.ex-item { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--bg-raised); overflow: hidden; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.ex-item:hover, .ex-item:focus-within { border-color: rgba(29, 78, 216, 0.45); box-shadow: 0 30px 60px -36px rgba(29, 78, 216, 0.45); }
.ex-shot { aspect-ratio: 16 / 11; border: 0; border-radius: 0; box-shadow: none; background: var(--accent-wash); perspective: 800px; }
.ex-art { position: absolute; inset: -8%; background-size: cover; background-position: center; transition: transform 0.45s var(--ease); will-change: transform; }
.ex-win { position: absolute; left: 8%; right: 8%; top: 11%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius-control); overflow: hidden; background: #fff; box-shadow: 0 18px 40px -12px rgba(11, 11, 12, 0.5); transition: transform 0.45s var(--ease); will-change: transform; }
.ex-bar { height: 20px; padding: 0 9px; }
.ex-bar i { width: 6px; height: 6px; }
.ex-item:hover .ex-shot img, .ex-item:focus-within .ex-shot img { transform: none; }
.ex-tag { position: absolute; left: 0.6rem; top: 0.6rem; padding: 0.3rem 0.55rem; border-radius: var(--radius-chip); background: rgba(255, 255, 255, 0.92); font: 600 0.625rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.ex-live { top: 0.6rem; left: auto; right: 0.6rem; padding: 0.3rem 0.55rem; font-size: 0.625rem; }
.ex-body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; padding: 1rem 1.05rem 1.1rem; }
.ex-body .sc-cat, .ex-body .sc-title, .ex-body .sc-use { margin: 0; }
.ex-body .sc-open { font: 500 1.15rem/1.2 var(--font-display); letter-spacing: -0.015em; text-align: left; }
.ex-body .sc-use { color: var(--ink-55); font-size: 0.84rem; line-height: 1.45; }
.ex-bits { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.ex-bits span { padding: 0.2rem 0.5rem; border: 1px solid var(--rule); border-radius: var(--radius-chip); font: 500 0.625rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-70); }
.ex-go { width: 100%; margin-top: auto; padding: 0.7rem 0.9rem; }
.ex-bits + .ex-go { margin-top: auto; }
.ex-body .ex-bits { margin-bottom: 0.5rem; }
.ex-foot { margin-top: 1.5rem; }
/* The closing call to action, as a card. */
.ex-next { padding-block: clamp(2.5rem, 5vw, 4rem); }
.ex-next__grid { align-items: center; padding: clamp(1.25rem, 3vw, 2.25rem); border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--bg-raised); }
@media (max-width: 640px) { .ex-tools h2 { flex: 1 1 100%; } .examples .sc-tab { min-height: 2.75rem; } }
@media (prefers-reduced-motion: reduce) { .ex-art, .ex-win { transition: none; } }

/* The full-demo request form on agent examples (js/examples.js demoBlock): posts to the demo-request queue. */
.ex-demo-form { display: grid; gap: 0.6rem; }
.ex-demo-form__title { margin: 0 0 0.2rem !important; font-weight: 600; color: var(--ink) !important; font-size: 0.95rem !important; }
.ex-f { display: grid; gap: 0.25rem; }
.ex-f > span { font: 500 0.64rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-55); }
.ex-f input { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.9rem; padding: 0.55rem 0.65rem; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--bg-raised); color: var(--ink); }
.ex-f input:focus-visible, .ex-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ex-demo-form [aria-invalid="true"] { border-color: #b91c1c; outline-color: #b91c1c; }
.ex-f__pick { border: 0; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.ex-f__pick legend { font-size: 0.82rem; color: var(--ink-70); margin-bottom: 0.3rem; padding: 0; }
.ex-f__more summary { cursor: pointer; font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding: 0.2rem 0; }
.ex-f__group { display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.ex-f__group > span { font: 500 0.6rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-55); }
.ex-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.84rem; color: var(--ink-70); line-height: 1.35; cursor: pointer; }
.ex-check input { margin: 0.15rem 0 0; flex-shrink: 0; accent-color: var(--accent); }
.ex-check--all span { font-weight: 600; color: var(--ink); }
.ex-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ex-f__err { margin: 0 !important; color: #b91c1c !important; font-size: 0.84rem !important; }
.ex-f__err[hidden] { display: none; }
.ex-demo__done { margin: 0 !important; color: var(--ink) !important; font-weight: 500; }
/* Share beside an example's title (the shop's .shop-head and .shop-share, css/arix.css). */
.ex-body .shop-head { align-items: flex-start; }
.ex-body .shop-head .sc-title { min-width: 0; flex: 1; }
/* The title button of a card stretches over the whole card (css/arix.css .sc-open::after), so the Share button has to sit above it to take its own click. */
.ex-body .shop-share { position: relative; z-index: 2; }
/* Full screen in the viewer: the example takes the whole window, the "About this example" side panel steps away, and the button reads "Smaller screen". */
button.ex-newtab { appearance: none; background: none; cursor: pointer; }
.ex-newtab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ex-viewer.is-full .ex-vwrap { inset: 0; border-radius: 0; }
.ex-viewer.is-full .ex-vbody { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.ex-viewer.is-full .ex-about { display: none; }
.ex-viewer.is-full .ex-vsector { display: none; }
