@layer base, components, modules, utilities;

@layer base {
  :root {
    color-scheme: light;

    /* Brand: the pinwheel colours, for accents and meaning. */
    --brand-orange: #ff832b;
    --brand-purple: #8a3ffc;
    --brand-blue: #1192e8;
    --brand-green: #24a148;
    --brand-magenta: #d02670;

    /* Breeze: a white page, cards one step tinted, floating layers white with a shadow; dark is graphite. */
    --app-bg: light-dark(#ffffff, #131315);
    --bg: light-dark(#ffffff, #131315);
    --surface: light-dark(#ffffff, #1c1c20);
    --surface-sunken: light-dark(#efeff2, #26262b);
    --field: light-dark(#ffffff, #1c1c20);
    --tile-top: light-dark(#fafafb, #222227);
    --tile-bottom: light-dark(#f4f4f6, #1c1c20);
    --phone-panel: light-dark(#f4f4f6, #26262b);
    --step-icon-bg: light-dark(#efeff2, #26262b);

    /* Lines: a hairline, a control's edge, and a field's edge at 3:1. */
    --line: light-dark(#e4e4e7, #2c2c32);
    --line-strong: light-dark(#cfcfd5, #3a3a42);
    --line-input: light-dark(#8e8e98, #5c5c66);

    /* Text. */
    --text: light-dark(#18181c, #f2f1ee);
    --text-secondary: light-dark(#2f2f37, #c4c3cc);
    --text-muted: light-dark(#52525c, #8f8e99);
    --text-soft: light-dark(#6b6b75, #7d7c87);
    --text-on-dark: light-dark(#ffffff, #161616);
    --icon-muted: light-dark(#6b6b75, #8f8e99);
    --disabled: light-dark(#cfcfd5, #3a3a42);
    --focus: light-dark(#4b4ef0, #ffffff);

    /* Meaning: a fill tone for dots, icons and bars, and a -text tone that passes contrast for words. */
    --success: light-dark(#24a148, #42be65);
    --success-text: light-dark(#0e6027, #a7f0ba);
    --attention: var(--brand-orange);
    --attention-text: light-dark(#8a3800, #ffb784);
    --danger: light-dark(#da1e28, #fa4d56);
    --danger-text: light-dark(#a2191f, #ff8389);
    --wait: light-dark(#ba4e00, #ff832b);
    --wait-text: light-dark(#8a3800, #ffb784);
    --info: light-dark(#1192e8, #33b1ff);
    --agent: light-dark(#8a3ffc, #a56eff);
    --sms: light-dark(#009d9a, #08bdba);
    --people: light-dark(#d02670, #ff7eb6);
    --agent-text: light-dark(#6929c4, #d4bbff);
    --danger-line: light-dark(#ffb3b8, #a2191f);

    /* Action: Breeze's indigo for what moves things forward, and its soft ground. */
    --action: light-dark(#4b4ef0, #5a5df3);
    --action-hover: light-dark(#3a3dd6, #4b4ef0);
    --action-active: light-dark(#2f31b3, #3a3dd6);
    --action-soft: light-dark(#eeeefe, #1e1f4a);
    --text-on-primary: #ffffff;

    /* Accent: the logo's orange, for Home and the onboarding moments. */
    --accent: light-dark(#d6490f, #ff832b);
    --accent-text: light-dark(#b5520a, #ffa45c);
    --accent-soft: light-dark(#fae9d8, #2e2113);
    --accent-soft-2: light-dark(#f3dfc6, #241a0f);

    /* Each area of the app keeps one colour. */
    --area-home: var(--accent);
    --area-workflows: var(--brand-purple);
    --area-runs: var(--brand-blue);
    --area-results: var(--brand-green);
    --area-customers: var(--brand-magenta);
    --area-messages: var(--sms);

    /* Tints of a meaning colour: wash for a ground, tint for a tag, glow for a ring or a bar. */
    --wash-success: light-dark(#24a14814, #24a14824);
    --tint-success: light-dark(#24a1481f, #24a14833);
    --glow-success: light-dark(#24a1485c, #24a1484d);
    --wash-attention: light-dark(#ff832b14, #ff832b24);
    --tint-attention: light-dark(#ff832b1f, #ff832b33);
    --glow-attention: light-dark(#ff832b5c, #ff832b4d);
    --wash-agent: light-dark(#8a3ffc14, #8a3ffc24);
    --tint-agent: light-dark(#8a3ffc1f, #8a3ffc33);
    --glow-agent: light-dark(#8a3ffc5c, #8a3ffc4d);
    --wash-info: light-dark(#1192e814, #1192e824);
    --tint-info: light-dark(#1192e81f, #1192e833);
    --glow-info: light-dark(#1192e85c, #1192e84d);
    --wash-sms: light-dark(#009d9a14, #009d9a24);
    --tint-sms: light-dark(#009d9a1f, #009d9a33);
    --glow-sms: light-dark(#009d9a5c, #009d9a4d);
    --wash-customers: light-dark(#d0267014, #d0267024);
    --tint-customers: light-dark(#d026701f, #d0267033);
    --glow-customers: light-dark(#d026705c, #d026704d);
    --wash-danger: light-dark(#da1e2814, #da1e2824);
    --tint-danger: light-dark(#da1e281f, #da1e2833);
    --glow-danger: light-dark(#da1e285c, #da1e284d);
    --tint-wait: light-dark(#ba4e001f, #ba4e0033);
    --tint-neutral: light-dark(#0a0a0a0d, #ffffff14);

    /* Phone menus (USSD) screen kinds. */
    --kind-menu: #ff832b;
    --kind-input: light-dark(#8a3ffc, #a56eff);
    --kind-router: light-dark(#1192e8, #33b1ff);
    --kind-end: light-dark(#24a148, #42be65);

    /* Channel previews. */
    --chat-bg: light-dark(#efe7dd, #11181b);
    --chat-me: light-dark(#d9fdd3, #144d37);
    --lcd: #c3d4a2;
    --lcd-ink: #1f2a12;

    /* "To fill" blanks. */
    --fill-blank: #fff6e0;
    --fill-blank-line: #ba4e00;
    --fill-blank-text: #7a5b00;

    /* Typography. */
    --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

    /* Radius. */
    --radius-pill: 999px;
    --radius-window: 0.8rem;
    --radius-card: 0.8rem;
    --radius-inner: 0.6rem;
    --radius-control: 0.6rem;
    --radius-chip: 0.4rem;

    /* Spacing. */
    --space-4: 0.4rem;
    --space-8: 0.8rem;
    --space-12: 1.2rem;
    --space-16: 1.6rem;
    --space-24: 2.4rem;
    --space-40: 4rem;
    --space-64: 6.4rem;
    --space-96: 9.6rem;

    /* Elevation. */
    --shadow-raised: 0 1px 2px rgb(var(--shade) / 0.08);
    --shadow-segment: 0 1px 2px rgb(var(--shade) / 0.05), 0 8px 24px rgb(var(--shade) / 0.07);
    --shadow-popover: 0 8px 24px rgb(var(--shade) / 0.1), 0 0 0 1px rgb(var(--shade) / 0.05);
    --shadow-dialog: 0 24px 60px rgb(var(--shade) / 0.2), 0 0 0 1px rgb(var(--shade) / 0.05);
    --shadow-phone: 0 18px 48px rgb(var(--shade) / 0.18);
    --shadow-well: 0 8px 18px rgb(var(--shade) / 0.14), inset 0 -2px 4px rgb(var(--shade) / 0.08);
    --scrim: #0a0a0a59;

    /* Earlier names, kept as aliases of the ones above. */
    --tray: var(--surface);
    --card: light-dark(#f7f7f8, #1c1c20);
    --canvas: light-dark(#f4f4f6, #26262b);
    --preview-ground: var(--phone-panel);
    --lcd-hover: #bbce97;
    --mark-tile: light-dark(transparent, #f2f2f4);
    --surface-2: var(--surface-sunken);
    --surface-hover: light-dark(#ececef, #2a2a30);
    --surface-active: light-dark(#e3e3e7, #303036);
    --surface-selected: light-dark(#e3e3e7, #303036);
    --field-hover: light-dark(#f7f7f8, #24242a);
    --ink: var(--text);
    --ink-2: var(--text-secondary);
    --ink-3: var(--text-muted);
    --placeholder: var(--text-soft);
    --primary: var(--action);
    --link: light-dark(#4b4ef0, #a3a5ff);
    --primary-hover: var(--action-hover);
    --primary-active: var(--action-active);
    --primary-soft: var(--action-soft);
    --live: light-dark(#d02670, #ff7eb6);
    --live-glow: color-mix(in srgb, var(--live) 28%, transparent);
    --live-soft: color-mix(in srgb, var(--live) 12%, var(--surface));
    --staff-tag: var(--brand-magenta);
    --staff-tag-ink: #ffffff;

    --menu: var(--kind-menu);
    --menu-soft: color-mix(in srgb, var(--menu) 12%, var(--surface));
    --menu-ink: light-dark(#8a3800, #ffb784);
    --input: var(--kind-input);
    --input-soft: color-mix(in srgb, var(--input) 12%, var(--surface));
    --input-ink: light-dark(#6929c4, #d4bbff);
    --router: var(--kind-router);
    --router-soft: color-mix(in srgb, var(--router) 12%, var(--surface));
    --router-ink: light-dark(#00539a, #82cfff);
    --router-line: color-mix(in srgb, var(--router) 40%, var(--line));
    --end: var(--kind-end);
    --end-soft: color-mix(in srgb, var(--end) 12%, var(--surface));
    --message: var(--sms);
    --message-soft: color-mix(in srgb, var(--message) 12%, var(--surface));
    --form: var(--brand-magenta);
    --form-soft: color-mix(in srgb, var(--form) 12%, var(--surface));
    --wait-soft: color-mix(in srgb, var(--wait) 12%, var(--surface));
    --ussd: var(--brand-blue);
    --ussd-soft: color-mix(in srgb, var(--ussd) 12%, var(--surface));
    --ussd-ink: var(--router-ink);
    --whatsapp: var(--brand-green);
    --whatsapp-soft: color-mix(in srgb, var(--whatsapp) 12%, var(--surface));
    --whatsapp-ink: var(--success-text);
    --whatsapp-brand: light-dark(#1da851, #25d366);
    --workflow: var(--agent);
    --workflow-soft: color-mix(in srgb, var(--workflow) 12%, var(--surface));
    --workflow-ink: var(--input-ink);

    --error: var(--danger-text);
    --error-soft: light-dark(#fff1f1, #520408);
    --error-line: color-mix(in srgb, var(--danger) 35%, var(--line));
    --error-surface: var(--error-soft);
    --error-ink: var(--danger-text);
    --danger-hover: light-dark(#ba1b23, #ff8a8f);
    --danger-soft: var(--error-soft);
    --danger-ink: var(--danger-text);
    --on-danger: #ffffff;
    --badge: var(--danger);
    --warning: var(--attention-text);
    --warning-soft: color-mix(in srgb, var(--attention) 12%, var(--surface));
    --warning-line: color-mix(in srgb, var(--attention) 35%, var(--line));
    --warning-surface: var(--warning-soft);
    --ok: var(--success);
    --ok-soft: color-mix(in srgb, var(--success) 10%, var(--surface));
    --ok-ink: var(--success-text);
    --ok-line: color-mix(in srgb, var(--success) 35%, var(--line));
    --arrived: light-dark(#42be65, #5bd48a);
    --not-arrived: repeating-linear-gradient(135deg, var(--danger) 0 0.3rem, var(--error-soft) 0.3rem 0.6rem);
    --live-ink: light-dark(#9f1853, #ffafd2);
    --live-line: color-mix(in srgb, var(--live) 35%, var(--line));
    --island: color-mix(in srgb, var(--surface) 92%, transparent);

    --shadow-card: none;
    --shadow-lift: var(--shadow-segment);
    --shadow-float: var(--shadow-popover);

    --sans: var(--font);
    --display: var(--font);
    --mono: var(--font-mono);
    --text-10: 1rem;
    --text-11: 1.1rem;
    --leading-11: 1.5rem;
    --text-12: 1.2rem;
    --leading-12: 1.6rem;
    --text-13: 1.3rem;
    --leading-13: 1.8rem;
    --text-14: 1.4rem;
    --leading-14: 2rem;
    --text-15: 1.5rem;
    --leading-15: 2.2rem;
    --text-16: 1.6rem;
    --leading-16: 2.4rem;
    --text-17: 1.7rem;
    --leading-17: 2.4rem;
    --text-18: 1.8rem;
    --leading-18: 2.4rem;
    --text-20: 2rem;
    --leading-20: 2.8rem;
    --text-22: 2.2rem;
    --leading-22: 2.8rem;
    --text-24: 2.4rem;
    --leading-24: 3.2rem;
    --text-28: 2.8rem;
    --leading-28: 3.6rem;
    --text-30: 3rem;
    --leading-30: 3.6rem;
    --text-32: 3.2rem;
    --leading-32: 4rem;
    --text-34: 3.4rem;
    --leading-34: 4rem;
    /* Plex is drawn to be set at its own spacing, as Carbon sets it. */
    --tracking-12: 0;
    --tracking-14: 0;
    --tracking-16: 0;
    --tracking-18: 0;
    --tracking-20: 0;
    --tracking-24: 0;
    --tracking-28: 0;
    --tracking-32: 0;
    --font-display: 400 var(--text-28) / var(--leading-28) var(--display);
    --font-lead: 400 var(--text-20) / var(--leading-20) var(--sans);
    /* Carbon's productive scale: a 24px title over a 14px summary, 14px for text and the interface. */
    --font-page-title: var(--weight-semibold) var(--text-24) / var(--leading-24) var(--display);
    --font-page-summary: 400 var(--text-14) / var(--leading-14) var(--sans);
    --font-card: var(--weight-semibold) var(--text-16) / var(--leading-16) var(--sans);
    --font-text: 400 var(--text-14) / var(--leading-14) var(--sans);
    --font-ui: 400 var(--text-14) / var(--leading-14) var(--sans);
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-strong: 600;
    --weight-semibold: 600;

    --size-small: 3.2rem;
    --size-medium: 3.6rem;
    --size-large: 4rem;
    --gap: var(--space-24);
    --gap-half: var(--space-12);
    --gap-quarter: 0.6rem;
    --track: light-dark(#e6e6ea, #3a3a42);
    /* A sunk well that reads on the page and on a card alike: tabs, switches and filter groups sit in it. */
    --well: color-mix(in srgb, var(--ink) 7%, transparent);
    --control-line: var(--line-strong);
    --field-line: var(--line-input);
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --leave: cubic-bezier(0.4, 0, 1, 1);
    --quick: 0.15s;
    --settle: 0.24s;
    --brief: 0.16s;
    --r-control: var(--radius-control);
    --r-button: var(--radius-control);
    --filter-height: var(--size-small);
    --r-card: var(--radius-card);
    --r-section: var(--radius-window);

    --on-primary: var(--text-on-primary);
    --inverse: var(--text);
    --on-inverse: var(--text-on-dark);
    --on-accent: #ffffff;
    --viz-1: var(--end);
    --viz-2: var(--menu);
    --series-runs: var(--ussd);
    --series-held: var(--brand-orange);
    --series-before: var(--line-strong);
    --series-fine: color-mix(in srgb, var(--ussd) 20%, var(--surface));
    --viz-grid: var(--line);
    --viz-axis: var(--text-muted);
    --table-head: light-dark(#fafafb, #222227);
    --shade: 20 20 30;
    --ink-rgb: 24 24 28;
    --focus-rgb: 75 78 240;

    --screen-bg: light-dark(#f7f7f8, #1c1e23);
    --screen-soft: var(--surface);
    --screen-hover: var(--surface-hover);
    --screen-line: var(--line);
    --screen-rule: var(--line-strong);
    --screen-ink: var(--text);
    --screen-muted: var(--text-muted);
    --keycap: var(--surface);
    --keycap-line: var(--line-strong);
    --action-line: color-mix(in srgb, var(--agent) 35%, var(--line));
    --action-bg: var(--workflow-soft);
    --trigger-icon: #42be65;
    --trigger-bg: light-dark(#161616, #393939);
    --trigger-ink: #f4f4f4;
    --code-bg: light-dark(#f4f4f6, #1c1c20);
    --code-muted: var(--text-soft);
    --code-ink: var(--text);
    --tok-key: light-dark(#0043ce, #78a9ff);
    --tok-punct: #8d8d8d;
    --tok-str: var(--success-text);
    --tok-num: var(--danger-text);
    --tok-ref: var(--router-ink);
    --tok-expr: var(--attention-text);

    --phone-shade: 13 18 16;
    --phone-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --phone-app-bg: light-dark(#ffffff, #000000);
    --phone-ink: light-dark(#000000, #ffffff);
    --phone-muted: #8e8e93;
    --phone-dial-key: light-dark(#e5e5ea, #333336);
    --phone-dial-key-press: light-dark(#bcbcc2, #636366);
    --phone-dim: light-dark(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.45));
    --phone-alert: light-dark(rgb(242 242 242 / 0.9), rgb(37 37 37 / 0.92));
    --phone-alert-line: light-dark(rgb(60 60 67 / 0.29), rgb(84 84 88 / 0.65));
    --phone-alert-press: light-dark(rgb(209 209 214 / 0.9), rgb(58 58 60 / 0.92));
    --phone-field: light-dark(#ffffff, #1c1c1e);
    --phone-field-line: light-dark(#c7c7cc, #3a3a3c);
    --phone-link: light-dark(#007aff, #0a84ff);
    --phone-bubble-in: light-dark(#e9e9eb, #262629);
    --phone-veil: light-dark(rgb(242 242 242 / 0.96), rgb(37 37 37 / 0.96));
    --phone-spinner-track: light-dark(#d1d1d6, #3a3a3c);
    --phone-keypad: light-dark(#d1d3d9, #2b2b2d);
    --phone-key: light-dark(#ffffff, #58585b);
    --phone-key-press: light-dark(#b4b8c0, #38383a);
    --phone-key-ink: light-dark(#000000, #ffffff);
    --phone-key-shadow: light-dark(#898a8d, #000000);

    --chat-head: light-dark(#f0f2f5, #202c33);
    --chat-bar: light-dark(#f0f2f5, #111b21);
    --chat-doodle: 0.085;
    --chat-in: light-dark(#ffffff, #202c33);
    --chat-out: var(--chat-me);
    --chat-ink: light-dark(#111b21, #e9edef);
    --chat-muted: light-dark(#667781, #8696a0);
    --chat-action: light-dark(#027eb5, #53bdeb);
    --chat-accent: #00a884;
    --chat-tick: #53bdeb;
    --chat-note: light-dark(#ffffff, #182229);
    --chat-field: light-dark(#ffffff, #2a3942);
    --chat-sheet: light-dark(#ffffff, #1f2c33);
    --chat-line: light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.08));
    --chat-refused: #fa4d56;
  }

  /* System preference applies unless the viewer chose a theme. */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --ink-rgb: 242 241 238;
      --focus-rgb: 255 255 255;
      --shade: 0 0 0;
      --phone-shade: 0 0 0;
      --chat-doodle: 0.055;
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --ink-rgb: 242 241 238;
    --focus-rgb: 255 255 255;
    --shade: 0 0 0;
    --phone-shade: 0 0 0;
    --chat-doodle: 0.055;
  }
}

@layer base {
  /* 62.5% root: every rem below reads as px / 10. */
  html {
    font-size: 62.5%;
  }
  /* The public site and the guide read a size up on wide screens; the app stays at 14px. */
  @media (min-width: 880px) {
    html.is-site {
      font-size: 65%;
    }
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    background: var(--app-bg);
    color: var(--ink);
    font-family: var(--sans);
    font: var(--font-text);
    letter-spacing: var(--tracking-14);
    -webkit-font-smoothing: antialiased;
  }
  a {
    color: var(--link);
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  :focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
  }
  ::selection {
    background: rgb(var(--focus-rgb) / 0.18);
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 140ms;
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
    }
  }
}

/* Turbo marks what is on its way: a form being sent and a list being redrawn answer at once, the list fading only if it takes a moment. */
@layer base {
  form[aria-busy="true"] :is(button, input[type="submit"]) {
    opacity: 0.6;
    cursor: progress;
  }
  turbo-frame#list[busy] {
    opacity: 0.6;
    transition: opacity var(--quick) var(--ease) 0.1s;
  }
}

/* Outside a layer, since Turbo's own sheet for its bar is unlayered and would win over any layer. */
html .turbo-progress-bar {
  height: 2px;
  background-color: var(--primary);
}

@layer components {
  .wrap {
    max-width: 144rem;
    margin: 0 auto;
    padding: 1.2rem 2.4rem 8rem;
  }
  .skip-link {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 100;
    padding: 0.8rem 1.2rem;
    border-radius: var(--r-control);
    background: var(--primary);
    color: var(--on-primary);
    font-weight: var(--weight-strong);
    transform: translateY(-200%);
  }
  .skip-link:focus-visible {
    transform: none;
  }
  .stack > * + * {
    margin-top: 1.6rem;
  }
  .stack > .section-title {
    margin-top: 5.6rem;
  }
  /* Cards sit on the paper by a soft shadow as well as their line. */
  :is(.admin-panel, .group:not(.subgroup), .connector-card, .sends-section, .member-list, .start-card, .channel-card, .number-card, .allowance) {
    box-shadow: var(--shadow-card);
  }
  .site-header {
    --control: 3.4rem;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    margin: -1.2rem -2.4rem 4rem;
    padding: 0.9rem 2.4rem;
    background: color-mix(in srgb, var(--app-bg) 88%, transparent);
    backdrop-filter: blur(10px);
  }
  @media (max-width: 600px) {
    .site-header {
      margin-inline: -1.6rem;
      margin-bottom: 1.6rem;
      padding-inline: 1.6rem;
    }
  }
  .site-header nav {
    display: flex;
    gap: 0.2rem;
    align-items: center;
  }
  .site-header .avatar-button {
    width: var(--control);
    height: var(--control);
  }
  .new-menu > summary {
    gap: 0.5rem;
  }
  .new-menu[open] > summary.btn {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--on-primary);
  }
  .new-menu .menu-items {
    min-width: 26rem;
  }
  .new-menu .menu-item {
    align-items: flex-start;
  }
  .new-menu .menu-item .icon {
    margin-top: 0.2rem;
  }
  .new-menu .menu-item span {
    display: grid;
    gap: 0.1rem;
  }
  .new-menu .menu-item small {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .nav-link {
    padding: 0.6rem 1.1rem;
    border-radius: var(--r-control);
    color: var(--ink-2);
    font-weight: var(--weight-medium);
    text-decoration: none;
    transition:
      background-color var(--quick) var(--ease),
      color var(--quick) var(--ease);
  }
  .nav-link:hover {
    background: var(--surface-hover);
    color: var(--ink);
  }
  .nav-count {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 1.8rem;
    padding: 0 0.7rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--attention) 15%, transparent);
    color: var(--attention-text);
    font-size: var(--text-11);
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--ink);
    font-family: var(--display);
    font-weight: 600;
    font-size: var(--text-20);
    letter-spacing: var(--tracking-20);
    line-height: 1;
    text-decoration: none;
  }
  .wordmark .mark {
    width: 2.6rem;
    height: 2.6rem;
    margin: -0.2rem 0;
  }
  .site-header .avatar-button .avatar {
    width: 3rem;
    height: 3rem;
  }
  .mark {
    display: block;
    flex: none;
    width: 22px;
    height: 22px;
  }
  .mark-arms {
    transform-box: view-box;
    transform-origin: center;
  }
  /* The delay keeps a quick Turbo visit from twitching the mark. */
  .is-spinning > .mark .mark-arms,
  html[aria-busy="true"] :is(.wordmark, .island-home, .menu-bar-mark, .sidebar-brand) .mark-arms {
    animation: mark-spin 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  }
  html[aria-busy="true"] :is(.wordmark, .island-home, .menu-bar-mark, .sidebar-brand) .mark-arms {
    animation-delay: 0.4s;
  }
  @keyframes mark-spin {
    to {
      transform: rotate(360deg);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .mark-arms {
      animation: none !important;
    }
  }
}

@layer modules {
  .sidebar-places .nav-link {
    position: relative;
    isolation: isolate;
  }
  .sidebar-places .nav-link[aria-current="page"] {
    background: none;
    box-shadow: none;
    color: var(--text);
    font-weight: var(--weight-semibold);
  }
  .sidebar-places .nav-link[aria-current="page"] .icon {
    color: var(--primary);
  }
  .nav-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }
  .nav-mark {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 0.6rem;
    background: var(--surface);
    box-shadow: var(--shadow-raised);
  }
  @media (max-width: 720px) {
    .nav-label {
      flex-direction: column;
      gap: 0.3rem;
    }
    .nav-mark {
      inset: 0 30% auto;
      height: 0.3rem;
      border-radius: 0 0 0.3rem 0.3rem;
      background: var(--primary);
      box-shadow: none;
    }
  }
}

/* A place's frame while its page is on the way: its title, then rows that breathe until the page arrives. */
@layer modules {
  .app-shell > main[aria-busy="true"] > :not(.page-placeholder) {
    display: none;
  }
  .page-placeholder {
    display: grid;
    gap: 1.6rem;
  }
  .page-placeholder-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2.4rem;
    margin-bottom: 0.4rem;
  }
  .page-placeholder-words {
    display: grid;
    gap: 0.6rem;
  }
  .page-placeholder .page-title {
    margin: 0;
  }
  .page-placeholder-card {
    display: grid;
    align-content: start;
    gap: 1.2rem;
    padding: 1.6rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  /* The grey shapes breathe; the title, cards and their edges hold still, as the page will. */
  .page-placeholder-bar,
  .page-placeholder-row,
  .page-placeholder-chip,
  .page-placeholder-col {
    display: block;
    border-radius: var(--radius-chip);
    background: var(--well);
    animation: placeholder-breathe 1.4s var(--ease) infinite alternate;
  }
  .page-placeholder-bar {
    height: 1.4rem;
  }
  .page-placeholder-bar.is-sub {
    width: 32rem;
    max-width: 60vw;
  }
  .page-placeholder-bar.is-search {
    flex: none;
    width: 32rem;
    max-width: 40%;
    height: var(--size-medium);
    border-radius: var(--r-control);
  }
  .page-placeholder-bar.is-title {
    width: 14rem;
  }
  .page-placeholder-chips {
    display: flex;
    gap: 0.8rem;
  }
  .page-placeholder-chip {
    width: 9rem;
    height: var(--size-small);
    border-radius: var(--r-control);
  }
  .page-placeholder-cols {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 1.2rem;
    height: 12rem;
  }
  .page-placeholder-col {
    justify-self: center;
    width: 100%;
    max-width: 4.8rem;
    border-radius: 4px 4px 0 0;
  }
  .page-placeholder-col:nth-child(7n + 1) {
    height: 30%;
  }
  .page-placeholder-col:nth-child(7n + 2) {
    height: 55%;
  }
  .page-placeholder-col:nth-child(7n + 3) {
    height: 40%;
  }
  .page-placeholder-col:nth-child(7n + 4) {
    height: 70%;
  }
  .page-placeholder-col:nth-child(7n + 5) {
    height: 45%;
  }
  .page-placeholder-col:nth-child(7n + 6) {
    height: 85%;
  }
  .page-placeholder-col:nth-child(7n) {
    height: 60%;
  }
  .page-placeholder-card.is-table {
    gap: 0;
    padding: 0;
    overflow: hidden;
  }
  .page-placeholder-line {
    padding: 2.1rem 2rem;
    border-top: 1px solid var(--line);
  }
  .page-placeholder-line.is-head {
    height: 4.4rem;
    padding: 0;
    border-top: 0;
    background: var(--table-head);
  }
  .page-placeholder-row {
    width: 60%;
    height: 1.4rem;
  }
  .page-placeholder-line:nth-child(odd) .page-placeholder-row {
    width: 75%;
  }
  .page-placeholder-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
  }
  .page-placeholder-tiles .page-placeholder-card {
    gap: 1.6rem;
    padding-block: 2rem;
  }
  .page-placeholder-bar.is-label {
    width: 8rem;
  }
  .page-placeholder-bar.is-figure {
    width: 4.8rem;
    height: 3.2rem;
  }
  .page-placeholder-columns .page-placeholder-card {
    gap: 2rem;
    padding-block: 2rem;
  }
  .page-placeholder-columns .page-placeholder-bar:not(.is-title):nth-child(odd) {
    width: 70%;
  }
  .page-placeholder-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.6rem;
  }
  @media (max-width: 720px) {
    .page-placeholder-bar.is-search,
    .page-placeholder-chip:nth-child(n + 3) {
      display: none;
    }
    .page-placeholder-tiles,
    .page-placeholder-columns {
      grid-template-columns: minmax(0, 1fr);
    }
    .page-placeholder-cols {
      gap: 0.4rem;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .page-placeholder :is(.page-placeholder-bar, .page-placeholder-row, .page-placeholder-chip, .page-placeholder-col) {
      animation: none;
    }
  }
  @keyframes placeholder-breathe {
    to {
      opacity: 0.5;
    }
  }
}

@layer components {
  .display,
  .flows-title,
  .page-title {
    margin: 0 0 var(--gap);
    font: var(--font-page-title);
    letter-spacing: -0.02rem;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  :is(.display, .flows-title, .page-title):has(+ :is(.sub, .lede, .admin-sub)) {
    margin-bottom: 0.4rem;
  }
  .lede {
    max-width: 60ch;
    margin: 0;
    font: var(--font-text);
    letter-spacing: var(--tracking-14);
    color: var(--ink-3);
    text-wrap: pretty;
  }
  :is(.display, .flows-title, .page-title) + :is(.sub, .lede, .admin-sub),
  .analytics-bar .sub,
  .runs-head .sub,
  .messaging-head .sub,
  .sends-head .sub {
    font: var(--font-page-summary);
    letter-spacing: 0;
    color: var(--text-soft);
  }
  .section-title {
    margin: 0 0 var(--gap-half);
    font: var(--font-lead);
    letter-spacing: var(--tracking-20);
  }
  .card-title {
    margin: 0;
    font: var(--font-card);
    letter-spacing: var(--tracking-16);
  }
  .label,
  .eyebrow {
    display: block;
    margin: 0 0 0.4rem;
    font-size: var(--text-13);
    font-weight: 400;
    line-height: var(--leading-12);
    letter-spacing: var(--tracking-12);
    color: var(--ink-3);
  }
  .eyebrow a {
    color: inherit;
    text-decoration: none;
  }
  .eyebrow a:hover {
    color: var(--ink);
    text-decoration: underline;
  }
  .sub {
    margin: 0 0 var(--gap);
    font: var(--font-text);
    letter-spacing: var(--tracking-14);
    color: var(--ink-3);
  }
  .hint {
    margin: 0.4rem 0 0;
    font-size: var(--text-13);
    line-height: var(--leading-13);
    letter-spacing: var(--tracking-12);
    color: var(--ink-3);
  }
  .hint.is-inline {
    display: inline;
    margin: 0 0 0 0.4rem;
  }
  .hint.is-error {
    color: var(--error);
  }
  .hint.is-warning {
    color: var(--warning);
  }
  .mono,
  code {
    font-family: var(--mono);
  }
  code {
    padding: 0.05em 0.35em;
    border-radius: var(--radius-chip);
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 0.88em;
  }
  kbd {
    display: inline-grid;
    place-items: center;
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.4rem;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: var(--radius-chip);
    background: var(--surface);
    font-family: var(--mono);
    font-size: var(--text-10);
    line-height: 1;
    color: var(--ink-3);
  }
}

@layer components {
  .icon {
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
  }
  .flag {
    flex: 0 0 auto;
    width: 1.5em;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 0.2em;
    box-shadow: 0 0 0 1px var(--line);
  }
  .icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  .nav-link,
  .tool,
  .phone-hangup,
  .dock-tab,
  .toggle,
  .issue.is-clean {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .nav-link .icon,
  .tool .icon {
    color: var(--ink-3);
  }
  .nav-link:hover .icon,
  .tool:hover .icon {
    color: currentColor;
  }
  .btn .icon {
    width: 1.1em;
    height: 1.1em;
  }
  .group > legend .icon {
    margin-right: 0.6rem;
    color: var(--ink-3);
  }
}

@layer components {
  /* v2's button: 38px, 8px corners, a blue fill or a white one with a hairline. */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3.8rem;
    padding: 0 1.6rem;
    border: 1px solid var(--primary);
    border-radius: var(--r-button);
    background: var(--primary);
    color: var(--on-primary);
    font: inherit;
    font-size: var(--text-15);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-15);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition:
      background-color var(--quick) var(--ease),
      border-color var(--quick) var(--ease),
      color var(--quick) var(--ease),
      box-shadow var(--quick) var(--ease);
  }
  .btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
  /* A press lands at once and only the release eases, as a key does. */
  .btn:active {
    background: var(--primary-active);
    border-color: var(--primary-active);
    transition: none;
  }
  .btn--ghost {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
  }
  .btn--ghost:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
    color: var(--ink);
  }
  .btn--ghost:active {
    background: var(--surface-active);
    border-color: var(--line-strong);
  }
  /* v2's quiet button: the label alone, for the way out beside a primary one. */
  .btn--quiet {
    padding: 0 1.4rem;
    background: transparent;
    border-color: transparent;
    color: var(--primary);
  }
  .btn--quiet:is(:hover, :active) {
    background: var(--surface-hover);
    border-color: transparent;
  }
  /* The small button, for inside a card or a row. */
  .btn--small {
    min-height: 3rem;
    padding: 0 1.2rem;
    border-radius: 0.7rem;
    font-size: var(--text-13);
    line-height: var(--leading-13);
  }
  .btn.is-danger {
    background: var(--surface);
    border-color: var(--danger-line);
    color: var(--danger-text);
  }
  .btn.is-danger:hover,
  .btn.is-danger:active {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--on-danger);
  }
  .icon-action {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 3.2rem;
    height: 3.2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--r-control);
    background: none;
    color: var(--ink-2);
    cursor: pointer;
  }
  .icon-action .icon {
    width: 1.8rem;
    height: 1.8rem;
  }
  .icon-action:hover,
  .icon-action:focus-visible {
    background: var(--surface-2);
    color: var(--ink);
  }
  .icon-action:active {
    background: var(--surface-active);
  }
  .icon-action.is-primary {
    background: var(--primary);
    color: var(--on-primary);
  }
  .icon-action.is-primary:hover,
  .icon-action.is-primary:focus-visible {
    background: var(--primary-hover);
    color: var(--on-primary);
  }
  .icon-action.is-danger:hover,
  .icon-action.is-danger:focus-visible {
    background: var(--danger);
    color: var(--on-danger);
  }
  .icon-action::after {
    content: attr(aria-label);
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.6rem);
    z-index: 3;
    display: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--r-control);
    background: var(--inverse);
    color: var(--on-inverse);
    font-size: var(--text-12);
    font-weight: 400;
    line-height: 1.6rem;
    white-space: nowrap;
    pointer-events: none;
  }
  .icon-action:hover::after,
  .icon-action:focus-visible::after {
    display: block;
  }
  .icon-action.is-beside::after {
    right: calc(100% + 0.6rem);
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }
  .linklike {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    cursor: pointer;
    text-decoration: underline;
  }
  .tool {
    background: none;
    border: 0;
    padding: 0.3rem 0.7rem;
    border-radius: var(--r-control);
    font: inherit;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    color: var(--ink-2);
    text-decoration: none;
    cursor: pointer;
  }
  .tool:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .tool.is-danger:hover {
    background: var(--error-soft);
    color: var(--error);
  }
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    margin: 1.6rem 0 0;
  }
  .actions form,
  .adders form {
    display: inline;
  }
  .adders {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
  }
  .btn:disabled,
  .btn[aria-disabled="true"] {
    border-color: var(--field);
    background: var(--field);
    color: var(--text-soft);
    cursor: not-allowed;
  }
}

@layer components {
  /* v2's field: white, a strong hairline, 8px corners, 40px tall, on any ground. */
  .field {
    width: 100%;
    min-height: 4rem;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--line-input);
    border-radius: var(--r-control);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: var(--text-15);
    line-height: var(--leading-15);
    transition:
      background-color var(--quick) var(--ease),
      border-color var(--quick) var(--ease),
      box-shadow var(--quick) var(--ease);
  }
  .field::placeholder {
    color: var(--text-muted);
  }
  .field:hover {
    border-color: var(--text-muted);
  }
  .field:focus {
    outline: 0;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgb(var(--focus-rgb) / 0.2);
  }
  select.field {
    appearance: none;
    padding-right: 4rem;
    padding-left: 1.6rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2366666e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.4rem center;
  }
  /* The small field, for a table's footer or toolbar: v2's "Rows" picker. */
  .field--small {
    min-height: 2.8rem;
    padding: 0.4rem 0.8rem;
    border-color: var(--line);
    border-radius: 0.6rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  select.field.field--small {
    padding-right: 2.6rem;
    padding-left: 0.8rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    background-position: right 0.6rem center;
    background-size: 1.2rem;
  }
  .field--inline {
    width: auto;
  }
  .field.mono {
    font-family: var(--mono);
    font-size: var(--text-13);
    line-height: var(--leading-14);
  }
  .field--short {
    max-width: 44rem;
  }
  textarea.field {
    resize: vertical;
    line-height: 1.5;
  }
  .field-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--error);
  }
  .field-error[hidden] {
    display: none;
  }
  .field-error .icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
  }
  .field[aria-invalid="true"] {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-soft);
  }
  .field[aria-invalid="true"]:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }
  .phone-field {
    position: relative;
    display: flex;
    gap: 0.6rem;
  }
  .phone-field .phone-flag {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 1.2rem;
    translate: 0 -50%;
    pointer-events: none;
  }
  .phone-field .phone-flag:not([hidden]) + .phone-country {
    padding-inline-start: 3.8rem;
  }
  .phone-field .field_with_errors {
    display: contents;
  }
  .phone-field .phone-country {
    flex: 0 1 auto;
    width: auto;
    max-width: 26rem;
  }
  .phone-field .phone-number {
    flex: 1;
    min-width: 12rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
  }
  .phone-field.is-invalid .phone-number {
    outline: 2px solid var(--error);
    outline-offset: -2px;
  }
  input[type="file"].field {
    max-width: 64rem;
    min-height: 7.2rem;
    padding: 1.4rem 1.6rem;
    border-style: dashed;
    border-radius: var(--radius-inner);
    background: var(--field);
    color: var(--ink-2);
    cursor: pointer;
  }
  input[type="file"].field::file-selector-button {
    margin-right: 1.2rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-button);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    cursor: pointer;
  }
  input[type="file"].field:hover::file-selector-button {
    border-color: var(--ink-3);
  }
  .field.copy {
    border-radius: var(--radius-inner);
    font-family: var(--mono);
    font-size: var(--text-13);
    line-height: var(--leading-14);
    white-space: pre-wrap;
    background: var(--screen-soft);
  }
  .copy-wrap {
    position: relative;
    display: block;
  }
  .copy-wrap > .field {
    display: block;
  }
  .copy-wrap.is-painted > .field {
    color: transparent;
    caret-color: var(--ink);
  }
  .copy-backdrop {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    padding: 0.8rem 1.2rem;
    border: 1px solid transparent;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink);
    pointer-events: none;
  }
  .copy-wrap:has(> .field.mono) > .copy-backdrop {
    font-family: var(--mono);
    font-size: var(--text-13);
    line-height: var(--leading-14);
  }
  .copy-wrap:has(> .field.copy) > .copy-backdrop {
    font-family: var(--mono);
    font-size: var(--text-13);
    line-height: var(--leading-14);
    white-space: pre-wrap;
    overflow-wrap: break-word;
  }
  .copy-wrap.is-line > .copy-backdrop {
    display: flex;
    align-items: center;
    white-space: pre;
  }
  .copy-wrap.is-line > .copy-backdrop > span {
    flex: none;
  }
  .copy-backdrop mark {
    border-radius: 3px;
    background: var(--input-soft);
    color: var(--input-ink);
    box-shadow: 0 0 0 1px var(--input-soft);
  }
  .copy-menu {
    position: absolute;
    z-index: 5;
    top: calc(100% + 0.3rem);
    left: 0;
    min-width: min(26rem, 100%);
    max-width: 100%;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-float);
  }
  .copy-menu li {
    display: flex;
    border-radius: 4px;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.4rem 0.8rem;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink);
    cursor: pointer;
  }
  .copy-menu li[aria-selected="true"] {
    background: var(--input-soft);
    color: var(--input-ink);
  }
  .copy-menu small {
    overflow: hidden;
    font-family: var(--sans);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .copy-insert > .list-available {
    margin-top: 0.6rem;
  }
  .copy-insert > .copy-find {
    margin-top: 0.8rem;
    max-width: 32rem;
  }
  .copy-new {
    display: none;
    border-style: dashed;
    cursor: pointer;
  }
  .copy-more {
    border-style: dashed;
    color: var(--ink-3);
    cursor: pointer;
  }
  form[data-copy-field-creates-value="true"] .copy-new {
    display: inline-flex;
  }
  form:not([data-copy-field-creates-value="true"]) .copy-insert > .list-available:not(:has(.pill:not(.copy-new))) {
    display: none;
  }
  .copy-compose {
    margin-top: 1rem;
    padding: 1.2rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-card);
  }
  .copy-compose > * + * {
    margin-top: 1rem;
  }
  .menu-preview {
    margin-top: 1.4rem;
  }
  .menu-preview-screen {
    min-height: 5rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--screen-line);
    border-radius: var(--r-control);
    background: var(--screen-bg);
    color: var(--screen-ink);
    font-family: var(--mono);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .menu-preview-screen:empty::before {
    content: "…";
    color: var(--ink-3);
  }
  .list-step {
    margin: 1.4rem 0 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink);
  }
  .list-method {
    flex: 0 0 11rem;
  }
  .list-sample {
    display: grid;
    gap: 0.6rem;
    justify-items: start;
    margin: 0.4rem 0 1.2rem;
    padding: 1rem 1.2rem;
    border: 1px dashed var(--line);
    border-radius: var(--r-card);
  }
  .list-sample .stacked {
    width: 100%;
  }
  .answer-rule .pair-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
  .answer-rule-written {
    display: grid;
    gap: 0.8rem;
  }
  .answer-rule-suggest {
    justify-self: start;
    margin-top: 0.4rem;
  }
  .answer-rule-try {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--line);
  }
  .answer-rule-verdict {
    margin: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .answer-rule-verdict[data-state="pass"] {
    color: var(--success-text);
  }
  .answer-rule-verdict[data-state="fail"] {
    color: var(--warning);
  }
  .answer-rule-verdict[data-state="error"] {
    color: var(--danger-text);
  }
  .menu-preview-key {
    padding: 0 0.5rem;
    border-radius: var(--r-control);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .source {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    tab-size: 2;
    white-space: pre;
    overflow: auto;
    min-height: 24rem;
  }
  .stacked {
    display: block;
    min-width: 0;
  }
  /* A setting that is on or off: its words on the left, the switch on the right, what it does underneath. */
  .setting-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    font-size: var(--text-14);
    cursor: pointer;
  }
  .check {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.2rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    cursor: pointer;
  }
  .check input {
    width: 1.7rem;
    height: 1.7rem;
    margin: 0;
    accent-color: var(--focus);
  }
  .fields {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  }
  /* Short fields take their label on the left, so a pair is one line. */
  .fields.is-aside {
    gap: 0.8rem 1.6rem;
  }
  .fields.is-aside > .stacked {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
  }
  .fields.is-aside > .stacked > .label {
    margin: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    color: var(--ink-2);
  }
  .continue-offer {
    display: none;
    grid-column: 1 / -1;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  }
  .fields:has(option[value="continue"]:checked) .continue-offer {
    display: grid;
  }
  .continue-offer .hint {
    grid-column: 1 / -1;
    margin: 0;
  }
  .tip {
    display: inline-flex;
    align-items: center;
    height: 1.2rem;
    margin-left: 0.2rem;
    vertical-align: -0.1rem;
  }
  .tip-open {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink-3);
    cursor: pointer;
  }
  .tip-open:hover,
  .tip-open[aria-expanded="true"] {
    color: var(--ink);
  }
  .tip-open:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
  }
  .tip-open .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .tip-body {
    position: fixed;
    z-index: 40;
    width: max-content;
    max-width: min(32rem, calc(100vw - 1.6rem));
    padding: 1rem 1.4rem;
    border-radius: var(--r-card);
    background: var(--inverse);
    color: var(--on-inverse);
    font-size: var(--text-12);
    font-weight: 400;
    line-height: var(--leading-12);
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: normal;
    box-shadow: var(--shadow-float);
  }
  .tip-body::before {
    content: "";
    position: absolute;
    left: calc(var(--tip-caret, 50%) - 0.6rem);
    width: 1.2rem;
    height: 1.2rem;
    background: inherit;
    rotate: 45deg;
  }
  .tip-body[data-side="below"]::before {
    top: -0.5rem;
  }
  .tip-body[data-side="above"]::before {
    bottom: -0.5rem;
  }
  .tip-line {
    display: block;
  }
  .tip-line + .tip-line:not([hidden]) {
    margin-top: 0.6rem;
  }
  .tip-body a {
    color: inherit;
  }
  .tip-body code {
    background: color-mix(in srgb, var(--on-inverse) 16%, transparent);
    color: inherit;
  }
  .check-line {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }
  .check-line .check {
    margin-top: 0;
  }
  .check-line {
    margin-top: 1.2rem;
  }
  .request-business {
    display: grid;
    gap: 1.2rem;
    min-width: 0;
    margin: 0;
    padding: 1.6rem 0 0;
    border: 0;
    border-top: 1px solid var(--line);
  }
  .request-business legend {
    float: left;
    width: 100%;
    margin: 0 0 0.2rem;
    padding: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    color: var(--ink);
  }
  .request-business > .hint {
    clear: both;
    margin: 0;
  }
  .request-business .stacked .hint {
    display: block;
  }
  .new-target {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.4rem;
    align-items: center;
  }
  .new-target .field {
    min-width: 0;
  }
  .new-target select.field {
    width: auto;
  }

  /* Tabs in a sunk well, the current one raised on a white face with a hairline round it. */
  .segmented {
    display: inline-flex;
    gap: 0.2rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.3rem;
    border-radius: var(--r-control);
    background: var(--well);
  }
  .segment {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0.6rem;
    color: var(--text-muted);
    font-size: var(--text-13);
    line-height: 1.6rem;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    white-space: nowrap;
  }
  .segment:hover {
    color: var(--ink);
  }
  .segment.is-active {
    background: var(--surface);
    box-shadow:
      0 0 0 1px var(--line-strong),
      var(--shadow-raised);
    color: var(--ink);
    font-weight: var(--weight-medium);
  }
  .segment:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
  }
}

@layer components {
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--text-12);
    font-weight: var(--weight-medium);
    line-height: var(--leading-12);
    white-space: nowrap;
    vertical-align: middle;
  }
  button.pill {
    font-family: inherit;
    cursor: pointer;
  }
  button.pill:hover {
    border-color: var(--line-strong);
  }
  .pill.is-off {
    border-color: var(--warning-line);
    background: var(--warning-soft);
    color: var(--ink);
  }
  .pill.is-off .icon {
    width: 1.3rem;
    height: 1.3rem;
    color: var(--warning);
  }
  /* A pill stays grey; its tone is a mark before the word, a square for a kind and a dot for a state. */
  .pill:is(
      .is-menu,
      .is-input,
      .is-router,
      .is-end,
      .is-message,
      .is-form,
      .is-wait,
      .is-agent,
      .is-ok,
      .is-warned,
      .is-warning,
      .is-broken,
      .is-error,
      .is-unknown,
      .is-going,
      .is-sending,
      .is-quiet,
      .is-demo
    )::before {
    content: "";
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 1px;
    background: var(--pill-tone, var(--ink-3));
  }
  .pill.is-menu {
    --pill-tone: var(--menu);
  }
  .pill.is-input {
    --pill-tone: var(--input);
  }
  .pill.is-router {
    --pill-tone: var(--router);
  }
  .pill.is-end {
    --pill-tone: var(--end);
  }
  .pill.is-message {
    --pill-tone: var(--message);
  }
  .pill.is-form {
    --pill-tone: var(--form);
  }
  .pill.is-wait {
    --pill-tone: var(--wait);
  }
  .pill.is-agent {
    --pill-tone: var(--workflow);
  }
  .pill:is(.is-ok, .is-warned, .is-warning, .is-broken, .is-error, .is-unknown, .is-going, .is-sending, .is-quiet)::before {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
  }
  /* A state is v2's tag: a tint of its colour, a dot and the word in the colour's text tone. */
  .pill.is-ok {
    --pill-tone: var(--success);
    border-color: transparent;
    background: var(--tint-success);
    color: var(--success-text);
  }
  .pill.is-warned,
  .pill.is-warning {
    --pill-tone: var(--attention);
    border-color: transparent;
    background: var(--tint-attention);
    color: var(--attention-text);
  }
  .pill.is-broken,
  .pill.is-error,
  .pill.is-unknown {
    --pill-tone: var(--danger);
    border-color: transparent;
    background: var(--tint-danger);
    color: var(--danger-text);
  }
  .pill.is-going {
    --pill-tone: var(--router);
  }
  .pill.is-sending {
    --pill-tone: var(--ink);
    border-color: var(--ink-2);
    color: var(--ink);
  }
  .pill.is-quiet {
    --pill-tone: var(--text-muted);
    border-color: transparent;
    background: var(--tint-neutral);
    color: var(--text-muted);
  }
  .pill.is-unchecked {
    border-style: dashed;
  }
  .pill.is-suggestion {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  /* A workflow's kind reads as a word with its colour on the icon, as the site draws a step. */
  .channel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
  }
  .channel .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .channel.is-ussd .icon {
    color: var(--ussd);
  }
  .channel.is-whatsapp .icon {
    color: var(--whatsapp-brand);
  }
  .channel.is-sms .icon {
    color: var(--menu);
  }
  .channel.is-workflow .icon {
    color: var(--workflow);
  }

  .serving-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin: 2.4rem 0 1.6rem;
  }
  .filter-set {
    display: inline-flex;
    gap: 0.6rem;
  }
  .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: var(--size-small);
    padding: 0 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-regular);
    text-decoration: none;
    white-space: nowrap;
  }
  .filter-chip:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
    color: var(--ink);
  }
  .filter-chip .icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  .filter-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: var(--router);
  }
  .screen-filter .filter-dot {
    flex: none;
  }
  .filter-dot.is-ussd {
    background: var(--ussd);
  }
  .filter-dot.is-whatsapp {
    background: var(--whatsapp-brand);
  }
  .filter-dot.is-sms {
    background: var(--menu);
  }
  .filter-dot.is-workflow {
    background: var(--workflow);
  }
  .filter-dot.is-staging {
    background: var(--router);
  }
  .filter-dot.is-live {
    background: var(--ok);
  }
  .filter-dot.is-errors {
    background: var(--error);
  }
  .filter-dot.is-unpublished {
    background: var(--line-strong);
  }
  .filter-dot.is-delivered {
    background: var(--ok);
  }
  .filter-dot.is-going {
    background: var(--router);
  }
  .filter-dot.is-failed {
    background: var(--error);
  }
  .filter-chip.is-on {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-primary);
  }
  .filter-chip.is-whatsapp.is-on {
    background: var(--whatsapp);
    color: var(--on-accent);
  }
  .filter-clear {
    margin-left: 0.4rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .filter-menu .toggle {
    gap: 0.5rem;
  }
  .filter-menu-name {
    color: var(--ink-3);
    font-weight: var(--weight-medium);
  }
  .filter-menu .toggle .filter-dot {
    opacity: 1;
  }
  .filter-menu.is-set .toggle {
    border-color: var(--ink-3);
    background: var(--surface-2);
  }
  .filter-menu .toggle > .icon {
    width: 1.3rem;
    height: 1.3rem;
    color: var(--ink-3);
  }
  .filter-menu .toggle > .icon:last-child {
    transition: rotate var(--quick) var(--ease);
  }
  .filter-menu[open] .toggle > .icon:last-child {
    rotate: 180deg;
  }
  .filter-menu .menu-items {
    left: 0;
    right: auto;
    display: flex;
    flex-direction: column;
    min-width: 22rem;
    gap: 0.2rem;
  }
  .filter-menu .menu-items > a {
    padding: 0.6rem 0.9rem;
    border: 0;
    border-radius: var(--r-control);
    background: transparent;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-medium);
  }
  .filter-menu .menu-items > a:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .filter-menu .menu-items > :is(a.is-active, a.is-on) {
    background: var(--surface-2);
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .filter-menu .menu-items > a.is-whatsapp.is-on {
    background: var(--surface-2);
    color: var(--ink);
  }
  .filter-across {
    margin-left: auto;
  }
  .filter-count {
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
  }

  .status {
    flex: 0 0 auto;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-3);
  }
  .count {
    display: inline-grid;
    font-variant-numeric: tabular-nums;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: var(--text-12);
    font-weight: var(--weight-strong);
    line-height: 1;
    color: var(--ink-2);
  }
  .count.is-error {
    background: var(--error-soft);
    border-color: transparent;
    color: var(--error);
  }
  .count.is-warning {
    background: var(--warning-soft);
    border-color: transparent;
    color: var(--warning);
  }
  .ok-mark {
    flex: none;
    width: 1.8rem;
    height: 1.8rem;
    color: var(--ok);
    vertical-align: -0.35rem;
  }

  /* A value in words, with the sample it stands for; a blank the team still has to fill. */
  .value-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    padding: 0.3rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--kind-router) 20%, transparent);
    border-radius: var(--radius-chip);
    background: color-mix(in srgb, var(--kind-router) 8%, transparent);
    color: light-dark(#0b5fa0, #7cc4fa);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
  }
  .value-chip-words {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .value-chip-sample {
    flex: none;
    color: var(--text-muted);
    font-weight: var(--weight-regular);
  }
  .value-chip.is-blank {
    padding: 0.4rem 1rem;
    border-color: var(--fill-blank-line);
    background: var(--fill-blank);
    color: var(--fill-blank-text);
  }
  .value-chip.is-blank .icon {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
  }
  /* Where a workflow stands: a draft not yet live. */
  .state-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--text) 5%, transparent);
    color: var(--text-muted);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    white-space: nowrap;
  }
  .state-badge::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: currentColor;
  }
  .state-badge.is-live {
    background: color-mix(in srgb, var(--success) 10%, transparent);
    color: var(--success-text);
  }
}

@layer components {
  .toasts {
    position: fixed;
    top: 8rem;
    right: 1.6rem;
    z-index: 30;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.8rem;
    width: min(40rem, calc(100vw - 3.2rem));
    pointer-events: none;
  }
  .toasts:empty {
    display: none;
  }
  /* In the editor a toast rises from the bottom, so it never covers the actions at the top right. It centres on the
     canvas left between open panels, and stands clear of the dock and the prompt to try it. */
  .workspace > .toasts {
    --aside: 0px;
    --below: 0px;
    position: absolute;
    top: auto;
    right: calc(var(--aside) + var(--gap));
    bottom: calc(var(--below) + var(--gap) + 10.4rem);
    left: var(--gap);
    flex-direction: column;
    align-items: center;
    width: auto;
    transition:
      right var(--settle) var(--ease),
      bottom var(--settle) var(--ease);
  }
  .workspace > .toasts > .flash {
    width: min(40rem, 100%);
  }
  .workspace.is-resizing > .toasts {
    transition: none;
  }
  .workspace.has-dock > .toasts {
    --below: var(--dock-height);
  }
  .workspace.has-phone > .toasts {
    --aside: calc(var(--phone-width) + var(--gap));
  }
  .workspace.has-inspector > .toasts {
    --aside: calc(var(--inspector-width) + var(--gap));
  }
  .workspace.has-inspector.has-phone > .toasts {
    --aside: calc(var(--inspector-width) + var(--phone-width) + 2 * var(--gap));
  }
  @media (max-width: 979px) {
    .workspace > .toasts,
    .workspace.has-phone > .toasts,
    .workspace.has-inspector > .toasts,
    .workspace.has-inspector.has-phone > .toasts {
      --aside: 0px;
    }
  }
  @media (max-width: 600px) {
    .toasts,
    .workspace > .toasts {
      top: auto;
      bottom: 1.6rem;
      right: 1.6rem;
      left: 1.6rem;
      width: auto;
      flex-direction: column;
      align-items: stretch;
    }
    .workspace > .toasts > .flash {
      width: auto;
    }
  }
  .flash {
    position: fixed;
    top: 8rem;
    right: 1.6rem;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: min(40rem, calc(100vw - 3.2rem));
    padding: 1.2rem 1.4rem;
    border-radius: var(--r-card);
    background: #16181d;
    color: #ffffff;
    font-size: var(--text-13);
    line-height: var(--leading-13);
    font-weight: var(--weight-regular);
    box-shadow: var(--shadow-dialog);
  }
  .toasts > .flash {
    position: static;
    max-width: 100%;
    pointer-events: auto;
    animation: toast-in var(--settle) var(--ease);
  }
  .toasts > .flash.is-leaving {
    animation: toast-out var(--brief) var(--leave) forwards;
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateX(1.6rem);
    }
  }
  @keyframes toast-out {
    to {
      opacity: 0;
      transform: translateX(1.6rem);
    }
  }
  @media (max-width: 600px) {
    @keyframes toast-in {
      from {
        opacity: 0;
        transform: translateY(1.2rem);
      }
    }
    @keyframes toast-out {
      to {
        opacity: 0;
        transform: translateY(1.2rem);
      }
    }
  }
  .flash-close {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: var(--r-control);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: var(--text-16);
    line-height: 1;
    opacity: 0.6;
    cursor: pointer;
  }
  .flash-close:hover,
  .flash-close:focus-visible {
    opacity: 1;
    background: color-mix(in srgb, currentColor 14%, transparent);
  }
  .flash::before {
    content: "";
    flex: 0 0 auto;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--success);
  }
  .flash.is-error::before {
    background: var(--danger);
  }
  .flash.is-warning::before {
    background: var(--attention);
  }
  .flash.is-inline {
    inset: auto;
    transform: none;
    display: block;
    z-index: auto;
    max-width: none;
    margin: 0 0 1.6rem;
    padding: 0.9rem 1.2rem;
    padding-left: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    box-shadow: none;
    background: var(--surface);
    color: var(--ink);
    --accent: var(--line-strong);
    position: relative;
    overflow: clip;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .flash.is-inline::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--accent);
    pointer-events: none;
  }
  .flash.is-inline::before {
    display: none;
  }
  .flash.is-inline.is-warning {
    background: var(--warning-soft);
    border-color: var(--warning-line);
    --accent: var(--warning);
  }
  .flash.is-inline.is-error {
    background: var(--error-soft);
    border-color: var(--error-line);
    --accent: var(--error);
  }
  .flash.is-inline.is-info {
    background: var(--surface);
    --accent: var(--info);
  }
  /* Carbon's actionable inline notification: its icon, a title, what to do, then the buttons that do it. */
  .flash.is-inline.has-action {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem 1.2rem;
  }
  .flash.is-inline.has-action > .icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    margin-top: 0.2rem;
    color: var(--accent);
  }
  .flash.is-inline.has-action .flash-text {
    display: grid;
    flex: 1 1 24rem;
    gap: 0.2rem;
  }
  .flash.is-inline.has-action .flash-text p {
    margin: 0;
  }
  .flash.is-inline .flash-buttons {
    display: flex;
    flex: 1 0 100%;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding-left: 2.8rem;
    box-sizing: border-box;
  }
  .flash.is-inline.is-success {
    background: var(--ok-soft);
    border-color: var(--ok-line);
    --accent: var(--ok);
  }
  .flash code {
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .flash ul {
    margin: 0.4rem 0 0;
    padding-left: 2rem;
  }
  .flash-title {
    margin: 0;
    font-weight: var(--weight-strong);
  }
  .flash.has-action .flash-action {
    margin-left: auto;
  }
  .flash.has-action .flash-close {
    margin-left: 0;
  }
  .flash-text {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .flash-action {
    flex: none;
    padding: 0.4rem 1.1rem;
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
    border-radius: var(--r-control);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    cursor: pointer;
  }
  .flash-action:hover {
    background: color-mix(in srgb, currentColor 14%, transparent);
    border-color: color-mix(in srgb, currentColor 50%, transparent);
  }
}

@layer components {
  /* Card internals use px so saved positions survive root font changes. */
  .journey {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--canvas);
  }
  .journey-float {
    position: absolute;
    left: var(--gap, 1.2rem);
    right: var(--gap, 1.2rem);
    z-index: 4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: none;
  }
  .journey-float > * {
    pointer-events: auto;
  }
  .journey-float.is-bottom {
    bottom: var(--gap, 1.2rem);
    justify-content: flex-end;
  }
  .journey-search {
    position: absolute;
    left: calc(100% + 0.6rem);
    top: auto;
    bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 4rem;
    padding: 0 0.6rem 0 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-float);
  }
  .journey-search:focus-within {
    border-color: var(--focus);
    box-shadow:
      0 0 0 3px rgb(var(--focus-rgb) / 0.15),
      var(--shadow-float);
  }
  .journey-search > .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--ink-3);
  }
  .search-field {
    width: 18rem;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink);
  }
  .search-field::-webkit-search-cancel-button {
    display: none;
  }
  .journey-search kbd {
    margin-left: auto;
  }
  .search-results {
    left: 0;
    right: auto;
    position: absolute;
    top: calc(100% + 0.4rem);
    width: min(36rem, 80vw);
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-float);
  }
  .search-result {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 0;
    border-radius: var(--r-control);
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .search-result .kind-icon {
    width: 15px;
    height: 15px;
  }
  .search-result:hover,
  .search-result.is-active {
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .search-id {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .search-copy {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .search-empty {
    padding: 0.6rem 0.8rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .journey.is-searching .node:not(.is-match),
  .journey.is-searching .journey-edges {
    opacity: 0.25;
  }
  .node.is-found {
    animation: node-found 1s ease-out;
  }
  @keyframes node-found {
    0%,
    30% {
      box-shadow:
        0 0 0 6px rgb(var(--focus-rgb) / 0.35),
        var(--shadow-float);
      border-color: var(--focus);
    }
    100% {
      box-shadow: 0 1px 2px rgb(var(--shade) / 0.05);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .node.is-found {
      animation: none;
      outline: 2px solid var(--focus);
      outline-offset: 3px;
    }
  }
  .palette {
    display: grid;
    gap: 0.2rem;
  }
  .zoom {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    height: var(--float-control, 3.8rem);
    padding: 0 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--island);
    box-shadow: var(--shadow-segment);
    backdrop-filter: blur(10px);
  }
  .zoom form {
    display: inline;
  }
  .zoom .tool,
  .zoom .journey-help > .tool {
    display: inline-grid;
    place-items: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.6rem;
  }
  .zoom-level {
    min-width: 4.8rem;
    text-align: center;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
  }
  .journey-help {
    position: relative;
  }
  .journey-help > summary .icon {
    width: 18px;
    height: 18px;
  }
  .journey-help > summary {
    display: grid;
    place-items: center;
    list-style: none;
    cursor: pointer;
  }
  .journey-help > summary::-webkit-details-marker {
    display: none;
  }
  .journey-help[open] > summary {
    color: var(--ink);
    border-color: var(--line-strong);
  }
  .journey-help > p {
    bottom: 4.4rem;
    top: auto;
    position: absolute;
    right: 0;
    width: min(34rem, 70vw);
    margin: 0;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    box-shadow: var(--shadow-float);
  }
  .chip {
    position: relative;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 0;
    border-radius: var(--r-control);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    cursor: grab;
    user-select: none;
  }
  .chip-label {
    position: absolute;
    left: calc(100% + 1.2rem);
    top: 50%;
    z-index: 20;
    display: grid;
    gap: 0.1rem;
    padding: 0.6rem 1rem;
    border-radius: var(--r-control);
    background: var(--inverse);
    color: var(--on-inverse);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    box-shadow: var(--shadow-float);
    pointer-events: none;
    opacity: 0;
    transform: translate(-0.4rem, -50%);
    transition:
      opacity var(--quick) var(--ease),
      transform var(--quick) var(--ease);
  }
  .chip-label strong {
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .chip:hover .chip-label,
  .chip:focus-visible .chip-label {
    opacity: 1;
    transform: translate(0, -50%);
    transition-delay: 0.15s;
  }
  @media (max-width: 879px) {
    .chip-label {
      display: none;
    }
  }
  .context-menu {
    position: fixed;
    inset: auto;
    margin: 0;
    z-index: 30;
    min-width: 22rem;
    color: var(--ink);
  }
  .context-menu:not([open]) {
    display: none;
  }
  .context-group {
    display: grid;
  }
  .context-group[hidden],
  .context-menu .menu-item[hidden] {
    display: none;
  }
  .context-menu .menu-item kbd {
    margin-left: auto;
  }
  .chip .kind-icon {
    width: 1.8rem;
    height: 1.8rem;
  }
  .chip:hover {
    background: var(--surface-2);
  }
  .chip:active {
    cursor: grabbing;
  }
  .journey-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    background-color: var(--canvas);
    background-image: radial-gradient(rgb(var(--ink-rgb) / 0.16) 1px, transparent 1.2px);
    background-size: 18px 18px;
  }
  .journey-viewport.is-panning {
    cursor: grabbing;
  }
  .journey-canvas {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
  }
  .journey-canvas.is-zooming {
    will-change: transform;
  }
  .journey-canvas.is-unplaced {
    opacity: 0;
    pointer-events: none;
  }
  .journey-edges {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
  }
  .journey-edges:not(.is-lit-layer) {
    will-change: opacity;
  }
  /* Culled: keeps its place and size, and is not painted. */
  .node.is-culled,
  .cord.is-culled {
    visibility: hidden;
  }
  .node.is-culled:is(.is-selected, .is-dragging, .is-drop-target, .is-current, .is-found) {
    visibility: visible;
  }

  .cord-sheath {
    display: none;
  }
  .cord-core {
    fill: none;
    stroke: var(--ink-3);
    stroke-width: 2;
    stroke-linecap: round;
  }
  .plug {
    fill: var(--ink-3);
  }
  .plug.is-faded {
    fill-opacity: 0.5;
  }
  .plug.is-menu {
    fill: var(--menu);
  }
  .plug.is-input {
    fill: var(--input);
  }
  .plug.is-router {
    fill: var(--router);
  }
  .plug.is-end {
    fill: var(--end);
  }
  .plug.is-message {
    fill: var(--message);
  }
  .plug.is-form {
    fill: var(--form);
  }
  .plug.is-wait {
    fill: var(--wait);
  }
  .plug.is-agent {
    fill: var(--workflow);
  }
  .cord.is-menu .cord-core {
    stroke: var(--menu);
  }
  .cord.is-input .cord-core {
    stroke: var(--input);
  }
  .cord.is-router .cord-core {
    stroke: var(--router);
  }
  .cord.is-end .cord-core {
    stroke: var(--end);
  }
  .cord.is-message .cord-core {
    stroke: var(--message);
  }
  .cord.is-form .cord-core {
    stroke: var(--form);
  }
  .cord.is-wait .cord-core {
    stroke: var(--wait);
  }
  .cord.is-agent .cord-core {
    stroke: var(--workflow);
  }
  /* Faded by the stroke rather than by the group: a group's half-opacity costs an offscreen layer for every link. */
  .cord.is-back .cord-core {
    stroke-opacity: 0.5;
    stroke-dasharray: 4 4;
  }
  .journey-canvas.is-moving .cord.is-back .cord-core {
    stroke-dasharray: none;
  }
  .is-focusing .journey-edges:not(.is-lit-layer) {
    opacity: 0.15;
  }
  .cord.is-lit .cord-core {
    stroke-width: 2.4;
    stroke-opacity: 1;
    stroke-dasharray: none;
  }
  .cord-core.is-wire {
    stroke: var(--focus);
    stroke-width: 2;
    stroke-dasharray: 6 4;
  }

  .node {
    position: absolute;
    left: 0;
    top: 0;
    contain: layout style;
    width: 232px;
    border: 1px solid color-mix(in srgb, var(--ink) 13%, transparent);
    border-radius: 10px;
    background: var(--surface);
    font-size: 12.5px;
    line-height: 1.4;
    box-shadow:
      0 1px 2px rgb(var(--shade) / 0.06),
      0 8px 18px -12px rgb(30 40 60 / 0.35);
    cursor: grab;
    user-select: none;
    transition:
      box-shadow var(--quick) var(--ease),
      border-color var(--quick) var(--ease);
  }
  .node:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-float);
  }
  .node:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
  }
  .node.is-dragging {
    z-index: 3;
    cursor: grabbing;
    box-shadow: 0 14px 34px rgb(var(--shade) / 0.2);
    transition: none;
  }
  .node.is-drop-target {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgb(var(--focus-rgb) / 0.25);
  }
  .node.has-warning {
    border-color: var(--warning-line);
  }
  .node.has-error {
    border-color: var(--error-line);
  }
  .node-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    padding: 8px 10px 7px;
    border-bottom: 1px solid color-mix(in srgb, var(--kind, var(--line-strong)) 22%, var(--line));
    border-radius: 9px 9px 0 0;
    background: color-mix(in srgb, var(--kind, var(--line-strong)) 14%, var(--surface));
  }
  .node:empty {
    background: color-mix(in srgb, var(--kind, var(--line-strong)) 14%, var(--surface));
  }
  .node.is-menu {
    --kind: var(--menu);
    --kind-soft: var(--menu-soft);
  }
  .node.is-input {
    --kind: var(--input);
    --kind-soft: var(--input-soft);
  }
  .node.is-router {
    --kind: var(--router);
    --kind-soft: var(--router-soft);
  }
  .node.is-end {
    --kind: var(--end);
    --kind-soft: var(--end-soft);
  }
  .node.is-message {
    --kind: var(--message);
    --kind-soft: var(--message-soft);
  }
  .node.is-form {
    --kind: var(--form);
    --kind-soft: var(--form-soft);
  }
  .node.is-wait {
    --kind: var(--wait);
    --kind-soft: var(--wait-soft);
  }
  .node.is-agent {
    --kind: var(--workflow);
    --kind-soft: var(--workflow-soft);
  }
  .node.is-unknown {
    --kind: var(--error);
    --kind-soft: var(--error-soft);
  }
  .node-head .kind-icon {
    width: 15px;
    height: 15px;
  }
  .kind-icon {
    flex: 0 0 auto;
  }
  .kind-icon.is-menu {
    color: var(--menu);
  }
  .kind-icon.is-input {
    color: var(--input);
  }
  .kind-icon.is-router {
    color: var(--router);
  }
  .kind-icon.is-end {
    color: var(--end);
  }
  .kind-icon.is-message {
    color: var(--message);
  }
  .kind-icon.is-form {
    color: var(--form);
  }
  .kind-icon.is-wait {
    color: var(--wait);
  }
  .kind-icon.is-agent {
    color: var(--workflow);
  }
  .kind-icon.is-unknown {
    color: var(--error);
  }
  .node-id {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: var(--weight-strong);
  }
  .node-flag {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--wait);
    color: var(--on-accent);
    font-size: 11px;
    font-weight: var(--weight-strong);
  }
  .node-flag.is-error {
    background: var(--danger);
  }

  .node-screen {
    margin: 0 7px 7px;
    padding: 8px 10px 9px;
    border: 1px solid var(--screen-line);
    border-radius: var(--r-control);
    background: var(--screen-bg);
    color: var(--screen-ink);
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.45;
    transition:
      background-color var(--quick) var(--ease),
      border-color var(--quick) var(--ease);
  }
  .node-media {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.4rem 0 0;
    font-size: 11px;
    color: var(--screen-ink);
    opacity: 0.8;
  }
  .node-media .icon {
    width: 12px;
    height: 12px;
  }
  .node-sends {
    margin: 0.5rem 0 0;
    font-size: 11px;
    opacity: 0.65;
  }
  .node-copy {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .copy-var {
    padding: 0 3px;
    border-radius: 3px;
    background: var(--input-soft);
    color: var(--input-ink);
  }
  .copy-var.is-sample {
    border-bottom: 1px dashed currentColor;
    cursor: help;
  }
  .node-options {
    list-style: none;
    margin: 7px 0 0;
    padding: 6px 0 0;
    border-top: 1px dashed var(--screen-rule);
  }
  .node-copy:empty + .node-options,
  .node-options:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .port {
    position: relative;
  }
  .port.is-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding: 2px 0;
  }
  .node-key {
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    border: 1px solid var(--keycap-line);
    border-bottom-width: 2px;
    border-radius: var(--r-control);
    background: var(--keycap);
    font-size: 10.5px;
    font-weight: var(--weight-strong);
    line-height: 1;
  }
  .node-key.is-reply {
    border-bottom-width: 1px;
    border-radius: 999px;
  }
  .port.is-option:not(:has(.node-key)) {
    grid-template-columns: minmax(0, 1fr);
  }
  .node-key.is-reply .icon {
    width: 10px;
    height: 10px;
  }
  .port.is-option .port-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .node-answer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 7px 0 0;
    padding-top: 6px;
    border-top: 1px dashed var(--screen-rule);
    color: var(--screen-muted);
  }
  .node-answer code {
    padding: 0 3px;
    border: 0;
    background: var(--input-soft);
    color: var(--input-ink);
    font-size: 11px;
  }
  .node-caret {
    width: 8px;
    height: 14px;
    border-radius: 1px;
    background: var(--input);
    opacity: 0.75;
  }

  .node-routes {
    margin: 0;
    padding: 0 0 6px;
    list-style: none;
  }
  .node.is-router .node-routes {
    padding-bottom: 5px;
  }
  .port.is-route {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 22px;
    padding: 1px 16px 1px 12px;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
  }
  .port.is-route .port-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* A selected card unfolds: each way out shows by itself, with its own dot to drag. */
  .port-own,
  .port.is-folded,
  .node.is-selected .port-group {
    display: none;
  }
  .node.is-selected .port-own {
    display: inline;
  }
  .node.is-selected .port.is-folded {
    display: flex;
  }
  .node-end {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 10px 9px;
    font-size: 11.5px;
    color: var(--ink-3);
  }
  .node-end::before {
    content: "";
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--end);
  }
  .node-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 10px 9px;
    font-size: 11.5px;
    color: var(--ink-2);
    overflow-wrap: anywhere;
  }
  .node-label .icon {
    flex: none;
    width: 12px;
    height: 12px;
  }
  .node-done {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 10px 9px;
    font-size: 11.5px;
    color: var(--ok-ink);
  }
  .node-done .icon {
    flex: none;
    width: 12px;
    height: 12px;
  }

  .port-dot {
    position: absolute;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -5.5px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--ink-3);
    box-shadow: 0 0 0 1px var(--ink-3);
    cursor: crosshair;
    touch-action: none;
    transition: transform var(--quick) var(--ease);
  }
  .port.is-option .port-dot {
    right: -24px;
  }
  .port.is-route .port-dot {
    right: -6.5px;
  }
  .node.is-menu .port-dot {
    background: var(--menu);
    box-shadow: 0 0 0 1px var(--menu);
  }
  .node.is-input .port-dot {
    background: var(--input);
    box-shadow: 0 0 0 1px var(--input);
  }
  .node.is-router .port-dot {
    background: var(--router);
    box-shadow: 0 0 0 1px var(--router);
  }
  .port-dot:hover,
  .port.is-wiring .port-dot {
    transform: scale(1.4);
  }
  .port.is-unlinked .port-label {
    color: var(--ink-3);
    font-style: italic;
  }
  .node .port.is-unlinked .port-dot {
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--ink-3);
  }
  .port.is-missing .port-label {
    color: var(--error);
  }
  .node .port.is-missing .port-dot {
    background: var(--error);
    box-shadow: 0 0 0 1px var(--error);
  }

  .node.is-router {
    width: auto;
    min-width: 150px;
    max-width: 250px;
    border-style: dashed;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
  }
  .node.is-current {
    border-color: var(--live);
    box-shadow:
      0 0 0 3px var(--live-glow),
      var(--shadow-float);
  }
  .node.is-current .node-screen {
    background: var(--live-soft);
    border-color: var(--live-line);
  }
  .journey-trigger {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 9px;
    border-radius: 999px;
    background: var(--trigger-bg);
    color: var(--trigger-ink);
    box-shadow:
      0 0 0 1px var(--line-strong),
      var(--shadow-float);
    font-size: 12px;
    font-weight: var(--weight-strong);
    white-space: nowrap;
    box-shadow: var(--shadow-float);
    pointer-events: none;
  }
  .trigger-icon {
    width: 14px;
    height: 14px;
    color: var(--trigger-icon);
  }
  .trigger-line {
    fill: none;
    stroke: var(--ink-3);
    stroke-width: 1.6;
    stroke-dasharray: 3 4;
  }
  @media (max-width: 879px) {
    .journey-search {
      position: fixed;
      left: var(--gap);
      right: var(--gap);
      bottom: auto;
      top: 7.2rem;
    }
  }
}

@layer components {
  .modal {
    padding: 0;
    border: 0;
    background: var(--surface);
    color: var(--ink);
  }
  .modal::backdrop {
    background: var(--scrim);
  }
  .modal.panel {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(72rem, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-dialog);
    transition:
      transform var(--settle) var(--ease),
      opacity var(--settle) var(--ease);
  }
  @starting-style {
    .modal.panel[open] {
      transform: translateX(40px);
      opacity: 0;
    }
  }
  .modal-close {
    position: sticky;
    top: 1.2rem;
    float: right;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    margin: 1.2rem 1.2rem 0 0;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    font-size: var(--text-20);
    line-height: 1;
    cursor: pointer;
  }
  .modal-close:hover {
    color: var(--ink);
    border-color: var(--line-strong);
  }
  @media (max-width: 879px) {
    .modal.panel {
      inset: auto 0 0 0;
      width: 100%;
      height: 92dvh;
      border-left: 0;
      border-top: 1px solid var(--line);
      border-radius: 12px 12px 0 0;
    }
    @starting-style {
      .modal.panel[open] {
        transform: translateY(40px);
      }
    }
  }
  /* A short question, such as Connect, sits as a card in the middle rather than a panel at the side. */
  .modal.panel:has(.modal-card) {
    inset: 0;
    width: min(50rem, 100vw - 3.2rem);
    height: fit-content;
    max-height: calc(100dvh * 5 / 6 - 1.6rem);
    margin: calc(100dvh / 6) auto auto;
    border: 0;
    border-radius: var(--radius-window);
  }
  @starting-style {
    .modal.panel:has(.modal-card)[open] {
      transform: translateY(8px);
      opacity: 0;
    }
  }
  .modal.panel:has(.modal-card) > .modal-close {
    display: none;
  }
  /* Tinted by the kind it edits, as a step's head is on the canvas. */
  .panel-head {
    padding: 2.4rem 2.8rem 1.8rem;
    border-bottom: 1px solid color-mix(in srgb, var(--panel-kind, var(--line-strong)) 16%, var(--surface));
    background: color-mix(in srgb, var(--panel-kind, var(--line-strong)) 14%, var(--surface));
  }
  .panel-head.is-menu {
    --panel-kind: var(--menu);
  }
  .panel-head.is-input {
    --panel-kind: var(--input);
  }
  .panel-head.is-router {
    --panel-kind: var(--router);
  }
  .panel-head.is-end {
    --panel-kind: var(--end);
  }
  .panel-head.is-message {
    --panel-kind: var(--message);
  }
  .panel-head.is-form {
    --panel-kind: var(--form);
  }
  .panel-head.is-wait {
    --panel-kind: var(--wait);
  }
  .panel-head.is-agent {
    --panel-kind: var(--workflow);
  }
  .panel-head.is-unknown {
    --panel-kind: var(--error);
  }
  .panel-context {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.3rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-3);
  }
  .panel-context .kind-icon {
    width: 1.8rem;
    height: 1.8rem;
  }
  .panel-title {
    margin: 0;
    font-size: var(--text-18);
    font-weight: var(--weight-regular);
    line-height: var(--leading-18);
    letter-spacing: var(--tracking-18);
    overflow-wrap: anywhere;
  }
  .panel-body {
    container: panel / inline-size;
    padding: 0 2.8rem;
  }
  .panel-form {
    padding-top: 1.6rem;
  }
  /* A screen's head is in its form: the id is the title and the kind the pill. */
  .panel-form > .panel-head + .panel-body {
    padding-top: 1.6rem;
  }
  .panel-form:has(> .panel-head) {
    padding-top: 0;
  }
  .panel-context .kind-select {
    width: auto;
    min-height: 2.6rem;
    height: 2.6rem;
    padding: 0 2.4rem 0 0.9rem;
    border-radius: 999px;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-2);
    background-position: right 0.7rem center;
  }
  input.panel-title {
    display: block;
    width: calc(100% + 0.8rem);
    margin: 0 0 0 -0.4rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--r-control);
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
  }
  input.panel-title:hover {
    border-color: var(--line);
  }
  input.panel-title:focus-visible {
    outline: none;
    border-color: var(--focus);
    background: var(--surface-2);
  }
  input.panel-title::placeholder {
    color: var(--placeholder);
    font-family: var(--sans);
    font-weight: var(--weight-medium);
  }
  .danger-zone.panel-body {
    padding-top: 1.8rem;
  }
  .panel-body:not(:has(.panel-form, .panel-actions)) {
    padding-block: 1.6rem 2.4rem;
  }
  .panel-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    gap: 0.8rem;
    margin: 2.4rem -2.8rem 0;
    padding: 1.2rem 2.8rem 1.6rem;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(6px);
  }
  .danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1.8rem 0 3rem;
  }
  .danger-zone .hint {
    margin: 0;
  }
}

@layer components {
  .group {
    min-width: 0;
    margin: var(--gap-half) 0 0;
    padding: var(--gap);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .group > legend {
    float: left;
    width: 100%;
    margin: 0 0 var(--gap-half);
    padding: 0;
    font: var(--font-card);
    letter-spacing: var(--tracking-16);
  }
  .group > legend + * {
    clear: both;
  }
  .group > legend .tip {
    margin-left: 0.4rem;
    vertical-align: -0.2rem;
  }
  .more.is-rare > summary span[hidden] {
    display: none;
  }
  .group > * + * {
    margin-top: 1.1rem;
  }
  .group.subgroup {
    min-width: 0;
    margin: 1rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .group.subgroup > * + * {
    margin-top: 1rem;
  }
  .rows {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: row;
  }
  .row {
    position: relative;
    padding: 1.1rem 0 0.3rem;
    border-top: 1px solid var(--line);
  }
  .rows > .row:first-child {
    border-top: 0;
    padding-top: 0.3rem;
  }
  .rows.is-numbered > .row {
    counter-increment: row;
    padding-left: 3.8rem;
  }
  .rows.is-numbered > .row::before {
    content: counter(row);
    position: absolute;
    left: 0;
    top: 3rem;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-control);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-2);
  }
  .rows.is-numbered > .row:first-child::before {
    top: 2.2rem;
  }
  .row-grid {
    display: grid;
    gap: 0.8rem;
  }
  .row-grid .label {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-2);
    margin-bottom: 0.3rem;
  }
  .row-grid .field {
    min-height: 3.2rem;
    padding: 0.5rem 1rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .row-grid .field.mono {
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .row-tools {
    display: flex;
    justify-content: flex-end;
    gap: 0.1rem;
    margin-top: 0.3rem;
  }
  .row-handle {
    cursor: grab;
    touch-action: none;
    font-size: var(--text-14);
    line-height: 1;
  }
  .row.is-dragging {
    z-index: 2;
    border-radius: var(--r-control);
    background: var(--surface);
    box-shadow: var(--shadow-float);
  }
  /* One line an option: text, where it goes, then what is rarely touched behind "sw · key". */
  .option-grid {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 13.5rem) auto auto;
    align-items: center;
    gap: 0.6rem 0.8rem;
  }
  .option-grid > .option-language {
    grid-template-columns: minmax(0, 1fr);
  }
  .option-grid > .option-language:has(.count) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .option-more {
    grid-column: 3;
    grid-row: 1;
  }
  .option-more-button {
    height: 2.8rem;
    padding: 0 0.6rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .option-more.is-expanded .option-more-button {
    background: var(--surface-2);
    color: var(--ink);
  }
  :is(.option-grid, .phrase-grid) > .row-tools {
    grid-column: 4;
    grid-row: 1;
    margin: 0;
    opacity: 0.45;
  }
  .row:hover > :is(.option-grid, .phrase-grid) > .row-tools,
  .row:focus-within > :is(.option-grid, .phrase-grid) > .row-tools {
    opacity: 1;
  }
  .rows > .row:has(> .phrase-grid) {
    padding-block: 0.7rem;
  }
  .option-more-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 13.5rem);
    gap: 0.6rem 0.8rem;
    align-items: center;
  }
  .option-more-fields[hidden] {
    display: none;
  }
  .option-key {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
  }
  .option-key > .label {
    margin: 0;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    text-align: center;
  }
  .rows.is-numbered > .row:has(> .option-grid) {
    padding-block: 0.7rem;
  }
  .rows.is-numbered > .row:has(> .option-grid)::before {
    top: 1.2rem;
    width: 2.2rem;
    height: 2.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .option-language {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
  }
  .language-tag {
    display: inline-grid;
    place-items: center;
    height: 2.2rem;
    padding: 0 0.5rem;
    border-radius: var(--r-control);
    background: var(--router-soft);
    color: var(--router-ink);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .list-button > .label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }
  .option-language:has(.count) {
    grid-template-columns: 3.6rem minmax(0, 1fr) auto;
  }
  .count {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: 400;
    color: var(--ink-3);
  }
  .count.is-over {
    color: var(--error);
  }
  .option-description,
  .list-button {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }
  .option-description[hidden],
  .list-button[hidden] {
    display: none;
  }
  .label-aside {
    font-weight: 400;
    color: var(--ink-3);
  }
  .pair-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
  .request-grid {
    grid-template-columns: 11rem minmax(0, 1fr);
  }
  .triple-grid {
    grid-template-columns: minmax(0, 1fr) 9.6rem minmax(0, 1.2fr);
  }
  .phrase-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto auto;
    align-items: center;
    gap: 0.6rem 0.8rem;
  }
  .phrase-grid > .option-more-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .more {
    margin-top: 1.1rem;
  }
  .more > summary {
    cursor: pointer;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    color: var(--ink-2);
  }
  .more > summary:hover {
    color: var(--ink);
  }
  .more[open] > summary {
    margin-bottom: 0.9rem;
  }
  .more > * + * {
    margin-top: 1rem;
  }
  .more > summary[hidden] + * {
    margin-top: 0;
  }
  .pairs {
    margin-top: 1.1rem;
  }
  .call > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.8rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    background: var(--surface-2);
    cursor: pointer;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .call > summary:hover {
    border-color: var(--ink-3);
  }
  .call > summary {
    list-style: none;
  }
  .call > summary::-webkit-details-marker {
    display: none;
  }
  .call > summary::before {
    content: "";
    flex: none;
    align-self: center;
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid var(--ink-2);
    border-bottom: 2px solid var(--ink-2);
    rotate: -45deg;
    transition: rotate var(--quick) var(--ease);
  }
  .call[open] > summary::before {
    rotate: 45deg;
  }
  .call[open] > summary {
    margin-bottom: 1.2rem;
  }
  .call-method {
    font-weight: var(--weight-strong);
    color: var(--router-ink);
  }
  .call-method:empty,
  .call-saved:empty {
    display: none;
  }
  .call-summary code {
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    overflow-wrap: anywhere;
  }
  .call-saved {
    color: var(--ink-2);
  }
  .call-saved::before {
    content: "→ ";
  }
  .call > * + * {
    margin-top: 1rem;
  }
  .action-part-title {
    margin: 1.6rem 0 0.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-3);
  }
  .action-part-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .request-body {
    margin-top: 1.1rem;
  }
  .request-body-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .request-body-head .label {
    margin: 0;
  }
  .request-body-mode.field {
    width: auto;
    min-height: 3rem;
    padding-block: 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .request-body-part {
    min-width: 0;
    margin: 0.6rem 0 0;
    padding: 0;
    border: 0;
  }
  .request-body-part > .pairs {
    margin-top: 0;
  }
  .request-body-part > .pairs > .label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .request-body > .hint {
    margin: 0.6rem 0 0;
  }
  .action-answers {
    margin-top: 1.2rem;
  }
  .link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: var(--weight-strong);
    text-decoration: underline;
    text-underline-offset: 0.25rem;
    cursor: pointer;
  }
  .link-button:hover {
    color: var(--focus);
  }

  /* A route is a run of steps under its legend, not a box of boxes; routes part with a rule. */
  .route {
    margin-top: 0.4rem;
    padding: 0 0 0.4rem;
    border: 0;
    background: none;
  }
  .rows > .route:first-child {
    border-top: 0;
    padding-top: 0;
  }
  .rows > .route + .route {
    margin-top: 1.4rem;
    padding-top: 1.4rem;
    border-top: 2px solid var(--line);
  }
  .action .call > summary {
    padding: 0.4rem 0;
    border: 0;
    background: none;
  }
  .action .call > summary:hover {
    color: var(--ink);
  }
  .route-step + .route-step {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
  }
  .route-step > .label {
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .action {
    margin-top: 0.6rem;
    padding: 1rem 1rem 0.3rem;
    border: 1px solid var(--action-line);
    border-radius: var(--r-control);
    background: var(--action-bg);
  }
  .rows > .action:first-child {
    border-top: 1px solid var(--action-line);
    padding-top: 1rem;
  }
  .action-type {
    max-width: 24rem;
  }
  .guard-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 2fr) 10rem minmax(0, 1.3fr) auto minmax(0, 2fr);
    align-items: center;
    gap: 0.6rem;
  }
  .guard-grid .field {
    min-height: 3.2rem;
    padding: 0.5rem 1rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .guard-word {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-3);
  }
  .guard-custom {
    margin-top: 0.5rem;
  }
  .guard-custom > summary {
    width: fit-content;
    cursor: pointer;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-3);
  }
  .guard-custom > summary:hover,
  .guard-custom[open] > summary {
    color: var(--ink-2);
  }
  .guard-custom > .field {
    width: 100%;
    margin-top: 0.5rem;
    min-height: 3.2rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .list-available {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  @container panel (max-width: 60rem) {
    .guard-grid {
      grid-template-columns: auto minmax(0, 1fr) 9.5rem minmax(0, 8rem);
      row-gap: 0.5rem;
    }
    .guard-grid > :last-child {
      grid-column: 2 / -1;
    }
    .request-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    .request-grid > :first-child {
      max-width: 14rem;
    }
  }
  @container panel (max-width: 34rem) {
    .option-grid,
    .triple-grid,
    .request-grid,
    .pair-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    .guard-grid {
      grid-template-columns: auto minmax(0, 1fr);
    }
  }
  @media (max-width: 879px) {
    .panel-head {
      padding: 2rem 1.8rem 1.4rem;
    }
    .panel-body {
      padding: 0 1.6rem;
    }
    .panel-actions {
      margin: 2.4rem -1.6rem 0;
      padding: 1.2rem 1.6rem 1.6rem;
    }
    .wrap {
      padding: 1.2rem 1.6rem 6rem;
    }
  }
}

.step {
  margin-top: 0.6rem;
  padding: 1rem 1rem 0.3rem;
  border: 1px solid var(--action-line);
  border-radius: var(--r-control);
  background: var(--action-bg);
}
.rows > .step:first-child {
  border-top: 1px solid var(--action-line);
  padding-top: 1rem;
}
.step-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.step-head .connector-mark {
  width: 3.2rem;
  height: 3.2rem;
  font-size: var(--text-12);
  line-height: var(--leading-12);
}
.step-name {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.step-outcomes {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.step-outcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
}
.step-outcome-label {
  font-size: var(--text-14);
  line-height: var(--leading-14);
  color: var(--ink-2);
}
.step-began {
  margin: 0 0 0.6rem;
}
/* The words a template ran with, offered under an input the team has left empty. */
.step-suggestion {
  justify-self: start;
  margin-top: 0.4rem;
}

/* An agent's tool: each field fixed, from earlier, or the agent's to decide, shown by the checked switch alone. */
.tool-card {
  margin-top: 0.6rem;
  padding: 1rem 1rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  display: grid;
  gap: 0.8rem;
}
.tool-input {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.mode-switch {
  display: inline-flex;
  justify-self: start;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--field);
}
.mode-switch .mode {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-12);
  line-height: var(--leading-12);
  color: var(--ink-3);
  cursor: pointer;
}
.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mode-switch .mode:has(input:checked) {
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--weight-medium);
  box-shadow: var(--shadow-segment);
}
.mode-switch .mode.is-agent:has(input:checked) {
  background: var(--workflow-soft);
  color: var(--workflow-ink);
  box-shadow: none;
}
.mode-switch .mode:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.tool-input:has(.is-agent input:checked) .tool-value {
  display: none;
}
.tool-input:not(:has(.is-agent input:checked)) :is(.tool-told, .tool-limit) {
  display: none;
}
.tool-limit {
  display: grid;
  gap: 0.5rem;
}
.tool-limit > summary {
  justify-self: start;
  color: var(--link);
  font-size: var(--text-12);
  line-height: var(--leading-12);
  cursor: pointer;
  list-style: none;
}
.tool-limit > summary::-webkit-details-marker {
  display: none;
}
.tool-limit[open] > summary {
  color: var(--ink-3);
}
.tool-card .step-head {
  flex-wrap: wrap;
}
.tool-effect {
  margin-left: auto;
}
.tool-effect .icon {
  width: 1.3rem;
  height: 1.3rem;
}
.tool-card > .row-tools {
  opacity: 0.45;
  transition: opacity var(--quick) var(--ease);
}
.tool-card:is(:hover, :focus-within) > .row-tools {
  opacity: 1;
}
.tool-warning {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.result-field {
  display: grid;
  gap: 0.5rem;
}
.result-field:not(:has(option[value="one_of"]:checked)) .result-choices {
  display: none;
}

@layer components {
  .phone {
    max-width: 32rem;
  }
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .device {
    position: relative;
    margin: 0 auto;
    max-width: 30rem;
    padding: 9px;
    border-radius: 44px;
    background: #1b2320;
    box-shadow:
      inset 0 0 0 1.5px #3a4641,
      inset 0 0 0 4px #141a18,
      0 1px 2px rgb(var(--shade) / 0.1),
      0 18px 40px rgb(var(--shade) / 0.16);
  }
  .device::before,
  .device::after {
    content: "";
    position: absolute;
    width: 3px;
    border-radius: 2px;
    background: #2c3632;
  }
  .device::before {
    left: -3px;
    top: 96px;
    height: 52px;
    box-shadow: 0 64px 0 #2c3632;
  }
  .device::after {
    right: -3px;
    top: 132px;
    height: 72px;
  }
  .device-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    height: clamp(50rem, 62vh, 60rem);
    overflow: hidden;
    border-radius: 36px;
    background: var(--phone-app-bg);
    color: var(--phone-ink);
    font-family: var(--phone-font);
    -webkit-font-smoothing: antialiased;
  }
  .device-status {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
    padding: 0 20px 0 26px;
    font-size: 13px;
    font-weight: var(--weight-strong);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .device-island {
    position: absolute;
    left: 50%;
    top: 9px;
    width: 74px;
    height: 21px;
    margin-left: -37px;
    border-radius: 999px;
    background: #000;
  }
  .device-signal {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .device-signal .status-cellular {
    width: 17px;
    height: 17px;
  }
  .device-signal .status-battery {
    width: 25px;
    height: 25px;
    margin-right: -2px;
  }
  .device-body {
    position: relative;
    isolation: isolate;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .device-home {
    position: absolute;
    left: 50%;
    bottom: 7px;
    z-index: 4;
    width: 108px;
    height: 4px;
    margin-left: -54px;
    border-radius: 999px;
    background: var(--phone-ink);
  }

  .dialer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    padding: 0 0 34px;
  }
  .dialer.is-behind {
    pointer-events: none;
  }
  .dialer.is-behind .phone-note {
    visibility: hidden;
  }
  .dialer-display {
    flex: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    min-height: 0;
    padding: 0 20px;
    text-align: center;
  }
  .dialer-number {
    min-height: 38px;
    max-width: 100%;
    overflow: hidden;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .phone-note {
    max-width: 24ch;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--phone-muted);
  }
  .phone-note.is-error {
    color: #ff3b30;
  }
  .dialer > .phone-note {
    margin: auto;
  }
  .dial-pad {
    display: grid;
    grid-template-columns: repeat(3, 62px);
    grid-auto-rows: 62px;
    justify-content: center;
    gap: 12px 20px;
  }
  .dial-key {
    display: grid;
    place-content: center;
    justify-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--phone-dial-key);
    color: var(--phone-ink);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--quick) var(--ease);
  }
  .dial-key:active {
    background: var(--phone-dial-key-press);
    transition: none;
  }
  .dial-key:disabled {
    cursor: default;
  }
  .dial-digit {
    font-size: 28px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
  }
  .dial-letters {
    margin-top: 1px;
    font-size: 8px;
    font-weight: var(--weight-strong);
    letter-spacing: 0.2em;
    padding-left: 0.2em;
  }
  .dial-key.is-symbol .dial-digit {
    font-size: 32px;
    font-weight: 300;
  }
  .dial-key[aria-label="*"] .dial-digit {
    transform: translateY(9px);
    font-size: 52px;
    font-weight: 300;
  }
  .call-key {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #34c759;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .call-key .icon {
    width: 28px;
    height: 28px;
  }
  .call-key:active {
    filter: brightness(0.9);
  }
  .call-key:disabled {
    cursor: default;
  }
  .dial-delete {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--phone-dial-key-press);
    cursor: pointer;
  }
  .dial-delete .icon {
    width: 26px;
    height: 26px;
    color: var(--phone-muted);
  }
  .dial-delete[hidden] {
    display: grid !important;
    visibility: hidden;
  }

  .ussd-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 12px 0;
    background: var(--phone-dim);
  }
  .device-screen:has(.keypad) .ussd-stage {
    bottom: var(--keyboard-height);
  }
  .ussd-dialog {
    position: relative;
    width: min(100%, 222px);
    overflow: hidden;
    border-radius: 13px;
    background: var(--phone-alert);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
  }
  .ussd-message {
    padding: 16px 14px 14px;
    text-align: center;
  }
  .phone-text {
    max-height: 15rem;
    margin: 0;
    overflow: auto;
    font-size: 13px;
    line-height: 1.33;
    color: var(--phone-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .ussd-detail {
    max-height: 8rem;
    margin: 8px 0 0;
    padding: 6px 8px;
    overflow: auto;
    border-radius: 6px;
    background: var(--error-soft);
    color: var(--error-ink);
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.4;
    text-align: left;
    white-space: pre-wrap;
  }
  .ussd-reply {
    margin-top: 12px;
  }
  .ussd-input {
    box-sizing: border-box;
    width: 100%;
    height: 26px;
    padding: 0 6px;
    border: 0.5px solid var(--phone-field-line);
    border-radius: 6px;
    background: var(--phone-field);
    color: var(--phone-ink);
    font: inherit;
    font-size: 13px;
    caret-color: var(--phone-link);
  }
  .ussd-input:focus {
    outline: none;
  }
  .ussd-input::placeholder {
    color: var(--phone-muted);
  }
  .ussd-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 0.5px solid var(--phone-alert-line);
  }
  .ussd-buttons.is-single {
    grid-template-columns: 1fr;
  }
  .ussd-buttons > * + * {
    border-left: 0.5px solid var(--phone-alert-line);
  }
  .ussd-buttons .button_to {
    display: block;
  }
  .ussd-button {
    width: 100%;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--phone-link);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
  }
  .ussd-button.is-primary {
    font-weight: var(--weight-strong);
  }
  .ussd-button:active {
    background: var(--phone-alert-press);
  }
  .ussd-progress {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    background: var(--phone-veil);
    font-size: 13px;
    color: var(--phone-muted);
  }
  turbo-frame#simulator[busy] .ussd-progress {
    display: flex;
  }
  .ussd-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--phone-spinner-track);
    border-top-color: var(--phone-muted);
    border-radius: 50%;
    animation: ussd-spin 0.8s linear infinite;
  }
  @keyframes ussd-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .device-screen {
    --keyboard-height: 222px;
  }
  .keypad {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    height: var(--keyboard-height);
    padding: 6px 6px 30px;
    background: var(--phone-keypad);
  }
  .keypad-layer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    height: 100%;
  }
  .phone-key {
    display: grid;
    place-content: center;
    justify-items: center;
    border: 0;
    border-radius: 5px;
    background: var(--phone-key);
    color: var(--phone-key-ink);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 0 var(--phone-key-shadow);
    -webkit-tap-highlight-color: transparent;
  }
  .key-digit {
    font-size: 22px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
  }
  .key-digit.is-small {
    font-size: 16px;
    letter-spacing: 0.04em;
  }
  .key-letters {
    min-height: 9px;
    font-size: 8px;
    font-weight: var(--weight-strong);
    letter-spacing: 0.18em;
    padding-left: 0.18em;
  }
  .phone-key.is-symbol .key-digit {
    font-size: 26px;
  }
  .phone-key:active {
    background: var(--phone-key-press);
  }
  .phone-key.is-function {
    background: transparent;
    box-shadow: none;
  }
  .phone-key.is-function:active {
    background: var(--phone-key);
  }
  .phone-key .icon {
    width: 24px;
    height: 24px;
  }
  .phone-key:focus-visible,
  .dial-key:focus-visible,
  .call-key:focus-visible,
  .ussd-button:focus-visible {
    outline: 2px solid var(--phone-link);
    outline-offset: 1px;
  }
  .keypad-gap {
    display: block;
  }

  .phone-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.2rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .phone-state {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .phone-state::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent);
  }
  .phone-state.is-ended::before {
    background: var(--ink-3);
    box-shadow: none;
  }
  .phone-status code {
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  @media (prefers-reduced-motion: reduce) {
    .ussd-spinner {
      animation: none;
    }
  }

  .receipt {
    margin-top: 1.6rem;
    padding: 1.2rem 1.4rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .receipt-title {
    margin: 0 0 0.6rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .trace {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .trace li {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.8rem;
    padding: 0.5rem 0 0.5rem 2rem;
  }
  .trace li::before {
    content: "";
    position: absolute;
    left: 0.4rem;
    top: 1.25rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 0 0 1.5px var(--ink-3);
  }
  .trace li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 2rem;
    bottom: -0.5rem;
    width: 1px;
    background: var(--line-strong);
  }
  .trace li:last-child::before {
    background: var(--success);
    box-shadow: 0 0 0 1.5px var(--success);
  }
  .trace-input {
    min-width: 3.2rem;
    padding: 0 0.6rem;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: var(--r-control);
    background: var(--surface);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    text-align: center;
  }
  .trace-screen {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .trace-call {
    flex-basis: 100%;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    overflow-wrap: anywhere;
  }
  .trace-sms {
    flex-basis: 100%;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    overflow-wrap: anywhere;
  }

  .sms-arrived {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 40px;
    z-index: 5;
    display: grid;
    gap: 6px;
  }
  .sms-note {
    padding: 9px 12px 10px;
    border-radius: 16px;
    background: var(--phone-alert);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.14);
    font-size: 12px;
    line-height: 1.35;
  }
  .sms-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 2px;
  }
  .sms-from {
    font-weight: var(--weight-strong);
  }
  .sms-to,
  .sms-cost {
    color: var(--phone-muted);
    font-size: 11px;
  }
  .sms-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .sms-text.is-unwritten {
    color: var(--phone-muted);
    font-style: italic;
  }
  .sms-cost {
    margin: 3px 0 0;
  }

  .device-screen.is-chat {
    background: var(--chat-bg);
    color: var(--chat-ink);
    font-size: 13.2px;
    line-height: 17.6px;
  }
  .is-chat .device-status {
    background: var(--chat-head);
  }
  .chat-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    background: var(--chat-head);
  }
  .chat-head .icon {
    width: 20px;
    height: 20px;
    color: var(--chat-ink);
  }
  .chat-leave {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--chat-ink);
    cursor: pointer;
  }
  .chat-leave .icon {
    width: 22px;
    height: 22px;
  }
  .chat-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--input);
    color: #fff;
    font-size: 14px;
    font-weight: var(--weight-strong);
    letter-spacing: 0.02em;
  }
  .chat-who {
    flex: 1;
    display: grid;
    min-width: 0;
    line-height: 1.25;
  }
  .chat-name {
    overflow: hidden;
    font-size: 15px;
    font-weight: var(--weight-medium);
    letter-spacing: 0.1px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .chat-sub {
    font-size: 11.5px;
    color: var(--chat-muted);
  }
  .chat-tools {
    display: flex;
    gap: 13px;
    margin-left: 2px;
    color: var(--chat-ink);
    opacity: 0.45;
  }
  .chat-tools .icon {
    width: 19px;
    height: 19px;
  }
  .chat-log {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
    padding: 12px 6% 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Drawn on the body so the wallpaper neither scrolls nor anchors a sheet. */
  .is-chat .device-body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("/assets/chat-doodles-39697f05.svg");
    background-size: 420px;
    opacity: var(--chat-doodle);
    pointer-events: none;
  }
  :root:not([data-theme="dark"]) .is-chat .device-body::before {
    filter: invert(1);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .is-chat .device-body::before {
      filter: none;
    }
  }
  :root[data-theme="dark"] .is-chat .device-body::before {
    filter: none;
  }
  .chat-day {
    align-self: center;
    margin: 4px 0 10px;
    padding: 4px 11px;
    border-radius: 8px;
    background: var(--chat-note);
    color: var(--chat-muted);
    font-size: 11.5px;
    box-shadow: 0 1px 0.5px rgb(var(--phone-shade) / 0.13);
  }
  .chat-note {
    align-self: center;
    max-width: 76%;
    margin: 0 0 10px;
    padding: 5px 11px;
    border-radius: 8px;
    background: var(--chat-note);
    color: var(--chat-muted);
    font-size: 11.5px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 1px 0.5px rgb(var(--phone-shade) / 0.13);
  }
  .chat-error {
    align-self: stretch;
    margin: 0;
    padding: 8px;
    border-radius: 7px;
    background: var(--chat-in);
    font-family: var(--mono);
    font-size: 11px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .bubble {
    position: relative;
    max-width: 80%;
    margin: 0;
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 0.5px rgb(var(--phone-shade) / 0.13);
  }
  .bubble.is-in {
    align-self: flex-start;
    background: var(--chat-in);
  }
  .bubble.is-out {
    align-self: flex-end;
    background: var(--chat-out);
  }
  .bubble.is-first {
    margin-top: 8px;
  }
  .bubble.is-first.is-in {
    border-top-left-radius: 0;
  }
  .bubble.is-first.is-out {
    border-top-right-radius: 0;
  }
  .bubble.is-first::before {
    content: "";
    position: absolute;
    top: 0;
    width: 8px;
    height: 13px;
  }
  .bubble.is-first.is-in::before {
    left: -8px;
    background: var(--chat-in);
    clip-path: path("M8 0L0 0C4 0 8 4 8 13Z");
  }
  .bubble.is-first.is-out::before {
    right: -8px;
    background: var(--chat-out);
    clip-path: path("M0 0L8 0C4 0 0 4 0 13Z");
  }
  .bubble.is-refused {
    box-shadow:
      inset 3px 0 0 var(--chat-refused),
      0 1px 0.5px rgb(var(--phone-shade) / 0.13);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .bubble-meta {
    float: right;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 5px 0 -3px 8px;
    font-size: 10.5px;
    color: var(--chat-muted);
    white-space: nowrap;
  }
  .bubble-ticks {
    display: inline-grid;
    color: var(--chat-tick);
  }
  .bubble-ticks .icon {
    width: 14px;
    height: 14px;
  }
  .bubble.has-actions {
    padding-bottom: 6px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .bubble-actions {
    display: grid;
    align-self: flex-start;
    width: 80%;
  }
  .bubble-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    border: 0;
    border-top: 1px solid var(--chat-line);
    background: var(--chat-in);
    color: var(--chat-action);
    font: inherit;
    font-size: 13.2px;
    text-align: center;
    box-shadow: 0 1px 0.5px rgb(var(--phone-shade) / 0.13);
    cursor: pointer;
  }
  .bubble-action:last-child {
    border-radius: 0 0 7.5px 7.5px;
  }
  .bubble-action:disabled {
    color: var(--chat-muted);
    cursor: default;
  }
  .bubble-action .icon {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    vertical-align: -2px;
  }

  .chat-list,
  .chat-form {
    align-self: flex-start;
    width: 80%;
  }
  .chat-list > summary,
  .chat-form > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    border-top: 1px solid var(--chat-line);
    border-radius: 0 0 7.5px 7.5px;
    background: var(--chat-in);
    color: var(--chat-action);
    font-weight: 400;
    white-space: normal;
    list-style: none;
    cursor: pointer;
    box-shadow: 0 1px 0.5px rgb(var(--phone-shade) / 0.13);
  }
  .chat-list > summary::-webkit-details-marker,
  .chat-form > summary::-webkit-details-marker {
    display: none;
  }
  .chat-list > summary .icon,
  .chat-form > summary .icon {
    width: 16px;
    height: 16px;
  }
  .chat-list:not(.is-live) > summary,
  .chat-form:not(.is-live) > summary {
    color: var(--chat-muted);
    cursor: default;
    pointer-events: none;
  }
  /* Open, the summary is the dim behind the sheet, which covers the screen rather than the bubble it came from. */
  .chat-list[open] > summary,
  .chat-form[open] > summary {
    position: absolute;
    inset: 0;
    z-index: 4;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgb(0 0 0 / 0.35);
    color: transparent;
    box-shadow: none;
  }
  .chat-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    max-height: 80%;
    overflow-y: auto;
    padding: 6px 0 26px;
    border-radius: 12px 12px 0 0;
    background: var(--chat-sheet);
    color: var(--chat-ink);
    white-space: normal;
  }
  .chat-sheet-head {
    margin: 0;
    padding: 8px 14px 10px;
    border-bottom: 0.5px solid var(--chat-line);
    font-size: 15px;
    font-weight: var(--weight-strong);
    text-align: center;
  }
  .chat-sheet-rows {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: none;
  }
  .chat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px 9px 0;
    border: 0;
    border-bottom: 0.5px solid var(--chat-line);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .chat-row-text {
    flex: 1;
    display: grid;
    gap: 1px;
  }
  .chat-row-title {
    font-size: 13.4px;
  }
  .chat-row-description {
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--chat-muted);
  }
  .chat-row::after {
    content: "";
    flex: none;
    width: 19px;
    height: 19px;
    border: 1.5px solid var(--chat-muted);
    border-radius: 50%;
    box-sizing: border-box;
  }
  .chat-row:hover::after,
  .chat-row:focus-visible::after {
    border: 5.5px solid var(--chat-accent);
  }
  .chat-row.is-page .chat-row-title {
    color: var(--chat-action);
    font-weight: var(--weight-medium);
  }

  .bubble-media {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding: 10px 12px;
    background: rgb(var(--phone-shade) / 0.08);
    font-size: 12.5px;
  }
  .bubble-media .icon {
    flex: none;
    width: 20px;
    height: 20px;
  }
  .bubble-media-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .bubble-answers {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 0.5px solid rgb(var(--phone-shade) / 0.18);
    font-size: 12.5px;
    line-height: 1.5;
    opacity: 0.85;
  }
  .bubble-answer {
    display: block;
  }
  .form-sheet {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
    background: var(--chat-sheet);
    color: var(--chat-ink);
    white-space: normal;
  }
  .form-head {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 0.5px solid var(--chat-line);
    font-size: 15px;
    font-weight: var(--weight-strong);
    text-align: center;
  }
  .form-lock {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--chat-muted);
  }
  .form-body {
    flex: 1;
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 14px 16px;
  }
  .form-field {
    display: grid;
    gap: 5px;
  }
  .form-label {
    font-size: 12.5px;
    color: var(--chat-muted);
  }
  .form-required {
    color: var(--chat-refused);
  }
  .form-input {
    min-height: 34px;
    padding: 7px 10px;
    border: 0.5px solid var(--chat-line);
    border-radius: 6px;
    background: var(--chat-field);
    color: var(--chat-ink);
    font: inherit;
    font-size: 14.5px;
  }
  .form-choices {
    display: grid;
    gap: 8px;
  }
  .form-choice {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14.5px;
  }
  .form-choice input {
    accent-color: var(--chat-accent);
    width: 17px;
    height: 17px;
  }
  .form-submit {
    margin: 0 16px;
    padding: 11px;
    border: 0;
    border-radius: 22px;
    background: var(--chat-accent);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: var(--weight-strong);
    cursor: pointer;
  }
  .form-note {
    margin: 8px 16px 26px;
    font-size: 11px;
    color: var(--chat-muted);
    text-align: center;
  }

  .chat-composer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 26px;
    background: var(--chat-bar);
  }
  .chat-write {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 12px;
    border-radius: 21px;
    background: var(--chat-field);
  }
  .chat-write .icon {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--chat-muted);
    opacity: 0.8;
  }
  .chat-field {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--chat-ink);
    font: inherit;
    font-size: 13.2px;
  }
  .chat-field:focus {
    outline: none;
  }
  .chat-field::placeholder {
    color: var(--chat-muted);
  }
  .chat-send {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--chat-accent);
    color: #fff;
    cursor: pointer;
  }
  .chat-send .icon {
    width: 21px;
    height: 21px;
  }
  .bubble-action:focus-visible,
  .chat-send:focus-visible,
  .chat-row:focus-visible,
  .chat-list > summary:focus-visible,
  .chat-form > summary:focus-visible,
  .form-submit:focus-visible {
    outline: 2px solid var(--chat-action);
    outline-offset: -2px;
  }
}

@layer components {
  .menu {
    position: relative;
  }
  .menu > summary {
    list-style: none;
  }
  .menu > summary::-webkit-details-marker {
    display: none;
  }
  .menu[open] > summary {
    background: var(--surface-2);
    border-color: var(--ink-3);
  }
  .menu-items {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 20;
    display: grid;
    min-width: 20rem;
    max-width: calc(100vw - 3.2rem);
    padding: 0.4rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-float);
  }
  .menu-items .button_to {
    display: block;
  }
  .menu-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    min-height: var(--size-small);
    padding: 0.6rem 0.8rem;
    border: 0;
    border-radius: 0.8rem;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: var(--text-13);
    line-height: var(--leading-13);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }
  .menu-item .icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  .menu-item .icon:not(.kind-icon) {
    color: var(--ink-3);
  }
  .menu-item:hover,
  .menu-item:focus-visible {
    background: var(--surface-2);
  }
  .menu-item.is-danger,
  .menu-item.is-danger .icon {
    color: var(--error);
  }

  .hovercard {
    display: inline-flex;
  }
  .hovercard-body {
    position: fixed;
    z-index: 40;
    display: none;
    width: 32rem;
    padding: 1.2rem 1.4rem;
    border-radius: var(--r-card);
    background: var(--inverse);
    color: var(--on-inverse);
    font-size: var(--text-12);
    font-weight: 400;
    line-height: var(--leading-12);
    text-align: left;
    white-space: normal;
    box-shadow: var(--shadow-float);
  }
  .hovercard-body.is-open {
    display: block;
  }
  .hovercard-head {
    display: block;
    font-weight: var(--weight-strong);
  }
  .hovercard-list {
    display: grid;
    gap: 0.6rem;
    margin: 0.6rem 0 0;
    padding-left: 1.8rem;
  }
  .hovercard-list:first-child {
    margin-top: 0;
  }
  .hovercard-list li::marker {
    color: var(--ink-3);
  }
  .hovercard-foot {
    display: block;
    margin-top: 0.8rem;
    opacity: 0.7;
  }
  .hovercard-when {
    display: block;
    opacity: 0.7;
  }
  .theme-toggle > span {
    display: contents;
  }
  button.nav-link,
  button.mk-nav-link {
    border: 0;
    background: none;
    font: inherit;
    font-weight: var(--weight-strong);
    line-height: inherit;
    cursor: pointer;
  }
  .theme-toggle.is-bare {
    display: inline-flex;
    align-items: center;
  }
  .theme-toggle.is-bare .theme-toggle-name {
    display: none;
  }
  .theme-toggle.is-bare .icon {
    display: block;
    width: 1.8rem;
    height: 1.8rem;
  }
  .toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 3.2rem;
    padding: 0.3rem 0.6rem 0.3rem 1.1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-control);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    cursor: pointer;
  }
  .toggle:hover {
    background: var(--surface-2);
  }
  .toggle[aria-pressed="true"] {
    background: var(--surface-2);
    border-color: var(--ink-3);
    box-shadow: inset 0 1px 2px rgb(var(--shade) / 0.1);
  }
  .toggle.is-icon {
    width: 3.2rem;
    justify-content: center;
    padding: 0;
  }
}

@layer modules {
  .modal.panel:has(.publish-sheet) {
    width: min(120rem, 100vw);
  }
  .publish-sheet {
    display: grid;
    gap: 2.4rem;
  }
  @container panel (min-width: 88rem) {
    .publish-sheet {
      grid-template-columns: minmax(0, 1fr) 30rem;
      align-items: start;
    }
    .publish-side {
      position: sticky;
      top: 1.6rem;
    }
  }
  .publish-changes-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
  }
  .publish-heading {
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .publish-changes-head .hint {
    margin: 0.2rem 0 0;
  }
  .caller-changes {
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    overflow: hidden;
  }
  .caller-changes-head,
  .caller-change {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr) 8rem;
    gap: 1.6rem;
    padding: 1.2rem 1.6rem;
  }
  .caller-changes-head {
    padding-block: 0.8rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .caller-changes-head span:last-child,
  .caller-change-seen {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .caller-change + .caller-change {
    border-top: 1px solid var(--line);
  }
  .caller-change > .pill {
    justify-self: start;
    align-self: start;
  }
  .caller-change-screen {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .caller-change-screen .kind-icon {
    align-self: center;
  }
  .caller-change-screen strong {
    font-weight: var(--weight-strong);
  }
  .was-now {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 0.4rem 0.8rem;
    margin: 0.8rem 0 0;
  }
  .was-now dt {
    padding-top: 0.2rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .was-now dd {
    margin: 0;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-14);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .was-now :is(del, ins) {
    padding: 0 0.2rem;
    border-radius: 0.2rem;
    text-decoration: none;
  }
  .was-now del {
    background: var(--tint-danger);
    color: var(--danger-text);
  }
  .was-now ins {
    background: var(--tint-success);
    color: var(--success-text);
  }
  .publish-ready .gates {
    margin: 0;
  }
  .publish-after {
    margin: 0;
  }
  @container panel (max-width: 60rem) {
    .caller-changes-head {
      display: none;
    }
    .caller-change {
      grid-template-columns: minmax(0, 1fr) auto;
    }
    .caller-change-body {
      grid-column: 1 / -1;
      grid-row: 2;
    }
  }
  .deploy-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: var(--weight-strong);
    white-space: nowrap;
  }
  .deploy-flow a {
    color: var(--ink);
    text-decoration: none;
  }
  .deploy-flow a:hover {
    text-decoration: underline;
  }
  .deploy-where {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: var(--weight-strong);
    white-space: nowrap;
  }
  .deploy-where::before {
    content: "";
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
  }
  .deploy-where.is-live {
    color: var(--ok-ink);
  }
  .deploy-where.is-live::before {
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-soft);
  }
  .deploy-where.is-staging::before {
    background: var(--router);
  }
  .deploy-version {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
  }
  .deploy-version.is-pickable {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    cursor: pointer;
  }
  .deploy-version.is-pickable:hover {
    border-color: var(--line-strong);
  }
  .deploy-version .icon {
    width: 1.3rem;
    height: 1.3rem;
    color: var(--ink-3);
  }
  .deploy-versions-menu .menu-items {
    left: 0;
    right: auto;
    min-width: 26rem;
  }
  .deploy-versions-menu .menu-item {
    white-space: nowrap;
  }
  /* The table scrolls sideways when it must, which would cut an open menu off. */
  .table-scroll:has(.deploy-versions-menu[open]) {
    overflow: visible;
  }
  .deploy-when {
    color: var(--ink-2);
    white-space: nowrap;
  }
  .deploy-when span {
    color: var(--ink-3);
  }
  .deploy-when span::before {
    content: " · ";
  }
  .deploy-speed {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .deploy-speed.is-quiet {
    color: var(--ink-3);
  }
  .deploy-speed-now {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .spark {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: end;
    gap: 1px;
    width: 8.4rem;
    height: 2.2rem;
    color: var(--router);
  }
  .spark-bar {
    height: var(--height);
    min-height: 1px;
    background: currentColor;
  }
  .spark-bar.is-quiet {
    background: var(--line);
  }
  .deploy-state {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: var(--weight-strong);
    white-space: nowrap;
  }
  .deploy-state .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .deploy-state.is-ok {
    color: var(--ok-ink);
  }
  .deploy-state.is-warned {
    color: var(--warning);
  }
  .deploy-state.is-waiting {
    color: var(--ink-3);
  }
  .deploy-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 0.6rem;
    color: var(--warning);
    font-weight: var(--weight-strong);
    text-decoration: none;
    white-space: nowrap;
  }
  .deploy-tools .deploy-warning {
    border-color: transparent;
  }
  .deploy-tools .deploy-warning:hover {
    border-color: var(--warning);
    color: var(--warning);
  }
  .deploy-tools {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    justify-content: flex-end;
  }
  .deploy-tools .button_to {
    display: block;
  }
  .deploy-more .menu-items {
    min-width: 22rem;
  }
  .table-scroll:has(.deploy-more[open]) {
    overflow: visible;
  }
  .deploy-tools > a.deploy-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    text-decoration: none;
    white-space: nowrap;
  }
  .deploy-tools > a.deploy-warning:hover {
    border-color: var(--line-strong);
    color: var(--ink);
  }
  .deploy-tools > .icon-action .icon {
    width: 1.7rem;
    height: 1.7rem;
  }
  .deploy-tools a[target] .icon {
    color: var(--whatsapp-brand);
  }
  .deploy-connect {
    padding: 0.5rem 0.9rem;
    color: var(--link);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
  }
  button.deploy-connect {
    border: 0;
    background: none;
    font: inherit;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    cursor: pointer;
  }
  .deploy-tools .number-answer {
    display: contents;
  }
  .deploy-tool-none {
    padding: 0.5rem 0.9rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
  }
  .deploy-number {
    color: var(--ink);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .deploys-none {
    padding: 4rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-section);
    color: var(--ink-2);
    text-align: center;
  }

  .gates {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
  }
  .gate {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 1rem;
  }
  .gate p {
    margin: 0;
  }
  .gate .hint {
    margin-top: 0.2rem;
  }
  .gate-title {
    font-weight: var(--weight-strong);
  }
  .gate-mark {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--on-accent);
  }
  .gate-mark::before {
    content: "";
    width: 100%;
    height: 100%;
    background: currentColor;
    mask: center / contain no-repeat;
  }
  .gate.is-passed .gate-mark {
    color: var(--ok);
  }
  .gate.is-passed .gate-mark::before {
    mask-image: url("/assets/icons/carbon-checkmark-filled-573ed2c5.svg");
  }
  .gate.is-warned .gate-mark {
    color: var(--warning);
  }
  .gate.is-warned .gate-mark::before {
    mask-image: url("/assets/icons/carbon-warning-filled-b2dcb8e1.svg");
  }
  .gate.is-blocked .gate-mark {
    color: var(--error);
  }
  .gate.is-blocked .gate-mark::before {
    mask-image: url("/assets/icons/carbon-error-filled-c658414b.svg");
  }
  .gate.is-blocked .gate-title {
    color: var(--error);
  }
  .gates-fold > summary {
    list-style: none;
    cursor: pointer;
  }
  .gates-fold > summary::-webkit-details-marker {
    display: none;
  }
  .gates-fold[open] > summary {
    margin-bottom: 1.1rem;
  }
  .panel-actions > .hint {
    align-self: center;
    margin: 0;
  }
  .needs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
  }
  .need {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
  }
  .need.is-next {
    border-color: var(--ink);
  }
  .need p {
    margin: 0;
  }
  .need .hint {
    margin-top: 0.2rem;
  }
  .need-title {
    font-weight: var(--weight-strong);
  }
  .need-number {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .need.is-next .need-number {
    border-color: var(--ink);
  }
  .changes {
    display: grid;
    gap: 0.8rem;
    margin: 0;
  }
  .change {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
  }
  .change dt {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .change dd {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin: 0;
  }
  .change.is-added dt {
    color: var(--ok-ink);
  }
  .change.is-removed dt {
    color: var(--error);
  }
  .change.is-removed code {
    text-decoration: line-through;
  }
  .change-screen {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
  }
  .change-screen .hint {
    margin: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .version-label.is-deployed {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--line-strong);
  }
  .pill.is-env {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .pill.is-env::before {
    content: "";
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--line-strong);
  }
  .pill.is-env.is-staging::before {
    background: var(--router);
  }
  .pill.is-env.is-live::before {
    background: var(--ok);
  }
  .version-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--live);
  }
  .version-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .version-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.2rem 1rem 1.4rem;
  }
  .version-row + .version-row {
    border-top: 1px solid var(--line);
  }
  .version-label {
    justify-self: start;
    padding: 0.2rem 0.8rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .version-row.is-latest .version-label {
    background: var(--inverse);
    border-color: var(--inverse);
    color: var(--on-inverse);
  }
  .version-note {
    margin: 0;
    font-weight: var(--weight-strong);
    overflow-wrap: anywhere;
  }
  .version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1.4rem;
    margin: 0.2rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .version-actions {
    display: flex;
    gap: 0.5rem;
  }
  .version-actions .button_to {
    display: inline;
  }
  .deploy-hint {
    display: grid;
    gap: 0.4rem;
  }
  .deploy-hint .hint {
    margin: 0;
  }
  .code-snippet {
    margin: 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-x: auto;
  }
  .code-snippet code {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
    user-select: all;
  }
  .version-scenarios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
  }
  .version-scenarios li {
    padding: 0.1rem 0.8rem;
    border-radius: 999px;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .version-scenarios .is-passed {
    background: var(--ok-soft);
    color: var(--ok-ink);
  }
  .version-scenarios .is-failed {
    background: var(--error-soft);
    color: var(--error);
  }
  .version-source .code.is-compact {
    height: 36rem;
  }
  .panel-head.is-version {
    border-top-color: var(--ink);
  }
  @media (max-width: 879px) {
    .version-row {
      grid-template-columns: auto minmax(0, 1fr);
    }
    .version-actions {
      grid-column: 1 / -1;
    }
    .change {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .deploy {
    display: grid;
    grid-template-columns: 20rem minmax(0, 1fr);
    gap: 1.6rem 3.2rem;
    align-items: start;
  }
  .deploy-main {
    display: grid;
    gap: 1.6rem;
    min-width: 0;
  }
  @media (max-width: 760px) {
    .deploy {
      grid-template-columns: minmax(0, 1fr);
    }
    .deploy-rail {
      position: static;
    }
  }

  .deploy-rail {
    position: sticky;
    top: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .deploy-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    min-height: 6.4rem;
    padding: 0 0 1.6rem 1.2rem;
    border-left: 2px solid var(--line-strong);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .deploy-stage:last-child {
    min-height: 0;
    padding-bottom: 0;
  }
  .deploy-stage.is-done,
  .deploy-stage.is-current {
    border-left-color: var(--focus);
  }
  .deploy-stage.is-blocked {
    border-left-color: var(--error);
  }
  .deploy-stage-mark {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    margin-top: 0.1rem;
    border: 1.5px solid var(--ink-3);
    border-radius: 50%;
    color: var(--focus);
  }
  .deploy-stage-mark .icon {
    width: 1.8rem;
    height: 1.8rem;
  }
  .deploy-stage.is-done .deploy-stage-mark,
  .deploy-stage.is-blocked .deploy-stage-mark {
    border: 0;
  }
  .deploy-stage.is-done .deploy-stage-mark {
    color: var(--ok);
  }
  .deploy-stage.is-current .deploy-stage-mark {
    border-color: var(--focus);
    background: linear-gradient(90deg, var(--focus) 50%, transparent 50%);
  }
  .deploy-stage.is-blocked .deploy-stage-mark {
    background: none;
    color: var(--error);
  }
  .deploy-stage-text {
    display: grid;
    align-content: start;
    gap: 0.2rem;
  }
  .deploy-stage-name {
    font-size: var(--text-14);
    line-height: 2rem;
    color: var(--ink-2);
  }
  .deploy-stage.is-done .deploy-stage-name {
    color: var(--ink);
  }
  .deploy-stage.is-current .deploy-stage-name {
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .deploy-stage-note {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    overflow-wrap: anywhere;
  }
  .deploy-stage-note.is-error,
  .deploy-stage-note.is-warning {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: inherit;
  }
  .deploy-stage-note.is-error::before,
  .deploy-stage-note.is-warning::before {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    font-size: var(--text-10);
    font-weight: var(--weight-strong);
    line-height: 1.4rem;
    text-align: center;
  }
  .deploy-stage-note.is-error {
    color: var(--error);
  }
  .deploy-stage-note.is-error::before {
    content: "!";
    background: var(--danger);
    color: var(--on-danger);
  }
  .deploy-stage-note.is-warning {
    color: var(--warning);
  }
  .deploy-stage-note.is-warning::before {
    content: "!";
    background: var(--attention);
    color: var(--warning-on, #161616);
  }
  .deploy-stage.is-attention {
    border-left-color: var(--warning);
  }
  .deploy-stage.is-attention .deploy-stage-mark {
    border: 0;
    color: var(--warning);
  }
  .deploy-stage.is-attention .deploy-stage-name {
    color: var(--ink);
  }

  .deploy-focus {
    --accent: var(--focus);
    position: relative;
    overflow: clip;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.2rem 2.4rem;
    padding: 1.8rem 1.8rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .deploy-focus-text {
    display: grid;
    gap: 0.6rem;
  }
  .deploy-focus-text .hint {
    margin: 0;
  }
  .deploy-focus.is-live {
    --accent: var(--ok);
    background: var(--ok-soft);
  }
  .deploy-focus-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    font-size: var(--text-16);
    line-height: var(--leading-16);
    font-weight: var(--weight-strong);
    letter-spacing: -0.01em;
  }
  .deploy-focus-title .icon {
    width: 2rem;
    height: 2rem;
    color: var(--focus);
  }
  .deploy-focus.is-live .deploy-focus-title .icon {
    color: var(--ok-ink);
  }
  .deploy-focus-body {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .deploy-focus > .deploy-action,
  .deploy-focus > .button_to {
    justify-self: start;
  }
  .deploy-action .button_to,
  .deploy .button_to {
    display: inline;
  }
  .deploy-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink-2);
  }
  .deploy-check .icon {
    width: 1.7rem;
    height: 1.7rem;
  }
  .deploy-check.is-done {
    color: var(--ok-ink);
  }
  .deploy-check.is-done .deploy-check-mark {
    color: var(--ok);
  }
  .deploy-check.is-todo .deploy-check-mark {
    color: var(--warning);
  }
  .deploy-second {
    margin: 0;
  }

  .deploy-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 0.8rem;
  }
  .deploy-place {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.8rem;
    padding: 1.2rem 1.4rem 1.3rem 1.8rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .deploy-place::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 4px;
    background: var(--router);
  }
  .deploy-place.is-live::before {
    background: var(--ok);
  }
  .deploy-place.is-empty {
    border-style: dashed;
  }
  .deploy-place.is-empty::before {
    opacity: 0.35;
  }
  .deploy-ready {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .deploy-ready.is-ok {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ok-ink);
  }
  .deploy-ready-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.6rem;
    color: var(--ink-2);
  }
  .deploy-ready-item .icon {
    width: 1.6rem;
    height: 1.6rem;
    flex: none;
    align-self: center;
    color: var(--warning);
  }
  .deploy-ready.is-ok .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--ok);
  }
  .deploy-ready-item.is-never_dialled .icon {
    color: var(--ink-3);
  }
  .deploy-ready.is-off {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-2);
  }
  .deploy-ready.is-off .icon,
  .deploy-ready-item.is-off .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--warning);
  }
  .deploy-place-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .deploy-place-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .deploy-place-name .icon {
    width: 1.7rem;
    height: 1.7rem;
    color: var(--ink-3);
  }
  .deploy-place-head .hint {
    margin: 0;
  }
  .deploy-place-url {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    margin: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .deploy-place-url code {
    overflow-wrap: anywhere;
    user-select: all;
  }
  .deploy-boxes {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .deploy-box {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.4rem 0.8rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .deploy-box-name {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: var(--weight-strong);
    white-space: nowrap;
  }
  .deploy-box-name .icon {
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    color: var(--ink-3);
  }
  .deploy-box-urls {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
  }
  .deploy-box-url {
    overflow-wrap: anywhere;
    user-select: all;
  }
  .deploy-box-served {
    color: var(--ink-3);
    white-space: nowrap;
  }
  .deploy-box-served.is-warning {
    color: var(--warning);
  }
  .deploy-box-served a {
    color: var(--link);
  }
  .deploy-row-boxes {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
    margin: 0 0 0 1rem;
    vertical-align: middle;
    padding: 0;
    list-style: none;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .deploy-row-box a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-3);
    text-decoration: none;
    white-space: nowrap;
  }
  .deploy-row-box a:hover {
    color: var(--ink);
    text-decoration: underline;
  }
  .deploy-row-box a::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--success);
  }
  .deploy-row-box.is-waiting a::before {
    background: var(--attention);
  }
  @media (max-width: 40rem) {
    .deploy-box {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .deploy-place-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
  }
  .place-tool {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 3.2rem;
    padding: 0 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-segment);
    transition:
      border-color var(--quick) var(--ease),
      color var(--quick) var(--ease);
  }
  .place-tool:hover {
    border-color: var(--line-strong);
    color: var(--ink);
  }
  .place-tool.is-warning {
    border-color: var(--warning-line);
    background: var(--warning-surface);
    color: var(--warning);
  }
  .place-tool.is-back {
    margin-left: 0.8rem;
  }
  .place-tool.is-danger {
    border-color: var(--error-line);
    color: var(--error);
  }
  .place-tool.is-danger:hover {
    border-color: var(--error);
    background: var(--error-soft);
  }
  .deploy-place-links .button_to {
    display: inline-flex;
  }
  .version-menu > summary .icon {
    display: block;
    width: 1.6rem;
    height: 1.6rem;
  }
  .deploy-versions {
    margin-top: 1.6rem;
  }
  .place-tool.is-warning::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--attention);
  }
  .place-tool .icon {
    display: block;
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
  }
  .deploy-place-links .button_to {
    display: inline;
  }

  .deploy-advanced > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    color: var(--ink-2);
    cursor: pointer;
    list-style: none;
  }
  .deploy-advanced > summary::-webkit-details-marker {
    display: none;
  }
  .deploy-advanced > summary .icon {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform var(--quick) var(--ease);
  }
  .deploy-advanced[open] > summary .icon {
    transform: rotate(90deg);
  }
  .deploy-advanced-body {
    margin-top: 1.2rem;
    display: grid;
    gap: 1.2rem;
  }
  .deploy-first-hint {
    margin: 0;
  }
  @media (max-width: 879px) {
    .deploy-focus {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  @media (max-width: 600px) {
    .deploys thead {
      display: none;
    }
    .deploys tbody tr {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "flow where" "version when" "tools tools";
      gap: 0.6rem 1.2rem;
      align-items: center;
      padding: 1.4rem 1.6rem;
      border-bottom: 1px solid var(--line);
    }
    .deploys.data-table td {
      display: block;
      height: auto;
      min-width: 0;
      padding: 0;
      border: 0;
    }
    .deploys td:nth-child(1) {
      grid-area: flow;
    }
    .deploys td:nth-child(2) {
      grid-area: where;
      text-align: right;
    }
    .deploys td:nth-child(3) {
      grid-area: version;
    }
    .deploys td:nth-child(4) {
      grid-area: when;
      text-align: right;
      font-size: var(--text-12);
      line-height: var(--leading-12);
    }
    .deploys td:nth-child(5) {
      display: none;
    }
    .deploys td:nth-child(6) {
      grid-area: tools;
      padding-top: 0.8rem;
      border-top: 1px dashed var(--line);
    }
    .deploys .deploy-flow {
      flex-wrap: wrap;
      gap: 0.4rem 0.8rem;
      white-space: normal;
    }
    .deploys .deploy-row-boxes {
      display: flex;
      justify-content: flex-end;
      margin: 0.2rem 0 0;
      color: var(--ink-3);
      font-size: var(--text-12);
      line-height: var(--leading-12);
    }
    .deploys .deploy-when {
      white-space: normal;
      color: var(--ink-3);
    }
    .deploys .deploy-when span {
      display: block;
    }
    .deploy-tools {
      justify-content: flex-end;
      gap: 0.4rem;
    }
  }
}

@layer modules {
  .segment-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.5;
  }
  .segment.is-staging {
    --segment-tone: var(--router);
  }
  .segment.is-live {
    --segment-tone: var(--ok);
  }
  .segment.is-active {
    color: var(--segment-tone, var(--ink));
  }
  .segment.is-active .segment-dot {
    opacity: 1;
    background: var(--segment-tone);
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.8rem;
    margin: 0 0 1.6rem;
  }
  .stat {
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .stat dt {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--text-13);
    line-height: var(--leading-13);
    color: var(--ink-3);
  }
  .stat dd {
    margin: 0.2rem 0 0;
    font-size: var(--text-30);
    line-height: var(--leading-30);
    font-weight: var(--weight-regular);
    font-variant-numeric: tabular-nums;
    letter-spacing: var(--tracking-28);
  }
  .stats.is-strip {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.2rem;
  }
  .stats.is-strip .stat {
    padding: 0.7rem 1.1rem;
  }
  .stats.is-strip .stat dd {
    font-size: var(--text-20);
    line-height: var(--leading-20);
  }
  .stat.is-bad {
    border-color: var(--error-line);
    background: var(--error-surface);
  }
  .stat.is-bad :is(dd, dt .icon) {
    color: var(--error);
  }
  .stat dd.stat-pace {
    margin-top: 0.4rem;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .stat dd.stat-fix {
    margin: 0.6rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    letter-spacing: 0;
  }
  .stat dd.stat-fix a {
    color: inherit;
  }
  .stats.is-strip .stat dd.stat-fix {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
  }
  .endpoint-screen {
    display: inline-block;
    margin-right: 0.8rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .calls-table.data-table :is(th, td) {
    height: auto;
    padding-block: 1.1rem;
  }
  .calls-table .endpoint-address {
    font-weight: 400;
    min-width: 0;
  }
  .endpoint-line {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
  }
  .endpoint-method {
    flex: none;
    min-width: 4.6rem;
    padding: 0.1rem 0.6rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    text-align: center;
  }
  .endpoint-method.is-get {
    background: color-mix(in srgb, var(--router) 14%, var(--surface));
    color: var(--router);
  }
  .endpoint-method.is-post {
    background: color-mix(in srgb, var(--ok) 14%, var(--surface));
    color: var(--ok-ink);
  }
  .endpoint-method:is(.is-put, .is-patch) {
    background: var(--warning-soft);
    color: var(--warning);
  }
  .endpoint-method.is-delete {
    background: var(--error-soft);
    color: var(--error);
  }
  .endpoint-path {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-medium);
  }
  .endpoint-where {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
    margin: 0.3rem 0 0 5.4rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .endpoint-host {
    font-family: var(--mono);
  }
  .calls-table .endpoint-count {
    white-space: nowrap;
  }
  .endpoint-share {
    display: block;
    width: 8rem;
    height: 0.4rem;
    margin: 0.4rem 0 0 auto;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-2);
  }
  .endpoint-share span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--router);
  }
  .calls-table td.is-warning {
    color: var(--warning);
    font-weight: var(--weight-strong);
  }
  .calls-table td.is-error {
    color: var(--error);
    font-weight: var(--weight-strong);
  }
  @media (max-width: 700px) {
    .calls-table thead {
      display: none;
    }
    .calls-table,
    .calls-table tbody {
      display: block;
    }
    .calls-table tbody tr {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 0.8rem 0.6rem;
      padding: 1.2rem 1.4rem;
      border-bottom: 1px solid var(--line);
    }
    .calls-table.data-table :is(th, td) {
      display: block;
      height: auto;
      padding: 0;
      border: 0;
      text-align: left;
    }
    .calls-table .endpoint-address {
      grid-column: 1 / -1;
    }
    .calls-table td::before {
      content: attr(data-label);
      display: block;
      color: var(--ink-3);
      font-size: var(--text-12);
      line-height: var(--leading-12);
      font-weight: 400;
    }
    .endpoint-share {
      margin-left: 0;
      width: 100%;
    }
    .endpoint-where {
      margin-left: 0;
    }
  }
  .traffic-section {
    margin-top: 1.6rem;
  }
  .traffic-section + .traffic-section {
    margin-top: 4rem;
  }
  .traffic-section > .hint {
    margin-top: 1rem;
  }
  .traffic-heading {
    margin: 0 0 1.2rem;
    font: var(--font-lead);
    letter-spacing: var(--tracking-20);
  }
  .pane-bar .segmented + .segmented {
    margin-left: auto;
  }
  .funnel {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
  }
  .funnel-step {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) 15rem;
    align-items: center;
    gap: 1rem;
  }
  .funnel-label {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
  }
  .funnel-name {
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .funnel-id {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .funnel-ends {
    display: grid;
    gap: 0.2rem;
  }
  .funnel-done {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ok-ink);
  }
  .funnel-done .icon {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
  }
  .traffic-counted {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(36rem, 100%), 1fr));
    gap: 0 3.2rem;
  }
  .traffic-counted-empty .hint {
    max-width: 64rem;
  }
  .traffic-counted-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    flex-wrap: wrap;
  }
  .traffic-heading .icon {
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 0.6rem;
    vertical-align: -0.2rem;
  }
  .funnel.is-counted .funnel-step {
    grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr) 4.5rem;
  }
  .funnel.is-counted .funnel-drop {
    text-align: right;
  }
  .funnel.is-counted .is-rest {
    margin-top: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--ink-2);
  }
  .funnel.is-counted .is-rest .funnel-name {
    font-weight: 400;
  }
  .session-labels {
    white-space: normal;
  }
  .session-labels .pill,
  .trail-about .pill {
    margin: 0 0.4rem 0.2rem 0;
  }
  .trail-about {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin: 0 0 1.2rem;
  }
  .trail-about .icon,
  .trail-label .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .trace-ref {
    color: inherit;
    text-decoration: none;
  }
  .trace-ref code {
    font-family: var(--mono);
  }
  .trace-ref .icon {
    width: 1.2rem;
    height: 1.2rem;
    margin-left: 0.2rem;
    color: var(--ink-3);
    transition:
      transform var(--quick) var(--ease),
      color var(--quick) var(--ease);
  }
  .trace-ref:hover,
  .trace-ref:focus-visible {
    box-shadow: inset 0 0 0 1px var(--primary);
  }
  .trace-ref:hover code {
    text-decoration: underline;
  }
  .trace-ref:hover .icon,
  .trace-ref:focus-visible .icon {
    color: var(--primary);
    transform: translateX(2px);
  }
  .trail-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1rem;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .funnel-bar {
    height: 2.2rem;
    border-radius: var(--r-control);
    background: var(--track);
    overflow: hidden;
  }
  .funnel-bar span {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: fit-content;
    padding: 0 0.8rem;
    border-radius: var(--r-control);
    background: var(--viz-1);
    color: var(--on-accent);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .funnel-drop {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    text-align: right;
  }
  .funnel-drop.is-high {
    color: var(--error);
    font-weight: var(--weight-strong);
  }
  .funnel-step.is-worst .funnel-bar span {
    background: var(--attention);
    color: var(--warning-on);
  }
  .funnel-step.is-worst .funnel-name {
    color: var(--error);
  }
  .sessions {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .sessions > li + li {
    border-top: 1px solid var(--line);
  }
  .traffic-session > summary {
    list-style: none;
    cursor: pointer;
  }
  .traffic-session > summary::-webkit-details-marker {
    display: none;
  }
  .traffic-session-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.2rem;
    padding: 0.8rem 1.2rem;
  }
  .traffic-session[open] > .traffic-session-row {
    background: var(--surface-2);
  }
  .session-phone {
    min-width: 12rem;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .session-keys {
    display: inline-flex;
    gap: 0.3rem;
    vertical-align: middle;
  }
  .scenario-key.is-more {
    color: var(--ink-3);
    border-style: dashed;
  }
  .trail {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    --bar: var(--focus);
  }
  .trail-step {
    padding: 0.6rem 0;
    border-top: 1px solid var(--line);
  }
  .trail-dropped {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-top: 1px solid var(--line);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .trail-dropped .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .session-continued {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.6rem;
    padding: 0.1rem 0.6rem;
    border: 1px solid var(--router-line);
    border-radius: 999px;
    background: var(--router-soft);
    color: var(--router-ink);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    white-space: nowrap;
    vertical-align: middle;
  }
  .session-continued .icon {
    width: 1.3rem;
    height: 1.3rem;
  }
  .trail-step:first-child {
    border-top: 0;
  }
  .trail-row {
    display: grid;
    grid-template-columns: 6.6rem 7rem 3.4rem minmax(0, 1fr) 9rem minmax(14rem, 26rem);
    align-items: center;
    gap: 0 1rem;
    min-height: 2.8rem;
  }
  .trail-row.is-call {
    min-height: 2.6rem;
  }
  .trail-row.is-call .trail-rail {
    grid-column: 3;
  }
  .trail-row.is-call .trail-what {
    grid-column: 4;
  }
  .trail-row.is-call .trail-status {
    grid-column: 5;
  }
  .trail-row.is-call .trail-bar {
    grid-column: 6;
  }
  .trail-status {
    min-width: 0;
  }
  .trail-status .call-status {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .trail-when {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    white-space: nowrap;
  }
  .trail-gap {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    white-space: nowrap;
  }
  .trail-what {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
  }
  .trail-what .call-url {
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-2);
  }
  .trail .call-status {
    border-radius: 0;
  }
  .trail .call-status.is-info {
    background: var(--router-soft);
    color: var(--router-ink);
  }
  .trail-method {
    flex: none;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-3);
  }
  .trail-method.is-get {
    color: var(--router);
  }
  .trail-method.is-post {
    color: var(--input);
  }
  .trail-method.is-put,
  .trail-method.is-patch {
    color: var(--message);
  }
  .trail-method.is-delete {
    color: var(--form);
  }
  .trail-rail {
    align-self: stretch;
    justify-self: center;
    width: 2px;
    margin: -0.3rem 0;
    background: var(--line-strong);
  }
  .trail-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6.4rem;
    align-items: center;
    gap: 0.8rem;
  }
  .trail-track {
    position: relative;
    height: 0.8rem;
    background: var(--line);
  }
  .trail-track i {
    position: absolute;
    top: 0;
    left: var(--x);
    width: var(--w);
    max-width: calc(100% - var(--x));
    min-width: 0.4rem;
    height: 100%;
    background: var(--bar);
  }
  .trail-bar.is-step i + i {
    box-shadow: -2px 0 0 var(--surface-2);
  }
  .trail-bar.is-step i.is-engine {
    background: repeating-linear-gradient(135deg, var(--bar) 0 2px, transparent 2px 5px);
  }
  .trail-bar em {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-style: normal;
    font-variant-numeric: tabular-nums;
    color: var(--ink-3);
    white-space: nowrap;
    text-align: right;
  }
  .trail-bar.is-warning {
    --bar: var(--warning);
  }
  .trail-bar.is-error,
  .trail-bar.is-failed {
    --bar: var(--error);
  }
  .trail-step.is-failed .trail-bar.is-step {
    --bar: var(--error);
  }
  @container panel (max-width: 34rem) {
    .funnel-step {
      grid-template-columns: minmax(0, 1fr) auto;
    }
    .funnel-bar {
      grid-column: 1 / -1;
      order: 3;
    }
  }

  .traffic-page {
    padding: 0 0 4.8rem;
  }
  .traffic-page .analytics-bar.analytics-bar {
    margin-bottom: 2.4rem;
  }
  .traffic-sections {
    scroll-margin-top: 8.8rem;
  }
  .traffic-page .flash.is-inline {
    margin-bottom: 1.2rem;
  }
  .traffic-page .viz-plot {
    height: 14rem;
  }
  .traffic-page .viz + details,
  .traffic-page .traffic-section:has(.viz) {
    margin-top: 0;
  }
  .traffic-page .stats {
    margin-bottom: 3.2rem;
  }
  .traffic-crumbs {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.4rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .traffic-crumbs span {
    color: var(--ink-3);
  }
  .traffic-back {
    color: var(--ink-2);
    text-decoration: none;
  }
  .traffic-back:hover {
    color: var(--ink);
    text-decoration: underline;
  }
  .traffic-page .tabs.traffic-sections {
    max-width: none;
    margin: 3.2rem 0 2rem;
  }
  .tab-count {
    margin-left: 0.2rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
  }
  .tab.is-active .tab-count {
    background: var(--inverse);
    color: var(--on-inverse);
  }
  .traffic-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
  }
  .filter-menu .traffic-chip {
    justify-content: space-between;
  }
  .filter-menu .traffic-chip-count {
    color: var(--ink-3);
  }
  .traffic-filters .segmented {
    margin-left: auto;
  }
  .traffic-clear {
    color: var(--ink-3);
  }
  .traffic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .traffic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--text-13);
    line-height: var(--leading-13);
    text-decoration: none;
  }
  .traffic-chip:hover {
    border-color: var(--line-strong, var(--ink-3));
    color: var(--ink);
  }
  .traffic-chip.is-active {
    border-color: var(--ink);
    background: var(--inverse);
    color: var(--on-inverse);
    font-weight: var(--weight-medium);
  }
  .traffic-chip-count {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .traffic-find {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  .traffic-find .label {
    margin: 0;
  }
  .traffic-narrowed {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.6rem;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .traffic-count {
    margin: 0 0 1rem;
  }
  .session-screen {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .session-screen:hover {
    color: var(--ink);
  }
  .session-link {
    color: inherit;
    text-decoration: none;
  }
  .session-link:hover .session-time {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 0.2em;
  }
  .session-time {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--ink-2);
  }
  .traffic-zone {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding-left: 0.8rem;
    border-left: 1px solid var(--line);
    white-space: nowrap;
  }
  .traffic-zone .label,
  .traffic-zone .hint {
    margin: 0;
    white-space: nowrap;
  }
  .traffic-zone .field--small {
    max-width: 24rem;
  }
  .sessions-table th.is-expander,
  .sessions-table td.is-expander {
    width: 3.2rem;
    padding-right: 0;
  }
  .expander {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    padding: 0;
    border: 0;
    border-radius: var(--r-control);
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
  }
  .expander:hover {
    background: var(--surface-hover);
    color: var(--ink);
  }
  .mirror {
    display: inline-grid;
    transform: scaleX(-1);
  }
  .expander .mirror {
    transition: transform var(--quick) var(--ease);
  }
  .expander .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .session.is-expanded .expander .mirror {
    transform: scaleX(-1) rotate(-90deg);
  }
  .session-expansion > td {
    padding: 0 1.2rem 1.2rem 4.4rem;
    background: var(--surface-2);
  }
  .sessions-table .session-box {
    white-space: nowrap;
  }
  .pagination-per {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  .pagination-per .hint {
    margin: 0;
    white-space: nowrap;
  }
  .traffic-alert {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
  }
  .traffic-alert > .icon {
    flex: none;
    width: 2rem;
    height: 2rem;
    margin-top: 0.1rem;
  }
  .traffic-alert .flash-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex-grow: 1;
  }
  .traffic-alert .flash-title {
    font-weight: var(--weight-strong);
  }
  .traffic-alert .btn {
    flex: none;
    align-self: center;
  }
  @media (max-width: 600px) {
    .traffic-alert {
      flex-wrap: wrap;
    }
    .traffic-alert .btn {
      margin-left: 3.2rem;
    }
  }
  .insights-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1.6rem;
    flex-wrap: wrap;
  }
  .insights-head .hint {
    margin: 0 0 0.8rem;
  }
  .insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
  }
  .insight {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 2rem;
    padding: 1.6rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .insight-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .insight-count strong {
    font-size: var(--text-28);
    font-weight: var(--weight-regular);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
  }
  .insight-count span:not(.pill) {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .insight-body {
    min-width: 0;
    display: grid;
    gap: 0.6rem;
    align-content: start;
  }
  .insight-title {
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    overflow-wrap: anywhere;
  }
  .insight-screen {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.8rem;
    margin: -0.2rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .insight-screen code {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    background: none;
    border: 0;
    padding: 0;
  }
  .insight-screen span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .insight-detail {
    margin: 0;
    max-width: 72rem;
    color: var(--ink-2);
    line-height: 1.55;
  }
  .insight-fix {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0;
    max-width: 72rem;
    font-weight: var(--weight-medium);
  }
  .insight-fix .icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    margin-top: 0.15rem;
    color: var(--ink-3);
  }
  .insight-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
  }
  .insight-actions:empty {
    display: none;
  }
  .insights-assistant {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
  }
  .insights-assistant .icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
  }
  @media (max-width: 600px) {
    .insight {
      grid-template-columns: minmax(0, 1fr);
      gap: 1rem;
      padding: 1.4rem 1.6rem;
    }
    .insight-count {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.4rem 0.8rem;
    }
    .sessions-table .is-keys,
    .sessions-table .session-steps,
    .sessions-table .is-calls,
    .sessions-table .session-calls {
      display: none;
    }
    .sessions-table .session-time {
      display: grid;
    }
    .sessions-table .session-date {
      font-size: var(--text-12);
      line-height: var(--leading-12);
      color: var(--ink-3);
    }
    .sessions-table .pill-where {
      display: none;
    }
    .session-expansion > td {
      padding-left: 1.6rem;
    }
    .trail-row {
      grid-template-columns: 3.4rem minmax(0, 1fr) auto;
      row-gap: 0.4rem;
    }
    .trail-when {
      grid-column: 1 / -1;
    }
    .trail-gap {
      display: none;
    }
    .trail-row.is-call .trail-rail {
      grid-column: 1;
      grid-row: 1 / 3;
    }
    .trail-row.is-call .trail-what {
      grid-column: 2;
    }
    .trail-row.is-call .trail-status {
      grid-column: 3;
    }
    .trail-status:empty {
      display: none;
    }
    .trail-bar {
      grid-column: 1 / -1;
    }
    .trail-row.is-call .trail-bar {
      grid-column: 2 / -1;
    }
    .pagination {
      flex-wrap: wrap;
      row-gap: 0.8rem;
    }
    .pagination-per > label {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }
    .pagination .page-steps {
      margin-left: auto;
    }
    .traffic-find {
      width: 100%;
    }
    .traffic-zone {
      display: none;
    }
    .traffic-sections {
      flex-wrap: nowrap;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .traffic-sections .tab {
      flex: none;
    }
    .traffic-find .field {
      flex: 1;
      min-width: 0;
    }
    .traffic-filters .segmented {
      display: flex;
      width: 100%;
    }
    .traffic-filters .segment {
      flex: 1;
      justify-content: center;
    }
  }

  /* Trace: spans on one time axis, as a tracing tool draws them. */
  .tracing {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .tracing-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
  }
  .tracing > .analytics-bar.is-place {
    margin-bottom: 0;
  }
  .tracing > .analytics-tabs {
    margin-bottom: 0.4rem;
  }
  .tracing-search {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: min(52rem, 100%);
    height: var(--filter-height);
    padding: 0 0.3rem 0 1.4rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-control);
    background: var(--surface);
    color: var(--ink-3);
  }
  .tracing-search .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .tracing-search:focus-within {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgb(var(--focus-rgb) / 0.18);
  }
  .tracing-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink);
    outline: none;
  }
  .tracing-search .btn {
    flex: none;
    min-height: 2.8rem;
  }
  .tracing-back {
    margin-right: auto;
  }
  .tracing-back .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .tracing-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 2.4rem;
    padding: 1.2rem 1.6rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .tracing-summary b {
    color: var(--ink);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
  }
  .tracing-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }
  .tracing-ref code {
    padding: 0.2rem 0.7rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    font: var(--weight-medium) var(--text-12)/var(--leading-12) var(--mono);
    color: var(--ink);
  }
  .tracing-ref.is-matched code {
    background: rgb(var(--focus-rgb) / 0.1);
    box-shadow: inset 0 0 0 1px rgb(var(--focus-rgb) / 0.45);
  }
  .tracing-errors {
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
    background: var(--error-soft);
    color: var(--error);
    font-weight: var(--weight-strong);
  }
  .tracing-legend {
    margin-left: auto;
    display: flex;
    gap: 1.2rem;
  }
  .tracing-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .tracing-legend i {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
  }
  .tracing {
    --span-session: var(--ussd);
    --span-http: var(--wait);
    --span-run: var(--workflow);
    --span-message: var(--message);
    --span-error: var(--error);
  }
  .tracing-legend .is-session {
    background: var(--span-session);
  }
  .tracing-legend .is-http {
    background: var(--span-http);
  }
  .tracing-legend .is-run {
    background: var(--span-run);
  }
  .tracing-legend .is-message {
    background: var(--span-message);
  }

  .tracing-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34rem;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    align-items: start;
  }
  .tracing-fall {
    min-width: 0;
    font-size: var(--text-14);
    line-height: 1;
    overflow-x: auto;
  }
  .tracing-axis,
  .tracing-span {
    display: grid;
    grid-template-columns: minmax(28rem, 42%) minmax(16rem, 1fr) 8.4rem;
    align-items: center;
    height: 3.4rem;
    border-bottom: 1px solid var(--line);
  }
  .tracing-axis {
    height: 3.6rem;
    background: var(--table-head);
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
  }
  .tracing-axis > span:first-child {
    padding-left: 1.6rem;
  }
  .tracing-axis > span:last-child,
  .tracing-took {
    text-align: right;
    padding-right: 1.6rem;
  }
  .tracing-track {
    position: relative;
    height: 100%;
    background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 25% 100%;
  }
  .tracing-axis .tracing-track small {
    position: absolute;
    left: var(--x);
    top: 1.1rem;
    padding-left: 0.4rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-variant-numeric: tabular-nums;
  }
  .tracing-span {
    cursor: pointer;
  }
  .tracing-span:hover {
    background: var(--surface-hover);
  }
  .tracing-span[aria-selected="true"] {
    background: var(--surface-selected);
    box-shadow: inset 2px 0 0 var(--primary);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .tracing-span:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
  }
  .tracing-name {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-left: calc(1rem + var(--depth) * 1.8rem);
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
  }
  .tracing-name b {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
  }
  .tracing-name > span {
    color: var(--ink);
    font: var(--weight-regular) var(--text-12)/var(--leading-12) var(--mono);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tracing-name em {
    font-style: normal;
    color: var(--ink-3);
  }
  :is(.is-session, .is-run) > .tracing-name > span {
    font: var(--weight-strong) var(--text-14)/var(--leading-14) var(--sans);
  }
  .tracing-span.is-error .tracing-name em,
  .tracing-span.is-error .tracing-took {
    color: var(--error);
    font-weight: var(--weight-strong);
  }
  .tracing-fold {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-3);
    display: grid;
    place-items: center;
  }
  .tracing-fold .icon {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform var(--quick) var(--ease);
  }
  [aria-expanded="false"] .tracing-fold .icon {
    transform: rotate(-90deg);
  }
  .tracing-mark {
    flex: none;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--span);
  }
  .tracing-span,
  .tracing-detail-head .tracing-mark {
    --span: var(--span-session);
  }
  .is-http {
    --span: var(--span-http);
  }
  .is-run,
  .is-wait,
  .is-retry,
  .is-agent {
    --span: var(--span-run);
  }
  .is-callback {
    --span: var(--span-http);
  }
  .is-sms,
  .is-whatsapp {
    --span: var(--span-message);
  }
  .is-end {
    --span: var(--ink-3);
  }
  .tracing-span.is-error,
  .tracing-mark.is-error {
    --span: var(--span-error);
  }
  .is-callback .tracing-mark,
  .tracing-mark.is-callback {
    transform: rotate(45deg);
  }
  .is-end .tracing-mark,
  .is-retry .tracing-mark {
    background: none;
    box-shadow: inset 0 0 0 1px var(--span);
  }
  .tracing-track i {
    position: absolute;
    top: 1.3rem;
    height: 0.8rem;
    left: var(--x);
    width: max(var(--w), 3px);
    border-radius: 2px;
    background: var(--span);
  }
  .tracing-span[data-depth="0"] .tracing-track i {
    top: 1.2rem;
    height: 1rem;
    opacity: 0.85;
  }
  .tracing-track i.is-instant {
    width: 2px;
    top: 1rem;
    height: 1.4rem;
  }
  .is-callback .tracing-track i.is-instant {
    width: 0.9rem;
    height: 0.9rem;
    top: 1.25rem;
    margin-left: -0.45rem;
    transform: rotate(45deg);
  }
  .is-retry .tracing-track i {
    background: none;
    border: 1px dashed var(--span);
  }
  .tracing-took {
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
  }

  .tracing-detail {
    border-left: 1px solid var(--line);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    min-width: 0;
  }
  .tracing-detail-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    height: 3.6rem;
    padding: 0 1.6rem;
    border-bottom: 1px solid var(--line);
    background: var(--table-head);
  }
  .tracing-detail-head b {
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
  }
  .tracing-detail dl {
    margin: 0;
    padding: 0.4rem 1.6rem 1.2rem;
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
  }
  .tracing-detail dt,
  .tracing-detail dd {
    margin: 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }
  .tracing-detail dt {
    color: var(--ink-3);
  }
  .tracing-detail dt::first-letter {
    text-transform: uppercase;
  }
  .tracing-detail dd {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }

  .tracing-note {
    margin: 0;
    color: var(--ink-2);
  }
  .tracing-results {
    display: grid;
    gap: 1.2rem;
  }
  .tracing-flows {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .tracing-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    background: var(--card);
  }
  .tracing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .tracing-table th,
  .tracing-table td {
    padding: 0.9rem 1.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
  }
  .tracing-table thead th {
    background: var(--table-head);
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    white-space: nowrap;
  }
  .tracing-table thead th a {
    color: inherit;
    text-decoration: none;
  }
  .tracing-table thead th a.is-sorted {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
  .tracing-table tbody tr:last-child > * {
    border-bottom: 0;
  }
  .tracing-table .tracing-day th {
    padding: 1.2rem 1.6rem 0.5rem;
    background: var(--surface-2);
    color: var(--ink-2);
    font: var(--weight-medium) var(--text-12)/var(--leading-12) var(--mono);
  }
  .tracing-table .tracing-row:hover > td {
    background: var(--surface-hover);
  }
  .tracing-table .is-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .tracing-table .tracing-ref {
    display: inline-flex;
    gap: 0.4rem;
    margin: 0 0.8rem 0.2rem 0;
  }
  .tracing-table .tracing-flow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-right: 0.8rem;
    white-space: nowrap;
  }
  .tracing-when {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--link);
    text-decoration: none;
  }
  .tracing-when:hover {
    text-decoration: underline;
  }
  .tracing-candidates {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .tracing-candidates a {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.2rem;
    min-height: 4.4rem;
    padding: 0 1.6rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
  }
  .tracing-candidates a:hover {
    background: var(--surface-hover);
  }
  .tracing-candidates code {
    font: var(--weight-regular) var(--text-12)/var(--leading-12) var(--mono);
    color: var(--ink-2);
  }

  @media (max-width: 900px) {
    .tracing-body {
      grid-template-columns: minmax(0, 1fr);
    }
    .tracing-detail {
      border-left: 0;
      border-top: 1px solid var(--line);
    }
    .tracing-legend {
      margin-left: 0;
    }
    .tracing-axis .tracing-track small:nth-child(even) {
      display: none;
    }
  }
}

/* Drop-off: the path as the site draws a funnel, why each step lost callers under it, and the picked step beside it. */
@layer modules {
  .dropoff-stats {
    margin-bottom: 2.4rem;
  }
  .dropoff-stats .stat-of {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    letter-spacing: 0;
  }
  .dropoff-stats .stat {
    min-width: 0;
  }
  .dropoff-stats dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dropoff-stats code {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-family: var(--mono);
    font-size: var(--text-16);
    line-height: var(--leading-16);
  }
  .dropoff-stat-link {
    color: var(--ink);
    text-decoration: none;
  }
  .dropoff-stat-link:hover code {
    text-decoration: underline;
  }
  .dropoff-delta.is-up {
    color: var(--ok-ink);
    font-weight: var(--weight-strong);
  }
  .dropoff-delta.is-down {
    color: var(--error);
    font-weight: var(--weight-strong);
  }
  .dropoff-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36rem;
    gap: 3.2rem;
    align-items: start;
    scroll-margin-top: 8rem;
  }
  .dropoff-path {
    gap: 0.2rem;
  }
  .dropoff-path .funnel-step {
    grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr) 13rem;
    padding: 0.8rem;
    border-radius: var(--r-control);
  }
  .dropoff-path .funnel-step.is-selected {
    background: var(--surface-selected);
  }
  .dropoff-path .funnel-label {
    color: var(--ink);
    text-decoration: none;
  }
  .dropoff-path .funnel-label:hover .funnel-name {
    text-decoration: underline;
  }
  .dropoff-path .funnel-ends {
    justify-items: end;
  }
  .dropoff-why {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
  }
  .dropoff-why .pill b {
    font-weight: var(--weight-strong);
  }
  .dropoff-clock {
    margin-left: 0.4rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .dropoff-detail {
    position: sticky;
    top: 8rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .dropoff-detail .traffic-heading {
    margin-bottom: 0.2rem;
  }
  .dropoff-detail-sub {
    margin: 0;
  }
  .dropoff-detail-sub code {
    font-family: var(--mono);
  }
  .dropoff-screen {
    margin: 1.2rem 0;
    background: var(--surface-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .dropoff-detail-rows {
    margin: 0;
  }
  .dropoff-detail-rows div {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .dropoff-detail-rows dt {
    color: var(--ink-2);
  }
  .dropoff-detail-rows dd {
    margin: 0;
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .dropoff-help {
    margin: 1.2rem 0;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .dropoff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .dropoff-choices {
    margin-top: 3.2rem;
  }
  .choice-key {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    margin-right: 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    font: var(--weight-strong) var(--text-12)/var(--leading-12) var(--mono);
  }
  .stat-change {
    margin: 0.2rem 0 0;
    font: inherit;
  }
  .traffic-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30rem;
    gap: 2.4rem;
    align-items: start;
    margin-bottom: 2.4rem;
  }
  .traffic-summary-main {
    display: grid;
    gap: 2.4rem;
    min-width: 0;
  }
  .traffic-summary-main > .traffic-section {
    margin: 0;
  }
  .traffic-summary-side {
    display: grid;
    gap: 1.2rem;
  }
  .traffic-card {
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .traffic-card-title {
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .traffic-card > .hint {
    margin: 0.2rem 0 0.8rem;
  }
  .traffic-card-rows {
    margin: 0;
  }
  .traffic-card-rows > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 1.2rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--line);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .traffic-card-rows dt .hint {
    display: block;
  }
  .traffic-card-rows dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
  }
  .traffic-card-change {
    display: block;
  }
  .network-row dd strong {
    font-weight: var(--weight-strong);
  }
  .traffic-card-rows .network-split {
    grid-column: 1 / -1;
    height: 0.4rem;
    margin-top: 0.6rem;
    border-radius: var(--radius-chip);
    background: linear-gradient(to right, var(--ok) var(--done), var(--track) var(--done));
  }
  .leaving-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
  }
  .leaving-head .hint {
    margin: 0;
  }
  .leaving-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
  }
  .leaving-row {
    display: grid;
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr) 7rem 11rem;
    align-items: center;
    gap: 1.2rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .leaving-name {
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
  }
  .leaving-name:hover {
    text-decoration: underline;
  }
  .leaving-track {
    height: 0.8rem;
    border-radius: var(--radius-chip);
    background: var(--track);
    overflow: hidden;
  }
  .leaving-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ink-3);
  }
  .leaving-count {
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
    text-align: right;
  }
  .leaving-share {
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    text-align: right;
  }
  .leaving-row.is-worst .leaving-track span {
    background: var(--danger);
  }
  .leaving-row.is-worst .leaving-count {
    color: var(--error);
  }
  @media (max-width: 1000px) {
    .traffic-summary {
      grid-template-columns: minmax(0, 1fr);
    }
    .leaving-head {
      flex-direction: column;
      gap: 0;
    }
    .leaving-row {
      grid-template-columns: minmax(0, 1fr) auto;
      row-gap: 0.4rem;
    }
    .leaving-track {
      grid-column: 1 / -1;
      grid-row: 2;
    }
    .leaving-share {
      display: none;
    }
  }
  @media (max-width: 1100px) {
    .dropoff-board {
      grid-template-columns: minmax(0, 1fr);
    }
    .dropoff-detail {
      position: static;
    }
  }
  @media (max-width: 720px) {
    .dropoff-path .funnel-step {
      grid-template-columns: minmax(0, 1fr) auto;
    }
    .dropoff-path .funnel-bar {
      grid-column: 1 / -1;
      grid-row: 2;
    }
    .dropoff-why {
      grid-column: 1 / -1;
    }
  }
}

/* A section on its way: rows in the shape of what comes, pulsing gently unless motion is reduced. */
@layer modules {
  .section-waiting {
    display: grid;
    gap: 1.2rem;
    padding: 0.4rem 0 2.4rem;
  }
  .section-waiting span {
    display: block;
    height: 2.2rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    animation: section-waiting 1.4s ease-in-out infinite;
  }
  .section-waiting-head {
    width: 18rem;
    height: 1.8rem !important;
  }
  .section-waiting-row {
    width: var(--w);
  }
  @keyframes section-waiting {
    50% {
      opacity: 0.55;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .section-waiting span {
      animation: none;
    }
  }
}

@layer modules {
  .sends-back {
    margin: 0 0 0.8rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sends-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.6rem;
    flex-wrap: wrap;
  }
  .sends-head .display {
    margin: 0;
  }
  .sends-head + .flash.is-inline {
    margin: 2rem 0 0;
  }
  .sends-head .sub {
    margin: 0.6rem 0 0;
  }
  .sends-standing {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.6rem;
    align-items: center;
    margin: 1.2rem 0 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink-2);
  }
  .sends-standing strong {
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .sends-table {
    margin-top: 2.4rem;
  }
  .messaging-tabs {
    max-width: none;
    margin-top: 2rem;
  }
  .messaging-tabs + .pane-empty {
    margin-top: 1rem;
  }
  .place-name {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .messaging-count {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: var(--warning-soft);
    color: var(--warning);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .lang {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0.4rem 0.4rem 0;
    padding: 0.15rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .lang b {
    font-weight: var(--weight-strong);
    letter-spacing: 0.02em;
  }
  .lang.is-approved {
    border-color: transparent;
    background: var(--ok-soft);
    color: var(--ok-ink);
  }
  .lang.is-pending,
  .lang.is-in_review,
  .lang.is-appeal_requested {
    border-color: transparent;
    background: var(--router-soft);
    color: var(--ink);
  }
  .lang.is-rejected,
  .lang.is-disabled {
    border-color: transparent;
    background: var(--error-soft);
    color: var(--error);
  }
  .lang.is-paused {
    border-color: transparent;
    background: var(--warning-soft);
    color: var(--warning);
  }
  .lang .icon {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
  }
  .lang.is-sms {
    border-color: transparent;
    background: var(--menu-soft);
    color: var(--menu-ink);
    text-decoration: none;
  }
  .lang.is-add {
    border-style: dashed;
    background: none;
    color: var(--ink-2);
    font-family: inherit;
    cursor: pointer;
  }
  .lang.is-add:hover {
    border-color: var(--ink-3);
    color: var(--ink);
  }
  .tpl-add {
    display: inline;
  }
  .templates-list .is-state {
    width: 44rem;
  }
  .templates-list .tpl-languages {
    gap: 0.6rem;
    align-items: center;
  }
  .templates-list .lang {
    margin: 0;
  }
  .why {
    display: block;
    margin-top: 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .why strong {
    font-weight: var(--weight-strong);
    color: var(--ink-2);
  }
  .numbers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(44rem, 100%), 1fr));
    gap: 1.6rem;
    margin-top: 2.4rem;
  }
  .number-card {
    display: grid;
    gap: 1.4rem;
    align-content: start;
    padding: 2rem 2.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    background: var(--card);
  }
  .number-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }
  .number-card h2 {
    margin: 0;
    font-size: var(--text-20);
    line-height: var(--leading-20);
    font-weight: 400;
  }
  .number-card h2 small {
    display: block;
    margin-top: 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .number-card header .scribble {
    flex: none;
    width: auto;
    height: 8rem;
    margin: -0.8rem -0.6rem -0.4rem 0;
  }
  .checklist {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
  }
  .checklist li {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: start;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .checklist .tick {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .checklist .is-done .tick {
    color: var(--ok);
  }
  .checklist .tick .icon {
    width: 100%;
    height: 100%;
  }
  .checklist .is-next .tick {
    background: var(--primary);
    color: var(--on-accent);
  }
  .checklist .is-later .tick {
    border: 1px solid var(--line-strong);
    color: var(--ink-2);
  }
  .checklist li > span {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
  }
  .checklist small {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
    overflow-wrap: anywhere;
  }
  .checklist .is-later strong {
    color: var(--ink-2);
    font-weight: var(--weight-medium);
  }
  .checklist a:not(.btn) {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
  }
  .number-card a.go {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--link);
    font-weight: var(--weight-medium);
    text-decoration: none;
  }
  .number-card a.go:hover {
    text-decoration: underline;
    text-decoration-color: currentColor;
  }
  .number-card a.go .icon {
    width: 1.4rem;
    height: 1.4rem;
    transition: translate var(--quick) var(--ease);
  }
  .number-card a.go:hover .icon {
    translate: 0.2rem 0;
  }
  .checklist-links {
    display: grid;
    gap: 0.4rem;
    justify-items: end;
  }
  .number-foot {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }
  .number-foot:empty {
    display: none;
  }
  .sender-todo {
    grid-column: 1 / -1;
    border-top-style: dashed;
  }
  .sender-todo li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .sender-todo a.go {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--link);
    font-weight: var(--weight-medium);
    text-decoration: none;
  }
  .sender-todo .is-next .tick {
    background: var(--warning-soft);
    color: var(--warning);
  }
  .sender-none {
    margin: 1.6rem 0 0;
  }
  .sender-add .menu-items {
    right: 0;
    left: auto;
    min-width: 26rem;
  }
  .send-from {
    display: grid;
    gap: 2rem;
  }
  .send-from-none {
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink-2);
  }

  .tpl-back {
    margin-top: 1.6rem;
  }
  .tpl-change {
    max-width: 72rem;
    margin-top: 1.2rem;
  }
  .tpl {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36rem;
    gap: 3.2rem;
    align-items: start;
    margin-top: 1.2rem;
    padding-bottom: 9rem;
  }
  .tpl-form {
    display: grid;
    gap: 2.2rem;
    min-width: 0;
  }
  .tpl-field {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .tpl-field > .label {
    margin: 0;
    padding: 0;
  }
  .tpl-short {
    max-width: 44rem;
  }
  .tpl-body {
    min-height: 11rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    resize: vertical;
  }
  .cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
    gap: 1rem;
  }
  .cat {
    display: grid;
    align-content: start;
    gap: 0.4rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    cursor: pointer;
  }
  .cat:has(:checked) {
    border-color: var(--focus);
    box-shadow: 0 0 0 1px var(--focus);
  }
  .cat:has(:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }
  .cat .scribble {
    width: calc(100% + 3.2rem);
    height: 9rem;
    margin: -1.4rem -1.6rem 0.6rem;
    background: color-mix(in srgb, var(--spot) 8%, transparent);
  }
  .cat strong {
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .cat span {
    color: var(--ink-2);
  }
  .cat small {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .seg {
    display: inline-flex;
    flex-wrap: wrap;
    justify-self: start;
    gap: 0.2rem;
    padding: 0.4rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--field);
  }
  .seg label {
    cursor: pointer;
  }
  .seg span {
    display: block;
    padding: 0.5rem 1.4rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--ink-3);
    font-size: var(--text-13);
    line-height: var(--leading-13);
  }
  .seg label:has(:checked) span {
    background: var(--surface);
    color: var(--ink);
    font-weight: var(--weight-medium);
    box-shadow: var(--shadow-segment);
  }
  .seg label:has(:focus-visible) span {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
  }
  .tpl-languages {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .tpl-channel {
    display: grid;
    gap: 1.2rem;
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .tpl-channel-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    font-size: var(--text-16);
    line-height: var(--leading-16);
    font-weight: var(--weight-medium);
  }
  .tpl-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .tpl-value {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.1rem 0.8rem;
    border-radius: var(--r-control);
    background: var(--message-soft);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .tpl-value code,
  .tpl-value small {
    font-size: inherit;
  }
  .tpl-value small {
    color: var(--ink-3);
  }
  .tpl-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
  }
  .tpl-actions {
    display: flex;
    gap: 0.8rem;
  }
  .tpl-preview {
    display: grid;
    gap: 1.6rem;
    padding: 1.6rem;
    border-radius: var(--r-card);
    background: var(--surface-2);
  }
  .tpl-preview .message-heading {
    margin: 0;
  }
  .tpl-samples {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.8rem;
  }
  .tpl-samples label {
    display: grid;
    gap: 0.2rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .tpl-bubble {
    display: grid;
    gap: 0.6rem;
  }
  .tpl-bubble[hidden] {
    display: none;
  }
  .tpl-bubble-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .tpl-bubble-label .channel-mark {
    width: 2rem;
    height: 2rem;
  }
  .tpl-bubble-label .channel-mark .icon {
    width: 1.2rem;
    height: 1.2rem;
  }
  .tpl-language-tabs {
    margin: 0;
  }
  .samples {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .samples:has(tbody:empty) {
    display: none;
  }
  .samples td {
    padding: 0.6rem 1rem 0.6rem 0;
    border-top: 1px solid var(--line);
  }
  .samples td:first-child {
    width: 30%;
    font-family: var(--mono);
  }
  .tpl-buttons {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .tpl-button {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
  }
  .checks {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .checks li {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
  }
  .checks .icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    margin-top: 0.1rem;
  }
  .checks .is-ok .icon {
    color: var(--ok);
  }
  .checks .is-bad .icon {
    color: var(--error);
  }
  .lang.is-draft {
    border-style: dashed;
    color: var(--ink-2);
    text-decoration: none;
  }
  .tpl-actions {
    width: 1%;
    white-space: nowrap;
  }
  .tpl-actions-row {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
  }
  @media (max-width: 1000px) {
    .tpl {
      grid-template-columns: minmax(0, 1fr);
    }
    .tpl-button {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .sends-places {
    display: grid;
    gap: 3.2rem;
    margin-top: 2.4rem;
  }
  .sends-places > .hint {
    margin: -2rem 0 0;
  }
  .sends-place h2 {
    margin: 0 0 0.4rem;
    font-size: var(--text-20);
    line-height: var(--leading-20);
    font-weight: 400;
  }
  .sends-place .sends-table {
    margin-top: 1.6rem;
  }
  .sends-more {
    margin: 0.8rem 0 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sends-state-line {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .send-bar {
    display: flex;
    height: 0.8rem;
    width: 100%;
    min-width: 16rem;
    margin-top: 1.2rem;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--line);
  }
  .send-progress .send-bar {
    margin-top: 0;
  }
  .send-bar span {
    display: block;
    height: 100%;
  }
  .send-bar .is-read {
    background: var(--ok);
  }
  .send-bar .is-arrived {
    background: var(--arrived);
  }
  .send-bar .is-on-its-way {
    background: var(--router);
  }
  .send-bar .is-didnt-arrive {
    background: var(--not-arrived);
  }
  .send-progress {
    display: grid;
    gap: 0.5rem;
    min-width: 22rem;
  }
  .send-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .send-counts b {
    color: var(--ink-2);
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
  }
  .send-key {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .send-key::before {
    content: "";
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
  }
  .send-name {
    display: grid;
    gap: 0.2rem;
  }
  .send-name.has-channel {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
  }
  .send-name.has-channel > :not(.send-channel-mark) {
    grid-column: 2;
  }
  .send-channel-mark {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
  }
  .send-channel-mark.is-whatsapp {
    background: var(--whatsapp-soft);
    color: var(--whatsapp-ink);
  }
  .send-channel-mark.is-sms {
    background: var(--menu-soft);
    color: var(--menu);
  }
  .send-channel-mark .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .sends-list-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 2.4rem;
  }
  .sends-list-bar .sends-filters b {
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
  }
  .sends-filters .filter-dot {
    flex: none;
    opacity: 1;
  }
  .sends-list-bar + .sends-table {
    margin-top: 1.2rem;
  }
  .sends-from .field {
    min-width: 22rem;
  }
  .sends-none {
    margin: 1.6rem 0 0;
    color: var(--ink-3);
  }
  .send-name a {
    font-weight: var(--weight-strong);
  }
  .send-name code,
  .send-name small {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .send-when {
    display: grid;
    gap: 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
    white-space: nowrap;
  }
  .send-when span {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .sends-table .send-channel-mark {
    flex: none;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: var(--r-control);
  }
  .data-table .send-when {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: inherit;
  }
  .data-table .send-when span {
    font-size: inherit;
  }
  .data-table .send-when span::before {
    content: "· ";
  }
  .sends-table .send-sender {
    white-space: nowrap;
  }
  .sends-table .send-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
  }
  .sends-table .send-progress .send-bar {
    flex: none;
    width: 10rem;
    min-width: 10rem;
    height: 0.6rem;
    border-radius: 999px;
  }
  .sends-table .send-counts {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .sends-table .lang {
    margin-bottom: 0;
  }
  .mono-num {
    font-variant-numeric: tabular-nums;
  }

  .sends-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.2rem;
    margin-top: 2.4rem;
  }
  .sends-stat {
    --accent: var(--line-strong);
    position: relative;
    overflow: clip;
    display: grid;
    gap: 0.3rem;
    padding: 1.6rem 1.6rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .sends-stat b {
    font-size: var(--text-24);
    font-weight: var(--weight-regular);
    line-height: var(--leading-24);
    letter-spacing: var(--tracking-24);
    font-variant-numeric: tabular-nums;
  }
  .sends-stat span {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .sends-stat small {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .sends-stat.is-read {
    --accent: var(--ok);
  }
  .sends-stat.is-arrived {
    --accent: var(--arrived);
  }
  .sends-stat.is-on-its-way {
    --accent: var(--router);
  }
  .sends-stat.is-waiting {
    --accent: var(--line-strong);
  }
  .sends-stat.is-didnt-arrive {
    --accent: var(--not-arrived);
  }
  .sends-stat > span:first-child::before {
    content: "";
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0.6rem;
    border-radius: 0.2rem;
    background: var(--accent);
  }
  .sends-filters .filter-dot.is-ok {
    background: var(--arrived);
  }
  .sends-filters .filter-dot.is-error,
  .sends-filters .filter-dot.is-failed {
    background: var(--not-arrived);
  }
  .sends-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 2.4rem;
    align-items: start;
    margin-top: 2.4rem;
  }
  .sends-detail.is-single {
    grid-template-columns: minmax(0, 1fr);
  }
  .sends-section {
    display: grid;
    gap: 1.4rem;
    padding: 2rem 2.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    background: var(--card);
  }
  .sends-section h2 {
    margin: 0;
    font: var(--font-lead);
    letter-spacing: var(--tracking-20);
  }
  .sends-reasons {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.8rem;
  }
  .sends-reasons li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 1.6rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sends-reasons li span {
    grid-column: 1;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .sends-reasons li b {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-weight: var(--weight-strong);
  }
  .sends-filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
  }
  /* A filter is a control, so it stands as tall as the fields beside it and fills when chosen, as on Flows. */
  .sends-filters .pill {
    gap: 0.6rem;
    height: var(--filter-height);
    padding: 0 1.2rem;
    border-color: var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--text-13);
    line-height: var(--leading-13);
    font-weight: var(--weight-regular);
    text-decoration: none;
  }
  .sends-filters .pill:hover:not(.is-on) {
    border-color: var(--line-strong);
    color: var(--ink);
  }
  .sends-filters .pill.is-on {
    border-color: var(--inverse);
    background: var(--inverse);
    color: var(--on-inverse);
    font-weight: var(--weight-medium);
  }
  .sends-pages {
    display: flex;
    gap: 1.6rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sends-confirm {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .draft {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36rem;
    gap: 3.2rem;
    align-items: start;
    margin-top: 2.4rem;
    padding-bottom: 9rem;
  }
  .draft-preview {
    position: sticky;
    top: 1.6rem;
    display: grid;
    gap: 1.2rem;
  }
  .pv {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    background: var(--chat-bg);
  }
  .pv-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: var(--chat-head);
    color: var(--chat-ink);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .pv-head strong {
    font-weight: var(--weight-strong);
  }
  .pv-nav {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    color: var(--chat-muted);
  }
  .pv-nav a {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--chat-in);
    color: var(--chat-ink);
    text-decoration: none;
  }
  .pv-body {
    display: grid;
    gap: 0.8rem;
    align-content: start;
    min-height: 26rem;
    padding: 1.8rem 1.6rem 2.4rem;
  }
  .pv-day {
    justify-self: center;
    padding: 0.3rem 1rem;
    border-radius: 6px;
    background: var(--chat-note);
    color: var(--chat-muted);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .pv .sends-bubble {
    max-width: 100%;
  }
  .sends-bubble .blank {
    padding: 0 0.3rem;
    border-radius: 3px;
    background: color-mix(in oklab, var(--chat-muted) 22%, transparent);
    color: var(--chat-muted);
  }
  .pv-note {
    margin: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .tester {
    display: grid;
    gap: 0.8rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    background: var(--card);
  }
  .tester strong {
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .tester .row {
    display: flex;
    gap: 0.8rem;
  }
  .tester .row .field {
    flex: 1;
    min-width: 0;
  }
  .sendbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.6rem;
    padding: 1.4rem max(2.4rem, calc((100vw - 144rem) / 2 + 2.4rem)) calc(1.4rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--app-bg) 94%, transparent);
    backdrop-filter: blur(6px);
  }
  .sendbar-state {
    display: grid;
    gap: 0.2rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sendbar-state strong {
    font-weight: var(--weight-strong);
  }
  .sendbar-state span {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .sendbar .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .drop-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .drop-line span {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .inline-warn {
    padding: 1rem 1.2rem;
    border-left: 3px solid var(--warning);
    background: var(--warning-soft);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .pick {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
  }
  .choice-head {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .choice-head .pill {
    font-weight: var(--weight-strong);
  }
  .pick-text {
    font-size: var(--text-14);
    color: var(--ink-2);
    line-height: var(--leading-14);
  }
  .tslot {
    padding: 0 0.4rem;
    border-radius: 3px;
    background: var(--message-soft);
    color: var(--ink);
  }

  .sends-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sends-file span {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }

  .sends-chat {
    display: grid;
    gap: 1rem;
    padding: 1.6rem;
    border-radius: var(--r-card);
    background: var(--chat-bg);
  }
  .sends-bubble {
    justify-self: start;
    max-width: 34rem;
    padding: 0.8rem 1rem 1rem;
    border-radius: 0 8px 8px 8px;
    background: var(--chat-in);
    color: var(--chat-ink);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    box-shadow: 0 1px 0.5px rgb(11 20 26 / 0.13);
  }
  .sends-bubble p {
    margin: 0 0 0.4rem;
  }
  .sends-bubble .bubble-header {
    font-weight: var(--weight-strong);
  }
  .sends-bubble .bubble-footer {
    color: var(--chat-muted);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .sends-bubble:has(.wa-media, .wa-doc) {
    width: 30rem;
    max-width: 100%;
  }
  .sends-bubble p:empty {
    display: none;
  }
  .sends-bubble :is(.wa-media, .wa-doc):not(:has(~ :not(:empty))) {
    margin-bottom: -0.6rem;
  }
  .sends-bubble .wa-media {
    position: relative;
    display: grid;
    place-items: center;
    margin: -0.4rem -0.6rem 0.6rem;
    border-radius: 6px;
    overflow: hidden;
    background: color-mix(in oklab, var(--chat-muted) 18%, var(--chat-in));
  }
  .sends-bubble .wa-media.is-image {
    aspect-ratio: 1.91 / 1;
  }
  .sends-bubble .wa-media.is-video {
    aspect-ratio: 16 / 9;
  }
  .sends-bubble .wa-media-glyph {
    width: 4.4rem;
    height: 4.4rem;
    fill: color-mix(in oklab, var(--chat-muted) 60%, transparent);
  }
  .sends-bubble .wa-media-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .sends-bubble .wa-play {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.2rem;
    height: 5.2rem;
    border-radius: 50%;
    background: rgb(11 20 26 / 0.55);
  }
  .sends-bubble .wa-play svg {
    width: 2.8rem;
    height: 2.8rem;
    margin-left: 0.3rem;
    fill: #fff;
  }
  .sends-bubble .wa-videocam {
    position: absolute;
    left: 0.8rem;
    bottom: 0.6rem;
    width: 1.8rem;
    height: 1.8rem;
    fill: #fff;
    filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.5));
  }
  .sends-bubble .wa-doc {
    --band: #8696a0;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: -0.2rem -0.4rem 0.6rem;
    padding: 1rem;
    border-radius: 6px;
    background: color-mix(in oklab, var(--chat-bg) 60%, var(--chat-in));
  }
  .sends-bubble .wa-doc[data-ext="pdf"] {
    --band: #e5252a;
  }
  .sends-bubble .wa-doc:is([data-ext="doc"], [data-ext="docx"], [data-ext="rtf"], [data-ext="odt"]) {
    --band: #2b579a;
  }
  .sends-bubble .wa-doc:is([data-ext="xls"], [data-ext="xlsx"], [data-ext="csv"], [data-ext="ods"]) {
    --band: #217346;
  }
  .sends-bubble .wa-doc:is([data-ext="ppt"], [data-ext="pptx"], [data-ext="odp"]) {
    --band: #d24726;
  }
  .sends-bubble .wa-doc-icon {
    flex: none;
    width: 2.6rem;
    height: 3.2rem;
  }
  .sends-bubble .wa-doc-page {
    fill: #fff;
    stroke: #d1d7db;
  }
  .sends-bubble .wa-doc-fold {
    fill: #e9edef;
    stroke: #d1d7db;
  }
  .sends-bubble .wa-doc-band {
    fill: var(--band);
  }
  .sends-bubble .wa-doc-lines {
    fill: none;
    stroke: #c4ccd1;
    stroke-width: 1.4;
    stroke-linecap: round;
  }
  .sends-bubble .wa-doc[data-ext=""] :is(.wa-doc-band, text) {
    display: none;
  }
  .sends-bubble .wa-doc:not([data-ext=""]) .wa-doc-lines {
    display: none;
  }
  .sends-bubble .wa-doc-name.blank {
    padding: 0;
    background: none;
    font-family: inherit;
    color: var(--chat-muted);
  }
  .sends-bubble .wa-doc-icon text {
    fill: #fff;
    font:
      700 6.4px/1 system-ui,
      sans-serif;
    letter-spacing: 0.1px;
  }
  .sends-bubble .wa-doc-words {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
  }
  .sends-bubble .wa-doc-name {
    overflow: hidden;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .sends-bubble .wa-doc-type {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--chat-muted);
  }
  .sends-bubble .wa-doc-type:empty {
    display: none;
  }
  .sends-bubble .to {
    display: block;
    margin-bottom: 0.4rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--chat-muted);
  }
  .sends-bubble mark,
  .sends-bubble p [data-fill]:not(.blank) {
    padding: 0 0.2rem;
    border-radius: 3px;
    background: color-mix(in oklab, var(--chat-accent) 22%, transparent);
    color: inherit;
  }
  .sends-bubble .btn-row {
    display: block;
    margin: 0.6rem -1rem -1rem;
    padding: 0.8rem;
    border-top: 1px solid rgb(11 20 26 / 0.08);
    text-align: center;
    color: var(--chat-action);
    font-weight: var(--weight-medium);
  }

  .test-status {
    margin-top: 0.6rem;
    font-weight: var(--weight-strong);
    color: var(--ink-2);
  }
  .test-status.is-delivered,
  .test-status.is-read {
    color: var(--ok-ink);
  }
  .test-status.is-failed {
    color: var(--error);
  }
  .sends-workflow {
    margin-top: 1.6rem;
  }

  .numbers-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3.2rem 0 0;
    font-size: var(--text-16);
    line-height: var(--leading-16);
    font-weight: var(--weight-strong);
  }
  .numbers-group + .numbers {
    margin-top: 1.2rem;
  }
  .checklist .is-waiting .tick {
    border: 1px solid var(--router);
    color: var(--router);
  }
  .checklist .is-refused .tick {
    color: var(--error);
  }
  .checklist .is-refused small {
    color: var(--error);
  }
  .field.sms-text {
    min-height: 12rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    resize: vertical;
  }
  .device-screen.is-sms {
    background: var(--phone-app-bg);
  }
  .is-sms .sms-head {
    position: relative;
    display: grid;
    justify-content: stretch;
    justify-items: center;
    gap: 4px;
    padding: 4px 12px 10px;
    border-bottom: 0.5px solid var(--phone-field-line);
    background: var(--phone-veil);
  }
  .sms-back {
    position: absolute;
    left: 8px;
    top: 14px;
    color: var(--phone-link);
  }
  .sms-back .icon {
    width: 22px;
    height: 22px;
  }
  .sms-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(#a5abb8, #858994);
    color: #fff;
    font-size: 19px;
    font-weight: var(--weight-medium);
  }
  .is-sms .sms-from {
    font-size: 11px;
    line-height: 1.2;
    color: var(--phone-ink);
  }
  .sms-log {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    padding: 12px 12px 8px;
    overflow-y: auto;
  }
  .sms-day {
    align-self: center;
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--phone-muted);
  }
  .sms-bubble {
    align-self: flex-start;
    max-width: 78%;
    margin: 0;
    padding: 7px 12px 8px;
    border-radius: 18px;
    background: var(--phone-bubble-in);
    color: var(--phone-ink);
    font-size: 15px;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .sms-bubble mark {
    padding: 0 2px;
    border-radius: 3px;
    background: color-mix(in oklab, var(--phone-link) 22%, transparent);
    color: inherit;
  }
  .sms-bubble .blank {
    color: var(--phone-link);
  }
  .sms-bubble .is-subtle {
    color: var(--phone-muted);
  }
  .sms-composer {
    display: grid;
    padding: 8px 12px 26px;
  }
  .sms-no-reply {
    font-size: 11.5px;
    text-align: center;
    color: var(--phone-muted);
  }
  .sms-field {
    padding: 5px 12px;
    border: 0.5px solid var(--phone-field-line);
    border-radius: 18px;
    font-size: 14px;
    color: var(--phone-muted);
  }
  .sms-sent-text {
    max-width: 72ch;
    margin: 1.6rem 0 0;
    padding: 1rem 1.4rem;
    border-left: 3px solid var(--line-strong);
    background: var(--surface);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .sms-totals {
    margin: 0.8rem 0 0;
  }
  .send-live {
    display: grid;
    gap: 1.4rem;
    margin-top: 2.4rem;
  }
  .send-live-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.2rem;
    flex-wrap: wrap;
  }
  .send-live-heading {
    display: grid;
    gap: 0.2rem;
  }
  .send-live-heading p {
    margin: 0;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .send-live-top h2 {
    margin: 0;
    font-size: var(--text-16);
    line-height: var(--leading-16);
    font-weight: 400;
  }
  .send-live-top h2 b {
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
  }
  .send-live-pace {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .send-live-pace b {
    color: var(--ink);
    font-size: var(--text-20);
    line-height: var(--leading-20);
    font-weight: var(--weight-medium);
  }
  .send-live .send-bar {
    height: 1.2rem;
    margin: 0;
    border-radius: 999px;
  }
  @media (prefers-reduced-motion: no-preference) {
    .send-live .send-bar span {
      transition: width var(--settle) var(--ease);
    }
  }
  .send-live-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.6rem;
  }
  .send-live-updated {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .send-live-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.4rem;
    padding: 0 0.8rem 0 0.3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    cursor: pointer;
  }
  .send-live-switch::before {
    content: "";
    width: 2.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: radial-gradient(circle at 1.8rem 50%, var(--surface) 0.5rem, var(--ink-2) 0.55rem);
  }
  .send-live-switch[aria-checked="false"]::before {
    background: radial-gradient(circle at 0.8rem 50%, var(--surface) 0.5rem, var(--line-strong) 0.55rem);
  }
  .send-paused {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2rem;
    padding: 1.4rem 1.8rem;
    border: 1px solid var(--warning-line);
    border-radius: var(--r-card);
    background: var(--warning-surface);
    color: var(--ink-2);
  }
  .send-paused > .icon {
    flex: none;
    width: 2rem;
    height: 2rem;
    color: var(--warning);
  }
  .send-paused-words {
    display: grid;
    flex: 1 1 32rem;
    gap: 0.2rem;
    margin: 0;
  }
  .send-paused-why {
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .send-live .sends-stats {
    margin: 0;
  }
  .send-live .sms-totals {
    margin: 0;
  }
  @media (prefers-reduced-motion: no-preference) {
    .send-live.is-live .send-bar .is-going {
      background-image: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.28) 50%, transparent 70%);
      background-size: 200% 100%;
      animation: send-moving 1.6s linear infinite;
    }
  }
  @keyframes send-moving {
    from {
      background-position: 100% 0;
    }
    to {
      background-position: -100% 0;
    }
  }
  .optouts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34rem;
    gap: 3.2rem;
    align-items: start;
    margin-top: 2.4rem;
  }
  .optouts.is-reading {
    grid-template-columns: minmax(0, 1fr);
  }
  .optouts-list {
    display: grid;
    gap: 1.2rem;
    min-width: 0;
  }
  .optouts-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.6rem;
    flex-wrap: wrap;
  }
  .optouts-top h2 {
    margin: 0;
    font-size: var(--text-20);
    line-height: var(--leading-20);
    font-weight: 400;
  }
  .optouts-top h2 small {
    display: block;
    margin-top: 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .optouts-find {
    display: flex;
    gap: 0.8rem;
  }
  .optouts-find .field {
    width: 24rem;
  }
  .optouts-remove {
    width: 1%;
    text-align: right;
  }
  .optouts-side {
    display: grid;
    gap: 1.6rem;
  }
  .api-key-ready {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line));
    border-radius: var(--r-card);
    background: var(--ok-soft);
  }
  .api-key-ready > .icon {
    flex: none;
    width: 2rem;
    height: 2rem;
    margin-top: 0.1rem;
    color: var(--ok);
  }
  .api-key-ready > div {
    display: grid;
    flex: 1;
    gap: 0.8rem;
    min-width: 0;
  }
  .api-key-ready p {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .api-key-ready b {
    color: var(--ink);
  }
  .api-key-ready-code {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.6rem 0.6rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    background: var(--surface);
  }
  .api-key-ready-code code {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: none;
    overflow-wrap: anywhere;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-key-ready-code .btn {
    flex: none;
    gap: 0.4rem;
  }
  .api-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34rem;
    gap: 3.2rem;
    align-items: start;
    margin-top: 2.4rem;
  }
  .api-main {
    display: grid;
    gap: 4rem;
    min-width: 0;
  }
  .api-section {
    display: grid;
    gap: 1.2rem;
    min-width: 0;
  }
  .api-section > h2 {
    margin: 0;
    font-size: var(--text-20);
    line-height: var(--leading-20);
    font-weight: 400;
  }
  .api-section .hint {
    margin: 0;
  }
  .api-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin: 0;
  }
  .api-figures div {
    padding: 1.2rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .api-figures dt {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-figures dd {
    margin: 0.2rem 0 0;
    font-size: var(--text-24);
    line-height: var(--leading-24);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-24);
    font-variant-numeric: tabular-nums;
  }
  .api-side {
    display: grid;
    gap: 1.6rem;
  }
  .api-card {
    display: grid;
    gap: 1rem;
    padding: 1.6rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
  }
  .api-card h2 {
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .api-card p {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .api-card .api-credit-left {
    color: var(--ink);
    font-size: var(--text-28);
    line-height: var(--leading-28);
    font-weight: var(--weight-regular);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
  .api-top-up {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .api-top-up form {
    margin: 0;
  }
  .api-top-up .btn {
    width: 100%;
  }
  .api-top-up-other {
    display: flex;
    gap: 0.6rem;
  }
  .api-top-up-other .field {
    flex: 1;
    min-width: 0;
  }
  .api-credit-alert {
    display: grid;
    gap: 0.6rem;
  }
  .api-senders {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .api-senders li {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
  }
  .api-senders b {
    font-weight: var(--weight-strong);
  }
  .api-senders span {
    color: var(--ink-3);
    text-align: right;
  }
  .api-section-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.6rem;
    flex-wrap: wrap;
  }
  .api-section-top h2 {
    margin: 0;
    font-size: var(--text-20);
    line-height: var(--leading-20);
    font-weight: 400;
  }
  .api-section-top .hint {
    max-width: 60ch;
    margin: 0.4rem 0 0;
  }
  .api-key-create {
    position: relative;
  }
  .api-key-create > summary {
    gap: 0.6rem;
    list-style: none;
  }
  .api-key-create > summary::-webkit-details-marker {
    display: none;
  }
  .api-key-create > summary .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .api-key-create[open] > summary {
    background: var(--surface-hover);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line-strong);
  }
  .api-key-new {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    z-index: 10;
    display: grid;
    gap: 0.6rem;
    width: 36rem;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-lift);
  }
  .api-key-new-row {
    display: flex;
    gap: 0.6rem;
  }
  .api-key-new-row .field {
    flex: 1;
    min-width: 0;
  }
  .api-key-new .hint {
    margin: 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-keys .api-key-title {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
  }
  .api-key-dot {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0.6rem;
    border-radius: 50%;
    background: var(--line-strong);
    vertical-align: middle;
  }
  .api-key-used.is-recent .api-key-dot {
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-soft);
  }
  .api-key-used.is-never .api-key-dot {
    background: none;
    box-shadow: inset 0 0 0 1.5px var(--line-strong);
  }
  .api-key-end {
    padding: 0.1rem 0.5rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-keys .api-key-name small {
    display: block;
    margin-top: 0.2rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-keys .api-key-used {
    color: var(--ink-2);
    white-space: nowrap;
  }
  .data-table.api-keys .is-actions {
    width: 4.4rem;
    text-align: right;
  }
  .api-code {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .api-code-top {
    display: flex;
    align-items: center;
    padding: 0 0.8rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
  }
  .api-code-tabs {
    display: flex;
    gap: 0.2rem;
  }
  .api-code-tab {
    padding: 1rem 1.2rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--ink-2);
    font: inherit;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-medium);
    cursor: pointer;
  }
  .api-code-tab[aria-selected="true"] {
    border-bottom-color: var(--primary);
    color: var(--ink);
  }
  .api-code-panel {
    position: relative;
  }
  .api-code-panel .code-snippet {
    margin: 0;
    padding: 1.6rem 2rem;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-code-copy {
    position: absolute;
    top: -3.8rem;
    right: 0.8rem;
    gap: 0.4rem;
  }
  .api-code-copy .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .api-usage {
    grid-column: 1 / -1;
  }
  .api-reference {
    display: grid;
    gap: 1rem;
    margin: 0;
  }
  .api-reference dt {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-reference dd {
    margin: 0.2rem 0 0;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    overflow-wrap: anywhere;
  }
  .api-reference code {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink);
  }
  .api-card-go {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-medium);
  }
  .api-card-go .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .api-credit-note {
    margin: 0;
    padding: 0 0.4rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .api-none {
    margin: 0;
  }
  .webhook-top {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .webhook-url {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: var(--mono);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .webhook-change > summary {
    list-style: none;
  }
  .webhook-change > summary::-webkit-details-marker {
    display: none;
  }
  .webhook-change[open] {
    display: grid;
    flex-basis: 100%;
    gap: 1rem;
  }
  .webhook-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font: inherit;
    font-size: var(--text-14);
    text-decoration: underline;
    cursor: pointer;
  }
  .webhook-inline {
    display: inline;
  }
  .webhook-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin: 1.2rem 0 0;
  }
  .webhook-facts dt {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .webhook-facts dd {
    margin: 0.2rem 0 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .event-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
  }
  .event-chip {
    padding: 0.1rem 0.8rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .webhook-deliveries td {
    white-space: nowrap;
  }
  .code-pill {
    display: inline-block;
    min-width: 4.4rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    text-align: center;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .code-pill.is-ok {
    background: var(--ok-soft);
    color: var(--ok-ink);
  }
  .code-pill.is-error {
    background: var(--error-soft);
    color: var(--error);
  }
  .webhook-retry {
    display: block;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .panel-head.is-sms {
    border-top-color: var(--menu);
  }
  .panel-head.is-whatsapp {
    border-top-color: var(--whatsapp-brand);
  }
  .message-panel {
    display: grid;
    gap: 2.4rem;
    padding-bottom: 2.8rem;
  }
  .message-state {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .message-text {
    padding: 1.2rem 1.6rem;
    border-radius: var(--r-card);
    background: var(--surface-2);
  }
  .message-text p {
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .message-text small {
    display: block;
    margin-top: 0.8rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .message-heading {
    margin: 0 0 1rem;
    color: var(--ink-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
  }
  .message-steps {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .message-steps li {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0 0 1.4rem 2.4rem;
  }
  .message-steps li::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: 0.2rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--ok);
  }
  .message-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.6rem;
    bottom: 0.2rem;
    left: 0.65rem;
    width: 1px;
    background: var(--line);
  }
  .message-steps li.is-failed::before {
    background: var(--error);
  }
  .message-steps b {
    font-weight: var(--weight-medium);
  }
  .message-steps small {
    display: block;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .message-steps time {
    flex: none;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .message-details {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 0.8rem 1.2rem;
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .message-details dt {
    color: var(--ink-3);
  }
  .message-details dd {
    margin: 0;
    overflow-wrap: anywhere;
  }

  .compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30rem;
    gap: 5.6rem;
    align-items: start;
    padding-bottom: 6rem;
  }
  .compose-main {
    display: grid;
    gap: 2rem;
    min-width: 0;
  }
  .compose-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.6rem;
    min-height: 4rem;
  }
  .compose-crumbs {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .compose-crumbs a {
    color: var(--ink-3);
    text-decoration: none;
  }
  .compose-crumbs a:hover {
    color: var(--ink);
  }
  .compose-name {
    flex: 1;
    min-width: 0;
  }
  .sends-crumbs {
    margin: 0 0 1.2rem;
  }
  .sender-asked {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 2rem 0 0;
    padding: 1.2rem 1.6rem;
    border: 1px dashed var(--control-line);
    border-radius: var(--r-card);
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sender-asked .icon {
    flex: none;
    width: 1.8rem;
    height: 1.8rem;
    color: var(--whatsapp-brand);
  }
  .sender-asked b {
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .sender-asked-body {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
  }
  .sender-asked-body p {
    margin: 0;
  }
  .sender-asked-state {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .sender-asked-state.is-ok {
    color: var(--ok-ink);
  }
  .sender-asked-state .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .sender-asked-row {
    display: flex;
    gap: 0.6rem;
  }
  .sender-asked-row .field {
    width: 14rem;
    letter-spacing: 0.2em;
  }
  .send-start {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem;
    max-width: 112rem;
    margin-top: 2.8rem;
  }
  .send-start.is-single {
    grid-template-columns: minmax(0, 56rem);
  }
  .send-start-card {
    --tint: var(--surface-2);
    --hue: var(--line-strong);
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: clip;
    border: 1px solid var(--line);
    border-radius: var(--r-section);
    background: var(--card);
    box-shadow: var(--shadow-card);
  }
  .send-start-card.is-whatsapp {
    --hue: var(--whatsapp-brand);
  }
  .send-start-card.is-sms {
    --hue: var(--menu);
  }
  .send-start-card.is-whatsapp,
  .send-start-card.is-sms {
    --tint: color-mix(in srgb, var(--hue) 13%, var(--surface));
  }
  .send-start-art {
    display: grid;
    place-items: center;
    height: 18rem;
    overflow: hidden;
    background: var(--tint);
  }
  .send-start-art .channel-mark {
    width: 9.6rem;
    height: 9.6rem;
    border-radius: 2.8rem;
    box-shadow:
      0 0 0 1.2rem color-mix(in srgb, var(--hue) 10%, transparent),
      0 0 0 2.6rem color-mix(in srgb, var(--hue) 6%, transparent),
      var(--shadow-card);
  }
  .send-start-art .channel-mark .icon {
    width: 5.2rem;
    height: 5.2rem;
  }
  .send-start-body {
    display: grid;
    align-content: start;
    gap: 1.6rem;
    padding: 2.4rem 2.8rem 2.8rem;
  }
  .send-start-channel {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin: 0;
    font-family: var(--display);
    font-size: var(--text-24);
    line-height: var(--leading-24);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-24);
  }
  .send-start-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .send-start-facts li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  .send-start-facts .icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    color: var(--hue);
  }
  .send-start-from {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.2rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
  }
  .send-start-label {
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .send-start-sender {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
  }
  .send-start-sender strong {
    overflow: hidden;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-medium);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .send-start-sender strong + span {
    overflow: hidden;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .send-start-sender .field {
    width: 100%;
    text-overflow: ellipsis;
  }
  .send-start-go {
    gap: 0.6rem;
  }
  .send-start-go .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  .send-start-api {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: 112rem;
    margin: 2.4rem 0 0;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .send-start-api .icon {
    width: 1.6rem;
    height: 1.6rem;
  }
  @media (max-width: 860px) {
    .webhook-facts {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.8rem;
    }
    .webhook-deliveries td {
      white-space: normal;
    }
    .send-start {
      grid-template-columns: minmax(0, 1fr);
    }
    .send-start-art {
      height: 16rem;
    }
  }
  .send-choice-group {
    display: grid;
    gap: 0.8rem;
  }
  .compose-name input {
    field-sizing: content;
    min-width: 12ch;
    max-width: 100%;
    padding: 0.2rem 0.6rem;
    margin-left: -0.6rem;
    border: 1px solid transparent;
    border-radius: var(--r-control);
    background: transparent;
    color: var(--ink);
    font: var(--weight-medium) var(--text-14)/var(--leading-14) var(--sans);
  }
  .compose-name input:hover {
    border-color: var(--line);
  }
  .compose-name input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--focus-rgb) / 0.18);
  }
  .compose-discard {
    min-height: 2.4rem;
    padding: 0.4rem 0.8rem;
    border: 0;
    border-radius: var(--r-control);
    background: none;
    color: var(--ink-3);
    font: inherit;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    cursor: pointer;
  }
  .compose-discard:hover {
    background: var(--danger-soft);
    color: var(--danger-text);
  }

  .sheet {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-window);
    background: var(--surface);
    box-shadow: var(--shadow-lift);
  }
  .sheet-problem {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin: 0;
    padding: 1.2rem 2.8rem;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-window) var(--radius-window) 0 0;
    background: var(--danger-soft);
    color: var(--danger-ink);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-problem .icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
  }
  .sheet-row {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
    margin: 0 2.8rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--line);
  }
  .sheet-label {
    padding-top: 0.3rem;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-value {
    display: grid;
    gap: 1rem;
    justify-items: start;
    min-width: 0;
  }
  .sheet-from {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
  }
  .sheet-from b {
    font-weight: var(--weight-strong);
  }
  .sheet-aside {
    margin: 0;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .sheet-change > summary {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    color: var(--link);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    cursor: pointer;
    list-style: none;
  }
  .sheet-change > summary::-webkit-details-marker {
    display: none;
  }
  .sheet-change[open] > summary {
    display: none;
  }
  .sheet-value:has(.sheet-change) {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: baseline;
    gap: 1.2rem;
  }

  .sheet-drop {
    width: 100%;
  }
  .sheet-drop label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    border: 1px dashed var(--control-line);
    border-radius: var(--r-card);
    color: var(--ink-2);
    cursor: pointer;
    transition:
      border-color var(--quick) var(--ease),
      background-color var(--quick) var(--ease);
  }
  .sheet-drop label:hover,
  .sheet-drop.is-over label {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, transparent);
  }
  .sheet-drop label:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(var(--focus-rgb) / 0.18);
  }
  .sheet-drop .icon {
    flex: none;
    width: 2rem;
    height: 2rem;
    color: var(--ink-3);
  }
  .sheet-drop u {
    color: var(--link);
    text-decoration: none;
  }
  .sheet-file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.2rem;
  }
  .file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    border-radius: var(--r-card);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .file-chip .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--primary);
  }
  .file-chip b {
    font-weight: var(--weight-strong);
  }
  .file-chip > span {
    color: var(--ink-2);
  }
  .file-chip-form {
    display: inline;
  }
  .file-chip-remove {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: var(--r-control);
    background: none;
    color: var(--ink-3);
    font-size: var(--text-16);
    line-height: 1;
    cursor: pointer;
  }
  .file-chip-remove:hover {
    background: var(--surface-hover);
    color: var(--ink);
  }
  .sheet-replace label {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    border-radius: var(--r-control);
    color: var(--link);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    cursor: pointer;
  }
  .sheet-replace label:has(:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }

  .sheet-columns {
    display: grid;
    gap: 0.6rem;
    width: 100%;
  }
  .sheet-templates {
    display: grid;
    gap: 0.6rem;
    width: 100%;
  }
  .sheet-template {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.2rem 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    cursor: pointer;
    transition: border-color var(--quick) var(--ease);
  }
  .sheet-template:hover {
    border-color: var(--control-line);
  }
  .sheet-template:has(:checked) {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
  }
  .sheet-template input {
    grid-row: 1 / span 2;
    margin: 0.3rem 0 0;
    accent-color: var(--primary);
  }
  .sheet-template-find {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
  }
  .sheet-template-find input {
    flex: 1 1 22rem;
    min-width: 0;
  }
  .sheet-template-find select {
    flex: 0 1 auto;
    width: auto;
  }
  .sheet-template-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    font-weight: var(--weight-strong);
  }
  .sheet-template-text {
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-use-template {
    display: none;
    position: sticky;
    bottom: 1.6rem;
    z-index: 1;
    justify-self: start;
    box-shadow: 0 6px 16px rgb(var(--focus-rgb) / 0.2);
  }
  .sheet-templates:has(.sheet-template input:checked:not([data-saved])) .sheet-use-template {
    display: inline-flex;
  }
  .sheet-templates:has(.sheet-template:only-of-type) .sheet-template input {
    display: none;
  }
  .sheet-blanks {
    padding-top: 0.4rem;
  }
  .sheet-blanks .sheet-line b {
    color: var(--ink);
    font-weight: var(--weight-medium);
  }
  .sheet-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
    margin: 0;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-line.is-missing > :first-child {
    color: var(--warning);
  }
  .sheet-needed {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--warning);
    font-size: var(--text-12);
    font-weight: var(--weight-strong);
    line-height: var(--leading-12);
  }
  .field.is-inline {
    width: auto;
    min-height: 3.2rem;
    padding: 0.3rem 2.8rem 0.3rem 0.8rem;
    background-position: right 0.8rem center;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-more > summary {
    width: fit-content;
    padding-block: 0.4rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    cursor: pointer;
  }
  .sheet-more > summary:hover {
    color: var(--ink);
  }
  .sheet-more[open] > summary {
    margin-bottom: 0.6rem;
  }
  .sheet-verdict {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.2rem;
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-verdict .is-ok {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ok-ink);
    font-weight: var(--weight-medium);
  }
  .sheet-verdict .is-ok .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--ok);
  }
  .sheet-verdict .is-warning,
  .sheet-verdict.is-warning {
    color: var(--warning);
  }
  .sheet-verdict.is-checking {
    gap: 0.8rem;
    color: var(--ink-2);
  }
  .sheet-note {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    margin: 0;
    color: var(--warning);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .sheet-note .icon,
  .sheet-quiet .icon {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    align-self: center;
  }
  .spinner {
    width: 1.4rem;
    height: 1.4rem;
    border: 2px solid var(--line);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .sheet-message {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: 1.2rem;
    align-content: start;
    flex: 1;
    padding: 2.4rem 2.8rem 1.6rem;
  }
  .sheet-message > :not(.sheet-label) {
    grid-column: 2;
  }
  .sheet-text:focus-within {
    outline: 2px solid var(--focus);
    outline-offset: 0.8rem;
    border-radius: var(--r-control);
  }
  .sheet-text textarea {
    display: block;
    width: 100%;
    min-height: 18rem;
    padding: 0;
    border: 0;
    resize: vertical;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: var(--text-16);
    line-height: var(--leading-16);
  }
  .sheet-text textarea:focus {
    outline: none;
  }
  .sheet-text textarea::placeholder {
    color: var(--placeholder);
  }
  .sheet-text .copy-backdrop {
    padding: 0;
    border: 0;
    font-size: var(--text-16);
    line-height: var(--leading-16);
    white-space: pre-wrap;
    overflow-wrap: break-word;
  }
  .sheet-text .copy-wrap.is-painted > textarea {
    color: transparent;
    caret-color: var(--ink);
  }
  .sheet-field {
    border-radius: 3px;
    background: var(--input-soft);
    color: var(--input-ink);
    box-shadow: 0 0 0 1px var(--input-soft);
  }
  .sheet-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
  }
  .sheet-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: 0;
  }
  .sheet-chip {
    padding: 0.4rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    color: var(--ink);
    font: inherit;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-medium);
    cursor: pointer;
    transition: background-color var(--quick) var(--ease);
  }
  .sheet-chip:nth-child(3n + 2) {
    background: var(--menu-soft);
  }
  .sheet-chip:nth-child(3n + 3) {
    background: var(--message-soft);
  }
  .sheet-chip:hover {
    background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  }
  .sheet-count {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-variant-numeric: tabular-nums;
  }
  .sheet-count.is-warning {
    color: var(--warning);
  }
  .ring {
    width: 1.8rem;
    height: 1.8rem;
    rotate: -90deg;
  }
  .ring circle {
    fill: none;
    stroke-width: 4;
  }
  .ring-track {
    stroke: var(--line);
  }
  .ring-fill {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dasharray var(--quick) var(--ease);
  }
  .sheet-count.is-warning .ring-fill {
    stroke: var(--warning);
  }
  .sheet-count:has([data-sms-preview-target="count"]:empty) {
    visibility: hidden;
  }

  .sheet-foot {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    padding: 1.6rem 2rem 1.6rem 2.8rem;
    border-top: 1px solid var(--line);
  }
  .sheet-when {
    display: flex;
    align-items: center;
    gap: 0.6rem 1.2rem;
    flex-wrap: wrap;
    flex: 1 1 24rem;
    min-width: 0;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-schedule {
    position: relative;
  }
  .sheet-schedule > summary {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    color: var(--link);
    cursor: pointer;
    list-style: none;
  }
  .sheet-schedule > summary::-webkit-details-marker {
    display: none;
  }
  .sheet-schedule-form {
    position: absolute;
    bottom: calc(100% + 1rem);
    left: 0;
    z-index: 6;
    display: grid;
    gap: 1.2rem;
    width: 32rem;
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-float);
    color: var(--ink);
  }
  .sheet-schedule-actions {
    display: flex;
    gap: 0.8rem;
  }
  .sheet-quiet {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--warning);
  }
  .sheet-need {
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-cost {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.8rem;
    color: var(--ink-3);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .sheet-cost .is-short {
    color: var(--warning);
    font-weight: var(--weight-strong);
  }
  .sheet-send-anyway {
    min-height: 4.4rem;
  }
  .sheet-send {
    gap: 0.8rem;
    min-height: 4.4rem;
    padding-inline: 2rem;
    box-shadow:
      0 1px 2px rgb(var(--focus-rgb) / 0.25),
      0 6px 16px rgb(var(--focus-rgb) / 0.2);
  }
  .sheet-send:disabled,
  .sheet-send[aria-disabled="true"] {
    box-shadow: none;
  }
  .sheet-send .icon {
    width: 1.6rem;
    height: 1.6rem;
  }

  .compose-preview {
    position: sticky;
    top: 9rem;
    display: grid;
    justify-items: center;
    gap: 1.4rem;
  }
  .compose-device {
    width: 30rem;
    max-width: 100%;
  }
  .compose-device .device-screen {
    height: auto;
    aspect-ratio: 9 / 19.5;
  }
  .compose-person {
    display: grid;
    justify-items: center;
    gap: 1rem;
    width: 100%;
  }
  .person-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .person-nav b {
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .person-step {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--card);
    box-shadow:
      var(--shadow-card),
      0 0 0 1px var(--line);
    color: var(--ink);
  }
  span.person-step {
    visibility: hidden;
  }
  .person-step .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .person-step .is-flipped {
    scale: -1 1;
  }
  .compose-person .tester {
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
  }
  .compose-person .tester > summary {
    color: var(--link);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    text-align: center;
    cursor: pointer;
    list-style: none;
  }
  .compose-person .tester > summary::-webkit-details-marker {
    display: none;
  }
  .compose-person .tester[open] > summary {
    margin-bottom: 0.8rem;
    color: var(--ink-2);
  }
  .tester-form {
    display: grid;
    gap: 0.6rem;
  }
  .compose-note {
    margin: 0;
    color: var(--ink-3);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    text-align: center;
  }

  @media (max-width: 1000px) {
    .optouts {
      grid-template-columns: minmax(0, 1fr);
    }
    .api-page {
      grid-template-columns: minmax(0, 1fr);
    }
    .draft,
    .sends-detail {
      grid-template-columns: minmax(0, 1fr);
    }
    .draft-preview {
      position: static;
    }
    .compose {
      grid-template-columns: minmax(0, 1fr);
      gap: 3.2rem;
    }
    .compose-preview {
      position: static;
    }
  }
  @media (max-width: 700px) {
    .sends-stats {
      grid-template-columns: minmax(0, 1fr);
    }
    .api-key-new {
      right: auto;
      left: 0;
      width: min(36rem, calc(100vw - 3.2rem));
    }
    .api-figures {
      grid-template-columns: minmax(0, 1fr);
    }
    .message-details {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.2rem;
    }
    .message-details dd {
      margin-bottom: 0.8rem;
    }
    .api-keys thead {
      display: none;
    }
    .api-keys,
    .api-keys tbody {
      display: block;
    }
    .api-keys tbody tr {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 0.4rem 1.2rem;
      align-items: center;
      padding: 1.2rem 1.4rem;
      border-bottom: 1px solid var(--line);
    }
    .data-table.api-keys td {
      display: block;
      height: auto;
      padding: 0;
      border: 0;
    }
    .api-keys .api-key-name {
      grid-column: 1;
    }
    .data-table.api-keys .is-actions {
      grid-column: 2;
      grid-row: 1 / span 2;
      width: auto;
    }
    .api-keys td.is-end {
      grid-column: 1;
      text-align: left;
      color: var(--ink-3);
      font-size: var(--text-12);
      line-height: var(--leading-12);
    }
    .api-keys td.is-end::after {
      content: " " attr(data-label);
    }
    .api-keys .api-key-used {
      grid-column: 1;
      color: var(--ink-3);
      font-size: var(--text-12);
      line-height: var(--leading-12);
    }
    .sheet-row {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.4rem;
      margin: 0 1.6rem;
    }
    .sheet-message {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.4rem;
      padding: 1.6rem;
    }
    .sheet-message > :not(.sheet-label) {
      grid-column: 1;
    }
    .sheet-foot {
      padding: 1.4rem 1.6rem;
    }
    .sheet-send,
    .sheet-send-anyway {
      width: 100%;
    }
    .sheet-cost {
      flex-basis: 100%;
    }
  }
}

@layer modules {
  .webhook-wants {
    margin: 1.2rem 0 0;
    padding-left: 1.8rem;
    display: grid;
    gap: 0.6rem;
  }
  .webhook-wants code {
    padding: 0 0.4rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }

  .callback {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
  .callback-url {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    overflow-wrap: anywhere;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    user-select: all;
  }
  .check-result {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border-radius: var(--r-card);
    border: 1px solid var(--ok-line);
    background: var(--ok-soft);
  }
  .check-result.is-failed {
    border-color: var(--error-line);
    background: var(--error-surface);
  }
  .check-title {
    margin: 0 0 0.6rem;
    font-weight: var(--weight-strong);
  }
  .check-result.is-ok .check-title {
    color: var(--ok-ink);
  }
  .check-result.is-failed .check-title {
    color: var(--error);
  }
  .connect-lede {
    margin: 0;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .runtime-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-bottom: 1px solid var(--line);
  }
  .runtime-tab {
    padding: 0.8rem 1.2rem;
    border-bottom: 2px solid transparent;
    color: var(--ink-2);
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
    text-decoration: none;
  }
  .runtime-tab:hover {
    color: var(--ink);
  }
  .runtime-tab.is-current {
    border-bottom-color: var(--primary);
    color: var(--ink);
  }
  .callback + .callback {
    margin-top: 0.6rem;
  }
  .connect .group > legend {
    display: flex;
    align-items: center;
  }
  .connect .group > .hint {
    margin-bottom: 0;
  }
  .connect .slow-calls {
    --accent: var(--attention);
    position: relative;
    overflow: clip;
    display: grid;
    gap: 0.8rem;
    margin-top: 1.8rem;
    padding: 1.4rem 1.6rem 1.4rem 1.8rem;
    border: 1px solid var(--warning-line);
    border-radius: var(--r-card);
    background: var(--warning-soft);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .connect .slow-calls::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--accent);
    pointer-events: none;
  }
  .slow-calls p {
    margin: 0;
  }
  .slow-calls-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .slow-calls-title .icon {
    width: 1.8rem;
    height: 1.8rem;
    color: var(--warning);
    flex: none;
  }
  .slow-calls-body {
    color: var(--ink-2);
    line-height: 1.5;
  }
  .slow-calls-list {
    list-style: none;
    margin: 0.2rem 0;
    padding: 0;
    border: 1px solid var(--warning-line);
    border-radius: var(--r-control);
    background: var(--card);
  }
  .slow-call {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.4rem 1.2rem;
    padding: 0.8rem 1rem;
  }
  .slow-call + .slow-call {
    border-top: 1px solid var(--line);
  }
  .slow-call-screen {
    font-weight: var(--weight-strong);
  }
  .slow-call-url {
    overflow: hidden;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .slow-call-wait {
    padding: 0.1rem 0.8rem;
    border-radius: 999px;
    background: var(--warning-soft);
    border: 1px solid var(--warning-line);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    white-space: nowrap;
  }
  .slow-call-fix {
    font-size: var(--text-12);
    line-height: var(--leading-12);
    white-space: nowrap;
  }
  @media (max-width: 879px) {
    .slow-call {
      grid-template-columns: minmax(0, 1fr) auto;
    }
  }
  .provider-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }
  .connect .providers > .provider-picker {
    margin-top: 1.6rem;
  }
  /* Logos keep their own colours, so a tile stays white in the dark theme too. */
  .provider-option {
    --tile-accent: var(--primary);
    position: relative;
    display: grid;
    place-items: center;
    height: 7.2rem;
    padding: 1.2rem 1.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-card);
    background: var(--surface);
    cursor: pointer;
    transition:
      border-color var(--quick) var(--ease),
      box-shadow var(--quick) var(--ease);
  }
  .provider-option:hover {
    border-color: var(--tile-accent);
  }
  .provider-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .provider-option:has(input:checked) {
    border-color: var(--tile-accent);
    box-shadow: inset 0 0 0 1px var(--tile-accent);
  }
  .provider-option:has(input:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }
  .provider-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: 3.2rem;
  }
  .provider-check {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: none;
    color: var(--tile-accent);
  }
  .provider-check .icon {
    display: block;
    width: 1.8rem;
    height: 1.8rem;
  }
  .provider-option:has(input:checked) .provider-check {
    display: block;
  }
  .provider {
    display: none;
  }
  .providers:has(input[value="at"]:checked) .provider.is-at,
  .providers:has(input[value="mtn"]:checked) .provider.is-mtn {
    display: block;
  }
  .connect .providers > .provider {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
  }
  .connect .guide-steps {
    gap: 1.8rem;
  }
  .connect-details {
    margin-top: 2.2rem;
  }
  .connect-details > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    color: var(--ink-2);
    cursor: pointer;
    list-style: none;
  }
  .connect-details > summary::-webkit-details-marker {
    display: none;
  }
  .connect-details > summary .icon {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform var(--quick) var(--ease);
  }
  .connect-details[open] > summary .icon {
    transform: rotate(90deg);
  }
  .exchange {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
    gap: 1rem;
    margin-top: 1.4rem;
  }
  .exchange .label {
    margin-bottom: 0.4rem;
  }
  .exchange .call-json {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .dial-call {
    display: grid;
    justify-items: center;
  }
  .dial-call .phone-banner {
    width: min(46rem, 100%);
  }

  .phone-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    margin: 0 0 1.2rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--error-line);
    border-radius: var(--r-card);
    background: var(--error-soft, var(--card));
    font-size: var(--text-14);
    line-height: var(--leading-14);
    color: var(--ink);
  }
  .phone-banner .icon {
    margin-top: 0.2rem;
    color: var(--error);
  }
}

@layer modules {
  .pane-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
  }
  .pane-summary {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    color: var(--ink-2);
  }
  .pane-empty {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.6rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-card);
  }
  .pane-empty > .icon {
    width: 2.4rem;
    height: 2.4rem;
    color: var(--ink-3);
    flex: none;
  }
  .pane-empty p {
    margin: 0 0 0.3rem;
  }
  .pane-empty-action {
    flex: none;
    align-self: center;
    margin-left: auto;
  }
  .scenario-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
  }
  .scenario {
    position: relative;
    padding: 1.1rem 1.4rem 1.2rem 1.8rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--card);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .scenario::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 4px;
    background: var(--line-strong);
  }
  .scenario.is-passing::before {
    background: var(--success);
  }
  .scenario.is-failing::before {
    background: var(--danger);
  }
  .scenario.is-playing {
    border-color: var(--live);
    box-shadow: 0 0 0 3px var(--live-glow);
  }
  .scenario.is-playing::before {
    background: var(--live);
  }
  .scenario.is-just-played {
    animation: scenario-settle 0.6s ease-out;
  }
  @keyframes scenario-settle {
    from {
      box-shadow: 0 0 0 5px var(--live-glow);
    }
    to {
      box-shadow: 0 0 0 0 rgba(232, 35, 124, 0);
    }
  }
  .scenario-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .scenario-name {
    flex: 1;
    min-width: 12rem;
    margin: 0;
    font-size: var(--text-14);
    line-height: var(--leading-14);
    font-weight: var(--weight-strong);
  }
  .scenario-result {
    padding: 0.1rem 0.8rem;
    border-radius: 999px;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    background: var(--surface-2);
    color: var(--ink-2);
    border: 1px solid var(--line);
  }
  .scenario-result.is-passing {
    background: var(--ok-soft);
    border-color: transparent;
    color: var(--ok-ink);
  }
  .scenario-result.is-failing {
    background: var(--error-soft);
    border-color: transparent;
    color: var(--error);
  }
  .scenario-actions {
    display: flex;
    gap: 0.6rem;
  }
  .scenario-play .icon {
    width: 1.2rem;
    height: 1.2rem;
  }
  .scenario-play .when-playing,
  .scenario.is-playing .scenario-play .when-idle {
    display: none;
  }
  .scenario.is-playing .scenario-play .when-playing {
    display: inline;
  }
  .scenario.is-playing .scenario-play svg.when-playing {
    display: inline-block;
  }
  .scenario-path {
    display: grid;
    margin: 0 0 0 0.6rem;
    padding: 0;
    list-style: none;
    border-left: 2px solid var(--line);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .scenario-path li {
    position: relative;
    padding: 0.3rem 0 0.3rem 1.8rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .scenario-path li::before {
    content: "";
    position: absolute;
    left: -0.6rem;
    top: 0.9rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    background: var(--card);
  }
  .scenario-path li.is-end::before {
    border-color: var(--success);
    background: var(--success);
  }
  .scenario-path li.is-missed {
    color: var(--error);
  }
  .scenario-path li.is-missed::before {
    border-color: var(--danger);
    background: var(--danger);
  }
  .scenario-path li.is-passed::before {
    border-color: var(--live);
    background: var(--live);
  }
  .scenario-path li.is-now {
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .scenario-path li.is-now::before {
    border-color: var(--live);
    background: var(--card);
    box-shadow: 0 0 0 3px var(--live-glow);
  }
  .scenario-said {
    color: var(--ink-3);
    font-weight: 400;
  }
  .scenario-watch {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-inner);
    background: var(--surface-2);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .scenario-watch-where {
    flex: 1 1 20rem;
    min-width: 0;
  }
  .is-watching .steps-tree .step-card:not(.is-watched),
  .is-watching .journey .node:not(.is-watched) {
    opacity: 0.4;
  }
  .is-watching .is-watch-now {
    border-color: var(--live);
    box-shadow: 0 0 0 3px var(--live-glow);
    opacity: 1;
  }
  .scenario-steps {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    row-gap: 1rem;
    margin: 1.1rem 0 0.2rem;
    padding: 0;
  }
  .scenario-step {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 0.35rem;
    min-width: 7.2rem;
    padding-right: 2.2rem;
  }
  .scenario-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(100% - 1.6rem);
    top: 1.2rem;
    width: 1rem;
    border-top: 1px solid var(--line-strong);
  }
  .scenario-key {
    display: inline-grid;
    place-items: center;
    min-width: 2.6rem;
    height: 2.4rem;
    padding: 0 0.7rem;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: var(--r-control);
    background: var(--surface);
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    font-weight: var(--weight-strong);
    transition:
      background-color var(--quick) var(--ease),
      border-color var(--quick) var(--ease);
  }
  .scenario-key.is-dial .icon {
    width: 1.3rem;
    height: 1.3rem;
  }
  .scenario-screen {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-3);
  }
  .scenario-step.is-missed .scenario-key {
    border-style: dashed;
    color: var(--ink-3);
  }
  .scenario-step.is-missed .scenario-screen {
    color: var(--error);
  }
  .scenario-step.is-done .scenario-key {
    background: var(--surface-2);
    color: var(--ink-2);
  }
  .scenario-step.is-current .scenario-key {
    border-color: var(--live);
    background: var(--live-soft);
    color: var(--ink);
  }
  .scenario-step.is-current .scenario-screen {
    color: var(--ink);
    font-weight: var(--weight-strong);
  }
  .scenario-expect {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    margin: 0.8rem 0 0;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .scenario-expect code {
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .scenario-problems {
    margin: 0.8rem 0 0;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    border-radius: var(--r-control);
    background: var(--error-soft);
    color: var(--error);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .scenario-problems li + li {
    margin-top: 0.2rem;
  }
  .panel-head.is-scenario {
    border-top-color: var(--live);
  }
  .pane-summary.is-failing {
    color: var(--error);
    font-weight: var(--weight-strong);
  }
  .scenario-key.is-masked {
    color: var(--ink-3);
  }
  .phone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
  }
  .phone-head .section-title {
    margin: 0;
  }
  .phone-language {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .phone-language .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--ink-3);
  }
  .phone-language .field {
    min-height: 3rem;
    padding-block: 0.2rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .phone-scenario {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.8rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--r-control);
    background: var(--live-soft);
    color: var(--ink);
    font-size: var(--text-12);
    line-height: var(--leading-12);
  }
  .phone-scenario .icon {
    width: 1.4rem;
    height: 1.4rem;
    color: var(--live);
    flex: none;
  }
  .phone-capture {
    display: flex;
    margin: 0.8rem auto 0;
  }
  .phone-capture .icon {
    width: 1.3rem;
    height: 1.3rem;
  }
  .phone-key.is-pressed {
    background: var(--phone-key-press);
    box-shadow: none;
  }
  .ussd-button.is-pressed {
    background: var(--phone-alert-press);
  }
  @media (prefers-reduced-motion: reduce) {
    .scenario.is-just-played {
      animation: none;
    }
  }
  .scenario-start {
    display: grid;
    gap: 0.8rem;
  }
  .scenario-start-row {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    font-size: var(--text-14);
    line-height: var(--leading-14);
  }
  .scenario-start-row span {
    font-family: var(--mono);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
    overflow-wrap: anywhere;
  }
  .scenario-waits {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding-left: 2.4rem;
  }
  .scenario-advanced > summary {
    cursor: pointer;
  }
}

@layer modules {
  /* Open Doodles by Pablo Stanley, CC0. */
  .spot {
    --spot: var(--router);
    display: block;
    width: 100%;
    height: auto;
    background: color-mix(in srgb, var(--spot) 7%, transparent);
  }
  .spot.is-menu {
    --spot: var(--menu);
  }
  .spot.is-input {
    --spot: var(--input);
  }
  .spot.is-router {
    --spot: var(--router);
  }
  .spot.is-end {
    --spot: var(--end);
  }
  .spot.is-message {
    --spot: var(--message);
  }
  .spot.is-form {
    --spot: var(--form);
  }
  .spot.is-wait {
    --spot: var(--wait);
  }
  .spot.is-agent {
    --spot: var(--workflow);
  }
  .spot-ink {
    fill: var(--ink);
  }
  .spot-accent {
    fill: var(--spot);
  }
  .spot-deep {
    fill: color-mix(in srgb, var(--spot) 78%, #000);
  }

  /* Scribbles: doodle pack by @bxcmuse. */
  .scribble {
    --spot: var(--router);
    display: block;
    width: 100%;
    height: auto;
  }
  .scribble.is-menu {
    --spot: var(--menu);
  }
  .scribble.is-input {
    --spot: var(--input);
  }
  .scribble.is-router {
    --spot: var(--router);
  }
  .scribble.is-end {
    --spot: var(--end);
  }
  .scribble.is-message {
    --spot: var(--message);
  }
  .scribble.is-form {
    --spot: var(--form);
  }
  .scribble.is-wait {
    --spot: var(--wait);
  }
  .scribble.is-agent {
    --spot: var(--workflow);
  }
  .scribble-ink {
    fill: var(--ink);
  }
  .scribble-paper {
    fill: var(--scribble-paper, var(--surface));
  }
  .scribble-accent {
    fill: var(--spot);
  }

  .empty-state {
    --scribble-paper: var(--surface);
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    padding: 2.4rem 1.6rem 2.8rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-card);
    background: var(--card);
    text-align: center;
  }
  .empty-state .scribble {
    width: auto;
    height: 9rem;
    margin-bottom: 0.8rem;
  }
  .empty-state p {
    max-width: 52ch;
    margin: 0;
  }
  .empty-state-action {
    margin-top: 1.2rem;
  }

  /* Where nothing is wrong, a small glyph says so in place of a drawing. */
  .empty-state--icon {
    gap: 1rem;
    padding: 2.8rem;
  }
  .empty-state-icon {
    width: 2.4rem;
    height: 2.4rem;
    color: var(--text-muted);
  }
  .empty-state-icon.is-success {
    color: var(--success);
  }
  .empty-state--icon .empty-state-title {
    color: var(--text);
    font-size: var(--text-15);
    font-weight: var(--weight-medium);
  }
  .empty-state--icon .hint {
    margin: 0;
    color: var(--text-muted);
  }

  .pictogram {
    display: block;
    width: 4.8rem;
    height: 4.8rem;
    flex: none;
  }

  .spot-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
    gap: 1.2rem;
    margin: 0 0 1.2rem;
    padding: 0;
    list-style: none;
  }
  .spot-sheet.is-small {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  }
  .spot-sheet li {
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .spot-sheet span {
    display: block;
    padding: 0.8rem 1rem;
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .pictogram-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .pictogram-sheet li {
    display: grid;
    gap: 0.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: var(--text-12);
    line-height: var(--leading-12);
    color: var(--ink-2);
  }
  .pictogram-sheet .pictogram {
    color: var(--ink);
  }
}

/* The public site and the guide keep the sizes they had before the app moved to the 14px scale. */
@layer components {
  .is-site body {
    font-size: 1.5rem;
    line-height: 1.5;
  }
  .is-site :is(.display, .flows-title, .page-title) {
    font-size: 3.4rem;
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.02em;
  }
  .is-site :is(.display, .flows-title, .page-title) + :is(.sub, .lede, .admin-sub) {
    font: var(--font-lead);
  }
  .is-site .lede {
    font-size: 1.8rem;
    line-height: 1.5;
  }
  .is-site .section-title {
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1.29;
  }
  .is-site :is(.label, .eyebrow) {
    line-height: 1.34;
  }
  .is-site .hint {
    font-size: 1.3rem;
    line-height: inherit;
  }
  .is-site .btn {
    min-height: 4rem;
    padding: 0.8rem 1.6rem;
    line-height: 1.28;
  }
  .is-site .btn--small {
    min-height: 3.2rem;
    padding: 0.4rem 1.1rem;
    font-size: 1.35rem;
    line-height: 1.28;
  }
  .is-site .field {
    min-height: 4rem;
    padding: 0.8rem 1.2rem;
  }
}

/* App classes the public site restyles everywhere, so they stay in the components layer. */
@layer components {
  .is-menu {
    --kind: var(--menu);
    --kind-soft: var(--menu-soft);
    --kind-ink: var(--menu-ink);
  }
  .is-input {
    --kind: var(--input);
    --kind-soft: var(--input-soft);
    --kind-ink: var(--input-ink);
  }
  .is-router {
    --kind: var(--router);
    --kind-soft: var(--router-soft);
    --kind-ink: var(--router-ink);
  }
  .is-end {
    --kind: var(--end);
    --kind-soft: var(--end-soft);
    --kind-ink: var(--ok-ink);
  }
}

@layer modules {
  :root {
    --mk-amber: #f5a000;
    --mk-ink-band: #1c2420;
    --mk-forest: #0e3b29;
    --mk-violet: #5b34e6;
    --mk-on-band: #f4f7f4;
    --mk-on-band-2: rgb(244 247 244 / 0.78);
    --mk-on-band-3: rgb(244 247 244 / 0.6);
    --mk-r: 1.2rem;
    --mk-r-card: 0.8rem;
    --mk-r-photo: 1.6rem;
    --mk-r-block: 2rem;
    --mk-lift: 0 30px 60px -30px rgb(var(--shade) / 0.45);
    --mk-raise: 0 1px 2px rgb(var(--shade) / 0.08), 0 16px 30px -12px rgb(var(--shade) / 0.4);
    --mk-lock: linear-gradient(160deg, #525252, #161616 70%);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --mk-amber: #e99b12;
      --mk-ink-band: #222b26;
      --mk-forest: #0c3021;
      --mk-violet: #4a2cc4;
    }
  }
  :root[data-theme="dark"] {
    --mk-amber: #e99b12;
    --mk-ink-band: #222b26;
    --mk-forest: #0c3021;
    --mk-violet: #4a2cc4;
  }
  .is-marketing {
    background: var(--app-bg);
  }
  :root[data-theme="light"] .is-marketing .mk-shot {
    --bg: var(--surface-sunken);
    --surface: #ffffff;
    --surface-2: var(--surface-sunken);
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme]) .is-marketing .mk-shot {
      --bg: var(--surface-sunken);
      --surface: #ffffff;
      --surface-2: var(--surface-sunken);
    }
  }
  html:has(body.is-marketing) {
    scroll-padding-top: 12rem;
  }
  .is-marketing main {
    overflow-x: clip;
  }
  .mk-skip {
    position: absolute;
    left: 1.6rem;
    top: -10rem;
    z-index: 60;
    padding: 0.8rem 1.2rem;
    border-radius: var(--r-control);
    background: var(--primary);
    color: var(--on-primary);
  }
  .mk-skip:focus {
    top: 1.2rem;
  }
  .mk-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 4rem;
    padding: 0 1.2rem;
    border-radius: var(--r-control);
    color: var(--ink-2);
    font-size: 1.4rem;
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
  }
  .mk-nav-link:hover {
    background: var(--surface-hover);
    color: var(--ink);
  }
  .mk-nav-link[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
  }
  .mk-nav-link .icon {
    width: 1.4rem;
    height: 1.4rem;
  }
  .mk-h1 {
    max-width: 20ch;
    margin: 0;
    font-family: var(--display);
    font-size: clamp(3.4rem, 4.2vw, 5.4rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
  }
  .mk-h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.35;
  }
  .mk-partner-title {
    margin: 0;
    color: var(--ink-2);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .mk-section-lede {
    max-width: 58ch;
    margin: 1.6rem 0 0;
    font-size: 1.8rem;
    line-height: 1.5;
    color: var(--ink-2);
  }
  .mk-note {
    margin: 2.4rem 0 0;
    max-width: 90ch;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--ink-3);
  }
  .is-marketing .btn {
    border-radius: 999px;
  }
  .is-marketing .btn--small {
    padding-inline: 1.4rem;
  }
  :is(.mk-shot, .ill, .callback) .btn {
    border-radius: var(--r-control);
  }
  .mk-btn-large {
    min-height: 5rem;
    padding: 0.8rem 2.8rem;
    font-size: 1.6rem;
  }
  .mk-points {
    display: grid;
    gap: 0.8rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
  }
  .mk-points li {
    position: relative;
    padding-left: 2.4rem;
    color: var(--ink-2);
    line-height: 1.5;
  }
  .mk-points li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.75em;
    width: 1.2rem;
    height: 1px;
    background: currentColor;
  }
  .is-message {
    --kind: var(--message);
    --kind-soft: var(--message-soft);
    --kind-ink: var(--ink);
  }
  .is-live {
    --kind: var(--live);
    --kind-soft: var(--live-soft);
    --kind-ink: var(--live-ink);
  }

  .mk-section {
    max-width: 124rem;
    margin: 0 auto;
    padding: 9.6rem 2.4rem;
  }
  /* Spreads to the viewport edges without a wrapper. */
  .is-marketing .ussd-buttons .ussd-button {
    display: grid;
    place-items: center;
  }

  /* --p, when a scene sets it, is scroll progress. */
  .ill {
    position: relative;
    --t: clamp(0, calc((var(--p, 1) - 0.06) * 1.8), 1);
    font-size: 1.35rem;
  }
  .mk-callback-title {
    margin: 0;
    color: var(--ink-3);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
  }

  .ill-build {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.2rem 3.6rem;
    align-items: start;
    padding: 0 2.4rem 0 0;
  }
  .ill-wires {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }
  .ill-wire {
    --w: clamp(0, calc((var(--p, 1) - 0.38) * 2.6), 1);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--w));
  }
  .ill-wire.is-menu {
    stroke: var(--menu);
  }
  .ill-wire.is-input {
    stroke: var(--input);
  }
  .ill-wire.is-router {
    stroke: var(--router);
  }
  .ill-wire.is-muted {
    stroke-dasharray: 1;
    opacity: 0.45;
  }
  .ill-build .node.ill-node {
    position: relative;
    grid-column: var(--col);
    grid-row: var(--row);
    width: auto;
    min-width: 0;
    max-width: none;
    box-shadow: var(--shadow-float);
    opacity: calc(0.1 + 0.9 * var(--t));
    transform: translate(calc(var(--dx) * (1 - var(--t))), calc(var(--dy) * (1 - var(--t)))) rotate(calc(var(--r) * (1 - var(--t))));
  }
  .ill-build .node.is-router {
    align-self: center;
    background: var(--surface);
  }
  .ill-build .node[data-wire="enter_pin"] {
    margin-top: 5.6rem;
  }
  .ill-scenarios {
    display: grid;
    gap: 0.6rem;
    margin: 1.8rem 0 2rem;
    padding: 1.2rem;
    border-radius: var(--mk-r-card);
    background: var(--surface-2);
  }
  .ill-scenario {
    --on: clamp(0, calc((var(--p, 1) - 0.5 - var(--i) * 0.08) * 8), 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    font-size: 1.35rem;
  }
  .ill-scenario .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--ink-3);
  }
  .ill-scenario code {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--ink-3);
  }
  .mk-crumb {
    margin: 0 0 2.4rem;
    font-size: 1.4rem;
    color: var(--ink-2);
  }
  .mk-crumb a {
    color: var(--primary);
    text-decoration: none;
  }
  .mk-crumb a:hover {
    text-decoration: underline;
  }
  .mk-shot {
    display: grid;
    gap: 1.6rem;
    max-width: 64rem;
    padding: 2.4rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--mk-r-card);
    background: var(--surface);
    box-shadow: var(--mk-lift);
    zoom: 0.8;
  }
  .mk-shot > *,
  .mk-shot .send-bar {
    margin: 0;
  }
  .mk-shot .display {
    margin: 0;
    font-size: 3.6rem;
  }
  .mk-shot .sends-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mk-shot .sends-stats.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mk-shot.is-panel {
    gap: 0;
    padding: 0;
  }
  .mk-shot.is-panel .panel-body {
    padding-bottom: 2.4rem;
  }
  .mk-callback {
    display: grid;
    gap: 1.2rem;
    width: 100%;
    max-width: 48rem;
    padding: 2.4rem;
    border-radius: var(--mk-r-card);
    background: var(--surface);
    box-shadow: var(--mk-lift);
  }
  .mk-callback-row {
    display: grid;
    gap: 0.6rem;
    padding: 1.2rem 1.4rem;
    border-radius: var(--r-control);
    background: var(--surface);
  }
  .mk-callback-row span {
    font-size: 1.2rem;
    color: var(--ink-3);
  }
  .mk-callback-row code {
    padding: 0;
    border: 0;
    background: none;
    overflow-wrap: anywhere;
    font-size: 1.3rem;
  }
  .mk-callback-row.is-old code {
    color: var(--ink-3);
    text-decoration: line-through;
    text-decoration-color: var(--line-strong);
  }
  .mk-callback-row.is-new {
    background: var(--kind-soft, var(--surface));
    box-shadow: inset 3px 0 0 var(--kind, var(--router));
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .mk-callback-arrow {
    justify-self: center;
    color: var(--ink-3);
  }
  .mk-callback-arrow .icon.is-down {
    width: 1.8rem;
    height: 1.8rem;
    rotate: 180deg;
  }
  .mk-callback-note {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.4rem 0 0;
    font-size: 1.3rem;
    color: var(--ink-2);
  }
  .mk-callback-note .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--ok);
  }
  .mk-shadow {
    max-width: 56rem;
  }
  .mk-shadow .shadow-agreement {
    color: var(--ok-ink);
  }

  .mk-join {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 5.6rem;
    align-items: start;
  }
  .mk-join.is-page {
    padding-top: 6.4rem;
  }
  .mk-join-copy {
    position: sticky;
    top: 10.4rem;
  }
  .mk-join-copy .hint {
    margin-top: 2.4rem;
  }
  .mk-spot-panel {
    border-radius: var(--mk-r);
    background: var(--kind-soft);
    overflow: hidden;
  }
  .mk-spot-panel .spot {
    background: none;
  }
  .mk-join-copy .mk-spot-panel {
    max-width: 36rem;
    margin-bottom: 3.2rem;
  }
  .mk-partner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 2.4rem;
    margin-top: 3.2rem;
  }
  .mk-partner .mk-points {
    margin-top: 1.2rem;
  }
  .mk-form {
    display: grid;
    gap: 2.2rem;
    padding: 3.2rem;
    border-radius: var(--mk-r);
    background: var(--surface);
    color: var(--ink);
  }
  .mk-form .label {
    display: block;
    margin-bottom: 0.5rem;
  }
  .mk-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem 1.6rem;
  }
  .mk-form-wide {
    grid-column: 1 / -1;
  }
  .mk-needs {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .mk-more {
    padding: 1.2rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
  }
  .mk-more[open] {
    padding-bottom: 2rem;
  }
  .mk-more > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
    font-weight: 600;
    cursor: pointer;
  }
  .mk-more > summary .hint {
    font-weight: 400;
  }
  .mk-more > :not(summary) {
    margin-top: 1.6rem;
  }
  .mk-wait {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 1.6rem;
    margin-top: 4rem;
  }
  .mk-wait-card {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 1rem;
    padding: 2.4rem;
    border-radius: var(--mk-r-card);
    background: var(--surface);
  }
  .mk-wait-card p {
    margin: 0;
    color: var(--ink-2);
    line-height: 1.55;
  }
  .mk-needs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.6rem;
  }
  .mk-check {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    cursor: pointer;
  }
  .mk-check:has(input:checked) {
    border-color: var(--ink-3);
    background: var(--surface-2);
  }
  .mk-check input {
    flex: none;
    width: 1.7rem;
    height: 1.7rem;
    margin: 0.25rem 0 0;
    accent-color: var(--primary);
  }
  .mk-check strong {
    display: block;
    font-weight: 600;
  }
  .mk-check .hint {
    display: block;
    margin: 0.1rem 0 0;
  }
  .mk-consent {
    border: 0;
    padding: 0;
    color: var(--ink-2);
  }
  .mk-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.6rem;
  }
  .mk-form-actions .hint {
    margin: 0;
  }
  .mk-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .mk-status {
    max-width: 76rem;
    padding-top: 7.2rem;
  }
  .mk-status-mark .mark {
    width: 5.6rem;
    height: 5.6rem;
  }
  .mk-status .mk-h1 {
    margin-top: 2rem;
  }
  .mk-status-back {
    margin: 4rem 0 0;
  }
  .mk-status-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26rem;
    gap: 3.2rem;
    align-items: end;
  }
  .mk-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 4rem 0 0;
    padding: 0;
    list-style: none;
  }
  .mk-timeline-step {
    display: grid;
    gap: 0.4rem;
    padding: 1.6rem 0 0;
    border-top: 2px solid var(--line);
    color: var(--ink-3);
  }
  .mk-timeline-step strong {
    color: var(--ink-2);
    font-weight: 600;
  }
  .mk-timeline-step.is-reached {
    border-top-color: var(--primary);
  }
  .mk-timeline-step.is-current strong {
    color: var(--ink);
  }
  .mk-share {
    margin-top: 4.8rem;
    padding: 2.4rem;
    border-radius: var(--mk-r-card);
    background: var(--surface);
  }
  .mk-share > p {
    margin: 0.8rem 0 1.6rem;
    color: var(--ink-2);
  }
  .mk-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem 2.4rem;
    margin: 4rem 0 2rem;
  }
  .mk-summary dt {
    font-size: 1.3rem;
    color: var(--ink-3);
  }
  .mk-summary dd {
    margin: 0.2rem 0 0;
    font-weight: 600;
  }

  .mk-prose {
    max-width: 76rem;
    padding-top: 7.2rem;
  }
  .mk-prose .mk-h3 {
    margin-top: 4rem;
  }
  .mk-prose p {
    max-width: 66ch;
    line-height: 1.65;
    color: var(--ink-2);
  }

  .shadow-score {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.8rem 1.2rem;
    margin: 0 0 1rem;
  }
  .shadow-agreement {
    font-size: 2rem;
    font-weight: 650;
    color: var(--warning);
  }
  .shadow-agreement.is-ok {
    color: var(--ok-ink);
  }
  .shadow-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
  }
  .shadow-step {
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .shadow-step.is-differing {
    border-left: 3px solid var(--warning);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .shadow-step-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    font-size: 1.3rem;
  }
  .shadow-step-head .hint {
    margin: 0;
  }
  .shadow-mark .icon {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--ok);
  }
  .shadow-step.is-differing .shadow-mark .icon {
    color: var(--warning);
  }
  .shadow-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 1rem;
    margin-top: 0.8rem;
  }
  .shadow-pair .label {
    margin-bottom: 0.3rem;
  }
  .shadow-reply {
    margin: 0.6rem 0 0;
    padding: 0.8rem 1rem;
    border-radius: var(--r-control);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: 1.25rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .shadow-reply.is-ours {
    background: var(--warning-soft);
  }
  .shadow-writes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
  }
  .shadow-write {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.4rem 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    background: var(--surface);
    font-size: 1.3rem;
  }
  .shadow-write.is-allowed {
    border-color: var(--ok-line);
    background: var(--ok-soft);
  }
  .shadow-write-mark .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--warning);
  }
  .shadow-write.is-allowed .shadow-write-mark .icon {
    color: var(--ok-ink);
  }
  .shadow-write-call {
    overflow-wrap: anywhere;
    font-size: 1.2rem;
  }
  .shadow-write-state {
    color: var(--ink-3);
    white-space: nowrap;
  }
  @media (max-width: 52rem) {
    .shadow-write {
      grid-template-columns: auto minmax(0, 1fr);
    }
  }
  @media (max-width: 879px) {
    .mk-section {
      padding: 6.4rem 1.6rem;
    }
    .mk-join {
      grid-template-columns: minmax(0, 1fr);
    }
    .mk-shot {
      padding: 1.6rem;
    }
    .mk-shot .sends-stat {
      padding: 1rem 1.2rem;
    }
    .mk-form-grid,
    .mk-needs-grid,
    .mk-timeline,
    .mk-summary {
      grid-template-columns: minmax(0, 1fr);
    }
    .mk-join-copy {
      position: static;
    }
    .mk-status-head {
      grid-template-columns: minmax(0, 1fr);
    }
    .mk-status-head .mk-spot-panel {
      max-width: 28rem;
      grid-row: 1;
    }
    .mk-join-copy .mk-spot-panel {
      max-width: 24rem;
      margin-bottom: 2.4rem;
    }
    .mk-form {
      padding: 2.4rem 1.6rem;
    }
    .ill-build {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1.2rem;
      padding: 0;
    }
    .ill-build .node.ill-node {
      grid-column: auto;
      grid-row: auto;
      margin: 0 !important;
    }
    .ill-build .node[data-wire="auth_failed"],
    .ill-wires {
      display: none;
    }
  }

  /* Editorial type, at the site's scale: Inter at 500, small steps, a grey lede; hairlines carry the structure. */
  .is-editorial {
    --ed-display: clamp(3rem, 3vw, 3.6rem);
    --ed-title: clamp(2.4rem, 2.4vw, 2.8rem);
    --ed-figure: clamp(3rem, 3vw, 3.6rem);
    --ed-sub: 2rem;
    --ed-lede: 1.7rem;
    --ed-body: 1.55rem;
    --ed-label: 1.4rem;
    --ed-track: -0.02em;
    --ed-gap: 9.6rem;
    --ed-paper: var(--app-bg);
    --ed-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M18 6l-1.43 1.39L24.15 15H4v2h20.15l-7.58 7.57L18 26l10-10z'/%3E%3C/svg%3E");
  }
  .is-editorial :is(.mk-h3) {
    font-weight: 500;
    text-wrap: balance;
  }
  .is-editorial .mk-h3 {
    font-size: var(--ed-sub);
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .is-editorial :is(.mk-section-lede) {
    max-width: 40ch;
    color: var(--ink-2);
    font-size: var(--ed-lede);
    line-height: 1.5;
    letter-spacing: -0.01em;
  }
  .is-editorial .mk-note {
    font-size: 1.3rem;
  }

  .is-editorial .mk-section {
    padding-block: var(--ed-gap);
  }

  .is-editorial .mk-points {
    gap: 0;
    border-top: 1px solid var(--line);
  }
  .is-editorial .mk-points li {
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--ed-body);
  }
  .is-editorial .mk-points li::before {
    content: none;
  }
  .is-editorial .mk-form-actions .btn {
    justify-self: stretch;
    justify-content: space-between;
    gap: 2.4rem;
    min-height: 4.4rem;
    padding: 0 2rem;
    border-radius: 999px;
  }
  .is-editorial :is(.mk-form-actions) .btn::after {
    content: "";
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    background: currentColor;
    mask: var(--ed-arrow) center / contain no-repeat;
  }

  @media (max-width: 879px) {
    .is-editorial {
      --ed-gap: 9.6rem;
      --ed-lede: 1.8rem;
      --ed-body: 1.6rem;
    }
  }

  /* Every page under the marketing layout. */
  .is-editorial .btn {
    border-radius: 999px;
  }
  .is-editorial .btn--ghost {
    border-color: currentColor;
    background: transparent;
  }
  .is-editorial .mk-h1 {
    max-width: 16ch;
    font-size: var(--ed-display);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: var(--ed-track);
    text-wrap: balance;
  }
  .is-editorial :is(.mk-crumb) {
    font-size: var(--ed-label);
  }
  .is-editorial :is(.mk-join, .mk-prose) .btn:not(.btn--ghost) {
    gap: 4rem;
  }
  .is-editorial :is(.mk-prose p, .mk-join-copy p:not(.mk-section-lede)) {
    color: var(--ink-2);
    font-size: var(--ed-body);
    line-height: 1.6;
  }
  .is-editorial .mk-prose .mk-h3,
  .is-editorial .mk-prose h2 {
    margin-top: 5.6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-size: var(--ed-sub);
    font-weight: 500;
    letter-spacing: -0.02em;
  }

  .is-editorial .mk-join.is-page {
    padding-top: 8rem;
  }
  .is-editorial .mk-join .mk-h1 {
    font-size: var(--ed-display);
  }
  .is-editorial .mk-prose {
    padding-top: 8rem;
  }
  .is-editorial .mk-prose .mk-h1 {
    max-width: 18ch;
  }

  .is-editorial .doc-wrap > .display,
  .is-editorial .doc-title {
    max-width: 18ch;
    font-size: var(--ed-display);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: var(--ed-track);
    text-wrap: balance;
  }
  .is-editorial .doc-title {
    font-size: var(--ed-display);
    line-height: 1.15;
    letter-spacing: var(--ed-track);
  }
  .is-editorial .doc-wrap > .sub,
  .is-editorial .doc-section > .sub {
    max-width: 52ch;
    color: var(--ink-2);
    font-size: var(--ed-lede);
    line-height: 1.5;
  }
  .is-editorial .doc-section {
    margin-top: 9.6rem;
    padding-top: 2.4rem;
    border-top: 1px solid var(--line-strong);
  }
  .is-editorial .doc-section-title {
    margin: 0 0 2rem;
    font-size: var(--ed-title);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: var(--ed-track);
  }
  .is-editorial .doc-section > .sub {
    margin: 0 0 3.2rem;
  }
  .is-editorial .doc-chapter {
    margin-top: 4rem;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }
  .is-editorial .doc-index {
    gap: 0 2.4rem;
  }
  .is-editorial .doc-index .doc-card {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
    padding: 1.6rem 0 2rem;
  }
  .is-editorial .doc-index .doc-card strong {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }
  .is-editorial .doc-index .doc-card span:not(.doc-card-step, .doc-logo) {
    color: var(--ink-2);
    font-size: var(--ed-body);
    line-height: 1.55;
  }
  .is-editorial .doc-card-step {
    font-family: var(--sans);
  }
  .is-editorial .doc-lead {
    font-size: var(--ed-body);
  }
  .is-editorial .doc-body :is(h2, h3) {
    font-weight: 500;
    letter-spacing: -0.02em;
  }
  .is-editorial .doc-body h2 {
    font-size: 2.8rem;
    line-height: 1.15;
  }
  .is-editorial .doc-body h3 {
    font-size: 2rem;
  }

  @media (max-width: 879px) {
    .is-editorial .mk-join.is-page,
    .is-editorial .mk-prose {
      padding-top: 4.8rem;
    }
    .is-editorial .doc-section {
      margin-top: 6.4rem;
    }
  }
}

@layer components {
  .doc-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 1.2rem;
    margin: 2.4rem 0 0;
    padding: 0;
    list-style: none;
  }
  .doc-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1.2rem;
    height: 100%;
    padding: 1.8rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--ink-2);
    text-decoration: none;
  }
  .doc-card:hover {
    border-color: var(--line-strong);
  }
  .doc-card-step {
    grid-row: span 2;
    font-family: var(--mono);
    font-size: 1.3rem;
    color: var(--ink-3);
  }
  .doc-card strong {
    color: var(--ink);
    font: var(--font-card);
    letter-spacing: var(--tracking-16);
  }
  .doc-card span:last-child {
    grid-column: 2;
    font-size: 1.4rem;
  }
  .doc-logo {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 4rem;
    height: 4rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--r-control);
    background: var(--mark-tile);
  }
  .doc-logo svg {
    width: 100%;
    height: 100%;
  }
  .doc-logo.is-monogram {
    color: var(--ink-2);
    font-size: 1.3rem;
    font-weight: 600;
  }
  .doc-card:has(.doc-logo) {
    grid-template-rows: 4rem auto;
    align-items: center;
  }
  .doc-card:has(.doc-logo) > span:last-child {
    align-self: start;
  }
  .doc-title:has(.doc-logo) {
    display: flex;
    align-items: center;
    gap: 0.3em;
  }
  .doc-title .doc-logo {
    width: 1em;
    height: 1em;
    padding: 0.16em;
  }
  .doc-title .doc-logo.is-monogram {
    width: 3.33em;
    height: 3.33em;
    padding: 0;
    font-size: 0.3em;
  }

  .doc-layout {
    display: grid;
    grid-template-columns: 24rem minmax(0, 76rem);
    gap: 4.8rem;
    margin-top: 2.4rem;
  }
  .doc-nav {
    position: sticky;
    top: 2.4rem;
    align-self: start;
    font-size: 1.4rem;
  }
  .doc-nav ol {
    margin: 1.2rem 0 0;
    padding: 0;
    list-style: none;
  }
  .doc-nav-home {
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
  }
  .doc-nav-link {
    display: block;
    padding: 0.6rem 1.2rem;
    border-left: 2px solid var(--line);
    color: var(--ink-2);
    text-decoration: none;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .doc-nav-link:hover {
    color: var(--ink);
  }
  .doc-nav-link[aria-current="page"] {
    border-left-color: var(--focus);
    color: var(--ink);
    font-weight: 600;
  }

  .doc-title {
    margin: 0 0 0.8rem;
    font-size: 3.6rem;
    font-weight: var(--weight-regular);
    line-height: 1.15;
    letter-spacing: -0.025em;
  }
  .doc-body {
    font-size: 1.6rem;
    line-height: 1.65;
    color: var(--ink);
  }
  .doc-body > * + * {
    margin-top: 1.6rem;
  }
  .doc-body h2 {
    margin-top: 4rem;
    font-size: 2.2rem;
    font-weight: var(--weight-regular);
    line-height: 1.25;
    letter-spacing: -0.02em;
  }
  .doc-body h3 {
    margin-top: 2.8rem;
    font-size: 1.7rem;
    font-weight: var(--weight-strong);
  }
  .doc-body :is(h2, h3) .anchor {
    margin-left: 0.6rem;
    color: var(--ink-3);
    text-decoration: none;
    opacity: 0;
  }
  .doc-body :is(h2, h3) .anchor::after {
    content: "#";
  }
  .doc-body :is(h2, h3):hover .anchor,
  .doc-body .anchor:focus-visible {
    opacity: 1;
  }
  .doc-body :is(ul, ol) {
    padding-left: 2.4rem;
  }
  .doc-body li + li {
    margin-top: 0.6rem;
  }
  .doc-body a {
    color: var(--focus);
  }
  .doc-body pre {
    overflow-x: auto;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--code-bg);
    color: var(--code-ink);
    font-size: 1.35rem;
    line-height: 1.55;
  }
  .doc-body pre code {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
  }
  .doc-body blockquote {
    margin-left: 0;
    padding: 1.2rem 1.6rem;
    border-left: 3px solid var(--focus);
    background: var(--surface);
    color: var(--ink-2);
    border-start-start-radius: 0;
    border-end-start-radius: 0;
  }
  .doc-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.45rem;
  }
  .doc-body :is(th, td) {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
  }
  .doc-body th {
    font-weight: 600;
    color: var(--ink-2);
  }

  .doc-illustration {
    margin: 3.2rem 0;
    padding: 2.8rem 2rem 2.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--canvas, var(--surface-2));
    overflow-x: auto;
  }
  .doc-illustration figcaption {
    margin-top: 2rem;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--ink-3);
    text-align: center;
  }
  .doc-journey {
    min-width: 66rem;
    gap: 2rem 2.8rem;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1.4;
    --dx: 0px;
    --dy: 0px;
    --r: 0deg;
  }
  .doc-journey .is-col-1 {
    --col: 1;
  }
  .doc-journey .is-col-2 {
    --col: 2;
  }
  .doc-journey .is-col-3 {
    --col: 3;
  }
  .doc-journey .is-col-4 {
    --col: 4;
  }
  .doc-journey .is-row-1 {
    --row: 1;
  }
  .doc-journey .is-row-2 {
    --row: 2;
  }
  .doc-journey .node[data-wire="enter_pin"] {
    margin-top: 0;
  }
  .doc-journey {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  }
  .doc-journey :is(ul, ol) {
    padding-left: 0;
  }
  .doc-journey li + li {
    margin-top: 0;
  }
  .doc-journey .port .port-label {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  .doc-illustration p {
    margin: 0;
  }
  .doc-phone {
    display: grid;
    grid-template-columns: 24rem minmax(0, 1fr);
    gap: 3.6rem;
    align-items: center;
  }
  .doc-phone-device {
    zoom: 0.8;
  }
  .doc-phone-device .device-screen {
    height: 58rem;
  }
  .doc-phone-entry {
    display: block;
    text-align: left;
  }
  .doc-phone .ussd-button {
    text-align: center;
  }
  .doc-notes {
    display: grid;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: note;
    font-size: 1.45rem;
    line-height: 1.5;
    color: var(--ink-2);
  }
  .doc-notes li {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 1rem;
    counter-increment: note;
  }
  .doc-notes li::before {
    content: counter(note);
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 1.2rem;
    font-weight: 650;
    color: var(--ink);
  }
  .doc-notes li + li {
    margin-top: 0;
  }
  .doc-notes strong {
    display: block;
    color: var(--ink);
  }
  .doc-steps .deploy-focus {
    text-align: left;
  }
  .doc-steps li + li {
    margin-top: 0;
  }
  .doc-names {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    font-size: 1.4rem;
  }
  .doc-names-side {
    display: grid;
    gap: 0.8rem;
  }
  .doc-names-field {
    min-height: 7rem;
    font-family: var(--mono);
    line-height: 1.5;
  }
  .doc-names .list-available {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
  .doc-names-arrow {
    align-self: center;
    color: var(--ink-3);
  }
  .doc-names-arrow .icon {
    width: 2.4rem;
    height: 2.4rem;
  }
  .doc-answers {
    display: grid;
    gap: 1.2rem;
    font-size: 1.4rem;
  }
  .doc-answers :is(ul, ol) {
    margin: 0;
    padding-left: 0;
  }
  .doc-answers .call-json {
    max-width: 32rem;
  }
  @media (max-width: 860px) {
    .doc-phone,
    .doc-names {
      grid-template-columns: minmax(0, 1fr);
    }
    .doc-names-arrow {
      justify-self: center;
      transform: rotate(90deg);
    }
  }

  /* Rouge's token classes. */
  .highlight :is(.na, .nt, .nl, .py) {
    color: var(--tok-key);
  }
  .highlight :is(.s, .s1, .s2, .sb, .sh) {
    color: var(--tok-str);
  }
  .highlight :is(.m, .mi, .mf, .kc, .no) {
    color: var(--tok-num);
  }
  .highlight :is(.p, .pi, .o) {
    color: var(--tok-punct);
  }
  .highlight :is(.c, .c1, .cm) {
    color: var(--ink-3);
    font-style: italic;
  }
  .highlight :is(.k, .kd, .nb) {
    color: var(--tok-expr);
  }

  .doc-turn {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 5.6rem;
    padding-top: 2.4rem;
    border-top: 1px solid var(--line);
  }
  .doc-turn-link {
    display: grid;
    gap: 0.2rem;
    color: var(--ink);
    text-decoration: none;
  }
  .doc-turn-link span {
    font-size: 1.3rem;
    color: var(--ink-3);
  }
  .doc-turn-link.is-next {
    margin-left: auto;
    text-align: right;
  }
  .doc-turn-link:hover strong {
    text-decoration: underline;
  }

  .ill-trip {
    display: grid;
    gap: 1.6rem;
    justify-items: center;
  }
  .trip-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .trip-stop {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.6rem;
    width: 11rem;
    padding: 1.2rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    text-align: center;
  }
  .trip-stop.is-flow {
    border-color: var(--focus);
  }
  .trip-icon {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: var(--surface-2);
  }
  .trip-name {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.3;
  }
  .trip-hop {
    align-self: center;
    width: 2.4rem;
    height: 1px;
    background: var(--line-strong);
  }
  .trip-budget {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--ink-3);
    font-size: 1.35rem;
  }

  .ill-dropped {
    display: grid;
    gap: 2rem;
  }
  .dropped-line {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .dropped-moment {
    padding-top: 1.2rem;
    border-top: 2px solid var(--line);
  }
  .dropped-moment.is-slow {
    border-top-color: var(--warn, var(--line-strong));
  }
  .dropped-moment.is-gone {
    border-top-color: var(--error, var(--ink));
  }
  .dropped-mark {
    display: block;
    width: 0.8rem;
    height: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 50%;
    background: var(--line-strong);
  }
  .dropped-moment.is-gone .dropped-mark {
    background: var(--error, var(--ink));
  }
  .dropped-when {
    margin: 0;
    font-family: var(--mono);
    font-size: 1.25rem;
    color: var(--ink-3);
  }
  .dropped-what {
    margin: 0.4rem 0 0;
    font-size: 1.35rem;
    line-height: 1.45;
  }
  .dropped-after {
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .dropped-redial {
    margin: 0 0 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
  }
  .dropped-keys {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 1.2rem;
    margin: 0;
  }
  .dropped-keys dt {
    color: var(--ink-3);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .dropped-keys dd {
    margin: 0.3rem 0 0;
    font-size: 1.35rem;
  }
  .dropped-keys .is-was {
    text-decoration: line-through;
    color: var(--ink-3);
  }

  .ill-retries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
    gap: 1.6rem;
  }
  .retry-case {
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .retry-kind {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
  }
  .retry-what {
    margin: 0.4rem 0 1.2rem;
    color: var(--ink-2);
    font-size: 1.35rem;
  }
  .retry-arrives {
    margin: 0 0 1.2rem;
    font-size: 1.3rem;
  }
  .retry-answer {
    display: flex;
    gap: 0.6rem;
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.45;
  }
  .retry-tick {
    color: var(--focus);
    flex: none;
  }

  .ill-scene {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
  }
  .ill-scene.is-tall {
    align-items: start;
  }
  .ill-scene-spot .spot {
    width: 18rem;
    border-radius: var(--r-card);
  }
  .ill-scene-body {
    min-width: 0;
  }
  .ill-scene .ill-line .node,
  .ill-scene .ill-done .node {
    width: 20rem;
  }
  .ill-scene .ill-line {
    gap: 1.2rem;
  }
  @media (max-width: 640px) {
    .ill-scene {
      grid-template-columns: 1fr;
    }
    .ill-scene-spot {
      justify-self: center;
    }
  }

  .ill-findings {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .finding {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: start;
    padding: 1.2rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .finding-old {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.45;
  }
  .finding-old code {
    font-size: 1.2rem;
  }
  .finding-why {
    margin: 0.3rem 0 0;
    font-size: 1.25rem;
    color: var(--ink-3);
  }
  .finding-call {
    align-self: center;
    padding: 0.4rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .finding-call.is-keep {
    background: var(--ok-soft);
    border-color: var(--ok);
    color: var(--ok-ink);
  }
  .finding-call.is-fix {
    background: var(--router-soft);
    border-color: var(--router);
    color: var(--ussd-ink);
  }
  .finding-call.is-decide {
    background: var(--warning-soft);
    border-color: var(--warning);
    color: var(--warning);
  }

  .ill-scenarios {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    overflow: hidden;
  }
  .ill-scenario-head {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.35rem;
    font-weight: 600;
  }
  .ill-scenario-head .hint {
    font-weight: 400;
  }
  .ill-scenario-list {
    margin: 0;
    padding: 0.6rem 0;
    list-style: none;
  }
  .ill-scenario {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.4rem 1rem;
    align-items: baseline;
    padding: 0.7rem 1.6rem;
    font-family: var(--mono);
    font-size: 1.3rem;
  }
  .ill-scenario .icon {
    width: 1.5rem;
    height: 1.5rem;
    align-self: center;
    color: var(--ok);
  }
  .ill-scenario.is-failing {
    color: var(--error);
    font-weight: 600;
  }
  .ill-scenario.is-failing .icon {
    color: var(--error);
  }
  .ill-scenario-note {
    grid-column: 2;
    margin: 0;
    font-family: var(--sans);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink-2);
  }
  .ill-scenario-foot {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 1.2rem 1.6rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
  }
  .ill-scenario-publish {
    padding: 0.9rem 1.6rem;
    border-radius: var(--r-control);
    background: var(--surface-selected);
    color: var(--ink-3);
    font-size: 1.35rem;
    font-weight: 600;
  }
  .ill-scenario-foot .hint {
    margin: 0;
  }

  .ill-morning {
    display: grid;
    gap: 1.2rem;
  }
  .morning-switch {
    margin: 0;
    font-family: var(--mono);
    font-size: 1.15rem;
    color: var(--ink);
  }
  .morning-bars {
    display: block;
    width: 100%;
    height: 12rem;
    border-bottom: 1px solid var(--line-strong);
    overflow: visible;
  }
  .morning-bars rect {
    fill: var(--router);
  }
  .morning-bars rect.is-before {
    fill: var(--line-strong);
  }
  .morning-cut {
    stroke: var(--ink);
    stroke-width: 2px;
    stroke-dasharray: 4 3;
    vector-effect: non-scaling-stroke;
  }
  .morning-axis {
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-family: var(--mono);
    font-size: 1.2rem;
    color: var(--ink-3);
  }
  .morning-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin: 0;
    font-size: 1.3rem;
    color: var(--ink-2);
  }
  .morning-legend i {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
    border-radius: 2px;
    vertical-align: -0.1rem;
    background: var(--router);
  }
  .morning-legend i.is-before {
    background: var(--line-strong);
  }

  .ill-line {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 1.6rem;
    align-items: center;
  }
  .ill-line .node {
    position: static;
    width: 23.2rem;
    contain: none;
  }
  .ill-line .node + .node {
    margin-top: 1rem;
  }
  .ill-line-arrow {
    color: var(--ink-3);
  }
  .ill-line-arrow .icon {
    width: 2rem;
    height: 2rem;
  }
  .ill-line-menus {
    display: grid;
    gap: 1rem;
  }
  .ill-line .node.is-dim {
    opacity: 0.55;
  }

  .ill-done {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
  }
  .ill-done .node {
    position: static;
    width: 23.2rem;
    contain: none;
  }
  .done-marks {
    display: flex;
    gap: 0.6rem;
    margin: 0.6rem 0 0;
  }
  .done-marks span {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 1.15rem;
  }
  .done-marks .is-label {
    background: var(--surface-2);
    border: 1px solid var(--line);
  }
  .done-marks .is-done {
    background: var(--ok-soft);
    border: 1px solid var(--ok);
    color: var(--ok-ink);
  }
  .done-tally {
    display: grid;
    gap: 1rem;
    margin: 0;
  }
  .done-tally div {
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
  }
  .done-tally dt {
    font-family: var(--mono);
    font-size: 1.2rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .done-tally dd {
    margin: 0.4rem 0 0;
    font-size: 1.35rem;
    line-height: 1.45;
  }
  .done-tally .is-before dd {
    color: var(--ink-3);
    text-decoration: line-through;
  }
  @media (max-width: 720px) {
    .ill-line,
    .ill-done {
      grid-template-columns: 1fr;
    }
    .ill-line-arrow {
      transform: rotate(90deg);
      justify-self: start;
    }
  }

  .writing-list {
    max-width: 76rem;
    margin: 3.2rem 0 0;
    padding: 0;
    list-style: none;
  }
  .writing-list li + li {
    margin-top: 3.2rem;
    padding-top: 3.2rem;
    border-top: 1px solid var(--line);
  }
  .writing-when {
    margin: 0;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 1.3rem;
  }
  .writing-title {
    margin: 0.4rem 0 0.6rem;
    font-size: 2.2rem;
    font-weight: var(--weight-regular);
    line-height: 1.25;
    letter-spacing: -0.02em;
  }
  .writing-title a {
    color: var(--ink);
    text-decoration: none;
  }
  .writing-title a:hover {
    text-decoration: underline;
  }
  .writing-end {
    margin-top: 4.8rem;
    padding-top: 2.4rem;
    border-top: 1px solid var(--line);
  }

  /* The public site has no .wrap to hold the guide, so it takes the marketing container. */
  .is-marketing .doc-wrap {
    max-width: 124rem;
    margin: 0 auto;
    padding: 4rem 2.4rem 8rem;
  }

  @media (max-width: 860px) {
    .doc-layout {
      grid-template-columns: minmax(0, 1fr);
      gap: 2.4rem;
    }
    .doc-nav {
      position: static;
    }
  }
}

/* The public pages' header and footer, shared by the site and the pages still drawn with the app's sheets. */
/* IBM Plex, app and site alike: Sans from Light for the site's display lines, Mono for codes. */
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-latin-ebc0bad2.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-latin-ext-06c1feaf.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0300-0303, U+0305-0307, U+0309-0328, U+032A-036F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-regular-9d5eaa4d.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-medium-655b69f8.woff2") format("woff2");
}

:root.is-public {
  --app-bg: light-dark(#ffffff, #131315);
  --bg: light-dark(#ffffff, #131315);
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}
:root.is-locked {
  overflow: hidden;
}
/* A jump to a section glides, in the browser's own hands, so the wheel still stops it. */
:root.is-public {
  scroll-behavior: smooth;
}
:root {
  --frame-top-height: 52px;
}
.frame-top,
.frame-foot {
  --frame-ground: var(--app-bg);
  --frame-ink: light-dark(#18181c, #f2f1ee);
  --frame-on-ink: light-dark(#ffffff, #161616);
  --frame-action: light-dark(#4b4ef0, #5a5df3);
  --frame-action-hover: light-dark(#3a3dd6, #4b4ef0);
  --frame-on-action: #ffffff;
  --frame-grey: light-dark(#52525c, #8f8e99);
  --frame-line: light-dark(#e4e4e7, #2c2c32);
  --frame-ease: cubic-bezier(0.19, 1, 0.22, 1);
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  color: var(--frame-ink);
  font-family:
    "IBM Plex Sans",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.frame-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  max-width: 1300px;
  margin: 0 auto;
}

/* The bar: sticky on every page, as the app's shell: the word, the sections beside it, the action at the end. */
.frame-top {
  position: sticky;
  top: 0;
  z-index: 60;
  box-sizing: border-box;
  height: var(--frame-top-height);
  padding-block: 8px;
  border-bottom: 1px solid var(--frame-line);
  background: var(--frame-ground);
}
.frame-top .frame-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
}
.frame-word,
.frame-nav,
.frame-actions {
  transition:
    opacity 0.45s var(--frame-ease) 0.12s,
    transform 0.45s var(--frame-ease) 0.12s,
    visibility 0s;
}
.frame-word {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.frame-word .mark {
  width: 20px;
  height: 20px;
}
.frame-nav {
  display: flex;
  justify-self: start;
  gap: 24px;
  color: var(--frame-grey);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.frame-nav a {
  color: inherit;
  text-decoration: none;
}
.frame-nav a:hover,
.frame-nav a[aria-current="page"] {
  color: var(--frame-ink);
}
.frame-end {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}
.frame-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.frame-login {
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.frame-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--frame-action);
  color: var(--frame-on-action);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.frame-cta:hover {
  background: var(--frame-action-hover);
}

/* Two strokes that turn into a cross. */
.frame-menu {
  position: relative;
  display: none;
  width: 36px;
  height: 36px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.frame-menu i {
  position: absolute;
  left: 9px;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.3s var(--frame-ease);
}
.frame-menu i:first-child {
  top: 14px;
}
.frame-menu i:last-child {
  top: 20.5px;
}
.frame-top.is-open .frame-menu i:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.frame-top.is-open .frame-menu i:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}
.frame-menu:focus-visible,
.frame-switch:focus-visible {
  outline: 2px solid var(--frame-ink);
  outline-offset: 2px;
}

/* The light/dark switch: a thumb carrying the sun slides over and turns into the moon. */
.frame-switch {
  position: relative;
  width: 36px;
  height: 22px;
  padding: 1px;
  border: 1px solid color-mix(in srgb, var(--frame-ink) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--frame-on-ink) 55%, transparent);
  color: color-mix(in srgb, var(--frame-ink) 60%, transparent);
  cursor: pointer;
}
/* The thumb stays small; the target around it is 44 by 44. */
.frame-switch::before {
  content: "";
  position: absolute;
  inset: -12px -5px;
}
.frame-switch span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--frame-on-ink);
  box-shadow: 0 0.5px 2px rgb(0 0 0 / 0.14);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.frame-switch .icon {
  width: 12px;
  height: 12px;
}
.frame-switch .is-moon,
.frame-switch[aria-checked="true"] .is-sun {
  display: none;
}
.frame-switch[aria-checked="true"] .is-moon {
  display: block;
}
.frame-switch[aria-checked="true"] span {
  transform: translateX(14px);
}

/* The menu: the whole page, its links large and right-aligned under the button, arriving one after another. */
.frame-sheet {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 72px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px));
  background: var(--frame-ground);
  color: var(--frame-ink);
}
.frame-sheet[hidden] {
  display: none;
}
.frame-sheet ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 52px 0 0;
  list-style: none;
}
.frame-sheet a {
  display: block;
  color: inherit;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition:
    opacity 0.4s var(--frame-ease) calc(var(--i, 0) * 40ms),
    transform 0.4s var(--frame-ease) calc(var(--i, 0) * 40ms);
}
.frame-sheet a:hover {
  color: var(--frame-grey);
}
.frame-sheet a:focus-visible {
  outline: 2px solid var(--frame-ink);
  outline-offset: 4px;
  border-radius: 4px;
}
.frame-sheet .is-apart {
  margin-top: 16px;
}
@starting-style {
  .frame-sheet a {
    opacity: 0;
    transform: translateY(8px);
  }
}
.frame-top.is-open {
  background: transparent;
  backdrop-filter: none;
}
.frame-top.is-open .frame-word,
.frame-top.is-open .frame-nav,
.frame-top.is-open .frame-actions {
  opacity: 0;
  visibility: hidden;
}

@media (min-width: 981px) {
  .frame-top.is-open .frame-menu {
    display: block;
  }
}
@media (max-width: 980px) {
  .frame-nav,
  .frame-login {
    display: none;
  }
  .frame-top .frame-bar {
    grid-template-columns: 1fr auto;
  }
  .frame-menu {
    display: block;
  }
  .frame-sheet ul {
    padding-right: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root.is-public {
    scroll-behavior: auto;
  }
  .frame-word,
  .frame-nav,
  .frame-actions,
  .frame-sheet a {
    transform: none !important;
    transition: opacity 0.2s !important;
  }
}

/* The footer: the page's last block on the app's sunken ground, the name set edge to edge and running off the bottom. */
.frame-foot {
  --frame-ground: var(--surface-sunken);
  container-type: inline-size;
  overflow: hidden;
  padding-block: 88px 0;
  background: var(--frame-ground);
  color: var(--frame-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.frame-foot-in {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 1300px;
  margin: 0 auto;
}
.frame-foot p {
  margin: 0;
}
.frame-foot a {
  color: inherit;
  text-decoration: none;
}
.frame-foot a:hover {
  color: var(--frame-action);
}
.frame-foot-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.frame-foot-about {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 22em;
}
.frame-foot-about p {
  color: var(--frame-grey);
  font-size: 15px;
  line-height: 1.5;
}
.frame-foot-word-small {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}
.frame-foot-word-small .air-mark,
.frame-foot-word-small svg {
  width: 26px;
  height: 26px;
}
.frame-foot-where {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.frame-foot-where > span:first-child {
  color: var(--frame-grey);
  font-size: 13px;
}
.frame-foot-editions {
  display: inline-flex;
  align-self: start;
  padding: 4px;
  border-radius: 999px;
  background: var(--frame-line);
}
.frame-foot-editions form {
  display: contents;
}
.frame-foot-editions button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--frame-ink);
  font: 500 13px/1.3 var(--sans);
  cursor: pointer;
}
.frame-foot-editions button[aria-current="true"] {
  background: var(--frame-action);
  color: var(--frame-on-action);
}
.frame-foot-list {
  display: grid;
  gap: 12px;
  align-content: start;
}
.frame-foot-list b {
  color: var(--frame-grey);
  font-size: 13px;
  font-weight: 500;
}
.frame-foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--frame-line);
  color: var(--frame-grey);
  font-size: 13px;
}
/* The name spans the footer's width exactly: "luftflow" in Plex Semibold at this tracking is 3.33em wide. */
.frame-foot-word {
  margin: 64px 0 -0.26em !important;
  color: var(--action-soft);
  font-size: calc(100cqw / 3.33);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.74;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}
@media (max-width: 980px) {
  .frame-foot-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .frame-foot-about {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .frame-foot-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The edition switch: a pill naming where the visitor is, opening a short list of names, never flags. */
.frame-region {
  position: relative;
}
.frame-region summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--frame-line);
  border-radius: 999px;
  color: var(--frame-ink);
  font: 500 14px/1 var(--sans);
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.frame-region summary::-webkit-details-marker {
  display: none;
}
.frame-region summary .icon {
  width: 14px;
  height: 14px;
}
.frame-region-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  display: grid;
  gap: 2px;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(24 24 28 / 14%);
}
.frame-region-menu form {
  display: contents;
}
.frame-region-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: 500 14px/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
}
.frame-region-menu button:hover {
  background: var(--surface-sunken);
}
.frame-region-menu button[aria-current="true"] {
  background: var(--surface-sunken);
  color: var(--action);
}
/* The mark turning in a breeze, on the home page and over the sign-in pages. */
.air-mark {
  width: 72px;
  height: 72px;
  overflow: visible;
}
.air-mark g g {
  transform-origin: 16px 16px;
  transform-box: view-box;
}
.trail-near {
  transform: rotate(-16deg);
  opacity: 0.26;
}
.trail-far {
  transform: rotate(-32deg);
  opacity: 0.12;
}
.arms {
  animation: turn 7s ease-in-out infinite;
}
.trail-near {
  animation: trail-near 7s ease-in-out infinite;
}
.trail-far {
  animation: trail-far 7s ease-in-out infinite;
}
@keyframes turn {
  50% {
    transform: rotate(10deg);
  }
}
@keyframes trail-near {
  50% {
    transform: rotate(-4deg);
  }
}
@keyframes trail-far {
  50% {
    transform: rotate(-18deg);
  }
}

@layer utilities {
  [hidden] {
    display: none !important;
  }
}
