/* The app, drawn: HTML and CSS pictures of Xtant's real screens (XTNT-174), loaded by /, /pricing
 * and /download only, the way Retasc loads its diagrams on the pages that use them.
 *
 * The pattern is Retasc's, copied on 2026-10-15 from ~/retasc/web: the hero queue card (.q-card,
 * styles.css, "real dash UI ... compact") and the Dash window on /product (.dq, product-ill.css).
 * Canon: ~/retasc/operations/design-system.md, "retasc.com (the marketing site)".
 *
 * Since XTNT-221 (2026-10-16) a mockup is drawn in the APP's own colors, not the site's: the apps
 * are dark only, so the pictures stay dark in the site's light mode too, as a screenshot would.
 * `.xw` redefines the site tokens its parts use with the apps' values, taken from
 * packages/XtantKit/Sources/XtantDesign/Xtant.swift (Xtro's Mac ramp, XTNT-218): ground #0F0F0F,
 * raised #1C1C1C, control #282828, inks #EDEDEC #BEBEB9 #A5A5A0 #8F8F8A, hairline white 8%,
 * divider white 14%, accent #00A7EA. Floating controls and bars are glass, as the apps draw them
 * on macOS 26 and iOS 26 (XTNT-208, XtantDesign/Glass.swift): the toolbar, the section control,
 * the capsule buttons and the chips. Cards and forms are not (Apple's HIG: no glass in the
 * content layer).
 *
 * What each picture copies, and from where (the strings are the apps' own):
 *   .xw        the Mac panel: toolbar, reading bar, the Posts / Replies / History / Settings
 *              control (apps/mac/PanelView.swift, MacShell.swift)
 *   .xw-post   a post row with its chips (XtantUI/Posts/PostRow.swift)
 *   .xw-sug    a suggestion card in the reply editor; the selected one carries the accent edge
 *              (XtantUI/Editor/ReplyEditor.swift)
 *   .xw-bal    Settings > Balance with the daily summary (XtantUI/Balance/BalanceScreen.swift,
 *              XtantCore/LedgerSummaryText.swift)
 *   .xw-menu   the menu-bar menu (apps/mac/MenuBarContent.swift)
 * Every person and post in them is an invented example, never a real X account. */

/* ---------- The window ---------- */
.xw {
  /* The apps' palette (Xtant.swift), under the site's token names the parts below use. */
  --xa-ground: #0F0F0F; --xa-raised: #1C1C1C; --xa-control: #282828;
  --xa-hairline: rgba(255,255,255,0.08); --xa-divider: rgba(255,255,255,0.14);
  --panel: var(--xa-ground); --panel-sunk: var(--xa-ground); --panel-line: var(--xa-hairline);
  --surface: var(--xa-control); --surface-border: var(--xa-divider); --well-line: var(--xa-divider);
  --fg: #EDEDEC; --ink: #EDEDEC; --secondary: #BEBEB9; --muted: #A5A5A0; --sep: #8F8F8A;
  --accent: #00A7EA; --accent-text: #00A7EA; --on-accent: #0A0A06;
  --success: #6EE7B7; --warning: #FDBA74;
  /* Glass: a light veil with a bright top edge over whatever sits behind it. */
  --xa-glass: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  --xa-glass-edge: rgba(255,255,255,0.16);
  --xa-glass-tint: rgba(0,167,234,0.35);
  color-scheme: dark;
  background: var(--xa-ground); border: 1px solid var(--xa-divider); border-radius: var(--radius-card);
  overflow: hidden; font-family: var(--sans); font-size: var(--t-value); color: var(--ink); text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.card .xw { margin-top: auto; box-shadow: none; }
.card p + .xw { margin-top: 16px; }

/* Glass on the floating layer: bars, the section control, capsule buttons, chips. */
.xw-glass, .xw-bar, .xw-tabs, .xw-cap, .xw-chip, .xw-stabs {
  background: var(--xa-glass); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

/* The toolbar: account picker, reading dot, balance at the far end. */
.xw-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--panel-line); }
.xw-bar .sp { flex: 1; }
.xw-pick { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: var(--t-label); color: var(--fg); white-space: nowrap; }
.xw-pick i { width: 5px; height: 5px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); }
/* The app's reading dot is round (ReadingDot), so the picture draws it round. */
.xw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.xw-dot.off { background: var(--sep); }
.xw-money { font-family: var(--mono); font-size: var(--t-value); color: var(--fg); font-variant-numeric: tabular-nums; }
.xw-read { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--panel-line);
  font-size: var(--t-label); color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The section control: a glass capsule, the chosen section a brighter pill in it. */
.xw-tabs { display: flex; gap: 2px; margin: 9px 12px; padding: 3px; border: 1px solid var(--xa-glass-edge);
  border-radius: var(--radius-pill); }
.xw-tabs > * { flex: 1; text-align: center; padding: 4px 8px; border-radius: var(--radius-pill);
  color: var(--secondary); font-weight: 500; font-size: var(--t-label); white-space: nowrap; }
.xw-tabs > b { background: rgba(255,255,255,0.16); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,0.35); }

.xw-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- A post ---------- */
.xw-post { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; }
.xw-av { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--surface-border);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: var(--t-label);
  color: var(--secondary); }
.xw-who { display: flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; }
.xw-who b { font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.xw-who span { color: var(--muted); font-size: var(--t-label); }
.xw-who .age { margin-left: auto; }
.xw-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.xw-chip { font-family: var(--mono); font-size: var(--t-label); padding: 2px 8px; border-radius: var(--radius-pill);
  border: 1px solid var(--xa-glass-edge); color: var(--secondary); white-space: nowrap; }
/* The accent's glass (tinted), for the one chip that should stand out. */
.xw-chip.acc { background: var(--xa-glass-tint); color: var(--fg); border-color: rgba(0,167,234,0.55); }
.xw-chip.warn { color: var(--warning); }
.xw-text { margin-top: 6px; color: var(--fg); line-height: 1.5; }
.xw-meta { display: flex; gap: 14px; margin-top: 6px; font-family: var(--mono); font-size: var(--t-label); color: var(--muted); }
/* A list of posts: hairlines between rows, the open one on the surface. */
.xw-list > .xw-post { padding: 11px 14px; }
.xw-list > .xw-post + .xw-post { border-top: 1px solid var(--panel-line); }
.xw-list > .xw-post.on { background: var(--xa-raised); }

/* ---------- The reply editor ---------- */
/* The app's section label (XtantEyebrow): a short accent line, then the mono caps. */
.xw-eb { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: var(--t-label);
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.xw-eb::before { content: ""; width: 14px; height: 1px; background: var(--accent); opacity: .55; }
.xw-eb .r { margin-left: auto; text-transform: none; letter-spacing: 0; }
.xw-sug { position: relative; padding: 9px 30px 9px 11px; background: var(--xa-raised); border: 1px solid var(--xa-hairline);
  border-radius: var(--radius-md); color: var(--fg); line-height: 1.5; }
.xw-sug.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* The selected card's check (checkmark.circle.fill), drawn: a disc and a tick. */
.xw-sug.on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); }
.xw-sug.on::before { content: ""; position: absolute; z-index: 1; top: 12.5px; right: 14.5px; width: 3px; height: 6px;
  border-right: 1.5px solid var(--on-accent); border-bottom: 1.5px solid var(--on-accent); transform: rotate(45deg); }
.xw-box { padding: 9px 11px; border: 1px solid var(--surface-border); border-radius: var(--radius-md); background: var(--surface);
  color: var(--fg); line-height: 1.5; }
.xw-box .count { display: block; text-align: right; margin-top: 6px; font-family: var(--mono); font-size: var(--t-label); color: var(--muted); }
.xw-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.xw-cap { padding: 4px 11px; border: 1px solid var(--xa-glass-edge); border-radius: var(--radius-pill); color: var(--fg);
  font-size: var(--t-label); white-space: nowrap; }
.xw-go { align-self: flex-start; padding: 6px 16px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: var(--t-value); white-space: nowrap; }
.xw-note { font-size: var(--t-label); color: var(--muted); line-height: 1.5; }
.xw-row2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- A post's pictures (XTNT-209) ---------- */
/* Thumbnails in a row, each with its remove button; the pictures are drawn, not photos. */
.xw-media { display: flex; gap: 8px; }
.xw-thumb { position: relative; width: 64px; height: 48px; border-radius: var(--radius-md); border: 1px solid var(--xa-hairline);
  background: linear-gradient(135deg, #2a3a44 0%, #16222b 55%, #0f171c 100%); }
.xw-thumb.b { background: linear-gradient(160deg, #3b3226 0%, #241e17 60%, #141210 100%); }
.xw-thumb::after { content: ""; position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--fg); box-shadow: 0 0 0 2px var(--xa-ground); opacity: .85; }

/* ---------- Settings: the Mac's Settings window (XTNT-207) ---------- */
/* Toolbar tabs over grouped forms: each section a raised card, its title above it. */
.xw-stabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 8px 10px;
  border-bottom: 1px solid var(--xa-hairline); }
.xw-stabs > * { padding: 4px 9px; border-radius: var(--radius-md); font-size: var(--t-label); color: var(--secondary); white-space: nowrap; }
.xw-stabs > b { background: rgba(255,255,255,0.12); color: var(--fg); font-weight: 500; }
.xw-sec { margin-bottom: -6px; padding-left: 4px; font-size: var(--t-label); font-weight: 600; color: var(--muted); }
.xw-card { background: var(--xa-raised); border: 1px solid var(--xa-hairline); border-radius: var(--radius-card); }
.xw-card > .xw-line + .xw-line { border-top-color: var(--xa-hairline); }
.xw-card > .xw-pad { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Balance ---------- */
.xw-fig { font-family: var(--mono); font-size: 24px; color: var(--fg); font-variant-numeric: tabular-nums; line-height: 1.1; }
.xw-day { font-size: var(--t-label); color: var(--muted); margin-bottom: -6px; }
.xw-grp { border: 1px solid var(--surface-border); border-radius: var(--radius-md); }
.xw-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 11px; color: var(--fg); }
.xw-line + .xw-line { border-top: 1px solid var(--surface-border); }
.xw-line .amt { font-family: var(--mono); font-size: var(--t-label); color: var(--secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.xw-line .amt.gain { color: var(--success); }

/* ---------- History ---------- */
.xw-search { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--surface-border);
  border-radius: var(--radius-md); color: var(--muted); font-size: var(--t-label); }
.xw-search::before { content: ""; width: 8px; height: 8px; border: 1.5px solid var(--muted); border-radius: 50%; flex: none; }
.xw-hist > div { padding: 10px 0; }
.xw-hist > div + div { border-top: 1px solid var(--panel-line); }
.xw-hist .top { display: flex; justify-content: space-between; gap: 10px; font-size: var(--t-label); color: var(--secondary); }
.xw-hist .top span { color: var(--muted); }
.xw-hist .was { margin-top: 4px; font-size: var(--t-label); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xw-hist .was.acc { color: var(--accent-text); }
.xw-hist .mine { margin-top: 4px; color: var(--fg); line-height: 1.5; }

/* ---------- The menu-bar menu ---------- */
.xw-menu { padding: 6px 0; font-size: var(--t-value); }
.xw-menu > span { display: block; padding: 4px 14px; color: var(--muted); }
.xw-menu > b { display: block; padding: 4px 14px; font-weight: 400; color: var(--fg); }
.xw-menu > hr { border: 0; border-top: 1px solid var(--panel-line); margin: 5px 0; }
.xw-menu kbd { float: right; font-family: var(--mono); font-size: var(--t-label); color: var(--muted); }

/* The page behind a picture in a band card: the picture keeps its own ground. */
.block.band .xw { background: var(--xa-ground); }

/* ---------- Placement ---------- */
/* The hero's picture: the window, capped so it reads as a panel beside the copy. */
.hero .xw { max-width: 460px; margin-left: auto; }
/* A section-level picture standing alone under a lede is held to a panel's width, not the page's. */
.block > .xw { max-width: 600px; }
/* A section-level picture under a lede, beside text on wide screens. */
.xw-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.xw-split > .stack { display: flex; flex-direction: column; gap: 16px; }
.xw-split > .stack > .card { margin: 0; }
/* A key and value list beside the picture takes the section-level ladder, as .block > .ill does. */
.xw-split > .ill { margin-top: 0; background: var(--panel); }
.block.band .xw-split > .ill { background: var(--panel-sunk); }

@media (max-width: 900px) {
  .hero .xw { margin: 0 auto; }
  .xw-split { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 420px) {
  .xw-body { padding: 12px; }
  .xw-stabs > * { padding: 4px 5px; }
  .xw-list > .xw-post { padding: 10px 12px; }
  .xw-meta { gap: 10px; }
}
