/* ==========================================================================
   INTERFACES — tabbed showcase (both homepages)
   --------------------------------------------------------------------------
   Three tabs on the left (Desktop selected by default), each the live
   site's card copy verbatim; on the right a stage showing that interface:
     Desktop   the Unlock desktop app, rebuilt from the product screenshot the
               user supplied (29 Sep): sidebar, "Describe a task…" prompt,
               Auto / Default / Local / Medium toolbar. Personal session
               titles and the account name are placeholder bars.
     Terminal  a macOS Terminal window printing the section's EX-104 record.
     Slack     a Slack window where the Unlock app posts the same record.
   The EX-104 copy (Customer identity service, Add customer-data exports,
   Requirement / Finding / Human gate) is the live section's demo panel,
   moved into the mockups. assets/js/interfaces.js runs the tabs.

   Scaling: every mockup length is in em, and .interfaces__stage sets the em from
   its own width (container query units), so each window scales as one
   picture from desktop to phone instead of reflowing.
   ========================================================================== */

.interfaces {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
  margin-top: var(--space-8);
}

/* ---------------------------------------------------------------- tabs */
/* Unselected tabs are quiet title rows. The selected tab lifts into a white
   card (thin border, soft shadow) with a small accent square before its
   title — the same marker as the module tour's list — and only it shows its
   description, which slides open (grid-rows 0fr → 1fr). */
.interfaces__tabs { display: grid; gap: 6px; }
.interfaces__tab {
  display: grid;
  width: 100%;
  padding: 16px 20px;
  border: var(--border-w) solid transparent;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background var(--motion-base) var(--motion-ease), border-color var(--motion-base) var(--motion-ease),
              box-shadow var(--motion-base) var(--motion-ease);
}
.interfaces__tab h4 {
  position: relative;
  padding-left: 18px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink-muted);
  transition: color 200ms var(--motion-ease);
}
.interfaces__tab h4::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 7px; height: 7px;
  translate: 0 -50%;
  background: var(--accent-text);   /* Sage B900: the selected tab (4 Nov; was the Ember gate role) */
  opacity: 0;
  scale: 0.4;
  transition: opacity var(--motion-base) var(--motion-ease), scale var(--motion-base) var(--motion-ease);
}
.interfaces__tab:hover h4 { color: var(--heading); }
.interfaces__tab[aria-selected="true"] {
  border-color: var(--line);
  background: var(--white);
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--grey-900) 30%, transparent);
  cursor: default;
}
.interfaces__tab[aria-selected="true"] h4 { color: var(--heading); }
.interfaces__tab[aria-selected="true"] h4::before { opacity: 1; scale: 1; }
.interfaces__tab:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.interfaces__description {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--motion-base) var(--motion-ease);
}
.interfaces__description p {
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding-left: 18px;
  font-size: var(--size-body);
  line-height: 1.55;
  color: var(--ink);
  opacity: 0;
  transition: opacity var(--motion-base) var(--motion-ease), padding-top var(--motion-base) var(--motion-ease);
}
.interfaces__tab[aria-selected="true"] .interfaces__description { grid-template-rows: 1fr; }
.interfaces__tab[aria-selected="true"] .interfaces__description p { padding-top: 8px; opacity: 1; transition-delay: 0s, 0s; }
@media (prefers-reduced-motion: reduce) {
  .interfaces__tab, .interfaces__tab h4, .interfaces__tab h4::before, .interfaces__description, .interfaces__description p { transition: none; }
}
/* One link for the whole section, under the lede (2 Nov; it sat in the box
   and read the same under every tab). */
.interfaces__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-4);
  font-size: var(--size-body);
  color: var(--accent-text, var(--accent));
  text-decoration: none;
}
.interfaces__more:hover { opacity: 0.75; }

/* --------------------------------------------------------------- stage */
/* Each panel is its own gradient field (ember / sage / teal — the palette's
   illustration hues) with the window pinned to the bottom-right corner:
   the gradient shows above and to the left, and the window runs off the
   right and bottom edges, as on unkey.com. */
.interfaces__stage {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  border: var(--border-w) solid var(--line);
  background: var(--ground);
}
.interfaces__panel {
  position: absolute;
  inset: 0;
  font-size: 1.36cqw;                 /* ≈ 12px at an 880px stage */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--motion-base) var(--motion-ease), visibility 0s linear var(--motion-base);
}
.interfaces__panel.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--motion-base) var(--motion-ease), visibility 0s;
}
.interfaces__panel > .win {
  position: absolute;
  top: 10%;
  left: 9%;
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  translate: 2% 3%;
  transition: translate var(--motion-base) var(--motion-ease);
}
.interfaces__panel.is-active > .win { translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .interfaces__panel, .interfaces__panel > .win { transition: none; translate: 0 0; }
}

/* The three fields: a clean vertical ramp, deep at the top and light at
   the bottom, as on the reference. */
#ifx-panel-desktop  { background: linear-gradient(180deg, var(--ember-orange-ink) 0%, var(--ill-flame) 34%, var(--ill-ember) 68%, var(--ill-butter) 100%); }
#ifx-panel-terminal { background: linear-gradient(180deg, var(--sage-forest) 0%, var(--sage-ink) 38%, var(--ill-jade) 68%, var(--ill-lime) 100%); }
#ifx-panel-slack    { background: linear-gradient(180deg, var(--deep-teal) 0%, var(--ill-jade) 38%, var(--ill-teal) 70%, var(--mint) 100%); }

/* ------------------------------------------------------- shared window */
.win {
  display: grid;
  grid-template-rows: auto 1fr;
  aspect-ratio: 16 / 10.4;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--grey-900) 16%, transparent);
  box-shadow: 0 2.4em 5em -2em color-mix(in srgb, var(--grey-900) 35%, transparent),
              0 0.3em 1em -0.4em color-mix(in srgb, var(--grey-900) 20%, transparent);
  font-family: var(--font-body);
  line-height: 1.3;
}
.win svg.icon { --icon-size: 1.15em; flex: none; }
.win__bar {
  display: flex;
  align-items: center;
  gap: 0.6em;
  height: 2.6em;
  padding: 0 1em;
}
.win__lights { display: flex; gap: 0.55em; }
.win__lights i { width: 0.95em; height: 0.95em; border-radius: 50%; }
.win__lights i:nth-child(1) { background: var(--mac-close); }
.win__lights i:nth-child(2) { background: var(--mac-min); }
.win__lights i:nth-child(3) { background: var(--mac-zoom); }
.win__title { font-weight: 600; }
.skeleton { display: block; height: 0.62em; background: currentColor; opacity: 0.14; }

/* ---------------------------------------------------- Desktop (Unlock app) */
.app { background: var(--paper); color: var(--grey-900); }
.app .win__bar { background: color-mix(in srgb, var(--grey-900) 3%, var(--paper)); border-bottom: 1px solid color-mix(in srgb, var(--grey-900) 8%, var(--paper)); }
/* A browser's bar (1 Dec, user: the product runs in the browser, Rohit's note
   meant "the menu bar or url thing at top"): back, forward and reload, then
   the address in a quiet field with its lock, where the app's title stood */
.win__bar--browser { gap: 0; }
.win__nav { display: flex; align-items: center; gap: 0.8em; margin-left: 1.4em; color: color-mix(in srgb, var(--grey-900) 42%, var(--paper)); }
.win__nav .icon { --icon-size: 1.05em; }
.win__url {
  flex: 1; max-width: 34em; display: flex; align-items: center; gap: 0.45em;
  height: 1.85em; margin-left: 1.2em; padding: 0 0.75em; border-radius: 0.5em;
  background: color-mix(in srgb, var(--grey-900) 5%, var(--paper));
  color: color-mix(in srgb, var(--grey-900) 78%, var(--paper)); font-size: 0.95em; white-space: nowrap; overflow: hidden;
}
.win__url .icon { --icon-size: 1em; color: color-mix(in srgb, var(--grey-900) 45%, var(--paper)); }
.app__body { display: grid; grid-template-columns: 22em 1fr; min-height: 0; }
.app__side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: color-mix(in srgb, var(--grey-900) 4%, var(--paper));
  border-right: 1px solid color-mix(in srgb, var(--grey-900) 8%, var(--paper));
}
.app__brand { display: flex; align-items: center; gap: 0.6em; padding: 1em 1.1em 0.8em; font-size: 1.15em; font-weight: 600; }
/* The app's logo: the Unlock.ai lockup itself, mark and drawn wordmark
   (a copy of the footer's, so logo-variations.py --site redraws it), in the
   light pair — near-black, the centre and .ai in Sage B900 (15 Nov, user:
   "use correct logo and wordmark"; the mark and typed text, and a cream
   mark on a black square, before). */
.app__brand { color: var(--ember-black); --logo-in: var(--sage-ink); }
.app__brand .wordmark__logo.app__lockup { height: round(1.5em, 1px); width: auto; }
.app__brand .icon { margin-left: auto; color: var(--grey-500); }
.app__nav { display: grid; gap: 0.1em; padding: 0 0.4em; }
.app__nav span { display: flex; align-items: center; gap: 0.7em; padding: 0.6em 0.7em; color: var(--grey-700); }
.app__nav span.is-on { background: color-mix(in srgb, var(--grey-900) 8%, var(--paper)); color: var(--grey-900); font-weight: 500; }
.app__recent {
  display: flex; justify-content: space-between; align-items: center;
  margin: 1.1em 1.1em 0.5em; padding-bottom: 0.5em;
  border-bottom: 1px solid color-mix(in srgb, var(--grey-900) 8%, var(--paper));
  font-family: var(--font-label); font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-500);
}
.app__list { display: grid; gap: 0.95em; padding: 0.5em 1.1em; color: var(--grey-700); }
.app__recent .icon { color: var(--grey-500); }
/* Recent (19 Nov, the real app's home, Rohit's shot): two sessions, cut
   with an ellipsis, then See all. 24 Nov (Rohit): the samples are the
   page's export example, and the "connectors need setup" notice went. */
.app__list span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app__list span::before { content: ''; display: inline-block; width: round(0.55em, 1px); height: round(0.55em, 1px); margin-right: round(0.8em, 1px); vertical-align: 0.05em; border: 1px solid var(--grey-500); border-radius: 50%; }
.app__list .app__all { color: var(--grey-500); }
.app__list .app__all::before { content: none; }
.app__foot { margin-top: auto; }
.app__downloads { display: flex; align-items: center; gap: 0.7em; padding: 0.8em 1.1em; border-top: 1px solid color-mix(in srgb, var(--grey-900) 8%, var(--paper)); color: var(--grey-700); }
.app__user { display: flex; align-items: center; gap: 0.7em; padding: 0.8em 1.1em; border-top: 1px solid color-mix(in srgb, var(--grey-900) 8%, var(--paper)); }
.app__user .app__avatar { display: grid; place-items: center; width: 2.2em; height: 2.2em; border: 1px solid color-mix(in srgb, var(--grey-900) 14%, var(--paper)); color: var(--grey-500); }
.app__user .skeleton { width: 8em; color: var(--grey-900); }
.app__user svg.icon.app__user-caret { --icon-size: round(0.7em, 1px); margin-left: auto; color: var(--grey-500); }
.app__main {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.3em;
  padding: 2em;
  background:
    linear-gradient(color-mix(in srgb, var(--grey-900) 3%, transparent) 1px, transparent 1px) 0 0 / 2.2em 2.2em,
    linear-gradient(90deg, color-mix(in srgb, var(--grey-900) 3%, transparent) 1px, transparent 1px) 0 0 / 2.2em 2.2em,
    var(--paper);
}
.app__ask { font-size: 1.2em; color: var(--grey-800, var(--grey-900)); }

/* The window runs off the stage's right edge (9% of it), so the main area
   is centred on the part that shows: extra padding at its right, the
   composer 32em (38 before), so Default and send stay in view. */
.interfaces--columns .app__main { padding-right: 8.6em; }

/* The composer, as the real app's home (19 Nov, Rohit's shot of it; the
   15 Nov card with a plus and a Local switch, after affectui.com, is in
   web/versions/before-rohit-19-nov/): one white card for the prompt, the
   paperclip, microphone and send at its bottom right; under it the Auto,
   Default and Medium pickers; then three suggestions (the last a playbook,
   its icon in Sage B900) and More ideas. The placeholder types itself out
   with a caret (interfaces.js; the same line, nothing can be typed); the
   card, pickers, suggestions and sidebar rows tint on hover, with a
   pointer only. Lengths in em, so it all scales with the window. */
.app__prompt { width: 32em; }
.app__prompt .app__box {
  display: grid; gap: 0.5em;
  padding: 0.95em 0.7em 0.7em;
  border: 1px solid color-mix(in srgb, var(--grey-900) 13%, var(--paper));
  border-radius: 0.75em;
  background: var(--white);
  color: var(--grey-500);
  box-shadow: 0 0.06em 0.12em color-mix(in srgb, var(--grey-900) 5%, transparent),
              0 0.5em 1.4em -0.7em color-mix(in srgb, var(--grey-900) 18%, transparent);
  transition: border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease);
}
.app__input { min-height: 2.9em; padding: 0 0.4em; line-height: 1.45; }
.app__caret {
  display: inline-block; width: 0.08em; height: 1.15em; margin-left: 0.06em; vertical-align: -0.22em;
  background: var(--grey-900); animation: term-blink 1.1s steps(1) infinite;
}
.app__box.is-typing .app__caret { animation: none; }
.app__bar { display: flex; align-items: center; gap: 0.15em; }
.app__bar-end { display: flex; align-items: center; gap: 0.35em; margin-left: auto; }
.app__tool {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.38em 0.55em; border-radius: 0.45em;
  color: var(--grey-700); font-size: 0.95em; white-space: nowrap;
  transition: background-color var(--motion-base) var(--motion-ease), color var(--motion-base) var(--motion-ease);
}
.app__tool--icon { padding: 0.38em; }
.app__tool .chevron { color: var(--grey-500); transition: color var(--motion-base) var(--motion-ease); }
.app__tool svg.icon.chevron { --icon-size: round(0.9em, 1px); }   /* outranks .win svg.icon, so the carets sit smaller than the icons */
.app__prompt .app__send {
  display: grid; place-items: center; width: 2.1em; height: 2.1em; margin-left: 0.15em;
  border-radius: 0.5em;
  background: color-mix(in srgb, var(--grey-900) 6%, var(--paper)); color: var(--grey-500);
}
.app__pickers { display: flex; gap: 0.3em; margin-top: 0.45em; }
.app__pickers .app__tool { font-size: 0.88em; font-weight: 500; }
.app__ideas { display: grid; justify-items: start; gap: 0.35em; margin-top: 1.4em; color: var(--grey-800, var(--grey-900)); }
.app__idea { display: inline-flex; align-items: center; gap: 0.6em; margin: 0 -0.5em; padding: 0.3em 0.5em; border-radius: 0.4em; transition: background-color var(--motion-base) var(--motion-ease); }
.app__idea .icon { color: var(--grey-500); }
/* .app__idea--playbook (its icon in Sage B900, for the app's blue playbook icon) removed 26 Nov, user: all three suggestion icons neutral */
.app__more { margin-top: 0.2em; color: var(--sage-ink); }
.app__nav span, .app__list span { border-radius: 0.4em; transition: background-color var(--motion-base) var(--motion-ease); }
.app__list span { margin: -0.3em -0.5em; padding: 0.3em 0.5em; }
@media (hover: hover) {
  .app__prompt .app__box:hover { border-color: color-mix(in srgb, var(--grey-900) 22%, var(--paper));
    box-shadow: 0 0.06em 0.12em color-mix(in srgb, var(--grey-900) 7%, transparent), 0 0.7em 1.8em -0.7em color-mix(in srgb, var(--grey-900) 24%, transparent); }
  .app__tool:hover, .app__idea:hover { background: color-mix(in srgb, var(--grey-900) 7%, var(--paper)); color: var(--grey-900); cursor: pointer; }
  .app__tool:hover .chevron { color: var(--grey-900); }
  .app__nav span:not(.is-on):hover, .app__list span:hover { background: color-mix(in srgb, var(--grey-900) 5%, var(--paper)); color: var(--grey-900); cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) { .app__caret { animation: none; } }

/* -------------------------------------------------------- Terminal */
.term { background: var(--term-bg); color: var(--term-text); }
.term .win__bar { background: var(--term-bar); justify-content: space-between; color: var(--term-dim); }
.term .win__title { position: absolute; left: 50%; translate: -50% 0; font-weight: 500; font-size: 0.95em; }
.term .win__bar { position: relative; }
.term__body {
  padding: 1.2em 1.5em;
  font-family: var(--font-mono);
  font-size: 1.05em;
  line-height: 1.75;
  white-space: pre;
  overflow: hidden;
}
.term__body .term__prompt  { color: var(--ill-sage); }
.term__body .term__path  { color: var(--ill-teal); }
.term__body .term__muted  { color: var(--term-dim); }
.term__body .term__heading  { color: var(--term-text); font-weight: 600; }
.term__body .term__ref  { color: var(--ill-ember); }
.term__body .term__cursor { display: inline-block; width: 0.6em; height: 1.15em; vertical-align: -0.2em; background: var(--term-text); animation: term-blink 1.1s steps(1) infinite; }
@keyframes term-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term__body .term__cursor { animation: none; } }

/* -------------------------------------------------------- Slack */
.slack { background: var(--white); color: var(--slack-text); font-family: "Lato", var(--font-body); }   /* Lato, Slack's own face, in this mockup only (15 Nov, user; an agreed exception, as IBM Plex Mono is for code in screenshots) */
.slack .win__bar { background: var(--slack-aubergine-2); color: var(--white); }
.slack__search { flex: 0 1 34em; margin: 0 auto; display: flex; align-items: center; gap: 0.6em; height: 1.75em; padding: 0 0.8em; background: color-mix(in srgb, var(--white) 18%, var(--slack-aubergine-2)); color: color-mix(in srgb, var(--white) 70%, transparent); border-radius: 0.4em; }
.slack__search .skeleton { width: 9em; color: var(--white); opacity: 0.35; }
.slack__body { display: grid; grid-template-columns: 17em 1fr; min-height: 0; }
.slack__side { background: var(--slack-aubergine); color: color-mix(in srgb, var(--white) 72%, transparent); padding: 1em 0.6em; display: grid; align-content: start; gap: 0.25em; }
.slack__workspace { display: flex; align-items: center; gap: 0.6em; padding: 0 0.6em 0.9em; color: var(--white); font-weight: 700; font-size: 1.1em; }
.slack__workspace .skeleton { width: 6em; color: var(--white); opacity: 0.5; height: 0.75em; }
.slack__section { padding: 0.7em 0.6em 0.3em; font-size: 0.92em; }
.slack__section .skeleton { width: 5em; color: var(--white); opacity: 0.3; }
.slack__channel { display: flex; align-items: center; gap: 0.5em; padding: 0.35em 0.6em; border-radius: 0.35em; }
.slack__channel .icon { --icon-size: 1em; opacity: 0.8; }
.slack__channel .skeleton { flex: 1; max-width: var(--w, 60%); color: var(--white); opacity: 0.28; }
.slack__channel.is-on { background: var(--slack-active); color: var(--white); }
.slack__main { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.slack__head { display: flex; align-items: center; gap: 0.3em; padding: 0.9em 1.3em; border-bottom: 1px solid var(--slack-line); font-weight: 700; font-size: 1.1em; }
.slack__feed { padding: 1.2em 1.3em; display: grid; align-content: end; gap: 1.1em; overflow: hidden; }
/* Avatars 32 x 32px at the desktop scale (15 Nov, user; 2.9em, about 35px,
   before), whole pixels. */
.slack__message { display: grid; grid-template-columns: round(2.667em, 1px) 1fr; gap: 0.8em; }
.slack__avatar { width: round(2.667em, 1px); height: round(2.667em, 1px); display: grid; place-items: center; border-radius: round(0.45em, 1px); }
/* The Unlock.ai app's avatar: the Sage app icon (15 Nov, user: "a nice
   logo ... green sage gradient and white logo on it", then "too shiny";
   web/brand/assets/icon/app-icon-sage.svg, drawn by brand-assets.py): the
   mark all white on a quiet diagonal Sage gradient, B600 into B800, centred
   by eye (2 right and 2 up of its box). The dark app icon before. */
.slack__avatar--app { background: none; }
.slack__avatar--app svg { width: 100%; height: 100%; }
.slack__app-from { stop-color: var(--sage-600); }
.slack__app-to { stop-color: var(--sage-800); }
.slack__app-mark { fill: var(--white); stroke: var(--white); }
.slack__app-mark rect { stroke: none; }
.slack__avatar--ghost { background: color-mix(in srgb, var(--slack-text) 10%, var(--white)); }
/* The alerts app that raised ALERT-5512 (26 Nov, Rohit: the grey placeholder
   message became a real alert line): a neutral tile in the APP badge's
   colours with a bell, no product's branding. */
.slack__avatar--alerts { background: var(--slack-badge); color: var(--slack-badge-text); }
.slack__avatar--alerts .icon { --icon-size: 1.25em; }
.slack__text { margin: 0.25em 0 0; }
.slack__who { display: flex; align-items: center; gap: 0.5em; font-weight: 700; }
.slack__app { padding: 0.05em 0.35em; font-size: 0.72em; font-weight: 600; background: var(--slack-badge); color: var(--slack-badge-text); border-radius: 0.25em; }   /* Slack's APP badge colours (15 Nov, user) */
.slack__who .skeleton { width: 3.5em; color: var(--slack-text); height: 0.55em; }
.slack__card { margin-top: 0.6em; padding: 0.2em 0 0.2em 1em; border-left: 0.3em solid var(--accent); display: grid; gap: 0.5em; }
.slack__card small { font-size: 0.85em; color: var(--slack-muted); }
.slack__card b { font-size: 1.05em; }
.slack__card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35em 1em; margin: 0; }
.slack__card dt { color: var(--slack-muted); }
.slack__card dd { margin: 0; }
.slack__card code { font-family: var(--font-mono); font-size: 0.9em; padding: 0.05em 0.3em; background: color-mix(in srgb, var(--slack-text) 6%, var(--white)); color: var(--ember-orange-ink); border-radius: 0.2em; }
.slack__btns { display: flex; gap: 0.6em; margin-top: 0.3em; }
/* Slack's own button (89 x 36px, 14px bold, 8 x 16px padding) at the
   mockup's scale: its text is 12px where Slack's is 15px, so 0.8 of it —
   71 x 28px, 12px bold (15 Nov, user: at full size it looked too large). */
.slack__btns span {
  display: inline-flex; justify-content: center; box-sizing: border-box;
  min-width: round(5.9em, 1px);   /* the width set, the label centred */
  font-size: 1em; line-height: round(1.34em, 1px); font-weight: 700;
  padding: round(0.42em, 1px) round(1em, 1px);
  border: 1px solid var(--slack-line); border-radius: round(0.3em, 1px);
}
.slack__btns span:first-child {
  background: var(--slack-green); border-color: var(--slack-green); color: var(--white);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--slack-text) 10%, transparent);
  transition: background-color var(--motion-base) var(--motion-ease), border-color var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease);
}
@media (hover: hover) {   /* a step darker, as Slack's own buttons (15 Nov, user) */
  .slack__btns span:first-child:hover {
    background: color-mix(in srgb, var(--slack-green) 84%, var(--slack-text)); border-color: color-mix(in srgb, var(--slack-green) 84%, var(--slack-text));
    box-shadow: 0 1px 3px color-mix(in srgb, var(--slack-text) 22%, transparent); cursor: pointer;
  }
}
.slack__ghost { display: grid; gap: 0.5em; padding-top: 0.2em; }
.slack__ghost .skeleton { color: var(--slack-text); }
.slack__compose { margin: 0 1.3em 1.1em; border: 1px solid color-mix(in srgb, var(--slack-text) 25%, var(--white)); border-radius: 0.55em; padding: 0.8em 1em; display: flex; align-items: center; gap: 0.8em; color: var(--slack-muted); }
.slack__compose .skeleton { width: 12em; color: var(--slack-text); }
.slack__compose .icon:last-child { margin-left: auto; }

.interfaces__caption { display: none; margin: 12px 0 0; font-size: var(--size-body); line-height: 1.55; color: var(--ink); }

/* --------------------------------------------------------- phones */
@media (max-width: 900px) {
  .interfaces { grid-template-columns: 1fr; gap: var(--space-6); margin-top: var(--space-6); }
  .interfaces__tabs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
  .interfaces__tab { padding: 10px 8px; justify-items: center; text-align: center; }
  .interfaces__tab h4 { padding-left: 0; font-size: 15px; font-family: var(--font-body); font-weight: 500; }
  .interfaces__tab h4::before { display: none; }
  .interfaces__description { display: none; }
  .interfaces__caption { display: block; }
}

/* Colour on the light band (5 Nov, user): a faint green field rises behind
   the copy side, picking up the desktop screenshot's backdrop. */
.interfaces__side { position: relative; isolation: isolate; overflow: hidden; }
.interfaces__side::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 60% at 0% 100%, color-mix(in srgb, var(--ill-lime) 30%, transparent), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, color-mix(in srgb, var(--ill-teal) 18%, transparent), transparent 70%);
}

/* ==========================================================================
   COLUMNS (14 Nov, user: after coderabbit.ai's hero cards — "on hover
   things change, interfaces illustration get more focus"). Three columns
   in one bordered row. The open one grows to 3.5 parts of 5.5 and shows
   its line and its mockup in full; the other two narrow to one part each
   and show a dimmed slice of theirs. Every stage is drawn at the open
   width, so a narrow column crops its mockup rather than squeezing it.
   interfaces.js opens a column on hover (focus or click too); purely
   hover, no play-through or progress line (14 Nov, user). Phones: the
   three stacked, all open. The tabs over one box before:
   web/versions/before-interfaces-columns/.
   ========================================================================== */
.interfaces--columns {
  --open-share: calc(3.5 / 5.5);
  display: flex; gap: 0;
  margin-top: var(--space-7);
  container-type: inline-size;
  border: var(--border-w) solid var(--line); border-radius: var(--r-box, 6px);
  overflow: hidden;
}
.interfaces__column {
  position: relative; display: flex; flex-direction: column;
  flex: 1 1 0; min-width: 0; overflow: hidden;
  border-left: var(--border-w) solid var(--line);
  cursor: pointer;
  transition: flex-grow 500ms var(--motion-ease-out);
}
.interfaces__column:first-child { border-left: 0; }
.interfaces__column.is-open { flex-grow: 3.5; cursor: default; }

/* The head (14 Nov, user: "improve the formatting", then "let the second
   line be in lighter color"): Inter 16, the name in weight 500 on the first
   line, its line (the former panel heading, unchanged) under it, all of it
   in the muted colour. The line shows only while open. Every head is as
   tall in every column (two lines from 1200px, three below, where the
   longest line wraps) and keeps the open width, so nothing reflows as a
   column narrows; a narrow column clips it. */
.interfaces__head {
  position: relative; display: flex; align-items: flex-start;
  width: calc(100cqw * var(--open-share));
  min-height: calc(2lh + 2 * var(--space-4));
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-w) solid var(--line);
  font-size: var(--size-body); line-height: 1.5;
}
.interfaces__head > div { min-width: 0; }
.interfaces__toggle {
  display: block; margin: 0; padding: 0; border: 0; background: none; cursor: inherit;
  font: 500 var(--size-body)/1.5 var(--font-body); color: var(--ink-muted);
  transition: color var(--motion-base) var(--motion-ease);
}
.interfaces__column.is-open .interfaces__toggle { color: var(--heading); }
.interfaces__toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }
.interfaces__line {
  display: block; margin: 0;
  font: 400 var(--size-body)/1.5 var(--font-body); letter-spacing: 0; color: var(--ink-muted);
  opacity: 0;
  transition: opacity var(--motion-base) var(--motion-ease);
}
.interfaces__line .h-quiet { color: inherit; }
.interfaces__column.is-open .interfaces__line { opacity: 1; transition-delay: 200ms; }
@media (max-width: 1199px) { .interfaces__head { min-height: calc(3lh + 2 * var(--space-4)); } }

/* The stage: the mockup on its field, drawn at the open width. */
.interfaces--columns .interfaces__stage {
  flex: none;
  width: calc(100cqw * var(--open-share));
  aspect-ratio: 16 / 10.5;   /* as the boxed stage: 16 / 9 cut the Slack card short */
  border: 0; border-radius: 0;
  opacity: 0.5;
  transition: opacity 500ms var(--motion-ease-out);
}
.interfaces--columns .interfaces__column.is-open .interfaces__stage { opacity: 1; }
/* Hover only where there is a pointer and the columns sit side by side:
   a tap on a phone sets :hover and left a stacked mockup dimmed (14 Nov,
   user). */
@media (hover: hover) and (min-width: 900px) {
  .interfaces__column:hover .interfaces__toggle { color: var(--heading); }
  .interfaces--columns .interfaces__column:not(.is-open):hover .interfaces__stage { opacity: 0.7; }
}
.interfaces--columns .interfaces__panel { opacity: 1; visibility: visible; transition: none; }
/* Sharp text and icons (15 Nov, user: the sidebar looked soft): the em
   comes from the stage's width, so it landed between pixels (11.89px), and
   so did the window's offset and every icon. Each is rounded to a whole
   pixel. */
.interfaces--columns .interfaces__panel { font-size: round(1.36cqw, 1px); }
.interfaces--columns .interfaces__panel > .win { top: round(10%, 1px); left: round(9%, 1px); }
:where(.interfaces--columns) .win svg.icon { --icon-size: round(1.15em, 1px); }   /* same weight as the base rule above, so the smaller icons keep theirs */
/* The sidebar's spacing on whole pixels too, so its icons and labels start
   on a pixel (its rows were 4.8px and 8.4px in). */
.interfaces--columns .app__nav { gap: round(0.1em, 1px); padding: 0 round(0.4em, 1px); }
.interfaces--columns .app__nav span { gap: round(0.7em, 1px); padding: round(0.6em, 1px) round(0.7em, 1px); }
.interfaces--columns .app__brand { gap: round(0.6em, 1px); padding: round(1em, 1px) round(1.1em, 1px) round(0.8em, 1px); }
.interfaces--columns .app__list { gap: round(0.95em, 1px); padding: round(0.5em, 1px) round(1.1em, 1px); }
.interfaces--columns .app__list span { gap: round(0.8em, 1px); }
/* will-change keeps each window on its own layer at rest as well as while it
   slides, so the browser doesn't redraw it when a column settles: that
   redraw snapped the Slack avatar a pixel against its name (15 Nov, user:
   "only this element moves"). */
.interfaces--columns .interfaces__panel > .win { translate: 2% 3%; transition: translate 500ms var(--motion-ease-out); will-change: translate; }
.interfaces--columns .interfaces__column.is-open .interfaces__panel > .win { translate: 0 0; }
/* One field for all three (the CTA's Sage glow, as the boxed tabs had it),
   its light shifted a little per interface. */
.interfaces--columns :is(#ifx-panel-desktop, #ifx-panel-terminal, #ifx-panel-slack) {
  background:
    radial-gradient(70% 80% at var(--gx, 20%) var(--gy, 25%), color-mix(in srgb, var(--emerald) 34%, transparent), transparent 70%),
    radial-gradient(60% 70% at 90% 90%, color-mix(in srgb, var(--sage-ink) 40%, transparent), transparent 72%),
    color-mix(in srgb, var(--how-teal) 70%, var(--ground));
}
.interfaces--columns #ifx-panel-terminal { --gx: 50%; --gy: 15%; }
.interfaces--columns #ifx-panel-slack { --gx: 80%; --gy: 20%; }
.interfaces--columns .win { border-radius: var(--r-box, 6px) 0 0 0; overflow: hidden; }


@media (prefers-reduced-motion: reduce) {
  .interfaces__column, .interfaces--columns .interfaces__stage, .interfaces__line, .interfaces--columns .interfaces__panel > .win { transition: none; }
}

/* Phones and small tablets: the three stacked, all open, no play-through. */
@media (max-width: 899px) {
  .interfaces--columns { flex-direction: column; margin-top: var(--space-6); }
  .interfaces__column, .interfaces__column.is-open { flex: none; cursor: default; border-left: 0; border-top: var(--border-w) solid var(--line); -webkit-tap-highlight-color: transparent; }
  .interfaces__column:first-child { border-top: 0; }
  .interfaces__head { width: auto; min-height: 0; }
  .interfaces__toggle { color: var(--heading); pointer-events: none; }
  .interfaces__line { opacity: 1; }
  .interfaces--columns .interfaces__stage { width: 100%; opacity: 1; }
  .interfaces--columns .interfaces__panel > .win { translate: 0 0; }
}
@media (max-width: 640px) {
  .interfaces__head { padding: var(--space-4); }
}
