/* ─── CASE STUDY · LIVE INTERFACE TILES ───────────────────────
   Working HTML versions of the product UI, shown as framed tiles. Everything is scoped under .ci-tiles
   so nothing here leaks into the rest of the page. */

@font-face {
  font-family: "Pleo Scandi Gellix Text";
  src: url("Assets/fonts/gellix-text.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Pleo Scandi Gellix Headline";
  src: url("Assets/fonts/gellix-headline.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ─── TILE GRID ────────────────────────────────────────────── */
/* Breaks out of the 68ch text column to a wider measure, like the
   bento image it replaces. */
.ci-tiles {
  --ci-tint: #ECECF5;
  --ci-gap: 24px;
  width: min(1072px, calc(100vw - 48px));
  margin: 40px 0 0 50%;
  transform: translateX(-50%);
}
.ci-tile { margin: 0; }

/* Bento: the phone fills the left column, two smaller boxes stack on the right */
.ci-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: var(--ci-gap);
}
.ci-bento > .ci-frame--phone { grid-row: span 2; }

.ci-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 8px;
  background: var(--ci-tint);
  overflow: clip;
}
.ci-frame--phone { padding: 72px 24px 48px; }   /* clears the hint and restart row above the phone */

/* Restart: puts the prototype back to the full queue */
.ci-reload {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .6);
  color: var(--color-ink);
  cursor: pointer;
  transition: background-color .15s ease-out, scale .15s ease-out;
}
.ci-reload svg { display: block; fill: currentColor; transition: rotate .2s cubic-bezier(0.23, 1, 0.32, 1); }
.ci-reload:active { scale: .94; }
.ci-reload:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .ci-reload:hover { background: #fff; }
  .ci-reload:hover svg { rotate: -45deg; }
}

/* Hint: tells the reader the phone can be used. Plain text with a pulsing dot, on the
   same 40px row as the restart button in the opposite corner, so their centres line up. */
.ci-hint {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin: 0;
  font-size: 14px;
  color: var(--color-ink);
  white-space: nowrap;
  pointer-events: none;
}
.ci-hint-dot { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #feb6fe; }
.ci-hint-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #feb6fe; opacity: 0; animation: ci-hint-pulse 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
@keyframes ci-hint-pulse { 0% { opacity: .9; transform: scale(.6); } 70%, 100% { opacity: 0; transform: scale(1.7); } }
@media (prefers-reduced-motion: reduce) { .ci-hint-dot::after { animation: none; } }

@media (max-width: 720px) {
  .ci-tiles {
    width: auto;
    margin-left: 0;
    transform: none;
  }
  .ci-bento { grid-template-columns: minmax(0, 1fr); --ci-gap: 12px; }
  .ci-bento > .ci-frame--phone { grid-row: auto; padding-top: 64px; }
  .ci-frame { padding: 32px 16px; }
  .ci-reload { top: 12px; right: 12px; }
  .ci-hint { top: 12px; left: 16px; }
}

/* ─── SMALL PIECES: request cards and status popover ──────────
   Live versions of two pieces of the original bento image. */
.ci-cards, .ci-status {
  --ink: #212222;
  --quiet: #6b7070;
  --fill: #eef4f4;
  --fill-loud: #e1e6e6;
  --success-quiet: #b5f2cd;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --card-shadow: 0 0 0 1px rgb(0 0 0 / .03), 0 2px 6px rgb(0 0 0 / .04), 0 16px 32px -12px rgb(60 60 120 / .18);
  width: min(400px, 100%);
  font-family: "Pleo Scandi Gellix Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.ci-cards svg, .ci-status svg { display: block; fill: currentColor; }
.ci-cards button, .ci-status button { font: inherit; color: inherit; border: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: left; }
.ci-cards button:focus-visible, .ci-status button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Request cards: tap one to approve it, tap again to undo */
.ci-cards { display: flex; flex-direction: column; gap: 12px; }
.ci-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  border-radius: 16px; background: #fff; box-shadow: var(--card-shadow);
  transition: transform .15s ease, box-shadow .15s ease, scale .1s var(--ease-out);
}
.ci-card:active, .ci-status-row:active { scale: .96; }
.ci-card-ico { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fill-loud); }
.ci-card-txt { flex: 1; min-width: 0; }
.ci-card-title { display: block; font-size: 16px; line-height: 20px; }
.ci-card-sub { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; color: var(--quiet); }
.ci-card-done { flex: none; display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 999px; background: var(--success-quiet); font-size: 13px; opacity: 0; transform: scale(.9); transition: opacity .12s ease-in, transform .15s ease-in; }   /* exit: quick and quiet */
.ci-card[aria-pressed="true"] .ci-card-done { opacity: 1; transform: none; transition: opacity .15s ease-out, transform .3s linear(0, 0.093, 0.299, 0.534, 0.746, 0.908, 1.016, 1.074, 1.094, 1.09, 1.072, 1.05, 1.029, 1.012, 1.001, 0.994, 0.991, 0.991, 0.993, 0.995, 0.997, 0.999, 1, 1, 1); }   /* enter: springs in with a small overshoot */

/* Status: the request row, with its decision in a popover underneath */
.ci-status { display: flex; flex-direction: column; }
.ci-status-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  border-radius: 16px; background: #fff; box-shadow: var(--card-shadow);
  transition: box-shadow .15s ease, scale .1s var(--ease-out);
}
.ci-status-row .ci-card-txt { display: flex; flex-direction: column; align-items: flex-start; }
.ci-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; height: 24px; padding: 0 8px 0 6px; border-radius: 999px; background: var(--success-quiet); font-size: 13px; }
.ci-pop {
  position: relative; margin: 14px 0 0 32px; border-radius: 12px; background: #fff; box-shadow: var(--card-shadow);
  /* grows out of the arrow's tip, which points at the row that opened it */
  transform-origin: 41px -7px;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility 0s;
}
.ci-pop::before { content: ""; position: absolute; top: -7px; left: 34px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
/* closed: shrinks back toward the arrow, quicker and quieter than it opened */
.ci-status-row[aria-expanded="false"] + .ci-pop { opacity: 0; transform: scale(.95) translateY(-4px); visibility: hidden; transition: opacity .14s ease-in, transform .14s ease-in, visibility 0s linear .14s; }
.ci-pop-body { position: relative; display: grid; grid-template-columns: auto auto; gap: 8px 32px; padding: 14px 16px; }
.ci-pop dt { font-size: 13px; line-height: 18px; color: var(--quiet); }
.ci-pop dd { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 15px; line-height: 20px; }
.ci-pop-by { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 0 0 12px 12px; background: #f4f6f6; }
.ci-pop-by img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ci-pop-by b { display: block; font-weight: 400; font-size: 15px; line-height: 20px; }
.ci-pop-by span { display: block; font-size: 13px; line-height: 18px; color: var(--quiet); }

@media (hover: hover) and (pointer: fine) {
  .ci-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(0 0 0 / .04), 0 4px 10px rgb(0 0 0 / .05), 0 22px 40px -14px rgb(60 60 120 / .26); }
  .ci-status-row:hover { box-shadow: 0 0 0 1px rgb(0 0 0 / .04), 0 4px 10px rgb(0 0 0 / .05), 0 22px 40px -14px rgb(60 60 120 / .26); }
}
@media (prefers-reduced-motion: reduce) {
  .ci-card, .ci-status-row, .ci-card-done, .ci-pop, .ci-reload, .ci-reload svg { transition: none !important; scale: none !important; rotate: none !important; }
}

/* ─── PHONE SHELL ──────────────────────────────────────────── */
/* The phone is laid out at its real 390×844 size and scaled to the
   slot. The slot reserves the scaled size up front, so nothing moves
   when the script runs. */
.ci-phone-slot {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 410 / 864;
}
.ci-phone-scale { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

/* ─── REQUEST REVIEW ───────────────────────────────────────────
   Ported from the Request Review prototype, version B (page + buttons).
   The request opens as a pushed page; rows also swipe to decide. */
.ci-review {
  --page: #fafcfc;
  --fill: #eef4f4;
  --fill-loud: #e1e6e6;
  --pink: #feb6fe;
  --ink: #212222;
  --ink-hover: #131414;
  --quiet: #6b7070;
  --selected: #212222;
  --on-selected: #eef4f4;
  --warning-quiet: #fff790;
  --success-quiet: #b5f2cd;
  --danger-quiet: #ffb3bf;
  --sp4: 4px; --sp6: 6px; --sp8: 8px; --sp12: 12px; --sp16: 16px; --sp24: 24px; --sp28: 28px; --sp40: 40px;
  --font-headline: "Pleo Scandi Gellix Headline", "Pleo Scandi Gellix Text", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font: "Pleo Scandi Gellix Text", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --z-dim: 10; --z-snack: 15; --z-page: 20; --z-status: 30; --z-sheet-dim: 44; --z-sheet: 45; --z-keyboard: 46; --z-home: 60;
  --kb-h: 300px;
  --border-hairline: .5px;
  --elevation-lifted: 0 0 0 1px rgb(0 0 0 / .06), 0 2px 6px rgb(0 0 0 / .06), 0 18px 40px -8px rgb(0 0 0 / .18);
  --elevation-floating: 0 0 0 1px rgb(0 0 0 / .04), 0 2px 6px rgb(0 0 0 / .08), 0 10px 24px -6px rgb(0 0 0 / .18);
  --elevation-page-edge: -1px 0 0 rgb(0 0 0 / .06), -12px 0 32px rgb(0 0 0 / .08);

  position: relative; width: 390px; height: 844px; margin: 10px; border-radius: 52px; overflow: clip;
  background: var(--page);
  box-shadow: 0 0 0 10px #131414, 0 0 0 11px #3a3c3c, 0 32px 64px -12px rgba(19,20,20,0.35), 0 8px 20px rgba(19,20,20,0.18);
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.ci-review button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ci-review button:focus-visible, .ci-review textarea:focus-visible { outline: 2px solid var(--ink-hover); outline-offset: 2px; }
.ci-review svg { display: block; fill: currentColor; }
.ci-review p { margin: 0; }
.ci-review .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ci-review .status { position: absolute; inset: 0 0 auto 0; height: 54px; z-index: var(--z-status); background: var(--page); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 32px 10px 40px; font: 600 16px/20px -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }
.ci-review[data-decline] .status { background: #b0b2b2; transition: background-color .4s var(--ease-drawer); }   /* the decline dim reaches the status bar too */
.ci-review .island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; border-radius: 20px; background: #000; }
.ci-review .status-icons { display: flex; gap: 6px; align-items: center; }
.ci-review .home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: var(--ink-hover); z-index: var(--z-home); pointer-events: none; }
.ci-review .screen { position: absolute; top: 54px; left: 0; right: 0; bottom: 0; overflow: clip; background: var(--page); }

/* To-dos: the page the request opens from */
.ci-review .base { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--page); transition: transform .26s var(--ease-drawer); }
.ci-review[data-open] .base { transform: translateX(calc(-30% * (1 - var(--p, 0)))); transition-duration: .38s; }
.ci-review .header { margin: var(--sp12) 0; display: flex; flex-direction: column; gap: var(--sp12); flex: none; }
.ci-review .top { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp16); }
.ci-review .title { font-size: 30px; line-height: 36px; font-weight: 450; }
.ci-review .tabs { display: flex; gap: var(--sp28); padding: 0 var(--sp16) var(--sp8); }
.ci-review .tab { display: flex; align-items: center; gap: var(--sp12); height: 50px; padding: var(--sp4) 0; border-bottom: 4px solid transparent; font-size: 16px; line-height: 19.2px; font-weight: 450; }
.ci-review .tab[aria-selected="true"] { border-bottom-color: var(--pink); font-family: var(--font-headline); font-weight: 400; }
.ci-review .tab-label { display: inline-grid; }
.ci-review .tab-label::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-family: var(--font-headline); font-weight: 400; }   /* reserves the selected width */
.ci-review .count { display: flex; align-items: center; justify-content: center; height: 20px; min-width: 24px; padding: 0 var(--sp8); border-radius: 99999px; background: var(--fill-loud); font-size: 14px; line-height: 18.2px; font-weight: 450; font-variant-numeric: tabular-nums; }
.ci-review .tab[aria-selected="true"] .count { background: var(--pink); }

.ci-review .list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: var(--sp40); overscroll-behavior: contain; }
.ci-review .list::-webkit-scrollbar { display: none; }
.ci-review .rows { list-style: none; margin: 0; padding: 0; }
/* each row sits in a 1-row grid so it can fold away after a decision */
.ci-review .rows > li { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .26s var(--ease-drawer), opacity .16s linear; }
.ci-review .rows > li > * { min-height: 0; overflow: hidden; }
.ci-review .rows > li.leaving { grid-template-rows: 0fr; opacity: 0; }
.ci-review .rows > li.arriving { grid-template-rows: 0fr; opacity: 0; transition: none; }
.ci-review .row { position: relative; display: flex; align-items: center; width: 100%; height: 80px; padding: 0 var(--sp16); background: var(--page); text-align: left; }
.ci-review button.row { transition: background-color .12s ease-out; touch-action: pan-y; }
.ci-review button.row:active { background: var(--fill); }
.ci-review button.row:focus-visible { outline-offset: -2px; }

/* Swipe actions: the row slides, the action shows underneath on the side it uncovers.
   Grey until the swipe is far enough to count, then it takes the outcome colour and the icon grows. */
.ci-review .rows > li[data-id] > div { position: relative; }
.ci-review .swipe-bg { pointer-events: none; position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp24); background: var(--fill-loud); transition: background-color .15s linear; }
.ci-review .swipe-bg span { display: flex; align-items: center; gap: var(--sp8); font-family: var(--font-headline); font-size: 16px; line-height: 19.2px; opacity: 0; }
/* the icon follows the drag (--swipe-p: 0 → 1 up to the point the swipe counts), then sits a little larger once armed */
.ci-review .swipe-bg svg { opacity: calc(.35 + .65 * var(--swipe-p, 1)); transform: scale(calc(.7 + .3 * var(--swipe-p, 1))); transition: transform .2s var(--ease-out), opacity .15s ease-out; }
.ci-review .rows.swiping li:not([data-armed]) .swipe-bg svg { transition: none; }   /* 1:1 with the finger while dragging */
.ci-review li[data-dir="approve"] .sb-approve, .ci-review li[data-dir="decline"] .sb-decline { opacity: 1; }
.ci-review li[data-dir="approve"][data-armed] .swipe-bg { background: var(--success-quiet); }
.ci-review li[data-dir="decline"][data-armed] .swipe-bg { background: var(--danger-quiet); }
.ci-review li[data-armed] .swipe-bg svg { transform: scale(1.2); }
.ci-review .rows.swiping { user-select: none; -webkit-user-select: none; }
.ci-review li[data-dir] button.row { background: var(--page); }   /* no pressed grey while it's being dragged */

/* After a swipe: the row leaves, a snackbar confirms and offers Undo */
.ci-review .snack { position: absolute; left: var(--sp16); right: var(--sp16); bottom: 34px; z-index: var(--z-snack); display: flex; align-items: center; gap: var(--sp12); min-height: 52px; padding: var(--sp8) var(--sp8) var(--sp8) var(--sp16); border-radius: 12px; background: var(--ink); color: var(--on-selected); font-size: 14px; line-height: 18.2px; box-shadow: var(--elevation-floating); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s linear, transform .18s ease-in; }
.ci-review .snack[data-show] { opacity: 1; transform: none; pointer-events: auto; transition: opacity .2s linear, transform .26s var(--ease-out); }
.ci-review .snack p { flex: 1; }
.ci-review .snack button::before { content: ""; position: absolute; inset: -4px 0; }   /* 36 → 44 tall */
.ci-review .snack button { position: relative; flex: none; height: 36px; padding: 0 var(--sp12); border-radius: 99999px; font-family: var(--font-headline); text-decoration: underline; text-underline-offset: 3px; }
.ci-review .snack button:focus-visible { outline-color: var(--on-selected); }

.ci-review .rows > li:not(:last-child) .row::after { content: ""; position: absolute; left: var(--sp16); right: 0; bottom: 0; height: var(--border-hairline); background: var(--fill-loud); }
.ci-review .ico { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: var(--sp12); border-radius: 50%; background: var(--fill-loud); }
.ci-review .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-review .line { display: flex; align-items: center; justify-content: space-between; }
.ci-review .line.sub { margin-top: 6px; }
.ci-review .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 19.2px; font-family: var(--font-headline); font-weight: 400; }
.ci-review .amt { margin-left: var(--sp8); font-size: 16px; line-height: 19.2px; font-family: var(--font-headline); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ci-review .s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 18.2px; color: var(--quiet); }
.ci-review .badge { flex: none; display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--sp8); border-radius: 99999px; background: var(--warning-quiet); font-size: 14px; line-height: 18.2px; }
.ci-review .line .badge { margin-left: var(--sp8); max-width: 140px; }
.ci-review .empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 32px 0; }
.ci-review .empty p:first-child { text-wrap: balance; font-size: 20px; line-height: 24px; font-family: var(--font-headline); font-weight: 400; }
.ci-review .empty p + p { margin-top: var(--sp8); font-size: 16px; line-height: 19.2px; color: var(--quiet); }

/* Request page: pushed in from the right, the list parallaxes behind it.
   Back button, or swipe from the left edge to go back. */
.ci-review .dim { position: absolute; inset: 0; z-index: var(--z-dim); background: rgba(19, 20, 20, 0.12); opacity: 0; pointer-events: none; transition: opacity .26s var(--ease-drawer); }
.ci-review[data-open] .dim { opacity: calc(1 - var(--p, 0)); transition-duration: .38s; }
.ci-review .detail { position: absolute; inset: 0; z-index: var(--z-page); display: flex; flex-direction: column; background: var(--page); visibility: hidden; transform: translateX(100%); box-shadow: var(--elevation-page-edge); transition: transform .26s var(--ease-drawer), visibility 0s linear .26s; }
.ci-review[data-open] .detail { visibility: visible; transform: translateX(var(--drag, 0px)); transition: transform .38s var(--ease-drawer), visibility 0s; }
.ci-review .edge { position: absolute; left: 0; top: 0; bottom: 0; width: 20px; z-index: 2; touch-action: none; }
.ci-review.dragging .detail, .ci-review.dragging .base, .ci-review.dragging .dim { transition: none !important; }

.ci-review .d-grab { flex: none; touch-action: none; }
.ci-review .d-handle { display: none; width: 36px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--fill-loud); }
.ci-review .d-nav { position: relative; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp16); }
.ci-review .d-nav .ibtn { order: -1; }
.ci-review .ibtn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 99999px; background: var(--fill); border: 1px solid var(--fill); transition: color .12s ease-out; }
.ci-review .ibtn:active { color: var(--ink-hover); }

/* The stage holds one page per request; during a hand-off two pages overlap and animate */
.ci-review .d-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.ci-review .d-page { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; padding: 0 var(--sp16) var(--sp24); background: var(--page); will-change: transform; }
.ci-review .d-page::-webkit-scrollbar { display: none; }
.ci-review .d-page.card { border-radius: 24px; box-shadow: var(--elevation-lifted); }
.ci-review .d-count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-headline); font-size: 16px; line-height: 19.2px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity .15s linear; }
.ci-review .detail[data-state="done"] .d-count { opacity: 0; }
.ci-review .detail[data-state="done"] .d-actions { opacity: 0; pointer-events: none; }
.ci-review .d-head { display: flex; flex-direction: column; align-items: flex-start; padding: var(--sp4) 0 var(--sp24); }
.ci-review .d-title { text-wrap: balance; font-size: 30px; line-height: 36px; font-weight: 450; outline: none; }
.ci-review .d-date { margin-top: var(--sp6); font-size: 16px; line-height: 19.2px; color: var(--quiet); }
.ci-review .d-limit { font-variant-numeric: tabular-nums; }
.ci-review .d-limit .was { color: var(--quiet); }   /* the current limit, quiet; the new one reads loudest */
.ci-review .d-limit .arrow { margin: 0 var(--sp6); color: var(--quiet); }

.ci-review .d-list { margin: 0; padding: 0; }
.ci-review .d-item { display: flex; flex-direction: column; gap: var(--sp6); padding: var(--sp12) 0; }
.ci-review .d-item.has-lead { position: relative; padding-left: 52px; }   /* 40 lead + 12 gap, like the avatar */
.ci-review .d-lead { position: absolute; left: 0; top: calc(var(--sp12) + 3px); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--ink); }
.ci-review .d-item dt { font-size: 14px; line-height: 18.2px; color: var(--quiet); }
.ci-review .d-item dd { margin: 0; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }
.ci-review .d-item dd .sub { display: block; margin-top: 2px; font-size: 14px; line-height: 18.2px; color: var(--quiet); }
.ci-review .person { display: flex; align-items: center; gap: var(--sp12); }
.ci-review .avatar { flex: none; display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--fill-loud); outline: 1px solid rgb(0 0 0 / .1); outline-offset: -1px; }
.ci-review .d-note { white-space: pre-line; text-wrap: pretty; }
.ci-review .d-note.none { color: var(--quiet); }

/* Action bar: Decline / Approve */
.ci-review .d-actions { flex: none; padding: var(--sp12) var(--sp16) 34px; background: var(--page); box-shadow: 0 calc(var(--border-hairline) * -1) 0 var(--fill-loud); transition: opacity .18s linear; }
.ci-review .btns { display: flex; gap: var(--sp8); }
.ci-review .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--sp8); height: 48px; padding: 0 var(--sp16); border-radius: 99999px; font-family: var(--font-headline); font-size: 16px; line-height: 19.2px; white-space: nowrap; transition: scale .15s ease-out, background-color .15s ease-out, opacity .15s linear; }
.ci-review .btn:active { scale: .96; }
.ci-review .btn-secondary { background: var(--fill); }
.ci-review .btn-primary { background: var(--selected); color: var(--on-selected); }
.ci-review .btn[disabled] { cursor: default; }
.ci-review .btns[aria-busy="true"] .btn:not(.busy) { opacity: .4; }
.ci-review .btn .label-busy, .ci-review .btn .spin { display: none; }
.ci-review .btn.busy .label-idle { display: none; }
.ci-review .btn.busy .spin { display: block; }
.ci-review .btn.busy .label-busy { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* spinner only on screen; screen readers still hear it */
.ci-review .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ci-spin .7s linear infinite; }
@keyframes ci-spin { to { transform: rotate(360deg); } }

/* Decline sheet: rises with the keyboard as one unit, same duration, same curve */
.ci-review .ds-dim { position: absolute; inset: 0; z-index: var(--z-sheet-dim); background: rgba(19, 20, 20, 0.32); opacity: 0; pointer-events: none; transition: opacity .24s var(--ease-drawer); }
.ci-review[data-decline] .ds-dim { opacity: 1; pointer-events: auto; transition-duration: .34s; }
.ci-review .dsheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet); display: flex; flex-direction: column; padding: 0 var(--sp16); background: var(--page); border-radius: 12px 12px 0 0; transform: translateY(100%); visibility: hidden; transition: transform .24s var(--ease-drawer), visibility 0s linear .24s; }
.ci-review[data-decline] .dsheet { transform: none; visibility: visible; transition: transform .34s var(--ease-drawer), visibility 0s; }
.ci-review .dsheet .d-handle { display: block; }
.ci-review .ds-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp12); padding: var(--sp12) 0 var(--sp16); }
.ci-review .ds-head p { font-family: var(--font-headline); font-weight: 400; font-size: 20px; line-height: 24px; }
.ci-review .dsheet label { margin-bottom: var(--sp8); font-size: 14px; line-height: 18.2px; color: var(--quiet); }
.ci-review .dsheet textarea { display: block; width: 100%; height: 96px; resize: none; padding: var(--sp12); border: 0; border-top: 4px solid transparent; border-radius: 0; background: var(--fill); font: inherit; font-size: 16px; line-height: 22px; color: var(--ink); caret-color: var(--ink); }
.ci-review .dsheet textarea:focus { border-top-color: var(--pink); outline: 3px solid var(--ink-hover); outline-offset: 0; }
.ci-review .dsheet textarea::placeholder { color: var(--quiet); opacity: 1; }
.ci-review .ds-btns { padding: var(--sp16) 0; }
.ci-review .ds-kb-space { flex: none; height: var(--kb-h); }   /* the keyboard covers this part of the sheet */

/* Mock iOS keyboard: its keys really type */
.ci-review .kb { position: absolute; left: 0; right: 0; bottom: 0; height: var(--kb-h); z-index: var(--z-keyboard); background: #d1d4d9; padding: 8px 3px 0; display: flex; flex-direction: column; gap: 12px; user-select: none; -webkit-user-select: none; transform: translateY(100%); transition: transform .24s var(--ease-drawer); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }
.ci-review[data-decline] .kb { transform: none; transition: transform .34s var(--ease-drawer); }
.ci-review .kb-row { display: flex; justify-content: center; gap: 6px; }
.ci-review .kb-row.inset { padding: 0 18px; }
.ci-review .k { flex: 1; height: 42px; border-radius: 5px; background: #fff; box-shadow: 0 1px 0 #898a8d; font-size: 22px; line-height: 1; color: #000; display: flex; align-items: center; justify-content: center; }
.ci-review .k:active { background: #b3b7c0; }
.ci-review .k.mod { background: #abb0ba; flex: none; width: 44px; }
.ci-review .k.mod:active { background: #fff; }
.ci-review .k.space { font-size: 16px; }
.ci-review .k.go { flex: none; width: 96px; background: #abb0ba; font-size: 16px; }
.ci-review .k.go:active { background: #fff; }
.ci-review .kb[data-shift="on"] .k.letter { text-transform: uppercase; }
.ci-review .kb[data-shift="on"] .k.shift { background: #fff; }

/* The outcome stamp */
.ci-review .stamp { pointer-events: none; position: absolute; top: 38px; right: var(--sp16); display: flex; align-items: center; gap: var(--sp6); height: 36px; padding: 0 var(--sp12) 0 var(--sp8); border-radius: 99999px; font-family: var(--font-headline); font-size: 16px; line-height: 19.2px; }
.ci-review .stamp.approved { background: var(--success-quiet); }
.ci-review .stamp.declined { background: var(--danger-quiet); }

/* Done: nothing left in the queue */
.ci-review .outcome { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 48px var(--sp16) 48px; cursor: default; }
.ci-review .outcome-ic { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; margin-bottom: var(--sp24); background: var(--pink); }
.ci-review .outcome .tally { margin-top: var(--sp8); font-size: 16px; line-height: 22px; color: var(--quiet); text-wrap: balance; }
.ci-review .next-todos { align-self: stretch; margin-top: 40px; text-align: left; }
.ci-review .next-todos .next-label { margin-bottom: var(--sp4); font-size: 14px; line-height: 18.2px; font-weight: 450; color: var(--quiet); }
.ci-review .next-todos ul { list-style: none; margin: 0; padding: 0; }
.ci-review .todo-link { display: flex; align-items: center; gap: var(--sp12); width: 100%; min-height: 72px; padding: var(--sp12) 0; text-align: left; border-bottom: var(--border-hairline) solid var(--fill-loud); }
.ci-review .todo-link:active { opacity: .6; }
.ci-review .todo-link .ico { margin-right: 0; }
.ci-review .todo-link .txt b { font-family: var(--font-headline); font-weight: 400; font-size: 16px; line-height: 19.2px; }
.ci-review .todo-link .txt span { margin-top: var(--sp4); font-size: 14px; line-height: 18.2px; color: var(--quiet); }

/* Undo: a grey button in the header, opposite Back */
.ci-review .d-right { display: flex; align-items: center; gap: var(--sp12); }
.ci-review .nav-undo::before { content: ""; position: absolute; inset: -4px 0; }   /* 36 → 44 tall */
.ci-review .nav-undo { position: relative; transform-origin: right center; display: flex; align-items: center; gap: var(--sp6); height: 36px; padding: 0 var(--sp12) 0 10px; border-radius: 99999px; background: var(--fill); font-family: var(--font-headline); font-size: 14px; line-height: 18.2px; opacity: 0; transform: scale(.9); pointer-events: none; transition: opacity .15s linear, transform .15s var(--ease-drawer); }
.ci-review .nav-undo[data-show] { opacity: 1; transform: none; pointer-events: auto; transition: opacity .2s linear, transform .28s var(--ease-out); }
.ci-review .nav-undo:active { scale: .96; }

/* Hover: the prototype has no hover of its own (it's a phone), but on the
   page it tells mouse users the screen is live. Pointer devices only, so
   touch never gets a stuck hover. */
.ci-review .tab, .ci-review .ibtn, .ci-review .todo-link, .ci-review .k { transition: background-color .12s ease-out, border-color .12s ease-out, color .12s ease-out; }
@media (hover: hover) and (pointer: fine) {
  .ci-review button.row:hover { background: var(--fill); }
  .ci-review li[data-dir] button.row:hover { background: var(--page); }   /* not while it's being dragged */
  .ci-review .tab[aria-selected="false"]:hover { border-bottom-color: var(--fill-loud); }
  .ci-review .ibtn:hover { background: var(--fill-loud); border-color: var(--fill-loud); }
  .ci-review .btn-secondary:hover { background: var(--fill-loud); }
  .ci-review .btn-primary:hover { background: #3a3c3c; }
  .ci-review .nav-undo:hover { background: var(--fill-loud); }
  .ci-review .todo-link:hover { background: var(--fill); }
  .ci-review .snack button:hover { background: rgb(255 255 255 / .12); }
  .ci-review .k:not(.mod):not(.go):hover { background: #f2f3f5; }
}

@media (prefers-reduced-motion: reduce) {
  .ci-review *, .ci-review *::before, .ci-review *::after { transition: none !important; }
  .ci-review .spin { animation-duration: 1.6s !important; }
}

/* ─── DUO BENTO: sidebar menu + request types ─────────────────
   Two equal tiles inside Phase 01. That section switches to dark,
   so the frames use the page's glass tokens and follow the crossfade. */
.ci-tiles--duo { margin-top: 80px; --ci-chip-on: #fff; }
.is-dark-active .ci-tiles--duo { --ci-chip-on: #1A1A1A; }
.ci-bento--duo { grid-template-rows: auto; }
.ci-tiles--duo .ci-frame {
  min-height: 520px;
  background: var(--cs-glass-bg);
  box-shadow: inset 0 0 0 1px var(--cs-glass-border);
  transition: background-color 0.8s cubic-bezier(0.45, 0, 0.2, 1), box-shadow 0.8s cubic-bezier(0.45, 0, 0.2, 1);
}

.ci-menu, .ci-types {
  --ink: #212222;
  --quiet: #6b7070;
  --fill: #eef4f4;
  --fill-loud: #e1e6e6;
  --pink: #fbc9f2;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --card-shadow: 0 0 0 1px rgb(0 0 0 / .03), 0 2px 6px rgb(0 0 0 / .04), 0 16px 32px -12px rgb(0 0 0 / .35);
  font-family: "Pleo Scandi Gellix Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.ci-menu button, .ci-types button { font: inherit; color: inherit; border: 0; margin: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: left; }
.ci-menu button:focus-visible, .ci-types button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.ci-menu ul { list-style: none; margin: 0; padding: 0; }
.ci-menu .ph { font-size: 18px; flex: none; }

/* Sidebar: a slice of the web app's navigation, fading out at the bottom */
.ci-menu {
  width: min(300px, 100%);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  font-size: 16px;
  line-height: 20px;
}
.ci-menu-org { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 20px 26px; background: var(--fill); border-bottom: 1px solid var(--fill-loud); }
.ci-menu-org b { display: block; font-weight: 400; font-size: 17px; line-height: 22px; }
.ci-menu-org span span { display: block; margin-top: 4px; font-size: 15px; color: var(--ink); }
.ci-menu-switch { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; }
.ci-menu-switch .ph { font-size: 16px; }
.ci-menu-list { padding: 14px 0 18px; }
.ci-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 20px 0 28px; transition: background-color .12s ease-out; }
.ci-menu-heading { padding: 18px 28px 6px; font-size: 15px; color: var(--quiet); }
.ci-menu-caret { margin-left: auto; transition: rotate .25s var(--ease-out); }
.ci-menu-group[aria-expanded="false"] .ci-menu-caret { rotate: 180deg; }

/* Approval's children open and close with their real height */
.ci-menu-sub { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s var(--ease-out); }
.ci-menu-group[aria-expanded="false"] + .ci-menu-sub { grid-template-rows: 0fr; }
.ci-menu-sub > ul { min-height: 0; overflow: hidden; }
.ci-menu-sub .ci-menu-item { position: relative; padding-left: 56px; }
.ci-menu-sub .ci-menu-item[aria-current="page"] { background: var(--fill-loud); }
.ci-menu-sub .ci-menu-item[aria-current="page"]::before { content: ""; position: absolute; left: 42px; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: var(--ink); }
.ci-menu-count { margin-left: auto; min-width: 32px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--pink); font-size: 14px; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }

/* Request types: filter chips over the list. The list keeps the height
   of the full set, so switching filters never moves the tile. */
.ci-types { width: min(400px, 100%); }
.ci-types-title { margin: 0 0 14px; font-family: "Pleo Scandi Gellix Headline", "Pleo Scandi Gellix Text", sans-serif; font-size: 24px; line-height: 28px; font-weight: 700; color: var(--cs-ink, var(--ink)); transition: color 0.8s cubic-bezier(0.45, 0, 0.2, 1); }
.ci-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
/* Chips sit on the frame, so they take the page ink: outlined when off, filled when on */
.ci-types .ci-chip { height: 34px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(var(--cs-ink-rgb, 33, 34, 34), .25); color: var(--cs-ink, var(--ink)); font-size: 14px; transition: background-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out, scale .1s var(--ease-out); }
.ci-chip:active { scale: .96; }
.ci-types .ci-chip[aria-pressed="true"] { background: var(--cs-ink, var(--ink)); color: var(--ci-chip-on, #fff); box-shadow: none; }
.ci-types-list { display: flex; flex-direction: column; gap: 12px; min-height: 324px; }
.ci-types .ci-card { cursor: default; }
.ci-types .ci-card-ico svg { display: block; fill: currentColor; }
.ci-types-list.is-in .ci-card { animation: ci-row-in .28s var(--ease-out) both; }
.ci-types-list.is-in .ci-card:nth-child(2) { animation-delay: .03s; }
.ci-types-list.is-in .ci-card:nth-child(3) { animation-delay: .06s; }
.ci-types-list.is-in .ci-card:nth-child(4) { animation-delay: .09s; }
@keyframes ci-row-in { from { opacity: 0; transform: translateY(6px); } }

@media (hover: hover) and (pointer: fine) {
  .ci-menu-item:not([aria-current="page"]):hover { background: var(--fill); }
  .ci-types .ci-chip[aria-pressed="false"]:hover { box-shadow: inset 0 0 0 1px rgba(var(--cs-ink-rgb, 33, 34, 34), .6); }
}
@media (max-width: 720px) {
  .ci-tiles--duo { margin-top: 48px; }
  .ci-tiles--duo .ci-frame { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-menu *, .ci-types * { transition: none !important; animation: none !important; scale: none !important; }
}

/* ─── MANAGER APPROVALS: setting + approver ───────────────────
   Sits in Phase 02 on the light page, so it keeps the lilac frame
   of the first bento. */
.ci-tiles--light .ci-bento--duo .ci-frame { min-height: 380px; }

.ci-setting {
  --ink: #212222;
  --quiet: #6b7070;
  --line: #e8ebeb;
  --on: #3e7d52;
  --off: #c9cfcf;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  width: min(440px, 100%);
  font-family: "Pleo Scandi Gellix Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.ci-setting p { margin: 0; }
.ci-setting-title { margin-bottom: 14px !important; font-size: 20px; line-height: 26px; }
.ci-setting-card {
  display: flex; align-items: center; gap: 24px; padding: 20px 20px 20px 24px;
  border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 16px 32px -12px rgb(60 60 120 / .18);
}
.ci-setting-copy { flex: 1; font-size: 15px; line-height: 24px; }

/* Switch: the knob slides, the track fills; the check only shows when on */
.ci-switch {
  flex: none; position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px;
  background: var(--off); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease-out;
}
.ci-switch[aria-checked="true"] { background: var(--on); }
.ci-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ci-switch-knob {
  position: absolute; top: 3px; left: 3px; display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--on);
  box-shadow: 0 1px 2px rgb(0 0 0 / .2);
  transition: transform .25s var(--ease-out);
}
.ci-switch[aria-checked="true"] .ci-switch-knob { transform: translateX(16px); }
.ci-switch-knob svg { display: block; fill: currentColor; opacity: 0; transition: opacity .15s ease-out; }
.ci-switch[aria-checked="true"] .ci-switch-knob svg { opacity: 1; }
.ci-switch:active .ci-switch-knob { scale: .9; }

@media (max-width: 720px) {
  .ci-tiles--light .ci-bento--duo .ci-frame { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-switch, .ci-switch-knob, .ci-switch-knob svg { transition: none !important; scale: none !important; }
}

/* ─── EXPLORATIONS: one phone, three versions ─────────────────
   The phone, and beside it one rail: the version pills, then a note
   with the benefits of the version on screen, always visible.
   Phase 03 is dark, so everything takes the
   page ink and follows the crossfade, like the Phase 01 tiles. */
.ci-tiles--explore { --ci-on: #fff; --ci-shipped: #1f7a45; }
.is-dark-active .ci-tiles--explore { --ci-on: #1A1A1A; --ci-shipped: #4fd18b; }
.ci-tiles--explore .ci-frame {
  padding: 56px 40px;
  background: var(--cs-glass-bg);
  box-shadow: inset 0 0 0 1px var(--cs-glass-border);
  transition: background-color 0.8s cubic-bezier(0.45, 0, 0.2, 1), box-shadow 0.8s cubic-bezier(0.45, 0, 0.2, 1);
}
.ci-explore {
  --muted: rgba(var(--cs-ink-rgb, 33, 34, 34), .6);
  --rule: rgba(var(--cs-ink-rgb, 33, 34, 34), .2);
  display: flex;
  justify-content: center;
  align-items: flex-start;   /* top-aligned, so opening the notes never moves the phone */
  gap: 24px;
  width: 100%;
  color: var(--cs-ink, #212222);
  text-align: left;
}
.ci-explore p { margin: 0; }
.ci-explore button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.ci-explore button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.ci-explore-stage .ci-phone-slot { width: 300px; flex: none; }
/* Both versions keep only the bezel here, no drop shadow, so they look the same when switching */
.ci-tiles--explore .ci-review { box-shadow: 0 0 0 10px #131414, 0 0 0 11px #3a3c3c; }
/* The A versions: the original prototype in a frame, clipped to its phone */
.ci-proto-clip { width: 410px; height: 864px; overflow: hidden; }
.ci-proto { display: block; border: 0; background: transparent; }

/* The rail: versions, a hairline, then the notes */
.ci-rail { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: 280px; padding-top: 48px; }
.ci-rail-rule { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--rule); }

/* The note: in the rail, under the pills */
.ci-note-pop {
  box-sizing: border-box; width: 100%; padding: 18px 20px;
  border-radius: 12px; background: #fff; color: #212222;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 2px 6px rgb(0 0 0 / .08), 0 24px 48px -16px rgb(0 0 0 / .4);
}
.ci-annot-title { font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.ci-annot-verdict { display: flex; align-items: center; gap: 6px; margin-top: 10px !important; font-size: 13px; font-weight: 700; color: #6b7070; }
.ci-annot-verdict.is-chosen { color: #1f7a45; }
.ci-annot-verdict svg { display: block; fill: currentColor; }
.ci-annot-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.45; color: #3d4040; }
.ci-annot-list li { position: relative; padding-left: 16px; }
.ci-annot-list li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: #b0b5b5; }
.ci-annot-try { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid #eef0f0; font-size: 13px; color: #6b7070; }

/* Controller: the versions as a stack of pills against the phone's side */
.ci-ctrl { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ci-ctrl-title { padding: 0 4px 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ci-ctrl-btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: none; box-shadow: inset 0 0 0 1px rgba(var(--cs-ink-rgb, 33, 34, 34), .25);
  font-size: 14px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out, scale .1s cubic-bezier(0.23, 1, 0.32, 1);
}
.ci-ctrl-btn:active { scale: .96; }
.ci-ctrl-btn[aria-pressed="true"] { background: var(--cs-ink, #212222); color: var(--ci-on); box-shadow: none; }
.ci-ctrl-num { display: none; }

@media (hover: hover) and (pointer: fine) {
  .ci-ctrl-btn[aria-pressed="false"]:hover { box-shadow: inset 0 0 0 1px rgba(var(--cs-ink-rgb, 33, 34, 34), .6); }
}
/* Narrower: the rail keeps its layout and the note still opens under its button;
   the phone gives up width so the rail always fits beside it */
@media (max-width: 1000px) {
  .ci-tiles--explore .ci-frame { padding: 40px 16px 32px; }
  .ci-explore { gap: 16px; }
  .ci-rail { width: 260px; padding-top: 24px; }
  .ci-explore-stage .ci-phone-slot { width: min(300px, calc(100vw - 48px - 32px - 16px - 260px)); }
  .ci-note-pop { padding: 16px; }
}
/* Phone width: no room beside the phone for the note, so it goes below the phone, across
   the tile. The rail joins the tile's grid (display: contents) so the note can span both
   columns while the pills stay centred beside the phone. */
@media (max-width: 560px) {
  .ci-explore { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto 1fr auto; justify-content: center; gap: 0 10px; }
  .ci-explore-stage { grid-column: 1; grid-row: 1 / 4; }
  .ci-rail { display: contents; }
  .ci-ctrl { grid-column: 2; grid-row: 2; }
  .ci-rail-rule { display: none; }
  .ci-note-pop { grid-column: 1 / -1; grid-row: 4; margin-top: 16px; }
  .ci-explore-stage .ci-phone-slot { width: min(240px, calc(100vw - 64px - 10px - 104px)); }
  .ci-ctrl-title { display: none; }
  /* the labels wrap to two lines here, so the pills fit the room left beside the phone */
  .ci-ctrl-btn { height: auto; min-height: 36px; max-width: 104px; padding: 7px 12px; border-radius: 18px; font-size: 13px; line-height: 1.25; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-ctrl-btn { transition: none !important; scale: none !important; }
}
