:root {
  --ink: #17202d;
  --muted: #687386;
  --line: #e2e7ee;
  --canvas: #f5f7fa;
  --panel: #ffffff;
  --blue: #246bfe;
  --blue-soft: #edf3ff;
  --navy: #15243b;
}

html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
.app-header { height: 68px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.app-header__brand, .app-header__links, .breadcrumb-line, .stage-toolbar, .action-strip, .source-file { display: flex; align-items: center; }
.app-header__brand { gap: 11px; }.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--blue); border-radius: 8px; font-weight: 800; letter-spacing: -.04em; }.brand-name { display: block; font-weight: 750; font-size: 15px; }.brand-context { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }.app-header__links { gap: 24px; color: var(--muted); font-size: 13px; }.app-header__links a:hover { color: var(--ink); }
.explorer-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: calc(100vh - 68px); }.demo-sidebar { position: relative; display: flex; flex-direction: column; background: var(--navy); color: #fff; }.sidebar-heading { padding: 27px 20px 18px; display: flex; justify-content: space-between; }.sidebar-heading h2 { margin: 4px 0 0; font-size: 21px; }.eyebrow { color: #758399; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }.demo-sidebar .eyebrow { color: #8fa2be; }.search-box { margin: 0 16px 22px; padding: 9px 11px; display: flex; gap: 8px; align-items: center; color: #8fa2be; background: #223452; border: 1px solid #304565; border-radius: 6px; }.search-box input { width: 100%; border: 0; outline: 0; color: #fff; background: transparent; font-size: 13px; }.search-box input::placeholder { color: #8fa2be; }.demo-tree { overflow: auto; padding: 0 11px 60px; }.tree-section h3 { padding: 0 10px; margin: 0 0 9px; color: #9eb0ca; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }.tree-group { margin-bottom: 20px; }.tree-group__label { padding: 0 10px 5px; color: #7388a5; font-size: 11px; }.tree-link { min-height: 38px; padding: 7px 10px; display: flex; align-items: center; gap: 9px; color: #c8d2e1; border-left: 2px solid transparent; border-radius: 4px; font-size: 13px; }.tree-link:hover { color: #fff; background: #20324f; }.tree-link.is-active { color: #fff; background: #244a87; border-left-color: #6e9bff; }.tree-icon { width: 23px; height: 23px; display: grid; place-items: center; color: #9cb7ee; background: #2b4469; border-radius: 4px; font-size: 10px; font-weight: 750; }.tree-dot { width: 5px; height: 5px; margin-left: auto; background: #56d39a; border-radius: 50%; }.sidebar-footer { position: absolute; bottom: 0; width: 100%; padding: 17px 20px; color: #7588a4; border-top: 1px solid #263957; font-size: 10px; }
.demo-main { min-width: 0; }.demo-topbar { min-height: 52px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }.breadcrumb-line { gap: 9px; color: #9aa4b3; font-size: 12px; }.breadcrumb-line strong { color: var(--ink); font-weight: 650; }.icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 5px; }.icon-button:hover { color: var(--blue); border-color: #a9c1fb; }.demo-content { max-width: 1500px; padding: 37px 42px 54px; margin: auto; }.demo-intro { max-width: 720px; margin-bottom: 27px; }.demo-intro h1 { margin: 7px 0 8px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.035em; }.demo-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 18px; align-items: start; }.editor-stage, .demo-info-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px rgba(22, 36, 59, .04); }.stage-toolbar { height: 43px; padding: 0 16px; gap: 8px; color: #4b596d; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 650; }.status-dot { width: 7px; height: 7px; background: #35c48b; border-radius: 50%; }.stage-toolbar__hint { margin-left: auto; color: #a2abb8; font-weight: 450; }.tx-editor-host { height: min(66vh, 680px); min-height: 470px; background: #e9edf2; }.action-strip { min-height: 67px; padding: 12px 16px; justify-content: space-between; border-top: 1px solid var(--line); }.action-strip strong, .action-strip span { display: block; }.action-strip strong { font-size: 13px; }.action-strip span { margin-top: 3px; color: var(--muted); font-size: 11px; }.action-strip .btn { display: flex; align-items: center; gap: 8px; }.demo-info-panel { overflow: hidden; }.panel-tabs { padding: 0 18px; display: flex; gap: 22px; border-bottom: 1px solid var(--line); }.panel-tab { position: relative; padding: 15px 0 12px; color: #8a95a4; background: none; border: 0; font-size: 12px; font-weight: 700; }.panel-tab.is-active { color: var(--blue); }.panel-tab.is-active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--blue); }.panel-body { padding: 22px 20px; }.panel-kicker { color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }.panel-body h2 { margin: 8px 0 9px; font-size: 20px; letter-spacing: -.02em; }.panel-body p { color: var(--muted); font-size: 13px; line-height: 1.65; }.api-note { margin: 21px 0; padding: 12px; display: flex; align-items: center; gap: 10px; background: var(--blue-soft); border: 1px solid #dbe6ff; border-radius: 5px; }.api-note__icon { display: grid; place-items: center; width: 29px; height: 29px; color: var(--blue); background: #fff; border-radius: 4px; font-size: 10px; font-weight: 800; }.api-note strong, .api-note code { display: block; }.api-note strong { margin-bottom: 3px; font-size: 11px; }.api-note code { color: #46608d; font-size: 11px; }.explanation { padding-top: 15px; border-top: 1px solid var(--line); }.explanation summary { cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 700; }.explanation p { margin-bottom: 0; }.source-file { gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }.source-file span { display: grid; place-items: center; width: 25px; height: 25px; color: var(--blue); background: var(--blue-soft); border-radius: 4px; font-size: 9px; font-weight: 800; }.source-file code { color: #4c5d78; }
@media (max-width: 991.98px) { .app-header { padding: 0 18px; }.app-header__links a:not(.btn) { display: none; }.explorer-shell { display: block; }.demo-sidebar { position: fixed; z-index: 1045; top: 68px; bottom: 0; left: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }.demo-sidebar.is-open { transform: translateX(0); }.demo-content { padding: 28px 22px 42px; }.workspace-grid { grid-template-columns: 1fr; }.demo-info-panel { order: 2; }.tx-editor-host { min-height: 420px; } }
@media (max-width: 575.98px) { .app-header { height: 60px; }.brand-context { display: none; }.explorer-shell { min-height: calc(100vh - 60px); }.demo-sidebar { top: 60px; }.demo-topbar { padding: 0 16px; }.demo-content { padding: 24px 14px; }.demo-intro h1 { font-size: 27px; }.stage-toolbar__hint { display: none; }.tx-editor-host { min-height: 360px; height: 55vh; }.action-strip { align-items: flex-start; gap: 12px; flex-direction: column; }.action-strip .btn { align-self: stretch; justify-content: center; } }

/* The explorer is a viewport-sized workspace; the editor owns the available height. */
.explorer-shell { --sidebar-width: var(--initial-sidebar-width, 272px); grid-template-columns: var(--sidebar-width) 7px minmax(0, 1fr); height: calc(100vh - 68px); min-height: 0; overflow: hidden; }
.explorer-shell.is-interactive { transition: grid-template-columns .2s ease; }
.explorer-shell.sidebar-collapsed { grid-template-columns: 0 0 minmax(0, 1fr); }
.demo-sidebar { min-width: 0; overflow: hidden; }
.sidebar-collapsed .demo-sidebar { visibility: hidden; }
.sidebar-resizer { width: 7px; padding: 0; cursor: ew-resize; background: var(--line); border: 0; }
.sidebar-resizer:hover, .sidebar-resizer:focus-visible { background: #9db8f3; outline: 0; }
.demo-main { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.demo-content { width: 100%; max-width: none; min-height: 0; margin: 0; padding: 30px 34px 34px; display: flex; flex-direction: column; overflow: hidden; }
.demo-intro { max-width: 900px; flex: 0 0 auto; margin-bottom: 22px; }
.workspace-grid { flex: 1 1 auto; min-height: 0; align-items: stretch; }
.editor-stage { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tx-editor-host { flex: 1 1 auto; min-height: 0; height: auto; }
.demo-info-panel { min-height: 0; overflow: auto; }

@media (max-width: 991.98px) {
  .explorer-shell { display: block; height: calc(100vh - 68px); }
  .sidebar-resizer { display: none; }
  .demo-content { overflow: auto; }
  .workspace-grid { flex: none; align-items: start; }
  .editor-stage { min-height: 560px; }
}

@media (max-width: 575.98px) {
  .explorer-shell { height: calc(100vh - 60px); }
  .editor-stage { min-height: 480px; }
}

html, body { height: 100%; overflow: hidden; }
.sidebar-resizer, .sidebar-resizer:hover, .sidebar-resizer:active { cursor: col-resize !important; touch-action: none; }
body.is-sidebar-resizing, body.is-sidebar-resizing * { cursor: col-resize !important; user-select: none !important; }

/* One unobtrusive sidebar affordance: hamburger when closed, X when open. */
.explorer-shell { position: relative; }
.sidebar-toggle-icon { position: absolute; z-index: 5; top: 18px; left: calc(var(--sidebar-width) - 48px); width: 34px; height: 34px; display: grid; place-content: center; gap: 3px; padding: 0; cursor: pointer; background: transparent; border: 0; transition: left .2s ease; }
.sidebar-toggle-icon span { display: block; width: 16px; height: 2px; background: #9db2d2; transition: transform .2s ease, opacity .2s ease; }
.sidebar-toggle-icon:hover span, .sidebar-toggle-icon:focus-visible span { background: #fff; }
.sidebar-toggle-icon:focus-visible { outline: 1px solid #9db8f3; outline-offset: 3px; }
.sidebar-toggle-icon span:first-child { transform: translateY(5px) rotate(45deg); }
.sidebar-toggle-icon span:nth-child(2) { opacity: 0; }
.sidebar-toggle-icon span:last-child { transform: translateY(-5px) rotate(-45deg); }
.sidebar-toggle-icon.is-collapsed { left: 12px; }
.sidebar-toggle-icon.is-collapsed span { transform: none; }
.sidebar-toggle-icon.is-collapsed span:nth-child(2) { opacity: 1; }

@media (max-width: 991.98px) {
  .sidebar-toggle-icon { position: fixed; top: 86px; left: 224px; }
  .sidebar-toggle-icon.is-collapsed { left: 12px; }
}

.editor-stage { height: 100%; padding: 12px 12px 12px; }
.tx-editor-host { overflow: hidden; }
.action-strip { margin-top: 12px; }

/* Carry the viewport height through every workspace layer. */
.demo-main { height: 100%; }
.demo-content { flex: 1 1 0; }
.workspace-grid { height: 100%; }

/* Keep the collapsed navigation affordance out of the workspace. */
.explorer-shell.sidebar-collapsed { grid-template-columns: 52px 0 minmax(0, 1fr); }

@media (max-width: 991.98px) {
  .explorer-shell.sidebar-collapsed .demo-topbar { padding-left: 62px; }
}

/* TX Text Control product-page visual language, with a deliberately light work surface. */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat/montserrat-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat/montserrat-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat/montserrat-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat/montserrat-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root { --ink: #202126; --muted: #647084; --line: #e3e6eb; --canvas: #f7f8fb; --panel: #fff; --blue: #009ce4; --blue-soft: #edf8fd; --navy: #242529; --tx-pink: #e81683; --tx-violet: #841c64; --tx-gradient: linear-gradient(105deg, #e81683 0%, #c81478 52%, #841c64 100%); }
body { font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; }
.app-header { height: 72px; padding: 0 32px; background: #242529; border-bottom-color: #35363b; }
.app-header__brand { gap: 16px; }
.brand-logo { display: flex; align-items: center; }
.brand-logo img { width: 206px; height: auto; display: block; }
.brand-name { color: #f2f2f2; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.brand-context { color: #a9b2bd; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.technical-demos-title { color: #f2f2f2; font-size: 14px; font-weight: 600; }
.technical-demos-title span { color: #a9b2bd; font-weight: 500; }
.app-header__links { color: #a9b2bd; font-size: 14px; font-weight: 500; }
.technical-demos-title,
.app-header__links a { white-space: nowrap; }
.app-header__links a:hover { color: #fff; }
.app-header .btn-gradient { min-height: 38px; padding: 8px 18px; margin-bottom: 0 !important; color: #fff; border: 0; border-radius: 999px; background: var(--tx-gradient); box-shadow: none; font-weight: 600; transition: filter .15s ease; }
.app-header .btn-gradient:hover { color: #fff; filter: brightness(1.07); }
.btn-chevron::after { content: "›"; display: inline-block; margin-left: 9px; font-size: 18px; line-height: .6; vertical-align: -1px; }
.btn-demo-action { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; color: #a70f62; background: #fff; border: 1px solid #d89abd; border-radius: 999px; box-shadow: none; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn-demo-action:hover { color: #7d0b49; background: #fff1f8; border-color: #c76094; }
.demo-intro .eyebrow-pill { display: inline-flex; align-items: center; padding: 6px 11px; color: #fff !important; background: linear-gradient(105deg, #7417a8 0%, #b51b9c 50%, #e81683 100%); border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .035em; }
.search-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.demo-sidebar { background: #242529; }
.demo-sidebar .eyebrow, .tree-section h3 { color: #a9b2bd; }
.sidebar-heading h2 { font-weight: 600; }
.search-box { color: #a9b2bd; background: #303136; border-color: #46474c; border-radius: 999px; }
.search-box:focus-within { border-color: #e81683; box-shadow: 0 0 0 3px rgba(232, 22, 131, .15); }
.search-box input[type="search"]::-webkit-search-cancel-button { cursor: pointer; filter: brightness(0) invert(1); opacity: .88; }
.tree-group__label, .sidebar-footer { color: #8f98a5; }
.tree-link { border-left: 0; border-radius: 6px; color: #d9dde4; }
.tree-link:hover { background: #33343a; }
.tree-link.is-active { background: var(--tx-gradient); border-left-color: transparent; box-shadow: 0 8px 18px rgba(132, 28, 100, .24); }
.tree-icon { color: #fff; background: rgba(255, 255, 255, .14); }
.tree-dot { background: #fff; }
.sidebar-footer { border-top-color: #38393e; }
.demo-topbar { min-height: 58px; background: #fff; }
.breadcrumb-line strong { color: #242529; }
.demo-intro .eyebrow, .panel-kicker { color: var(--tx-pink); }
.demo-intro h1 { font-weight: 700; letter-spacing: -.03em; }
.demo-info-panel { border-top: 3px solid var(--tx-pink); }
.panel-tab.is-active { color: var(--tx-pink); }
.panel-tab.is-active::after { background: var(--tx-gradient); }
.api-note { background: #fff5fb; border-color: #f5cbe2; }
.api-note__icon, .source-file span { color: var(--tx-pink); background: #fff; }
.api-note__language-icon { width: 29px; height: 29px; flex: 0 0 29px; object-fit: contain; }
.api-note__content { min-width: 0; }
.api-note__members { display: grid; gap: 4px; }
.api-note__members code { overflow-wrap: anywhere; }
.action-strip { border-top-color: #edf0f4; }
.explorer-shell { height: calc(100vh - 72px); }

@media (max-width: 991.98px) { .app-header { height: 64px; padding: 0 20px; }.brand-logo img { width: 164px; }.demo-sidebar { top: 64px; }.explorer-shell { height: calc(100vh - 64px); }.sidebar-toggle-icon { top: 78px; } }
@media (max-width: 575.98px) { .brand-logo img { width: 134px; }.brand-name { display: none; }.app-header__links .btn { padding: 7px 11px; font-size: 11px; }.explorer-shell { height: calc(100vh - 64px); } }

@media (max-width: 1199.98px) {
  .app-header__links .btn-gradient { display: none; }
}

/* Compact company footer in the persistent navigation. */
.demo-tree { flex: 1 1 auto; min-height: 0; padding-bottom: 20px; }
.sidebar-footer { position: static; flex: 0 0 auto; display: grid; gap: 7px; width: 100%; padding: 14px 20px; color: #8f98a5; border-top: 1px solid #38393e; box-sizing: border-box; font-size: 11px; line-height: 1.45; }
.sidebar-footer span { display: block; }
.sidebar-footer__documents { color: #d7dce3; }
.sidebar-footer .sidebar-footer__heart { display: inline; color: #e8163f; }
.sidebar-footer__presence { display: flex; align-items: center; gap: 7px; color: #d7dce3; }
.sidebar-footer .sidebar-footer__presence-dot { display: block; width: 7px; height: 7px; flex: 0 0 7px; background: #39b980; border-radius: 50%; box-shadow: 0 0 0 3px rgba(57, 185, 128, .14); }
.sidebar-footer__presence strong { color: #fff; font-weight: 700; }
.sidebar-footer__presence > span:last-child { display: inline; }
.sidebar-footer__presence [data-demo-presence-label] { display: inline; }
.sidebar-footer nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sidebar-footer a { color: #b8c0ca; text-decoration: none; }
.sidebar-footer a:hover { color: #fff; text-decoration: underline; }

/* Shared demo-link action and its unobtrusive confirmation. */
.demo-topbar .breadcrumb-line { min-width: 0; overflow: hidden; white-space: nowrap; }
.demo-topbar .breadcrumb-line strong { overflow: hidden; text-overflow: ellipsis; }
.demo-share-button { flex: 0 0 32px; }
.demo-share-button svg { width: 17px; height: 17px; }
.demo-share-button__check { display: none; }
.demo-share-button.is-complete { color: #16845b; border-color: #79cbaa; background: #eefaf5; }
.demo-share-button.is-complete .demo-share-button__share { display: none; }
.demo-share-button.is-complete .demo-share-button__check { display: block; }
.demo-share-toast {
  position: fixed;
  z-index: 1090;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 11px 15px;
  color: #fff;
  background: #242529;
  border: 1px solid #424349;
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(12, 18, 28, .24);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}
.demo-share-toast.is-visible { opacity: 1; transform: translateY(0); }
.demo-share-toast__check { color: #50d19a; font-size: 17px; line-height: 1; }
.demo-share-clipboard-fallback { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* A one-time, hand-drawn cue introduces the Try it, Learn, and Code tabs. */
.demo-tabs-onboarding {
  --cue-arrow-rotation: 0deg;
  position: fixed;
  z-index: 1080;
  display: flex;
  align-items: center;
  gap: 2px;
  width: 194px;
  padding: 0;
  color: #c40f70;
  background: transparent;
  border: 0;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
  transform: translateY(5px) rotate(-2deg);
  transition: opacity .18s ease, transform .18s ease;
}
.demo-tabs-onboarding.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) rotate(-2deg); }
.demo-tabs-onboarding span { flex: 0 0 auto; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 17px; font-weight: 700; }
.demo-tabs-onboarding svg {
  width: 108px;
  height: 54px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(var(--cue-arrow-rotation));
  animation: demo-tabs-cue-nudge 1.8s ease-in-out 1.1s infinite;
}
.demo-tabs-onboarding__line { stroke-dasharray: 130; stroke-dashoffset: 130; animation: demo-tabs-cue-draw .7s ease-out .2s forwards; }
.demo-tabs-onboarding__head { opacity: 0; animation: demo-tabs-cue-head .16s ease-out .8s forwards; }
.demo-tabs-onboarding.is-compact { --cue-arrow-rotation: 90deg; width: 180px; }

@keyframes demo-tabs-cue-draw { to { stroke-dashoffset: 0; } }
@keyframes demo-tabs-cue-head { to { opacity: 1; } }
@keyframes demo-tabs-cue-nudge {
  50% { transform: rotate(var(--cue-arrow-rotation)) translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-tabs-onboarding,
  .demo-tabs-onboarding svg,
  .demo-tabs-onboarding__line,
  .demo-tabs-onboarding__head { animation: none; transition: none; }
  .demo-tabs-onboarding__line { stroke-dashoffset: 0; }
  .demo-tabs-onboarding__head { opacity: 1; }
}

@media (max-width: 575.98px) {
  .technical-demos-title { display: none; }
}

/* On narrower workspaces, navigation overlays the editor instead of consuming its width. */
@media (max-width: 1399.98px) {
  .explorer-shell,
  .explorer-shell.sidebar-collapsed {
    display: block;
    grid-template-columns: none;
  }

  .demo-sidebar,
  .sidebar-collapsed .demo-sidebar {
    position: fixed;
    z-index: 1060;
    top: 72px;
    bottom: 0;
    left: 0;
    width: min(var(--sidebar-width), calc(100vw - 52px));
    visibility: visible;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform .2s ease, box-shadow .2s ease;
  }

  .demo-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 18px 0 38px rgba(12, 18, 28, .28);
  }

  .sidebar-resizer { display: none; }

  .sidebar-toggle-icon {
    position: fixed;
    z-index: 1061;
    top: 86px;
    left: 12px;
  }

  .sidebar-toggle-icon span,
  .sidebar-toggle-icon span:first-child,
  .sidebar-toggle-icon span:last-child {
    transform: none;
  }

  .sidebar-toggle-icon span:nth-child(2) { opacity: 1; }

  .demo-sidebar.is-open + .sidebar-toggle-icon {
    left: calc(min(var(--sidebar-width), calc(100vw - 52px)) - 48px);
  }

  .demo-sidebar.is-open + .sidebar-toggle-icon span:first-child {
    transform: translateY(5px) rotate(45deg);
  }

  .demo-sidebar.is-open + .sidebar-toggle-icon span:nth-child(2) { opacity: 0; }

  .demo-sidebar.is-open + .sidebar-toggle-icon span:last-child {
    transform: translateY(-5px) rotate(-45deg);
  }

  .demo-topbar { padding-left: 62px; }
}

@media (max-width: 991.98px) {
  .demo-sidebar,
  .sidebar-collapsed .demo-sidebar { top: 64px; }
  .sidebar-toggle-icon { top: 78px; }
}

/* The source view is a raised overlay, leaving the editor's layout footprint unchanged. */
.workspace-grid { position: relative; isolation: isolate; }
.demo-info-panel { transition: width .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, border-color .22s ease; }
.editor-stage { position: relative; z-index: 0; }
.editor-loading-overlay {
  position: absolute;
  z-index: 10001;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border-radius: inherit;
  opacity: 1;
  visibility: visible;
  transition: opacity .38s ease, visibility 0s linear 0s;
}
.editor-loading-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg,
      rgba(116, 23, 168, .15) 0%,
      rgba(255, 255, 255, .9) 38%,
      rgba(232, 22, 131, .17) 72%,
      rgba(255, 255, 255, .94) 100%),
    linear-gradient(28deg,
      rgba(232, 22, 131, .08) 0%,
      rgba(255, 255, 255, 0) 46%,
      rgba(116, 23, 168, .1) 100%);
  background-size: 230% 230%, 180% 180%;
  animation: editor-loading-gradient 3.8s ease-in-out infinite;
}
.editor-loading-overlay.is-hidden {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .38s ease, visibility 0s linear .38s;
}
.editor-loading-overlay__animation {
  position: relative;
  z-index: 1;
  display: block;
  width: 140px;
  height: 140px;
  border: 0;
  pointer-events: none;
}

@keyframes editor-loading-gradient {
  0%, 100% { background-position: 0% 35%, 100% 80%; }
  38% { background-position: 78% 50%, 35% 10%; }
  70% { background-position: 100% 70%, 0% 55%; }
}
.demo-info-panel.is-code-active { position: absolute; z-index: 10000; top: 0; right: 0; bottom: 0; width: 370px; }
.demo-info-panel.is-code-active.is-code-expanded { width: calc(50% + 162px); border-color: #e1d7de; border-top-color: var(--tx-pink); box-shadow: -18px 0 40px rgba(36, 37, 41, .20), 0 12px 30px rgba(36, 37, 41, .10); }

@media (prefers-reduced-motion: reduce) {
  .demo-info-panel, .demo-info-panel.is-code-active, .editor-loading-overlay, .editor-loading-overlay.is-hidden { transition: none; animation: none; }
  .editor-loading-overlay::before { animation: none; }
}

@media (max-width: 991.98px) {
  .demo-info-panel.is-code-active, .demo-info-panel.is-code-active.is-code-expanded { position: static; width: auto; box-shadow: none; }
}

/* Expandable, local syntax-highlighted source view. */
.source-accordion { margin-top: 20px; border-top: 1px solid var(--line); }
.source-code-item { border-bottom: 1px solid var(--line); }
.source-code-item h3 { margin: 0; }
.source-code-item .source-file { width: 100%; padding: 13px 2px; justify-content: flex-start; gap: 10px; color: var(--ink); background: transparent; border: 0; cursor: pointer; text-align: left; }
.source-language-icon { width: 25px; height: 25px; flex: 0 0 25px; object-fit: contain; }
.source-code-item .source-file code { color: var(--ink); font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif; font-size: 11px; font-weight: 600; }
.source-code-item .source-file i { width: 8px; height: 8px; margin-left: auto; border-right: 1.5px solid #687386; border-bottom: 1.5px solid #687386; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.source-code-item .source-file:not(.collapsed) i { transform: rotate(225deg) translate(-2px, -2px); }
.source-code-item pre { max-height: 360px; padding: 14px 16px; margin: 0 0 14px; overflow: auto; background: #f7f8fb; border: 1px solid #e5e8ed; border-radius: 6px; }
.source-code-item pre code.hljs { padding: 0; background: transparent; color: #242529; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; line-height: 1.7; white-space: pre; }

/* Reusable, always-visible learning narrative with compact highlighted examples. */
.learn-key-members {
  padding-top: 15px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.learn-explanation {
  padding-top: 15px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.learn-key-members h3,
.learn-explanation h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.learn-key-members .api-note {
  margin: 10px 0;
}

.learn-step + .learn-step {
  margin-top: 22px;
}

.learn-step h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.learn-step p {
  margin: 0;
}

.learn-generated-snippets {
  margin-top: 20px;
}

.learn-generated-snippets > h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.learn-generated-snippets .learn-code-intro {
  margin: 0 0 10px;
}

.learn-generated-snippets .learn-code-block + .learn-code-block {
  margin-top: 12px;
}

.learn-code-block {
  max-width: 100%;
  margin: 10px 0 0;
  overflow: hidden;
  background: #f7f8fb;
  border: 1px solid #e5e8ed;
  border-radius: 6px;
}

.learn-code-header {
  min-height: 38px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid #e5e8ed;
  font-size: 11px;
  font-weight: 700;
}

.learn-code-header img {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  object-fit: contain;
}

.learn-code {
  max-width: 100%;
  margin: 0;
  padding: 12px 13px;
  overflow: auto;
  background: transparent;
  border: 0;
}

.learn-code code.hljs {
  display: block;
  padding: 0;
  background: transparent;
  color: #242529;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre;
}

/* Explicit source-panel affordance, with paired Lucide open and close glyphs. */
.code-panel-toggle { width: 30px; height: 30px; margin: auto 0 auto auto; display: inline-grid; place-items: center; color: #687386; background: transparent; border: 0; border-radius: 999px; }
.code-panel-toggle:hover, .code-panel-toggle:focus-visible { color: #a70f62; background: #fff1f8; outline: 0; }
.code-panel-toggle span { width: 16px; height: 16px; background: currentColor; mask: url("../images/icons/panel-right-open.svg") center / contain no-repeat; -webkit-mask: url("../images/icons/panel-right-open.svg") center / contain no-repeat; }
.code-panel-toggle.is-expanded span { mask-image: url("../images/icons/panel-right-close.svg"); -webkit-mask-image: url("../images/icons/panel-right-close.svg"); }
.demo-control-panel .btn-demo-action { margin-top: 14px; }
.demo-output { width: 100%; min-height: 120px; margin-top: 16px; padding: 10px 12px; resize: vertical; color: #394356; background: #f7f8fb; border: 1px solid #e1e5eb; border-radius: 6px; font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; line-height: 1.5; }
.demo-output:focus { border-color: #d89abd; outline: 0; box-shadow: 0 0 0 3px rgba(232, 22, 131, .12); }
.demo-output-highlight { position: relative; width: 100%; margin-top: 16px; overflow: hidden; background: #f7f8fb; border: 1px solid #e1e5eb; border-radius: 6px; }
.demo-output-highlight:focus-within { border-color: #d89abd; box-shadow: 0 0 0 3px rgba(232, 22, 131, .12); }
.demo-output-highlight .demo-output { position: relative; z-index: 1; display: block; margin: 0; color: transparent; caret-color: #202635; background: transparent; border: 0; border-radius: 0; box-shadow: none; -webkit-text-fill-color: transparent; }
.demo-output-highlight .demo-output::placeholder { color: #788396; -webkit-text-fill-color: #788396; opacity: 1; }
.demo-output-highlight__code { position: absolute; z-index: 0; inset: 0; margin: 0; padding: 10px 12px; overflow: hidden; pointer-events: none; white-space: pre-wrap; overflow-wrap: break-word; color: #394356; background: transparent; border: 0; font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; line-height: 1.5; }
.demo-output-highlight__code code.hljs { display: block; padding: 0; overflow: visible; background: transparent; }
.demo-signature-canvas,
.demo-signature-image { display: block; width: 100%; height: auto; margin-top: 14px; border: 1px solid #e1e5eb; border-radius: 7px; background: #fff; }
.demo-signature-canvas { aspect-ratio: 5.46 / 1; }
.tree-subgroup__label { padding-top: 6px; color: #a9b2bd; font-size: 10px; }
.tree-section__toggle, .tree-group__toggle, .tree-subgroup__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; color: #a9b2bd; background: transparent; border: 0; text-align: left; cursor: pointer; }
.tree-section__toggle { margin: 0 0 9px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.tree-group__toggle { padding-top: 2px; padding-bottom: 6px; color: #b9c2ce; font-size: 12px; font-weight: 600; }
.tree-subgroup__toggle { padding-top: 5px; padding-bottom: 6px; color: #a9b2bd; font-size: 12px; font-weight: 500; }
.tree-section__toggle i, .tree-group__toggle i, .tree-subgroup__toggle i { width: 7px; height: 7px; flex: 0 0 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); transition: transform .16s ease; }
.tree-section__toggle[aria-expanded="true"] i, .tree-group__toggle[aria-expanded="true"] i, .tree-subgroup__toggle[aria-expanded="true"] i { transform: rotate(45deg) translate(-2px, -2px); }
.tree-section__toggle:hover, .tree-group__toggle:hover, .tree-subgroup__toggle:hover { color: #fff; }
.tree-section__content[hidden], .tree-group__content[hidden], .tree-subgroup__content[hidden] { display: none; }
.tree-group { padding-left: 20px; }
.tree-group__content { padding-left: 0; }
.tree-subgroup__content { padding-left: 12px; }
.tree-link { padding-left: 12px; }
.tree-link--section-level { padding-left: 10px; }
.demo-search-empty { padding: 18px 10px; color: #8f98a5; font-size: 12px; }
.demo-action-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.demo-action-grid .btn-demo-action { margin-top: 0; }
.demo-action-grid + .demo-panel-note { margin-top: 20px; }
.demo-workflow { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.demo-workflow__step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid #e1e5eb; border-radius: 7px; background: #f7f8fb; transition: border-color .18s ease, background-color .18s ease; }
.demo-workflow__step.is-current { border-color: #d89abd; background: #fff8fc; }
.demo-workflow__step.is-complete { border-color: #b8e3c9; background: #f4fbf7; }
.demo-workflow__step.is-disabled { opacity: .72; }
.demo-workflow__number { width: 24px; height: 24px; display: grid; place-items: center; color: #687386; background: #fff; border: 1px solid #cbd2dc; border-radius: 50%; font-size: 11px; font-weight: 700; }
.demo-workflow__step.is-current .demo-workflow__number { color: #fff; border-color: var(--tx-pink); background: var(--tx-pink); }
.demo-workflow__step.is-complete .demo-workflow__number { color: #fff; border-color: #43a874; background: #43a874; }
.demo-workflow__content { min-width: 0; }
.demo-workflow__content h3 { margin: 2px 0 4px; color: var(--ink); font-size: 13px; font-weight: 650; }
.demo-workflow__content p { margin: 0; font-size: 11px; line-height: 1.55; }
.demo-workflow__content > .btn-demo-action { margin-top: 12px; }
.demo-workflow .demo-action-grid { margin-top: 12px; }
.btn-demo-action:disabled { color: #929baa; border-color: #d9dee5; background: transparent; cursor: not-allowed; opacity: .72; }
.tree-section__toggle { margin-bottom: 16px; }
.tree-section__content > .tree-group { margin-bottom: 28px; }
.tree-demo-icon { position: relative; width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; color: currentColor; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; opacity: .9; }
.tree-demo-icon::before { content: ""; width: 0; height: 0; margin-left: 2px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; }
.tree-link.is-active .tree-demo-icon { color: #fff; background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); }
.tree-link + .tree-link { margin-top: 2px; }
.demo-field-label { display: block; margin-top: 17px; color: #687386; font-size: 11px; font-weight: 600; }
.demo-text-input { width: 100%; margin-top: 6px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid #dfe4ea; border-radius: 6px; font: inherit; font-size: 12px; }
.demo-text-input:focus { border-color: #d89abd; outline: 0; box-shadow: 0 0 0 3px rgba(232, 22, 131, .12); }
.demo-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.demo-field-grid .demo-field-label--wide { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .demo-field-grid { grid-template-columns: 1fr; } .demo-field-grid .demo-field-label--wide { grid-column: auto; } }
/* Native WYSIWYG surface used by the HTML-to-PDF demo. */
.demo-html-editor { margin-top: 6px; overflow: hidden; background: #fff; border: 1px solid #dfe4ea; border-radius: 7px; transition: border-color .16s ease, box-shadow .16s ease; }
.demo-html-editor:focus-within { border-color: #d89abd; box-shadow: 0 0 0 3px rgba(232, 22, 131, .12); }
.demo-html-editor__toolbar { min-height: 42px; display: flex; align-items: center; gap: 3px; padding: 5px 7px; background: #f7f8fb; border-bottom: 1px solid #e1e5eb; }
.demo-html-editor__block { width: 94px; height: 30px; padding: 0 24px 0 8px; color: #394356; background-color: #fff; border: 1px solid #d9dee5; border-radius: 5px; font: inherit; font-size: 10px; cursor: pointer; }
.demo-html-editor__block:focus-visible { border-color: #d89abd; outline: 0; }
.demo-html-editor__separator { width: 1px; height: 20px; margin: 0 3px; background: #dfe4ea; }
.demo-html-editor__tool { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; padding: 0; color: #4f5b6d; background: transparent; border: 1px solid transparent; border-radius: 5px; font-family: inherit; font-size: 12px; line-height: 1; cursor: pointer; }
.demo-html-editor__tool:hover { color: #a70f62; background: #fff1f8; }
.demo-html-editor__tool:focus-visible { color: #a70f62; border-color: #d89abd; outline: 0; }
.demo-html-editor__tool.is-active { color: #a70f62; background: #fbe3f0; border-color: #efbdd8; }
.demo-html-editor__surface { min-height: 190px; max-height: 280px; padding: 16px 18px; overflow: auto; color: #202635; background: #fff; font-size: 12px; line-height: 1.6; }
.demo-html-editor__surface:focus { outline: 0; }
.demo-html-editor__surface h1, .demo-html-editor__surface h2, .demo-html-editor__surface p { margin-top: 0; margin-bottom: 10px; }
.demo-html-editor__surface h1 { font-size: 22px; line-height: 1.2; }
.demo-html-editor__surface h2 { font-size: 17px; line-height: 1.3; }
.demo-html-editor__surface > :last-child { margin-bottom: 0; }
.demo-options-list { display: grid; gap: 9px; color: #4f5b6d; font-size: 11px; line-height: 1.45; }
.demo-options-list label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.demo-options-list input { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; accent-color: var(--tx-pink); }
.demo-status { margin-top: 12px; color: #687386; font-size: 10px; line-height: 1.45; }
.demo-status-panel { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding: 12px; color: #687386; background: #f7f8fb; border: 1px solid #e1e5eb; border-radius: 7px; font-size: 10px; line-height: 1.45; }
.demo-status-panel[hidden] { display: none; }
.demo-status-panel__icon { position: relative; flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; border: 1px solid #b9c1cc; border-radius: 50%; }
.demo-status-panel strong, .demo-status-panel span { display: block; }
.demo-status-panel strong { color: #394356; font-size: 11px; font-weight: 650; }
.demo-status-panel span { margin-top: 2px; }
.demo-status-panel.is-busy { color: #687386; background: #fff9ef; border-color: #f0d5a6; }
.demo-status-panel.is-busy .demo-status-panel__icon { border-color: #d79222; border-top-color: transparent; animation: demo-status-spin .75s linear infinite; }
.demo-status-panel.is-success { color: #367b5a; background: #effaf4; border-color: #b8e3c9; }
.demo-status-panel.is-success .demo-status-panel__icon { border-color: #43a874; background: #43a874; }
.demo-status-panel.is-success .demo-status-panel__icon::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 12px; font-weight: 700; line-height: 16px; text-align: center; }
.demo-status-panel.is-error { color: #a24b4b; background: #fff4f4; border-color: #edc2c2; }
.demo-status-panel.is-error .demo-status-panel__icon { border-color: #c86b6b; }
.demo-status-panel.is-error .demo-status-panel__icon::after { content: "!"; position: absolute; inset: 0; color: #c14d4d; font-weight: 700; line-height: 16px; text-align: center; }
@keyframes demo-status-spin { to { transform: rotate(360deg); } }

/* Custom File-tab surface used only by the Backstage demo. */
.tx-editor-host { position: relative; }
.demo-backstage { position: absolute; z-index: 40; inset: 0; display: grid; grid-template-columns: minmax(240px, 34%) 1fr; color: #fff; background: rgba(24, 27, 32, .34); backdrop-filter: blur(2px); }
.demo-backstage[hidden] { display: none; }
.demo-backstage > div { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 30px 24px; background: #242529; box-shadow: 16px 0 36px rgba(24, 27, 32, .24); }
.demo-backstage h2 { margin: 4px 0 14px; color: #fff; font-size: 24px; }
.demo-backstage .btn-demo-action { width: 100%; justify-content: flex-start; color: #fff; border-color: rgba(255, 255, 255, .38); background: transparent; }
.demo-backstage .btn-demo-action:hover { color: #fff; border-color: var(--tx-pink); background: var(--tx-pink); }
.demo-backstage [data-backstage-close] { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; padding: 0; color: #fff; background: transparent; border: 0; font-size: 24px; line-height: 1; }
