/* App previews on the website. These rules restate the app's Focus and Command styles (web/src/styles.css and
   web/src/workspace.css) under .appui so the website draws the same shell, rows, cards, chips and bubbles as the
   product. Tokens only. The content is sample data and is hidden from assistive technology; each view carries a
   short text description instead. */
.appui { font: .9375rem/1.5 var(--font); color: var(--ink); text-align: left; background: var(--bg); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.appui .ui-icon { vertical-align: -0.2em; }
.appbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.appbar i { width: 9px; height: 9px; background: var(--rule-strong); flex: none; }
.appbar i + i { margin-left: -6px; }
.appbar .url { flex: 1; min-width: 0; max-width: 420px; margin: 0 auto; padding: 3px 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: .8125rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbody { display: grid; grid-template-columns: 224px minmax(0, 1fr); height: 690px; }
.appui.solo .appbody { grid-template-columns: minmax(0, 1fr); height: auto; }

/* Sidebar */
.appnav { background: var(--sunk); border-right: 1px solid var(--line); padding: 20px 10px 14px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.appbrand { display: flex; align-items: center; gap: 12px; padding: 0 8px 14px; font-weight: 500; font-size: 1rem; letter-spacing: -.025em; line-height: 1.3; }
.appbrand img { width: 28px; height: 28px; }
.appbrand small { display: block; font-weight: 400; letter-spacing: 0; color: var(--muted); font-size: .8125rem; }
.appui .navhead { display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: 30px; font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.appui .navhead .ui-icon { width: 14px; height: 14px; }
.appui .navhead .count { margin-left: auto; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.appui .navitem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 10px; color: var(--muted); cursor: pointer; }
.appui .navitem:hover { background: var(--panel); color: var(--ink); }
.appui .navitem.on { color: var(--accent); background: var(--sel); font-weight: 600; }
.appui .navitem .count { margin-left: auto; font-size: .8125rem; color: var(--accent); }
.appui .navfoot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.appui .chipbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); min-height: 32px; padding: 5px 9px; font-size: .75rem; color: var(--muted); }

/* Views */
.appview:focus-visible { outline-offset: -2px; }
.appview { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.appview.mail { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); }
.appui .list { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.appui .listhead { min-height: 88px; padding: 20px 24px; background: var(--panel); display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.appui .listhead > div:first-child { min-width: 0; margin-right: auto; }
.appui .listhead .h { font-size: 1.625rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.3; }
.appui .sub, .appui .note { font-size: .8125rem; color: var(--muted); }
.appui .listhead .sub { margin-top: 4px; }
.appui .accts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.appui .accts > span, .appui .accts > button, .appui .chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); min-height: 34px; padding: 6px 10px; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.appui .accts > .on, .appui .chip.on { background: var(--sel); color: var(--accent); border-color: var(--sel); font-weight: 600; }
.appui .dot { width: 8px; height: 8px; flex: none; display: inline-block; }
.appui .acme { background: var(--acct-acme); } .appui .bakery { background: var(--acct-bakery); } .appui .consult { background: var(--acct-consult); }
.appui .tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); min-height: 36px; padding: 8px 12px; font-size: .875rem; white-space: nowrap; }
.appui .tbtn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.appui .rows { flex: 1; overflow: hidden; }
.appui .row { display: grid; grid-template-columns: 8px 1fr auto; gap: 5px 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.appui .row.on { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.appui .row .dot { margin-top: 7px; }
.appui .row .from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.appui .row.unread .from::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.appui .row .time { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.appui .row .subj, .appui .row .gist, .appui .row .aitag { grid-column: 2 / 4; min-width: 0; }
.appui .row .subj, .appui .row .gist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appui .row .gist { font-size: .8125rem; color: var(--muted); }
.appui .row .aitag { display: flex; gap: 6px; flex-wrap: wrap; }
.appui .tag { display: inline-flex; align-items: center; gap: 4px; border: 0; font-size: .75rem; font-weight: 400; letter-spacing: 0; text-transform: none; padding: 3px 8px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.appui .tag .ui-icon { width: 12px; height: 12px; }
.appui .tag.suggest { background: var(--accent-soft); color: var(--accent); }
.appui .tag.reply { background: var(--reply-soft); color: var(--reply); }
.appui .tag.draft { background: var(--ok-soft); color: var(--ok); }

.appui .thread { min-width: 0; overflow: hidden; }
.appui .tinner { width: 100%; max-width: 840px; margin: 0 auto; padding: 28px 32px 32px; display: grid; gap: 16px; align-content: start; }
.appui .tbar { display: flex; gap: 6px; flex-wrap: wrap; }
.appui .thread .h { font-size: 1.875rem; line-height: 1.2; font-weight: 500; letter-spacing: -.04em; }
.appui .who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8125rem; flex-wrap: wrap; }
.appui .acctpill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; border: 1px solid var(--line); padding: 3px 8px; }
.appui .card { border: 1px solid var(--line); background: var(--panel); padding: 20px; min-width: 0; }
.appui .card .ch { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; letter-spacing: -.015em; margin-bottom: 12px; }
.appui .avatar { width: 32px; height: 32px; flex: none; border: 1px solid var(--line); background: var(--sel); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: .75rem; }
.appui .who strong { color: var(--ink); font-size: .9375rem; }
.appui .who .when { margin-left: auto; }
.appui .msg { margin-top: 14px; font-size: 1rem; line-height: 1.7; max-width: 65ch; }
.appui .aisug { border-color: var(--rule-strong); background: var(--sel); }
.appui .airow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.appui .airow > span:first-child { margin-right: auto; }
.appui .aibtns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.appui .draftbox { border: 1px solid var(--line); background: var(--sunk); padding: 10px 12px; font-size: .9375rem; line-height: 1.7; }
.appui .confirm { margin-top: 10px; padding: 10px 12px; background: var(--sunk); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8125rem; }
.appui .confirm > span:first-child { margin-right: auto; }

/* Assistant */
.appui .chat { flex: 1; min-height: 0; overflow: hidden; padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.appui .bubble { max-width: min(680px, 88%); padding: 10px 14px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 4px; overflow-wrap: anywhere; align-self: flex-start; }
.appui .bubble.user { align-self: flex-end; background: var(--sel); border-color: var(--rule-strong); }
.appui .bubble ul { margin: 2px 0; padding-left: 18px; display: grid; gap: 2px; }
.appui .approval { border-color: var(--reply); display: grid; gap: 8px; max-width: min(680px, 100%); }
.appui .approval strong { color: var(--reply); }
.appui .approvaltext { background: var(--sunk); border: 1px solid var(--line); padding: 10px 12px; font-size: .875rem; }
.appui .composer { display: flex; gap: 8px; align-items: flex-end; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--bg); }
.appui .composer .input { flex: 1; min-height: 44px; border: 1px solid var(--line); background: var(--sunk); color: var(--faint); padding: 10px 12px; font-size: 1rem; }
.appui .iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); flex: none; }
.appui .iconbtn .ui-icon { width: 20px; height: 20px; }
.appui .iconbtn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.appui .typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.appui .typing i { width: 6px; height: 6px; background: var(--faint); animation: appui-pulse 1s infinite; }
.appui .typing i:nth-child(2) { animation-delay: .15s; } .appui .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes appui-pulse { 50% { opacity: .35; } }

/* Tasks (Command density) */
.appui .scroll { flex: 1; min-height: 0; overflow: hidden; }
.appui .srchead { display: flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; }
.appui .tasklist { background: var(--panel); border: 1px solid var(--line); padding: 4px 16px; display: grid; }
.appui .taskline { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.appui .taskline:last-child { border-bottom: 0; }
.appui .box { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--rule-strong); background: var(--panel); display: grid; place-items: center; }
.appui .taskline.done .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.appui .box .ui-icon { width: 13px; height: 13px; }
.appui .tasktitle { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .875rem; }
.appui .tasktitle .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appui .taskline.done .tasktitle > span:first-child { text-decoration: line-through; color: var(--faint); }

/* Meetings (Focus list and detail) */
.appui .focus-workspace { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.appui .focus-list { background: var(--panel); border: 1px solid var(--line); padding: 8px; min-width: 0; }
.appui .meeting-choice { display: flex; align-items: flex-start; gap: 12px; padding: 16px 12px; }
.appui .meeting-choice.on { background: var(--sel); }
.appui .meeting-choice > span:last-child { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.appui .meeting-date { display: grid; text-align: center; min-width: 38px; color: var(--muted); font-size: .75rem; }
.appui .meeting-date b { font-size: 1.5rem; color: var(--ink); font-weight: 500; line-height: 1.2; }
.appui .focus-detail { min-width: 0; background: var(--panel); border: 1px solid var(--line); padding: 24px; display: grid; gap: 12px; }
.appui .focus-detail .h { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; }
.appui .focus-detail .ch { font-size: 1rem; font-weight: 600; margin-top: 8px; }
.appui .actionline { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.appui .actionline > span:first-child { margin-right: auto; display: grid; }
.appui .disclosure { color: var(--accent); font-weight: 500; }

/* The preview follows the app's own breakpoints: the sidebar leaves first, then one pane at a time. */
@media (max-width: 1080px) { .appbody { grid-template-columns: minmax(0, 1fr); } .appnav { display: none; } }
@media (max-width: 720px) {
  .appbody { height: auto; }
  .appview.mail { max-height: 600px; }
  .appui .taskline .tasktitle { flex: 1 1 calc(100% - 40px); }
  .appui .taskline > .tag { margin-left: 28px; }
  .appui .taskline > .tag ~ .tag { margin-left: 0; }
  .appview.mail { grid-template-columns: minmax(0, 1fr); }
  .appview.mail .thread { display: none; }
  .appui .list { border-right: 0; }
  .appui .listhead { padding: 16px; min-height: 80px; flex-wrap: wrap; }
  .appui .listhead .h { font-size: 1.5rem; }
  .appui .accts { padding: 12px 16px; flex-wrap: nowrap; overflow: hidden; }
  .appui .row { padding: 14px 16px; }
  .appui .tinner { padding: 20px 16px 24px; }
  .appui .chat, .appui .composer { padding-left: 16px; padding-right: 16px; }
  .appui .focus-workspace { grid-template-columns: minmax(0, 1fr); }
  .appui .focus-list { display: none; }
  .appui .card, .appui .focus-detail { padding: 16px; }
  .appui .hide-phone { display: none; }
  .appbar .url { font-size: .75rem; }
}
.symbol-mic { --symbol: url("./icons/mic.svg"); }
.symbol-settings { --symbol: url("./icons/settings.svg"); }
.symbol-check { --symbol: url("./icons/check.svg"); }
.symbol-chevron-right { --symbol: url("./icons/chevron-right.svg"); }
.symbol-chevron-down { --symbol: url("./icons/chevron-down.svg"); }
.symbol-memory { --symbol: url("./icons/memory.svg"); }
.symbol-logout { --symbol: url("./icons/logout.svg"); }
.appui .bubbleset { display: flex; flex-direction: column; gap: 10px; }
.appui .bubbleset[hidden] { display: none; }
.appui.solo .chat { min-height: 300px; }
.appui .tinner.wide { max-width: 1040px; }
.appui .navhead.flush { padding: 0; }

/* Sample controls that respond are real buttons, drawn like the app's own. */
.appui button { margin: 0; border-radius: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.appui button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.appui .accts > button, .appui .chip { background: var(--panel); }
.appui .accts > button:hover, .appui .chip:hover, .appui button.tbtn:hover { border-color: var(--rule-strong); color: var(--ink); }
.appui button.tbtn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.appui button.row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); }
.appui button.row:hover { background: var(--sunk); }
.appui button.row.on { background: var(--sel); }
.appui button.meeting-choice { width: 100%; background: none; border: 0; }
.appui button.meeting-choice:hover { background: var(--sunk); }
.appui button.meeting-choice.on { background: var(--sel); }
.appui .check { width: 44px; height: 44px; margin: -13px; flex: none; display: grid; place-items: center; background: none; border: 0; }
.appui .box .ui-icon { visibility: hidden; }
.appui .taskline.done .box .ui-icon { visibility: visible; }
.appui .donetag { display: none; }
.appui .taskline.done .donetag { display: inline-flex; }
.appui .asks { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; background: var(--bg); }
.appui .chip { display: inline-flex; align-items: center; border: 1px solid var(--line); min-height: 36px; padding: 6px 12px; font-size: .8125rem; color: var(--muted); }
.appui .confirm .ui-icon, .appui .airow .ui-icon, .appui .approval .note .ui-icon { color: var(--ok); }
.appui [data-when]:focus-visible { outline-offset: 2px; }
.appui .backbtn, .appui .backrow { display: none; }
.appui .focus-detail .backrow { margin-bottom: 4px; }
.symbol-chevron-left { --symbol: url("./icons/chevron-right.svg"); transform: scaleX(-1); }
@media (max-width: 720px) {
  .appui button.tbtn, .appui .accts > button, .appui .chip { min-height: 44px; }
  .appui .accts[role="group"] { overflow-x: auto; scrollbar-width: none; }
  .appui .accts > button { flex: none; }
  .appui .backbtn { display: inline-flex; }
  .appui .backrow { display: block; }
  .appview.mail[data-pane="detail"] { max-height: none; }
  .appview.mail[data-pane="detail"] .list { display: none; }
  .appview.mail[data-pane="detail"] .thread { display: block; }
  .appview.meet[data-pane="list"] .focus-list { display: block; }
  .appview.meet[data-pane="list"] .focus-detail { display: none; }
  .appui .asks { padding: 0 16px 12px; }
}
