/* Generated by tools/generate/port_app_prototype.py from workbench/html-prototype (shared/tokens.css, shared/marks.css, shared/window.css, shared/sidebar.css),
 * scoped to .app-frame. Do not edit; change the prototype and run the port again. */

/* ---- shared/tokens.css ---- */
/* Atlas Mind HTML templates: design tokens.
 *
 * Text colours, type and motion are the desktop app's own
 * (atlas-application/desktop/global-ui/styles/tokens/tokens.css), so a template and the
 * app read as one product. Grounds and geometry are measured from Oliver's chat-screen
 * mock of 27 Oct 2026 at 1x (window interior 1845 x 1137); each value names what it was
 * measured from. Where the mock and the app differ (window ground #101010 here, #0b0b0b
 * in the app; sidebar 229px here, 208px in the app) the mock wins in the templates and
 * the difference is for Oliver to settle before the app follows.
 */

.app-frame {
  /* The Forlais faces first (Oliver, 27 Oct 2026: "stop using Inter in everything"); Inter only fills
     the characters they do not have yet. */
  --font: "Frls", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  /* Each writer's own face for their words in a conversation. */
  --font-you: "Frls", "Inter", sans-serif;
  --font-claude: "Frl-Adir", "Inter", sans-serif;
  --font-grok: "Frl-Rounded", "Inter", sans-serif;
  --font-gpt: "Frl UI", "Inter", sans-serif;  /* Frl UI Medium; Frl-Light was too thin to read at 13px */

  /* Text: the app's dark set. */
  --text: #f2f2f2;
  --text-body: #c9c9c9;
  --text-dim: #8a8a8a;
  --text-hint: #a3a3a3;      /* the composer's placeholder (peak 158 in the mock) */
  --chip: #d4d4d4;           /* the account disc and the rail's marks (the app's --project-colour) */
  --chip-hover: #f5f5f5;     /* a chip pointed at (the app's --project-colour-hover) */
  --chip-text: #161616;
  --focus: #6fb4ff;
  --warning: #e3b341;        /* the dot on the vault's shield */
  --danger: #ff7b72;         /* a refused address (the app's dark --danger) */
  --success: #7ee787;        /* running and connected (the app's dark --success) */

  /* Grounds, measured. */
  --window: #101010;         /* window and title bar */
  --window-edge: #1d1d1d;    /* the window's hairline */
  --panel: #161616;          /* sidebar; the title row's tool box */
  --panel-peek: #151515;     /* the sliver beside the sidebar */
  --selection: #191919;      /* the open chat's row */
  --hairline: #1b1b1b;       /* the line above the account */
  --surface: #1f1f1f;        /* composer, preview, tiles */
  --surface-bar: #3f3f3f;    /* the preview's top bar */
  --surface-field: #2e2e2e;  /* the preview's address field */
  --control-hover: color-mix(in srgb, var(--text) 6%, transparent);
  --control-pressed: color-mix(in srgb, var(--text) 10%, transparent);

  /* Window controls, measured: 16px discs, centres 27px apart. */
  --light-close: #ed4640;
  --light-min: #fbac3a;
  --light-zoom: #29ac32;
  --light-size: 16px;

  /* Geometry, measured. */
  --titlebar-height: 53px;   /* window top to the sidebar's top */
  --sidebar-inset: 15px;     /* window edge to the sidebar */
  --sidebar-width: 229px;
  --sidebar-radius: 14px;
  --sidebar-bottom: 19px;
  --main-start: 32px;        /* sidebar edge to the composer */
  --main-end: 47px;          /* preview edge to the window edge */
  --column-gap: 43px;        /* composer to preview */
  --preview-top: 18px;
  --dock-height: 93px;       /* composer and tiles */
  --dock-gap: 36px;          /* preview to tiles */
  --dock-bottom: 23px;
  --surface-radius: 10px;
  --tile-width: 125px;
  --tile-gap: 18px;

  /* Each model's name in a conversation (Oliver, 27 Oct 2026: slightly different colours per model).
     Light and quiet, every one at least 9:1 on the window ground; the person's name stays --text.
     Claude from Anthropic's terracotta, GPT from OpenAI's green; Grok has no brand colour, so a
     cool periwinkle keeps it apart. A prototype choice, not yet in the app. */
  --writer-claude: #e8a189;
  --writer-grok: #a8b4f0;
  --writer-gpt: #8ed3b6;

  /* The chat bar's and the conversation's, from the app's tokens.css unchanged. */
  --bg: #0b0b0b;
  --line: 1.45;
  --space-2: 8px;
  --space-5: 24px;
  --dur-loop: 1.2s;
  --dur-slow: 260ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-floating: var(--shadow-control), 0 14px 36px -8px rgb(0 0 0 / var(--depth-ambient));
  --conversation-message-width: 64ch;
  --conversation-message-line: 1.55;
  --conversation-message-gap: 24px;
  --conversation-continuation-gap: 8px;
  --border: #242424;
  --panel-active: #1c1c1c;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --space-1: 4px;
  --control-hit-min: 24px;
  --conversation-width: 840px;
  --chat-bar-height: 52px;
  --chat-bar-icon-target: 40px;
  --chat-bar-box-height: 144px;
  --depth-contact: 0.22;
  --depth-ambient: 0.5;
  --shadow-control: 0 1px 3px rgb(0 0 0 / var(--depth-contact));
  --shadow-composer: var(--shadow-control), 0 10px 24px -16px rgb(0 0 0 / var(--depth-ambient));

  --nav-text: 14px;
  --nav-title: 13px;
  --nav-icon: 14px;
  --radius: 6px;

  --motion: 120ms ease-out;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  .app-frame { --motion: 0s linear; }
}

/* ---- shared/marks.css ---- */
/* A service's mark, as the app draws one (global-ui/icons/marks/mark/marks.css): one-colour marks and
 * Oliver's symbols as a mask in the text colour, so they hold on the dark ground; full-colour brand marks
 * as images. Shared by the conversation, the Terminal flyout and panel, and Integrations. */
.app-frame .mark { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; color: var(--text-body); font-size: var(--text-xs); font-weight: 600; line-height: 1; }
.app-frame .mark-mono { display: block; width: 100%; height: 100%; background: var(--text); -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }

/* ---- shared/window.css ---- */
/* The window and its title bar, shared by every screen template.
 *
 * One grid carries the window: its columns are the sidebar's and the main area's, so the
 * title bar's pieces line up with the surfaces under them (the chat title over the chat
 * column, the status icons ending where the preview ends). Positions are measured from
 * the chat-screen mock (tokens.css says how).
 */
.app-frame *, .app-frame *::before, .app-frame *::after { box-sizing: border-box; }
.app-frame, .app-frame { height: 100%; margin: 0; }
.app-frame { background: var(--window); color: var(--text); font-family: var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden; }
.app-frame button { font: inherit; color: inherit; }
.app-frame svg { display: block; }

.app-frame .window {
  display: grid; height: 100vh; min-height: 560px;
  grid-template-columns:
    var(--sidebar-inset) var(--sidebar-width) var(--main-start)
    minmax(0, 764fr) var(--column-gap)
    minmax(0, 716fr) var(--main-end); /* 764 and 716: the composer's and the preview's widths at 1845 */
  grid-template-rows: var(--titlebar-height) minmax(0, 1fr);
}

/* The window is the flyouts' frame of reference (Terminal's opens beside the rail). */
.app-frame .window { position: relative; }

/* Title bar. Everything in it sits on one centre line, 25px down, except the tool box. */
.app-frame .titlebar { display: contents; }
.app-frame .lights { grid-row: 1; grid-column: 1 / 3; display: flex; gap: 11px; margin: 17px 0 0 15px; align-self: start; }
.app-frame .light { width: var(--light-size); height: var(--light-size); border-radius: 50%; }
.app-frame .light[data-light="close"] { background: var(--light-close); }
.app-frame .light[data-light="min"] { background: var(--light-min); }
.app-frame .light[data-light="zoom"] { background: var(--light-zoom); }
.app-frame .wordmark { grid-row: 1; grid-column: 2; justify-self: start; align-self: start; margin: 16px 0 0 104px;
  font-size: 17px; font-weight: 400; line-height: 18px; letter-spacing: 0.76em; text-transform: uppercase;
  white-space: nowrap; cursor: default; user-select: none; }

.app-frame .title { grid-row: 1; grid-column: 3 / 5; justify-self: center; align-self: start; margin: 17px 0 0;
  font-size: 19px; font-weight: 500; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.app-frame .toolbox { grid-row: 1; grid-column: 5 / 7; justify-self: start; align-self: start; display: flex; align-items: flex-start;
  gap: 10px; width: 76px; height: 35px; margin: 17px 0 0 33px; padding: 0 0 0 9px; background: var(--panel); }

.app-frame .status { grid-row: 1; grid-column: 6; justify-self: end; align-self: start; display: flex; align-items: center; gap: 10px;
  margin: 11px -4px 0 0; }

/* A square icon button: 14px glyph, 28px target, as the app's .tb-icon. */
.app-frame .icon-button { position: relative; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: var(--radius); background: none; color: var(--text-dim); cursor: pointer;
  transition: background var(--motion), color var(--motion); }
.app-frame .icon-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.app-frame .icon-button:hover { background: var(--control-hover); color: var(--text); }
.app-frame .icon-button:active { background: var(--control-pressed); }
.app-frame .icon-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.app-frame .icon-dot { position: absolute; top: 3px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }

/* Artboard mode (shared/artboard.js): the window at its mock's exact size, scaled as one piece. */

/* Fluid mode only (?layout=fluid). Narrow windows: the sidebar becomes a strip, the preview column goes, the title bar keeps its line. */
@media (max-width: 1100px) {
  .app-frame[data-mode="fluid"] .window { grid-template-columns: var(--sidebar-inset) var(--sidebar-width) 24px minmax(0, 1fr) 0 0 24px; }
  /* The chat's own tools sit just before the status icons (four 28px buttons, 10px apart, then 12px).*/
  .app-frame[data-mode="fluid"] .toolbox { grid-column: 4; justify-self: end; margin: 17px 154px 0 0; }
  .app-frame[data-mode="fluid"] .status { grid-column: 4; }
}
@media (max-width: 760px) {
  .app-frame[data-mode="fluid"] .window { grid-template-columns: 16px minmax(0, 1fr) 16px; grid-template-rows: var(--titlebar-height) auto minmax(0, 1fr); }
  .app-frame[data-mode="fluid"] .lights { grid-column: 1 / 3; }
  .app-frame[data-mode="fluid"] .wordmark { grid-column: 2; margin-left: 88px; letter-spacing: 0.5em; }
  .app-frame[data-mode="fluid"] .title, .app-frame[data-mode="fluid"] .toolbox { display: none; }
  .app-frame[data-mode="fluid"] .status { grid-column: 2; margin-right: 0; }
}

/* ---- shared/sidebar.css ---- */
/* The sidebar panel, shared by every screen template. Rows are measured from the chat-screen
 * mock: brand row centred 28px down, the first group at 35px rows, Your Atlas and Recent chats
 * at 31px rows, the account under a hairline at the foot. */
.app-frame .sidebar { grid-row: 2; grid-column: 2; display: flex; flex-direction: column; min-height: 0;
  margin-bottom: var(--sidebar-bottom); padding: 0 8px; border-radius: var(--sidebar-radius); background: var(--panel); }

.app-frame .brand { display: flex; align-items: center; flex-shrink: 0; height: 56px; padding: 0 12px 0 11px; }
.app-frame .brand-mark { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0; border: 0; background: none;
  color: var(--text); font-size: var(--nav-text); font-weight: 500; cursor: pointer; text-align: left; }
.app-frame .brand-mark img { width: 18px; height: 18px; flex-shrink: 0; }
.app-frame .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-frame .brand-toggle { display: none; }
.app-frame .brand .icon-button { margin-left: auto; margin-right: -5px; color: var(--text-body); }

.app-frame .nav-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.app-frame .nav-scroll::-webkit-scrollbar { display: none; }
.app-frame .nav-list { list-style: none; margin: 0; padding: 0; }
.app-frame .nav-list[data-group="main"] { margin-top: 14px; }
.app-frame .nav-title { margin: 0; padding: 0 0 0 10px; color: var(--text-dim); font-size: var(--nav-title); font-weight: 400; line-height: 18px; }
.app-frame .nav-title[data-group="atlas"] { margin-top: 30px; margin-bottom: 4px; }
.app-frame .nav-title[data-group="recent"] { margin-top: 28px; margin-bottom: 4px; }

.app-frame .nav-item { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 35px; padding: 0 12px;
  border: 0; border-radius: var(--radius); background: none; color: var(--text-body); font-size: var(--nav-text); font-weight: 400;
  line-height: 1.4; text-align: left; cursor: pointer; transition: background var(--motion), color var(--motion); }
.app-frame [data-group="atlas"] .nav-item, .app-frame [data-group="recent"] .nav-item { height: 31px; }
.app-frame [data-group="recent"] li + li { margin-top: 1px; }
.app-frame .nav-item:hover { background: var(--selection); color: var(--text); }
.app-frame .nav-item[aria-current="page"] { color: var(--text); font-weight: 500; }
.app-frame .nav-item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px;
  border-radius: 1px; background: var(--text-dim); }
.app-frame .nav-item[aria-current="true"] { background: var(--selection); color: var(--text); }
.app-frame .nav-item:focus-visible, .app-frame .brand-mark:focus-visible, .app-frame .account:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.app-frame .nav-icon { flex-shrink: 0; width: var(--nav-icon); height: var(--nav-icon); fill: none; stroke: var(--text-dim);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.app-frame .nav-item[aria-current="page"] .nav-icon, .app-frame .nav-item[aria-current="true"] .nav-icon, .app-frame .nav-item:hover .nav-icon { stroke: var(--text); }
.app-frame [data-group="recent"] .nav-icon { stroke-width: 1.3; }
.app-frame .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-frame .account { display: flex; align-items: flex-start; gap: 11px; flex-shrink: 0; width: 100%; height: 66px; padding: 14px 12px 0 10px;
  border: 0; border-top: 2px solid var(--hairline); border-radius: 0; background: none; text-align: left; cursor: pointer; }
.app-frame .account:hover .account-gear { stroke: var(--text); }
.app-frame .avatar { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--chip); color: var(--chip-text); font-size: 12px; font-weight: 600; }
.app-frame .account-copy { display: flex; flex-direction: column; min-width: 0; margin-top: -6px; }
.app-frame .account-name { color: var(--text); font-size: var(--nav-text); font-weight: 500; line-height: 20px; }
.app-frame .account-hint { color: var(--text-dim); font-size: var(--nav-title); line-height: 20px; }
.app-frame .account-gear { margin: 7px 0 0 auto; width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: var(--text-dim); stroke-width: 1.4; }

/* Narrow windows: the sidebar is a bar across the top that opens over the chat, as the app's is. */
@media (max-width: 760px) {
  .app-frame[data-mode="fluid"] .sidebar { grid-column: 2; position: relative; z-index: 2; max-height: calc(100vh - var(--titlebar-height) - 16px); margin-bottom: 8px; }
  .app-frame[data-mode="fluid"] .sidebar[data-expanded="false"] .nav-scroll, .app-frame[data-mode="fluid"] .sidebar[data-expanded="false"] .account { display: none; }
  .app-frame[data-mode="fluid"] .brand .icon-button { margin-right: 0; }
  .app-frame[data-mode="fluid"] .brand .brand-toggle { display: grid; margin-left: 4px; margin-right: -5px; }
}

/* ---- Website overrides, not from the prototype ----
 * A copy is the app's window at the app's own size (data-board, 1280 by 800), scaled as one piece to fit its
 * place on the page, as the prototype's artboard mode does (assets/js/shared/app-frame.js sets --s). Its type
 * is Inter (see the docstring of tools/generate/port_app_prototype.py), and nothing in it scrolls on its own. */
.app-frame { --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-you: var(--font); --font-claude: var(--font); --font-grok: var(--font); --font-gpt: var(--font);
  position: relative; height: auto; overflow: hidden; border-radius: 14px; background: var(--window);
  box-shadow: 0 0 0 1px var(--window-edge), 0 40px 100px -30px rgb(0 0 0 / 0.9); }
.app-frame[data-board] { aspect-ratio: 1280 / 800; }
.app-frame[data-board] > .window { width: 1280px; height: 800px; min-height: 0; transform: scale(var(--s, 0.6)); transform-origin: 0 0; }
.app-frame .nav-scroll, .app-frame .int-body { overflow: hidden; }
.app-frame .messages { overflow: visible; }
/* The rail's marks smaller and nearer the window's right edge (Oliver, 29 Oct 2026, on the website copies;
 * the prototype itself keeps 36px marks, 26px icons and a 29px end). */
.app-frame .window { --rail-mark: 28px; --rail-icon: 19px; --rail-gap: 30px; --rail-end: 12px; }
/* A copy is a picture (role="img"), so its message box is disabled rather than focusable (axe nested-interactive,
 * 29 Oct 2026 review); it keeps the prototype's look. */
.app-frame .cb-bar textarea:disabled { opacity: 1; color: inherit; background: transparent; cursor: default; }
/* The usage line beneath the bar stays the faintest text in a copy, but legible: the prototype's 0.55 opacity blends
 * --text-dim to about 2.4:1 on the window, under WCAG 2.2 AA's 4.5:1 (axe color-contrast, serious, on /download in the
 * 29 Oct 2026 release gate). At full opacity --text-dim reads about 5.4:1. The app's own line is unchanged. Three classes,
 * because this block is linked before app-frame-chat.css, whose two-class rule would otherwise win. */
.app-frame .cb .cb-terms { opacity: 1; }
/* Spans stand in for the prototype's buttons, so they centre their words as a button does. */
.app-frame .ap-new, .app-frame .ap-view { display: inline-flex; align-items: center; justify-content: center; }
/* The site's own header uses .brand and .brand-name (site.css, phone.css); inside a copy they are the app's. */
.app-frame .brand { gap: 0; letter-spacing: 0; font-size: inherit; font-weight: inherit; }
.app-frame .brand-name { position: static; display: block; width: auto; height: auto; clip-path: none; }
/* The marks by name, as classes rather than the prototype's inline styles, so a stricter style policy holds. */
.app-frame .mark[data-size="14"] { width: 14px; height: 14px; }
.app-frame .mark[data-size="15"] { width: 15px; height: 15px; }
.app-frame .mark[data-size="18"] { width: 18px; height: 18px; }
.app-frame .mark-mono[data-mark="claude"] { -webkit-mask-image: url('/assets/img/app/marks/claude.svg'); mask-image: url('/assets/img/app/marks/claude.svg'); }
.app-frame .mark-mono[data-mark="grok"] { -webkit-mask-image: url('/assets/img/app/marks/grok.svg'); mask-image: url('/assets/img/app/marks/grok.svg'); }
.app-frame .mark-mono[data-mark="openai"] { -webkit-mask-image: url('/assets/img/app/marks/openai.svg'); mask-image: url('/assets/img/app/marks/openai.svg'); }
.app-frame .mark-mono[data-mark="codex"] { -webkit-mask-image: url('/assets/img/app/marks/codex.svg'); mask-image: url('/assets/img/app/marks/codex.svg'); }
.app-frame .mark-mono[data-mark="github"] { -webkit-mask-image: url('/assets/img/app/marks/github.svg'); mask-image: url('/assets/img/app/marks/github.svg'); }
