  /* ---------- the sign-in pages: the form is the one raised thing; the rest steps back ---------- */
  .onboard-view .signup-layout > .login-card, #link-view > .login-card {   /* and Confirm your email (from the email's link) */
    border: 1px solid var(--border); border-top: 4px solid #3b5bab;   /* the banner's blue, from its right end (Ask Sum 1 in the middle takes its green) */
  }
  #link-view > .login-card { box-shadow: 0 18px 40px -18px rgba(20, 40, 60, .35), 0 2px 6px rgba(20, 40, 60, .06); position: relative; z-index: 1; }   /* alone on its page: the one raised thing */
  /* 2.80.11 (owner 2026-11-13): three steps of depth on the landing page: every card a quarter lift, the second row's middle card (the
     views) half, Ask Sum 1 full. The Important notice stays flat (a notice, not a card). The Studio's own pages are untouched. */
  .onboard-view .intro-card, .onboard-view .signup-layout > .login-card, .onboard-view .showcase, .onboard-view .trends-card, .onboard-view .quote-card, .onboard-view .project-card {
    box-shadow: 0 5px 10px -5px rgba(20, 40, 60, .09), 0 1px 2px rgba(20, 40, 60, .03);
    position: relative; z-index: 1;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .onboard-view .intro-card, :root:not([data-theme="light"]) .onboard-view .signup-layout > .login-card, :root:not([data-theme="light"]) .onboard-view .showcase, :root:not([data-theme="light"]) .onboard-view .trends-card, :root:not([data-theme="light"]) .onboard-view .quote-card, :root:not([data-theme="light"]) .onboard-view .project-card { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent), 0 5px 12px -4px rgba(0, 0, 0, .18); } }
  :root[data-theme="dark"] .onboard-view .intro-card, :root[data-theme="dark"] .onboard-view .signup-layout > .login-card, :root[data-theme="dark"] .onboard-view .showcase, :root[data-theme="dark"] .onboard-view .trends-card, :root[data-theme="dark"] .onboard-view .quote-card, :root[data-theme="dark"] .onboard-view .project-card { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent), 0 5px 12px -4px rgba(0, 0, 0, .18); }
  .page:not(.in-studio) .notice-head, .page:not(.in-studio) .site-banner {   /* 2.80.12 (owner 2026-11-13): the roof (the notice, the banner) at the half step; both sit outside the landing block, so the handle is "not in the Studio" */
    box-shadow: 0 9px 20px -9px rgba(20, 40, 60, .18), 0 1px 3px rgba(20, 40, 60, .04);
    position: relative; z-index: 1;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page:not(.in-studio) .notice-head, :root:not([data-theme="light"]) .page:not(.in-studio) .site-banner { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent), 0 10px 25px -8px rgba(0, 0, 0, .35); } }
  :root[data-theme="dark"] .page:not(.in-studio) .notice-head, :root[data-theme="dark"] .page:not(.in-studio) .site-banner { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent), 0 10px 25px -8px rgba(0, 0, 0, .35); }
  .onboard-view .lobby-mid {   /* the half step */
    box-shadow: 0 9px 20px -9px rgba(20, 40, 60, .18), 0 1px 3px rgba(20, 40, 60, .04);
    position: relative; z-index: 1;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .onboard-view .lobby-mid { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent), 0 10px 25px -8px rgba(0, 0, 0, .35); } }
  :root[data-theme="dark"] .onboard-view .lobby-mid { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent), 0 10px 25px -8px rgba(0, 0, 0, .35); }
  .onboard-view .ask-guest {   /* 2.80.10 (owner 2026-11-13): the one raised thing on the landing page is the middle card, Ask Sum 1; the form sits flat on the right */
    box-shadow: 0 18px 40px -18px rgba(20, 40, 60, .35), 0 2px 6px rgba(20, 40, 60, .06);
    position: relative; z-index: 1;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .onboard-view .ask-guest { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 20px 50px -16px rgba(0, 0, 0, .7); } }
  :root[data-theme="dark"] .onboard-view .ask-guest { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 20px 50px -16px rgba(0, 0, 0, .7); }
  .onboard-view .signup-layout > .login-card h2 { font-size: 22px; }
  .onboard-view #login-form h2, .onboard-view #home-card h2 { font-size: 19px; }   /* the top row's headings, all 19px */
  .onboard-view #login-form, .onboard-view #home-card { padding-top: 16px; box-sizing: border-box; }   /* and You're signed in (2.80.15): the top row's headings on one line */
  .onboard-view #home-card .signin-lead { margin-top: -7px; }   /* "as ..." (2.80.16): on one line with the top row's other second lines (the card's parts are 14px apart) */
  /* 2.80.16 (owner 2026-11-18): the You're signed in card in line with the top row's other two, which are not changed: as tall,
     its rows in a blue box level with the video and Ask Sum 1's answer box, Back to the Studio level with Send (40px, as Send),
     Sign out at the bottom with the other two cards' last links */
  .onboard-view #home-card { align-self: stretch; padding-bottom: 14px; }
  .onboard-view #home-card .home-rows { border: 1px solid #3b5bab; border-radius: 10px; padding: 8px 12px; margin: -5px 0 0; box-sizing: border-box; flex-shrink: 0; }   /* its height: Ask Sum 1's answer box's (05-landing.js, 2.80.17) */
  .home-line { border-top: 1px solid var(--border); margin-top: -4px; }   /* 2.80.17: under Back to the Studio, level with the line under Ask Sum 1's Send */
  .onboard-view #home-card #home-back { height: 40px; box-sizing: border-box; margin-top: -4px; }
  .onboard-view #home-card .login-new { margin-top: auto; }
  .onboard-view .signup-layout > .login-card .btn-primary { width: 100%; padding: 12px 18px; font-size: 14.5px; background: #3b5bab; color: #fff; }
  .onboard-view .signup-layout > .login-card .btn-primary:hover:not(:disabled) { background: #2f4a8f; }
  .onboard-view .signup-layout > .login-card input:focus { outline-color: #3b5bab; border-color: #3b5bab; box-shadow: 0 0 0 3px rgba(59, 91, 171, .18); }
  .onboard-view .signup-layout > .login-card .link-btn, .onboard-view .signup-layout > .login-card a { color: #3b5bab; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .onboard-view .signup-layout > .login-card .link-btn, :root:not([data-theme="light"]) .onboard-view .signup-layout > .login-card a { color: #9db8f2; } }
  :root[data-theme="dark"] .onboard-view .signup-layout > .login-card .link-btn, :root[data-theme="dark"] .onboard-view .signup-layout > .login-card a { color: #9db8f2; }
  :root:not([data-google]) .onboard-view .signup-layout > .login-card a.btn-google { color: #1f1f1f; }   /* Google's button keeps its own dark text, in both themes */
  .page:not(.in-studio) .notice-body { background: var(--surface); }   /* white like the boxes beside it; the amber edge ties it to the Important notice */
  /* One standard for the sign-in pages' boxes (rows 2 and 3, every column):
     padding 14/16; the heading (.lobby-h, 15px) then 8px, then the small-capitals
     label (10.5px, .06em); reading text 12.5px at 1.5 in the text colour;
     dates and sources 11.5px. */
  #showcase, #trends-card, #connect-card, #lobby-mid, #project-card, #quote-card { padding: 14px 16px; }
  .page:not(.in-studio) .service-group-label, .page:not(.in-studio) .pmap .sub { font-size: 10.5px; letter-spacing: .06em; }
  .page:not(.in-studio) .showcase > div:nth-of-type(1) .service-group-label { margin-top: 0; }
  /* 12px from a small-capital label to the boxes under it (the tiles, the client), which reads like the space above About's text */
  .page:not(.in-studio) .showcase .tile-grid { margin-top: 12px; }
  .page:not(.in-studio) .lobby-mid .pmap .sub { margin-bottom: 8px; }   /* + the first layer's 4px: 12px to the UI box, as under Front stage and Back stage */
  .page:not(.in-studio) .trends-head { margin-bottom: 8px; }
  .page:not(.in-studio) .trends-card .trends-label, .page:not(.in-studio) .project-card .project-label { margin: 0 0 8px; }
  .page:not(.in-studio) .trends-card .pod-label { margin-top: 12px; }
  /* Gold headings and dividers for leaders, news and podcasts. */
  .trends-card .trends-label { display: flex; align-items: center; gap: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--trend-news-line); color: var(--trend-news); }
  .trends-card .trends-label.pod-label { border-bottom-color: var(--trend-pod-line); color: var(--trend-pod); }

  /* Arena leaders stay visible; headlines take the remaining column space. */
  #leaders-block[hidden] { display: none; }
  #leaders-block > :not(.leaders-footer), #leaders-block .leaders-credit { position: relative; top: 4px; }
  .leaders-group-head { display: flex; justify-content: space-between; gap: 8px; margin: 10px 0 3px;
    color: var(--text-faint); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .leaders-group-head span:last-child { white-space: nowrap; }
  .leaders-list { list-style: none; margin: 0; padding: 0; }
  .leaders-row { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 6px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
  .leaders-position { color: var(--text-faint); font-weight: 600; }
  .leaders-model { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
  .leaders-model strong { font-weight: 600; }
  .leaders-maker { color: var(--text-faint); margin-left: 5px; font-size: 11.5px; }
  .leaders-rank { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .leaders-bar { display: inline-block; width: 75%; height: 9px; border-radius: 5px; background: var(--surface-alt); }
  .leaders-placeholder::after { content: none; }
  .leaders-row:focus-visible { outline: 2px solid var(--ui-blue); outline-offset: 2px; }
  .leaders-row::after { content: attr(data-tooltip); display: none; position: absolute; z-index: 5;
    left: 16px; right: 0; top: 100%; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 11.5px; }
  .leaders-row:hover::after, .leaders-row:focus::after { display: block; }
  .leaders-footer { display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    margin-top: 9px; font-size: 11.5px; color: var(--text-faint); }
  .leaders-footer a { color: var(--ui-blue); font-weight: 600; white-space: nowrap; text-decoration: none; }
  .leaders-footer #leaders-source { align-self: flex-end; }
  .leaders-footer a.leaders-credit { color: var(--text-faint); font-weight: 400; white-space: normal; }
  .leaders-footer a:hover { text-decoration: underline; }
  .page:not(.in-studio) .trends-card .pod-label { margin-top: 28px; }
  .page:not(.in-studio) #leaders-block:not([hidden]) + .trends-label { margin-top: 36px; }

  .trends-card .trends-label svg { width: 14px; height: 14px; flex-shrink: 0; }
  .trends-card .trends-label .trends-upd { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
  .page:not(.in-studio) .project-card #project-about + .project-label, .page:not(.in-studio) .project-card .comments-label { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
  .page:not(.in-studio) .notice-body { font-size: 12.5px; line-height: 1.5; color: var(--text); }
  .page:not(.in-studio) .trends-list a { font-size: 12.5px; line-height: 1.5; font-weight: 500; }
  .page:not(.in-studio) .comment-list li, .page:not(.in-studio) .connect-card p, .page:not(.in-studio) .quote-card .showcase-quote p,
  .page:not(.in-studio) .intro-card .intro-words, .page:not(.in-studio) .ask-guest .ag-sub { line-height: 1.5; }
  .doc-list { display: flex; flex-direction: column; gap: 6px; }
  /* Ask my documents: what a question searches, above the answer */
  .rag-searching { font-size: 12.5px; }
  .rag-searching .rs-list li .n.open { background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
  /* The document page (My documents > a document) */
  .docview-title { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--text); overflow-wrap: anywhere; }
  .docview-meta { margin: 2px 0 12px; }
  .docview-tabs { margin-bottom: 12px; max-width: 420px; }
  .docview-frame { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
  .docview-img { max-width: 100%; max-height: 75vh; border-radius: 10px; display: block; margin: 0 auto; }
  .docview-none { padding: 18px; border-radius: 10px; background: var(--surface-alt); color: var(--text-muted); font-size: 13px; }
  .docview-find { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
  .docview-find input { flex: 1; max-width: 360px; }
  .docview-passages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .docview-passages li { padding: 10px 12px; border-radius: 10px; background: var(--surface-alt); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
  .docview-passages li .pg { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 600; margin-bottom: 4px; white-space: normal; }
  .docview-passages mark { background: #fbe39b; color: inherit; border-radius: 2px; }
  .searching-dialog { max-width: 560px; }
  .rag-searching .rs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: calc(min(70vh, 640px) - 150px); }
  .rag-searching .rs-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--surface-alt); }
  .rag-searching .rs-list li .n { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
  .rag-searching .rs-list li .w { flex: none; font-size: 11.5px; color: var(--text-faint); }
  .rag-searching .rs-list li.reading .n { color: var(--text-muted); }
  @media (max-width: 560px) { .rag-searching .rs-list li { flex-wrap: wrap; } .rag-searching .rs-list li .w { flex-basis: 100%; padding-left: 22px; } }
  .rag-searching .rs-list li.failed .n, .rag-searching .rs-list li.failed .w { color: var(--error); }
  .rag-searching .rs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; color: var(--text-muted); font-weight: 600; }
  .rag-searching .rs-head .link-btn { font-size: 12.5px; font-weight: 500; }
  .rag-searching .rs-shared { margin-top: 10px; color: var(--text-muted); }
  .rag-searching .rs-none { color: var(--text-muted); font-style: italic; }
  .doc-row {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt);
  }
  .doc-row .name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .doc-row .doc-name-open { display: block; max-width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
  .doc-row .sub { font-size: 11.5px; color: var(--text-faint); }
  .doc-row .err { grid-column: 1 / -1; font-size: 11.5px; color: var(--error); }
  .doc-row .del { border: none; background: none; color: var(--text-faint); cursor: pointer; font-size: 16px; padding: 0 4px; }
  .doc-row .del:hover { color: var(--error); }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip {
    border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted);
    border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer;
  }
  .chip:hover { border-color: var(--accent); color: var(--accent-strong); }
  .empty-note { font-size: 12.5px; color: var(--text-faint); font-style: italic; }

  .output-stage {
    min-height: 340px; border-radius: 12px; background: var(--surface-alt); border: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px;
  }
  .output-stage img { max-width: 100%; max-height: 520px; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); }
  .stage-caption { font-size: 12px; color: var(--text-faint); text-align: center; max-width: 420px; }
  .stage-empty { color: var(--text-faint); font-size: 13px; text-align: center; max-width: 280px; }

  .result-card {
    background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px;
    padding: 18px; display: flex; flex-direction: column; gap: 12px;
  }
  .result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
  .result-head > .panel-title { flex: none; }
  .result-head > .btn-ghost, .result-head > .result-actions { flex: none; }
  /* what a result came from: a small label that shortens to fit, so the buttons stay inside */
  .result-chip { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--text-muted); }
  .result-text.md { white-space: normal; line-height: 1.6; font-size: 14px; }
  .result-text.md > :first-child { margin-top: 0; }
  .result-text.md p { margin: 0 0 9px; } .result-text.md ul, .result-text.md ol { margin: 0 0 9px; padding-left: 20px; }
  .result-text.md h1, .result-text.md h2, .result-text.md h3 { font-size: 14.5px; margin: 12px 0 4px; }
  .result-text.md code { font: 12.5px ui-monospace, Menlo, monospace; background: var(--surface); border-radius: 4px; padding: 0 4px; }
  .result-card { min-width: 0; }
  .result-head.wrap { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .result-head.wrap .btn-ghost { padding: 7px 9px; }
  .result-head.wrap [data-needs] { margin-right: auto; }
  .result-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  /* Your profile (My settings page) */
  #login-error.farewell { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
  .account-panel { margin-top: 14px; }
  .account-who { font-size: 13.5px; color: var(--text-muted); }
  .account-who b { color: var(--text); }
  /* Delete my account: meant to look as serious as it is */
  .password-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--border); border-radius: 12px; }
  .password-row b { font-size: 14.5px; }
  .password-row p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-muted); max-width: 540px; }
  .password-form { display: grid; gap: 10px; max-width: 420px; padding: 12px 14px; margin: -4px 0 12px; border: 1px solid var(--border); border-radius: 12px; }
  .password-form .hint { margin: 0; }
  .password-form .actions { align-items: center; }
  .password-form .actions .run-row { margin-top: 0; }   /* the Stop wrapper every submit button gets: no gap above Save here */
  .password-form .actions button { padding: 11px 18px; font-size: 13.5px; line-height: 1.2; margin: 0; border: 1px solid transparent; }
  .password-form .actions .btn-ghost { border-color: var(--border-strong); }   /* Cancel as tall as Save new password */
  .password-form.em-flow { max-width: none; margin: 14px 0 0; } .em-flow .field { max-width: 420px; }
  .em-flow .field > label { display: flex; flex-direction: column; gap: 6px; }   /* the Email steps put the input inside its label */
  #password-row .password-done { margin: 10px 0 0; }
  .password-done { margin: -4px 0 12px; font-size: 13px; font-weight: 600; color: var(--accent-strong); }
  @media (max-width: 640px) { .password-row { flex-direction: column; align-items: flex-start; } }
  .danger-zone { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
    padding: 14px 16px; border: 1.5px solid var(--error); border-left-width: 6px; border-radius: 10px; background: var(--error-soft); }
  .danger-icon, .delete-banner span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--error); color: #fff; font-weight: 800; font-size: 17px; flex-shrink: 0; }
  .danger-label { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--error); }
  .danger-zone b { font-size: 14.5px; color: var(--error); }
  .danger-zone p { margin: 3px 0 0; font-size: 12.5px; color: var(--text); max-width: 540px; }
  .danger-zone .danger-alt { color: var(--text-muted); }
  #account-danger { margin-top: 12px; }   /* under Delete all my data */
  /* Your profile's Email row: the primary, and the second email with what can be done with it */
  .email-row { align-items: flex-start; } .email-main { flex: 1; min-width: 0; }
  .em-grid { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; margin-top: 10px; }
  .em-k { font-size: 12.5px; color: var(--text-muted); } .em-v { font-size: 14px; overflow-wrap: anywhere; }
  .em-v .em-tag { font-size: 12px; color: var(--accent-strong); margin-left: 6px; } .em-v .em-tag.wait { color: #b26a00; }
  .em-none { color: var(--text-muted); font-size: 13px; }
  .em-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
  .em-note { grid-column: 2 / -1; font-size: 12.5px; color: var(--text-muted); margin-top: -2px; }
  .em-flow { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt); }
  .em-flow.em-danger { border-color: color-mix(in srgb, var(--error) 45%, transparent); background: var(--error-soft); }
  .em-flow p { margin: 0; } .em-flow-title { font-size: 14px; } .em-flow .field { margin: 0; }
  .em-flow-acts { justify-content: flex-end; flex-wrap: wrap; margin: 0; }
  .em-note-inline { font-size: 12.5px; color: var(--text-muted); } .em-ok { font-size: 13px; color: var(--accent-strong); }
  /* the steps of a change of email: done (a tick), now, still to come */
  .em-steps { display: flex; gap: 6px 18px; flex-wrap: wrap; list-style: none; margin: 0 0 2px; padding: 0; font-size: 12.5px; color: var(--text-muted); }
  .em-steps li { display: flex; align-items: center; gap: 6px; } .em-steps li.now { color: var(--text); font-weight: 600; } .em-steps li.done { color: var(--accent-strong); }
  .em-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 11px; font-weight: 700; }
  .em-steps li.now .em-dot { background: var(--accent); border-color: var(--accent); color: #fff; } .em-steps li.done .em-dot { background: var(--accent-soft); }
  @media (max-width: 640px) { .em-grid { grid-template-columns: 70px minmax(0, 1fr); } .em-acts { grid-column: 1 / -1; justify-content: flex-start; } }
  #data-danger, #data-delete-form { --error: var(--danger-soft-ink); --error-soft: var(--danger-soft-bg); }   /* the lighter red */
  #account-danger, #account-delete-form { --error: var(--danger-deep-ink); --error-soft: var(--danger-deep-bg); }   /* the darker red */
  .btn-danger-outline { border: 1.5px solid var(--error); border-radius: 9px; padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--surface); color: var(--error); font-family: inherit; white-space: nowrap; }
  .btn-danger-outline:hover { background: var(--error); color: #fff; }
  @media (max-width: 640px) { .danger-zone { grid-template-columns: auto minmax(0, 1fr); } .danger-zone .btn-danger-outline { grid-column: 1 / -1; } }
  .delete-banner { display: flex; align-items: center; gap: 10px; margin: -14px -14px 4px; padding: 10px 14px; border-radius: 9px 9px 0 0; background: var(--error); color: #fff; font-weight: 700; font-size: 14px; }
  .delete-banner span { background: #fff; color: var(--error); width: 24px; height: 24px; font-size: 14px; }
  .delete-understand { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 600; }
  .delete-understand input { margin-top: 3px; }
  .delete-confirm { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--error); border-radius: 10px; background: var(--error-soft); }
  .delete-title { margin: 0; font-weight: 600; font-size: 14px; }
  .delete-list { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.7; }
  .tra-langs { grid-column:1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
  .tra-langs #tra-swap { align-self: stretch; margin: 0; padding: 0 14px; font-size: 18px; }   /* the label row and the dropdown row: level with both */
  .keep-toggle { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
  .mine-list { display: grid; gap: 8px; }
  .mine-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2, transparent); }
  .mine-row .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mine-row .m { font-size: 12px; color: var(--text-muted); }
  .mine-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; grid-row: span 2; }
  button.mine-row.home-item { text-align: left; font: inherit; color: inherit; cursor: pointer; grid-template-columns: 1fr; }
  button.mine-row.home-item:hover { border-color: var(--accent); }
  .mine-row .full { grid-column: 1 / -1; font-size: 13px; white-space: pre-wrap; }
  .mine-row audio { grid-column: 1 / -1; width: 100%; }
  /* tick boxes on the Yours lists, like My images */
  .sel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .sel-head .gallery-all { margin-left: 0; }
  .sel-head .gallery-selbar { margin: 0; flex: 1; }
  .pick-box { display: grid; place-items: center; align-self: center; cursor: pointer; }
  .pick-box input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--accent); }
  .mine-row.selectable { grid-template-columns: auto minmax(0, 1fr) auto; }
  .mine-row.selectable > .pick-box { grid-row: span 2; }
  .mine-row.picked, .draft-row.picked .draft-item, .doc-row.picked { border-color: var(--accent); }
  .doc-row.in-mydocs { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .doc-title-status { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-width: 0; }
  .doc-title-status .name { min-width: 0; }
  .doc-title-status .status { flex-shrink: 0; }
  #mydocs-slot #docs-drop, #mydocs-slot #docs-drop + button, #mydocs-slot #docs-panel > .hint { display: none; }
  #mydocs-slot #docs-list { max-height: 416px; overflow-y: auto; gap: 0; }
  #mydocs-slot .doc-row { min-height: 52px; box-sizing: border-box; border-radius: 0; padding: 6px 10px; }
  #drafts-body .draft-list { max-height: 416px; overflow-y: auto; gap: 0; }
  #drafts-body .draft-row { min-height: 52px; }
  #folder-list .folder-row .acts { flex-wrap: wrap; justify-content: flex-end; }
  @media (max-width: 640px) { .folder-search-row { flex-wrap: wrap; } .folder-search-row input { flex-basis: 100%; } }
  #drafts-body .draft-item .pv { display: none; }
  #drafts-body .draft-item { min-height: 52px; padding: 6px 10px; }
  #folder-upload-dialog { width: min(520px, calc(100vw - 40px)); }
  .folder-upload-picker { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  #folder-upload-dialog #folder-upload-close,
  #folder-upload-dialog #folder-upload-choose,
  #folder-upload-dialog #folder-upload-submit { width: 112px; height: 40px; padding: 0 12px; box-sizing: border-box; font-size: 13px; font-weight: 600; border-radius: 8px; text-align: center; margin-left: auto; display: block; }
  #folder-upload-choose { align-self: flex-end; }
  #folder-upload-dialog #folder-upload-choose { background: #2563eb; color: #fff; border: 1px solid #2563eb; }
  #folder-upload-dialog #folder-upload-choose:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
  #folder-upload-dialog #folder-upload-submit { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
  #folder-upload-names { width: 100%; min-height: 82px; box-sizing: border-box; resize: none; overflow-y: auto; }
  @media (max-width: 640px) { #mydocs-slot #docs-list, #drafts-body .draft-list { max-height: 480px; } }
  .draft-row > .pick-box { padding: 0 2px; }
  .mine-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-weight: 600; margin: 14px 0 6px; }
  .btn-danger-solid { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--error); color: #fff; font-family: inherit; }
  .btn-danger-solid:disabled { opacity: .45; cursor: not-allowed; }
  .busy-row { display: flex; gap: 8px; }
  /* My folder page */
  .folder-intro { margin: 2px 0 12px; }
  .folder-tools { display: flex; flex-direction: column; gap: 12px; align-items: stretch; margin-bottom: 12px; }
  .folder-search-row { display: flex; gap: 8px; align-items: center; }
  .folder-search-row input { min-width: 0; }
  .folder-search-row button { flex-shrink: 0; }
  .folder-tools .segmented { flex: 0 1 auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .folder-tools .segmented button { white-space: nowrap; flex: 0 0 auto; padding-left: 12px; padding-right: 12px; }
  .folder-tools .segmented .n { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--text-faint); }
  .folder-tools .segmented .active .n { color: var(--accent-strong); }
  .folder-tools input[type=search] { flex: 1; min-width: 0; width: 100%; }
  .folder-list { display: flex; flex-direction: column; max-height: 416px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
  #folder-list > .folder-row { flex-shrink: 0; box-sizing: border-box; height: 52px; padding: 6px 12px; }
  #folder-list .folder-row .icon { height: 36px; }
  @media (max-width: 640px) {
    #folder-list { max-height: 480px; }
    #folder-list > .folder-row { height: auto; min-height: 52px; }
  }
  .folder-bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface-alt); font-size: 13px; color: var(--text-muted); }
  .folder-bulk-acts { display: flex; gap: 6px; flex-wrap: wrap; }
  .back-to-folder { margin-left: auto; white-space: nowrap; font-size: 13px; }
  [data-panel="mydocs"] > .panel > .result-head { flex-wrap: wrap; }
  #mydocs-usage { order: 3; flex-basis: 100%; }
  #folder-bulk-delete { color: var(--error); border-color: color-mix(in srgb, var(--error) 45%, transparent); }
  #folder-bulk-delete:hover { background: var(--error); color: #fff; }
  .folder-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
  .folder-row:last-child { border-bottom: 0; }
  .folder-row .icon { width: 52px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); overflow: hidden; border: 0; padding: 0; cursor: default; }
  .folder-row .icon:not(.kind-tile) { background: var(--surface-alt); }   /* a tile keeps its section's colours */
  .folder-row button.icon { cursor: pointer; }
  .folder-row .kind-tile { color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
  .folder-row .kind-tile svg { width: 17px; height: 17px; }
  .folder-row .kind-tile small { font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .95; }
  .folder-row .icon img { width: 100%; height: 100%; object-fit: cover; min-width: 0; max-width: none; aspect-ratio: auto; }
  .folder-row .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .folder-row .m { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .folder-row .acts { display: flex; gap: 6px; }
  .folder-row .st-bad { color: var(--error); }
  @media (max-width: 640px) {
    .folder-row { grid-template-columns: 44px minmax(0, 1fr); }
    .folder-row .icon { width: 44px; }
    .folder-row .acts { grid-column: 1 / -1; justify-content: flex-end; }
  }
  /* My folder as a source: your documents, drafts and My audio, to pick from */
  .my-folder { display: flex; flex-direction: column; gap: 8px; }
  .my-folder input[type=search] { width: 100%; }
  .my-folder-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .my-folder-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
  .my-folder-row:last-child { border-bottom: 0; }
  .my-folder-row:hover, .my-folder-row:focus-visible { background: var(--accent-soft); }
  .my-folder-row .kind { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-alt); color: var(--text-muted); white-space: nowrap; }
  .my-folder-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .my-folder-row .when { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
  .my-folder .empty-note { padding: 14px; }
  .busy-row > button[type=submit] { flex: 3; min-width: 0; }
  .busy-row > .busy-stop, .busy-row > .btn-danger-solid { flex: 1; min-width: 0; white-space: nowrap; }
  .busy-row > [hidden] { display: none; }
  /* every screen's main button: the size of New conversation, on the right; red Stop while it runs */
  .run-row { display: flex; justify-content: flex-end; margin-top: 12px; gap: 8px; }
  .run-row > .run-stop, .run-row > [id$="-stop"] { display: none !important; }
  .btn-primary.run-btn { width: 172px; max-width: 100%; padding: 7px 12px; font-size: 13px; border-radius: 8px; min-height: 33px; white-space: nowrap; }
  .btn-primary.run-btn.stopping { background: var(--error); }
  .btn-primary.run-btn.stopping:hover { background: #b23d2b; }
  .run-btn .run-sub { font-weight: 500; opacity: .9; }
  .sum1-ask .actions .run-row { margin-top: 0; }

  /* History (Chat, Ask my documents) */
  .history-view { display: flex; flex-direction: column; gap: 10px; }
  .history-footer { grid-row: 4; grid-column: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; align-self: start; min-width: 0; }
  .svc-result:has(.history-footer:not([hidden])) > .result-foot { visibility: hidden; }
  .history-footer .history-bar { padding: 0; border: 0; background: none; justify-content: flex-start; }
  .history-footer .artifact-more { margin: 0 0 0 auto; flex: none; align-self: center; }   /* "6 more ▼" on the right of Keep history and Delete all */
  .history-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt); }
  .switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
  .switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
  .switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
  .switch input:checked { background: var(--accent); }
  .switch input:checked::after { left: 16px; }
  .switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .history-list { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow: auto; }
  /* inside a Result box the list fills it and is the only thing that scrolls, with "6 more ▼" under it */
  .result-body > .history-view { height: 100%; box-sizing: border-box; }
  .result-body > .history-view .history-list { flex: 1 1 0; min-height: 0; max-height: none; }
  .history-item { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .history-item:hover { border-color: var(--accent); }
  .history-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 12px; border: 0; background: none; cursor: pointer; color: var(--text); font: inherit; }
  .history-open .t { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .history-open .m { font-size: 11.5px; color: var(--text-faint); }
  .history-del { border: 0; background: none; color: var(--text-faint); padding: 0 12px; cursor: pointer; font-size: 16px; border-radius: 0 10px 10px 0; }
  .history-del:hover { color: var(--error); background: var(--error-soft); }
  .history-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: transparent; }
  .history-state { color: var(--text-faint); }

  /* sources under an Ask my documents answer */
  .cite { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; margin: 0 1px; vertical-align: super;
    font-size: 10.5px; font-weight: 600; line-height: 1; border-radius: 5px; border: 0; cursor: pointer;
    background: var(--accent-soft); color: var(--accent-strong); font-family: inherit; }
  .cite:hover { background: var(--accent); color: var(--accent-text-on); }
  .sources { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
  .source-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .source { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: box-shadow .3s; }
  .source.flash { box-shadow: 0 0 0 3px var(--accent-soft); }
  .source summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; list-style: none; }
  .source summary::-webkit-details-marker { display: none; }
  .source summary::after { content: "▸"; margin-left: auto; color: var(--text-faint); }
  .source[open] summary::after { content: "▾"; }
  .source-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; font-size: 11.5px; }
  .source-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .source-where { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
  .source-passage { margin: 0 12px 10px; padding: 8px 12px; border-left: 3px solid var(--accent-soft); font-size: 12.5px; line-height: 1.55; color: var(--text-muted); white-space: pre-wrap; max-height: 220px; overflow: auto; }
  .source-passage.muted { font-style: italic; border-left-color: var(--border); }
  /* a draft, formatted (Document Writer, My Drafts) */
  .doc-view { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; max-height: 520px; overflow: auto;
    font-size: 14px; line-height: 1.6; color: var(--text); text-align: left; width: 100%; box-sizing: border-box; }
  .doc-view h1 { font-size: 20px; margin: 0 0 12px; } .doc-view h2 { font-size: 16px; margin: 16px 0 6px; } .doc-view h3 { font-size: 14.5px; margin: 14px 0 4px; }
  .doc-view p { margin: 0 0 10px; } .doc-view ul, .doc-view ol { margin: 0 0 10px; padding-left: 22px; }
  .draft-stage { padding: 16px; justify-content: flex-start; }
  .save-row { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; width: 100%; }
  .save-group { display: flex; flex-direction: column; gap: 6px; align-items: center; }
  .save-group > span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
  .save-group .actions { justify-content: center; }
  .draft-list { display: flex; flex-direction: column; gap: 8px; }
  .draft-item { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-alt); color: var(--text); cursor: pointer; font: inherit; }
  .draft-item:hover { border-color: var(--accent); }
  .draft-item .t { font-weight: 600; font-size: 14px; }
  .draft-item .m { font-size: 12px; color: var(--text-faint); }
  .draft-row { display: flex; gap: 8px; align-items: stretch; }
  .draft-row .draft-item { flex: 1; min-width: 0; }
  .draft-acts { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
  .doc-row .doc-open { padding: 3px 10px; font-size: 12px; }
  .draft-item .pv { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .result-text { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }
  .result-text.streaming::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .result-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-faint); font-family: "IBM Plex Mono", monospace; }
  .note { font-size: 12px; color: var(--text-faint); font-style: italic; }

  .error-box { background: var(--error-soft); color: var(--error); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; white-space: pre-line; }
  .spinner {
    width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
    animation: spin .8s linear infinite; display: inline-block;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  img.img-loading { color: transparent; width: 100%; max-width: 380px; min-width: 60px; aspect-ratio: 1; border-radius: 10px; background: var(--surface-alt); animation: img-pulse 1.2s ease-in-out infinite; }
  @keyframes img-pulse { 50% { opacity: .55; } }
  /* A button doing its job stays coloured: busy while it works (e.g. "Saving…"), then done ("Saved to My audio") */
  button.is-busy, button.is-busy:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); opacity: 1; cursor: progress; }
  button.is-busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
  button.is-done, button.is-done:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); opacity: 1; }
  button.is-done::before { content: "✓ "; font-weight: 700; }

  .placeholder-box {
    min-height: 420px; border-radius: 14px; background: var(--surface); border: 1.5px dashed var(--border-strong);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 24px; text-align: center;
  }
  .placeholder-box p { margin: 0; max-width: 400px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
  .gallery-toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
  .gallery-toolbar .field { flex: 0 0 180px; }

  .g-cyan { background: linear-gradient(135deg,#5be8d0,#5b8de8); }
  .g-blue { background: linear-gradient(135deg,#5b8def,#7c6ee8); }
  .g-green { background: linear-gradient(135deg,#3fc88a,#3aa8c9); }
  .g-violet { background: linear-gradient(135deg,#c95bd6,#5b6fe8); }
  .g-coral { background: linear-gradient(135deg,#e88a5b,#e85b8a); }
  .g-amber { background: linear-gradient(135deg,#e8b84b,#e8785b); }
  .g-red { background: linear-gradient(135deg,#e85b6f,#e8a15b); }
  .g-purple { background: linear-gradient(135deg,#8a5be8,#5bb0e8); }
  .g-slate { background: linear-gradient(135deg,#6b7a93,#48536a); }
  .g-gold { background: linear-gradient(135deg,#d4a100,#946c00); }   /* the AI services box: a darker shade of its yellow */
  .g-teal { background: linear-gradient(135deg,#2bb3a0,#2b7fb3); }
  .g-rose { background: linear-gradient(135deg,#e05b9d,#9b5be0); }
  .g-indigo { background: linear-gradient(135deg,#5b6be0,#3aa0d9); }
  .g-orange { background: linear-gradient(135deg,#f0a040,#e0605b); }
  /* shades within a section's colour, so a section's services read as one family */
  .g-cyan2  { background: linear-gradient(135deg,#4fc8e8,#4a74d9); }
  .g-green2 { background: linear-gradient(135deg,#86d45b,#3aae7a); }
  .g-green3 { background: linear-gradient(135deg,#2fb39a,#2f7fa8); }
  .g-green4 { background: linear-gradient(135deg,#3fae6a,#c9a227); }
  .g-blue2  { background: linear-gradient(135deg,#72b0f5,#5b82e8); }
  .g-blue3  { background: linear-gradient(135deg,#4a6fe0,#6a5bd9); }
  .g-blue4  { background: linear-gradient(135deg,#4fb8ec,#4a88e0); }
  .sen-result { display: flex; flex-direction: column; gap: 12px; }
  .sen-head { display: flex; align-items: center; gap: 12px; }
  .sen-face { font-size: 34px; line-height: 1; }
  .sen-label { font-family: "Sora", sans-serif; font-size: 18px; font-weight: 700; }
  .sen-head.positive .sen-label { color: #1f9c5a; }
  .sen-head.negative .sen-label { color: #d64545; }
  .sen-score { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
  .sen-scale { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #d64545, #c9ced8 50%, #1f9c5a); margin: 4px 6px; }
  .sen-scale .mark { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--text); }
  .sen-shares { display: grid; gap: 6px; }
  .sen-share { display: grid; grid-template-columns: 70px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; }
  .sen-share .track { height: 8px; border-radius: 4px; background: var(--surface-alt); overflow: hidden; }
  .sen-share .fill { display: block; height: 100%; border-radius: 4px; background: #9aa3b2; }
  .sen-share.positive .fill { background: #1f9c5a; }
  .sen-share.negative .fill { background: #d64545; }
  .sen-share .v { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .sen-counts { font-size: 12.5px; color: var(--text-muted); }
  .sen-lines { display: grid; gap: 6px; }
  .sen-lines-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
  .sen-lines blockquote { margin: 0; display: flex; gap: 10px; justify-content: space-between; padding: 7px 10px; border-radius: 8px; font-size: 13px; line-height: 1.45;
    background: var(--surface-alt); border-left: 3px solid #1f9c5a; }
  .sen-lines.negative blockquote { border-left-color: #d64545; }
  .sen-lines blockquote b { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
  /* every sentence, in reading order: collapsed under the highlights, scrolling inside the card */
  .sen-all summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-strong); list-style: none; }
  .sen-all summary::-webkit-details-marker { display: none; }
  .sen-all summary::before { content: "▸ "; } .sen-all[open] summary::before { content: "▾ "; }
  .sen-all ol { list-style: none; margin: 8px 0 0; padding: 0 4px 0 0; max-height: 360px; overflow-y: auto; display: grid; gap: 4px; }
  .sen-all li { display: flex; gap: 10px; justify-content: space-between; padding: 5px 9px; border-radius: 6px; font-size: 12.5px; line-height: 1.4;
    background: var(--surface-alt); border-left: 3px solid #9aa3b2; }
  .sen-all li.positive { border-left-color: #1f9c5a; } .sen-all li.negative { border-left-color: #d64545; }
  [data-result="sen"] .sen-all ol { max-height: none; overflow: visible; }
  .result-footer-row > .artifact-more { margin: 0 0 0 auto; align-self: center; }   /* on the footer line, centred with it */   /* in the Result box the whole report scrolls as one */
  .sen-all li b { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
  .g-blue5  { background: linear-gradient(135deg,#5a9cf0,#6a6ee0); }
  .g-rose2  { background: linear-gradient(135deg,#f283b0,#d35bb3); }
  .g-rose3  { background: linear-gradient(135deg,#d6497a,#a84fb0); }
  /* The left menu only: Meet Sum 1 blue and My folder purple, then one colour per section going down
     (Chat yellow, Audio orange, Image green, Docs pink, Video red; About keeps its slate), in their bright
     summery shades. A section's services all share one colour, a pinch lighter than the section's. Elsewhere (My
     services, the pages themselves) each service keeps its own colour; the sign-in page follows below. */
  #switcher [data-tab="avt"] .cap-icon { background: linear-gradient(135deg, #3b82f6, #326ed1); color: #ffffff; }
  #switcher [data-tab="folder"] .cap-icon { background: linear-gradient(135deg, #7c3aed, #6931c9); color: #ffffff; }
  #switcher .tree-group[data-group="Chat"] > .switcher-label .group-icon { background: linear-gradient(135deg, #fde047, #d7be3c); color: #1f2937; }
  #switcher [data-tab="t2t"] .cap-icon, #switcher [data-tab="tra"] .cap-icon, #switcher [data-tab="chats"] .cap-icon { background: linear-gradient(135deg, #fde563, #d7c354); color: #1f2937; }
  #switcher .tree-group[data-group="Audio"] > .switcher-label .group-icon { background: linear-gradient(135deg, #fdba74, #d79e63); color: #1f2937; }
  #switcher [data-tab="s2t"] .cap-icon, #switcher [data-tab="t2s"] .cap-icon, #switcher [data-tab="sst"] .cap-icon, #switcher [data-tab="spi"] .cap-icon, #switcher [data-tab="speeches"] .cap-icon { background: linear-gradient(135deg, #fdc489, #d7a774); color: #1f2937; }
  #switcher .tree-group[data-group="Image"] > .switcher-label .group-icon { background: linear-gradient(135deg, #4ade80, #3fbd6d); color: #1f2937; }
  #switcher [data-tab="t2i"] .cap-icon, #switcher [data-tab="i2i"] .cap-icon, #switcher [data-tab="age"] .cap-icon, #switcher [data-tab="i2t"] .cap-icon, #switcher [data-tab="itx"] .cap-icon, #switcher [data-tab="iid"] .cap-icon, #switcher [data-tab="gallery"] .cap-icon { background: linear-gradient(135deg, #65e393, #56c17d); color: #1f2937; }
  #switcher .tree-group[data-group="Docs"] > .switcher-label .group-icon { background: linear-gradient(135deg, #f472b6, #cf619b); color: #1f2937; }
  #switcher [data-tab="sum"] .cap-icon, #switcher [data-tab="wri"] .cap-icon, #switcher [data-tab="rag"] .cap-icon, #switcher [data-tab="ocr"] .cap-icon, #switcher [data-tab="sen"] .cap-icon, #switcher [data-tab="mydocs"] .cap-icon { background: linear-gradient(135deg, #f687c1, #d173a4); color: #1f2937; }
  #switcher .tree-group[data-group="Video"] > .switcher-label .group-icon { background: linear-gradient(135deg, #ef4444, #cb3a3a); color: #1f2937; }
  #switcher [data-tab="vcp"] .cap-icon, #switcher [data-tab="vac"] .cap-icon, #switcher [data-tab="v2v"] .cap-icon, #switcher [data-tab="t2v"] .cap-icon, #switcher [data-tab="v2t"] .cap-icon, #switcher [data-tab="videos"] .cap-icon { background: linear-gradient(135deg, #f16060, #cd5252); color: #1f2937; }
  /* The sign-in page's services box: the same colours as the left menu (Sum 1 blue, each service its
     section's). Coming soon keeps its fading; "..." and Workflows keep theirs. */
  #showcase [data-cap="avatar"] .cap-icon { background: linear-gradient(135deg, #3b82f6, #326ed1); color: #ffffff; }
  #showcase [data-cap="recruit"] .preview-note { font-size: 0.85em; color: var(--text-muted); font-weight: 400; }
  #showcase [data-cap="recruit"] .cap-icon { background: linear-gradient(135deg, #4fb8ec, #4a88e0); color: #ffffff; }   /* the menu's Recruit Sumesh */
  #showcase [data-cap="direct_chat"] .cap-icon, #showcase [data-cap="translate"] .cap-icon { background: linear-gradient(135deg, #fde563, #d7c354); color: #1f2937; }
  #showcase [data-cap="speech_to_text"] .cap-icon, #showcase [data-cap="text_to_speech"] .cap-icon, #showcase [data-cap="speech_translate"] .cap-icon, #showcase [data-cap="speech_interpret"] .cap-icon { background: linear-gradient(135deg, #fdc489, #d7a774); color: #1f2937; }
  #showcase [data-cap="text_to_image"] .cap-icon, #showcase [data-cap="image_to_image"] .cap-icon, #showcase [data-cap="age_photo"] .cap-icon, #showcase [data-cap="image_to_text"] .cap-icon, #showcase [data-cap="image_identification"] .cap-icon { background: linear-gradient(135deg, #65e393, #56c17d); color: #1f2937; }
  #showcase [data-cap="document_summary"] .cap-icon, #showcase [data-cap="document_writer"] .cap-icon, #showcase [data-cap="rag_chat"] .cap-icon, #showcase [data-cap="text_recognition"] .cap-icon, #showcase [data-cap="sentiment"] .cap-icon { background: linear-gradient(135deg, #f687c1, #d173a4); color: #1f2937; }
  #showcase [data-cap="video_to_video"] .cap-icon, #showcase [data-cap="text_to_video"] .cap-icon, #showcase [data-cap="video_to_text"] .cap-icon, #showcase [data-cap="video_captioning"] .cap-icon, #showcase [data-cap="video_actions"] .cap-icon { background: linear-gradient(135deg, #f16060, #cd5252); color: #1f2937; }


  /* confirmation: three columns */
  #confirm-view .onboard-card { max-width: 820px; }
  .kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  @media (max-width: 640px) { .kanban { grid-template-columns: minmax(0, 1fr); } }
  .kanban-col { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .kanban-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--text-faint); padding: 2px 4px; display: flex; justify-content: space-between; }
  .kanban-col.pending .kanban-head { color: #8a5a00; }
  .kanban-col.approved .kanban-head { color: var(--accent-strong); }
  .kanban-items { display: flex; flex-direction: column; gap: 8px; }
  .kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; display: flex; gap: 9px; align-items: center; }
  .kanban-card .cap-icon { width: 26px; height: 26px; }
  .kanban-card b { font-size: 13px; font-weight: 500; display: block; }
  .kanban-card small { font-size: 11.5px; color: var(--text-faint); }
  .kanban-empty { font-size: 12px; color: var(--text-faint); font-style: italic; padding: 4px; }

  /* home */
  .home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  @media (max-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
  .home-grid.even { align-items: stretch; }
  .home-count { margin-left: 6px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; text-transform: none; }   /* Your services and Token use: the same size, side by side */
  .home-lead { margin: 0; color: var(--text-muted); font-size: 13.5px; }
  .home-services { display: flex; flex-direction: column; gap: 10px; }
  .home-services .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .home-services .row > span.lbl { font-size: 11.5px; color: var(--text-faint); width: 100%; }
  .svc-link { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface-alt); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12.5px; cursor: pointer; color: var(--text); }
  .svc-link .cap-icon { width: 22px; height: 22px; border-radius: 999px; }
  .svc-link .cap-icon svg { width: 12px; height: 12px; }
  .svc-link:hover { border-color: var(--accent); }
  .home-thumbs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
  @media (max-width: 900px) { .home-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .home-stack { display: flex; flex-direction: column; gap: 18px; }
  .home-links { display: flex; gap: 6px; }
  .home-sessions { display: flex; flex-wrap: wrap; gap: 8px; }
  .home-session { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 13px; }
  .home-session.now { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
  .usage-top { display: flex; gap: 22px; margin-bottom: 10px; }
  .usage-top b { display: block; font-size: 22px; font-weight: 700; color: var(--text); }
  .usage-top span { font-size: 12px; color: var(--text-muted); }
  .usage-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 8px; align-items: center; font-size: 12.5px; margin: 4px 0; }
  .usage-bar { height: 8px; border-radius: 4px; background: var(--surface-alt); overflow: hidden; }
  .usage-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
  /* Token use history: stacked columns per day (or month), by section, against the limit (dashed red) */
  .usage-history { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; position: relative; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .usage-history { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; } }
  :root[data-theme="dark"] .usage-history { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; }
  .seg-control { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
  .seg-control button { border: 0; background: var(--surface); color: var(--text-muted); padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
  .seg-control button + button { border-left: 1px solid var(--border); }
  .seg-control button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); font-weight: 600; }
  .uh-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-muted); margin: 4px 0 6px; }
  .uh-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
  .uh-legend .lim { display: inline-block; width: 16px; border-top: 2px dashed var(--error); margin-right: 6px; vertical-align: 3px; }
  .uh-title { margin: 14px 0 4px; font-size: 13px; font-weight: 600; color: var(--text); }
  .uh-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
  .uh-chart .grid { stroke: var(--border); stroke-width: 1; }
  .uh-chart .axis { fill: var(--text-faint); font-size: 10px; font-family: inherit; }
  .uh-chart .limit { stroke: var(--error); stroke-width: 1.5; stroke-dasharray: 5 4; }
  .uh-chart .limit-label { fill: var(--error); font-size: 10px; font-weight: 600; }
  .uh-chart .hit { fill: transparent; cursor: default; }
  .uh-chart .hit:hover { fill: var(--text); fill-opacity: .06; }
  .uh-chart .s1 { fill: var(--s1); } .uh-chart .s2 { fill: var(--s2); } .uh-chart .s3 { fill: var(--s3); } .uh-chart .s4 { fill: var(--s4); }
  .uh-legend .s1 { background: var(--s1); } .uh-legend .s2 { background: var(--s2); } .uh-legend .s3 { background: var(--s3); } .uh-legend .s4 { background: var(--s4); }
  .uh-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.15); min-width: 150px; z-index: 5; }
  .uh-tip b { display: block; margin-bottom: 4px; color: var(--text); }
  .uh-tip div { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .uh-tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
  .uh-table { margin-top: 12px; font-size: 12.5px; }
  .uh-table summary { cursor: pointer; color: var(--accent-strong); }
  .uh-table table { border-collapse: collapse; margin-top: 8px; width: 100%; font-variant-numeric: tabular-nums; }
  .uh-table th, .uh-table td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--border); }
  .uh-table th:first-child, .uh-table td:first-child { text-align: left; }
  /* Token meters: one bar per budget, split by section (validated categorical slots 1-4, light and dark) */
  #home-usage { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #home-usage { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; } }
  :root[data-theme="dark"] #home-usage { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; }
  .meter { margin: 12px 0 0; }
  .meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 4px; }
  .meter-title { color: var(--text); font-weight: 500; }
  .meter-n { color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .meter-n.over { color: var(--error); font-weight: 600; }
  .meter-bar { position: relative; display: flex; gap: 2px; height: 12px; border-radius: 4px; background: var(--surface-alt); margin-right: 3px; }
  .meter-bar .seg { display: block; height: 100%; }
  .meter-bar .seg:first-child { border-radius: 4px 0 0 4px; }
  .meter-bar .seg:last-of-type { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
  .meter-limit { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--error); }
  .meter-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .meter-legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
  .s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); }
  .budget-note { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
  .usage-row .n { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .usage-row.none { color: var(--text-muted); }
  /* How full each "My ..." section is: a warning 5 before the cap, "full", or
     the note that the next save removes the oldest (keep only the most recent) */
  .notice-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; margin: 4px 0 12px; color: var(--text); cursor: pointer; }
  .notice-agree input { margin-top: 3px; flex: none; }
  .storage-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45;
    background: var(--notice-bg); border: 1px solid var(--notice-border); color: var(--notice-text); }
  .storage-note.full { background: var(--error-soft); border-color: var(--error); color: var(--error); }
  .storage-note.info { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
  .storage-note .txt { flex: 1 1 260px; }
  .storage-note .btns { display: flex; gap: 8px; flex-wrap: wrap; }
  .storage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; font-size: 12.5px; color: var(--text-muted); }
  .storage-bar .storage-note { flex-basis: 100%; }

  /* locked service */
  .locked-panel { align-items: flex-start; max-width: 760px; gap: 12px; }
  .locked-panel .cap-icon { width: 46px; height: 46px; border-radius: 13px; }
  .locked-panel .cap-icon svg { width: 24px; height: 24px; }
  .locked-panel h2 { font-size: 19px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .locked-panel p { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }

