/* "Talk to an expert" flow (demo.js): the dialog over any page, and the /demo/ page. Colors come from the site's
   tokens (styles.css), so it follows the page's skin: dark everywhere, light on themed pages. */

/* ───── dialog shell ───── */
.xd-lock { overflow: hidden; }
.xd-dialog {
  padding: 0; border: 0; margin: 0; background: transparent; color: var(--fg);
  width: 100%; height: 100%; max-width: none; max-height: none; overflow: hidden;
}
.xd-dialog[open] { display: grid; place-items: center; }
.xd-dialog::backdrop { background: rgb(0 0 0 / .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root[data-theme="light"] .xd-dialog::backdrop { background: rgb(10 12 11 / .32); }
.xd-dialog[open] .xd { animation: xd-in .32s var(--ease) both; }
.xd-dialog[open]::backdrop { animation: xd-fade .32s var(--ease) both; }
.xd-dialog.is-out .xd { animation: xd-out .18s ease-in both; }
.xd-dialog.is-out::backdrop { animation: xd-fade .18s ease-in reverse both; }
@keyframes xd-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes xd-out { to { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes xd-fade { from { opacity: 0; } }

.xd {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  width: min(980px, 100% - 48px); height: min(700px, 100svh - 48px);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px;
  box-shadow: 0 50px 120px -30px rgb(0 0 0 / calc(.75 * var(--sh))), 0 0 0 1px rgb(0 0 0 / calc(.2 * var(--sh)));
  overflow: hidden; text-align: left; font-size: 15px; line-height: 1.5;
}
.xd svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.xd [hidden] { display: none !important; }

.xd-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  color: var(--fg-2); background: rgb(var(--ink) / .06); transition: background .2s, color .2s;
}
.xd-close:hover { color: var(--fg-0); background: rgb(var(--ink) / .12); }

/* ───── main column ───── */
.xd-main { position: relative; padding: 34px 44px 36px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.xd-progress { display: flex; gap: 6px; max-width: 120px; margin-bottom: 30px; }
.xd-progress i { flex: 1; height: 3px; border-radius: 3px; background: rgb(var(--ink) / .12); transition: background .4s var(--ease); }
.xd-progress[data-at="1"] i:nth-child(-n+1), .xd-progress[data-at="2"] i:nth-child(-n+2), .xd-progress[data-at="3"] i { background: var(--accent); }

.xd-eyebrow { margin: 0 0 14px; font: 500 12.5px/1 var(--mono); color: var(--fg-2); }
.xd-title { margin: 0; font-size: 36px; line-height: 1.08; font-weight: 600; letter-spacing: -.025em; color: var(--fg-0); }
.xd-title-sm { font-size: 26px; letter-spacing: -.02em; }
.xd-sub { margin: 12px 0 0; color: var(--fg-2); font-size: 15.5px; max-width: 440px; }
.xd-sub b { color: var(--fg-0); font-weight: 600; }

.xd-label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 500; color: var(--fg-2); }
.xd-label small { font-size: 12px; font-weight: 400; color: var(--fg-3); margin-left: 4px; }
[data-s="email"] .xd-label { margin-top: 30px; }
.xd-input {
  display: block; width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--fg-0);
  background: rgb(var(--ink) / .035); border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.xd-input::placeholder { color: var(--fg-3); }
.xd-input:hover { border-color: rgb(var(--ink) / .28); }
.xd-input:focus { outline: none; border-color: var(--accent); background: rgb(var(--ink) / .05); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.xd-input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent); }
textarea.xd-input { height: auto; min-height: 70px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
select.xd-input {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238a8f8e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
select.xd-input option { background: var(--panel); color: var(--fg); }

.xd-row { display: flex; gap: 8px; }
.xd-row .xd-input { flex: 1; min-width: 0; }
.xd .xd-go { position: relative; height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.xd .xd-go svg { transition: transform .25s var(--ease); }
.xd .xd-go:hover svg { transform: translateX(2px); }
.xd .xd-go:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.xd .is-busy { color: transparent !important; pointer-events: none; }
.xd .is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--on-inv); border-right-color: transparent; animation: xd-spin .7s linear infinite;
}
.xd .btn-ghost.is-busy::after { border-color: var(--fg); border-right-color: transparent; }
@keyframes xd-spin { to { transform: rotate(1turn); } }
.xd-wide { width: 100%; margin-top: 22px; }

.xd-msg { min-height: 20px; margin: 8px 0 0; font-size: 13.5px; color: var(--fg-2); }
.xd-msg:empty { min-height: 0; margin: 0; }
.xd-msg[data-kind="error"] { color: var(--red); }
.xd-msg a, .xd-link { color: var(--fg-0); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; font: inherit; }

.xd-gets { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 11px; color: var(--fg); font-size: 14.5px; }
.xd-gets li { display: flex; align-items: center; gap: 11px; }
.xd-gets svg { width: 20px; height: 20px; padding: 4px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); stroke-width: 2.2; }
.xd-fine { margin: 26px 0 0; font-size: 12.5px; color: var(--fg-3); }
.xd-fine a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }

/* ───── details ───── */
.xd-back { display: inline-flex; align-items: center; gap: 7px; margin: -4px 0 16px; padding: 4px 0; font-size: 13.5px; color: var(--fg-2); max-width: 100%; }
.xd-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-back:hover { color: var(--fg-0); }
.xd-known {
  display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 12px 12px 14px;
  border: 1px solid var(--line-2); border-radius: 14px; background: rgb(var(--ink) / .03);
}
.xd-mono { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none; background: var(--grad); color: var(--on-inv); font-weight: 700; font-size: 16px; }
.xd-known-text { min-width: 0; }
.xd-known-text b { display: block; font-weight: 600; color: var(--fg-0); font-size: 14.5px; }
.xd-known-text span { display: block; color: var(--fg-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--fg-2); }
.xd-edit svg { width: 14px; height: 14px; }
.xd-edit:hover { color: var(--fg-0); background: rgb(var(--ink) / .06); }
.xd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 14px; margin-top: 20px; }
.xd-field { margin-top: 18px; }
.xd-grid .xd-field { margin-top: 0; }
.xd-set { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.xd-set legend { padding: 0; }
.xd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xd-chip {
  display: inline-flex; align-items: center; gap: 0; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13.5px; color: var(--fg-2);
  transition: border-color .2s, background .2s, color .2s, gap .2s var(--ease), padding .2s var(--ease);
}
.xd-chip svg { width: 0; height: 14px; stroke-width: 2.2; color: var(--accent); transition: width .2s var(--ease); }
.xd-chip:hover { border-color: rgb(var(--ink) / .3); color: var(--fg-0); }
.xd-chip[aria-pressed="true"] { gap: 6px; padding-left: 11px; color: var(--fg-0); border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.xd-chip[aria-pressed="true"] svg { width: 14px; }
.xd-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 13.5px; color: var(--fg-2); cursor: pointer; }
.xd-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
[data-s="details"] .xd-fine { margin-top: 12px; text-align: center; }

/* ───── side: proof, then the calendar ───── */
.xd-side {
  position: relative; display: flex; flex-direction: column; min-height: 0; padding: 74px 40px 36px;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(90% 70% at 105% 105%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    radial-gradient(60% 50% at 0% 0%, rgb(var(--ink) / .04), transparent 70%),
    var(--bg-1);
  overflow-y: auto; scrollbar-width: thin;
}
:root[data-theme="light"] .xd-side { background: radial-gradient(90% 70% at 105% 105%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%), var(--bg-1); }
.xd-proof { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; flex: 1; }
.xd-quotes { display: grid; }
.xd-quote { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(6px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; }
.xd-quote[data-on] { opacity: 1; transform: none; pointer-events: auto; }
.xd-quote img { display: block; height: 28px; width: auto; }
.xd-quote blockquote { margin: 22px 0 0; font-size: 19px; line-height: 1.5; letter-spacing: -.01em; color: var(--fg); text-wrap: pretty; }
.xd-dots { grid-area: 2 / 1; display: flex; gap: 6px; margin-top: 22px; }
.xd-dots button { width: 6px; height: 6px; padding: 0; border-radius: 3px; background: rgb(var(--ink) / .22); transition: width .3s var(--ease), background .3s; }
.xd-dots button[aria-pressed="true"] { width: 20px; background: var(--fg); }
.xd-trust p { margin: 0 0 16px; font-size: 13px; color: var(--fg-3); }
.xd-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; align-items: center; }
.xd-logos img { height: 32px; width: auto; max-width: 100%; opacity: .9; }
:root[data-theme="light"] .xd-logos img, :root[data-theme="light"] .xd-quote img { filter: brightness(.55); }
.xd-cal { flex: 1; display: flex; flex-direction: column; min-height: 0; margin-top: -40px; }

/* time picker (scheduler.js) */
.xd-pick { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.xd-rep { display: flex; align-items: center; gap: 12px; }
.xd-rep b { display: block; color: var(--fg-0); font-weight: 600; font-size: 15px; }
.xd-rep small { display: block; color: var(--fg-2); font-size: 12.5px; }
.xd-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; flex: none; background: var(--grad); color: var(--on-inv); font-weight: 700; font-size: 14px; }
img.xd-avatar { object-fit: cover; }
.xd-avatar-icon { background: rgb(var(--ink) / .08); color: var(--fg); }
.xd-avatar-icon svg { width: 20px; height: 20px; }
.xd-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 22px 0 14px; }
.xd-day { display: grid; justify-items: center; gap: 1px; padding: 8px 0 9px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--fg-2); transition: border-color .2s, background .2s, color .2s; }
.xd-day small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-3); }
.xd-day b { font-size: 19px; font-weight: 600; color: var(--fg); line-height: 1.2; }
.xd-day:hover { border-color: rgb(var(--ink) / .3); }
.xd-day[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.xd-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; overflow-y: auto; min-height: 120px; flex: 1; padding: 2px; scrollbar-width: thin; }
.xd-slot { height: 40px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--fg); transition: border-color .2s, background .2s, color .2s; }
.xd-slot:hover { border-color: var(--accent); }
.xd-slot[aria-pressed="true"] { background: var(--inv); border-color: var(--inv); color: var(--on-inv); font-weight: 600; }
.xd-zone { margin: 12px 0 0; font-size: 12px; color: var(--fg-3); }
.xd-book { width: 100%; margin-top: 14px; }
.xd-loading { display: grid; place-items: center; min-height: 220px; flex: 1; }
.xd-loading i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgb(var(--ink) / .14); border-top-color: var(--accent); animation: xd-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .xd-loading i { animation-duration: 2.4s; } }
.xd-cal-inline { margin-top: 20px; }
.xd-cal-inline .xd-pick-head { margin-bottom: -4px; }

/* ───── done ───── */
.xd-done:focus { outline: none; }
.xd-tick { display: grid; place-items: center; width: 56px; height: 56px; margin: 8px 0 22px; border-radius: 999px; background: var(--accent); color: #000; animation: xd-pop .5s var(--ease) both; }
.xd-tick svg { width: 26px; height: 26px; stroke-width: 2.4; stroke-dasharray: 20; stroke-dashoffset: 20; animation: xd-draw .4s .2s var(--ease) forwards; }
@keyframes xd-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes xd-draw { to { stroke-dashoffset: 0; } }
.xd-addcal { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.xd-addcal a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--fg); }
.xd-addcal a::before { content: "+"; margin-right: 6px; color: var(--accent); font-weight: 600; }
.xd-addcal a:hover { background: rgb(var(--ink) / .06); }
.xd-wait { margin-top: 34px; }
.xd-next { display: grid; gap: 10px; }
.xd-next a { position: relative; display: grid; padding: 14px 44px 14px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--fg-0); font-weight: 500; transition: background .2s, border-color .2s; }
.xd-next small { font-weight: 400; color: var(--fg-2); font-size: 13px; }
.xd-next svg { position: absolute; right: 16px; top: 50%; translate: 0 -50%; color: var(--fg-3); transition: transform .25s var(--ease), color .2s; }
.xd-next a:hover { background: rgb(var(--ink) / .04); border-color: var(--line-2); }
.xd-next a:hover svg { transform: translateX(3px); color: var(--fg-0); }
.xd-finish { margin-top: 18px; height: 44px; }

/* ───── /demo/ page ───── */
.xd.xd-page { width: auto; height: auto; min-height: 680px; box-shadow: 0 50px 120px -40px rgb(0 0 0 / calc(.6 * var(--sh))); }
.xd-page .xd-main { overflow: visible; padding: 44px 52px 48px; }
.xd-page .xd-side { padding-top: 52px; }
.xd-page .xd-cal { margin-top: 0; }
.xd-page .xd-title { font-size: 40px; }

/* ───── narrow: a full-height sheet, one column ───── */
@media (max-width: 960px) {
  .xd-input { font-size: 16px; } /* iOS zooms into anything smaller */
  .xd-dialog[open] { place-items: end center; }
  .xd { grid-template-columns: minmax(0, 1fr); width: 100%; height: calc(100svh - 10px); border-radius: 20px 20px 0 0; border-bottom: 0; overflow-y: auto; overscroll-behavior: contain; }
  .xd-dialog[open] .xd { animation-name: xd-up; }
  .xd-dialog.is-out .xd { animation-name: xd-down; }
  @keyframes xd-up { from { transform: translateY(40px); opacity: 0; } }
  @keyframes xd-down { to { transform: translateY(40px); opacity: 0; } }
  .xd-main { overflow: visible; padding: 26px 22px 30px; }
  .xd-progress { margin-bottom: 24px; }
  .xd-side { overflow: visible; padding: 30px 22px 40px; border-left: 0; border-top: 1px solid var(--line); }
  .xd[data-step="time"] .xd-side, .xd[data-step="done"] .xd-side { display: none; }
  .xd-quote blockquote { font-size: 17px; }
  .xd.xd-page { min-height: 0; border-radius: 20px; border-bottom: 1px solid var(--line-2); overflow: visible; }
  .xd-page .xd-main { padding: 30px 22px 34px; }
}
@media (max-width: 560px) {
  .xd-title { font-size: 30px; }
  .xd-page .xd-title { font-size: 32px; }
  .xd-row { flex-direction: column; }
  .xd-row .xd-input { flex: none; }
  .xd-grid { grid-template-columns: minmax(0, 1fr); }
  .xd-days { gap: 6px; }
  .xd-day b { font-size: 17px; }
  .xd-logos { gap: 12px 14px; }
  .xd-logos img { height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .xd-dialog[open] .xd, .xd-dialog[open]::backdrop, .xd-dialog.is-out .xd, .xd-tick, .xd-tick svg { animation: none; }
  .xd-tick svg { stroke-dashoffset: 0; }
  .xd-quote { transition: none; }
}

/* ───── details: optional extras, sticky submit ───── */
.xd-more { margin-top: 18px; padding: 4px 0; font-size: 13.5px; color: var(--fg-2); }
.xd-more:hover { color: var(--fg-0); }
.xd-foot { position: sticky; bottom: 0; z-index: 2; margin: 6px -44px -36px; padding: 6px 44px 22px; background: linear-gradient(to bottom, transparent, var(--panel) 18px); }
.xd-foot .xd-wide { margin-top: 12px; }
.xd-known-text span { white-space: normal; }

/* ───── time: recap and what happens next ───── */
.xd-recap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.xd-recap:empty { display: none; }
.xd-recap span { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--fg); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.xd-what { list-style: none; counter-reset: w; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; }
.xd-what li { counter-increment: w; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; }
.xd-what li::before { content: counter(w); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line-2); font: 500 12.5px var(--mono); color: var(--fg-2); }
.xd-what b { color: var(--fg-0); font-weight: 600; font-size: 14.5px; }
.xd-what span { color: var(--fg-2); font-size: 13.5px; }
@media (max-width: 960px) {
  .xd-what { display: none; }
  .xd-foot { bottom: 0; margin: 6px -22px -30px; padding: 6px 22px 18px; }
}

/* ───── side with the live product window (wide screens): the app bleeds to the panel's edges ───── */
@media (min-width: 961px) { .xd:has(.has-app) { width: min(1200px, 100% - 48px); height: min(780px, 100svh - 40px); grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); } }
.xd-side.has-app { padding: 0; }
.has-app .xd-proof { gap: 0; justify-content: flex-start; }
.xd-app { position: relative; border-bottom: 1px solid var(--line); }
.xd-app .cxr { border-radius: 0; }
.xd-app-tag {
  position: absolute; right: 12px; top: 9px; margin: 0; display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 9px; border-radius: 999px; pointer-events: none;
  font: 500 10.5px/1 var(--mono); color: var(--fg-2);
  background: color-mix(in srgb, var(--panel) 86%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.xd-app-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.has-app .xd-quotes { padding: 30px 36px 0; }
.has-app .xd-quote img { height: 22px; }
.has-app .xd-quote blockquote { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.has-app .xd-dots { margin-top: 14px; }
.has-app .xd-trust { margin-top: auto; padding: 0 36px 26px; }
.has-app .xd-trust p { display: none; }
.has-app .xd-logos { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.has-app .xd-logos img { height: 24px; }
.has-app .xd-cal { margin: 0; padding: 66px 34px 28px; }
.xd:has(.has-app) .xd-close { background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.xd.xd-page:has(.has-app) { width: auto; height: auto; }
@media (max-height: 860px) { .has-app .xd-quotes { padding-top: 22px; } }
@media (max-width: 960px) {
  .xd-side.has-app { padding: 0; }
  .has-app .xd-quotes { padding: 26px 22px 0; }
  .has-app .xd-trust { padding: 26px 22px 34px; }
  .has-app .xd-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 960px) {
  .xd-app-tag span { display: none; }
  .xd-app::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 48px; pointer-events: none; background: linear-gradient(to right, transparent, var(--panel)); }
}
/* touch: a finger on the app scrolls the sheet (there is no hover to explore on a phone) */
@media (hover: none) { .xd-app .cxr[data-interactive] iframe { pointer-events: none !important; } }
@media (min-width: 961px) { .xd-side.has-app { overflow: hidden; } } /* side by side, the panel never scrolls */
/* logos: the SVGs are trimmed to the mark itself, so these heights are the visible logo size */
.xd-logos img { height: 26px; max-width: 100%; object-fit: contain; object-position: left center; }
.has-app .xd-logos { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; align-items: center; }
.has-app .xd-logos img { height: 24px; }
@media (max-width: 560px) { .xd-logos img, .has-app .xd-logos img { height: 20px; } .has-app .xd-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; } }
/* side by side: the whole dialog scrolls when the form is taller than it, so the one scrollbar sits on the dialog's
   right edge (not between the columns); the side panel stays in place while the form scrolls under the pointer */
@media (min-width: 961px) {
  .xd { --xd-h: min(700px, 100svh - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(var(--ink) / .22) transparent; }
  .xd:has(.has-app) { --xd-h: min(780px, 100svh - 40px); }
  .xd-main { overflow: visible; }
  .xd-side { position: sticky; top: 0; height: calc(var(--xd-h) - 2px); align-self: start; } /* - the dialog's 1px borders */
}

/* The heading the page serves before demo.js runs. It is replaced the moment the flow mounts,
   so it only ever shows to a crawler, a reader with JavaScript off, or for one frame. */
.demo-h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 560; }
.demo-h1-sub { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--fg-2); max-width: 46ch; }

/* Light skin: small green text uses --mint (≥4.5:1 on the light surfaces); --accent stays for dots, fills,
   borders and large numbers. Light only, so the dark skin is unchanged. */
:root[data-theme="light"] .xd-addcal a::before { color: var(--mint); }
