/* The admin portal's stylesheet: lifted from docs/portal-demo.html, the approved look.

   How it is laid out
   1. Tokens (colours, type, and the layout tokens: --rail-w, --content-max,
      --reading-max, --gutter-x/y, --gap, --card-pad-x/y, --radius) and base
      type, then the demo's original sections (buttons, chips, sign-in, app
      shell, tables, drawer, appearance, voice, performance). Those sections
      are the visual contract with the demo.
   2. "Shared components" near the end: the building blocks every page uses.
      Each sits under its own heading comment:
        Page header ....... .page-head > div (eyebrow, h1, .sub) + .actions on the right
        Page widths ....... main caps every page at --content-max; .page-narrow
                            (--reading-max) wraps a reading or form page
        Grids ............. .grid2, .grid3: equal columns with the one --gap
        Card .............. .card, .card-head (h2 + .sub | actions), .card-foot, .card.flush,
                            .card.danger-zone
        Summary tiles ..... .tiles > .tile (.n value, .l label, .d change); a.tile as a filter
                            with aria-current; .tile.attention / .tile.danger
        Status ............ .chip.success|warning|danger|neutral|info (a word, never colour
                            alone; ok/amber/teal remain as the older names); .status + tone
                            for a dot-and-word line in tables
        Empty state ....... .empty > h3 + p + .actions
        Tabs .............. nav.tabs > a[aria-current="page"] (+ .count)
        Rows .............. dl.rows > div > dt + dd (+ .row-action)
        Tables ............ .tablewrap > table (.wide, .t-actions, .num, td .sub, tr.attention,
                            table.compact); the wrap scrolls sideways with a soft edge
        Toolbar ........... .toolbar (search, .filters pills, selects, .spacer)
        Form problems ..... .form-error (one line at the top of a card), .field.has-error,
                            .field-error under the box, aria-invalid on the input
        Read-only ......... disabled controls, form.is-read-only, .readonly-note,
                            .btn.cta-off (a create link switched off)
        Links and help .... a.btn (never underlined), .help-link ("Help for this page ›")
        Choices ........... .choice-list (.cols3) > label.choice (outlined when chosen)
        Card spacing ...... .card-pad, .card-empty inside a flush card
        Confirmation ...... details.confirm > summary + .confirm-box
        Messages .......... .toast.ok|danger (the one-time result), .banner (a state)
        Navigation ........ .nav-group, .nav-heading, .nav-list, .nav-toggle, .bar-step,
                            .skip-link; below 900 px the open menu covers the page
        Arabic fields ..... .input[lang=ar]
        Breakpoints ....... the only four: 1200, 900, 600 (max-width) and 1600 (min-width)
   3. "Page sections" at the very end: one block per page, for styles only that
      page needs. Extend your page's block; add shared pieces above it. A page
      block that needs a breakpoint uses one of the four numbers above. */

:root{
  --teal:#0F6E6A; --teal-ink:#0A504E; --teal-soft:#E0EFEE;
  --amber:#B8771A; --amber-soft:#F8EDDD; --amber-ink:#8A5A12;
  --ok:#2C6A3D; --ok-soft:#E2EFE4;
  --danger:#B3261E; --danger-soft:#F9E3E1;
  --ink:#16232A; --ink-soft:#37474F; --muted:#647680;
  --line:#DBE3E2; --line-strong:#C2CECD;
  --surface:#FFFFFF; --surface-2:#EEF2F1; --paper:#F6F8F7;
  --rail:#16232A; --rail-text:#F6F8F7;
  --shadow:0 1px 2px rgba(22,35,42,.05), 0 8px 24px -18px rgba(22,35,42,.35);
  --font-display:"Sora","Segoe UI",system-ui,sans-serif;
  --font-body:"Public Sans","Segoe UI",system-ui,sans-serif;
  --font-mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  /* Layout: the rail, the two page widths (data pages and reading/form pages),
     the gutters, the one gap between cards, tiles and grid cells, card padding. */
  --rail-w:220px; --content-max:1440px; --reading-max:880px;
  --gutter-x:36px; --gutter-y:32px; --gap:16px;
  --card-pad-y:20px; --card-pad-x:22px; --radius:12px;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --teal:#5CBDB5; --teal-ink:#8AD6CF; --teal-soft:#123330;
  --amber:#DDA05C; --amber-soft:#2C2217; --amber-ink:#E8B677;
  --ok:#79BF88; --ok-soft:#1A2C1F;
  --danger:#F2857A; --danger-soft:#3A1D1A;
  --ink:#E4ECEA; --ink-soft:#C3D1D0; --muted:#8EA1A7;
  --line:#26353B; --line-strong:#36484F;
  --surface:#152026; --surface-2:#1B282E; --paper:#0E161A;
  --rail:#0A1215; --rail-text:#E4ECEA;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 10px 28px -20px rgba(0,0,0,.8);
}}
:root[data-theme="dark"]{
  --teal:#5CBDB5; --teal-ink:#8AD6CF; --teal-soft:#123330;
  --amber:#DDA05C; --amber-soft:#2C2217; --amber-ink:#E8B677;
  --ok:#79BF88; --ok-soft:#1A2C1F;
  --danger:#F2857A; --danger-soft:#3A1D1A;
  --ink:#E4ECEA; --ink-soft:#C3D1D0; --muted:#8EA1A7;
  --line:#26353B; --line-strong:#36484F;
  --surface:#152026; --surface-2:#1B282E; --paper:#0E161A;
  --rail:#0A1215; --rail-text:#E4ECEA;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 10px 28px -20px rgba(0,0,0,.8);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%}
/* The same right edge whether or not the page scrolls. */
html{scrollbar-gutter:stable}
body{margin:0;background:var(--paper);color:var(--ink-soft);font-family:var(--font-body);font-size:14.5px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:var(--teal)}
h1,h2,h3{font-family:var(--font-display);font-weight:600;color:var(--ink);margin:0;line-height:1.2}
h1{font-size:24px}h2{font-size:16px}h3{font-size:14px}
p{margin:0 0 10px}
.eyebrow{font-family:var(--font-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
button{font:inherit}
:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:8px;border:1px solid transparent;font-weight:600;font-size:13.5px;cursor:pointer;background:var(--surface);color:var(--ink-soft);white-space:nowrap}
.btn.sm{height:30px;padding:0 10px;font-size:12.5px}
.btn.primary{background:var(--teal);color:#fff}
.btn.primary:hover{background:var(--teal-ink)}
.btn.secondary{border-color:var(--teal);color:var(--teal)}
.btn.secondary:hover{background:var(--teal-soft)}
.btn.ghost{background:transparent}
.btn.ghost:hover{background:var(--surface-2)}
.btn.danger{background:var(--danger);color:#fff}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.btn .spin{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

/* chips */
.chip{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;padding:3px 9px;border-radius:999px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.chip.ok{background:var(--ok-soft);color:var(--ok)}
.chip.amber{background:var(--amber-soft);color:var(--amber)}
.chip.danger{background:var(--danger-soft);color:var(--danger)}
.chip.teal{background:var(--teal-soft);color:var(--teal-ink)}

/* login */
/* The sign-in pages fill the whole window and centre their card at every width;
   the portal's capped main column does not apply to them. */
#login{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px;max-width:none}
.login-card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:32px;box-shadow:var(--shadow)}
.lockup{display:flex;align-items:center;gap:10px}
.lockup svg{width:28px;height:28px}
.lockup span{font-family:var(--font-display);font-weight:600;font-size:17px;color:var(--ink)}
.login-card h1{font-size:20px;margin:22px 0 4px}
.login-card .sub{color:var(--muted);margin-bottom:22px}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.field label{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.input,textarea.input,select.input{height:40px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--ink);padding:0 12px;font:inherit;font-size:14.5px;width:100%}
textarea.input{height:auto;min-height:80px;padding:10px 12px;resize:vertical}
.input:focus{border-color:var(--teal);outline:2px solid var(--teal);outline-offset:1px}
.help{font-size:12.5px;color:var(--muted)}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
/* Fields in a row top-align: centring two fields of different heights (one has
   a help line, the other does not) skews their labels and inputs. */
.row>.field{align-self:flex-start}
.grow{flex:1}
.code-input{font-family:var(--font-mono);letter-spacing:.4em;font-size:20px;text-align:center}

/* app shell */
#app{display:grid;grid-template-columns:var(--rail-w) minmax(0,1fr);min-height:100vh}
aside{background:var(--rail);color:var(--rail-text);padding:22px 14px;display:flex;flex-direction:column;gap:6px;position:sticky;top:0;height:100vh}
aside .lockup{padding:0 8px 18px}
aside .lockup span{color:var(--rail-text)}
aside nav{display:flex;flex-direction:column;gap:2px}
aside nav a{color:var(--rail-text);opacity:.78;text-decoration:none;padding:9px 12px;border-radius:8px;font-weight:500;display:flex;justify-content:space-between;align-items:center;gap:8px}
aside nav a:hover{opacity:1;background:rgba(255,255,255,.06)}
aside nav a.active{opacity:1;background:rgba(92,189,181,.22)}
aside nav a .chip{background:rgba(255,255,255,.1);color:var(--rail-text);opacity:.8}
aside .foot{margin-top:auto;padding:12px 12px 0;border-top:1px solid rgba(255,255,255,.1);font-size:12.5px;opacity:.75;display:flex;flex-direction:column;gap:4px}
aside .foot b{font-weight:600;opacity:1}
aside .foot a{color:var(--rail-text)}
/* Content hangs off the rail, left-aligned, capped at the data width. */
main{padding:var(--gutter-y) var(--gutter-x) 80px;min-width:0;width:100%;max-width:calc(var(--content-max) + 2*var(--gutter-x))}
.page{display:none}.page.active{display:block}

/* cards & tables */
table{border-collapse:collapse;width:100%;font-size:13.5px}
th{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);text-align:left;padding:8px 10px;border-bottom:1px solid var(--line-strong);background:var(--surface-2);font-weight:500;white-space:nowrap}
td{padding:10px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
tr.click{cursor:pointer}tr.click:hover td{background:var(--surface-2)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
td .title{color:var(--ink);font-weight:500}
td .muted{color:var(--muted);font-size:12.5px}
.branch h3{display:flex;align-items:center;gap:8px}
.branch .aliases{font-size:12px;color:var(--muted);margin:4px 0 10px}
.doclist{list-style:none;margin:0 0 12px;padding:0}
.doclist li{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;border-top:1px solid var(--line);cursor:pointer}
.doclist li:hover{background:var(--surface-2);margin:0 -8px;padding:8px}
.doclist li span:first-child{color:var(--ink)}
.banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-radius:10px;margin-bottom:var(--gap);border:1px solid var(--line);background:var(--surface);flex-wrap:wrap}
.banner.warn{border-color:var(--danger);background:var(--danger-soft);color:var(--ink)}
.banner.amber{border-left:3px solid var(--amber);background:var(--amber-soft)}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:14px}
.tabs button{background:none;border:none;padding:8px 12px;border-bottom:2px solid transparent;color:var(--muted);font-weight:500;cursor:pointer;margin-bottom:-1px}
.tabs button.active{color:var(--teal);border-bottom-color:var(--teal)}
.filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.filters button{border:1px solid var(--line-strong);background:var(--surface);color:var(--ink-soft);border-radius:999px;padding:4px 12px;font-size:12.5px;cursor:pointer}
.filters button.active{background:var(--teal-soft);border-color:var(--teal);color:var(--teal-ink)}
.kv{display:grid;grid-template-columns:150px 1fr;gap:8px 16px;font-size:13.5px}
.kv dt{color:var(--muted)}.kv dd{margin:0;color:var(--ink)}
code,.code{font-family:var(--font-mono);font-size:12.5px}
pre.code{background:var(--surface-2);border-radius:8px;padding:12px 14px;overflow-x:auto;margin:0;color:var(--ink)}
.switch{display:inline-flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
.switch input{width:36px;height:20px;appearance:none;background:var(--line-strong);border-radius:999px;position:relative;cursor:pointer;margin:0}
.switch input::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .15s}
.switch input:checked{background:var(--teal)}
.switch input:checked::after{left:18px}
.test-result{font-size:12.5px;margin-left:8px}
.test-result.ok{color:var(--ok)}.test-result.bad{color:var(--danger)}

/* drawer & modal */
.overlay{position:fixed;inset:0;background:rgba(22,35,42,.35);display:none;z-index:20}
.overlay.open{display:block}
.drawer{position:fixed;top:0;right:0;height:100vh;width:min(560px,100vw);background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--shadow);transform:translateX(100%);transition:transform .2s;z-index:21;display:flex;flex-direction:column}
.drawer.open{transform:none}
.drawer .head{padding:20px 24px 14px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.drawer .body{padding:20px 24px;overflow:auto;flex:1}
.drawer .foot{padding:14px 24px;border-top:1px solid var(--line);display:flex;gap:8px;flex-wrap:wrap}
.chunk{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin-bottom:8px;font-size:13px}
.chunk .meta{font-family:var(--font-mono);font-size:11px;color:var(--muted);margin-bottom:4px}
.modal{position:fixed;inset:0;display:none;place-items:center;z-index:22}
.modal.open{display:grid}
.modal .box{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:24px;width:min(460px,92vw);box-shadow:var(--shadow)}
@media (prefers-reduced-motion:reduce){.drawer{transition:none}.btn .spin{animation:none}}

/* toast */
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:var(--ink);color:var(--paper);padding:10px 16px;border-radius:10px;font-size:13.5px;opacity:0;transition:opacity .2s,transform .2s;z-index:30;pointer-events:none;box-shadow:var(--shadow)}
#toast.show{opacity:1;transform:translateX(-50%)}

/* appearance */
.appearance{--ap-preview-w:500px;display:grid;grid-template-columns:minmax(0,1fr) var(--ap-preview-w);gap:var(--gap) 24px;align-items:start}
/* Preview only. Wide enough for the chat's real width (about 370 px) on usual desktops,
   and an area that fills the window's height (at least 640 px): the real widget lays
   itself out in it as on a browser window that size. Where the window is shorter, the
   page scrolls to it; the preview itself never scrolls. */
@media (min-width:1440px){.appearance{--ap-preview-w:570px}}
.appearance.ap-wide{--ap-preview-w:min(720px,55%)}
.preview-stage{background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:22px;position:sticky;top:24px;display:flex;flex-direction:column;align-items:flex-end;gap:12px;min-height:640px;justify-content:flex-end}
.preview-stage.ap-stage{align-items:stretch;justify-content:flex-start;top:12px;gap:6px;padding:8px 10px;height:auto;min-height:calc(100vh - 24px);max-height:none;overflow:visible}
@media (min-width:1200px) and (max-height:779.98px){.preview-stage.ap-stage{position:static}}
.ap-stage>:not(.ap-pv-area){flex:none}
.ap-pv-tabs{gap:6px;flex-wrap:wrap;align-items:center}
.ap-pv-title{margin:0 4px 0 2px;font-size:11px;line-height:1;font-weight:500;white-space:nowrap}
.ap-pv-end{margin-inline-start:auto}
/* The preview area at 1:1: the chat is never scaled, the area is simply large. */
/* The stage stays within the window while the form scrolls: the area takes the room
   left, never less than a readable chat window. */
.ap-pv-area{flex:1 1 auto;display:flex;flex-direction:column;height:auto;min-height:min(640px,calc(100vh - 32px));overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#EEF1F2}
.ap-pv-note{margin-top:-2px}
.ap-pv-area iframe{display:block;flex:1 1 auto;width:100%;min-height:0;border:0;background:#EEF1F2}
.ap-pv-foot{gap:4px 8px;align-items:center;flex-wrap:wrap}
.ap-pv-status{min-height:1.4em;flex:1 1 200px;font-size:12px;line-height:1.4}
.widget{width:340px;height:520px;background:var(--surface);border-radius:16px;box-shadow:var(--shadow);border:1px solid var(--line);display:flex;flex-direction:column;overflow:hidden;font-size:14px}
.widget.dark{--surface:#152026;--surface-2:#1B282E;--ink:#E4ECEA;--ink-soft:#C3D1D0;--muted:#8EA1A7;--line:#26353B;--line-strong:#36484F;--paper:#0E161A;--teal:#5CBDB5;background:var(--surface);color:var(--ink-soft);border-color:var(--line)}
.widget.light{--surface:#FFFFFF;--surface-2:#EEF2F1;--ink:#16232A;--ink-soft:#37474F;--muted:#647680;--line:#DBE3E2;--line-strong:#C2CECD;--paper:#F6F8F7;--teal:#0F6E6A;background:var(--surface);color:var(--ink-soft);border-color:var(--line)}
.preview-stage.light-stage{background:#E6EBEA;border-color:#C2CECD}
.preview-stage.light-stage .eyebrow{color:#647680}
.preview-stage.dark-stage{background:#0E161A;border-color:#26353B}
.preview-stage.dark-stage .eyebrow{color:#8EA1A7}
.widget .whead{display:flex;align-items:center;gap:10px;padding:12px 14px;color:#fff}
.widget .whead img,.widget .whead .ini{width:26px;height:26px;border-radius:50%;background:#fff;object-fit:contain;display:grid;place-items:center;font-weight:700;font-size:13px}
.widget .whead b{font-family:var(--font-display);font-weight:600;font-size:15px}
.widget .msgs{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
.widget .m{max-width:86%;padding:9px 12px;border-radius:12px;line-height:1.45}
.widget .m.user{align-self:flex-end;background:var(--surface-2);border-bottom-right-radius:4px;color:var(--ink)}
.widget .m.ax{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:4px;color:var(--ink)}
.widget .m.ax.limit{border-left:3px solid var(--amber)}
.widget .src{margin-top:8px;background:var(--surface-2);border-radius:8px;padding:8px 10px;font-size:12px;color:var(--ink-soft)}
.widget .src a{font-weight:600}
.widget .m.ax .lnk{display:inline-block;margin-top:6px;font-weight:600}
.widget[dir=rtl] .m.user{align-self:flex-start;border-radius:12px;border-bottom-left-radius:4px}
.widget[dir=rtl] .m.ax{align-self:flex-end;border-radius:12px;border-bottom-right-radius:4px}
.widget .typing{align-self:flex-start;color:var(--muted);font-size:12px;padding:4px 12px}
.widget .wform{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line)}
.widget .wform input{flex:1;height:36px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--ink);padding:0 10px;font:inherit}
.widget .wform button{width:38px;height:36px;border:none;border-radius:8px;color:#fff;cursor:pointer;font-size:16px}
.widget .wfoot{display:flex;align-items:center;justify-content:center;gap:5px;padding:7px;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}
.widget .wfoot a{display:inline-flex;align-items:center;gap:4px;color:var(--teal);font-weight:600;text-decoration:none}
.widget .wfoot svg{width:13px;height:13px}
.colorfield{display:flex;align-items:center;gap:10px}
.colorfield input[type=color]{width:40px;height:40px;border:1px solid var(--line-strong);border-radius:8px;padding:2px;background:var(--surface);cursor:pointer}
.radios{display:flex;gap:16px;flex-wrap:wrap;padding-top:6px}
.radios label{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--ink);cursor:pointer}

/* conversations */
.kpi{background:var(--surface);border:1px solid var(--line)}
.kpi .v{font-family:var(--font-display);font-weight:600;font-size:28px;color:var(--ink);line-height:1.1;font-variant-numeric:tabular-nums}
.kpi .l{font-size:12.5px;color:var(--muted);margin-top:4px}
.kpi .d{font-size:12.5px;margin-top:6px;color:var(--ok)}
.kpi details.kpi-help{font-size:12.5px;margin-top:6px}
.kpi details.kpi-help>p{font-size:12.5px;color:var(--ink-soft)}
.chart{position:relative}
.chart svg{display:block;width:100%;height:auto}
.chart .bar{fill:var(--teal);cursor:pointer}
.chart .bar:hover{fill:var(--teal-ink)}
.chart .grid{stroke:var(--line);stroke-width:1}
.chart text{fill:var(--muted);font-size:11px;font-family:var(--font-body)}
.chart .lbl{fill:var(--ink);font-weight:600}
.tip{position:absolute;pointer-events:none;background:var(--ink);color:var(--paper);font-size:12px;padding:6px 9px;border-radius:6px;display:none;white-space:nowrap;transform:translate(-50%,-110%)}

/* Voice page: sentences shown as the visitor sees them, edited one at a time. */
.btn.link{border:0;background:none;color:var(--teal);padding:0;height:auto}
.start-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;margin-top:12px}
.sentence{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface);display:grid;gap:8px;min-width:0}
.sentence .top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.sentence .top h3{font-size:13.5px}
.sentence .when{font-size:12.5px;color:var(--muted)}
.sentence .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.thread{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.bub{max-width:88%;padding:9px 12px;border-radius:12px;font-size:13.5px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
.bub.u{align-self:flex-end;background:var(--surface-2);border-bottom-right-radius:4px}
.bub.a{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:4px}
.bub sup{color:var(--teal);font-weight:600;font-size:10px}
.strip{align-self:flex-start;max-width:88%;font-size:11.5px;color:var(--muted);display:flex;flex-direction:column;gap:3px;padding:0 4px}
.strip .src{color:var(--ink)}
.strip .src b{color:var(--teal);font-weight:600}
.redact{background:var(--amber-soft);color:var(--amber);border-radius:4px;padding:0 4px;font-family:var(--font-mono);font-size:11.5px}
.bubble{background:var(--surface-2);border:1px solid var(--line);border-radius:12px 12px 12px 4px;padding:10px 13px;color:var(--ink);max-width:60ch;min-width:0;overflow-wrap:anywhere}
.bubble.ar{direction:rtl;border-radius:12px 12px 4px 12px;font-size:15px}
.bubble .who{display:block;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}
details.group{border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-bottom:10px}
details.group>summary{list-style:none;cursor:pointer;padding:13px 16px;display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
details.group>summary::-webkit-details-marker{display:none}
details.group>summary .t{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
details.group>summary .t h2{font-size:15px}
details.group>summary .arrow{color:var(--muted);transition:transform .15s;font-size:18px;line-height:1}
details.group[open]>summary .arrow{transform:rotate(90deg)}
details.group .body{padding:0 16px 14px;display:grid;gap:10px}
.editor{border:1px solid var(--teal);border-radius:12px;padding:14px;background:var(--surface);display:grid;gap:12px;grid-column:1 / -1}
.editor .preview{display:grid;gap:8px;padding:12px;background:var(--paper);border-radius:10px;border:1px dashed var(--line-strong)}
.editor .foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}
.editor .foot .left{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
@media (prefers-reduced-motion:reduce){details.group>summary .arrow{transition:none}}

.notice{border-left:3px solid var(--teal);background:var(--teal-soft);color:var(--teal-ink);padding:10px 14px;border-radius:8px;margin:4px 0 16px;font-size:13.5px;line-height:1.5}
/* "More" toggles: the fuller explanation folded behind one line of help. */
details.more>summary{list-style:none;cursor:pointer;color:var(--teal);font-weight:500}
details.more>summary::-webkit-details-marker{display:none}
details.more>summary::after{content:" ›";opacity:.7}
details.more[open]>summary::after{content:" ‹"}
details.more>p{margin:8px 0 0;color:var(--ink-soft);font-size:13.5px}
details.more.inline{display:inline}
details.more.inline>summary{display:inline}
details.more.inline[open]{display:block;margin-top:4px}
details.more.inline[open]>summary{display:block;margin-bottom:2px}

/* Performance: filters as a form, bars drawn in CSS, subjects and gaps as folds. */
.perf-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin-bottom:16px}
.perf-filters label{display:grid;gap:4px;font-size:12px;color:var(--muted)}
.perf-filters select.input{height:34px;width:auto;min-width:130px;font-size:13.5px;padding:0 10px}
.perf-filters .langs{margin-inline-start:auto;font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.langbar{width:110px;height:6px;border-radius:999px;background:var(--amber-soft);overflow:hidden}
.langbar i{display:block;height:100%;background:var(--teal)}
.kpi .d.down{color:var(--danger)}
.kpi .d.flat{color:var(--muted)}
.cols{display:flex;align-items:flex-end;gap:3px;height:120px;padding-top:8px}
.cols div{flex:1;min-width:0;background:var(--surface-2);border-radius:3px 3px 0 0;position:relative}
.cols div:hover{outline:2px solid var(--teal-soft)}
.cols div i{position:absolute;inset-inline:0;bottom:0;background:var(--teal);border-radius:3px 3px 0 0;display:block}
.cols-x{display:flex;gap:3px;color:var(--muted);font-size:10.5px;margin-top:5px}
.cols-x span{flex:1;min-width:0;text-align:center;white-space:nowrap;overflow:visible}
.hours{display:flex;align-items:flex-end;gap:2px;height:44px;margin-top:8px}
.hours div{flex:1;min-width:0;background:var(--teal-soft);border-radius:2px 2px 0 0;min-height:2px}
.hours div.peak{background:var(--teal)}
.hours-x{display:flex;justify-content:space-between;font-size:10.5px;color:var(--muted);margin-top:3px}
details.fold{border-top:1px solid var(--line)}
details.fold:first-of-type{border-top:0}
details.fold>summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(120px,1.1fr) 2fr auto auto;gap:12px;align-items:center;padding:10px 0;font-size:13.5px}
details.fold>summary::-webkit-details-marker{display:none}
details.fold>summary .bar{height:8px;border-radius:999px;background:var(--surface-2);overflow:hidden}
details.fold>summary .bar i{display:block;height:100%;background:var(--teal)}
details.fold>summary .bar i.danger{background:var(--danger)}
details.fold>summary .n{color:var(--muted);font-size:12.5px;white-space:nowrap;text-align:end}
details.fold>summary .arrow{color:var(--muted);transition:transform .15s;font-size:16px;line-height:1}
details.fold[open]>summary .arrow{transform:rotate(90deg)}
details.fold .body{padding:0 0 12px;display:grid;gap:8px}
details.fold .body .help{margin:0}
.qlist{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.qlist li{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;font-size:13.5px;padding:7px 10px;border-radius:8px;background:var(--surface-2)}
.qlist .q{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;color:var(--ink)}
.qlist .x{color:var(--muted);font-size:12px;white-space:nowrap}
.qlist .acts{display:flex;gap:12px;font-size:12.5px;white-space:nowrap}
.teaser{font-size:12.5px;color:var(--muted);border:1px dashed var(--line-strong);border-radius:8px;padding:8px 12px}
.try-link{font-size:12.5px;justify-self:start}
.trying{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;align-self:flex-start;max-width:380px;font-size:12.5px;margin-bottom:4px}
/* The gap and designed cards stack beside the subjects; each card is as tall as its rows. */
.perf-act{align-items:start}
@media (max-width:599.98px){details.fold>summary{grid-template-columns:1fr auto auto}details.fold>summary .bar{grid-column:1 / -1}.perf-filters .langs{margin-inline-start:0}.cols-x span:not(.edge){visibility:hidden}.cols-x span.edge{overflow:visible}.hours-x span:nth-child(2),.hours-x span:nth-child(3),.hours-x span:nth-child(4){display:none}}
@media (prefers-reduced-motion:reduce){details.fold>summary .arrow{transition:none}}

/* Voice: answer length */
.length-form { display: flex; flex-direction: column; gap: 12px; }
.length-form .foot { display: flex; align-items: center; gap: 12px; }
/* The payment reminder: a soft notice, never a warning. */
.banner.info{border-left:3px solid var(--teal);background:var(--teal-soft);color:var(--ink)}
.banner.info a{color:var(--teal-ink)}
/* Text for screen readers only: read as part of its parent, never shown. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ======================================================================
   Shared components
   The rules that used to sit inline in base.html come first, unchanged in
   effect: they load after everything above, as they did, so pages look the
   same. New components follow, each under its own heading.
   ====================================================================== */

/* -- Shell carry-over (formerly inline in base.html) -- */
.card h2{margin-bottom:4px}
.card .lead{color:var(--muted);margin-bottom:14px}
table.t{width:100%;border-collapse:collapse;font-size:13.5px}
table.t th{text-align:left;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);background:var(--surface-2);padding:8px 10px}
table.t td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:top}
table.t td.num{font-variant-numeric:tabular-nums;text-align:right}
.tile{background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.tile .n{font-family:var(--font-display);font-size:28px;font-weight:600;color:var(--ink);line-height:1.1}
.tile .l{color:var(--muted);font-size:12.5px;margin-top:4px}
.mono{font-family:var(--font-mono);font-size:12.5px}
.snippet{background:var(--surface-2);border-radius:8px;padding:12px 14px;font-family:var(--font-mono);font-size:12.5px;white-space:pre-wrap;word-break:break-all}
.muted{color:var(--muted)}
.section-title{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:18px 0 8px}
.tabs a{padding:8px 12px;border-bottom:2px solid transparent;color:var(--muted);font-weight:500;text-decoration:none;margin-bottom:-1px;display:inline-block}
.tabs a.active{color:var(--teal);border-bottom-color:var(--teal)}
.filters a{border:1px solid var(--line-strong);background:var(--surface);color:var(--ink-soft);border-radius:999px;padding:4px 12px;font-size:12.5px;text-decoration:none;display:inline-block}
.filters a.active{background:var(--teal-soft);border-color:var(--teal);color:var(--teal-ink)}
.eyebrow a{color:var(--muted);text-decoration:none}
.eyebrow a:hover{color:var(--teal)}
.doclist li a{color:var(--ink);text-decoration:none}

/* -- Page header --
   <div class="page-head">
     <div><div class="eyebrow"><a href="…">Parent</a> /</div><h1>Title</h1>
          <p class="sub">One plain line. <details class="more inline">…</details></p></div>
     <div class="actions"><a class="btn primary" href="…">Primary action</a></div>
   </div> */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap}
.page-head>div:first-child{flex:1 1 320px;min-width:0}
.page-head .eyebrow{margin-bottom:6px}
.page-head h1{font-size:24px;line-height:1.2}
.page-head .sub,.page-head p{color:var(--muted);margin:6px 0 0;max-width:72ch}
/* The actions' top sits level with the h1, below the eyebrow when there is one. */
.page-head>.actions{flex:0 0 auto}
.page-head:has(>div:first-child>.eyebrow:first-child)>.actions{margin-top:22px}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* -- Page widths --
   main caps every page at the data width (--content-max). A reading or form
   page wraps its page head and its cards in .page-narrow (--reading-max), so
   every edge on it ends on the same line. No page sets a width of its own. */
.page-narrow{max-width:var(--reading-max)}

/* -- Grids --
   Equal columns with the one gap; a card in a grid takes its spacing from the
   gap. Grid children may never widen their track: a long unbreakable line (a
   code snippet, a URL) would blow the column out past the viewport. */
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap)}
.grid2>*,.grid3>*{min-width:0}
.grid2>.card,.grid3>.card{margin-bottom:0}
.grid2:has(>.card),.grid3:has(>.card){margin-bottom:var(--gap)}

/* -- Card --
   .card-head holds the title and one line on the left, actions on the right;
   .card-foot closes a form card with its buttons; .card.flush lets a table
   reach the card's edges; .card.danger-zone holds destructive actions, last. */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:var(--card-pad-y) var(--card-pad-x);margin-bottom:var(--gap);box-shadow:var(--shadow)}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.card-head h2{font-size:16px;line-height:1.25;margin-bottom:2px}
.card-head>div:first-child{min-width:0;flex:1 1 260px}
.card-head .sub{color:var(--muted);font-size:13px;line-height:1.5;max-width:72ch}
.card-head>.actions,.card-head>.help-link,.card-head>.chip{flex:0 0 auto;margin-top:1px}
.card-foot{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.card-foot .help{margin-inline-end:auto}
.card.flush{padding:0;overflow:hidden}
.card.flush>.card-head{padding:var(--card-pad-y) var(--card-pad-x) 0}
.card.flush>.tablewrap{margin-top:4px}
.card.flush table th:first-child,.card.flush table td:first-child{padding-inline-start:var(--card-pad-x)}
.card.flush table th:last-child,.card.flush table td:last-child{padding-inline-end:var(--card-pad-x)}
.card.flush table tr:last-child td{border-bottom:0}
.card.danger-zone{border-color:var(--danger);border-left-width:3px}
.card.danger-zone h2{color:var(--danger)}

/* -- Summary tiles --
   A tile is a number and what it counts. As a link (a.tile) it filters the
   page below; the current filter carries aria-current="true". The
   Performance figures (.kpis > .kpi) are tiles too. */
.tiles,.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:var(--gap);margin-bottom:var(--gap)}
.tile,.kpi{padding:16px 18px;border-radius:var(--radius)}
.tile .d{font-size:12.5px;margin-top:6px;color:var(--muted)}
.tile .d.up{color:var(--ok)}
.tile .d.down{color:var(--danger)}
a.tile{display:block;text-decoration:none;color:inherit;transition:border-color .15s}
a.tile:hover{border-color:var(--teal)}
a.tile[aria-current="true"],a.tile.active{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal) inset}
.tile.attention{border-left:3px solid var(--amber)}
.tile.danger{border-left:3px solid var(--danger)}
.tile.danger .n{color:var(--danger)}

/* -- Status --
   The closed palette: success, warning, danger, info, neutral. The word is
   always printed; colour only repeats it. A chip is a label on its own; a
   .status line puts a small dot before the word, for table cells. The older
   chip names (ok, amber, teal) remain and match success, warning, info. */
.chip.success{background:var(--ok-soft);color:var(--ok)}
.chip.warning,.chip.amber{background:var(--amber-soft);color:var(--amber-ink)}
.chip.danger{background:var(--danger-soft);color:var(--danger)}
.chip.info{background:var(--teal-soft);color:var(--teal-ink)}
.chip.neutral{background:var(--surface-2);color:var(--ink-soft)}
.status{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--ink);white-space:nowrap}
.status::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--line-strong);flex:none}
.status.success::before{background:var(--ok)}
.status.warning::before{background:var(--amber)}
.status.danger::before{background:var(--danger)}
.status.info::before{background:var(--teal)}
.status.neutral::before{background:var(--muted)}
.status .why{color:var(--muted);font-size:12.5px;white-space:normal}

/* -- Empty state --
   Says what will appear here, and the one thing that makes it appear.
   <div class="empty"><h3>No leads yet</h3><p>One sentence.</p>
     <div class="actions"><a class="btn primary" href="…">Action</a></div></div> */
.empty{border:1px dashed var(--line-strong);border-radius:12px;padding:28px 24px;text-align:center;background:var(--surface);display:grid;gap:8px;justify-items:center}
.empty h3{font-size:15px}
.empty p{color:var(--muted);margin:0;max-width:52ch}
.empty .actions{justify-content:center;margin-top:6px}
.empty.compact{padding:18px 16px;border-style:solid;border-color:var(--line);background:var(--surface-2)}
td>.empty{margin:6px 0}

/* -- Tabs --
   Server-rendered links, one address per tab:
   <nav class="tabs" aria-label="Request type">
     <a href="?kind=all" aria-current="page">All <span class="count">12</span></a> … </nav> */
.tabs{flex-wrap:wrap}
.tabs a[aria-current="page"]{color:var(--teal);border-bottom-color:var(--teal)}
.tabs a:hover{color:var(--ink)}
.tabs .count{display:inline-block;min-width:20px;margin-inline-start:6px;padding:0 6px;border-radius:999px;background:var(--surface-2);color:var(--ink-soft);font-size:11.5px;font-variant-numeric:tabular-nums;text-align:center}
.tabs a[aria-current="page"] .count,.tabs a.active .count{background:var(--teal-soft);color:var(--teal-ink)}

/* -- Rows --
   Label and value pairs, one per line, optionally with an action:
   <dl class="rows"><div><dt>Label</dt><dd>Value</dd><dd class="row-action"><a>Change</a></dd></div></dl> */
dl.rows{margin:0;display:grid}
dl.rows>div{display:grid;grid-template-columns:minmax(140px,220px) minmax(0,1fr) auto;gap:4px 16px;align-items:baseline;padding:10px 0;border-top:1px solid var(--line)}
dl.rows>div:first-child{border-top:0;padding-top:2px}
dl.rows dt{color:var(--muted);font-size:13px}
dl.rows dd{margin:0;color:var(--ink);min-width:0;overflow-wrap:anywhere}
dl.rows dd.row-action{justify-self:end;font-size:13px}
@media (max-width:599.98px){dl.rows>div{grid-template-columns:minmax(0,1fr) auto}dl.rows dd:not(.row-action){grid-column:1 / -1}}

/* -- Tables --
   Wrap every table in .tablewrap so a narrow screen scrolls the table, not
   the page (give a many-column table class="wide"). .num right-aligns
   figures; td .sub is a second, quieter line;
   .t-actions keeps row actions together on the right; tr.attention and
   tr.problem mark a row that needs someone (with a word in the row too). */
/* Positioned, so the screen-reader-only text in its cells stays inside the scroll
   instead of widening the page. */
.tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:auto;position:relative}
/* A soft edge shows on a side only while columns are hidden past it: the two
   surface-coloured covers scroll with the table, the two shadows stay put. */
.tablewrap{background:linear-gradient(to right,var(--surface) 30%,transparent),linear-gradient(to left,var(--surface) 30%,transparent),linear-gradient(to right,color-mix(in srgb,var(--ink) 12%,transparent),transparent 14px),linear-gradient(to left,color-mix(in srgb,var(--ink) 12%,transparent),transparent 14px);background-position:left,right,left,right;background-repeat:no-repeat;background-size:40px 100%,40px 100%,14px 100%,14px 100%;background-attachment:local,local,scroll,scroll;background-color:var(--surface)}
.tablewrap>table.wide{min-width:640px}
table.compact td,table.compact th{padding-top:6px;padding-bottom:6px}
td .sub{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
th.t-actions,td.t-actions{text-align:right;white-space:nowrap;width:1%}
td.t-actions .actions{justify-content:flex-end;flex-wrap:nowrap}
tr.attention td:first-child{box-shadow:inset 3px 0 0 var(--amber)}
tr.problem td:first-child{box-shadow:inset 3px 0 0 var(--danger)}

/* -- Toolbar --
   Search, filters and selects above a list, on one wrapping line. */
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.toolbar .filters{margin-bottom:0}
.toolbar .spacer{flex:1 1 auto}
.toolbar .input{height:34px;font-size:13.5px}
.toolbar select.input{width:auto;min-width:140px}
.toolbar .search{flex:1 1 220px;max-width:340px}
.filters a[aria-current="true"],.filters a[aria-current="page"]{background:var(--teal-soft);border-color:var(--teal);color:var(--teal-ink)}
.filters .count{color:var(--muted);margin-inline-start:4px;font-variant-numeric:tabular-nums}

/* -- Form problems --
   A refused form re-renders with what was typed. One line at the top of the
   card says what happened; the box at fault is outlined and its message sits
   right under it (aria-invalid + aria-describedby on the input). */
.form-error{border-left:3px solid var(--danger);background:var(--danger-soft);color:var(--ink);padding:10px 14px;border-radius:8px;margin:0 0 14px;font-size:13.5px}
.field.has-error .input,.input[aria-invalid="true"]{border-color:var(--danger)}
.field.has-error label{color:var(--danger)}
.field-error{font-size:12.5px;color:var(--danger);font-weight:500}

/* -- Read-only --
   While the account is read-only the shell disables every form's controls
   except sign-out and one's own password; the server refuses regardless. */
.input:disabled,textarea.input:disabled,select.input:disabled{background:var(--surface-2);color:var(--muted);cursor:not-allowed}
.switch input:disabled,input[type=color]:disabled,input[type=radio]:disabled,input[type=checkbox]:disabled{cursor:not-allowed;opacity:.55}
.readonly-note{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}

/* -- Messages --
   .toast is the one-time result of the last action (role=status, or
   role=alert for a problem); .banner is a lasting state of the account or a
   feature. */
.toast{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 14px;border-radius:8px;margin-bottom:16px;font-weight:500;border:1px solid transparent}
.toast.ok{background:var(--ok-soft);color:var(--ok);border-color:color-mix(in srgb,var(--ok) 25%,transparent)}
.toast.danger{background:var(--danger-soft);color:var(--danger);border-color:color-mix(in srgb,var(--danger) 25%,transparent)}
.toast-close{flex:none;border:0;background:none;color:inherit;opacity:.7;cursor:pointer;font-size:18px;line-height:1;padding:0 2px}
.toast-close:hover{opacity:1}
.toast.leaving{opacity:0;transition:opacity .3s}
@media (prefers-reduced-motion:reduce){.toast.leaving{transition:none}}

/* -- Links and help --
   A link styled as a button is never underlined. Every page head ends its
   line of help with "Help for this page ›" (.help-link) into the manual. */
a.btn{text-decoration:none}
.btn.cta-off{opacity:.5;cursor:not-allowed}
.help-link{font-size:13px;white-space:nowrap}

/* -- Choices --
   Radio options shown as cards, the chosen one outlined. */
.choice-list{border:0;margin:0 0 14px;padding:0;display:grid;gap:8px}
.choice{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:10px;cursor:pointer;background:var(--surface)}
.choice:has(input:checked){border-color:var(--teal);box-shadow:0 0 0 2px var(--teal-soft)}
@supports not selector(:has(*)){.choice.on{border-color:var(--teal);box-shadow:0 0 0 2px var(--teal-soft)}}
.choice:has(input:focus-visible){outline:2px solid var(--teal);outline-offset:2px}
.choice input{margin-top:3px}
.choice>span{display:grid;gap:2px;color:var(--ink)}
.choice-list.cols3{grid-template-columns:repeat(3,minmax(0,1fr));margin:0}

/* -- Card spacing --
   .card-pad: a padded strip inside a flush card; .card-empty: an empty state
   inside a flush card. */
.card-pad{padding:14px var(--card-pad-x) 18px}
.card-pad .help{margin:0}
.card-empty{margin:14px var(--card-pad-x) 20px}

/* -- In-page confirmation --
   details.confirm opens a .confirm-box naming what is about to go. It stays
   in flow, not floating: a table scrolls sideways on narrow screens and
   would clip a popover. */
details.confirm{display:inline-block;text-align:start}
details.confirm>summary{list-style:none}
details.confirm>summary::-webkit-details-marker{display:none}
details.confirm[open]>summary{background:var(--surface-2)}
.confirm-box{margin-top:8px;width:min(300px,70vw);background:var(--surface);border:1px solid var(--danger);border-radius:10px;padding:12px 14px;box-shadow:var(--shadow);white-space:normal;display:grid;gap:10px;justify-items:start}
.confirm-box p{margin:0;font-size:13px;color:var(--ink)}

/* -- Navigation --
   Headed groups in the rail. The heading is a real h2 so screen-reader users
   can jump by it. Below 900 px the rail folds into a bar with a Menu button
   (and, while setting up, the current step); the open menu covers the page
   until a link, the button or Escape closes it. Without script the menu
   stays unfolded in the page's flow. */
.skip-link{position:absolute;left:12px;top:-60px;z-index:40;background:var(--surface);color:var(--teal);padding:8px 14px;border-radius:8px;box-shadow:var(--shadow);font-weight:600}
.skip-link:focus{top:12px}
main:focus{outline:none}
aside .rail-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
aside nav{gap:14px;overflow-y:auto;min-height:0}
/* The rail is dark in both themes: its scroll bar follows it, never a light track. */
aside{color-scheme:dark}
aside nav{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--rail-text) 28%,transparent) transparent}
.nav-group{display:flex;flex-direction:column;gap:2px}
.nav-group.plain{padding-top:12px;border-top:1px solid rgba(255,255,255,.1)}
.nav-heading{font-family:var(--font-mono);font-size:10px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--rail-text);opacity:.6;padding:0 12px 4px;margin:0}
.nav-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
aside nav a[aria-current="page"]{opacity:1;background:rgba(92,189,181,.22)}
.nav-toggle{display:none;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:transparent;color:var(--rail-text);font-weight:600;cursor:pointer}
aside .lockup img{display:block;height:26px;width:auto}
.bar-step{display:none;font-family:var(--font-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--rail-text);opacity:.75;margin-inline-start:auto;white-space:nowrap}
html.nav-locked{overflow:hidden}

/* -- Form fields in Arabic --
   An Arabic box keeps dir=rtl and lang=ar on the input only; its text
   starts on the right and reads one size up, as Arabic glyphs run small. */
.input[lang=ar]{font-size:15px;text-align:start}

/* -- Breakpoints --
   Four only, the same everywhere (page blocks below use these numbers too):
     1200  side-by-side layouts with a fixed panel stack; three columns become two
      900  the rail folds into a bar; two columns become one
      600  phone: pairs and rows stack, buttons take the full width
     1600+ wide screens: a wider rail and gutters */
@media (max-width:1199.98px){
  .appearance{grid-template-columns:minmax(0,1fr)}
  .grid3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .choice-list.cols3{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:899.98px){
  :root{--gutter-x:16px;--gutter-y:22px}
  #app{grid-template-columns:minmax(0,1fr)}
  main{padding-bottom:64px}
  aside{position:static;height:auto;padding:12px 16px;gap:10px}
  aside .rail-top{min-height:34px}
  aside .lockup{padding:0}
  .nav-toggle{display:inline-flex}
  .bar-step{display:inline}
  .js aside:not(.nav-open) nav,.js aside:not(.nav-open) .foot{display:none}
  aside .foot{margin-top:0}
  .js aside:not(.nav-open){position:sticky;top:0;z-index:30}
  :root.js{scroll-padding-top:72px}
  .js aside.nav-open{position:fixed;inset:0;z-index:40;height:auto;overflow-y:auto;overscroll-behavior:contain;gap:14px}
  .js aside.nav-open nav{overflow:visible}
  .grid2{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:599.98px){
  :root{--card-pad-y:16px;--card-pad-x:16px}
  h1,.page-head h1{font-size:22px}
  .grid3{grid-template-columns:minmax(0,1fr)}
  .row>.field.grow{flex:1 1 100%}
  .card-foot .btn,.step-foot .btn{flex:1 1 100%}
  .card-foot .help-link,.step-foot .help-link{flex:1 1 100%}
  .step-foot .spacer{display:none}
  .page-head:has(>div:first-child>.eyebrow:first-child)>.actions{margin-top:0}
}
@media (min-width:1600px){
  :root{--rail-w:248px;--gutter-x:48px}
  aside .lockup img{height:28px}
  /* Form columns keep a reading measure on wide screens. */
  .appearance{grid-template-columns:minmax(0,var(--reading-max)) var(--ap-preview-w);justify-content:start}
}

/* ======================================================================
   Page sections
   One block per page, for what only that page needs. Keep shared pieces in
   "Shared components" above.
   ====================================================================== */

/* -- Page: Documents (knowledge, upload, version, branch form) --
   The set-up checklist, the section heading over the branch cards, branch
   cards whose rows are real links, the version page's step line and two
   columns. */
.setup-card{border-left:3px solid var(--amber)}
.setup-card.blocker{border-left-color:var(--danger)}
.setup-card.suggestions{border-left-color:var(--line-strong)}
.setup-list{list-style:none;margin:0;padding:0}
.setup-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line);color:var(--ink)}
.setup-list li:first-child{border-top:0;padding-top:2px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:26px 0 12px}
.section-head .sub{color:var(--muted);font-size:13px;margin:4px 0 0}
.branch{margin:0;display:flex;flex-direction:column}
.branch h3{flex-wrap:wrap}
.branch .row{margin-top:auto;padding-top:4px}
.branch-empty{margin:4px 0 12px;padding-top:8px;border-top:1px solid var(--line)}
.doclist li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0;cursor:default}
.doclist li:hover{background:none;margin:0;padding:0}
.doclist li>a{flex:1 1 auto;min-width:0;display:block;padding:8px 0;color:var(--ink);text-decoration:none;font-weight:500}
.doclist li>a:hover{color:var(--teal)}
.doclist li>a .sub{display:block;color:var(--muted);font-size:12px;font-weight:400}
.doclist li .state{flex:none;text-align:end}
.doclist li .state .sub{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
.doclist li.problem{box-shadow:inset 3px 0 0 var(--danger);padding-inline-start:8px}
.steps{list-style:none;display:flex;flex-wrap:wrap;gap:6px 0;margin:-8px 0 18px;padding:0;font-size:13px;color:var(--muted)}
.steps li{display:flex;align-items:center;gap:6px;white-space:nowrap}
.steps li::after{order:-1;content:"";width:9px;height:9px;border-radius:50%;border:1.5px solid var(--line-strong);flex:none;box-sizing:border-box}
.steps li+li::before{order:-2;content:"";width:28px;height:1px;background:var(--line-strong);margin:0 8px}
.steps li.done{color:var(--ink)}
.steps li.done::after{background:var(--ok);border-color:var(--ok)}
.steps li.current{color:var(--ink);font-weight:600}
.steps li.current::after{background:var(--amber);border-color:var(--amber)}
.steps li.failed{color:var(--danger);font-weight:600}
.steps li.failed::after{background:var(--danger);border-color:var(--danger)}
.version-state{margin:-8px 0 18px}
.version-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:0 var(--gap);align-items:start}
@media (max-width:899.98px){.version-grid{grid-template-columns:minmax(0,1fr)}}
.publish-state{margin:6px 0 12px}
.parse-line{margin-bottom:12px}
.parse-numbers{margin-top:4px}
.parse-flags{margin:0;padding-left:18px;color:var(--ink-soft)}
.parse-flags li+li{margin-top:4px}
.parse-ok{margin:10px 0 0}
.upload-kind-help{margin:-8px 0 14px}
.upload-match{margin:2px 0 0}
.upload-next{max-width:none;margin:16px 0 0}
input[type=file].input{padding-top:8px}

/* -- Page: Approved answers -- */
.approved-filters{margin-bottom:14px}
.approved-why{color:var(--amber-ink);max-width:36ch;white-space:normal}
.numbers-rule{max-width:none}

/* -- Page: Appearance --
   Card titles, fieldsets that look like the other fields, the starter
   questions, and the bar that appears once something is unsaved. */
.ap-suggest-help{margin:0 0 12px}
fieldset.field,fieldset.ap-questions{border:0;margin:0 0 14px;padding:0;min-width:0}
fieldset.field>legend,fieldset.ap-questions>legend{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:0;margin-bottom:6px}
.ap-switch{display:flex;gap:8px;align-items:center;margin-bottom:12px;color:var(--ink);cursor:pointer}
.ap-question{margin-bottom:8px;flex-wrap:nowrap}
.ap-question .input{flex:1 1 auto;min-width:0}
.input.hex{width:120px}
.field .radios label{font-family:var(--font-body);font-size:14px;letter-spacing:0;text-transform:none;color:var(--ink)}
.save-bar{position:sticky;bottom:12px;z-index:5;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border:1px solid var(--teal);border-radius:12px;background:var(--surface);box-shadow:var(--shadow);color:var(--ink);font-weight:500}
.save-bar>span{margin-inline-end:auto}
/* The four sections: a heading button opens and closes each; closed, it shows a
   one-line summary. Without script every section stays open. */
.card.ap-sec{padding:0}
.ap-sec-head{display:flex;align-items:center;gap:12px}
.card .ap-sec-h{flex:1;min-width:0;margin:0;font-size:inherit}
.ap-sec-toggle{display:flex;align-items:center;gap:12px;width:100%;min-height:60px;margin:0;padding:14px var(--card-pad-x);border:0;border-radius:var(--radius);background:none;color:var(--ink);font:inherit;text-align:start;cursor:pointer}
.ap-sec-toggle:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
.ap-sec-icon{flex:none;width:22px;height:22px;color:var(--ink-soft)}
.ap-sec-title{font-family:var(--font-display);font-weight:600;font-size:16px;white-space:nowrap}
.ap-sec-sum{flex:1;min-width:0;text-align:end;color:var(--muted);font-family:var(--font-body);font-weight:400;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ap-sec[data-open="true"] .ap-sec-sum{visibility:hidden}
.ap-chev{flex:none;width:18px;height:18px;color:var(--ink-soft);transition:transform .15s}
.ap-sec[data-open="true"] .ap-chev{transform:rotate(180deg)}
.ap-sec-switch{flex:none;margin-inline-end:var(--card-pad-x);color:var(--ink);font-weight:600}
.ap-sec-body{padding:18px var(--card-pad-x) var(--card-pad-y);border-top:1px solid var(--line)}
.js .ap-sec[data-open="false"] .ap-sec-body{display:none}
.ap-sub-h{margin:22px 0 10px;padding-top:18px;border-top:1px solid var(--line);font-size:14.5px}
.ap-logo-note{margin:8px 0 6px;padding:8px 12px;border-inline-start:3px solid var(--amber);border-radius:8px;background:var(--amber-soft);color:var(--ink);font-size:13px;line-height:1.5}
.ap-greeting-time .input{max-width:220px}
#ap-greeting-fields{margin-top:14px}
.ap-pv-btns{gap:6px;flex-wrap:wrap;justify-content:flex-end}
.ap-mobile-bar{display:none}
@media (prefers-reduced-motion:reduce){.ap-chev{transition:none}}
/* Below the side-by-side width: the preview first, compact while the chat is closed,
   and a bar fixed at the bottom with Preview, Discard and Save. The page leaves room
   for the bar (and the phone's safe area), so it never covers a field, a message or
   the focused control. */
@media (max-width:1199.98px){
  .appearance .ap-stage{order:-1;position:static;max-height:none;height:auto;overflow:visible}
  .ap-stage .ap-pv-area{flex:none;height:min(560px,72vh);min-height:0}
  .ap-wide .ap-stage .ap-pv-area{height:min(800px,85vh)}
  .ap-stage.ap-closed .ap-pv-area{height:220px}
  .appearance .save-bar{display:none}
  .ap-head-actions{display:none}
  .ap-mobile-bar{display:flex;position:fixed;inset:auto 0 0 0;z-index:35;align-items:center;gap:8px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right));background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 18px -12px rgba(22,35,42,.3)}
  .ap-mb-state{flex:1;min-width:0;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  main:has(.ap-mobile-bar){padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  html:has(.ap-mobile-bar){scroll-padding-bottom:calc(88px + env(safe-area-inset-bottom))}
}
/* While the rail still stands beside the page (900-1199), the bar starts after it. */
@media (min-width:900px) and (max-width:1199.98px){
  .ap-mobile-bar{inset-inline-start:var(--rail-w)}
}
@media (max-width:599.98px){
  .ap-sec-toggle{flex-wrap:wrap;row-gap:2px}
  .ap-sec-title{flex:1}
  .ap-sec-sum{order:3;flex-basis:100%;padding-inline-start:34px;text-align:start;white-space:normal}
  .ap-sec[data-open="true"] .ap-sec-sum{display:none}
}

/* -- Page: Wording -- */
.voice-rest-h{font-size:15px;margin:22px 0 10px}
details.group>summary .group-title{font-family:var(--font-display);font-weight:600;font-size:15px;color:var(--ink)}
.editor .field{margin-bottom:0}

/* -- Page: Leads & requests --
   Banners keep their actions on the right; the tiles filter the list; each
   request is a disclosure row whose summary lines up in five columns on wide
   screens and stacks into a small card on narrow ones. */
.leads-banner>span:first-child{flex:1 1 320px}
.leads-card .tabs{margin-bottom:10px}
.leads-overlap{margin:0 0 12px}
.leads-select{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.leads-range{margin:0 0 8px}
.req-head,.req>details>summary{display:grid;grid-template-columns:minmax(132px,1.1fr) minmax(130px,1fr) minmax(0,2fr) minmax(150px,1.3fr) minmax(100px,.9fr) 14px;gap:14px;align-items:start}
.req-head{padding:8px 12px;background:var(--surface-2);border-radius:8px 8px 0 0;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.req-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.req{border-bottom:1px solid var(--line)}
.req>details>summary{list-style:none;cursor:pointer;padding:12px;font-size:13.5px;color:var(--ink)}
.req>details>summary::-webkit-details-marker{display:none}
.req>details>summary::after{content:"›";color:var(--muted);font-size:16px;line-height:1;justify-self:end;transition:transform .15s}
.req>details[open]>summary::after{transform:rotate(90deg)}
.req>details>summary:hover{background:var(--paper)}
.req>details[open]>summary{background:var(--surface-2)}
.req.problem>details>summary{box-shadow:inset 3px 0 0 var(--danger)}
.req.attention>details>summary{box-shadow:inset 3px 0 0 var(--amber)}
.req .sub{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.req .title{font-weight:600}
.req-q{min-width:0;color:var(--ink-soft);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}
.req-status{display:flex;flex-direction:column;gap:2px;min-width:0}
.req-status .why{color:var(--muted);font-size:12.5px}
.req-ref{min-width:0;overflow-wrap:anywhere}
.req-body{padding:14px 12px 18px;border-top:1px solid var(--line)}
.req-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
.req-cols h3{font-size:13.5px;margin:0 0 8px}
.req-cols p{margin:0 0 8px}
.req-questions{margin:0 0 8px;padding-inline-start:20px;display:grid;gap:4px}
.req-body dl.rows>div{grid-template-columns:minmax(110px,160px) minmax(0,1fr);padding:7px 0}
.req-tech{margin-top:12px}
.req-tech dl.rows{margin-top:8px}
.leads-pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:14px}
.leads-pager [aria-disabled="true"]{opacity:.45;pointer-events:none}
@media (max-width:1199.98px){
  .req-head{display:none}
  .req>details>summary{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"what status" "why why" "q q" "when ref";gap:4px 12px}
  .req>details>summary::after{display:none}
  .req-what{grid-area:what}
  .req-status{display:contents}
  .req-status .status{grid-area:status;justify-self:end}
  .req-status .why{grid-area:why}
  .req-q{grid-area:q}
  .req-when{grid-area:when;color:var(--muted);font-size:12.5px}
  .req-when .sub{display:inline;margin-inline-start:6px}
  .req-ref{grid-area:ref;justify-self:end;text-align:end}
  .req-cols{grid-template-columns:minmax(0,1fr);gap:16px}
}
/* Four tiles read as one row, or two rows of two - never three and a lone fourth. */
.leads-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1199.98px){.leads-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:599.98px){
  .leads-toolbar .search{max-width:none;flex-basis:100%}
  .req-body dl.rows>div{grid-template-columns:minmax(0,1fr)}
  .leads-tiles{gap:10px}
  .leads-tiles .tile{padding:12px 14px}
  .leads-tiles .tile .n{font-size:22px}
  .leads-card .tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .leads-card .tabs a{padding:8px 10px;white-space:nowrap}
  .req>details>summary{padding:12px 6px 12px 12px}
  .req-body{padding:12px 4px 16px}
}

/* -- Page: Performance --
   The six figures read as one row, or two rows of three (three of two on a
   phone), never five and a lone sixth. */
.kpis{grid-template-columns:repeat(6,minmax(0,1fr))}
@media (max-width:1199.98px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:599.98px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.perf-stack>.card:last-child{margin-bottom:0}
.perf-empty h2{font-size:15px}
.perf-note{margin:12px 0 0}
.perf-numbers{margin-top:14px}
.perf-numbers>summary{font-size:13px}
.perf-numbers .grid2{margin-top:10px;align-items:start}
.perf-count{width:88px}

/* -- Page: Conversations --
   The list and the staff-access table sit in flush cards; the transcript's
   reply parts are styled here instead of inline. */
.conv-state .actions{margin-top:12px}
.conv-toolbar{padding:0 var(--card-pad-x)}
.conv-range{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--ink-soft)}
.conv-range[hidden]{display:none}
.conv-pages{display:flex;justify-content:space-between;align-items:center}
a.src{text-decoration:none}
a.src:hover{text-decoration:underline}
.conv-empty{margin:4px var(--card-pad-x) 22px}
.conv-when{white-space:nowrap;color:var(--muted);font-size:12.5px}
.conv-first{max-width:420px;color:var(--ink);overflow-wrap:anywhere}
tr.conv-open td{background:var(--teal-soft)}
.conv-facts{margin:0 0 16px}
.thread .tx{margin:0 0 6px}
.thread .tx:last-child{margin-bottom:0}
.thread ul.tx{padding-inline-start:18px}
.thread .tx-note{color:var(--amber-ink)}
.thread .tx-risk{font-size:11.5px;color:var(--muted)}
.thread .tx-meta{color:var(--muted)}
.thread p.redact{display:inline-block}
.strip .conv-answer{font-size:12.5px;margin-top:2px}

/* -- Page: Settings --
   Four tabs; each card has its title and one line on the left and its form on
   the right (stacked on narrow screens), and saves on its own. */
.settings-tabs{margin-bottom:10px}
.settings-summary{display:flex;flex-wrap:wrap;gap:4px 0;color:var(--muted);font-size:13px;margin:0 0 18px}
.settings-summary span+span::before{content:"·";margin:0 8px;color:var(--line-strong)}
.settings-readonly{margin:-8px 0 16px}
.settings-steps-intro{color:var(--ink-soft);margin:0 0 16px}
.settings-card{display:grid;grid-template-columns:minmax(200px,280px) minmax(0,1fr);gap:12px 32px;align-items:start}
.settings-intro h2{margin:2px 0 6px}
.settings-intro .sub{color:var(--muted);font-size:13px;margin:0 0 6px}
.settings-intro details.more>p{font-size:13px}
.settings-body{min-width:0}
.delivery-choice{border:0;margin:0 0 18px;padding:0;min-width:0}
.delivery-choice>legend{font-weight:600;margin:0 0 8px;padding:0}
.delivery-choice .choice-list{margin-bottom:10px}
.delivery-choice:has(input[value="endpoint"]:checked) .for-email{display:none}
.delivery-choice:has(input[value="email"]:checked) .for-endpoint{display:none}
.settings-body>.field:last-of-type{margin-bottom:0}
.settings-card .step{display:inline-block;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--teal-ink);background:var(--teal-soft);border-radius:999px;padding:2px 8px}
@media (max-width:1199.98px){.settings-card{grid-template-columns:minmax(0,1fr)}}
@media (min-width:1600px){.settings-card{grid-template-columns:280px minmax(0,var(--reading-max))}}
#default_entity{max-width:420px}
/* A card whose form is a wide table: the intro above it, not beside it. */
.settings-card.stacked{grid-template-columns:minmax(0,1fr)}
.settings-card.stacked .settings-intro{max-width:72ch}
.entity-names th[scope="row"]{font-family:var(--font-body);font-size:13.5px;letter-spacing:0;text-transform:none;color:var(--ink);background:none;border-bottom:1px solid var(--line);white-space:normal;vertical-align:top;padding-top:16px}
.entity-names th[scope="row"] .sub{display:block;color:var(--muted);font-size:12px;margin-top:2px}
/* The risk warning as the chat window's footer shows it. */
.risk-preview{border:1px dashed var(--line-strong);border-radius:10px;padding:10px 14px;background:var(--surface-2);margin:0 0 4px}
.risk-preview-label{display:block;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}
.risk-preview p{margin:0;font-size:12.5px;color:var(--ink-soft)}
/* Repeated rows: contacts (name + value) and website addresses (one box). */
.repeat{display:grid;gap:8px;margin-bottom:14px;justify-items:start}
.repeat-head,.repeat-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto;gap:8px;align-items:start;width:100%}
.repeat-row.single{grid-template-columns:minmax(0,1fr) auto}
.repeat-head span{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.repeat-row .field{margin:0}
.repeat-row>.btn{margin-top:4px}
@media (max-width:599.98px){.repeat-head{display:none}.repeat-row{grid-template-columns:minmax(0,1fr) auto}.repeat-row .field+.field{grid-column:1}}
/* Links: one per row, the label with whether it is set. */
.link-list{list-style:none;margin:0;padding:0;display:grid;gap:0}
.link-list>li{padding:12px 0;margin:0;border-top:1px solid var(--line)}
.link-list>li:first-child{border-top:0;padding-top:0}
.link-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
/* Positioned, so its hidden label stays inside the table's sideways scroll. */
td>.cell-field{margin:0;position:relative}
td>.cell-field .input{min-width:160px}
/* Website & connections */
.snippet-box{white-space:pre-wrap;word-break:break-all;margin-top:8px}
.snippet-actions{margin:8px 0 16px}
.settings-body h3{margin-top:2px}
.developer-fold{border-top:1px solid var(--line);padding-top:12px}
.developer-fold[open]>summary{margin-bottom:10px}
/* API access: a new key, shown once. */
.key-once{border-color:var(--ok);border-left-width:3px}
.key-once .sub{color:var(--muted);margin:4px 0 12px}
.key-once-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.connection-password{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:12px;padding:10px 12px;border:1px solid var(--line);border-radius:8px}
.inline-form{display:inline}
.connection-password-text{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.connection-password-text .help{flex-basis:100%;margin:0}
.key-once-row code{flex:1 1 320px;min-width:0;background:var(--surface-2);border-radius:8px;padding:9px 12px;overflow-wrap:anywhere;color:var(--ink)}
/* Team */
.password-row{display:flex;gap:8px;align-items:center}
.password-row .input{flex:1 1 auto;min-width:0}

/* -- Page: Plan & account --
   The normal page, and the locked one (suspended or closed) drawn on the
   sign-in card, which keeps its own password section. */
#your-sign-in .field{max-width:420px}
dl.rows dd .chip{margin-inline-start:6px}
.account-data-note{margin:0}
.account-when{white-space:nowrap;color:var(--muted);font-size:12.5px}
.account-empty{margin:4px var(--card-pad-x) 22px}
.account-locked{max-width:520px}
.account-locked .account-locked-name{margin:22px 0 0}
.account-locked h1{margin-top:6px}
.account-locked-export{display:flex;width:100%;margin:0 0 14px}
.account-locked-out{margin-top:16px}
.account-locked-out .btn{width:100%}
.account-signin-locked{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.account-signin-locked .card-head{margin-bottom:8px}
.account-signin-locked .card-head .sub{margin-bottom:0}
.account-signin-foot .btn{width:100%}

/* -- Page: Help --
   The grouped contents beside the manual. */
.guide-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start}
.guide-index{position:sticky;top:20px;max-height:calc(100vh - 40px);overflow-y:auto;font-size:13.5px;padding-bottom:12px}
.guide-index .guide-find{margin-bottom:16px}
.guide-index .guide-find .input{height:34px;font-size:13.5px}
.guide-group{font-family:var(--font-mono);font-size:10.5px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:14px 0 6px}
.guide-index ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.guide-index a{display:block;padding:4px 8px;border-radius:6px;color:var(--ink-soft);text-decoration:none}
.guide-index a:hover{background:var(--surface-2);color:var(--teal)}
.guide-body>.card{scroll-margin-top:16px}
.guide-body p,.guide-body li,.guide-body dd{max-width:72ch}
.guide-body td p,.guide-body td li{max-width:none}
.guide-body>.card:target{border-color:var(--teal);box-shadow:0 0 0 2px var(--teal-soft)}
@media (max-width:899.98px){.guide-layout{grid-template-columns:minmax(0,1fr)}.guide-index{position:static;max-height:none}}

/* -- Page: Sign-in (login, authenticator, recovery codes, password reset) -- */
.login-card.wide{max-width:480px}
.login-card .toast{margin:0 0 16px}
.login-card .sub{margin-top:0}
.signin-submit{width:100%}
.signin-next{margin:8px 0 0;text-align:center}
.signin-links{display:flex;flex-direction:column;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line);font-size:13.5px}
.signin-links .btn.link{justify-content:flex-start;font-weight:500}
.signin-foot{margin:12px 0 0}
.signin-steps{list-style:none;counter-reset:step;margin:0;padding:0;display:grid;gap:18px}
.signin-steps>li{counter-increment:step;position:relative;padding-inline-start:36px}
.signin-steps>li::before{content:counter(step);position:absolute;inset-inline-start:0;top:-1px;width:24px;height:24px;border-radius:50%;background:var(--teal-soft);color:var(--teal-ink);font-weight:600;font-size:12.5px;display:grid;place-items:center}
.signin-steps h2{font-size:14.5px;margin-bottom:4px}
.signin-steps .help{margin:0}
.enrol-key{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap;margin-top:8px}
.enrol-key .qr{width:150px;height:150px;flex:none;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px}
.enrol-key .manual{flex:1 1 180px;min-width:0;display:grid;gap:8px;justify-items:start}
#totp-key{font-size:14px;letter-spacing:.06em;color:var(--ink);background:var(--surface-2);border-radius:6px;padding:6px 8px}
#recovery-codes{column-count:2;column-gap:24px;font-size:14px;line-height:1.9;color:var(--ink);margin:0 0 12px}
.codes-actions{margin-bottom:16px}
.stored-check{display:flex;gap:8px;align-items:center;margin-bottom:14px;color:var(--ink);cursor:pointer}
/* -- Page: Setup (a new workspace's steps, the rail that lists them, and the
   Documents page's welcome after Go live) --
   While a workspace sets up, the rail lists the steps (.steps-rail) instead of
   the menu, and the main area shows one step: .step-head, .why-line, the
   step's cards, then .step-foot with Back / Continue. */
.setup-nav{gap:4px}
.setup-nav .nav-heading{padding:0 10px 4px}
.steps-rail{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-direction:column;gap:1px}
.steps-rail a{display:grid;grid-template-columns:20px minmax(0,1fr);gap:1px 10px;align-items:center;padding:5px 8px;font-size:13.5px;font-weight:500;line-height:1.3}
.steps-rail a[aria-current="step"]{opacity:1;background:color-mix(in srgb,var(--teal) 28%,transparent)}
.steps-rail .dot{width:20px;height:20px;border-radius:50%;border:1.5px dashed color-mix(in srgb,var(--rail-text) 45%,transparent);display:grid;place-items:center;font-family:var(--font-mono);font-size:10px;line-height:1}
.steps-rail .done .dot{background:var(--ok);border:0;color:var(--surface)}
.steps-rail .waiting .dot{border-style:solid;border-color:var(--amber);color:var(--amber)}
.steps-rail .blocked .dot{border-style:solid;border-color:color-mix(in srgb,var(--danger) 60%,var(--rail-text));color:color-mix(in srgb,var(--danger) 60%,var(--rail-text));font-weight:700}
.steps-rail .name{min-width:0}
@media (min-width:1600px){.steps-rail a{font-size:14.5px}}
.steps-rail .sub{grid-column:2;font-size:11.5px;opacity:.7;font-weight:400}
.step-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.step-head .eyebrow{margin-bottom:4px}
.step-head .state-chip{margin-top:6px}
.why-line{color:var(--ink-soft);font-size:13.5px;margin:0 0 14px;max-width:66ch}
.step-fold{margin:0 0 14px}
.step-foot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.step-foot .spacer{flex:1}
.step-foot .help{margin:0;flex:1 1 260px}
.go-live-note{margin-top:8px}
.setup-step .help-link{font-size:12.5px;white-space:nowrap}
.setup-step .card-foot .help-link{margin-inline-end:auto}
.setup-step .card-foot .help-link:has(+ .ax-help-ask){margin-inline-end:0}
.setup-step .card-foot .help-link + .ax-help-ask{margin-inline-end:auto}
.setup-step .optional{text-transform:none;letter-spacing:0;font-family:var(--font-body);font-size:12px}
.setup-step .label{display:block;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.blocked-note{border-left:3px solid var(--danger);background:var(--danger-soft);border-radius:10px;padding:10px 14px;margin:0 0 16px;color:var(--ink);font-size:13.5px}
.pending{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;border-left:3px solid var(--amber);background:var(--amber-soft);border-radius:10px;padding:12px 14px;margin:0 0 16px;color:var(--ink);font-size:13.5px}
.pending .ico{width:28px;height:28px;border-radius:50%;background:var(--amber);color:var(--surface);display:grid;place-items:center;font-family:var(--font-mono)}
.pending .acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;align-items:center}
.example{color:var(--muted);font-style:italic;background:var(--surface-2);border:1px dashed var(--line-strong);border-radius:8px;padding:8px 12px;font-size:13px;margin:0 0 12px;max-width:62ch}
/* Step 2: the yes/no question; the fields of an answer appear with it. */
.yn-field{border:0;padding:0;margin:0 0 10px}
fieldset.yn-field>legend{color:var(--ink);font-weight:600;margin-bottom:8px;padding:0;font-family:var(--font-body);font-size:14px;letter-spacing:0;text-transform:none}
.yn{display:flex;gap:8px;flex-wrap:wrap}
.setup-step .yn label{font-family:var(--font-body);font-size:13.5px;letter-spacing:0;text-transform:none}
.yn label{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--ink);padding:8px 14px;cursor:pointer;font-weight:600}
.yn label:has(input:checked){border-color:var(--teal);background:var(--teal-soft);color:var(--teal-ink)}
.yn label:has(input:focus-visible){outline:2px solid var(--teal);outline-offset:2px}
.risk-step .risk-no,.risk-step .risk-fields{display:none}
.risk-step:has(input[value="no"]:checked) .risk-no{display:block}
.risk-step:has(input[value="yes"]:checked) .risk-fields{display:block}
@supports not selector(:has(*)){.risk-step .risk-fields{display:block}}
/* Step 3: the trust line, the branch question, the knowledge-base picture with
   its boxes and document rows, the upload and branch panels, the rules. A
   row's state is always printed; its left edge only repeats it in colour. */
.assure{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0 0 var(--gap);padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:12.5px;color:var(--ink-soft)}
.assure span{position:relative;padding-inline-start:13px}
.assure span::before{content:"";position:absolute;inset-inline-start:0;top:.6em;width:6px;height:6px;border-radius:50%;background:var(--teal)}
.assure b{color:var(--ink);font-weight:600}
.choice2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 12px}
.pick{position:relative;border:1px solid var(--line-strong);border-radius:10px;padding:14px;padding-inline-start:40px;background:var(--surface);display:grid;gap:3px;align-content:start;color:inherit;text-decoration:none;transition:border-color .15s}
.pick b{color:var(--ink);font-size:14px}
.pick span:not(.pick-mark){font-size:12.5px;color:var(--muted)}
.pick-mark{position:absolute;inset-inline-start:14px;top:16px;width:16px;height:16px;border-radius:50%;border:1.5px solid var(--line-strong);background:var(--surface)}
.pick:hover{border-color:var(--teal)}
.pick[aria-current="true"]{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal) inset;background:var(--teal-soft)}
.pick[aria-current="true"] .pick-mark{border-color:var(--teal);background:radial-gradient(circle,var(--teal) 0 4px,transparent 4.5px)}
.main-pick{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);display:grid;gap:8px;justify-items:start}
.main-pick .help{margin:0}
.kb-progress{font-family:var(--font-mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--teal-ink);background:var(--teal-soft);padding:5px 10px;border-radius:999px;white-space:nowrap;margin-top:2px}
.kb{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--gap);margin:4px 0 var(--gap)}
.kb.single{grid-template-columns:minmax(0,1fr)}
.kb .box{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);min-height:150px;display:flex;flex-direction:column;min-width:0;overflow:hidden}
.kb .box.general{border-color:var(--teal)}
.box-head{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.kb .box.general .box-head{background:var(--teal-soft)}
.box-head h3{font-size:14px;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.box-count{font-size:12px;color:var(--ink-soft);white-space:nowrap;font-variant-numeric:tabular-nums}
.kb .box .who{font-size:12.5px;color:var(--muted);margin:10px 14px 6px}
.kb .box .doc-list{list-style:none;margin:0;padding:0 14px;flex:1}
.kb .box .empty-line{font-size:13px;color:var(--ink-soft);margin:4px 14px 8px;flex:1;padding:10px 12px;border:1px dashed var(--line-strong);border-radius:8px;background:var(--paper)}
.kb .box .foot{margin-top:auto;padding:10px 14px 14px;display:flex;gap:6px;flex-wrap:wrap}
.kb .box.add{border-style:dashed;justify-content:center;align-items:center;text-align:center;color:var(--ink-soft);text-decoration:none;gap:2px;padding:16px;min-height:150px}
.kb .box.add .add-mark{width:28px;height:28px;border-radius:50%;border:1.5px dashed var(--line-strong);display:grid;place-items:center;font-size:16px;margin-bottom:6px}
.kb .box.add b{color:var(--ink)}
.kb .box.add:hover{border-color:var(--teal);color:var(--teal)}
.kb .box.add:hover .add-mark{border-color:var(--teal)}
.doc-row{position:relative;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;padding-inline-start:10px;border-top:1px solid var(--line);font-size:13px;flex-wrap:wrap}
.doc-row::before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--line-strong)}
.doc-row:first-child{border-top:0}
.doc-row.st-ready::before{background:var(--teal)}
.doc-row.st-reading::before,.doc-row.st-paused::before{background:var(--amber)}
.doc-row.st-failed::before{background:var(--danger)}
.doc-row.st-live::before,.doc-row.st-scheduled::before{background:var(--ok)}
.doc-main{display:grid;gap:2px;min-width:0;flex:1 1 160px}
.doc-main a{color:var(--ink);font-weight:500;text-decoration:none;overflow-wrap:anywhere}
.doc-main a:hover{color:var(--teal)}
.doc-meta{font-size:12px;color:var(--muted)}
.doc-action{flex:none}
.publish-inline{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.publish-inline .input{height:30px;width:auto;font-size:12.5px;padding:0 8px}
.panel{border:1px solid var(--teal);border-radius:var(--radius);padding:18px 20px 20px;background:var(--surface);margin:4px 0 var(--gap);scroll-margin-top:16px}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.panel-head .eyebrow{margin-bottom:4px}
.panel-head h3{font-size:15px}
.panel .card-foot{justify-content:flex-end;margin-top:12px}
.file-drop{display:grid;gap:4px;justify-items:center;text-align:center;padding:18px 16px;border:1.5px dashed var(--muted);border-radius:10px;background:var(--paper);position:relative}
.file-drop-text,.file-name{display:none}
.file-drop .help{margin:0;color:var(--ink-soft)}
/* With script, the native box covers the whole zone invisibly, so a click or
   a dropped file anywhere in it chooses the file; the chosen name is printed
   below. Without script the native box shows as it is. */
.js .file-drop{cursor:pointer}
.js .file-drop:hover,.js .file-drop:has(input:focus-visible){border-color:var(--teal);background:var(--teal-soft)}
.js .file-drop input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0;border:0}
.js .file-drop-text{display:block;font-size:14px;color:var(--ink)}
.js .file-drop-text b{color:var(--teal)}
.js .file-name{display:block;font-size:13px;font-weight:600;color:var(--teal-ink);overflow-wrap:anywhere}
.next-steps{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;counter-reset:nx}
.next-steps li{counter-increment:nx;display:grid;gap:2px;padding:10px 12px;padding-inline-start:36px;position:relative;border:1px solid var(--line);border-radius:10px;font-size:12.5px;color:var(--muted);background:var(--surface)}
.next-steps li::before{content:counter(nx);position:absolute;inset-inline-start:11px;top:11px;width:18px;height:18px;border-radius:50%;background:var(--teal-soft);color:var(--teal-ink);font-size:11px;font-weight:600;display:grid;place-items:center}
.next-steps b{color:var(--ink);font-size:13px}
.rules{margin:4px 0 0;padding:0;list-style:none;counter-reset:rule;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 var(--gap)}
.rules li{counter-increment:rule;display:grid;gap:4px;align-content:start;font-size:13px;padding:12px 0;padding-inline-start:32px;border-top:1px solid var(--line);position:relative}
.rules li:nth-child(-n+2){border-top:0}
.rules li::before{content:counter(rule);position:absolute;inset-inline-start:0;top:13px;width:22px;height:22px;border-radius:50%;background:var(--teal-soft);color:var(--teal-ink);font-size:11.5px;font-weight:600;display:grid;place-items:center}
.rules b{color:var(--ink);font-size:13.5px}
.rules .gb{display:grid;gap:4px;margin-top:4px;font-size:12.5px}
.rules .g,.rules .b{display:flex;gap:8px;align-items:flex-start;padding:6px 10px;border-radius:8px;color:var(--ink-soft);background:var(--surface-2)}
.rules .g::before{content:"✓";color:var(--ok);font-weight:700;flex:none}
.rules .b::before{content:"✗";color:var(--danger);font-weight:700;flex:none}
.tpl{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:14px 0 8px;padding-top:14px;border-top:1px solid var(--line)}
.tpl-label{flex:0 0 100%;font-size:13px;color:var(--ink);font-weight:500}
.tpl-file{display:inline-flex;align-items:center;gap:8px;padding:7px 12px 7px 8px;border:1px solid var(--line-strong);border-radius:8px;color:var(--ink);text-decoration:none;font-size:13px;font-weight:500;background:var(--surface)}
.tpl-file:hover{border-color:var(--teal);color:var(--teal)}
.tpl-ext{font-family:var(--font-mono);font-size:9.5px;letter-spacing:.08em;padding:2px 5px;border-radius:4px;background:var(--surface-2);color:var(--ink-soft)}
.tpl .help{flex:0 0 100%;margin:2px 0 0}
@media (max-width:899.98px){.rules{grid-template-columns:minmax(0,1fr)}.rules li:nth-child(2){border-top:1px solid var(--line)}}
@media (max-width:599.98px){
  .choice2,.next-steps,.kb,.pair{grid-template-columns:minmax(0,1fr)}
  .assure{flex-direction:column;gap:6px}
  .publish-inline{width:100%}.publish-inline .input{flex:1}
  .panel{padding:14px}
  .panel-head{flex-wrap:wrap}
}
/* Step 4: the compact form beside the worked example and the saved answers. */
.oa{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:var(--gap);align-items:start;margin-bottom:var(--gap)}
.oa>.card{margin:0}
.oa .eyebrow{margin-bottom:8px}
.oa .field{margin-bottom:10px}
.oa textarea.input{min-height:60px}
.oa-ex{background:var(--surface-2);border:1px dashed var(--line-strong);border-radius:10px;padding:12px 14px;font-size:12.5px}
.oa-ex dl{margin:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px}
.oa-ex dt{color:var(--muted)}
.oa-ex dd{margin:0;color:var(--ink)}
.oa-list{margin-top:14px}
.oa-list ul{list-style:none;margin:0 0 10px;padding:0}
.oa-list .doc-row a{display:grid;gap:1px;color:inherit;text-decoration:none;min-width:0;flex:1 1 160px}
.oa-list .doc-row a b{color:var(--ink)}
.oa-list .doc-row a:hover b{color:var(--teal)}
/* The saved answers and the invitations are plain rows, without a state edge. */
.oa-list .doc-row,.invites .doc-row{padding-inline-start:0}
.oa-list .doc-row::before,.invites .doc-row::before{content:none}
.oa-list .doc-row.editing{background:var(--teal-soft);border-radius:8px;padding-inline:8px}
/* Step 5: how it answers, beside the real preview and what holds answers back. */
.hub2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--gap);align-items:start}
.explain{margin:0;padding-inline-start:18px;font-size:13.5px;color:var(--ink-soft)}
.explain li{margin:4px 0}
.setup-preview{width:100%;height:560px;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);background:var(--surface);display:block}
.faq-chips{margin-bottom:10px}
.faq-chips .chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chip-btn{border:1px solid var(--line-strong);background:var(--surface);border-radius:999px;padding:6px 12px;font-size:12.5px;cursor:pointer;color:var(--ink);text-align:start}
.chip-btn:hover{border-color:var(--teal);color:var(--teal-ink)}
.why-box{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface);margin-top:12px;font-size:13px}
.why-box .eyebrow{margin-bottom:4px}
.why-box p{margin:0 0 6px;color:var(--ink-soft)}
.why-box.gap{border-left:3px solid var(--amber)}
.why-box.blocked{border-left:3px solid var(--danger)}
.why-box .acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
/* Steps 6 and 7. */
.colour{padding:4px;height:40px;width:72px}
.logo-thumb{height:32px;width:auto;max-width:120px;border:1px dashed var(--line-strong);border-radius:6px;padding:2px}
.logo-pick:focus-visible+label{outline:2px solid var(--teal);outline-offset:2px}
.invite-row{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.invite-row .field{margin-bottom:0;min-width:220px}
.invites{list-style:none;margin:14px 0 4px;padding:0}
/* Step 8: readiness, the address and the code, Go live. */
.ready{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:13.5px}
.ready li{display:flex;gap:8px;align-items:baseline;color:var(--ink)}
.ready .mark{font-weight:700;width:1em;flex:none;text-align:center}
.ready .mark.y{color:var(--ok)}
.ready .mark.n{color:var(--amber)}
.ready .mark.b{color:var(--danger)}
.ready .mark.o{color:var(--muted)}
.code-title{margin-top:16px}
#snippet{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 10px}
.code-actions{margin-bottom:4px}
.check-row{margin-top:12px}
/* The Documents page right after Go live. */
.livebanner{display:grid;grid-template-columns:auto minmax(0,1fr);gap:14px;align-items:center;border-left:3px solid var(--ok);background:var(--ok-soft);border-radius:10px;padding:14px 16px;margin-bottom:var(--gap);color:var(--ink)}
.livebanner .seal{width:34px;height:34px;border-radius:50%;background:var(--ok);color:var(--surface);display:grid;place-items:center;font-size:18px}
.next-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap);margin-bottom:var(--gap)}
.next-grid .card{margin:0}
.next-grid h3{margin-bottom:6px}
@media (max-width:899.98px){.hub2,.oa,.next-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:599.98px){.setup-preview{height:500px}.invite-row .field{min-width:0;flex:1 1 100%}.invite-row .btn{flex:1 1 100%}}

@media print{
  body{background:#fff}
  .login-card{box-shadow:none;border:0}
  .login-card>*:not(h1):not(#recovery-codes):not(.lockup){display:none}
}

/* -- Page: Settings › Links, and the Links field of an approved answer --
   The link library: two flush cards (the company's own links, then the
   default links), each row one link; the editor and the confirmations are
   <dialog> boxes, modal with the script and drawn open by the server
   without it. The approved-answer form's Links field lists the picked links
   in order with a picker menu. The chat previews draw the buttons with the
   chat window's own shapes on the portal's tokens. */
.links-card .card-head{align-items:center}
.links-card .card-head .sub{margin:2px 0 0}
.links-card .tablewrap{margin-top:14px}
.links-card table th{white-space:nowrap}
.links-card td{vertical-align:middle;overflow:hidden}
.links-card table{table-layout:fixed}
.links-card .c-name{width:36%}
.links-card .c-used{width:112px}
.links-card .c-act{width:116px}
.links-card .link-addr+.chip{margin-inline-start:6px}
.link-name{display:grid;gap:1px;min-height:38px;align-content:center;min-width:0}
.link-name b{color:var(--ink);font-weight:500}
.link-name .ar{color:var(--muted);font-size:13px;unicode-bidi:plaintext;text-align:left}
.link-name .job{color:var(--muted);font-size:12.5px;max-width:44ch}
.link-addr{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%}
.link-addr .host{color:var(--ink);font-weight:500;white-space:nowrap}
.link-addr .path{color:var(--muted);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:22ch;min-width:5ch;flex:1 1 auto}
.link-addr .path:empty{display:none}
.link-addr .open{color:var(--muted);text-decoration:none;font-size:13px;line-height:1;padding:3px;border-radius:6px}
.link-addr .open:hover{color:var(--teal);background:var(--surface-2)}
.link-unset{color:var(--muted)}
.link-use{color:var(--ink-soft);text-decoration:none;white-space:nowrap}
a.link-use:hover{color:var(--teal)}
.link-use.none{color:var(--muted)}
.links-cap{font-size:12.5px;color:var(--muted);white-space:nowrap}
.links-cap.full{color:var(--amber-ink)}
/* On a phone each link is a small card: name, then address and use with the
   actions beside them. No sideways scroll for a three-column list. */
@media (max-width:640px){
  .links-card .tablewrap{overflow:visible}
  .links-card .tablewrap>table{min-width:0;display:block}
  .links-card thead,.links-card colgroup{display:none}
  .links-card tbody{display:block}
  .links-card tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:12px 16px;border-bottom:1px solid var(--line)}
  .links-card tr:last-child{border-bottom:0}
  .links-card td,.card.flush.links-card table td:first-child,.card.flush.links-card table td:last-child{display:block;padding:0;border:0;overflow:visible;width:auto}
  .links-card td:first-child{grid-column:1 / -1}
  .links-card td:nth-child(2){grid-column:1;min-width:0;overflow:hidden}
  .links-card td:nth-child(3){grid-column:1;font-size:12.5px}
  .links-card td.t-actions{grid-row:2 / 4;grid-column:2;align-self:center;width:auto}
  .links-card td.t-actions .actions{gap:2px}
  .link-name{min-height:0}
  .link-addr{display:flex;flex-wrap:wrap;row-gap:0}
  .link-addr .host{white-space:normal;overflow-wrap:anywhere}
  .link-addr .path{max-width:14ch}
}
/* Row menu: the quiet actions behind one "⋯" button; Edit stays visible. */
.row-menu{position:relative;display:inline-block}
.row-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;color:var(--ink-soft);font-size:18px;line-height:1;letter-spacing:.05em}
.row-menu>summary::-webkit-details-marker{display:none}
.row-menu>summary:hover,.row-menu[open]>summary{background:var(--surface-2)}
.row-menu .menu{position:absolute;inset-inline-end:0;top:34px;z-index:6;min-width:180px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;display:grid;text-align:start;white-space:nowrap}
.row-menu .menu button,.row-menu .menu a{display:block;width:100%;text-align:start;background:none;border:0;padding:8px 10px;border-radius:6px;color:var(--ink);font:inherit;font-size:13.5px;cursor:pointer;text-decoration:none}
.row-menu .menu button:hover,.row-menu .menu a:hover{background:var(--surface-2)}
.row-menu .menu .danger{color:var(--danger)}
.row-menu .menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}
/* The editor and the confirmations. */
dialog.link-dialog{position:fixed;inset:0;margin:auto;width:min(600px,94vw);height:fit-content;max-height:92vh;overflow:auto;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);z-index:22}
dialog.link-dialog::backdrop{background:rgba(22,35,42,.35)}
.dialog-head{padding:20px 24px 0;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.dialog-head h2{font-size:17px}
.dialog-head .sub{color:var(--muted);font-size:13px;margin:4px 0 0}
.dialog-body{padding:18px 24px 4px}
.dialog-body>.field:last-child{margin-bottom:0}
.dialog-foot{display:flex;gap:8px;justify-content:flex-end;align-items:center;padding:14px 24px 20px;flex-wrap:wrap;position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);margin:0}
.dialog-close{flex:none;border:0;background:none;color:var(--muted);font-size:20px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:6px;text-decoration:none}
.dialog-close:hover{background:var(--surface-2);color:var(--ink)}
.field .count{margin-inline-start:auto;font-family:var(--font-body);letter-spacing:0;text-transform:none;font-size:12px;color:var(--muted)}
.field .count.over{color:var(--danger)}
.field label.with-count{display:flex;align-items:baseline;gap:8px}
.field-label{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.field-warn{font-size:12.5px;color:var(--amber-ink);border-left:3px solid var(--amber);background:var(--amber-soft);padding:8px 10px;border-radius:6px;overflow-wrap:anywhere}
.fixed-name{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2)}
.fixed-name b{color:var(--ink);font-weight:500}
.fixed-name span{color:var(--muted);font-size:12.5px}
.button-text b{color:var(--ink);font-weight:500}
.confirm-text{color:var(--ink);font-size:14px;margin:0 0 6px}
.confirm-text+.help{margin-top:4px}
.answer-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.answer-list a{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink);text-decoration:none;font-size:13.5px}
.answer-list a:hover{border-color:var(--teal);color:var(--teal)}
.answer-list .sub{color:var(--muted);font-size:12px}
/* The chat preview: a bubble and its buttons, as the chat window draws them. */
.chat-preview{display:grid;gap:8px;padding:12px 14px;border:1px dashed var(--line-strong);border-radius:10px;background:var(--paper);margin-top:4px}
.chat-preview .risk-preview-label{margin:0}
.chat-preview .pair{gap:10px}
.chat-preview .help{margin:0}
.ax-preview{display:flex;flex-direction:column;gap:8px}
.ax-msg{max-width:100%;border-radius:12px;padding:10px 13px;line-height:1.5;color:var(--ink-soft);font-size:14px}
.ax-assistant{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:4px}
[dir="rtl"] .ax-assistant{border-bottom-left-radius:12px;border-bottom-right-radius:4px}
.ax-text{margin:0 0 8px}
.ax-text:last-child{margin-bottom:0}
.ax-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ax-link{display:inline-block;max-width:100%;height:32px;line-height:30px;padding:0 12px;border:1px solid var(--teal);border-radius:8px;background:var(--surface);color:var(--teal);text-decoration:none;font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The approved-answer form's Links field, and the links on the answers list. */
.links-selects{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.links-selects .field{margin-bottom:0}
@media (max-width:560px){.links-selects{grid-template-columns:minmax(0,1fr)}}
.picked{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:6px}
.picked li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 10px 8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.picked .ord{font-family:var(--font-mono);font-size:11px;color:var(--muted);width:14px}
.picked .what{display:flex;gap:8px;align-items:center;min-width:0;flex-wrap:wrap}
.picked .what b{color:var(--ink);font-weight:500}
.picked .what .host{color:var(--muted);font-size:12.5px}
.picked .acts{display:flex;gap:2px}
.picked .acts button{border:0;background:none;width:28px;height:28px;border-radius:6px;color:var(--ink-soft);cursor:pointer;font-size:14px}
.picked .acts button:hover{background:var(--surface-2);color:var(--ink)}
.picked .acts button:disabled{opacity:.35;cursor:default;background:none}
.link-pick{position:relative;display:inline-block}
.link-pick>summary{list-style:none;cursor:pointer}
.link-pick>summary::-webkit-details-marker{display:none}
.pick-menu{position:absolute;z-index:6;top:36px;inset-inline-start:0;width:min(360px,88vw);background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;max-height:320px;overflow:auto}
.pick-menu .group{font-family:var(--font-mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:8px 10px 4px}
.pick-menu button{display:grid;width:100%;text-align:start;background:none;border:0;padding:7px 10px;border-radius:6px;color:var(--ink);font:inherit;font-size:13.5px;cursor:pointer;gap:1px}
.pick-menu button span{color:var(--muted);font-size:12px}
.pick-menu button:hover{background:var(--surface-2)}
.pick-menu button:disabled{opacity:.5;cursor:default;background:none}
.pick-menu .foot{border-top:1px solid var(--line);margin-top:4px;padding:8px 10px 4px;font-size:12.5px;color:var(--muted)}
.links-field-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.links-field-row .help{margin:0}
.answer-links{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
/* Approved answers: the section picker, the save's notes, the Try box. */
.picker .label{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.sp-card{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--paper);display:flex;flex-direction:column;gap:10px}
.sp-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.sp-head .input{flex:1;min-width:180px;height:34px}
.sp-row{display:flex;gap:8px;align-items:baseline;padding:4px 0;cursor:pointer}
.sp-row .help{margin:0 0 0 auto;white-space:nowrap}
.sp-row.sp-sub{padding-inline-start:22px}
.sp-row.sp-plain{cursor:default;color:var(--muted)}
.sp-outline{max-height:320px;overflow:auto;margin-top:6px}
.sp-results{border-bottom:1px solid var(--line);padding-bottom:8px}
.sp-read .notice{margin:6px 0}
.sp-passages{margin:6px 0 0;padding:10px 14px;border-inline-start:3px solid var(--line-strong);background:var(--surface);border-radius:6px;max-height:360px;overflow:auto}
.sp-passage{margin:0 0 8px}
.sp-steps{margin:0 0 8px;padding-inline-start:22px}
.fix-actions{display:inline-flex;gap:6px;flex-wrap:wrap;margin-inline-start:8px}
.review-notes,.review-card{margin-bottom:16px}
.notes{list-style:none;margin:8px 0 0;padding:0}
.note-row{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--line)}
.note-row:first-child{border-top:0}
.note-row .actions{display:inline-flex;gap:6px}
.note-row form,.inline-form{display:inline}
.review-notes{border-inline-start:3px solid var(--amber)}
.repoint{display:block;margin-top:4px}
.try-box{margin-top:16px}
.try-box h2{font-size:16px;margin:0 0 4px}
.try-row{align-items:center;gap:8px}
.try-row select.input{width:auto}
.try-out{margin-top:10px}
.try-verdict{margin:0 0 8px}
.try-reply{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface-2)}
.try-reply p{margin:0 0 8px}
.try-cite{font-size:10px;margin-inline-start:2px;color:var(--muted)}
.try-note{border-inline-start:3px solid var(--amber);padding-inline-start:8px}
.try-sources{font-size:13px;color:var(--muted);margin:4px 0 0}
/* The form's first submit button: Enter in a text box saves, never a fix button. */
.default-submit{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
