/* ==========================================================================
   AONIOS client portal (my-agent.html, account.html) — portal.css v20260925
   Loaded after site.css. Only portal components live here: headings, body
   text, buttons, fields and pills come from site.css.
   Nothing is smaller than .9rem except the status pill (site.css, 14px).
   ========================================================================== */

/* ---------- page frame --------------------------------------------------- */
.portal-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.portal-hero .lead { max-width: 40rem; }
.portal-who { margin: 14px auto 0; color: var(--muted); font-size: var(--fs-small); overflow-wrap: anywhere; }
.portal-who b { color: var(--ink); font-weight: 600; }
.portal { padding-top: clamp(28px, 4vw, 44px); }
/* Signed in: the hero is the h1 and the "Signed in as" line only (on my-agent.html without its lead), and the section
   under it starts closer, so the profile progress, the current step and the docked assistant's message box are in the
   first view. :has() needs no script; a browser without it keeps the signed-out spacing. */
.portal-hero:has(.portal-who[data-when="in"]:not([hidden])) { padding: clamp(18px, 3vw, 36px) 0 clamp(14px, 2.2vw, 26px); }
.portal-hero:has(.portal-who[data-when="in"]:not([hidden])) h1 { margin-bottom: .22em; }
.portal-hero .portal-who[data-when="in"] { margin-top: 10px; }
[data-portal-page="my-agent"] .portal-hero .lead[data-when="in"] { display: none; }
[data-portal-page="my-agent"] .portal-hero:has(.portal-who[data-when="in"]:not([hidden])) h1 { margin-bottom: 0; }
.portal:has(#view-in:not([hidden])) { padding-top: clamp(16px, 2.2vw, 28px); }
.portal-main { max-width: 62rem; margin-inline: auto; }
.portal-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 30vh; color: var(--muted); }
.portal-loading::before, .is-busy-inline::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid rgba(143, 224, 255, .25); border-top-color: var(--accent-2);
  animation: p-spin .8s linear infinite;
}
@keyframes p-spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* a button that reads as a link */
.linklike {
  display: inline; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--accent-2);
  text-decoration: underline; text-decoration-color: rgba(143, 224, 255, .4); text-underline-offset: 3px;
}
.linklike:hover { color: #c9f0ff; text-decoration-color: currentColor; }
.linklike:disabled { color: var(--faint); cursor: default; text-decoration: none; }

/* ---------- section navigation (Overview, Agents, …) --------------------- */
.portal-tabs { margin: 0 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--hairline-2); }
.portal-tabs ul { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0; padding: 0; list-style: none; }
.portal-tabs li { margin: 0; }
.portal-tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 14px 0 16px;
  color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.portal-tabs a:hover { color: var(--ink); }
.portal-tabs a[aria-current] { color: var(--ink); }
.portal-tabs a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.portal-tabs .tab-out { color: var(--accent-2); }
.portal-tabs .tab-out::after { content: "\2192"; }
.portal-tabs .tab-more { margin-left: -4px; }   /* the link's 8px gap is for the dot: "Account and billing" reads as one phrase */
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(229, 192, 123, .6); }
@media (max-width: 600px) {
  /* phones: the tabs wrap onto a second row, so every section (Library, Account and billing) is in sight */
  .portal-tabs ul { gap: 0 20px; }
  .portal-tabs a { padding: 10px 0 11px; }
  .portal-tabs .tab-more { display: none; }   /* "Account →": the six tabs of My Agent fit on two rows */
}
@media (max-width: 420px) {
  /* account.html: Plan, Invoices, Pay (with its dot), Profile and "My Agent →" stay on one row */
  body[data-portal-page="account"] .portal-tabs ul { gap: 0 12px; }
}
@media (max-width: 374px) {
  /* 360px phones: the link colour alone marks "My Agent" as the way out; its arrow would push it onto a second row */
  body[data-portal-page="account"] .portal-tabs .tab-out::after { content: none; }
}

.panel > h2:first-child { margin-bottom: .35em; }
.panel-head { margin-bottom: clamp(28px, 4vw, 40px); }
.panel-head .lead { max-width: 44rem; }
.panel-block + .panel-block { margin-top: clamp(40px, 5vw, 56px); }
.panel-block > h3 { margin-bottom: 14px; }
.panel h2:focus { outline: none; }

/* ---------- notices (one line, no box-in-box) ---------------------------- */
.notices:empty { display: none; }
.notices { display: grid; gap: 12px; margin-bottom: 28px; }
.notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent); background: rgba(91, 200, 245, .07); color: var(--text);
}
.notice p { margin: 0; flex: 1 1 18rem; min-width: 0; overflow-wrap: anywhere; }
.notice b { color: var(--ink); }
.notice .btn { flex: none; }
.notice--ok { border-left-color: var(--green); background: rgba(70, 224, 138, .08); }
.notice--warn { border-left-color: var(--gold); background: rgba(229, 192, 123, .08); }
.notice--error { border-left-color: var(--red); background: rgba(224, 122, 106, .1); }
.notice-close { margin-left: auto; padding: 4px 8px; border: 0; background: none; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; border-radius: 6px; }
.notice-close:hover { color: var(--ink); }
/* the × sits in the top right corner, level with the first line: it never wraps onto a line of its own */
.notice--closable { position: relative; padding-right: 54px; }
.notice--closable > .notice-close { position: absolute; top: 7px; right: 6px; display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border-radius: 8px; }
.notice--closable > .notice-close:hover { background: rgba(143, 224, 255, .07); }
.notice--closable > .notice-close:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }

/* ---------- status pills (adds to site.css .status) ---------------------- */
.status--warn { color: #f2a497; background: rgba(224, 122, 106, .14); }
.status--off { color: var(--muted); background: rgba(167, 186, 199, .1); }
.status--off::before { background: transparent; border: 1.5px solid currentColor; width: 8px; height: 8px; }
.status--info { color: var(--accent-2); background: rgba(91, 200, 245, .1); }

/* ---------- signed out: create account / sign in ------------------------ */
.auth-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 899px) { .auth-split { grid-template-columns: 1fr; } }
.auth-panel {
  padding: clamp(24px, 3.4vw, 40px); border-radius: 20px;
  border: 1px solid rgba(143, 224, 255, .12);
  background: linear-gradient(180deg, rgba(143, 224, 255, .05), rgba(143, 224, 255, .015));
}
.auth-panel--main { border-color: rgba(229, 192, 123, .22); }
.auth-plain { padding-top: clamp(8px, 2vw, 24px); }
/* account.html#pay=… opened signed out (an invoice email, a wallet's browser): the sign-in form comes first */
.auth-split--signin-first .auth-plain { order: -1; padding-top: 0; }
.auth-plain .form { max-width: 28rem; }
.auth-narrow { max-width: 34rem; margin-inline: auto; }
.form .btn[type="submit"] { justify-self: start; }
.form-wide-btn .btn[type="submit"] { width: 100%; justify-self: stretch; }
.reg-total { margin: 0; padding: 16px 0 2px; border-top: 1px solid var(--hairline); color: var(--muted); }
.reg-total b { color: var(--gold-2); font-weight: 600; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.opt { font-weight: 400; color: var(--faint); }

/* fields: errors, password toggle, hints */
.field-hint, .field-error { margin: 8px 0 0; font-size: var(--fs-small); }
.field-hint { color: var(--faint); }
.field-error { color: #f2a497; }
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(224, 122, 106, .16); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--accent-2); font: 600 .9375rem/1 var(--font-body); cursor: pointer;
}
.pw-toggle:hover { background: rgba(143, 224, 255, .08); }
.form-status { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.form-status:empty { display: none; }
.form-status.is-error { color: #f2a497; }
.form-status.is-ok { color: #8eeab6; }
.check a { color: var(--accent-2); }
.checks { display: grid; gap: 12px; }
.btn[aria-busy="true"] { cursor: progress; opacity: .8; }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.btn-danger { color: #f2a497; border-color: rgba(224, 122, 106, .45); background: rgba(224, 122, 106, .06); }
.btn-danger:hover { color: #ffc2b8; border-color: rgba(224, 122, 106, .75); background: rgba(224, 122, 106, .12); }

/* ---------- steps (the three-step start) -------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 1px solid var(--hairline); }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; margin: 0; padding: 22px 4px; border-bottom: 1px solid var(--hairline); }
.steps > li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(229, 192, 123, .5); color: var(--gold-2);
  font: 700 1.125rem/1 var(--font-head);
}
.steps > li.is-done::before { content: ""; border-color: rgba(70, 224, 138, .5); background: rgba(70, 224, 138, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%2374e9a6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.steps h3 { margin: 0; }
.steps p { margin: 4px 0 0; color: var(--muted); }
.steps .is-done h3 { color: var(--muted); }
.step-action { justify-self: end; }
@media (max-width: 600px) {
  .steps > li { grid-template-columns: 40px minmax(0, 1fr); }
  .steps > li::before { width: 38px; height: 38px; font-size: 1rem; }
  .step-action { grid-column: 2; justify-self: start; margin-top: 8px; }
}

/* ---------- rows: agents, connections, memories, plan lines ------------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.rows > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin: 0; padding: 22px 4px; border-bottom: 1px solid var(--hairline); }
.row-main { flex: 1 1 22rem; min-width: 0; }
.row-main h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.row-main p { margin: 6px 0 0; color: var(--muted); }
.row-main .more { margin-top: 6px; }
.row-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; flex: 0 1 auto; }
.row-meta { color: var(--muted); font-size: var(--fs-small); overflow-wrap: anywhere; }
.row-price { color: var(--gold-2); font-weight: 600; white-space: nowrap; }
.rows--compact > li { padding: 16px 4px; }
.rows--lines > li { padding: 14px 4px; flex-wrap: nowrap; }
.rows--lines .row-main { flex: 1 1 auto; }
.rows--lines .amount { white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.rows--lines li.is-total { border-bottom: 0; padding-top: 18px; }
.rows--lines li.is-total .row-main, .rows--lines li.is-total .amount { font-family: var(--font-head); font-size: 1.1875rem; font-weight: 700; color: var(--ink); }
.rows--lines li.is-total .amount { color: var(--gold-2); }
.rows--lines li.is-discount .amount { color: #8eeab6; }
.rows--lines li.is-included .amount { color: var(--muted); }
.empty { color: var(--muted); margin: 0; padding: 18px 4px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
@media (max-width: 600px) {
  .rows > li { padding: 18px 2px; }
  .row-side { justify-content: flex-start; }
}

/* ---------- summary line (status / plan) --------------------------------- */
.summary { display: grid; gap: 10px; }
.summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.summary-line .lead { margin: 0; }
.big-amount { font-family: var(--font-head); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }

/* ---------- switch (white glove, autopay) -------------------------------- */
.switch-row { display: flex; align-items: flex-start; gap: 18px; }
.switch-row .switch-text { flex: 1 1 auto; min-width: 0; }
.switch-row .switch-text p { margin: 4px 0 0; color: var(--muted); }
.switch {
  position: relative; flex: none; width: 58px; height: 32px; margin-top: 2px; padding: 0;
  border: 1px solid var(--hairline-2); border-radius: 999px; background: rgba(0, 0, 0, .3); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--muted); transition: transform .2s var(--ease), background-color .2s;
}
.switch[aria-checked="true"] { background: rgba(229, 192, 123, .25); border-color: rgba(229, 192, 123, .6); }
.switch[aria-checked="true"]::after { transform: translateX(26px); background: var(--gold-2); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch-state { display: block; margin-top: 6px; color: var(--ink); font-weight: 600; font-size: var(--fs-small); }

/* ---------- payment ------------------------------------------------------ */
.pay-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 28px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.pay-head p { margin: 0; }
.invoice-pick { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; border: 0; }
.invoice-pick legend { margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.method-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 24px; padding: 5px; border-radius: 14px; border: 1px solid var(--hairline-2); background: rgba(0, 0, 0, .2); }
.method-switch label { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.method-switch input { position: absolute; opacity: 0; pointer-events: none; }
.method-switch label:hover { color: var(--ink); }
.method-switch input:checked + span { color: var(--ink); }
.method-switch label:has(input:checked) { background: rgba(143, 224, 255, .1); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(143, 224, 255, .3); }
.method-switch label:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.method-switch label.is-checked { background: rgba(143, 224, 255, .1); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(143, 224, 255, .3); }
@media (max-width: 480px) { .method-switch { display: flex; } .method-switch label { flex: 1 1 auto; justify-content: center; padding: 0 12px; } }
.pay-method > * + * { margin-top: 18px; }
.plugin-host { min-height: 64px; }
.plugin-host > .portal-loading { min-height: 64px; justify-content: flex-start; }
.wallet-note { color: var(--muted); }

/* ---------- invoices table (stacks on phones) ---------------------------- */
.inv-table td, .inv-table th { vertical-align: middle; }
.inv-table .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-table .inv-label { display: block; color: var(--muted); font-size: var(--fs-small); }
.inv-table .inv-actions { text-align: right; white-space: nowrap; }
.inv-acts { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
@media (max-width: 720px) {
  .inv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .inv-table, .inv-table tbody, .inv-table tr, .inv-table td { display: block; width: 100%; }
  .inv-table tr { padding: 14px 2px; border-bottom: 1px solid var(--hairline); }
  .inv-table td { padding: 4px 0; border: 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .inv-table td::before { content: attr(data-label); color: var(--muted); text-align: left; }
  .inv-table td.inv-first { display: block; text-align: left; }
  .inv-table td.inv-first::before { content: none; }
  .inv-table td.inv-actions { padding-top: 10px; }
  .inv-acts { justify-content: flex-start; gap: 22px; }
  .inv-table .inv-actions::before { content: none; }
}

/* ---------- memories: drop zone and upload queue ------------------------ */
.dropzone {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: clamp(28px, 5vw, 44px) 20px;
  border: 1.5px dashed rgba(143, 224, 255, .35); border-radius: var(--radius);
  background: rgba(143, 224, 255, .03); text-align: center; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent-2); background: rgba(143, 224, 255, .07); }
.dropzone:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(91, 200, 245, .2); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dz-title { font-family: var(--font-head); font-size: 1.1875rem; font-weight: 600; color: var(--ink); }
.dz-title u { color: var(--accent-2); text-underline-offset: 4px; }
.dz-note { color: var(--muted); font-size: var(--fs-small); }
.dropzone.is-disabled { cursor: not-allowed; opacity: .55; }
.upload-queue { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.upload-queue:empty { display: none; }
.upload-queue li { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
.upload-queue .uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.upload-queue .uq-state { color: var(--muted); font-size: var(--fs-small); white-space: nowrap; }
.upload-queue .uq-state.is-error { color: #f2a497; white-space: normal; }
.upload-queue .uq-state.is-ok { color: #8eeab6; }
.upload-queue progress { grid-column: 1 / -1; width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: rgba(143, 224, 255, .1); -webkit-appearance: none; appearance: none; }
.upload-queue progress::-webkit-progress-bar { background: rgba(143, 224, 255, .1); }
.upload-queue progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.upload-queue progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }

/* ---------- dialog ------------------------------------------------------- */
.p-dialog {
  width: min(34rem, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; overflow: auto;
  border: 1px solid var(--hairline-2); border-radius: var(--radius);
  background: var(--bg-raise); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.p-dialog--wide { width: min(46rem, calc(100vw - 32px)); }
.p-dialog::backdrop { background: rgba(3, 8, 13, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.p-dialog-inner { padding: clamp(22px, 4vw, 32px); display: grid; gap: 16px; }
.p-dialog-inner > h3 { margin: 0; padding-right: 32px; }
.p-dialog-inner p { margin: 0; }
.p-dialog .btn-row { margin-top: 6px; }
.p-dialog-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.p-dialog-x:hover { color: var(--ink); background: rgba(143, 224, 255, .07); }
.total-change { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.total-change .big-amount { font-size: 1.75rem; }
.total-change s { color: var(--faint); }

/* ---------- toast -------------------------------------------------------- */
.p-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px);
  max-width: min(32rem, calc(100vw - 32px)); padding: 14px 20px; border-radius: 12px;
  background: #102233; border: 1px solid rgba(143, 224, 255, .25); color: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.p-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.p-toast.is-error { border-color: rgba(224, 122, 106, .6); }

@media print {
  .portal-tabs, .notices, .p-toast, .site-footer { display: none !important; }
}
.field--end { align-self: end; }
.steps-more p { margin: 18px 0 0; color: var(--muted); }
.auth-panel .form-row { align-items: end; }

/* Framed by another site (clickjacking): nothing of the page is shown, only the note portal.js adds. The server also
   forbids framing (X-Frame-Options / CSP frame-ancestors); this is the fallback. */
html.portal-framed body > :not(.portal-framed-note) { display: none !important; }
.portal-framed-note { max-width: 36rem; margin: 3rem auto; padding: 1.5rem; text-align: center; }

/* ==========================================================================
   25 Sep 2026: onboarding steps, notifications bell, the assistant sidebar,
   the survey, Google Drive links and currencies (SPEC-ONBOARDING §8).
   ========================================================================== */

/* ---------- a button with only an icon (44px target) --------------------- */
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); background: rgba(143, 224, 255, .07); }
.icon-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.ico { display: block; flex: none; }

/* ---------- progress: the slim bar and the step rings -------------------- */
.bar { height: 8px; border-radius: 99px; background: var(--hairline-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .45s var(--ease); }
.onb-progress { margin: 0 0 22px; }
.onb-progress-line { margin: 0 0 12px; font-family: var(--font-head); font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.ring { position: relative; display: grid; place-items: center; flex: none; width: 48px; height: 48px; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-track { stroke: var(--hairline-2); }
.ring-val { stroke: var(--accent); transition: stroke-dashoffset .5s var(--ease); }
.ring-pct { position: relative; font: 600 .9rem/1 var(--font-body); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ring.is-done .ring-track { stroke: rgba(70, 224, 138, .55); fill: rgba(70, 224, 138, .1); }
.ring.is-done .ico { position: relative; width: 20px; height: 20px; color: #74e9a6; }
.ring.is-skipped .ring-track { stroke-dasharray: 3 4; }
.ring.is-skipped .ring-pct { color: var(--faint); }
.ring.is-locked .ring-track { stroke-dasharray: 2 5; }

/* ---------- the four profile steps (Overview) ---------------------------- */
.onb-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.onb-steps > li { margin: 0; border-bottom: 1px solid var(--hairline); }
.onb-step > summary {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; gap: 4px 18px; align-items: center;
  padding: 18px 12px; cursor: pointer; list-style: none; border-radius: 4px;
}
.onb-step > summary::-webkit-details-marker { display: none; }
.onb-step > summary::after {
  content: ""; width: 16px; height: 16px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s var(--ease);
}
.onb-step[open] > summary::after { transform: rotate(180deg); }
.onb-step > summary:hover h3 { color: #fff; }
.onb-step > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.onb-step.is-current { box-shadow: inset 3px 0 0 var(--accent); background: linear-gradient(90deg, rgba(91, 200, 245, .07), rgba(91, 200, 245, 0) 70%); }
.onb-step-text { display: grid; gap: 3px; min-width: 0; }
.onb-step h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; font-size: 1.25rem; }
.onb-step.is-done h3, .onb-step.is-skipped h3 { color: var(--muted); }
.onb-step .row-meta { margin: 0; }
.onb-opt { font: 500 var(--fs-small)/1.2 var(--font-body); color: var(--faint); }
.onb-body { padding: 2px 12px 24px 78px; }
.onb-next { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 12px; }
.onb-next p { margin: 0; color: var(--faint); }
.onb-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.onb-items > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.onb-check { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--hairline-2); }
.onb-check.is-done { border-color: rgba(70, 224, 138, .6); background: rgba(70, 224, 138, .12); color: #74e9a6; }
.onb-check .ico { width: 14px; height: 14px; }
/* a sub-item on its way (Step 2 "2 of 3 added"): its circle fills like the step's ring (portal.js sets --p) */
.onb-check.is-part { position: relative; }
.onb-check.is-part::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: 50%;
  background: conic-gradient(var(--accent) var(--p, 0%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
}
.onb-item-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; flex: 1 1 14rem; min-width: 0; color: var(--text); }
.onb-items > li.is-done .onb-item-main { color: var(--muted); }
.onb-item-main .row-meta { margin: 0; }
.onb-item-act { flex: none; }
.onb-item-act a:not(.btn) { color: var(--accent-2); font-weight: 600; }
.onb-sub { padding-left: 36px; }
/* Step 1: phone / country typed in place (portal.js profileField) */
.onb-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.onb-inline .field { flex: 0 1 18rem; min-width: 0; margin: 0; }
.onb-inline .field input { height: 44px; }
.onb-inline .form-status { flex: 1 1 100%; }
.onb-rec { margin: 18px 0 0; color: var(--muted); }
.onb-rec a { color: var(--accent-2); }
.onb-line { margin: 0; color: var(--text); }
.onb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 14px; }
.onb-body > .more { margin-top: 12px; }
.notices#ov-alert { margin-bottom: 26px; }

/* The Overview's first view: the progress and the current step come right under the tabs.
   - the tab above already says "Overview", so its h2 is kept for screen readers and the sign-in focus only;
   - the status is one line: the pill and its sentence in one flow, the Pay button at the end (under it on phones);
   - beside the docked assistant the alert's text takes the whole width, its actions on one row under it. */
.portal-tabs:has(~ #panel-overview:not([hidden])) { margin-bottom: clamp(24px, 3vw, 32px); }
#h-overview { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
#panel-overview > .panel-head { margin-bottom: clamp(22px, 3vw, 28px); }
#ov-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
#ov-status > .summary-line { display: block; flex: 1 1 22rem; min-width: 0; }
#ov-status > .summary-line > .status { margin: -3px 12px 0 0; }
#ov-status > .btn-row { flex: none; }
#ov-status > p:not(.summary-line) { flex: 1 1 100%; margin: 0; }
html.assist-docked-on #ov-alert .notice > p { flex-basis: 100%; }
@media (max-width: 480px) { #ov-status > .btn-row { flex: 1 1 100%; } }
@media (max-width: 600px) {
  .onb-step > summary { grid-template-columns: 48px minmax(0, 1fr) 14px; gap: 4px 14px; padding: 16px 6px; }
  .onb-body { padding: 0 6px 22px; }
  .onb-next { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 12px 6px; }
  .onb-sub { padding-left: 36px; }
  /* an item's action wraps under its label (22px check + 14px gap), never back to the left edge */
  .onb-item-act { flex-basis: 100%; padding-left: 36px; }
  .onb-inline .field { flex: 1 1 100%; }
}

/* ---------- notifications bell (hero line) and its panel ----------------- */
.bell {
  position: relative; display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  height: 40px; margin-left: 8px; padding: 0 12px; border: 1px solid var(--hairline-2); border-radius: 999px;
  background: rgba(143, 224, 255, .04); color: var(--muted); font: inherit; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.bell:hover, .bell[aria-expanded="true"] { color: var(--ink); border-color: rgba(143, 224, 255, .5); background: rgba(143, 224, 255, .08); }
.bell:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.bell.has-unread { color: var(--ink); }
.bell-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--gold); color: #081019; font: 700 .9rem/1 var(--font-body); font-variant-numeric: tabular-nums; }
/* the same bell in the sticky header, shown only while the hero's bell is scrolled out of sight (portal.js Bell) */
.bell--header { flex: none; width: 44px; height: 44px; margin: 0; padding: 0; justify-content: center; animation: bell-in .2s var(--ease); }
.bell--header .bell-count { position: absolute; top: -4px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: .9rem; box-shadow: 0 0 0 2px #081019; }
@keyframes bell-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.bell--header.is-parked { visibility: hidden; animation: none; }   /* its place is kept: the links never move */
@media (max-width: 899px) {
  .header-inner > .bell--header { margin-left: auto; }
  .header-inner > .bell--header.is-parked { display: none; }       /* phones: beside the menu button, which stays put */
  .header-inner > .bell--header:not([hidden]):not(.is-parked) + .nav-toggle { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .bell--header { animation: none; } }
/* placed by portal.js (Bell.place): fixed under its bell, its max-height = the room left in the window (70vh at most) */
.notif {
  position: fixed; z-index: 60; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-raise); color: var(--text); border: 1px solid var(--hairline-2); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.notif:focus { outline: none; }
.notif.is-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 80vh; max-height: 80dvh;
  border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.notif-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 10px 8px 10px 20px; background: var(--bg-raise); border-bottom: 1px solid var(--hairline); }
.notif-title { flex: 1 1 auto; margin: 0; font-size: 1.25rem; line-height: 1.2; }
.notif-head .linklike { font-size: var(--fs-small); }
.notif-body { padding: 2px 20px 14px; }
.notif-group { margin: 0; border-bottom: 1px solid var(--hairline); }
.notif-group:last-of-type { border-bottom: 0; }
.notif-group > summary { display: flex; width: 100%; gap: 12px; padding: 14px 0; color: var(--ink); font-family: var(--font-head); font-size: 1.0625rem; }
.notif-group > summary::after { color: var(--accent); }
.notif-n { margin-left: auto; color: var(--gold-2); font: 600 var(--fs-small)/1.3 var(--font-body); }
.notif-group .more-body { padding: 0 0 10px; max-width: none; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.notif-list li { margin: 0; }
.notif-item {
  position: relative; display: grid; gap: 3px; width: 100%; padding: 10px 10px 10px 18px; border: 0; border-radius: 10px;
  background: none; color: var(--text); text-align: left; text-decoration: none; font: inherit; cursor: pointer;
}
.notif-item:hover { background: rgba(143, 224, 255, .06); color: var(--text); }
.notif-item:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.notif-t { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.notif-item.is-unread .notif-t { font-weight: 700; color: var(--ink); }
.notif-item.is-unread::before { content: ""; position: absolute; left: 4px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.notif-b { color: var(--muted); font-size: var(--fs-small); white-space: normal; overflow-wrap: anywhere; }   /* all of it (≤ 300 characters, notify_text): a cut sentence can say the opposite */
.notif-d { color: var(--faint); font-size: var(--fs-small); }
.nowrap { white-space: nowrap; }   /* an invoice number in the bell (portal.js keepWhole), a step's "Done · 100%": the line breaks before it */
.notif-empty { margin: 18px 0 8px; color: var(--muted); }
.notif-older { margin: 12px 0 0; }
.notif-overlay, .assist-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(3, 8, 13, .62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
html.notif-locked, html.assist-locked { overflow: hidden; }

/* ---------- my-agent.html signed in: main column + the assistant --------- */
.portal-main--wide { max-width: none; }
/* the banners line up with the 62rem column under them; with the assistant docked they span column and sidebar */
.portal-main--wide > .notices { max-width: 62rem; margin-inline: auto; }
@media (min-width: 1100px) { html.assist-docked-on .portal-main--wide > .notices { max-width: none; } }
.portal-in > .portal-col { max-width: 62rem; margin-inline: auto; min-width: 0; }
@media (min-width: 1100px) {
  /* at least as tall as the docked column can grow (--dock-full), so the column's height never changes the grid's: the room
     portal.js (Assist.fit) measures to the grid's bottom does not move when the column follows it */
  .portal-in.assist-docked { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; min-height: calc(100vh - var(--header-h) - 32px); }
  .portal-in.assist-docked > .portal-col { max-width: none; margin: 0; }
  .portal-in.assist-docked .portal-tabs ul { gap: 4px 24px; }
  .portal-in.assist-docked .portal-tabs .tab-more { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .portal-in.assist-docked .portal-tabs ul { gap: 4px 14px; }   /* the seven tabs stay on one line beside the column */
}
.assist {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: linear-gradient(180deg, #0d1b29, #0a1520); border: 1px solid var(--hairline-2); border-radius: var(--radius);
}
/* Docked, the sidebar starts under the compact hero (--dock-y, about 300px down), and the first view shows all of it, the
   message box included (never shorter than 30rem). Where scroll-driven animations exist it then grows with the first
   scroll to the full height under the header, so its bottom stays near the bottom of the window; elsewhere it keeps
   the first-view height. Near the end of the page portal.js (Assist.fit) sets --dock-room, the room between the header
   and the bottom of the grid: the column gets shorter there instead of sliding up under the header. */
.assist[data-mode="dock"] {
  --dock-y: 300px; --dock-full: calc(100vh - var(--header-h) - 32px);
  position: sticky; top: calc(var(--header-h) + 16px); max-height: 60rem; max-height: min(60rem, var(--dock-room, 60rem));
  height: min(var(--dock-full), max(30rem, calc(100vh - var(--dock-y))));
}
@supports (animation-timeline: scroll()) {
  .assist[data-mode="dock"] {
    animation: assist-rise linear both; animation-timeline: scroll(root block);
    animation-range: 0 calc(var(--dock-y) - var(--header-h) - 16px);
  }
}
@keyframes assist-rise { to { height: var(--dock-full); } }
.assist[data-mode="dock"][data-state="closed"] { display: none; }
.assist[data-mode="drawer"], .assist[data-mode="sheet"] {
  position: fixed; z-index: 57; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  transition: transform .32s var(--ease), visibility .32s;
}
.assist[data-mode="drawer"] { top: var(--header-h); right: 0; bottom: 0; width: min(400px, 100vw); border-radius: var(--radius) 0 0 var(--radius); border-right: 0; }
.assist[data-mode="drawer"][data-state="closed"] { transform: translateX(104%); visibility: hidden; }
.assist[data-mode="sheet"] { left: 0; right: 0; bottom: 0; height: 88vh; height: 88dvh; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.assist[data-mode="sheet"][data-state="closed"] { transform: translateY(104%); visibility: hidden; }
.assist-handle { display: none; }
.assist[data-mode="sheet"] .assist-handle { display: block; flex: none; width: 40px; height: 4px; margin: 10px auto 0; border-radius: 2px; background: rgba(143, 224, 255, .28); }
.assist-head { display: flex; align-items: center; gap: 12px; flex: none; padding: 12px 8px 12px 20px; border-bottom: 1px solid var(--hairline); }
.assist-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.01em; }   /* the sidebar's own h2, set small */
.assist-title:focus { outline: none; }   /* focused by script when the phone's sheet opens (no keyboard pops up) */
.assist-title:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 4px; }
.assist-reset { flex: none; font-size: var(--fs-small); }
.assist-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.assist-body > .portal-loading { min-height: 0; padding: 24px 20px; justify-content: flex-start; }
.assist-body > .muted { padding: 20px; }
.assist-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 18px;
  border: 1px solid rgba(143, 224, 255, .45); border-radius: 999px; background: #0f2233; color: var(--ink);
  font: 600 1rem/1 var(--font-body); cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5), 0 0 0 4px rgba(91, 200, 245, .07);
  transition: border-color .2s, background-color .2s;
}
.assist-fab:hover { border-color: var(--accent-2); background: #133049; }
.assist-fab:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.assist-fab svg { color: var(--accent-2); }
/* Below 1280px the button would sit on the ends of text lines (phones: the right 40% of the bottom lines), so once the page is
   scrolled (portal.js Assist.fit: html.fab-compact) it keeps only its icon, a 52px circle; the label stays for screen readers. */
@media (max-width: 1279px) {
  html.fab-compact .assist-fab { width: 52px; padding: 0; gap: 0; justify-content: center; }
  html.fab-compact .assist-fab > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
}
/* Phones: the button sits in the sticky header beside the bell and the menu button (portal.js Assist.placeFab), a 44px icon
   like the header's bell, so it never covers the page. Its label stays for screen readers. */
.header-inner > .assist-fab.assist-fab--bar {
  position: relative; right: auto; bottom: auto; z-index: auto; flex: none; width: 44px; height: 44px; margin: 0 0 0 auto;
  padding: 0; gap: 0; justify-content: center; border-color: var(--hairline-2); background: rgba(143, 224, 255, .04);
  box-shadow: none;
}
.header-inner > .assist-fab.assist-fab--bar:hover, .header-inner > .assist-fab.assist-fab--bar[aria-expanded="true"] { border-color: rgba(143, 224, 255, .5); background: rgba(143, 224, 255, .08); }
.header-inner > .assist-fab.assist-fab--bar:focus-visible { outline-offset: 2px; }
.header-inner > .assist-fab.assist-fab--bar > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* the three header buttons 12px apart (the bar's own gap is 24px); the menu button no longer takes the free space */
.header-inner > .assist-fab.assist-fab--bar:not([hidden]) ~ .bell--header { margin-left: -12px; }
.header-inner > .assist-fab.assist-fab--bar:not([hidden]) ~ .nav-toggle { margin-left: -12px; }
.site-header.nav-open .assist-fab--bar { visibility: hidden; }   /* the open menu is about the site, not the assistant */
/* the narrowest phones (320px): three buttons and the word lockup do not fit, so the mark alone carries the brand there, as
   site.css does between 900 and 1060px */
@media (max-width: 344px) { html.fab-in-bar .site-header .brand-word { display: none; } }
html.has-fab body { padding-bottom: 84px; }
html.has-fab .p-toast { bottom: 88px; }
@media (min-width: 1100px) { html.assist-docked-on .p-toast { left: calc(50% - 206px); } }   /* centred on the main column, clear of the sidebar */

/* ---------- the conversation (rendered by portal-assistant.js) ----------- */
.chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.chat-log { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 12px; }
.chat-log:focus { outline: none; }
.chat-hello { margin: 0; color: var(--muted); }
.chat-older { margin: 0; text-align: center; }
.chat-older .linklike { font-size: var(--fs-small); }
.msg { max-width: 92%; min-width: 0; overflow-wrap: anywhere; }
.msg-text { margin: 0; white-space: pre-wrap; font-size: 1rem; line-height: 1.55; color: var(--text); }
.msg--user { align-self: flex-end; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: rgba(143, 224, 255, .1); }
.msg--user .msg-text { color: var(--ink); }
.msg--assistant { align-self: flex-start; }
.msg--assistant > .msg-text + .msg-text { margin-top: 10px; }   /* paragraph → list → paragraph of one reply (textBlocks) */
.msg--error .msg-text { color: #f2a497; }
.msg-typing { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.msg-typing::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(143, 224, 255, .25); border-top-color: var(--accent-2); animation: p-spin .8s linear infinite; }
.chat-card { display: grid; gap: 10px; margin-top: 12px; padding: 2px 0 2px 14px; border-left: 2px solid var(--accent); }
.chat-card-title { margin: 0; font-weight: 600; color: var(--ink); }
.chat-card p { margin: 0; }
.chat-card .check { color: var(--text); }
.chat-card .check b { color: var(--ink); font-weight: 600; }
.chat-cur { display: block; color: var(--faint); }
.chat-card ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--text); }
.chat-card li { margin: 0; }
.chat-card li span { color: var(--muted); }
.chat-card-status { color: #8eeab6; }
.chat-card-status.is-off { color: var(--faint); }
.chat-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px 18px; flex: none; padding: 2px 20px 10px; }
.chat-suggest .linklike { font-size: var(--fs-small); text-align: left; }
.chat-compose { display: flex; align-items: flex-end; gap: 10px; flex: none; padding: 12px 12px 10px 20px; border-top: 1px solid var(--hairline); }
.chat-compose textarea {
  flex: 1 1 auto; min-width: 0; height: 50px; min-height: 50px; max-height: 160px; padding: 12px 14px; resize: none;
  border-radius: var(--radius-sm); border: 1px solid var(--hairline-2); background-color: rgba(0, 0, 0, .24); color: var(--ink);
  font: 400 1rem/1.45 var(--font-body);
}
.chat-compose textarea:focus { outline: none; border-color: var(--accent); background-color: rgba(0, 0, 0, .34); box-shadow: 0 0 0 3px rgba(91, 200, 245, .18); }
.chat-compose textarea::placeholder { color: #7f96a6; }
.chat-compose .btn { flex: none; }
.chat-note { flex: none; margin: 0; padding: 0 20px 14px; }
.chat-note .linklike { font-weight: 600; }

/* ---------- onboarding survey (rendered by portal-survey.js) ------------- */
.survey-top { display: grid; gap: 12px; margin: 0 0 28px; }
.survey-top .onb-progress-line { margin: 0; }
.survey-top-acts { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.survey-top-acts .row-meta { margin: 0; }
.survey-list { max-width: none; }
.survey-list > .more > summary { align-items: center; }
.sec-title { flex: 1 1 auto; min-width: 0; }
.sec-state { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: auto; font: 500 var(--fs-small)/1.3 var(--font-body); letter-spacing: 0; color: var(--muted); }
.sec-state.is-done { color: #8eeab6; }
.sec-state .ico { width: 16px; height: 16px; }
.survey-list .survey-sec .more-body { max-width: 46rem; padding-top: 6px; }
.sec-intro { margin: 0 0 18px; color: var(--muted); }
.survey-form { display: grid; gap: 22px; }
.survey-form .field-hint { margin-top: 6px; }
.survey-form .field textarea { min-height: 96px; }
.survey-form .field input[type="number"], .survey-form .field input[type="time"] { max-width: 14rem; }
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field > legend { margin-bottom: 10px; padding: 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.opts .check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 0; font-weight: 400; color: var(--text); font-size: 1rem; }   /* beats site.css .field label (bold block) */
.opts .check input { margin-top: 3px; }   /* the 18px box centred on the first 24px line (16px text), as site.css places it */
.survey-note { margin: 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: rgba(229, 192, 123, .07); color: var(--text); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.survey-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.survey-acts .form-status { flex: 1 1 100%; }
.survey-saved { margin: 0; color: var(--faint); font-size: var(--fs-small); }

/* ---------- Google Drive links (Memories) -------------------------------- */
.drive-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.drive-row > .field--end { align-self: start; padding-top: calc(var(--fs-small) * 1.65 + 8px); }   /* level with the inputs under their labels */
@media (max-width: 720px) { .drive-row { grid-template-columns: 1fr; } .drive-row > .field--end { padding-top: 0; } }
#drive-list { margin-top: 20px; }
.drive-url a { color: var(--accent-2); overflow-wrap: anywhere; }

/* ---------- currency (account.html → Plan) ------------------------------- */
#currency-form .row-meta { margin: 0; }
#currency-block .more { margin-top: 10px; }
