/* Signal OSX design system: the frame and the components, written once.
   Every colour, type size, weight, line height, corner on a control, box or card, and motion speed is read
   from the variables in signal-osx.css. Written here as plain numbers, on purpose, because each belongs to
   one part only: the logo's own proportions and its fixed white and indigo, the sizes of single parts
   (the 344px tool panel, the 480px pop-up, the 280px drawer, the 640px and 400px columns), small gaps
   inside a part, and the deeper shadows of the pop-up, the drawer and the suggestion box.
   A product copies neither file's values by hand.
   Rules behind each class: ../specs/frame.md and ../specs/components.md */

.sx, .sx * { box-sizing: border-box; }
.sx { font-family: var(--sx-font); font-size: var(--sx-size-ui); font-weight: var(--sx-weight-regular);
  line-height: var(--sx-leading); letter-spacing: var(--sx-tracking); color: var(--sx-text); background: var(--sx-bg); }
.sx a { color: var(--sx-text); }
.sx :focus-visible { outline: 2px solid var(--sx-focus); outline-offset: 2px; }
/* Family, size and line height are inherited; weight is left to each part's own class, so a button stays medium. */
.sx button, .sx input { font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; }
.sx button { font-weight: inherit; }
.sx button.sx-button, .sx button.sx-switch { font-weight: var(--sx-weight-medium); }
.sx button { cursor: pointer; }

/* ---------- The frame ---------- */
.sx-app { display: flex; flex-direction: column; min-height: 100%; }
.sx-header { flex: none; min-height: var(--sx-header-height); display: flex; align-items: center; gap: var(--sx-space-1);
  background: var(--sx-surface); border-bottom: 1px solid var(--sx-line); padding-right: var(--sx-space-4); }
.sx-header__brand { flex: none; width: var(--sx-sidebar-width); padding-left: var(--sx-space-4); display: flex; align-items: center; }
.sx-header__rule { flex: none; width: 1px; height: 24px; background: var(--sx-line-box); margin-right: var(--sx-space-2); }
.sx-header__end { margin-left: auto; display: flex; align-items: center; gap: var(--sx-space-2); }
[data-theme="dark"] .sx-header__brand { width: auto; padding-right: var(--sx-space-4); }

/* The lockup: built in em, so one font-size sets the whole thing. */
.sx-lockup { font-size: var(--sx-logo-size); font-weight: 700; line-height: 1; white-space: nowrap; color: var(--sx-text); letter-spacing: 0; }
.sx-lockup__tile { display: inline-block; position: relative; width: 1.25em; height: 1.25em; border-radius: 0.275em; background: #FFFFFF;
  vertical-align: -0.26123em; margin-right: 0.27656em; box-shadow: inset 0 0 0 0.034em #12143A; }
[data-theme="dark"] .sx-lockup__tile { box-shadow: none; }
.sx-lockup__tile svg { position: absolute; left: 50%; top: 50%; width: 0.775em; height: 0.67293em; margin-left: -0.3875em; margin-top: -0.33647em; display: block; }
.sx-lockup__word { letter-spacing: -0.035em; }
.sx-lockup__word svg { height: 0.72754em; width: 0.75977em; }
.sx-lockup .sx-ink { fill: var(--sx-text); }
.sx-lockup__tile .sx-ink { fill: #12143A; }

/* A switcher in the header: area, then module, then (in a tool) the piece. */
.sx-switch { display: inline-flex; align-items: center; gap: var(--sx-space-2); min-height: var(--sx-control-height); padding: 0 var(--sx-space-3);
  border: 0; border-radius: var(--sx-radius-control); background: transparent; font-weight: var(--sx-weight-medium); white-space: nowrap;
  transition: background var(--sx-motion-fast) var(--sx-ease); }
.sx-switch:hover, .sx-switch[aria-expanded="true"] { background: var(--sx-selected); }
.sx-switch svg { color: var(--sx-muted); flex: none; }
.sx-slash { color: var(--sx-muted); font-weight: var(--sx-weight-light); margin: 0 2px; }
.sx-tag { padding: 1px 8px; border-radius: var(--sx-radius-pill); background: var(--sx-surface); color: var(--sx-text-2); font-size: var(--sx-size-label); font-weight: var(--sx-weight-regular); }

.sx-body { flex: 1; min-height: 0; display: flex; }
.sx-sidebar { flex: none; width: var(--sx-sidebar-width); display: flex; flex-direction: column; gap: 2px;
  padding: var(--sx-space-4) var(--sx-space-3) var(--sx-space-3); background: var(--sx-surface); border-right: 1px solid var(--sx-line); }
.sx-nav { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--sx-radius-control);
  text-decoration: none; color: var(--sx-text-2) !important; transition: background var(--sx-motion-fast) var(--sx-ease); }
.sx-nav svg { color: var(--sx-muted); flex: none; }
.sx-nav:hover { background: var(--sx-selected); }
.sx-nav[aria-current="page"] { background: var(--sx-selected); color: var(--sx-text) !important; font-weight: var(--sx-weight-medium); }
.sx-nav[aria-current="page"] svg { color: var(--sx-accent); }
.sx-nav__count { margin-left: auto; font-size: var(--sx-size-label); font-weight: var(--sx-weight-regular); color: var(--sx-text-2); }
.sx-nav-label { margin: 22px 10px 6px; font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); letter-spacing: var(--sx-tracking-caps);
  text-transform: uppercase; color: var(--sx-muted); }
.sx-account { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px var(--sx-space-3); text-align: left;
  border: 1px solid var(--sx-line-box); border-radius: var(--sx-radius-box); background: var(--sx-surface); box-shadow: var(--sx-shadow-box); }
.sx-account__text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
:lang(th) .sx-account__text { line-height: var(--sx-leading-tight); }
.sx-account__name { font-weight: var(--sx-weight-medium); }
.sx-account__role { font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-account > svg { margin-left: auto; flex: none; color: var(--sx-muted); }
.sx-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sx-selected); color: var(--sx-text);
  font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); display: flex; align-items: center; justify-content: center; }

.sx-main { flex: 1; min-width: 0; padding: var(--sx-space-8) var(--sx-space-10); display: flex; flex-direction: column; gap: var(--sx-space-6);
  background: radial-gradient(900px 360px at 78% -80px, var(--sx-fade), transparent 70%); }

/* ---------- Type ---------- */
.sx-display { margin: 0; font-size: var(--sx-size-display); font-weight: var(--sx-weight-light); line-height: 1.15; letter-spacing: -0.02em; }
.sx-page-title { margin: 0; font-size: var(--sx-size-page); font-weight: var(--sx-weight-regular); line-height: var(--sx-leading-tight); letter-spacing: -0.015em; }
.sx-title { margin: 0; font-size: var(--sx-size-title); font-weight: var(--sx-weight-medium); }
.sx-lede { margin: 0; font-size: var(--sx-size-body); color: var(--sx-text-2); }
.sx-caption { font-size: var(--sx-size-label); color: var(--sx-muted); }
:lang(th) .sx-display, :lang(th) .sx-page-title { letter-spacing: 0; line-height: var(--sx-leading-tight); }

/* ---------- Buttons and filters: one height, grow with the words ---------- */
.sx-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--sx-space-2); min-height: var(--sx-control-height);
  padding: 0 14px; border-radius: var(--sx-radius-control); border: 1px solid var(--sx-line-control); background: var(--sx-surface);
  font-weight: var(--sx-weight-medium); white-space: nowrap; transition: background var(--sx-motion-fast) var(--sx-ease); }
.sx-button:hover { background: var(--sx-selected); }
.sx-button--primary { border-color: var(--sx-primary-bg); background: var(--sx-primary-bg); color: var(--sx-primary-text) !important; }
.sx-button--primary:hover { background: var(--sx-primary-bg); opacity: 0.9; }
.sx-button--quiet { border-color: transparent; background: transparent; color: var(--sx-text-2) !important; }
.sx-button[disabled] { opacity: 0.5; cursor: not-allowed; }
.sx-icon-button { width: var(--sx-control-height); height: var(--sx-control-height); display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--sx-radius-control); background: transparent; color: var(--sx-text-2) !important; }
.sx-icon-button:hover { background: var(--sx-selected); }
.sx-chip { display: inline-flex; align-items: center; min-height: var(--sx-chip-height); padding: 0 var(--sx-space-3); border-radius: var(--sx-radius-pill);
  border: 1px solid var(--sx-line-control); background: var(--sx-surface); color: var(--sx-text-2) !important; white-space: nowrap; }
.sx-chip[aria-pressed="true"] { border-color: var(--sx-primary-bg); background: var(--sx-primary-bg); color: var(--sx-primary-text) !important; font-weight: var(--sx-weight-medium); }

/* ---------- Fields ---------- */
.sx-field { display: flex; flex-direction: column; gap: 6px; }
.sx-field__label { font-weight: var(--sx-weight-medium); }
.sx-input { display: flex; align-items: center; gap: var(--sx-space-2); min-height: var(--sx-control-height); padding: 0 var(--sx-space-3);
  border: 1px solid var(--sx-line-field); border-radius: var(--sx-radius-control); background: var(--sx-surface); }
[data-theme="dark"] .sx-input { background: transparent; }
.sx-input svg { color: var(--sx-muted); flex: none; }
.sx-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.sx-input input::placeholder { color: var(--sx-muted); opacity: 1; }
.sx-input:focus-within { outline: 2px solid var(--sx-focus); outline-offset: 2px; }
.sx-field__help { font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-field--error .sx-input { border-color: var(--sx-danger); }
.sx-field--error .sx-field__help { color: var(--sx-danger); }

/* ---------- Boxes ---------- */
.sx-card { display: flex; flex-direction: column; gap: 6px; padding: var(--sx-space-5); border-radius: var(--sx-radius-card);
  background: var(--sx-raised); box-shadow: var(--sx-shadow-card); text-decoration: none; }
.sx-card__title { font-size: var(--sx-size-title); font-weight: var(--sx-weight-medium); }
.sx-card__text { font-size: var(--sx-size-data); color: var(--sx-text-2); }
.sx-pill-label { display: inline-flex; align-items: center; gap: var(--sx-space-2); min-height: 28px; padding: 0 var(--sx-space-3); border-radius: var(--sx-radius-pill);
  background: var(--sx-raised); box-shadow: 0 0 0 1px var(--sx-line-box); font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium);
  letter-spacing: var(--sx-tracking-caps); text-transform: uppercase; color: var(--sx-text-2); }
.sx-pill-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sx-accent); }

/* A suggestion from the assistant, shown inside a product page. */
.sx-suggestion { display: flex; align-items: center; gap: 14px; padding: 14px; padding-left: var(--sx-space-4); border-radius: var(--sx-radius-card);
  background: var(--sx-raised); box-shadow: 0 0 0 1px var(--sx-line-box), 0 1px 2px rgba(18, 20, 58, 0.05); }
.sx-suggestion__mark { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sx-selected); display: flex; align-items: center; justify-content: center; }
.sx-suggestion__text { flex: 1; min-width: 0; font-size: var(--sx-size-data); }
.sx-suggestion__text p { margin: 0; }

/* ---------- Menus ---------- */
.sx-menu { display: flex; flex-direction: column; gap: 2px; min-width: 220px; padding: 6px; border-radius: var(--sx-radius-card);
  background: var(--sx-raised); box-shadow: var(--sx-shadow-menu); }
.sx-menu__item { display: flex; align-items: center; gap: var(--sx-space-3); min-height: 36px; padding: 0 10px; border-radius: var(--sx-radius-control);
  text-decoration: none; white-space: nowrap; }
.sx-menu__item:hover { background: var(--sx-selected); }
.sx-menu__item[aria-current="true"] { background: var(--sx-selected); font-weight: var(--sx-weight-medium); }
.sx-menu__item > :last-child:not(:first-child) { margin-left: auto; }
.sx-menu__label { margin: 8px 10px 4px; font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); letter-spacing: var(--sx-tracking-caps);
  text-transform: uppercase; color: var(--sx-muted); }
.sx-menu__rule { height: 1px; margin: 6px 2px; background: var(--sx-line); border: 0; }

/* ---------- Tables ---------- */
.sx-table-box { border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-card); overflow: hidden; }
.sx-table { width: 100%; border-collapse: collapse; font-size: var(--sx-size-data); }
.sx-table th { padding: var(--sx-space-3) var(--sx-space-5); text-align: left; font-size: var(--sx-size-label); font-weight: var(--sx-weight-regular);
  color: var(--sx-muted); border-bottom: 1px solid var(--sx-line); }
.sx-table td { padding: 14px var(--sx-space-5); vertical-align: middle; color: var(--sx-text-2); border-bottom: 1px solid var(--sx-line-row); }
.sx-table tr:last-child td { border-bottom: 0; }
.sx-table td:first-child { color: var(--sx-text); font-weight: var(--sx-weight-medium); }
.sx-table td:first-child a { text-decoration: none; }
/* A link in a table keeps its look and is clickable over at least 24px of height */
.sx-table td a { position: relative; }
.sx-table td a::after { content: ""; position: absolute; inset: -4px 0; }

/* ---------- Stage: quiet text with a small mark, never a coloured pill ---------- */
.sx-stage { display: inline-flex; vertical-align: middle; align-items: center; gap: 7px; font-size: var(--sx-size-ui); color: var(--sx-text); }
.sx-stage::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.sx-stage--active::before { background: var(--sx-accent); }
.sx-stage--ready::before { box-shadow: inset 0 0 0 1.5px var(--sx-accent); }
.sx-stage--draft { color: var(--sx-text-2); }
.sx-stage--draft::before { box-shadow: inset 0 0 0 1.5px var(--sx-line-field); }
.sx-stage--done::before, .sx-stage--attention::before { display: none; }
.sx-stage--attention { color: var(--sx-attention-text); }
.sx-stage--attention svg { color: var(--sx-attention-mark); }
.sx-stage svg { flex: none; }

/* ---------- A design tool (dark) ---------- */
.sx-rail { flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sx-space-3) 0;
  background: var(--sx-surface); border-right: 1px solid var(--sx-line); }
.sx-tool { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--sx-radius-control);
  background: transparent; color: var(--sx-text-2) !important; }
.sx-tool[aria-pressed="true"] { background: var(--sx-accent); color: #12143A !important; }
.sx-well { flex: 1; min-width: 0; background: var(--sx-well); display: flex; align-items: center; justify-content: center; }
.sx-panel { flex: none; width: 344px; background: var(--sx-panel); border-left: 1px solid var(--sx-line); padding: var(--sx-space-4); display: flex; flex-direction: column; gap: var(--sx-space-3); }

/* ====================================================================
   Version 0.2, approved 14 November 2026 (DEC-SYS-20261114-02)
   ==================================================================== */

/* A frame with no left menu: sign-in, setup, a partner's upload page */
.sx-solo { flex: 1; display: flex; flex-direction: column; align-items: center; padding: var(--sx-space-10) var(--sx-space-6);
  background: radial-gradient(900px 360px at 78% -80px, var(--sx-fade), transparent 70%); }
.sx-solo__column { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: var(--sx-space-6); }
.sx-solo__column--narrow { max-width: 400px; margin-top: 72px; }
.sx-box { padding: var(--sx-space-8); border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-card);
  display: flex; flex-direction: column; gap: var(--sx-space-5); }
.sx-steps { display: flex; flex-direction: column; gap: var(--sx-space-2); }
.sx-steps__bar { height: 4px; border-radius: 2px; background: var(--sx-line-box); overflow: hidden; }
.sx-steps__bar span { display: block; height: 100%; background: var(--sx-text); border-radius: 2px; }
.sx-actions { display: flex; align-items: center; gap: var(--sx-space-2); }
.sx-actions--end { justify-content: flex-end; }
.sx-button--block { width: 100%; }

/* Message boxes: one white box, told apart by a mark and words, not by a coloured background */
.sx-message { display: flex; align-items: flex-start; gap: var(--sx-space-3); padding: 14px var(--sx-space-4); border-radius: var(--sx-radius-box);
  background: var(--sx-raised); box-shadow: 0 0 0 1px var(--sx-line-box); font-size: var(--sx-size-data); }
.sx-message__mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--sx-selected); color: var(--sx-text); margin-top: -1px; }
.sx-message__text { flex: 1; min-width: 0; }
.sx-message__text p { margin: 0; }
.sx-message__title { font-weight: var(--sx-weight-medium); }
/* A note (--info) and a confirmation (--done) take the plain box above: the mark's shape and the words tell them apart. */
.sx-message--info, .sx-message--done { }
.sx-message--attention .sx-message__mark { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sx-attention-mark); color: var(--sx-attention-text); }
.sx-message--attention .sx-message__title { color: var(--sx-attention-text); }
.sx-message--problem { box-shadow: 0 0 0 1px var(--sx-danger); }
.sx-message--problem .sx-message__mark { background: var(--sx-danger); color: var(--sx-danger-on); }
.sx-message--problem .sx-message__title { color: var(--sx-danger); }

/* A destructive button: quiet until the person is asked to confirm, solid only in the confirmation */
.sx-button--danger { border-color: var(--sx-line-control); color: var(--sx-danger) !important; }
.sx-button--danger-solid { border-color: var(--sx-danger); background: var(--sx-danger); color: var(--sx-danger-on) !important; }
.sx-button--danger-solid:hover { background: var(--sx-danger); opacity: 0.9; }

/* A pop-up window */
.sx-scrim { position: absolute; inset: 0; background: var(--sx-scrim); display: flex; align-items: center; justify-content: center; z-index: 10; }
.sx-dialog { width: 480px; max-width: calc(100% - 32px); padding: var(--sx-space-6); border-radius: var(--sx-radius-card); background: var(--sx-raised);
  box-shadow: 0 0 0 1px var(--sx-line-box), 0 24px 64px rgba(18, 20, 58, 0.28); display: flex; flex-direction: column; gap: var(--sx-space-4); }
.sx-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sx-space-4); }
.sx-dialog p { margin: 0; font-size: var(--sx-size-data); color: var(--sx-text-2); }

/* A product's own picker in the header: the thing the person is working inside */
.sx-picker { display: inline-flex; align-items: center; gap: var(--sx-space-2); min-height: var(--sx-control-height); padding: 0 var(--sx-space-3);
  border: 1px solid var(--sx-line-control); border-radius: var(--sx-radius-control); background: var(--sx-surface); white-space: nowrap; }
.sx-picker__label { color: var(--sx-muted); }
.sx-picker svg { color: var(--sx-muted); }

/* The account box, opened */
.sx-account[aria-expanded="true"] { background: var(--sx-selected); }
.sx-account-anchor { position: relative; margin-top: auto; }
.sx-account-anchor .sx-account { margin-top: 0; }
/* The account menu: exactly the width of the account box, opening upward from it (DEC-SYS-20261114-02) */
.sx-menu--account { position: absolute; left: 0; right: 0; bottom: calc(100% + var(--sx-space-2)); min-width: 0; z-index: 5; }
/* A menu opening: 200 milliseconds, and none when the person has asked for reduced motion */
@keyframes sx-menu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sx-menu--opening { animation: sx-menu-in var(--sx-motion-base) var(--sx-ease); }
.sx-menu__item small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-seg { display: inline-flex; padding: 2px; border-radius: var(--sx-radius-control); background: var(--sx-selected); }
.sx-seg button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--sx-text-2) !important; }
.sx-seg button[aria-pressed="true"] { background: var(--sx-raised); color: var(--sx-text) !important; font-weight: var(--sx-weight-medium); box-shadow: var(--sx-shadow-box); }

/* Narrow widths */
.sx-sidebar--icons { width: 64px; padding-left: var(--sx-space-3); padding-right: var(--sx-space-3); align-items: center; }
.sx-sidebar--icons .sx-nav { width: 36px; padding: 0; justify-content: center; }
.sx-sidebar--icons .sx-account { width: 36px; min-height: 36px; padding: 0; justify-content: center; border: 0; box-shadow: none; background: transparent; }
.sx-header--compact .sx-header__brand { width: auto; padding-right: var(--sx-space-3); }
.sx-drawer { position: absolute; inset: 0 auto 0 0; width: 280px; z-index: 11; box-shadow: 0 0 0 1px var(--sx-line-box), 16px 0 40px rgba(18, 20, 58, 0.16); }
.sx-device { position: relative; overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px var(--sx-line-box), 0 8px 24px rgba(18, 20, 58, 0.10); display: flex; flex-direction: column; }

/* The three widths, applied by the window's own width. The classes above stay for a product that must set a width by hand.
   Under 1280px the left menu folds to icons. Under 768px it is hidden until the menu button opens it as a drawer
   (add .sx-sidebar--open), the logo is the tile alone, and a table marked .sx-table--cards becomes a list of cards. */
.sx-menu-button { display: none; }
@media (max-width: 1279px) {
  .sx-sidebar:not(.sx-drawer) { width: 64px; padding-left: var(--sx-space-3); padding-right: var(--sx-space-3); align-items: center; }
  .sx-sidebar:not(.sx-drawer) .sx-nav { width: 36px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .sx-sidebar:not(.sx-drawer) .sx-nav__count, .sx-sidebar:not(.sx-drawer) .sx-nav-label,
  .sx-sidebar:not(.sx-drawer) .sx-account > svg { display: none; }
  /* The name stays for a screen reader when only the initials show */
  .sx-sidebar:not(.sx-drawer) .sx-account__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* The account menu keeps the full left menu's inner width and opens over the page */
  .sx-sidebar:not(.sx-drawer) .sx-menu--account { right: auto; width: calc(var(--sx-sidebar-width) - 2 * var(--sx-space-3)); }
  .sx-sidebar:not(.sx-drawer) .sx-account { width: 36px; min-height: 36px; padding: 0; justify-content: center; border: 0; box-shadow: none; background: transparent; }
  .sx-header__brand { width: auto; padding-right: var(--sx-space-3); }
  .sx-main { padding: var(--sx-space-6); }
}
@media (max-width: 767px) {
  .sx-menu-button { display: inline-flex; }
  .sx-main { padding: var(--sx-space-5) var(--sx-space-4); }
  .sx-sidebar:not(.sx-sidebar--open) { display: none; }
  .sx-sidebar.sx-sidebar--open { position: absolute; inset: 0 auto 0 0; width: 280px; z-index: 11; align-items: stretch;
    box-shadow: 0 0 0 1px var(--sx-line-box), 16px 0 40px rgba(18, 20, 58, 0.16); }
  .sx-sidebar.sx-sidebar--open .sx-nav { width: auto; padding: 0 10px; justify-content: flex-start; font-size: inherit; gap: 10px; }
  .sx-sidebar.sx-sidebar--open .sx-nav__count, .sx-sidebar.sx-sidebar--open .sx-nav-label { display: block; }
  .sx-sidebar.sx-sidebar--open .sx-account__text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .sx-sidebar.sx-sidebar--open .sx-menu--account { right: 0; width: auto; }
  .sx-sidebar.sx-sidebar--open .sx-account > svg { display: block; }
  .sx-sidebar.sx-sidebar--open .sx-account { width: 100%; min-height: 56px; padding: 10px var(--sx-space-3); justify-content: flex-start;
    border: 1px solid var(--sx-line-box); box-shadow: var(--sx-shadow-box); background: var(--sx-surface); }
  .sx-lockup__word { display: none; }
  .sx-header__rule, .sx-header > .sx-slash, .sx-header > .sx-switch:not(.sx-switch ~ .sx-switch):has(~ .sx-switch), .sx-header > .sx-switch ~ .sx-switch ~ .sx-switch { display: none; }
  .sx-header__end .sx-input { display: none; }
  .sx-table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sx-table--cards, .sx-table--cards tbody, .sx-table--cards tr, .sx-table--cards td { display: block; }
  .sx-table--cards tr { padding: var(--sx-space-3) var(--sx-space-4); border-bottom: 1px solid var(--sx-line-row); }
  .sx-table--cards tr:last-child { border-bottom: 0; }
  .sx-table--cards td { padding: 2px 0; border: 0; }
}

/* ==========================================================================
   Cards shown inside an assistant, approved 14 November 2026 (DEC-SYS-20261114-03)
   ========================================================================== */
/* The card. Flat, with an outline: the assistant owns the page, so the card casts no shadow. */
.sx-acard { border: 1px solid var(--sx-line-box); border-radius: var(--sx-radius-card); background: var(--sx-raised); color: var(--sx-text);
  font-size: var(--sx-size-data); line-height: var(--sx-leading); overflow: hidden; }
.sx-acard p { margin: 0; }
.sx-acard__top { display: flex; align-items: center; gap: var(--sx-space-2); min-height: 44px; padding: 0 var(--sx-space-5); border-bottom: 1px solid var(--sx-line);
  font-size: var(--sx-size-ui); }
.sx-acard__module { font-weight: var(--sx-weight-medium); white-space: nowrap; }
.sx-acard__where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sx-muted); }
.sx-acard__where::before { content: "/"; margin: 0 var(--sx-space-2) 0 2px; color: var(--sx-line-control); }
.sx-acard__stamp { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: var(--sx-radius-pill);
  box-shadow: inset 0 0 0 1px var(--sx-line-control); font-size: var(--sx-size-label); color: var(--sx-text-2); white-space: nowrap; }
.sx-acard__stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sx-accent); }
.sx-acard__body { display: flex; flex-direction: column; gap: var(--sx-space-4); padding: var(--sx-space-5); }
.sx-acard__title { margin: 0; font-size: var(--sx-size-title); font-weight: var(--sx-weight-medium); line-height: 1.3; letter-spacing: -0.005em; }
.sx-acard__sub { margin-top: 2px !important; font-size: var(--sx-size-ui); color: var(--sx-text-2); }
.sx-acard__list { margin: 0; padding: 0; list-style: none; }
.sx-acard__list li { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-4); padding: var(--sx-space-3) 0; border-top: 1px solid var(--sx-line-row); }
.sx-acard__list li:last-child { border-bottom: 1px solid var(--sx-line-row); }
.sx-acard__list .sx-stage { flex: none; }
.sx-acard__item { font-weight: var(--sx-weight-medium); }
.sx-acard__item-sub { font-size: var(--sx-size-ui); color: var(--sx-text-2); }
.sx-acard__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sx-space-4); padding: var(--sx-space-4) 0; border-top: 1px solid var(--sx-line-row); border-bottom: 1px solid var(--sx-line-row); }
.sx-acard__figure { margin: 2px 0 !important; font-size: var(--sx-size-body); font-weight: var(--sx-weight-medium); line-height: 1.3; }
.sx-acard__note { display: flex; align-items: flex-start; gap: var(--sx-space-3); font-size: var(--sx-size-ui); color: var(--sx-text-2); }
.sx-acard__note .sx-message__mark { width: 22px; height: 22px; margin-top: -1px; background: var(--sx-selected); color: var(--sx-text); }
.sx-acard__note--attention { color: var(--sx-attention-text); }
.sx-acard__note--attention .sx-message__mark { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sx-attention-mark); color: var(--sx-attention-text); }
.sx-acard__note--problem { color: var(--sx-danger); }
.sx-acard__note--problem .sx-message__mark { background: var(--sx-danger); color: var(--sx-danger-on); }
.sx-acard__source { display: flex; flex-wrap: wrap; gap: 6px var(--sx-space-5); padding: var(--sx-space-3) var(--sx-space-5); border-top: 1px solid var(--sx-line);
  font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-acard__source span { display: inline-flex; align-items: center; gap: 6px; }
.sx-acard__actions { display: flex; flex-wrap: wrap; gap: var(--sx-space-2); padding: var(--sx-space-4) var(--sx-space-5); border-top: 1px solid var(--sx-line); }
.sx-acard--ask .sx-acard__body, .sx-acard--done .sx-acard__body, .sx-acard--busy .sx-acard__body { padding-bottom: var(--sx-space-4); }
.sx-acard--ask .sx-acard__actions, .sx-acard--done .sx-acard__actions { border-top: 0; padding-top: 0; }
.sx-acard--problem { border-color: var(--sx-danger); }
[data-theme="dark"] .sx-acard .sx-button:not(.sx-button--primary):not(.sx-button--quiet) { background: transparent; }

/* Icons (version 0.4). The set is Lucide, kept in assets/icons/. Rules: specs/icons.md.
   16px beside 14px words; 20px in a tool rail or an empty state; 24px on its own. Colour comes from the words around it. */
.sx-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sx-icon--20 { width: 20px; height: 20px; stroke-width: 1.5; }
.sx-icon--24 { width: 24px; height: 24px; stroke-width: 1.5; }
.sx-icon--spin { animation: sx-spin 900ms linear infinite; }
@keyframes sx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sx-icon--spin { animation: none; } }
