/* ==========================================================================
   Invest in Iraq — design system "the gold thread" (الخيط الذهبي).
   White paper, ink, and one council gold. The thread — a 2px line of light gold — marks where you are: the section
   you are in, the tab you are on, the stage your project has reached (an investor’s journey is a path). Nothing else decorates.
   Type: Readex Pro for titles and figures, IBM Plex Sans Arabic for reading. Logical properties throughout (RTL/LTR).
   ========================================================================== */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F6F5F2; --surface-3: #ECEAE5;
  --line: #E7E4DE; --line-2: #D7D3CB;
  --ink: #17150F; --ink-2: #45413A; --mut: #6C675D; --on-brand: #FFFFFF; /* muted text keeps ≥ 4.5:1 on every surface (WCAG AA) */
  --brand: #8C6A2C; --brand-2: #6E5220; --brand-3: #17150F; --brand-soft: #F8F2E6; --brand-ring: rgba(140,106,44,.22);
  --gold: #8C6A2C; --gold-soft: #F8F2E6; --navy: #17150F; --council: #C9A55C; /* --council is the thread: decoration only, never text */
  --ok: #18794E; --ok-soft: #E6F4EC; --warn: #9A5B05; --warn-soft: #FCF1DD; --err: #B42318; --err-soft: #FDECEA; --info: #1E5AA8; --info-soft: #E8F0FB;
  --shadow: 0 1px 2px rgba(23,21,15,.04); --shadow-md: 0 4px 16px rgba(23,21,15,.07); --shadow-lg: 0 18px 48px rgba(23,21,15,.16);
  --r-s: 8px; --r: 12px; --r-l: 16px;
  --font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-d: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif; /* titles and figures */
  --merlon: none;
  --page-w: 1200px; --top-h: 64px; --mnav-h: 64px; --side-w: 0px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F0F0D; --surface: #161614; --surface-2: #1D1C19; --surface-3: #27261F;
  --line: #2C2A25; --line-2: #3B3932;
  --ink: #F2EFE8; --ink-2: #CFCABF; --mut: #A39D90; --on-brand: #17120A;
  --brand: #D4B06A; --brand-2: #E3C68C; --brand-3: #F2EFE8; --brand-soft: #2A2416; --brand-ring: rgba(212,176,106,.28);
  --gold: #D4B06A; --gold-soft: #2A2416; --navy: #F2EFE8; --council: #B8954F;
  --ok: #4FC48A; --ok-soft: #14301F; --warn: #E7B45C; --warn-soft: #362A12; --err: #F27C6F; --err-soft: #3A1C19; --info: #8AB6F0; --info-soft: #182A40;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 6px 18px rgba(0,0,0,.4); --shadow-lg: 0 18px 48px rgba(0,0,0,.6);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.65; font-feature-settings: "kern" 1, "liga" 1; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: 0; hyphens: none; }
h1, h2, .kufi, .disp { font-family: var(--font-d); font-weight: 600; line-height: 1.35; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14.5px; }
p { margin: 0 0 .6em; } p:last-child { margin-bottom: 0; }
a { color: var(--brand-2); text-decoration: none; } a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.mut { color: var(--mut); } .small { font-size: 13px; } .pre { white-space: pre-line; word-break: break-word; }
.grow { flex: 1; } .ta-end { text-align: end; } .danger { color: var(--err) !important; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
[dir="ltr"] .flip { transform: scaleX(-1); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.tbl tbody tr:focus-visible, .lcard:focus-visible, .dcard:focus-visible, .pcard:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
#view:focus { outline: none; }
/* "skip to content" — visible only when it receives keyboard focus */
.skip { position: absolute; top: -60px; inset-inline-start: 12px; z-index: 200; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: var(--r); font-weight: 600; text-decoration: none; transition: top .15s; }
.skip:focus { top: 12px; }
::selection { background: color-mix(in srgb, var(--council) 30%, transparent); }

/* ---------- Shell: one bar on top with the sections, the page under it; on phones a bar of sections below ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.appbar-in { max-width: var(--page-w); height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark, .brand-logo { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: contain; display: inline-block; }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; display: block; }
.brand-txt { min-width: 0; line-height: 1.2; display: grid; } .brand-txt b { font-family: var(--font-d); font-weight: 600; font-size: 16px; white-space: nowrap; } .brand-txt small { color: var(--mut); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the sections: the thread under the one you are in */
.secnav { display: flex; align-items: stretch; gap: 2px; height: 100%; min-width: 0; }
.secnav a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--mut); font-weight: 500; text-decoration: none; white-space: nowrap; transition: color .15s; }
.secnav a:hover { color: var(--ink); text-decoration: none; }
.secnav a .ic { width: 17px; height: 17px; opacity: .8; }
.secnav a.on { color: var(--ink); font-weight: 600; } .secnav a.on .ic { opacity: 1; color: var(--brand); }
.secnav a.on::after { content: ""; position: absolute; inset-inline: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--council); }
.secnav .cnt, .mnav .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.appbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex: none; }
/* the person: one round button, everything personal in its menu */
.avbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.avbtn:hover { border-color: var(--line-2); } .avbtn[aria-expanded="true"] { border-color: var(--council); box-shadow: 0 0 0 3px var(--brand-ring); }
.avbtn .av { width: 32px; height: 32px; font-size: 13px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); display: inline-grid; place-items: center; font-weight: 700; flex: none; }
.umenu { position: absolute; top: calc(var(--top-h) - 6px); inset-inline-end: max(16px, calc((100vw - var(--page-w)) / 2 + 20px)); z-index: 60; width: 280px; padding: 8px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: pop .14s ease-out; }
.umenu[hidden] { display: none; }
.um-who { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; min-width: 0; }
.um-who div { min-width: 0; display: grid; line-height: 1.35; } .um-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .um-who small { color: var(--mut); font-size: 12.5px; }
.um-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-radius: var(--r-s); background: none; color: var(--ink-2); text-align: start; text-decoration: none; font-weight: 500; }
.um-i:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; } .um-i .ic { color: var(--mut); width: 17px; height: 17px; }
.um-i small { margin-inline-start: auto; color: var(--mut); font-size: 12.5px; }
.um-sep { height: 1px; background: var(--line); margin: 6px 0; }
.um-i.out { color: var(--err); } .um-i.out .ic { color: var(--err); }
.umenu .org-switch { margin: 4px 0 6px; }
/* the page: its title and, where a section has several pages, the tabs under it */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.phead { max-width: var(--page-w); width: 100%; margin: 0 auto; padding: 28px 24px 0; }
.phead[hidden] { display: none; }
.phead h1 { font-size: 26px; } .phead .sub { color: var(--mut); margin-top: 2px; font-size: 14.5px; }
.hubtabs { max-width: var(--page-w); width: 100%; margin: 0 auto; padding: 14px 24px 0; } .hubtabs[hidden] { display: none; }
.hub-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); } .hub-tabs::-webkit-scrollbar { display: none; }
.hub-tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--mut); font-weight: 500; white-space: nowrap; text-decoration: none; min-height: 44px; }
.hub-tabs a:hover { color: var(--ink); text-decoration: none; }
.hub-tabs a.on { color: var(--ink); font-weight: 600; } .hub-tabs a.on::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--council); }
.hub-tabs a svg { width: 16px; height: 16px; }
.view { max-width: var(--page-w); width: 100%; margin: 0 auto; padding: 24px 24px 56px; flex: 1; }
.searchwrap { position: relative; display: flex; align-items: center; width: 280px; max-width: 34vw; }
.searchwrap > .ic { position: absolute; inset-inline-start: 12px; color: var(--mut); pointer-events: none; }
.searchwrap input { width: 100%; padding-inline-start: 38px; height: 40px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.searchwrap input:focus { background: var(--surface); }
.searchwrap.sm { width: 260px; max-width: 100%; } .searchwrap.sm input { height: 38px; border-radius: var(--r); background: var(--surface); border-color: var(--line-2); }
.sugg { position: absolute; top: calc(100% + 6px); inset-inline: 0; min-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; }
.sg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: start; padding: 10px 14px; border: 0; background: none; border-bottom: 1px solid var(--line); }
.sg:hover { background: var(--surface-2); } .sg small { color: var(--mut); font-size: 12px; } .sg.all { flex-direction: row; align-items: center; gap: 8px; color: var(--brand-2); font-weight: 600; }
.tb-new span { display: inline; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.tbtn:hover { background: var(--surface-2); color: var(--ink); }
.mnav { display: none; }
#banner .banner { display: flex; align-items: center; gap: 10px; padding: 10px 24px; font-size: 14px; border-bottom: 1px solid var(--line); }
.banner.err { background: var(--err-soft); color: var(--err); } .banner.warn { background: var(--warn-soft); color: var(--warn); } .banner.info { background: var(--info-soft); color: var(--info); }
.banner span { flex: 1; } .banner .btn { flex: none; }
/* while a page loads: the thread runs along the top of the screen */
.loadbar { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 80; pointer-events: none; overflow: hidden; }
.loadbar i { position: absolute; top: 0; height: 100%; width: 30%; background: var(--council); animation: thread 1.1s ease-in-out infinite; }
@keyframes thread { from { inset-inline-start: -30%; } to { inset-inline-start: 100%; } }
@media (prefers-reduced-motion: reduce) { .loadbar i { animation: none; width: 100%; opacity: .6; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: var(--line-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--on-brand); } .btn.pri:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, var(--line-2)); } .btn.danger:hover { background: var(--err-soft); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; border-radius: var(--r-s); } .btn.sm .ic { width: 15px; height: 15px; }
.btn.lg { min-height: 50px; font-size: 15.5px; width: 100%; }
.xbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 50%; color: var(--ink-2); }
.xbtn:hover { background: var(--surface-2); color: var(--ink); } .xbtn.sm { width: 32px; height: 32px; } .xbtn.sm .ic { width: 15px; height: 15px; } .xbtn:disabled { opacity: .35; cursor: not-allowed; }
.lnk { border: 0; background: none; color: var(--brand-2); font-weight: 600; padding: 0 4px; display: inline-flex; align-items: center; gap: 4px; font-size: inherit; } .lnk:hover { text-decoration: underline; text-underline-offset: 3px; } .lnk .ic { width: 15px; height: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-btn input { display: none; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; } .spin.sm { width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--mut); padding: 32px; justify-content: center; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; }
.seg button { border: 0; background: var(--surface); width: 38px; height: 34px; display: grid; place-items: center; color: var(--mut); } .seg button.on { background: var(--brand-soft); color: var(--brand-2); }

/* ---------- Forms ---------- */
input, select, textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 9px 12px; min-height: 42px; width: 100%; transition: border-color .15s, box-shadow .15s, background .15s; font-size: 14.5px; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--mut) 55%, var(--line-2)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--mut) 80%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--mut); }
textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C675D' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 16px; background-position: left 12px center; padding-inline-end: 34px; }
[dir="ltr"] select { background-position: right 12px center; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); margin: 0; }
input[type="date"], input[type="time"], input[type="number"] { font-variant-numeric: tabular-nums; }
input.code { letter-spacing: .3em; text-align: center; font-size: 18px; }
input.w-sm { width: 90px; } input.w-key { max-width: 120px; }
.frm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.frm .full, .fld.full { grid-column: 1 / -1; }
.frm.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; } .frm.inline input, .frm.inline select { width: auto; flex: 1; min-width: 120px; }
.fld { display: grid; gap: 6px; min-width: 0; align-content: start; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--ink-2); } .fld small { color: var(--mut); font-size: 12.5px; } .fld .req { color: var(--err); }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 8px 0 6px; }
.sw { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 6px 0; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw .track { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; margin-top: 2px; }
.sw .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw input:checked + .track { background: var(--brand); } .sw input:checked + .track::after { transform: translateX(18px); } [dir="rtl"] .sw input:checked + .track::after { transform: translateX(-18px); }
.sw input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-ring); }
.sw .txt b { display: block; font-weight: 600; } .sw .txt small { color: var(--mut); display: block; font-size: 12.5px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; }
.chk { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13.5px; cursor: pointer; }
.chk:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.radios { display: grid; gap: 8px; margin: 10px 0; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio input { margin-top: 3px; } .radio b { display: block; } .radio small { color: var(--mut); display: block; }
.alert { padding: 11px 14px; border-radius: var(--r-s); font-size: 14px; margin-bottom: 12px; } .alert.err { background: var(--err-soft); color: var(--err); } .alert.ok { background: var(--ok-soft); color: var(--ok); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r); background: var(--info-soft); color: var(--info); font-size: 14px; margin: 0 0 14px; line-height: 1.6; }
.note .ic { flex: none; margin-top: 3px; } .note.warn { background: var(--warn-soft); color: var(--warn); } .note.err { background: var(--err-soft); color: var(--err); } .note.ok { background: var(--ok-soft); color: var(--ok); } .note.live { animation: pulse 1.4s ease-in-out infinite alternate; }
.note .pre { color: var(--ink); margin-top: 6px; }
@keyframes pulse { from { opacity: .6; } to { opacity: 1; } }

/* ---------- Cards, KPIs, grids: flat white on hairlines; shadows only for what floats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); margin-bottom: 16px; overflow: hidden; display: flex; flex-direction: column; }
.card.accent { border-color: var(--brand); } .card.accent-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.chead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 20px 0; }
.chead h3 { font-size: 16px; } .chead .hint { color: var(--mut); font-size: 13px; } .ctools { margin-inline-start: auto; display: flex; gap: 6px; }
.cbody { padding: 14px 20px 20px; flex: 1; }
.cfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); margin-top: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.grid2, .grid3 { margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis.small { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi[role="button"] { cursor: pointer; } .kpi[role="button"]:hover { border-color: var(--line-2); background: var(--surface-2); }
.kpi .lb { display: flex; align-items: center; gap: 6px; color: var(--mut); font-size: 12.5px; font-weight: 600; } .kpi .lb .ic { width: 15px; height: 15px; }
.kpi .v { font-size: 26px; font-weight: 600; margin-top: 4px; line-height: 1.2; font-family: var(--font-d); } .kpi .v.small { font-size: 15px; font-family: var(--font); } .kpi .v small { font-size: 12px; color: var(--mut); font-weight: 500; font-family: var(--font); }
.kpi.ok .v { color: var(--ok); } .kpi.warn .v { color: var(--err); } .kpi.goldy .v { color: var(--gold); }
.mini-kpis { display: flex; gap: 22px; margin-bottom: 12px; } .mini-kpis div { display: grid; } .mini-kpis b { font-size: 22px; font-family: var(--font-d); font-weight: 600; } .mini-kpis span { color: var(--mut); font-size: 12.5px; }
.empty { text-align: center; padding: 44px 16px; color: var(--mut); display: grid; justify-items: center; gap: 12px; } .empty .ic { width: 34px; height: 34px; opacity: .45; } .empty p { max-width: 44ch; }
.res-line { display: flex; gap: 8px; align-items: center; color: var(--mut); font-size: 13px; margin: 6px 0 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; border: 0; background: none; padding: 10px 14px; font-weight: 500; color: var(--mut); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); font-weight: 600; } .tabs button.on::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--council); }
.tabs button .cnt { background: var(--surface-3); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; color: var(--ink-2); }

/* ---------- Toolbar & filters ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.filter-toggle { display: none; }
.tb-l { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 0; } .tb-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select, .filters select, .filters input { width: auto; min-height: 36px; padding: 6px 10px; font-size: 13px; max-width: 200px; }
.toolbar select { padding-inline-end: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--r); margin-bottom: 10px; }
.bulkbar select, .bulkbar input { width: auto; min-height: 34px; font-size: 13px; padding: 4px 10px; }

/* ---------- Chips, pills, meters ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; line-height: 20px; }
.chip .ic { width: 13px; height: 13px; }
.chip.prA { background: var(--gold-soft); color: var(--gold); } .chip.prB { background: var(--brand-soft); color: var(--brand-3); } .chip.prC { background: var(--surface-3); color: var(--mut); }
.chip.grp { background: var(--info-soft); color: var(--info); }
.chip.st { background: var(--surface-3); color: var(--ink-2); } .chip.st-won { background: var(--ok-soft); color: var(--ok); } .chip.st-hold { background: var(--surface-3); color: var(--mut); text-decoration: line-through; } .chip.st-new { background: var(--info-soft); color: var(--info); } .chip.st-nego, .chip.st-proposal { background: var(--warn-soft); color: var(--warn); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--err-soft); color: var(--err); } .chip.soft { background: var(--surface-2); color: var(--mut); font-weight: 500; }
.chip.due-over { background: var(--err-soft); color: var(--err); } .chip.due-today { background: var(--warn-soft); color: var(--warn); } .chip.due-soon { background: var(--info-soft); color: var(--info); }
.chip.q-ok { background: var(--ok-soft); color: var(--ok); } .chip.q-warn { background: var(--warn-soft); color: var(--warn); } .chip.q-bad { background: var(--err-soft); color: var(--err); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink); max-width: 100%; }
.pill a { color: inherit; } .pill.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.vpill.ok { border-color: var(--ok); } .vpill.bad { border-color: var(--err); } .vpill.bad a { text-decoration: line-through; color: var(--mut); }
.vf { display: inline-flex; gap: 2px; margin-inline-start: 4px; } .vf button { border: 0; background: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--mut); } .vf button:hover { background: var(--surface-3); color: var(--ink); } .vf button.on { background: var(--ok-soft); color: var(--ok); } .vf button.on.bad { background: var(--err-soft); color: var(--err); } .vf .ic { width: 13px; height: 13px; }
.meter { display: inline-block; width: 64px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--brand); } .meter i.mid { background: var(--warn); } .meter i.low { background: var(--err); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 10px; font-size: 13px; } .bar[role="button"] { cursor: pointer; } .bar[role="button"]:hover .bl { color: var(--brand-2); }
.bar .bt { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; } .bar .bt i { display: block; height: 100%; background: var(--brand); border-radius: 999px; } .bar .bv { min-width: 28px; text-align: end; font-weight: 600; }
.chart { width: 100%; height: auto; }
.usage { margin-bottom: 12px; } .u-l { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; } .usage .meter { width: 100%; height: 8px; }
.status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.engine-strip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; background: var(--ok-soft); color: var(--ok); } .engine-strip.off { background: var(--warn-soft); color: var(--warn); }
.engine-strip > div { flex: 1; } .engine-strip b { display: block; } .engine-strip small { color: inherit; opacity: .85; }
.job-status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); margin-bottom: 14px; } .job-status.on { background: var(--brand-soft); color: var(--brand-3); } .job-status > div { flex: 1; } .job-status b { display: block; } .job-status small { color: var(--mut); }
.log { background: var(--surface-2); border-radius: var(--r-s); padding: 10px 12px; max-height: 320px; overflow: auto; font-size: 13px; } .log-l { padding: 3px 0; border-bottom: 1px dashed var(--line); } .log-l:last-child { border: 0; }

/* ---------- Tables ---------- */
.tblwrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); } .tblwrap.short { max-height: 420px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-size: 12px; font-weight: 700; color: var(--mut); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; z-index: 1; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover, .tbl th.on { color: var(--brand-3); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; } .tbl tbody tr[data-act] { cursor: pointer; } .tbl tbody tr[data-act]:hover { background: var(--surface-2); } .tbl tr.sel { background: var(--brand-soft); }
.tbl td.num, .tbl th.num { text-align: end; } .tbl .w0 { width: 34px; }
.tbl td small { display: block; color: var(--mut); font-size: 12px; }
.cell-name b { font-weight: 600; } .cell-contact span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; margin-inline-end: 2px; color: var(--ok); background: var(--ok-soft); } .cell-contact span.no { color: var(--mut); background: var(--surface-3); opacity: .6; } .cell-contact .ic { width: 13px; height: 13px; }
.tbl tr.ghead td { background: var(--surface-2); font-size: 13px; }
.tbl.map td select { min-height: 34px; padding: 4px 8px; font-size: 13px; }
.tgts { display: grid; gap: 4px; min-width: 150px; } .tgt { display: grid; grid-template-columns: 60px 1fr 42px; gap: 6px; align-items: center; font-size: 11.5px; } .tgt i { display: block; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; } .tgt i b { display: block; height: 100%; background: var(--brand); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0; color: var(--mut); font-size: 13px; }

/* ---------- Lead cards & directory cards ---------- */
/* merged directory: rows that come from the central directory and are not in the pipeline yet */
.tbl tbody tr.drow td { background: var(--surface-2); } .tbl tbody tr.drow[data-act]:hover td { background: var(--surface-3); } .tbl tbody tr.drow .cell-name b { font-weight: 500; }
.cell-dir { white-space: nowrap; } .cell-dir .btn { min-height: 26px; padding: 2px 8px; font-size: 12px; margin-inline-start: 6px; vertical-align: middle; }
.lcards, .dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.lcard, .dcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.lcard { cursor: pointer; } .lcard:hover, .dcard:hover { border-color: var(--brand); } .lcard.sel, .dcard.sel { background: var(--brand-soft); border-color: var(--brand); } .dcard.taken { opacity: .75; }
.lc-sel, .dc-sel { position: absolute; top: 12px; inset-inline-end: 12px; }
.lc-h, .dc-h { display: flex; align-items: center; gap: 8px; } .lc-h b, .dc-h b { font-weight: 600; font-size: 15px; } .dc-h { cursor: pointer; flex-direction: column; align-items: flex-start; gap: 2px; padding-inline-end: 28px; } .dc-h small { color: var(--mut); }
.lc-en { color: var(--mut); font-size: 12.5px; } .lc-meta, .dc-meta { color: var(--mut); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; } .lc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-contact, .dc-contact { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); } .lc-contact span, .dc-contact span { display: inline-flex; align-items: center; gap: 5px; } .dc-contact .no { color: var(--mut); opacity: .7; } .lc-contact .ic, .dc-contact .ic { width: 14px; height: 14px; }
.dc-biz { font-size: 13px; color: var(--ink-2); margin: 2px 0; } .dc-f { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.dir-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 26px; border-radius: var(--r-l); background: linear-gradient(135deg, var(--brand-3), var(--brand)); color: #fff; margin-bottom: 16px; }
.dir-hero h2 { font-size: 20px; color: #fff; } .dir-hero p { opacity: .9; margin: 4px 0 0; max-width: 60ch; }
.dir-stats { display: flex; gap: 22px; } .dir-stats div { display: grid; text-align: center; } .dir-stats b { font-size: 22px; font-family: var(--font-d); } .dir-stats span { font-size: 12px; opacity: .9; }
.lrows { display: grid; } .lrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 4px; border: 0; background: none; border-bottom: 1px solid var(--line); } .lrow:last-of-type { border: 0; } .lrow:hover { background: var(--surface-2); }
.lr-n { flex: 1; min-width: 0; display: grid; } .lr-n b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lr-n small { color: var(--mut); font-size: 12px; }
.lnk.more { margin-top: 6px; }
.tips { padding-inline-start: 18px; margin: 10px 0 0; } .tips li { margin-bottom: 2px; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 30px 16px; border: 2px dashed var(--line-2); border-radius: var(--r); text-align: center; cursor: pointer; color: var(--ink-2); background: var(--surface-2); } .drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); } .drop .ic { width: 30px; height: 30px; color: var(--brand); }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--mut); font-size: 13px; margin-bottom: 14px; } .steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-3); font-size: 12px; }
.dup-row { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); } .dup-row:last-child { border: 0; }
.dup-cell { display: grid; gap: 2px; } .dup-cell b { font-weight: 600; } .dup-cell small { color: var(--mut); } .dup-tools { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.plain-list { padding-inline-start: 20px; display: grid; gap: 10px; } .plain-list li { padding-bottom: 8px; border-bottom: 1px solid var(--line); } .plain-list li:last-child { border: 0; }
.item-tools { display: flex; gap: 10px; margin-top: 8px; }
.acc { display: grid; gap: 8px; } .acc-i { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); } .acc-i summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; } .acc-i summary::-webkit-details-marker { display: none; } .acc-i summary b { flex: 1; } .acc-b { padding: 0 16px 14px; }
.stage-list { display: grid; gap: 6px; } .stage-row { display: flex; gap: 6px; align-items: center; } .stage-row input { min-height: 36px; padding: 6px 10px; }
.tpl-item { display: flex; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); } .tpl-item:last-child { border: 0; }
.tpl-row { display: grid; gap: 4px; width: 100%; text-align: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; } .tpl-row:hover { border-color: var(--brand); } .tpl-row span { color: var(--mut); font-size: 12.5px; }
.code-txt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }

/* ---------- Board ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.col { flex: 0 0 272px; background: var(--surface-2); border-radius: var(--r); border: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-2); border-radius: var(--r) var(--r) 0 0; } .col-h .cnt { background: var(--surface); border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; }
.col-b { padding: 8px; display: grid; gap: 8px; overflow: auto; flex: 1; min-height: 80px; } .col-b.over { background: var(--brand-soft); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); display: grid; gap: 4px; } .kcard:hover { border-color: var(--brand); } .kcard.dragging { opacity: .5; }
.k-h { display: flex; align-items: center; gap: 6px; } .k-h b { font-weight: 600; font-size: 13.5px; } .k-m { color: var(--mut); font-size: 12px; } .k-f { display: flex; gap: 6px; flex-wrap: wrap; }
.col-empty { color: var(--mut); font-size: 12.5px; text-align: center; padding: 18px 8px; border: 1px dashed var(--line-2); border-radius: var(--r-s); }
.plan-list { display: grid; gap: 8px; } .plan-row { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); } .plan-row:last-child { border: 0; }
.pr-main { display: flex; gap: 10px; align-items: center; cursor: pointer; } .pr-main small { display: block; color: var(--mut); font-size: 12px; }
.pr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); } .pr-meta span { display: inline-flex; align-items: center; gap: 4px; } .pr-meta .ic { width: 14px; height: 14px; }
.pr-tools { display: flex; gap: 8px; align-items: center; } .pr-tools select { width: auto; min-height: 34px; padding: 4px 10px; font-size: 13px; }

/* ---------- Calendar ---------- */
.cal-title { font-family: var(--font-d); font-size: 16px; padding: 0 8px; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--line); } .cal-head span { padding: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--mut); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 96px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: grid; align-content: start; gap: 3px; } .cal-cell.empty { background: var(--surface-2); } .cal-cell.today { background: var(--brand-soft); } .cal-cell.past .cal-it { opacity: .75; }
.cal-d { font-size: 12px; color: var(--mut); font-weight: 600; } .cal-cell.today .cal-d { color: var(--brand-3); }
.cal-it { border: 0; text-align: start; font-size: 11.5px; padding: 3px 6px; border-radius: 4px; background: var(--info-soft); color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; } .cal-it.task { background: var(--warn-soft); color: var(--warn); }

/* ---------- Drawer ---------- */
.dr-ovl { position: fixed; inset: 0; background: rgba(15,20,17,.45); z-index: 50; animation: fade .15s; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(760px, 100%); background: var(--bg); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .2s ease-out; }
@keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateX(var(--slide-x, -30px)); opacity: 0; } } [dir="ltr"] .drawer { --slide-x: 30px; }
.dr-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 22px 0; }
.dr-row { display: flex; gap: 12px; align-items: flex-start; } .dr-name { flex: 1; min-width: 0; } .dr-name h2 { font-size: 19px; } .dr-name .en { color: var(--mut); font-size: 13px; } .dr-btns { display: flex; gap: 2px; }
.dr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.dr-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qbtn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none; } .qbtn:hover { border-color: var(--brand); color: var(--brand-3); text-decoration: none; }
.dr-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; } .dr-tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--mut); border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; } .dr-tabs button.on { color: var(--brand-3); border-bottom-color: var(--brand); }
.dr-body { flex: 1; overflow: auto; padding: 18px 22px 40px; }
.kvs { display: grid; gap: 10px; margin: 0; } .kvs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px; margin: 0; align-items: start; } .kv dt { color: var(--mut); font-size: 12.5px; font-weight: 600; padding-top: 2px; } .kv dd { margin: 0; min-width: 0; word-break: break-word; } .kv dd.mut { color: var(--mut); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; } .timeline li { display: flex; gap: 12px; } .tl-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); } .tl-ic .ic { width: 15px; height: 15px; } .tl-ic.call { background: var(--ok-soft); color: var(--ok); } .tl-ic.meet, .tl-ic.visit { background: var(--info-soft); color: var(--info); } .tl-ic.msg { background: var(--warn-soft); color: var(--warn); }
.tl-h { display: flex; gap: 8px; align-items: baseline; font-size: 13px; } .tl-t { white-space: pre-line; }
.tasks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; } .tasks li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); } .tasks li.done span { text-decoration: line-through; color: var(--mut); } .tasks .chk { border: 0; padding: 0; flex: 1; background: none; }
.files { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; } .files li { display: flex; align-items: center; gap: 8px; } .files a { flex: 1; }
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; } .hist s { color: var(--mut); }
textarea.notes { width: 100%; }

/* ---------- Modal ---------- */
.ovl { position: fixed; inset: 0; background: rgba(15,20,17,.5); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop .18s ease-out; }
.ovl.wide .modal { width: min(900px, 100%); } .ovl.narrow .modal { width: min(440px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.m-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); } .m-head > div { flex: 1; min-width: 0; } .m-sub { color: var(--mut); font-size: 12.5px; }
.m-body { padding: 16px 20px; overflow: auto; flex: 1; } .m-text { font-size: 15px; }
.m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.f-tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; } .f-tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--mut); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: 44px; } .f-tabs button.on { color: var(--brand-3); border-bottom-color: var(--brand); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: max-content; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .2s; } .toast .ic { color: var(--brand); flex: none; } .toast.err { background: var(--err); color: #fff; } .toast.err .ic { color: #fff; } .toast.out { opacity: 0; transition: opacity .3s; }

/* ---------- Settings ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { display: grid; gap: 2px; position: sticky; top: calc(var(--top-h) + 16px); }
.set-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: var(--r); text-align: start; color: var(--ink-2); font-weight: 500; min-height: 42px; } .set-nav button:hover { background: var(--surface-2); color: var(--ink); } .set-nav button.on { background: var(--surface-2); color: var(--ink); font-weight: 600; } .set-nav button.on .ic { color: var(--brand); }
.set-head { margin-bottom: 14px; } .set-head h2 { font-size: 18px; }
.set-tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; border-bottom: 1px solid var(--line); max-width: 100%; } .set-tabs::-webkit-scrollbar { display: none; }
.set-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; background: none; color: var(--mut); font-weight: 500; white-space: nowrap; min-height: 44px; cursor: pointer; } .set-tabs button:hover { color: var(--ink); } .set-tabs button.on { color: var(--ink); font-weight: 600; } .set-tabs button.on::after { content: ''; position: absolute; inset-inline: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--council); } .set-tabs button .ic, .set-tabs button svg { width: 16px; height: 16px; }

/* ---------- Auth: one card on white; the thread above the title ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--page-w); width: 100%; margin: 0 auto; padding: 18px 24px; }
.auth-lang { display: flex; gap: 6px; }
.auth-pane { flex: 1; display: grid; place-items: start center; align-content: center; padding: 24px 20px 48px; }
.auth-card { width: min(420px, 100%); display: grid; gap: 16px; }
.auth-card h1 { font-size: 30px; line-height: 1.3; }
.auth-card h1::before { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; background: var(--council); margin-bottom: 18px; }
.auth-sub { color: var(--mut); margin-top: -8px; font-size: 15px; }
.auth-note { display: flex; align-items: center; gap: 8px; color: var(--mut); font-size: 13px; justify-content: center; }
.auth-forgot { text-align: center; margin: 0; font-size: 14px; }
@media (max-width: 860px) { .auth-top { padding: 14px 16px; } .auth-card h1 { font-size: 25px; } .auth-pane { align-content: start; padding-top: 8px; } }

/* ---------- Investor roadmap ---------- */
.road { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; }
.rd-side { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow: auto; display: grid; gap: 10px; scrollbar-width: thin; }
.rd-tools { display: grid; gap: 8px; } .rd-search { width: 100%; max-width: 100%; } .rd-search input { height: 38px; font-size: 13.5px; } .rd-tools .fld span { font-size: 12px; }
.rd-toc { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.rd-toc-b { display: flex; align-items: center; gap: 9px; width: 100%; text-align: start; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-s); font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 36px; }
.rd-toc-b .ic { width: 16px; height: 16px; flex: none; color: var(--mut); } .rd-toc-b span:not(.cnt) { flex: 1; line-height: 1.25; } .rd-toc-b:hover { background: var(--surface-2); } .rd-toc-b.on { background: var(--brand-soft); color: var(--brand-3); } .rd-toc-b.on .ic { color: var(--brand-2); }
.rd-toc-b .cnt { background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.rd-toc-g { font-size: 11px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; padding: 10px 10px 4px; }
.rd-meta { padding: 0 4px; line-height: 1.6; }
.rd-main { min-width: 0; }
.rd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; } .rd-head h2 { font-size: 20px; margin-bottom: 6px; } .rd-head .btn-row { margin: 0; }
.rd-intro .cbody { font-size: 15px; line-height: 1.7; }
.rd-body p { margin-bottom: .7em; } .rd-body h4 { margin: 14px 0 6px; } .rd-body h5 { margin: 12px 0 4px; font-size: 13px; }
.rd-ul, .rd-ol { margin: 4px 0 10px; padding-inline-start: 22px; display: grid; gap: 5px; } .rd-ul li, .rd-ol li { line-height: 1.6; } .rd-ul.small { font-size: 12.5px; color: var(--ink-2); }
.rd-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; } .rd-jump a { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); } .rd-jump a:hover { border-color: var(--brand); color: var(--brand-3); text-decoration: none; }
.rd-sec { scroll-margin-top: calc(var(--top-h) + 12px); } .rd-sec .chead h3 { font-size: 16px; }
.rd-h { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; font-size: 13.5px; color: var(--brand-3); } .rd-h .ic { width: 16px; height: 16px; } .rd-h small { font-weight: 500; }
.rd-steps { counter-reset: st; list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.rd-steps li { position: relative; padding: 10px 12px 10px; padding-inline-start: 46px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.rd-steps li::before { counter-increment: st; content: counter(st); position: absolute; inset-inline-start: 12px; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 12px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.rd-step-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; } .rd-step-h b { font-size: 14px; } .rd-steps p { font-size: 13.5px; color: var(--ink-2); margin: 4px 0; }
.rd-check { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; } .rd-check .chk { border-radius: var(--r-s); width: 100%; align-items: flex-start; font-size: 13.5px; line-height: 1.5; } .rd-check input { margin-top: 3px; }
.rd-tbl { font-size: 13px; } .rd-tbl td, .rd-tbl th { vertical-align: top; line-height: 1.5; } .rd-tbl th { white-space: nowrap; }
.rd-laws { display: grid; gap: 8px; margin: 12px 0; }
.rd-law { border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: var(--r); background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface)); }
.rd-law > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 13.5px; flex-wrap: wrap; } .rd-law > summary::-webkit-details-marker { display: none; } .rd-law > summary .ic { width: 16px; height: 16px; color: var(--gold); flex: none; }
.rd-quote { margin: 0 14px 12px; padding: 12px 16px; border-inline-start: 3px solid var(--gold); background: var(--surface); border-radius: var(--r-s); font-size: 14px; line-height: 1.85; white-space: pre-line; } .rd-quote.alt { opacity: .92; font-size: 13.5px; }
.rd-law-alt { margin: 0 14px 12px; } .rd-law-alt > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--brand-2); padding: 4px 0; list-style: none; } .rd-law-alt > summary::-webkit-details-marker { display: none; } .rd-law-alt .rd-quote { margin: 8px 0 0; }
.rd-law p.mut { margin: 0 14px 12px; }
.rd-note { margin: 10px 0; } .rd-note > div:first-child { flex: none; } .rd-note > div:last-child { flex: 1; min-width: 0; } .rd-note b { display: block; margin-bottom: 4px; } .rd-note .rd-ul { margin-bottom: 0; color: inherit; } .rd-note .pills { margin-top: 6px; } .rd-note a { color: inherit; text-decoration: underline; }
.rd-src { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; } .rd-src .lbl { font-weight: 700; color: var(--mut); } .rd-src a { display: inline-flex; align-items: center; gap: 4px; } .rd-src .ic { width: 13px; height: 13px; }
.rd-path { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.rd-path a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); } .rd-path a:hover { border-color: var(--brand); text-decoration: none; }
.rd-path .n { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; flex: none; } .rd-path .txt { flex: 1; display: grid; } .rd-path .txt small { color: var(--mut); } .rd-path .ic { color: var(--mut); } [dir="rtl"] .rd-path .ic { transform: scaleX(-1); }
.rd-hit { display: block; padding: 12px 16px; color: var(--ink); } .rd-hit:hover { text-decoration: none; border-color: var(--brand); } .rd-hit b { display: block; } .rd-hit p { margin: 4px 0 0; color: var(--ink-2); }
.rd-gloss { margin: 0; display: grid; gap: 8px; } .rd-term { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; } .rd-term dt { font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .rd-term dt small { font-weight: 500; } .rd-term dd { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.rd-disc { margin-top: 18px; font-size: 12.5px; }
.rd-find-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 12px; } .rd-find p { margin: 6px 0; } .rd-find.dismissed { opacity: .65; }
.rd-print h2 { margin-top: 16px; } .rd-print h3 { margin-top: 12px; } .rd-print blockquote { border-inline-start: 3px solid #999; margin: 6px 0; padding: 4px 10px; white-space: pre-line; } .rd-print hr { border: 0; border-top: 1px solid #ccc; margin: 12px 0; } .rd-print table { width: 100%; border-collapse: collapse; font-size: 9.5pt; } .rd-print td, .rd-print th { border-bottom: 1px solid #bbb; padding: 3px 6px; text-align: start; vertical-align: top; }
@media (max-width: 1100px) { .road { grid-template-columns: 220px minmax(0, 1fr); gap: 14px; } }
@media (max-width: 860px) {
  .road { grid-template-columns: 1fr; } .rd-side { position: static; max-height: none; overflow: visible; }
  .rd-toc { display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; padding: 6px; } .rd-toc-b { width: auto; white-space: nowrap; flex: none; } .rd-toc-g { display: none; }
  .rd-steps li { padding-inline-start: 40px; } .rd-quote { font-size: 13.5px; }
}

/* ---------- Print ---------- */
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; padding: 12mm; font-size: 11pt; color: #000; background: #fff; }
  .pr-head { display: flex; gap: 12px; align-items: center; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; } .pr-head img { width: 44px; height: 44px; object-fit: contain; } .pr-t { flex: 1; } .pr-title { font-size: 16pt; font-weight: 700; } .pr-sub { color: #444; } .pr-meta { text-align: end; font-size: 9.5pt; color: #444; }
  .pr-foot { margin-top: 14px; border-top: 1px solid #999; padding-top: 6px; font-size: 9pt; color: #555; }
  .tbl.print { width: 100%; border-collapse: collapse; font-size: 9.5pt; } .tbl.print th, .tbl.print td { border-bottom: 1px solid #bbb; padding: 4px 6px; text-align: start; vertical-align: top; } .tbl.print th { background: #eee; }
  @page { size: A4; margin: 10mm; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .appbar-in { gap: 16px; } .secnav a { padding: 0 10px; } .secnav a .ic { display: none; }
  .searchwrap { width: 220px; }
  .brand-txt small { display: none; }
}
@media (max-width: 860px) {
  /* phones and small tablets: the sections move to a bar at the bottom, the top keeps the brand and the person */
  .appbar-in { padding: 0 16px; gap: 10px; }
  .secnav { display: none; }
  .brand-txt b { font-size: 15px; }
  .appbar .searchwrap { width: 40px; max-width: 40px; } .appbar .searchwrap input { padding-inline-start: 0; opacity: 0; cursor: pointer; background: transparent; }
  .appbar .searchwrap:focus-within { width: calc(100vw - 32px); max-width: none; position: absolute; inset-inline: 16px; z-index: 5; } .appbar .searchwrap:focus-within input { padding-inline-start: 38px; opacity: 1; background: var(--surface); border-color: var(--line-2); }
  .toolbar.collapsible .tb-l > select, .toolbar.collapsible .tb-l > .btn:not(.filter-toggle) { display: none; } .toolbar.collapsible.open .tb-l > .btn { display: inline-flex; } .toolbar.collapsible.open .tb-l > select { display: block; width: calc(50% - 4px); max-width: none; } .toolbar.collapsible .filter-toggle { display: inline-flex; }
  .tb-new span { display: none; } .tb-new { padding: 0; width: 40px; min-height: 40px; border-radius: 50%; }
  .phead { padding: 18px 16px 0; } .phead h1 { font-size: 22px; } .phead .sub { font-size: 13.5px; }
  .hubtabs { padding: 8px 16px 0; }
  .view { padding: 16px 16px calc(var(--mnav-h) + 28px); }
  .mnav { display: flex; position: fixed; bottom: 0; inset-inline: 0; height: calc(var(--mnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); z-index: 28; }
  .mnav a { position: relative; flex: 1; min-width: 0; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 11.5px; color: var(--mut); text-decoration: none; font-weight: 600; }
  .mnav a.on { color: var(--ink); } .mnav a.on .ic { color: var(--brand); }
  .mnav a.on::before { content: ""; position: absolute; top: -1px; inset-inline: 28%; height: 2px; border-radius: 2px; background: var(--council); }
  .mnav .ic { width: 22px; height: 22px; } .mnav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mnav .cnt { position: absolute; top: 6px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; line-height: 18px; font-size: 10px; padding: 0 5px; }
  .umenu { inset-inline: 12px; width: auto; top: calc(var(--top-h) - 4px); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .frm { grid-template-columns: 1fr; } .kvs.two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .settings { grid-template-columns: minmax(0, 1fr); } #set-body { min-width: 0; max-width: 100%; } .set-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; scrollbar-width: none; } .set-nav button { white-space: nowrap; }
  .drawer { width: 100%; } .dr-head { padding: 12px 16px 0; } .dr-body { padding: 14px 16px 60px; }
  .toolbar select { max-width: 46vw; } .cal-cell { min-height: 64px; } .cal-it { font-size: 10px; }
  .dup-row { grid-template-columns: 1fr; } .board { min-height: 50vh; } .col { flex-basis: 84vw; }
  .dir-hero { padding: 18px; } .dir-stats { gap: 14px; }
  .bulkbar select, .bulkbar input { flex: 1; }
  .toasts { bottom: calc(var(--mnav-h) + 14px); }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .v { font-size: 22px; }
  .lcards, .dcards { grid-template-columns: 1fr; }
  .m-foot .btn { flex: 1; }
  .brand-txt { display: none; }
}

/* ---------- AI assistant (panel, page, messages) ---------- */
.assist-fab { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px; height: 46px; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand); font-weight: 700; box-shadow: var(--shadow-lg); }
.assist-fab .ic { width: 20px; height: 20px; } .assist-fab:hover { background: var(--brand-2); }
body.assist-open .assist-fab, body.locked .assist-fab, body:has(.view-chat) .assist-fab { display: none; }
.assist-panel { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(460px, 100%); background: var(--bg); z-index: 45; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border-inline-start: 1px solid var(--line); animation: slide .2s ease-out; }
.ap-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ap-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; } .ap-title .ic { width: 22px; height: 22px; color: var(--brand); flex: none; } .ap-title > div { min-width: 0; } .ap-title b { display: block; font-family: var(--font-d); } .ap-title small { display: block; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ap-btns { display: flex; gap: 2px; flex: none; }
.ap-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ap-msgs { flex: 1; overflow: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; max-width: 100%; }
.msg.user { justify-content: flex-end; } .msg.user .msg-body { background: var(--brand); color: var(--on-brand); border-radius: var(--r-l); border-end-end-radius: 4px; padding: 10px 14px; max-width: 85%; white-space: pre-wrap; word-break: break-word; }
.msg.bot .msg-av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-3); display: grid; place-items: center; } .msg.bot .msg-av .ic { width: 16px; height: 16px; }
.msg-wrap { min-width: 0; flex: 1; }
.msg.bot .msg-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); border-start-start-radius: 4px; padding: 10px 14px; word-break: break-word; }
.msg.bot.err .msg-body { background: var(--err-soft); color: var(--err); border-color: transparent; }
.msg-body p { margin: 0 0 .5em; } .msg-body p:last-child { margin: 0; } .msg-body ul, .msg-body ol { margin: .3em 0 .5em; padding-inline-start: 1.3em; } .msg-body li { margin: .15em 0; } .msg-body h4 { margin: .6em 0 .3em; }
.msg-body code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; direction: ltr; unicode-bidi: embed; }
.msg-body pre.code { background: var(--surface-2); padding: 10px 12px; border-radius: var(--r-s); overflow: auto; direction: ltr; text-align: left; font-size: 12.5px; margin: .4em 0; } .msg-body pre.code code { background: none; padding: 0; }
.msg-body blockquote { margin: .4em 0; padding-inline-start: 10px; border-inline-start: 3px solid var(--line-2); color: var(--ink-2); }
.msg-body .tblwrap.md { margin: .5em 0; box-shadow: none; } .msg-body .tbl th, .msg-body .tbl td { padding: 6px 10px; font-size: 13px; }
.lead-ref { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--brand-soft); background: var(--brand-soft); color: var(--brand-3); border-radius: 999px; padding: 0 8px; font-weight: 600; font-size: 12.5px; line-height: 22px; vertical-align: middle; font-family: inherit; }
.lead-ref small { color: var(--mut); font-weight: 500; font-size: 11px; } .lead-ref:hover { border-color: var(--brand); } .lead-ref.off { background: var(--surface-2); color: var(--mut); border-color: var(--line); } .lead-ref.dir { background: var(--info-soft); color: var(--info); border-color: transparent; } .lead-ref .ic { width: 13px; height: 13px; }
.msg.user .lead-ref { background: rgba(255,255,255,.2); color: inherit; border-color: transparent; }
.msg-tools { display: flex; gap: 4px; margin-top: 2px; opacity: 0; transition: opacity .15s; } .msg:hover .msg-tools, .msg:focus-within .msg-tools { opacity: 1; } .msg-tools .lnk { color: var(--mut); }
.tools-used { font-size: 12px; color: var(--mut); margin-top: 4px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; } .tools-used .ic { width: 13px; height: 13px; }
.srcs { margin-top: 6px; font-size: 12.5px; } .srcs summary { cursor: pointer; color: var(--mut); display: flex; align-items: center; gap: 4px; list-style: none; } .srcs summary .ic { width: 13px; height: 13px; } .srcs ul { margin: 4px 0 0; padding-inline-start: 1.2em; } .srcs li { margin: 2px 0; }
.confirm-card { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); border-radius: var(--r); font-size: 13.5px; flex-wrap: wrap; }
.confirm-card > .ic { flex: none; margin-top: 2px; color: var(--warn); } .confirm-card > div:nth-child(2) { flex: 1; min-width: 160px; } .confirm-card.done { background: var(--surface-2); border-color: var(--line); } .confirm-card.done > .ic { color: var(--mut); } .confirm-card .btn-row { margin: 0; flex: none; }
.ap-status { display: flex; align-items: center; gap: 8px; color: var(--mut); font-size: 12.5px; padding: 2px 4px; } .ap-status[hidden] { display: none; }
.ap-empty { text-align: center; padding: 30px 10px; margin: auto 0; } .ap-empty .ic { width: 40px; height: 40px; color: var(--brand); } .ap-empty h3 { margin: 10px 0 4px; }
.ap-sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.sg-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); text-align: start; } .sg-chip:hover { border-color: var(--brand); color: var(--brand-3); }
.ap-off { margin: 0 14px 8px; align-items: center; } .ap-off span { flex: 1; }
.ap-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.ap-input textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); line-height: 1.45; font-size: 14px; }
.ap-input textarea:focus { outline: 2px solid var(--brand-ring); border-color: var(--brand); } .ap-input .btn { width: 44px; min-height: 42px; padding: 0; flex: none; }
.ap-foot { padding: 4px 14px 8px; background: var(--surface); text-align: center; }
.chat-page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; height: calc(100vh - var(--top-h) - 62px); min-height: 480px; }
.chat-main { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; } .chat-main .ap-body { height: 100%; } .chat-main .ap-msgs { background: var(--bg); }
.chat-list { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; } .cl-items { overflow: auto; display: grid; gap: 4px; align-content: start; min-width: 0; }
.cl-item { display: flex; align-items: center; gap: 2px; border-radius: var(--r-s); } .cl-item.on { background: var(--brand-soft); } .cl-item:hover { background: var(--surface-2); } .cl-item.on:hover { background: var(--brand-soft); }
.cl-open { flex: 1; min-width: 0; border: 0; background: none; text-align: start; padding: 8px 10px; display: grid; } .cl-open b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13.5px; } .cl-open small { color: var(--mut); font-size: 11.5px; }
.inrow { display: flex; gap: 6px; align-items: center; } .inrow input { flex: 1; min-width: 0; }
.as-pick { cursor: pointer; border: 0; margin: 2px 0; }
@media (max-width: 860px) {
  .assist-panel { width: 100%; }
  .assist-fab { bottom: calc(var(--mnav-h) + 14px); inset-inline-end: 14px; padding: 0; width: 50px; justify-content: center; } .assist-fab span { display: none; }
  .chat-page { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat-list { flex-direction: row; align-items: center; max-width: 100%; } .chat-list .cl-items { display: flex; overflow-x: auto; gap: 6px; flex: 1; min-width: 0; scrollbar-width: none; } .cl-item { flex: none; max-width: 200px; }
  .chat-main { height: calc(100vh - var(--top-h) - var(--mnav-h) - 130px); min-height: 420px; }
}

/* ---------- Legal & compliance ---------- */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.legal-links a { color: var(--mut); text-decoration: none; } .legal-links a:hover { color: var(--brand); text-decoration: underline; }
.legal-links.auth-legal { justify-content: center; margin-top: 18px; } .legal-links.inline { margin: 10px 0 14px; }
.auth-terms { font-size: 12.5px; color: var(--mut); text-align: center; margin: 12px 0 0; }
.consent-chk { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; font-size: 13.5px; cursor: pointer; } .consent-chk input { margin-top: 3px; flex: none; }
.cookie-note { position: fixed; bottom: 16px; inset-inline: 16px; z-index: 150; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow-lg); font-size: 13.5px; }
.cookie-note span { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; } .cookie-note .ic { color: var(--brand); flex: none; } .cookie-note a { color: var(--brand); }
@media (min-width: 900px) { .cookie-note { inset-inline: auto 24px; max-width: 560px; } }
.legal-doc h1 { font-size: 20px; margin-bottom: 8px; } .legal-doc h2 { font-size: 15.5px; margin: 18px 0 6px; } .legal-doc h3 { font-size: 14px; margin: 12px 0 4px; }
.legal-doc p, .legal-doc li { font-size: 14px; line-height: 1.7; } .legal-doc ul { padding-inline-start: 20px; }
.legal-doc table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13.5px; } .legal-doc th, .legal-doc td { border: 1px solid var(--line); padding: 6px 10px; text-align: start; }
.pillbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } .pillbar button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; } .pillbar button.on { background: var(--brand-soft); color: var(--brand-3); border-color: var(--brand); }
.set-body #lg-text { width: 100%; font-size: 13px; line-height: 1.6; margin: 10px 0; }
/* v32: validation badges, board overflow, aggregate colours */
.chip.vbadge { margin-inline-start: 6px; font-size: 11px; padding: 1px 7px; vertical-align: middle; } .chip.vbadge .ic { width: 12px; height: 12px; margin-inline-end: 3px; }
.chip.vbadge.warn { background: var(--warn-soft); color: var(--warn); } .chip.vbadge.bad { background: var(--bad-soft, #fde8e8); color: var(--bad, #b42318); }
.cell-name .vbadge { display: inline-flex; align-items: center; } .lc-h .vbadge, .dc-h .vbadge { margin-inline-start: 4px; }
.col-more { width: 100%; justify-content: center; margin-top: 4px; }
.mini-kpis b.warn { color: var(--warn); } .mini-kpis b.bad { color: var(--bad, #b42318); }
.ta-c { text-align: center; padding: 8px; }
.res-line .warn { color: var(--warn); }

/* the storage notice must never cover the assistant's input (panel or full page) */
body.assist-open .cookie-note, body:has(.view-chat) .cookie-note { bottom: auto; top: 16px; }

/* ---------- Onboarding checklist ---------- */
.onboard { margin-bottom: 16px; border-color: var(--brand); } .onboard .chead { display: flex; align-items: center; gap: 10px; } .onboard .chead h3 { flex: 1; }
.ob-bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 12px; } .ob-bar i { display: block; height: 100%; background: var(--brand); }
.ob-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ob-steps li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); }
.ob-steps li > div { flex: 1; min-width: 0; } .ob-steps li small { display: block; color: var(--mut); font-size: 12.5px; }
.ob-steps li.done { opacity: .7; } .ob-steps li.done .ic { color: var(--ok); }
.ob-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-3); font-weight: 700; font-size: 12.5px; flex: none; }
kbd { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface-2); }

/* ---------- Detailed classification & visibility ---------- */
.chip.cls { background: var(--info-soft); color: var(--info); font-weight: 500; } .chip.cls-legal { background: var(--surface-3); color: var(--ink-2); } .chip.cls-bsize { background: var(--gold-soft); color: var(--gold); }
.cell-cls { white-space: nowrap; } .cell-cls .chip { margin-inline-end: 3px; }
.vis-box { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; background: var(--surface-2); }
.vis-sks summary { cursor: pointer; font-weight: 600; } .vis-sks input[type=search] { margin: 8px 0; width: 100%; }
.vis-list { max-height: 260px; overflow: auto; display: grid; gap: 8px; } .vis-grp b { display: block; font-size: 12.5px; color: var(--mut); margin-bottom: 4px; }
.vis-sk { display: inline-flex; align-items: center; gap: 5px; margin: 2px 10px 2px 0; font-size: 13px; cursor: pointer; }

/* ---------- Assistant: structured answers (assistant.js ↔ src/ai/blocks.js) ---------- */
.bk-wrap { display: grid; gap: 10px; margin-top: 8px; }
.bk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.bk-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; display: grid; gap: 2px; }
.bk-kpi b { font-size: 19px; line-height: 1.15; } .bk-kpi small { color: var(--mut); font-size: 11.5px; }
.bk-kpi.bad b { color: var(--err); } .bk-kpi.warn b { color: var(--warn); } .bk-kpi.ok b { color: var(--ok); }
.bk-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.bk-th { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.bk-th .xbtn { display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 7px; } .bk-th .xbtn small { font-size: 11px; }
.bk-table .tblwrap { max-height: 340px; overflow: auto; border: 0; border-radius: 0; }
.bk-table .tbl { font-size: 12.5px; } .bk-table .tbl th { position: sticky; top: 0; z-index: 1; cursor: pointer; white-space: nowrap; } .bk-table .tbl th.on { color: var(--brand-3); }
.bk-table td { vertical-align: top; } .bk-table td.ltr-cell, .bk-card dd.ltr-cell { direction: ltr; unicode-bidi: plaintext; text-align: start; white-space: nowrap; }
.bk-name .lnk { font-weight: 600; text-align: start; } .bk-name small { display: block; color: var(--mut); font-size: 11px; }
.bk-table tr.late td { color: var(--err); } .bk-table tr.navrow { cursor: pointer; } .bk-table tr.navrow:hover td { background: var(--surface-2); }
.bk-bar { position: relative; min-width: 120px; } .bk-bar i { position: absolute; inset-block: 6px; inset-inline-start: 6px; background: var(--brand-soft); border-radius: 4px; max-width: calc(100% - 12px); } .bk-bar span { position: relative; padding-inline-start: 6px; font-weight: 600; }
.bk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.bk-ch { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .bk-ch b { font-size: 15px; } .bk-ch small { display: block; color: var(--mut); }
.bk-card .kvs { margin: 0; }
.bk-file { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 12px; color: var(--ink); }
.bk-file:hover { border-color: var(--brand); } .bk-fi { flex: 1; min-width: 0; display: grid; } .bk-fi small { color: var(--mut); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-fmt { flex: none; font-size: 11px; font-weight: 700; padding: 6px 7px; border-radius: 6px; color: #fff; background: #1f7a45; } .bk-fmt.pdf { background: #c0392b; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-fast { font-size: 11px; color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 1px 8px; margin-inline-end: 6px; }
.ap-steps { display: inline-flex; flex-wrap: wrap; gap: 4px; } .ap-steps .step { font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; } .ap-steps .step.ok { color: var(--ok); } .ap-steps .step.bad { color: var(--err); } .ap-steps small { color: var(--mut); }
.msg-tools { display: flex; align-items: center; gap: 4px; }
.mem-list { display: grid; gap: 6px; margin-bottom: 12px; max-height: 360px; overflow: auto; }
.mem-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 7px 10px; background: var(--surface); }
.mem-row span { flex: 1; } .mem-add input[type=text], .mem-add #mem-text { flex: 1; min-width: 180px; }
.bk-table tr.gone td { text-decoration: line-through; color: var(--mut); }
.chat-list .btn + .btn { margin-top: 6px; }

/* ---------- Settings → Subscribers & subscriptions (subs.js) ---------- */
.subs-tabs { margin-bottom: 14px; }
.subs-kpis .kpi { text-align: start; cursor: pointer; font: inherit; color: inherit; } .subs-kpis .kpi:hover { border-color: var(--brand); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.plan-card.hot { border: 2px solid var(--brand); } .plan-card.off { opacity: .75; border-style: dashed; }
.pc-h { display: flex; align-items: flex-start; gap: 6px; } .pc-h > div:first-child { flex: 1; } .pc-h b { font-size: 16px; }
.pc-move { display: flex; gap: 2px; } .pc-price b { font-size: 18px; color: var(--brand-3); } .pc-price small { color: var(--mut); }
.pc-lim, .pc-feat, .plan-caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.pc-lim li b { color: var(--ink); } .pc-feat li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.plan-caps { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 8px; } .plan-caps li.ok { color: var(--ok); } .plan-caps li.no { color: var(--mut); text-decoration: line-through; }
.pc-f { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
td.nowrap { white-space: nowrap; }

/* ---------- Invest in Iraq ---------- */
.btn.gold-o { border: 1px solid var(--line-2); color: var(--ink); background: var(--surface); display: inline-flex; justify-content: center; gap: 8px; align-items: center; width: 100%; } .btn.gold-o:hover { border-color: var(--brand); background: var(--brand-soft); }
.auth-alt { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 2px; }
.auth-card.wide { width: min(720px, 100%); } .auth-card.wide .frm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-brand img { width: 64px !important; height: 64px !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.segt { display: inline-flex; flex-wrap: wrap; gap: 6px; } .segt button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 14px; color: var(--ink-2); font-weight: 600; }
.segt button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); } .segt .cnt { opacity: .7; margin-inline-start: 4px; }
.icards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.icard { text-align: start; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 100%; }
.icard:hover { border-color: var(--council); box-shadow: 0 14px 34px rgba(135,114,87,.14); transform: translateY(-1px); }
.icard h3 { font-size: 16px; line-height: 1.45; color: var(--ink); } .icard p { color: var(--mut); font-size: 13.5px; margin: 0; flex: 1; }
.ic-top { display: flex; align-items: center; gap: 10px; } .ic-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.ic-sec { font-size: 12.5px; font-weight: 700; color: var(--gold); flex: 1; } .ic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ic-chips .chip .ic { width: 13px; height: 13px; }
.chip.gold { background: var(--brand-soft); color: var(--brand-2); } .chip.soft { background: var(--surface-2); color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; }
.opp-detail h4 { margin: 18px 0 6px; font-size: 15px; color: var(--ink); } .opp-detail .prose { white-space: pre-line; color: var(--ink-2); line-height: 1.75; }
.opp-detail .kvs .kv dt .ic { width: 15px; height: 15px; margin-inline-end: 6px; vertical-align: -2px; color: var(--gold); }
.lnk-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; word-break: break-all; }
.interest { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--line); } .interest textarea { width: 100%; margin-top: 8px; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.ihero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 20px; margin-bottom: 16px; color: #fff; background: linear-gradient(135deg, rgba(17,24,39,.92), rgba(31,41,55,.86)), #111827 url(/hero.jpg) center/cover; }
.ihero h2 { font-size: 24px; color: #fff; margin-bottom: 6px; } .ihero p { color: #D1D5DB; margin: 0; } .ihero img { width: 96px; height: 96px; flex: none; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); }
.ih-hint { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(171,153,127,.18); border: 1px solid rgba(171,153,127,.45); color: #F3E6D2; font-size: 13.5px; }
.ih-hint .btn { background: #fff; color: #66533A; border-color: #fff; }
.qas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } .qa { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 700; }
.qa .ic { width: 26px; height: 26px; color: var(--gold); } .qa:hover { border-color: var(--council); background: var(--gold-soft); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; } .grid2 > .card { margin: 0; }
.rlist { display: grid; } .rrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); } .rrow:last-child { border: 0; } .rrow small { display: block; color: var(--mut); }
.council-mini { text-align: center; } .council-mini img { width: 140px; margin: 0 auto 10px; display: block; } .council-mini p { color: var(--mut); } .council-mini .btn-row { justify-content: center; }
.news-row { display: block; padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--ink); font-weight: 600; } .news-row small { display: block; color: var(--mut); font-weight: 400; } h4.mt { margin-top: 14px; }
.center { text-align: center; margin: 18px 0; }
@media (max-width: 860px) { .qas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid2 { grid-template-columns: 1fr; } .auth-card.wide .frm { grid-template-columns: 1fr; } .ihero img { display: none; } }

/* ---------- the investment advisor ---------- */
.adv { display: flex; flex-direction: column; height: calc(100vh - var(--top-h) - 40px); max-width: 980px; margin: 0 auto; }
.adv-msgs { flex: 1; overflow-y: auto; padding: 6px 4px 18px; display: flex; flex-direction: column; gap: 12px; }
.adv-q { align-self: flex-end; max-width: 80%; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 18px 18px 4px 18px; font-weight: 600; }
[dir=rtl] .adv-q { align-self: flex-start; border-radius: 18px 18px 18px 4px; }
.adv-a { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; line-height: 1.75; }
.adv-a.none { border-style: dashed; }
.adv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.adv-lead { font-size: 15.5px; color: var(--ink); margin-bottom: 8px; }
.adv-pts { margin: 0 0 8px; padding-inline-start: 20px; } .adv-pts li { margin: 4px 0; } .adv-pts li.warn { color: var(--warn); } .adv-pts li.upd { color: var(--ok); }
.adv-a h4 { margin: 14px 0 6px; font-size: 14px; color: var(--gold); }
.adv-steps { padding-inline-start: 20px; margin: 0; } .adv-steps li { margin-bottom: 8px; } .adv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.adv-docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; } .adv-docs li { display: flex; gap: 8px; align-items: flex-start; } .adv-docs .ic { color: var(--gold); flex: none; margin-top: 3px; width: 15px; height: 15px; }
.adv-law { margin: 8px 0; padding: 12px 14px; border-inline-start: 3px solid var(--council); background: var(--gold-soft); border-radius: 10px; }
.adv-law-h { margin-bottom: 6px; }
.adv-law-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin: 8px 0; } .adv-law-card > .ic { color: var(--gold); flex: none; margin-top: 3px; }
.adv-secs, .adv-src, .adv-near { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.adv-secs .chip, .adv-src .chip, .adv-near .chip { text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.adv-disc { font-size: 12px; color: var(--mut); margin: 12px 0 0; border-top: 1px dashed var(--line); padding-top: 8px; }
.adv-draft { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.adv-draft-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; } .adv-draft-h .ic { color: var(--gold); }
.adv-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.adv-form textarea { flex: 1; border: 0; resize: none; background: transparent; font-size: 15px; padding: 8px; max-height: 140px; outline: none; }
.adv-foot { text-align: center; margin: 6px 0 0; }
.adv-empty { text-align: center; margin: auto; max-width: 640px; padding: 20px; } .adv-empty img { margin: 0 auto 10px; display: block; } .adv-empty h3 { font-size: 20px; margin-bottom: 6px; }
.adv-sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; } .adv-sugg .chip { cursor: pointer; padding: 8px 14px; font-size: 13.5px; } .adv-sugg .chip:hover { background: var(--gold-soft); color: var(--gold); }
@media (max-width: 860px) { .adv { height: calc(100vh - var(--top-h) - var(--mnav-h) - 24px); } .adv-q { max-width: 92%; } }

/* ---------- responsive pass: phones, foldables, tablets, desktops ---------- */
/* dynamic viewport units: the visible height on phones (address bar and keyboard excluded) */
/* the advisor fills the visible screen; the conversation scrolls, the question box stays in view */
.adv { height: calc(100vh - var(--top-h) - 40px); height: calc(100dvh - var(--top-h) - 40px); min-height: 360px; max-width: 1040px; }
.adv-msgs { overscroll-behavior: contain; scroll-padding-bottom: 12px; padding-inline: 2px; }
.adv-a { min-width: 0; overflow-wrap: anywhere; }
.adv-a .tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.adv-a .tbl { min-width: 360px; }
.adv-lead { font-size: 16px; line-height: 1.8; }
.adv-meta .chip { font-size: 12px; }
/* section and source chips wrap instead of running off the card */
.adv-secs, .adv-src, .adv-near { align-items: flex-start; }
.adv-secs .chip, .adv-src .chip, .adv-near .chip { white-space: normal; max-width: 100%; text-align: start; line-height: 1.4; padding: 6px 12px; height: auto; min-height: 32px; }
.adv-secs .chip .ic, .adv-src .chip .ic { flex: none; }
/* the question box: text and send button on one row, the text grows up to five lines */
.adv-form { flex-wrap: nowrap; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 10px; }
.adv-form textarea { min-width: 0; min-height: 44px; line-height: 1.5; padding: 10px 8px; overflow-y: auto; }
.adv-form .btn { flex: none; width: 46px; height: 46px; min-height: 46px; padding: 0; display: inline-grid; place-items: center; border-radius: 14px; }
.adv-foot { font-size: 12px; }
/* the disclaimer and long legal texts fold away */
.adv-disc { font-size: 12px; color: var(--mut); margin: 12px 0 0; border-top: 1px dashed var(--line); padding-top: 8px; }
.adv-disc summary { cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.adv-disc summary::-webkit-details-marker { display: none; }
.adv-disc[open] summary { margin-bottom: 6px; }
.adv-law-more summary { cursor: pointer; color: var(--gold); font-size: 13px; font-weight: 600; margin-top: 6px; list-style: none; }
.adv-law-more summary::-webkit-details-marker { display: none; }
/* web results */
.adv-web { margin-top: 12px; display: grid; gap: 10px; }
.adv-web-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adv-web-v { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.adv-web-v.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); } .adv-web-v.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); } .adv-web-v.bad { border-color: color-mix(in srgb, var(--bad, #b42318) 45%, var(--line)); }
.adv-web-r { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; min-width: 0; }
.adv-web-r a { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.adv-web-r .host { font-size: 12px; color: var(--mut); direction: ltr; text-align: start; }
.adv-web-r p { margin: 0; font-size: 13.5px; color: var(--ink2, var(--ink)); }
.adv-web-r .why { font-size: 12px; color: var(--mut); }
.adv-web .adv-web-r { align-content: start; line-height: 1.6; }
.adv-web .adv-web-r > * { margin: 0; }
.adv-rate { display: inline-flex; gap: 6px; margin-inline-start: auto; }
.adv-rate button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; }
.adv-rate button.on { background: var(--gold-soft); border-color: var(--gold); }

/* the off-canvas menu is hidden, not only moved, when closed (no sideways scroll, no stray focus) */
@media (max-width: 860px) {
  .adv { height: calc(100vh - var(--top-h) - var(--mnav-h) - 24px); height: calc(100dvh - var(--top-h) - var(--mnav-h) - env(safe-area-inset-bottom) - 20px); min-height: 300px; }
  .adv-q { max-width: 90%; padding: 9px 14px; }
  .adv-a { padding: 14px; border-radius: 16px; }
  .adv-foot { display: none; }
  .adv-empty { padding: 12px 6px; } .adv-empty img { width: 56px; height: 56px; } .adv-empty h3 { font-size: 18px; } .adv-empty p { font-size: 13.5px; }
  .adv-sugg { gap: 6px; } .adv-sugg .chip { font-size: 13px; padding: 8px 12px; }
  .adv-law { padding: 10px 12px; }
  .mnav a { min-width: 0; padding: 4px 2px; }
  .mnav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
}
/* touch screens: tap targets of 40px and more */
@media (pointer: coarse) {
  .btn.sm { min-height: 40px; padding-block: 0; }
  .xbtn { min-width: 40px; min-height: 40px; }
  .chip[data-act], .adv-sugg .chip { min-height: 38px; }
  .lnk { padding-block: 8px; display: inline-block; }
}
/* very narrow screens: folded phones and small phones */
@media (max-width: 360px) {
  .tb-new { padding: 0 10px; min-width: 40px; height: 40px; }
  .view { padding-inline: 10px; }
  .adv-a { padding: 12px; }
  .adv-form { padding: 6px; }
  .mnav a span { font-size: 10px; }
  .mnav .ic { width: 20px; height: 20px; }
}
/* short landscape screens (unfolded foldables, phones turned sideways): the conversation keeps its space */
@media (max-height: 560px) and (orientation: landscape) {
  .adv-empty img { display: none; }
  .adv-empty p { display: none; }
  .adv { min-height: 240px; }
}
/* large screens: the conversation stays readable */
@media (min-width: 1600px) {
  .adv { max-width: 1120px; }
  .adv-a, .adv-q { font-size: 15.5px; }
}

.adv-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.adv-acts .adv-rate { margin-inline-start: auto; }
.adv-web-v .ic { vertical-align: -3px; }

/* card grids never force a card wider than the screen (folded phones) */
.icards { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.icard { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 360px) { .icard { padding: 14px; } }

/* the conversation on phones and tablets: fixed between the top bar and the bottom bar, sized by advisor.js from the
   visible screen (browser bars, keyboard), so the message box is always on screen and the page itself never scrolls */
@media (max-width: 860px) {
  .view:has(> .adv) { padding: 0; min-height: 0; }
  .adv { position: fixed; z-index: 10; inset-inline: 0; top: var(--adv-t, var(--top-h)); bottom: var(--adv-b, var(--mnav-h)); height: auto; min-height: 0; max-width: none; margin: 0; padding: 8px 12px 10px; background: var(--bg); }
  .adv-msgs { min-height: 0; padding: 4px 2px 12px; }
  .adv-form { flex: none; box-shadow: 0 -4px 18px rgba(0, 0, 0, .06); }
  /* typing: the bottom bar steps aside and the box sits on the keyboard */
  body.adv-typing .mnav { display: none; }
  body.adv-typing .adv { bottom: var(--adv-b, 0px); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  /* the privacy note never covers the message box */
  body:has(.adv) .cookie-note { bottom: auto; top: calc(var(--adv-t, var(--top-h)) + 8px); inset-inline: 12px; }
}
@media (max-width: 860px) and (max-height: 560px) and (orientation: landscape) {
  .adv { padding-block: 4px 6px; }
  .adv-form textarea { min-height: 40px; padding-block: 8px; }
  .adv-form .btn { width: 42px; height: 42px; min-height: 42px; }
}
@media (min-width: 861px) {
  .view:has(> .adv) { padding-bottom: 16px; }
  .adv { height: var(--adv-h, calc(100dvh - var(--top-h) - 54px)); }
  body:has(.adv) .cookie-note { bottom: auto; top: calc(var(--top-h) + 14px); }
}
/* suggestions: a quiet border on every browser, long ones wrap instead of leaving the screen */
.adv-sugg .chip { border: 1px solid var(--line); font: inherit; font-size: 13.5px; font-weight: 600; white-space: normal; max-width: 100%; height: auto; line-height: 1.45; text-align: center; }
/* the box's hint stays on one line */
.adv-form textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the personal set-up path ---------- */
.pth { max-width: 980px; margin: 0 auto; display: grid; gap: 16px; }
.pth-hero { margin: 0; }
.pth-fw { padding: 18px; }
.pth-fw.folded { display: none; }
.pth-form { display: grid; gap: 18px; }
.pth-q { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.pth-q h4 { margin: 4px 0 8px; font-size: 15px; }
.pth-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.pth-q .inp { width: 100%; max-width: 420px; }
.pth-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pth-seg label { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); font-weight: 600; font-size: 14px; }
.pth-seg label.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.pth-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pth-seg label:focus-within { box-shadow: 0 0 0 3px var(--brand-ring); }
.pth-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.pth-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.pth-opt input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.pth-opt span { display: grid; gap: 2px; } .pth-opt small { color: var(--mut); font-size: 12px; line-height: 1.5; }
.pth-opt.dis { opacity: .5; cursor: not-allowed; }
.pth-go { display: flex; justify-content: flex-end; }
.pth-sum { padding: 16px 18px; display: grid; gap: 8px; }
.pth-sum-k { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 10px; }
.pth-sum-k > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.pth-sum-k small { color: var(--mut); font-size: 12px; } .pth-sum-k b { font-size: 16px; overflow-wrap: anywhere; }
.pth-prog { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; } .pth-prog span { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width .3s; }
.pth-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); font-size: 14px; } .pth-warn .ic { color: var(--warn); flex: none; margin-top: 2px; }
.pth-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pth-st { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 14px; }
.pth-st::before { content: ""; position: absolute; inset-inline-start: 18px; top: 38px; bottom: 0; width: 2px; background: var(--line); }
.pth-st:last-child::before { display: none; }
.pth-num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; position: relative; z-index: 1; }
.pth-st.done .pth-num { background: var(--ok); } .pth-num .ic { width: 18px; height: 18px; }
.pth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 0; overflow-wrap: anywhere; }
.pth-st.done .pth-card { opacity: .78; }
.pth-h { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.pth-h h4 { margin: 0; font-size: 15.5px; line-height: 1.5; }
.pth-done { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--mut); white-space: nowrap; cursor: pointer; min-height: 32px; } .pth-done input { width: 18px; height: 18px; accent-color: var(--ok); }
.pth-kv { display: grid; gap: 6px; margin: 10px 0 0; }
.pth-kv > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.65; }
.pth-kv dt { color: var(--mut); display: inline-flex; gap: 6px; align-items: flex-start; } .pth-kv dt .ic { width: 15px; height: 15px; margin-top: 4px; flex: none; color: var(--gold); }
.pth-kv dd { margin: 0; }
.pth-fees, .pth-lic, .pth-items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.pth-fees li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); } .pth-fees b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pth-lic li { padding: 8px 10px; border-radius: 10px; background: var(--gold-soft); display: grid; gap: 2px; } .pth-lic small { color: var(--mut); }
.pth-items li { padding-inline-start: 14px; position: relative; } .pth-items li::before { content: "•"; position: absolute; inset-inline-start: 0; color: var(--gold); }
.pth-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); } .pth-note .ic { flex: none; margin-top: 3px; width: 15px; height: 15px; color: var(--gold); }
.pth-more { margin-top: 10px; } .pth-more summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--gold); min-height: 32px; list-style: none; } .pth-more summary::-webkit-details-marker { display: none; }
.pth-more .adv-docs, .pth-more .adv-steps { margin-top: 6px; font-size: 13.5px; }
.pth-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; } .pth-refs .chip { text-decoration: none; white-space: normal; height: auto; line-height: 1.4; padding: 5px 10px; max-width: 100%; }
.pth-disc { text-align: center; }
@media (max-width: 560px) {
  .pth-q { grid-template-columns: minmax(0, 1fr); } .pth-n { display: none; }
  .pth-st { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; } .pth-num { width: 30px; height: 30px; font-size: 13px; } .pth-st::before { inset-inline-start: 14px; top: 30px; }
  .pth-card { padding: 12px; } .pth-kv > div { grid-template-columns: minmax(0, 1fr); gap: 0; } .pth-kv dt { font-size: 12.5px; }
  .pth-h { flex-wrap: wrap; } .pth-go .btn { width: 100%; justify-content: center; }
  .pth-sum .btn-row .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

/* saved questions and law-change alerts */
.adv-savedb { position: relative; }
.adv-badge { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad, #b42318); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.adv-badge[hidden] { display: none; }
.adv-acts .btn.on { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.adv-alerts { display: grid; gap: 8px; margin-bottom: 14px; }
.adv-alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.adv-alert.new { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.adv-alert > .ic { flex: none; color: var(--warn); margin-top: 3px; } .adv-alert > div { display: grid; gap: 4px; min-width: 0; } .adv-alert small { color: var(--mut); }
.adv-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.adv-saved li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.adv-saved li > div:first-child { display: grid; gap: 2px; min-width: 0; } .adv-saved small { color: var(--mut); }
.adv-saved .btn-row { flex: none; gap: 4px; }
.inv-alert { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px; text-decoration: none; color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.inv-alert > .ic { color: var(--warn); flex: none; } .inv-alert span { display: grid; gap: 2px; } .inv-alert small { color: var(--mut); }

/* ---------- the assistant's chat box and button, moved by drag and drop ---------- */
.assist-panel .ap-head { position: relative; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.assist-panel .ap-head .xbtn, .assist-panel .ap-head button { cursor: pointer; }
.ap-grip { position: absolute; top: 4px; inset-inline-start: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 999px; background: var(--line-2, var(--line)); }
[dir="rtl"] .ap-grip { transform: translateX(50%); }
.ap-dock { display: none; }
.assist-panel.floating { inset: auto; border: 1px solid var(--line-2, var(--line)); border-radius: 18px; overflow: hidden; animation: none; resize: both; min-width: 280px; min-height: 300px; max-width: calc(100vw - 8px); max-height: calc(100dvh - 8px); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.assist-panel.floating .ap-dock { display: inline-grid; }
.assist-panel.floating .ap-head { padding-top: 14px; }
.assist-panel.dragging { opacity: .97; user-select: none; } .assist-panel.dragging .ap-head { cursor: grabbing; }
.assist-panel.dragging .ap-body { pointer-events: none; }
.assist-fab { touch-action: none; user-select: none; -webkit-user-select: none; }
.assist-fab.moved { inset: auto; }
.assist-fab.dragging { cursor: grabbing; transform: scale(1.06); box-shadow: 0 14px 34px rgba(0, 0, 0, .28); transition: transform .12s; }
/* touch screens: no corner resize (the window takes the screen's width), a larger grip to aim at */
@media (pointer: coarse) {
  .assist-panel.floating { resize: none; }
  .ap-grip { width: 44px; height: 5px; top: 5px; }
}
@media (max-width: 860px) {
  .assist-fab.moved { inset: auto; }
}

/* two-step verification set-up: the QR code, the key, the code */
.tf-setup { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.tf-qr { padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; line-height: 0; }
.tf-qr svg { width: 196px; height: 196px; display: block; }
.tf-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 14px; }
.tf-steps li { display: grid; gap: 4px; } .tf-steps li::marker { font-weight: 700; color: var(--gold); }
.tf-key { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.tf-key code { font-size: 15px; letter-spacing: .06em; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.tf-open { display: none; justify-self: start; margin-top: 4px; }
@media (pointer: coarse) { .tf-open { display: inline-flex; } }
.tf-confirm { margin-top: 6px; } .tf-confirm .code { width: 9.5em; font-size: 18px; letter-spacing: .25em; text-align: center; }
@media (max-width: 600px) { .tf-setup { grid-template-columns: minmax(0, 1fr); } .tf-qr { justify-self: center; } }

/* the set-up never wider than the card (phones), the assistant title on one line */
.tf-steps, .tf-steps li { min-width: 0; } .tf-steps li { grid-template-columns: minmax(0, 1fr); }
.tf-key code { display: block; max-width: 100%; white-space: normal; }
.tf-confirm { flex-wrap: wrap; } .tf-confirm .code { flex: 1 1 9em; min-width: 0; max-width: 14em; }
.ap-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .assist-panel .ap-btns .xbtn { min-width: 36px; min-height: 36px; } .assist-panel .ap-head { gap: 6px; padding-inline: 10px; } }

/* ---------- the smart advisor's answer ---------- */
.adv-ai { background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 18px; padding: 16px 18px; line-height: 1.8; min-width: 0; overflow-wrap: anywhere; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.adv-ai-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; } .adv-ai-h > .ic { color: var(--gold); } .adv-ai-h b { font-size: 15px; }
.adv-ai-b p { margin: 0 0 8px; } .adv-ai-b h4 { margin: 14px 0 6px; font-size: 14.5px; color: var(--gold); } .adv-ai-b .adv-pts, .adv-ai-b .adv-steps { margin: 4px 0 10px; }
.adv-ai-b li { margin: 3px 0; } .adv-ai-q { margin: 8px 0; padding: 8px 12px; border-inline-start: 3px solid var(--council); background: var(--gold-soft); border-radius: 8px; }
.adv-cite { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 6px; margin: 0 2px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); text-decoration: none; vertical-align: 2px; }
.adv-cite.web { background: var(--surface-3); color: var(--ink-2); }
.adv-caret { display: inline-block; width: 8px; height: 16px; margin-inline-start: 2px; background: var(--gold); vertical-align: -3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.adv-ai-wait { display: flex; gap: 8px; align-items: center; }
.adv-unv { margin-top: 10px; font-size: 13px; } .adv-ai-disc { margin: 10px 0 0; }
.adv-ref { margin-top: 8px; } .adv-ref > summary { cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--gold); padding: 6px 2px; min-height: 36px; }
.adv-ref > summary::-webkit-details-marker { display: none; } .adv-ref[open] > summary { margin-bottom: 6px; }
.adv-acts-only { padding: 8px 14px; border-style: dashed; } .adv-acts-only .adv-acts { margin-top: 0; }
.adv-flowb { margin: 6px 0 2px; }

/* ---------- workflow diagrams ---------- */
.wf { margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.wf-h { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; } .wf-h > .ic { color: var(--gold); } .wf-h b { flex: 1; min-width: 0; font-size: 14.5px; } .wf-h .btn { flex: none; }
.wf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; justify-items: center; }
.wf-n { position: relative; width: min(100%, 560px); padding-bottom: 26px; display: grid; justify-items: center; }
.wf-n.last { padding-bottom: 0; }
.wf-n:not(.last)::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 2px; height: 18px; background: var(--council); transform: translateX(-50%); }
.wf-n:not(.last)::before { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--council); border-bottom: 0; }
.wf-box { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .3s; }
.wf-n.flash .wf-box { box-shadow: 0 0 0 3px var(--brand-ring); }
.wf-start .wf-box, .wf-end .wf-box { width: auto; min-width: 160px; border-radius: 999px; padding: 8px 18px; display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--navy); color: #fff; border-color: var(--navy); }
.wf-end .wf-box { background: var(--ok); border-color: var(--ok); } .wf-cap .ic { width: 16px; height: 16px; }
.wf-decision .wf-box { border: 2px dashed var(--gold); background: var(--gold-soft); }
.wf-top { display: flex; gap: 8px; align-items: flex-start; } .wf-top b { flex: 1; min-width: 0; line-height: 1.5; }
.wf-no { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.wf-decision .wf-no { background: var(--gold); border-radius: 6px; transform: rotate(45deg); } .wf-decision .wf-no { font-size: 13px; }
.wf-cite { flex: none; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.wf-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.wf-m { display: inline-flex; gap: 5px; align-items: flex-start; min-width: 0; } .wf-m .ic { width: 14px; height: 14px; margin-top: 4px; color: var(--gold); flex: none; }
.wf-m small { color: var(--mut); margin-inline-end: 4px; }
.wf-docs summary { cursor: pointer; font-size: 12.5px; color: var(--gold); font-weight: 600; list-style: none; display: inline-flex; gap: 5px; align-items: center; } .wf-docs summary::-webkit-details-marker { display: none; }
.wf-docs ul { margin: 4px 0 0; padding-inline-start: 18px; font-size: 13px; }
.wf-br { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-jump { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; min-height: 32px; }
.wf-jump.yes { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); } .wf-jump.yes b { color: var(--ok); }
.wf-jump.no { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); } .wf-jump.no b { color: var(--warn); }
.wf-goto { margin-top: 6px; }
@media (max-width: 560px) { .wf { padding: 10px; } .wf-box { padding: 9px 10px; } .wf-meta { flex-direction: column; gap: 4px; } }

.wf-end.last:not(:last-child) { padding-bottom: 22px; } /* a mid-way end (the outcome of a "no"): room before the next box, no arrow */

/* ---------- the goal planner (views/path.js) ---------- */
.goal { padding: 26px 26px 6px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.goal::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 7px; background: var(--merlon) repeat-x; opacity: .55; }
.goal-h h2 { font-size: clamp(20px, 2.6vw, 26px); color: var(--ink); }
.goal-h p { color: var(--mut); max-width: 62ch; margin-top: 6px; }
.goal-f { margin-top: 16px; display: flex; gap: 10px; align-items: stretch; padding: 8px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.goal-f:focus-within { border-color: var(--council); box-shadow: 0 0 0 4px var(--brand-ring); }
.goal-f textarea { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; padding: 10px 12px; font-size: 16px; line-height: 1.6; outline: none; }
.goal-f .btn { align-self: flex-end; min-height: 46px; padding-inline: 18px; border-radius: 13px; }
.goal-ex { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 2px 0; } .goal-ex > span { color: var(--mut); font-size: 13px; margin-inline-end: 2px; }
.goal-ex .chip { cursor: pointer; border: 1px solid var(--line); } .goal-ex .chip:hover { border-color: var(--council); color: var(--ink); }
#goal-res:not(:empty) { margin-top: 18px; }
.goal-u { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--line); }
.goal-u > b { font-size: 13px; color: var(--gold); }
.goal-u > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.goal-tag { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 600; font-size: 13.5px; }
.goal-tag.as { border-style: dashed; font-weight: 500; color: var(--ink-2); } .goal-tag small { font-size: 11px; color: var(--mut); font-weight: 500; }
.goal-none { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); } .goal-none span { flex: 1; min-width: 200px; }
.goal-more { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 4px 0 6px; font-weight: 600; }
.goal-or { display: flex; align-items: center; gap: 12px; margin: 22px -26px 0; padding: 0 26px 14px; color: var(--mut); font-size: 13px; }
.goal-or::before, .goal-or::after { content: ""; flex: 1; height: 7px; background: var(--merlon) repeat-x; opacity: .35; }
.wf-link { justify-self: start; display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--gold); } .wf-link .ic { width: 14px; height: 14px; }
.set-head h2, .tb-title h1 { font-family: var(--font-d); }
@media (max-width: 760px) {
  .goal { padding: 18px 16px 4px; border-radius: 18px; } .goal-or { margin-inline: -16px; padding-inline: 16px; }
  .goal-f { flex-direction: column; } .goal-f .btn { align-self: stretch; justify-content: center; }
}

/* ---------- the investor's home: the compass (one box for a question or a goal) ---------- */
.compass { position: relative; overflow: hidden; padding: 30px 30px 22px; border-radius: 24px; margin-bottom: 14px; background:
  radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--council) 16%, transparent), transparent 55%), var(--surface); border: 1px solid var(--line); }
.compass::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 7px; background: var(--merlon) repeat-x; opacity: .6; }
.cp-hi { color: var(--gold); font-weight: 600; margin: 0 0 4px; }
.compass h2 { font-size: clamp(24px, 3.4vw, 34px); color: var(--ink); }
.cp-sub { color: var(--mut); max-width: 60ch; margin: 8px 0 0; }
.cp-f { margin-top: 18px; padding: 8px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); display: flex; gap: 8px; align-items: stretch; transition: border-color .2s, box-shadow .2s; }
.cp-f:focus-within { border-color: var(--council); box-shadow: 0 0 0 4px var(--brand-ring); }
.cp-f textarea { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; padding: 10px 12px; font-size: 16.5px; line-height: 1.6; outline: none; }
.cp-go { display: flex; gap: 6px; align-items: flex-end; } .cp-go .btn { min-height: 46px; border-radius: 13px; padding-inline: 16px; white-space: nowrap; }
.compass .goal-ex { margin-top: 12px; } .compass .goal-ex a { border: 1px solid var(--line); } .compass .goal-ex a:hover { border-color: var(--council); text-decoration: none; color: var(--ink); }
.compass .ih-hint { margin-top: 14px; background: var(--surface-2); color: var(--ink-2); border: 1px dashed var(--line-2); }
.istats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.istats a { flex: 1 1 140px; display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; transition: border-color .15s; }
.istats a:hover { border-color: var(--council); text-decoration: none; } .istats b { font-size: 22px; color: var(--ink); font-weight: 700; }
@media (max-width: 760px) {
  .compass { padding: 22px 16px 16px; border-radius: 18px; }
  .cp-f { flex-direction: column; } .cp-go { justify-content: stretch; } .cp-go .btn { flex: 1; justify-content: center; }
  .istats a { flex-basis: calc(50% - 4px); padding: 10px 12px; } .istats b { font-size: 19px; }
}
/* the advisor's empty state: six questions, the rest on demand, and the way to the goal planner */
.adv-sugg .chip.more { display: none; } .adv-sugg.all .chip.more { display: inline-flex; }
.adv-sugg .chip.ghost { background: none; border: 1px dashed var(--line-2); color: var(--mut); cursor: pointer; }
.adv-goal { display: flex; gap: 12px; align-items: center; margin: 18px auto 0; max-width: 520px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: start; color: var(--ink); }
.adv-goal:hover { border-color: var(--council); text-decoration: none; } .adv-goal > .ic { width: 22px; height: 22px; color: var(--gold); flex: none; }
.adv-goal span { display: grid; gap: 2px; } .adv-goal small { color: var(--mut); }

/* ---------- Rafid: the conversations beside the chat, the head, answers that age, memory (views/advisor.js) ---------- */
.adv-wrap.has-side { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: start; max-width: 1340px; margin: 0 auto; }
.adv-wrap.has-side .adv { max-width: none; margin: 0; }
.adv-side { position: sticky; top: calc(var(--top-h) + 14px); display: flex; flex-direction: column; gap: 10px; max-height: calc(100dvh - var(--top-h) - 100px); padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.adv-sh { display: flex; gap: 6px; } .adv-sh .btn { flex: 1; justify-content: center; } .adv-side-x { display: none; }
.adv-side .searchwrap { width: 100%; }
.adv-chats { flex: 1; min-height: 80px; overflow-y: auto; display: grid; align-content: start; gap: 2px; margin-inline: -4px; padding-inline: 4px; }
.adv-ci { position: relative; display: grid; gap: 1px; padding: 9px 10px; border-radius: 11px; cursor: pointer; color: var(--ink-2); }
.adv-ci:hover, .adv-ci:focus-visible { background: var(--surface-2); outline: none; } .adv-ci.on { background: var(--brand-soft); color: var(--ink); }
.adv-ct { display: flex; gap: 5px; align-items: center; font-weight: 600; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-inline-end: 4px; }
.adv-ct .ic { width: 13px; height: 13px; color: var(--gold); flex: none; }
.adv-ci small { color: var(--mut); font-size: 11.5px; }
.adv-cx { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; background: inherit; border-radius: 8px; padding: 2px; }
.adv-ci:hover .adv-cx, .adv-ci:focus-within .adv-cx { display: flex; }
@media (hover: none) { .adv-cx { display: flex; position: static; transform: none; margin-top: 4px; background: none; } }
.adv-cx button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: var(--surface); color: var(--mut); cursor: pointer; } .adv-cx button:hover { color: var(--ink); }
.adv-cx button[data-act="adv-c-del"]:hover { color: var(--err); } .adv-cx .ic { width: 14px; height: 14px; }
.adv-cl-none { color: var(--mut); font-size: 13px; padding: 8px 4px; }
.adv-sf { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; } .adv-sf .btn { justify-content: flex-start; } .adv-sf .danger { color: var(--err); }
.adv-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 10px; min-width: 0; }
.adv-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-d); font-size: 15px; }
.adv-side-o { display: none; }
.adv-stale { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; padding: 9px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.adv-stale span { flex: 1; min-width: 200px; color: var(--ink-2); } .adv-stale > .ic { width: 16px; height: 16px; }
.adv-mine { margin: 18px auto 0; max-width: 640px; text-align: center; } .adv-mine > b { display: inline-flex; gap: 6px; align-items: center; color: var(--gold); font-size: 13px; margin-bottom: 8px; }
.adv-mine .adv-sugg { justify-content: center; } .adv-mine .chip { cursor: pointer; } .adv-mine a.chip { border: 1px solid var(--council); color: var(--ink); text-decoration: none; }
.mem-on { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.mem-on span { display: grid; gap: 2px; } .mem-on small { color: var(--mut); }
.mem .frm.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.mem-src { display: block; color: var(--gold); font-size: 11.5px; margin-top: 3px; }
.mem-chks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 12px 0; }
.mem-chk { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; } .mem-chk .mem-src { grid-column: 2; margin-top: 0; }
/* comparing two paths (views/path.js) */
.cmp { display: grid; gap: 12px; padding: 16px 18px; } .cmp-h { display: flex; align-items: center; justify-content: space-between; }
.cmp-t th small { display: block; font-weight: 500; color: var(--mut); font-size: 11.5px; } .cmp-t tbody th { text-align: start; color: var(--mut); font-weight: 500; }
.cmp-only { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .cmp-only ul { margin: 6px 0 0; padding-inline-start: 18px; }
@media (max-width: 1100px) { .adv-wrap.has-side { grid-template-columns: 230px minmax(0, 1fr); } }
@media (max-width: 860px) {
  .adv-wrap.has-side { display: block; }
  .adv-side { position: fixed; z-index: 40; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 330px); max-height: none; border-radius: 0; transform: translateX(110%); transition: transform .22s ease; box-shadow: var(--shadow-lg); padding-top: max(12px, env(safe-area-inset-top)); }
  [dir="ltr"] .adv-side { transform: translateX(-110%); }
  body.adv-side-open .adv-side { transform: none; } .adv-side-x { display: grid; }
  body.adv-side-open::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.35); }
  .adv-side-o { display: grid; } .adv-head .btn span { display: none; } .adv-cx { display: flex; position: static; transform: none; margin-top: 4px; background: none; }
  .mem .frm.two, .mem-chks, .cmp-only { grid-template-columns: minmax(0, 1fr); }
}
/* the staff dashboard's head and its strip of numbers (views/dashboard.js) */
.dash-c .cp-sub.warn { color: var(--warn); font-weight: 600; }
.dash-c .cp-f textarea { font-size: 15.5px; }
.dash-qa { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; } .dash-qa .btn { border-radius: 12px; }
.dash-s > * { flex: 1 1 150px; display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-align: start; font: inherit; }
.dash-s button { cursor: pointer; transition: border-color .15s; } .dash-s button:hover { border-color: var(--council); }
.dash-s b { font-size: 20px; color: var(--ink); font-weight: 700; } .dash-s .warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); } .dash-s .warn b { color: var(--warn); } .dash-s .ok b { color: var(--ok); }
@media (max-width: 760px) { .dash-s > * { flex-basis: calc(50% - 4px); padding: 10px 12px; } .dash-s b { font-size: 17px; } .dash-qa .btn { flex: 1 1 calc(50% - 4px); justify-content: center; } }

/* ---------- the investor's home (views/invest.js): a photograph of Baghdad, the journey, the figures, the provinces ---------- */
.ih-hero { position: relative; overflow: hidden; border-radius: 24px; margin-bottom: 16px; min-height: 360px; display: flex; align-items: flex-end; color: #fff; background: #1b1712; isolation: isolate; }
.ih-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 78%; z-index: -2; }
[dir="ltr"] .ih-ph { object-position: 70% 78%; transform: scaleX(-1); }
.ih-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgba(14,12,9,.9) 0%, rgba(14,12,9,.78) 45%, rgba(14,12,9,.2) 75%, rgba(14,12,9,.05) 100%), linear-gradient(to top, rgba(14,12,9,.55), rgba(14,12,9,0) 45%); }
[dir="ltr"] .ih-hero::before { background: linear-gradient(to right, rgba(14,12,9,.9) 0%, rgba(14,12,9,.78) 45%, rgba(14,12,9,.2) 75%, rgba(14,12,9,.05) 100%), linear-gradient(to top, rgba(14,12,9,.55), rgba(14,12,9,0) 45%); }
.ih-hero::after { content: ""; position: absolute; inset-inline: 0; top: 0; height: 7px; background: var(--merlon) repeat-x; opacity: .8; }
.ih-in { width: min(100%, 640px); padding: 34px 30px 26px; }
.ih-hero .cp-hi { color: #E3D3B4; }
.ih-hero h2 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.ih-hero .cp-sub { color: #E7E2D8; max-width: 62ch; }
.ih-hero .cp-f { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.ih-hero .cp-f:focus-within { border-color: #E3D3B4; box-shadow: 0 0 0 4px rgba(227,211,180,.25); }
.ih-hero .cp-f textarea { color: #fff; } .ih-hero .cp-f textarea::placeholder { color: rgba(255,255,255,.62); }
.ih-hero .cp-go .btn:not(.pri) { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.ih-hero .goal-ex a { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #F3EEE4; text-decoration: none; }
.ih-hero .goal-ex a:hover { background: rgba(255,255,255,.2); }
.ph-cr { position: absolute; inset-inline-end: 10px; bottom: 6px; font-size: 10.5px; color: rgba(255,255,255,.72); text-decoration: none; background: rgba(0,0,0,.35); padding: 1px 7px; border-radius: 6px; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; }
.ph-cr:hover { color: #fff; text-decoration: none; }
.ih-hero .ph-cr { bottom: 8px; }
/* the journey and the figures side by side */
.ih-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.ih-row > .card { margin: 0; }
.ij-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .ij-top span { font-size: 22px; font-weight: 700; color: var(--gold); }
.ij-next { margin: 16px 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border-inline-start: 3px solid var(--council); }
.ij-next small { color: var(--gold); font-weight: 600; } .ij-next > b { display: block; font-size: 16px; margin: 3px 0 8px; }
.ij-next dl { margin: 0; display: grid; gap: 5px; } .ij-next dl div { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); } .ij-next .ic { width: 15px; height: 15px; color: var(--gold); flex: none; margin-top: 3px; }
.ij-done { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; margin: 14px 0; }
.ih-journey .btn-row { align-items: center; } .ih-journey .ih-hint { margin-top: 14px; background: var(--surface-2); color: var(--ink-2); border: 1px dashed var(--line-2); }
.ih-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ih-facts a { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 6px; border-radius: 10px; color: var(--ink-2); text-decoration: none; border-bottom: 1px dashed var(--line); }
.ih-facts li:last-child a { border-bottom: 0; } .ih-facts a:hover { background: var(--surface-2); text-decoration: none; }
.ih-facts b { font-size: 20px; color: var(--ink); text-align: end; white-space: nowrap; } [dir="rtl"] .ih-facts b { text-align: start; }
.ih-src { display: flex; gap: 6px; align-items: center; margin-top: 10px; } .ih-src .ic { width: 14px; height: 14px; color: var(--ok); }
/* the provinces, photographed */
.ih-sec { margin-bottom: 16px; } .ih-sh { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px 10px; } .ih-sh h3 { font-family: var(--font-d); font-size: 18px; }
.ih-provs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ih-prov { position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 3 / 4; background: #1b1712; isolation: isolate; color: #fff; }
.ih-prov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.ih-prov:hover img { transform: scale(1.05); }
.ih-prov::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(10,9,7,.88) 0%, rgba(10,9,7,.25) 55%, rgba(10,9,7,0) 100%); }
.ih-pv { position: absolute; inset-inline: 0; bottom: 0; padding: 14px 14px 26px; display: grid; gap: 2px; }
.ih-pv b { font-family: var(--font-d); font-size: 19px; } .ih-pv small { color: rgba(255,255,255,.75); font-size: 12px; }
.ih-pl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ih-pl a { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; }
.ih-pl a:hover { background: rgba(255,255,255,.26); text-decoration: none; }
.ih-prov .ph-cr { font-size: 9.5px; bottom: 5px; inset-inline-end: 8px; max-width: 86%; }
.ih-upd { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; } .ih-upd li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px dashed var(--line); } .ih-upd small { color: var(--mut); white-space: nowrap; }
.ih-low { align-items: stretch; }
@media (max-width: 1100px) { .ih-provs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .ih-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ih-hero { min-height: 0; border-radius: 18px; } .ih-in { width: 100%; padding: 120px 16px 34px; }
  .ih-hero::before, [dir="ltr"] .ih-hero::before { background: linear-gradient(to top, rgba(14,12,9,.94) 0%, rgba(14,12,9,.8) 55%, rgba(14,12,9,.1) 100%); } .ih-ph { object-position: 50% 30%; }
  .ih-hero .cp-f { flex-direction: column; } .ih-hero .cp-go .btn { flex: 1; justify-content: center; }
  .ih-provs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
  .ih-prov { scroll-snap-align: start; } .ih-facts a { grid-template-columns: 96px minmax(0, 1fr); } .ih-facts b { font-size: 17px; }
}
.ih-empty { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--ink-2); } .ih-empty span { flex: 1; min-width: 220px; } .ih-empty > .ic { width: 22px; height: 22px; color: var(--gold); }
/* the staff dashboard's head on the photograph of Umm Qasr port */
.dash-c .ih-ph { object-position: 50% 55%; } [dir="ltr"] .dash-c .ih-ph { transform: none; object-position: 50% 55%; }
.dash-c .cp-sub.warn { color: #F5C978; }
.dash-c .dash-qa .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; } .dash-c .dash-qa .btn:hover { background: rgba(255,255,255,.22); }
.istats.dash-s { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .dash-s > * { flex: none; }
@media (max-width: 760px) { .istats.dash-s { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- the advisor, read as a ledger: the investor's question on a navy rule, Rafid's answer on the council's
   gold; a compound question carries numbers that the composer shows while typing and the answer repeats ---------- */
.adv-msgs .adv-q { align-self: stretch; max-width: none; background: none; color: var(--ink); padding: 2px 0 2px; padding-inline-start: 14px; border-radius: 0; border-inline-start: 3px solid var(--navy); font-weight: 500; display: grid; gap: 2px; }
[data-theme="dark"] .adv-msgs .adv-q { border-inline-start-color: var(--ink-2); }
.adv-q-l { font-size: 12px; font-weight: 700; color: var(--mut); }
.adv-q-t { font-size: 16px; font-weight: 500; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.adv-q.long .adv-q-t { max-height: 9em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent); }
.adv-q.long.open .adv-q-t { max-height: none; -webkit-mask-image: none; mask-image: none; }
.adv-q-x { justify-self: start; border: 0; background: none; padding: 4px 0; min-height: 32px; color: var(--brand-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.adv-q-x:hover { text-decoration: underline; text-underline-offset: 3px; }
.adv-ai { border-inline-start: 3px solid var(--council); }

/* a compound answer: each question under its number */
.adv-multi-note { font-size: 13px; color: var(--mut); margin: 0 0 4px; }
.adv-parts { list-style: none; margin: 0; padding: 0; display: grid; }
.adv-part { padding: 14px 0 6px; min-width: 0; } .adv-part + .adv-part { border-top: 1px solid var(--line); }
.adv-part-h { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.adv-part-h b { flex: 1 1 220px; min-width: 0; font-size: 15px; line-height: 1.6; }
.adv-pn, .adv-qparts li::before { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--council); color: var(--gold); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface); }
.adv-part.none .adv-pn { border-style: dashed; border-color: var(--line-2); color: var(--mut); }
.adv-part .adv-secs { margin-top: 8px; }

/* the composer: the question box on top, its bar below */
.adv-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; align-items: stretch; padding: 10px 12px 8px; border-radius: 18px; transition: border-color .15s, box-shadow .15s; }
.adv-form:focus-within { border-color: var(--council); box-shadow: 0 0 0 3px var(--brand-ring), var(--shadow); }
.adv-form textarea { width: 100%; min-height: 48px; max-height: none; padding: 6px 4px; font-size: 15.5px; line-height: 1.7; }
.adv-fbar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.adv-hint { margin-inline-end: auto; font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.adv-count { font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; direction: ltr; white-space: nowrap; padding-inline: 4px; }
.adv-count.full { color: var(--err); font-weight: 700; }
.adv-count[hidden] { display: none; }
.adv-form .adv-fbar .btn { width: 40px; height: 40px; min-height: 40px; border-radius: 12px; }
.adv-qparts { display: grid; gap: 6px; padding: 2px 2px 8px; margin-bottom: 2px; border-bottom: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-2); }
.adv-qparts[hidden] { display: none; }
.adv-qparts ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: qp; }
.adv-qparts li { counter-increment: qp; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding-block: 2px; padding-inline: 3px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-qparts li::before { content: counter(qp); width: 20px; height: 20px; font-size: 11px; }
@media (pointer: coarse) { .adv-hint { display: none; } }

/* the empty conversation: what to write, where the answer comes from, questions to start with */
.adv-msgs .adv-empty { text-align: start; max-width: 700px; margin: auto; padding: 28px 6px 20px; }
.adv-start-h { font-family: var(--font-d); font-size: 30px; line-height: 1.35; margin: 0 0 8px; color: var(--ink); }
.adv-start-sub { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); max-width: 58ch; margin: 0 0 22px; }
.adv-eyebrow { display: block; font-size: 12px; font-weight: 700; color: var(--gold); margin: 0 0 8px; }
.adv-ladder ol { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); counter-reset: rung; }
.adv-ladder li { counter-increment: rung; display: grid; gap: 2px; align-content: start; padding: 12px 14px; min-width: 0; }
.adv-ladder li + li { border-inline-start: 1px solid var(--line); }
.adv-ladder li::before { content: counter(rung); font-size: 12px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.adv-ladder li b { font-size: 14px; } .adv-ladder li small { font-size: 12px; line-height: 1.55; color: var(--mut); }
.adv-ladder li.off { background: var(--surface-2); } .adv-ladder li.off b { color: var(--mut); }
.adv-msgs .adv-empty .adv-sugg { justify-content: flex-start; margin-top: 0; }
.adv-msgs .adv-empty .adv-goal { margin-inline: 0; }
@media (max-width: 560px) {
  .adv-msgs .adv-empty { padding: 14px 2px; }
  .adv-start-h { font-size: 24px; } .adv-start-sub { font-size: 14.5px; margin-bottom: 16px; }
  .adv-ladder ol { grid-template-columns: minmax(0, 1fr); margin-bottom: 18px; }
  .adv-ladder li { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 10px 12px; } .adv-ladder li::before { grid-row: span 2; }
  .adv-ladder li + li { border-inline-start: 0; border-top: 1px solid var(--line); }
  .adv-q-t { font-size: 15px; }
}
@media (max-height: 560px) and (orientation: landscape) { .adv-msgs .adv-empty .adv-ladder, .adv-start-sub { display: none; } }
/* the advisor is Rafid already: the floating assistant would sit on the send button */
body:has(.adv-form) .assist-fab { display: none; }
@media (max-width: 560px) { .adv-hint { display: none; } }

/* ---------- Rafid's tools beside the answer (views/advisor-tools.js) ---------- */
.adv-picked { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); } .adv-picked .ic { color: var(--ok); width: 14px; height: 14px; }
/* a question before the answer */
.at-clar { border-inline-start: 3px solid var(--council); }
.at-clar-q { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.at-clar-o { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; } .at-clar-o .btn { min-height: 42px; }
/* cost and time */
.at-cost .at-cform { margin-bottom: 6px; }
.at-src { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--mut); margin-inline-start: 4px; }
.at-src.question, .at-src.you { background: var(--ok-soft); color: var(--ok); } .at-src.memory { background: var(--gold-soft); color: var(--gold); }
.at-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 14px 0 10px; }
.at-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.at-tile small { color: var(--mut); font-size: 12px; } .at-tile b { font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .at-tile span { font-size: 12px; color: var(--ink-2); }
.at-fees td a { display: inline-flex; gap: 4px; align-items: flex-start; font-size: 12.5px; } .at-fees td a .ic { flex: none; width: 13px; height: 13px; margin-top: 3px; }
.at-stages { padding-inline-start: 20px; margin: 0; display: grid; gap: 8px; } .at-stages li b { display: block; margin-bottom: 2px; }
/* a document under review */
.at-doc-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; } .at-doc-h > .ic { color: var(--gold); } .at-doc-h b { overflow-wrap: anywhere; }
.at-checks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.at-checks li { display: flex; gap: 10px; align-items: flex-start; } .at-checks li > span:last-child { display: grid; gap: 1px; } .at-checks small { color: var(--mut); font-size: 12px; }
.at-ck { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.at-checks li.ok .at-ck { background: var(--ok-soft); color: var(--ok); } .at-checks li.part .at-ck { background: var(--warn-soft); color: var(--warn); } .at-checks li.miss .at-ck { background: var(--err-soft); color: var(--err); }
.at-doc-ai { margin-top: 12px; } .at-doc-priv { margin: 10px 0 0; }
.at-paste { width: 100%; margin-top: 6px; }
/* the council's expert */
.at-esc { margin: 2px 0 6px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface); display: grid; gap: 6px; }
.at-esc-h, .at-esc-rh { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .at-esc-h > .ic, .at-esc-rh > .ic { color: var(--gold); } .at-esc-h small, .at-esc-rh small { color: var(--mut); }
.at-esc-r { padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); border-inline-start: 3px solid var(--council); display: grid; gap: 4px; line-height: 1.75; }
.adv-ci-reply { color: var(--gold); font-weight: 700; }
.at-sreq { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; } .at-sreq.done { opacity: .85; } .at-sreq details summary { cursor: pointer; font-size: 13px; color: var(--brand-2); }
/* tasks on "My set-up path" */
.at-tasks { margin-bottom: 16px; } .at-tasks-h { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.at-tasks-h h3 { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-size: 17px; } .at-tasks-h h3 .ic { color: var(--gold); }
.at-tlist { list-style: none; margin: 10px 0; padding: 0; display: grid; }
.at-tlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.at-tlist li .adv-chips { grid-column: 1; margin: 0; padding-inline-start: 30px; }
.at-tdue { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; gap: 4px; align-items: center; } .at-tdue input { width: auto; min-height: 38px; }
.at-tchk { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; } .at-tchk input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.at-tlist li.done .at-tchk span { text-decoration: line-through; color: var(--mut); font-weight: 500; }
.at-tlist li.late { box-shadow: inset 3px 0 0 var(--warn); } [dir=rtl] .at-tlist li.late { box-shadow: inset -3px 0 0 var(--warn); } .at-tlist li.late, .at-tlist li.done { padding-inline-start: 8px; }
@media (max-width: 560px) {
  .at-tlist li { grid-template-columns: minmax(0, 1fr); } .at-tdue { grid-column: 1; grid-row: auto; padding-inline-start: 30px; }
  .at-tiles { grid-template-columns: minmax(0, 1fr); }
}
/* long authority names wrap inside their chip instead of running off a phone's screen */
.at-tlist .chip, .at-stages .chip { white-space: normal; height: auto; min-height: 26px; line-height: 1.5; padding-block: 3px; max-width: 100%; text-align: start; overflow-wrap: anywhere; }
.at-tlist li > *, .at-stages li > * { min-width: 0; }

/* ---------- simpler journeys (app.js, views/invest.js, views/path.js, views/settings.js) ---------- */
/* the home's question box: one main action, the path a quieter second under it */
.ih-hero .cp-go { flex-direction: column; align-items: stretch; gap: 4px; }
.cp-draw { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 36px; padding: 4px 8px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 600; opacity: .85; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cp-draw:hover { opacity: 1; } .cp-draw .ic { width: 15px; height: 15px; }
/* "or answer the questions" opens the folded questionnaire */
.goal-or button { border: 0; background: none; color: var(--brand-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 4px; min-height: 36px; }
.goal-or button:hover { text-decoration: underline; text-underline-offset: 3px; }
/* one category of settings: no menu of one item */
.settings.single { grid-template-columns: minmax(0, 1fr); } .settings.single .set-nav { display: none; }
/* how the council can help: the common requests, one tap each */
.rq-start { max-width: 760px; margin: 8px auto; text-align: start; } .rq-start h3 { font-family: var(--font-d); font-size: 22px; margin: 0 0 4px; } .rq-start > p { margin: 0 0 16px; }
.rq-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rq-way { display: flex; gap: 12px; align-items: flex-start; text-align: start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-height: 72px; }
.rq-way:hover, .rq-way:focus-visible { border-color: var(--council); background: var(--gold-soft); }
.rq-way > .ic { flex: none; width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.rq-way span { display: grid; gap: 2px; } .rq-way small { color: var(--mut); font-size: 12.5px; line-height: 1.5; }
.rq-more { margin-top: 16px; } .rq-more > summary { cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--brand-2); min-height: 40px; }
.rq-more > summary::-webkit-details-marker { display: none; } .rq-more[open] > summary { margin-bottom: 10px; }
.rq-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .rq-ways { grid-template-columns: minmax(0, 1fr); } }

/* Rafid asks back to narrow the answer; the answers given show as small checks; an empty or cut reply says so */
.adv-picked { display: flex; flex-wrap: wrap; gap: 6px 14px; } .adv-picked span { display: inline-flex; gap: 5px; align-items: center; }
.adv-ask { margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--gold-soft); border-inline-start: 3px solid var(--council); }
.adv-ask-q { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.adv-ask .at-clar-o { margin-bottom: 0; } .adv-ask .btn { background: var(--surface); }
.adv-ai-err { display: grid; gap: 8px; justify-items: start; } .adv-ai-err p { margin: 0; color: var(--ink-2); }
.adv-cut { margin-top: 10px; font-size: 13px; }

/* the sector's story at the top of the set-up path (views/path.js storyHtml) */
.pth-story { margin: 14px 0; border-inline-start: 3px solid var(--council); }
.pth-story-h small { display: block; font-size: 12px; font-weight: 700; color: var(--gold); } .pth-story-h h3 { margin: 2px 0 12px; font-family: var(--font-d); font-size: 20px; }
.pth-story-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.pth-story-b h4 { display: flex; gap: 7px; align-items: center; margin: 0 0 6px; font-size: 14px; } .pth-story-b h4 .ic { color: var(--gold); width: 16px; height: 16px; }
.pth-story-b p, .pth-story-b ul { margin: 0 0 6px; line-height: 1.75; font-size: 14px; } .pth-story-b ul { padding-inline-start: 18px; }
.pth-story-a { list-style: none; padding: 0 !important; display: grid; gap: 6px; } .pth-story-a li { display: grid; gap: 1px; } .pth-story-a small { color: var(--mut); font-size: 12.5px; }
.pth-story-f { display: flex; gap: 7px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--gold-soft); font-size: 13.5px; } .pth-story-f .ic { flex: none; margin-top: 3px; color: var(--gold); }
@media (max-width: 720px) { .pth-story-g { grid-template-columns: minmax(0, 1fr); } }
.pth-story { padding: 18px 20px; }

/* ---------- Animated walkthrough (views/tour.js) ---------- */
.ovl.tv-ovl .modal { width: min(1080px, 100%); }
.tv { display: flex; flex-direction: column; gap: 12px; }
.tv-prog { display: flex; gap: 4px; }
.tv-prog i { flex: 1; height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.tv-prog i b { display: block; height: 100%; width: 0; background: var(--brand); }
.tv-stage { position: relative; aspect-ratio: 16 / 8.2; min-height: 340px; border-radius: var(--r-l); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.tv-stage::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: var(--merlon) repeat-x; background-size: 18px 7px; opacity: .55; }
.tv-scene { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 34px 36px 28px; }
.tv-txt h3 { font-family: var(--font-d); font-size: 1.55rem; line-height: 1.45; margin: 4px 0 12px; color: var(--ink); }
.tv-k { display: inline-block; font-weight: 600; color: var(--brand); letter-spacing: .01em; }
.tv-pts { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.tv-pts li { position: relative; padding-inline-start: 18px; color: var(--ink-2); line-height: 1.65; }
.tv-pts li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--council); }
.tv-facts { margin: 0; display: grid; gap: 6px; }
.tv-facts div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); }
.tv-facts dt { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--mut); }
.tv-facts dt .ic { width: 15px; height: 15px; }
.tv-facts dd { margin: 0; font-weight: 600; font-size: .92rem; color: var(--ink); }
.tv-art { display: grid; place-items: center; min-width: 0; }
.tv-cap { margin: 0; min-height: 3.2em; padding: 10px 14px; border-radius: var(--r); background: var(--brand-soft); color: var(--ink); font-size: 1.02rem; line-height: 1.75; border-inline-start: 3px solid var(--brand); }
.tv-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tv-ctl-m, .tv-ctl-s { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tv-pp { min-width: 132px; justify-content: center; }
.tv-cnt { min-width: 48px; text-align: center; }
[dir="rtl"] .tv-ctl [data-tv="next"] .ic, [dir="ltr"] .tv-ctl [data-tv="prev"] .ic { transform: scaleX(-1); }
.tv-made { display: flex; align-items: center; gap: 6px; margin: 0; }
.tv-made .ic { width: 14px; height: 14px; flex: none; }

/* entering in turn; the end state is the resting state, so reduced motion simply shows it */
@keyframes tv-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tv-type { from { max-width: 0; } to { max-width: 100%; } }
@keyframes tv-caret { 50% { border-color: transparent; } }
@keyframes tv-fill { from { width: 0; } to { width: 100%; } }
@keyframes tv-pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tv-draw { from { stroke-dashoffset: var(--len, 40); } to { stroke-dashoffset: 0; } }
@keyframes tv-stamp { 0% { opacity: 0; transform: scale(1.9) rotate(-22deg); } 65% { opacity: 1; transform: scale(.94) rotate(-9deg); } 100% { opacity: 1; transform: scale(1) rotate(-9deg); } }
@keyframes tv-glow { 0%, 100% { box-shadow: 0 0 0 0 var(--brand-ring); } 50% { box-shadow: 0 0 0 7px var(--brand-ring); } }
@keyframes tv-drop { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
@keyframes tv-boxon { to { background: var(--ok); border-color: var(--ok); } }
.tv-scene [style*="--i"] { animation: tv-up .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.25s + var(--i) * .42s); }
.tv.paused *, .tv.paused *::before, .tv.paused *::after { animation-play-state: paused !important; }

/* a window frame for the online steps */
.tv-win { width: min(420px, 100%); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; }
.tv-win-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: var(--surface-3); }
.tv-win-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.tv-win-bar span { margin-inline-start: 8px; flex: 1; padding: 3px 10px; border-radius: 99px; background: var(--surface); font-size: .78rem; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-win-b { padding: 18px; display: grid; gap: 10px; }
.tv-a-lbl { font-size: .8rem; color: var(--mut); }
.tv-a-field { padding: 10px 12px; border: 1.5px solid var(--brand); border-radius: var(--r-s); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-ring); }
.tv-type { display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom; border-inline-end: 2px solid var(--brand); padding-inline-end: 2px; font-weight: 600; animation: tv-type 1.8s steps(32) 1s both, tv-caret .8s step-end 6; }
.tv-a-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: .9rem; }
.tv-tick { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tv-tick path { stroke-dasharray: 24; --len: 24; }
.tv-a-ok .tv-tick path { animation: tv-draw .45s ease-out both; animation-delay: 2.1s; }

.tv-a-intro { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: min(360px, 100%); }
.tv-a-intro li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tv-a-intro .num, .tv-a-flow .num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: .85rem; }

.tv-a-fork { display: grid; gap: 14px; width: min(400px, 100%); justify-items: center; }
.tv-a-fork-o { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.tv-a-fork-o .ic { width: 26px; height: 26px; }
.tv-a-fork-b { width: 100%; display: grid; gap: 3px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); box-shadow: var(--shadow); }
.tv-a-fork-b.alt { border-inline-start-color: var(--council); }
.tv-a-fork-b span { font-size: .86rem; color: var(--mut); }

.tv-a-bank { width: min(360px, 100%); padding: 20px; border-radius: var(--r-l); color: #F7F1E6; background: linear-gradient(135deg, #3D3326, #66533A); box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.tv-a-bank-h { display: flex; align-items: center; gap: 8px; font-size: .85rem; opacity: .85; }
.tv-a-bank-v { display: flex; align-items: baseline; gap: 8px; }
.tv-a-bank-v b { font-size: 2.3rem; letter-spacing: .02em; direction: ltr; }
.tv-a-lock { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); background: rgba(255,255,255,.1); font-size: .86rem; }

.tv-a-doc { position: relative; width: min(330px, 100%); padding: 22px 22px 54px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); display: grid; gap: 10px; }
.tv-a-doc > b { font-family: var(--font-d); text-align: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tv-a-doc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tv-a-doc li { font-size: .88rem; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.tv-sign { position: absolute; inset-inline-end: 18px; bottom: 10px; width: 130px; height: 34px; fill: none; stroke: var(--brand-2); stroke-width: 2.2; stroke-linecap: round; }
.tv-sign path { stroke-dasharray: 420; --len: 420; animation: tv-draw 1.6s ease-in-out 2.6s both; }

.tv-a-up { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.tv-a-up li { display: grid; grid-template-columns: 18px 1fr 70px 18px; align-items: center; gap: 8px; font-size: .86rem; }
.tv-a-up li .ic { width: 17px; height: 17px; color: var(--mut); }
.tv-scene .tv-a-up li i { height: 5px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; animation: none; }
.tv-a-up li i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 100%; background: var(--brand); animation: tv-fill .8s ease-out both; animation-delay: calc(.6s + var(--i) * .42s); }
.tv-a-up .tv-tick { color: var(--ok); }
.tv-a-up .tv-tick path { animation: tv-draw .35s ease-out both; animation-delay: calc(1.45s + var(--i) * .42s); }

.tv-a-inbox { width: min(380px, 100%); display: grid; justify-items: center; gap: 16px; }
.tv-a-env { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--brand); box-shadow: var(--shadow); }
.tv-a-env .ic { width: 42px; height: 42px; }
.tv-a-note { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.tv-scene .tv-a-note { animation-name: tv-drop; }
.tv-a-note > .ic { color: var(--ok); flex: none; margin-top: 2px; }
.tv-a-note div { display: grid; gap: 3px; }
.tv-a-note span { font-size: .86rem; color: var(--mut); }

.tv-a-pay { width: min(380px, 100%); padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.tv-a-pay ul { margin: 0; padding: 0; list-style: none; }
.tv-a-pay li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: .9rem; }
.tv-a-pay li b { font-weight: 700; }
.tv-a-paynote { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 8px 10px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--warn); font-size: .85rem; font-weight: 600; }

.tv-a-cert { position: relative; width: min(360px, 100%); padding: 26px 24px 30px; text-align: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow-lg); display: grid; gap: 10px; outline: 6px double var(--council); outline-offset: -14px; }
.tv-a-cert small { color: var(--mut); font-size: .76rem; margin-top: 6px; }
.tv-a-cert > b { font-family: var(--font-d); font-size: 1.15rem; }
.tv-a-cert > i { height: 6px; border-radius: 3px; background: var(--surface-3); margin-inline: 22px; }
.tv-a-cert > i:nth-of-type(2) { margin-inline: 44px; }
.tv-a-seal { position: absolute; inset-inline-end: 20px; bottom: 14px; display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; border: 3px double var(--err); color: var(--err); font-size: .68rem; font-weight: 700; line-height: 1.3; padding: 8px; animation: tv-stamp .55s cubic-bezier(.3,1.4,.5,1) 2.1s both; }

.tv-a-id { width: min(360px, 100%); aspect-ratio: 1.586; padding: 16px 18px; border-radius: 14px; background: linear-gradient(135deg, var(--surface), var(--brand-soft)); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); display: grid; grid-template-rows: auto 1fr auto; gap: 10px; }
.tv-a-id-h { display: flex; align-items: center; gap: 10px; }
.tv-a-chip { width: 34px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, #D9C49C, #AB997F); }
.tv-a-id-p { display: flex; gap: 14px; align-items: center; }
.tv-a-face { display: grid; place-items: center; width: 62px; height: 70px; border-radius: 8px; background: var(--surface-3); color: var(--mut); }
.tv-a-face .ic { width: 32px; height: 32px; }
.tv-a-id-p div { flex: 1; display: grid; gap: 8px; }
.tv-a-id-p i { height: 6px; border-radius: 3px; background: var(--line-2); }
.tv-a-id-p i:nth-child(2) { width: 70%; } .tv-a-id-p i:nth-child(3) { width: 45%; }
.tv-a-id-n { font-size: 1.05rem; letter-spacing: .14em; color: var(--ink-2); }

.tv-a-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; width: min(380px, 100%); }
.tv-a-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.tv-a-box { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--ok); color: var(--on-brand); background: var(--ok); }
.tv-scene .tv-a-list li .tv-a-box { background: var(--surface); border-color: var(--line-2); animation: tv-boxon .3s ease-out both; animation-delay: calc(.6s + var(--i) * .42s); }
.tv-a-box .tv-tick { width: 15px; height: 15px; }
.tv-a-list li .tv-tick path { animation: tv-draw .3s ease-out both; animation-delay: calc(.7s + var(--i) * .42s); }

.tv-a-clock { position: relative; display: grid; place-items: center; width: min(260px, 100%); aspect-ratio: 1; }
.tv-a-clock svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-a-clock circle { fill: none; stroke-width: 7; transform: rotate(-90deg); transform-origin: 60px 60px; }
.tv-a-clock .bg { stroke: var(--line); }
.tv-a-clock .fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 327; --len: 327; animation: tv-draw 1.8s cubic-bezier(.4,0,.2,1) .5s both; }
.tv-a-clock-v { position: relative; display: grid; gap: 6px; text-align: center; padding: 0 34px; }
.tv-a-clock-v b { font-family: var(--font-d); font-size: 1.9rem; color: var(--ink); }
.tv-a-clock-v span { font-size: .84rem; color: var(--mut); line-height: 1.5; }

.tv-a-flow { list-style: none; margin: 0; padding: 0; display: grid; width: min(360px, 100%); }
.tv-a-flow li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.tv-a-flow li + li::before { content: ""; position: absolute; inset-inline-start: 13px; top: -10px; height: 20px; width: 2px; background: var(--line-2); }
.tv-a-flow li b { padding: 9px 12px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); flex: 1; font-weight: 600; font-size: .9rem; }
.tv-a-flow li:last-child .num { animation: tv-glow 1.6s ease-in-out 2.4s 3; }

.tv-a-land { width: min(380px, 100%); display: grid; gap: 14px; }
.tv-a-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.tv-a-grid i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); }
.tv-a-grid i.on { background: var(--brand); animation: tv-pop .5s ease-out 1s both, tv-glow 1.6s ease-in-out 1.6s 3; }
.tv-a-land-t { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.tv-a-land-t > .ic { color: var(--brand); flex: none; margin-top: 2px; }
.tv-a-land-t div { display: grid; gap: 2px; } .tv-a-land-t span { font-size: .85rem; color: var(--mut); }

.tv-end .tv-txt p { color: var(--ink-2); line-height: 1.7; margin: 0 0 16px; }
.tv-more { display: grid; gap: 8px; width: min(380px, 100%); }
.tv-more > b { font-size: .85rem; color: var(--mut); }
.tv-more-i { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.tv-more-i span { flex: 1; font-weight: 600; }
.tv-more-i .ic:first-child { color: var(--brand); }
.tv-more-i:hover { border-color: var(--brand); }

/* the ways in: a button on a guide section, and a strip of all walkthroughs */
.tv-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--brand-soft); color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: border-color .15s; }
.tv-cta:hover { border-color: var(--brand); }
.tv-cta-p { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.tv-cta-p .ic { width: 17px; height: 17px; fill: currentColor; }
.tv-cta-t { display: grid; gap: 1px; } .tv-cta-t small { color: var(--mut); }
.tv-strip { margin: 0 0 16px; }
.tv-strip-h { margin-bottom: 10px; } .tv-strip-h h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.tv-strip-h h3 .ic { color: var(--brand); }
.tv-strip-h p { margin: 4px 0 0; }
.tv-strip-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tv-card { display: grid; align-content: start; gap: 6px; padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tv-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.tv-card-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.tv-card small { color: var(--mut); line-height: 1.5; }
.tv-card-m { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--brand-2); }
.tv-card-m .ic { width: 14px; height: 14px; fill: currentColor; }

@media (max-width: 760px) {
  .tv-stage { aspect-ratio: auto; min-height: 0; }
  .tv-scene { position: relative; grid-template-columns: 1fr; gap: 18px; padding: 22px 16px 18px; }
  .tv-art { order: -1; }
  .tv-txt h3 { font-size: 1.2rem; }
  .tv-a-bank-v b { font-size: 1.8rem; }
  .tv-a-clock { width: 190px; }
  .tv-a-clock-v b { font-size: 1.5rem; }
  .tv-pp { min-width: 0; }
  .tv-facts div { grid-template-columns: 80px 1fr; }
  .tv-a-land { width: min(260px, 100%); }
  .tv-ctl { position: sticky; bottom: -16px; z-index: 2; margin-inline: -16px; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); }
  .tv-ctl-s .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tv *, .tv *::before, .tv *::after { animation: none !important; }
  .tv-scene .tv-a-list li .tv-a-box { background: var(--ok); border-color: var(--ok); }
}

.adv-tv { margin: 10px 0 0; text-decoration: none; }
.adv-tv:hover { text-decoration: none; }

/* ---------- The investor's home (views/invest.js): one question, the journey, the council, the opportunities ---------- */
.hm { display: grid; gap: 28px; }
.hm-hi { padding: 8px 0 0; max-width: 780px; }
.hm-k { color: var(--brand-2); font-weight: 600; margin: 0 0 6px; }
.hm-h { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.28; margin: 0 0 20px; }
.askbox { display: flex; gap: 8px; align-items: flex-end; padding: 8px; padding-inline-start: 18px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-md); transition: border-color .15s, box-shadow .15s; }
.askbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring), var(--shadow-md); }
.askbox textarea { flex: 1; min-width: 0; min-height: 50px; max-height: 180px; padding: 13px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; resize: none; font-size: 16.5px; line-height: 1.6; }
.askbox textarea:focus { box-shadow: none; }
.askbox .btn { min-height: 50px; border-radius: 14px; padding: 0 22px; font-size: 15px; }
.hm-ex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; font-size: 13.5px; }
.hm-ex > span { color: var(--mut); }
.hm-ex a { padding: 6px 13px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s; }
.hm-ex a:hover { background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.hm-al { margin: 0; text-decoration: none; } .hm-al:hover { text-decoration: none; }
#hm-alert:empty { display: none; }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.hm-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.hm-ch, .hm-sh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hm-ch h2, .hm-sh h2 { font-size: 18px; }
.hm-sh { margin-bottom: 14px; }
.hm-count { font-family: var(--font-d); font-weight: 600; font-size: 15px; color: var(--brand-2); }
.hm-more { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.hm-lead { color: var(--ink-2); margin: 0; }
.hm-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.hm-hint { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mut); }
.hm-hint .ic { width: 16px; height: 16px; }
.jr-next { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.jr-next small { color: var(--mut); font-weight: 600; font-size: 12.5px; }
.jr-next b { display: block; font-size: 16.5px; margin: 2px 0 8px; }
.jr-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.jr-next li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.jr-next .ic { width: 15px; height: 15px; color: var(--brand); margin-top: 3px; }
.jr-done { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; margin: 0; }
.hm-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.hm-rows li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hm-rows li:last-child { border-bottom: 0; }
.hm-rows li > span { display: grid; min-width: 0; } .hm-rows small { color: var(--mut); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-empty { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--ink-2); }
.hm-empty > span { flex: 1; min-width: 220px; } .hm-empty > .ic { color: var(--brand); }
/* the thread: the journey's stages as beads on a line of gold that runs as far as you have come */
.thread { position: relative; height: 24px; margin: 6px 2px 2px; }
.thread-line { position: absolute; inset-inline: 10px; top: 50%; height: 2px; transform: translateY(-50%); border-radius: 2px; background: var(--line); }
.thread-line::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p, 0%); border-radius: 2px; background: var(--council); transition: width .6s ease; }
.thread ol { position: relative; list-style: none; margin: 0; padding: 0; height: 100%; display: flex; justify-content: space-between; align-items: center; }
.thread li { display: grid; place-items: center; width: 20px; }
.thread li i { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.thread li.done i { background: var(--council); border-color: var(--council); }
.thread li.now i { width: 18px; height: 18px; border: 3px solid var(--brand); background: var(--surface); box-shadow: 0 0 0 5px var(--brand-ring); animation: bead 2.6s ease-in-out infinite; }
.thread.blank li.now i { width: 12px; height: 12px; border-width: 2px; border-color: var(--line-2); box-shadow: none; animation: none; }
@keyframes bead { 50% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .thread li.now i { animation: none; } }
.icard { border-radius: 18px; }
.icard:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
@media (max-width: 860px) {
  .hm { gap: 22px; }
  .hm-grid { grid-template-columns: minmax(0, 1fr); }
  .hm-card { padding: 18px; border-radius: 18px; }
  .askbox { padding-inline-start: 14px; border-radius: 18px; } .askbox .btn { padding: 0 14px; }
  .askbox .btn span { display: none; } .askbox .btn { width: 50px; padding: 0; }
}

/* ---------- Today (views/dashboard.js): the day's sentence, four numbers, the follow-ups ---------- */
.dash-sum { display: flex; gap: 8px; align-items: center; margin: -8px 0 18px; color: var(--ink-2); }
.dash-sum .ic { color: var(--ok); } .dash-sum.warn, .dash-sum.warn .ic { color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { display: grid; gap: 2px; align-content: start; text-align: start; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font: inherit; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.stat:hover { border-color: var(--line-2); background: var(--surface-2); }
.stat b { font-family: var(--font-d); font-weight: 600; font-size: 34px; line-height: 1.15; color: var(--ink); }
.stat span { font-size: 13.5px; }
.stat.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); } .stat.warn b { color: var(--warn); }
.stat.ok b { color: var(--ok); }
.stats-more { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 12px 2px 0; font-size: 13.5px; color: var(--mut); }
.stats-more b { color: var(--ink); font-weight: 600; } .stats-more .lnk { color: var(--mut); font-weight: 500; padding: 0; } .stats-more .lnk:hover { color: var(--ink); } .stats-more i { font-style: normal; opacity: .5; }
.hm .dash-g, .hm .onboard { margin: 0; }
.dash-more > summary { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; cursor: pointer; list-style: none; color: var(--brand-2); font-weight: 600; }
.dash-more > summary::-webkit-details-marker { display: none; } .dash-more > summary .ic { transition: transform .2s; } .dash-more[open] > summary .ic { transform: rotate(180deg); }
.dash-more[open] > .grid2 { margin-top: 12px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 14px 16px; } .stat b { font-size: 26px; } }
/* registration: the optional part of the profile, folded */
.reg-more { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.reg-more > summary { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; cursor: pointer; list-style: none; }
.reg-more > summary::-webkit-details-marker { display: none; } .reg-more > summary .ic { margin-top: 3px; color: var(--brand); transition: transform .2s; } .reg-more[open] > summary .ic { transform: rotate(180deg); }
.reg-more > summary span { display: grid; gap: 2px; } .reg-more > summary small { color: var(--mut); font-size: 13px; line-height: 1.5; }
.reg-more > .frm { padding: 4px 16px 16px; }
.auth-card.wide { width: min(560px, 100%); } .auth-card.wide .frm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .auth-card.wide .frm { grid-template-columns: minmax(0, 1fr); } }
/* long filter bars: on every screen the first three filters show, the rest wait behind the filters button */
.toolbar.collapsible .filter-toggle { display: inline-flex; }
.toolbar.collapsible:not(.open) .tb-l > select:nth-of-type(n+4) { display: none; }
.toolbar.collapsible.open .filter-toggle { background: var(--brand-soft); border-color: var(--brand); }

/* ---------- The investor's shell, in the manner of ChatGPT (app.js renderGpt) ---------- */
.gpt { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.gside { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; background: var(--surface-2); border-inline-end: 1px solid var(--line); z-index: 40; }
.gs-top { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; }
.gs-top .brand-txt b { font-size: 15px; } .gs-top .brand-mark { width: 32px; height: 32px; }
.gs-x { display: none; margin-inline-start: auto; }
.gs-new { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.gs-new:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.gs-new .ic { color: var(--brand); }
.gs-nav { display: grid; gap: 1px; padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.gs-i { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.gs-i:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.gs-i .ic { width: 17px; height: 17px; color: var(--mut); }
.gs-i.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(23,21,15,.06); }
.gs-i.on .ic { color: var(--brand); }
.gs-i.on::before { content: ""; position: absolute; inset-inline-start: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--council); }
.gs-prog { margin-inline-start: auto; padding: 0 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-size: 11.5px; font-weight: 700; line-height: 20px; }
.gs-h { padding: 8px 12px 0; font-size: 12px; font-weight: 700; color: var(--mut); }
.gs-search { width: 100%; max-width: none; } .gs-search input { height: 36px; min-height: 36px; border-radius: 10px; background: var(--surface); border-color: var(--line); font-size: 13.5px; }
.gs-chats { flex: 1; min-height: 60px; overflow-y: auto; display: grid; align-content: start; gap: 1px; margin-inline: -2px; padding-inline: 2px; scrollbar-width: thin; }
.gs-chats .adv-ci { padding: 8px 12px; border-radius: 10px; }
.gs-chats .adv-ci:hover { background: var(--surface-3); } .gs-chats .adv-ci.on { background: var(--surface); box-shadow: 0 1px 2px rgba(23,21,15,.06); }
.gs-chats .adv-ct { font-weight: 500; font-size: 14px; } .gs-chats .adv-ci.on .adv-ct { font-weight: 600; }
.gs-chats .adv-cx button { background: var(--surface-3); } .gs-chats .adv-ci.on .adv-cx button { background: var(--surface); }
.gs-foot { position: relative; display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.gs-council { width: 100%; justify-content: flex-start; background: transparent; border-color: transparent; color: var(--ink-2); font-weight: 500; padding: 0 12px; }
.gs-council:hover { background: var(--surface-3); border-color: transparent; color: var(--ink); } .gs-council .ic { color: var(--brand); }
.gs-me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; text-align: start; color: var(--ink); }
.gs-me:hover, .gs-me[aria-expanded="true"] { background: var(--surface-3); }
.gs-me > .av { flex: none; } .gs-me > span:not(.av) { flex: 1; min-width: 0; display: grid; line-height: 1.3; } .gs-me b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gs-me small { color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-me > .ic { color: var(--mut); }
.gside .umenu { top: auto; bottom: calc(100% + 6px); inset-inline: 0; width: auto; }
.gs-ovl { display: none; }
.gmain { min-width: 0; display: flex; flex-direction: column; }
.gtop { display: none; }
.gpt .phead, .gpt .hubtabs, .gpt .view { max-width: 1080px; }
/* the conversation: one centred column, questions in soft bubbles, answers as plain text, the box floating below */
.gpt .view-ask { max-width: none; padding: 0 24px; }
.gpt .adv { max-width: 820px; margin: 0 auto; }
.gpt .adv-head { padding: 14px 2px 8px; }
.adv-msgs .adv-q { align-self: flex-end; max-width: 80%; margin: 6px 0 2px; padding: 11px 18px; border: 0; border-inline-start: 0; border-radius: 22px; background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .adv-msgs .adv-q { border-inline-start: 0; }
.adv-msgs .adv-q-l { display: none; }
.adv-msgs .adv-q-t { font-size: 15.5px; }
.adv-msgs .adv-a { border: 0; border-radius: 0; background: transparent; padding: 6px 2px 10px; }
.adv-msgs .adv-a.none { border: 1px dashed var(--line-2); border-radius: 16px; padding: 14px 16px; }
.adv-msgs .adv-ai { border-inline-start: 0; }
.adv-form { border-radius: 26px; border: 1px solid var(--line-2); box-shadow: var(--shadow-md); padding: 10px 14px 8px; }
.adv-form:focus-within { border-color: color-mix(in srgb, var(--mut) 55%, var(--line-2)); box-shadow: var(--shadow-md); }
.adv-form .adv-fbar .btn.pri { border-radius: 50%; width: 40px; height: 40px; }
.adv-foot { margin-top: 8px; }
/* the empty conversation, centred: a greeting, then a few questions */
.adv-msgs .adv-empty { text-align: center; max-width: 640px; margin: auto; padding: 32px 8px; }
.adv-msgs .adv-empty .adv-start-h { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 10px; }
.adv-msgs .adv-empty .adv-start-sub { margin-inline: auto; margin-bottom: 24px; }
.adv-msgs .adv-empty .adv-eyebrow { display: none; }
.adv-msgs .adv-empty .adv-sugg { justify-content: center; }
.adv-msgs .adv-empty .adv-sugg .chip { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-weight: 500; color: var(--ink-2); }
.adv-msgs .adv-empty .adv-sugg .chip:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.adv-msgs .adv-empty .adv-mine { margin-top: 18px; }
@media (max-width: 860px) {
  .gpt { grid-template-columns: minmax(0, 1fr); }
  .gside { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 320px); height: auto; transform: translateX(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; box-shadow: var(--shadow-lg); padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  [dir="ltr"] .gside { transform: translateX(-105%); }
  body.gs-open .gside { transform: none; visibility: visible; transition: transform .22s ease; }
  body.gs-open .gs-ovl { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.35); }
  .gs-x { display: inline-grid; }
  .gtop { display: flex; position: sticky; top: 0; z-index: 20; height: 56px; align-items: center; gap: 6px; padding: 0 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
  .gtop b { flex: 1; text-align: center; font-family: var(--font-d); font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gpt .view { padding-bottom: 32px; }
  .gpt .view-ask { padding: 0; }
  .gpt .adv { bottom: var(--adv-b, 0px); max-width: none; }
  .gpt .adv-head .adv-title { display: none; } .gpt .adv-head { justify-content: flex-end; padding: 0 0 6px; }
  .adv-msgs .adv-q { max-width: 88%; }
  .gpt .toasts { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .gside { transition: none !important; } }
/* an answer's sources fold into one line (views/advisor.js) */
.adv-fold { display: block; margin-top: 12px; }
.adv-fold > summary { display: inline-flex; gap: 6px; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.adv-fold > summary::-webkit-details-marker { display: none; } .adv-fold > summary .ic { width: 14px; height: 14px; color: var(--brand); } .adv-fold > summary:hover { background: var(--surface-3); color: var(--ink); }
.adv-fold-b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* phones: the top bar already names the page */
@media (max-width: 860px) { .gpt .phead h1 { display: none; } .gpt .phead { padding-top: 14px; } }

/* ---------- The Iraqi companies directory: every company as a two-sided business card (M.bizCard) ---------- */
/* the front: identity on top, a large monogram pressed into the paper, the contacts as printed; the back: a QR code
   that saves the company to a phone, with call, e-mail and website. The card turns over in place. */
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 18px; }
.bcard { position: relative; min-width: 0; cursor: pointer; perspective: 1400px; border-radius: 16px; transition: transform .2s; }
.bcard:hover { transform: translateY(-2px); }
.bcard:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.bc-in { display: grid; height: 100%; transition: transform .6s cubic-bezier(.3,.7,.2,1); transform-style: preserve-3d; }
.bcard.flip .bc-in { transform: rotateY(180deg); }
.bc-front, .bc-back { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; min-height: 236px; padding: 22px 22px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: border-color .2s, box-shadow .2s; }
.bcard:hover .bc-front, .bcard:hover .bc-back { border-color: var(--line-2); box-shadow: 0 14px 34px rgba(23,21,15,.09); }
[data-theme="dark"] .bcard:hover .bc-front, [data-theme="dark"] .bcard:hover .bc-back { box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.bc-back { transform: rotateY(180deg); align-items: center; justify-content: center; gap: 10px; text-align: center; cursor: default; }
.bcard.sel .bc-front { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.bc-sel { position: absolute; z-index: 3; top: 16px; inset-inline-end: 16px; }
/* the monogram, large and faint, at the card's lower end: like a blind-embossed letter */
.bc-wm { position: absolute; z-index: 0; inset-inline-end: -6px; bottom: -42px; font-family: var(--font-d); font-weight: 700; font-size: 188px; line-height: 1; color: var(--surface-2); pointer-events: none; user-select: none; }
[data-theme="dark"] .bc-wm { color: #1F1E1B; }
.bc-front > *:not(.bc-wm) { position: relative; z-index: 1; }
/* identity: the sector above the name, the English name under it, a short gold rule */
.bc-h { display: grid; gap: 3px; padding-inline-end: 26px; }
.bc-eye { color: var(--brand-2); font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-h b { font-family: var(--font-d); font-weight: 600; font-size: 18px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-h small { color: var(--mut); font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.bc-h::after { content: ""; width: 30px; height: 2px; margin-top: 10px; border-radius: 2px; background: var(--council); }
/* the contact lines */
.bc-lines { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 7px; }
.bc-lines li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.bc-lines li .ic { width: 15px; height: 15px; color: var(--brand); opacity: .75; flex: none; }
.bc-lines li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-lines li small { color: var(--mut); font-size: 12px; flex: none; }
.bc-none { margin: 16px 0 0; color: var(--mut); font-size: 13px; }
/* the status, the one action, and the turn-over button */
.bc-f { display: flex; align-items: center; gap: 8px; min-height: 36px; margin-top: auto; padding-top: 14px; }
.bc-st { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; flex: 1; }
.bc-warn { display: inline-flex; gap: 4px; align-items: center; color: var(--warn); font-size: 12.5px; font-weight: 600; } .bc-warn .ic { width: 14px; height: 14px; }
.bc-own { display: inline-flex; gap: 5px; align-items: center; color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bc-own .ic { width: 14px; height: 14px; }
.bc-f .btn.sm { min-height: 32px; background: var(--surface); }
.bc-flip { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); }
.bc-flip:hover { border-color: var(--brand); color: var(--brand-2); }
.bc-flip .ic { width: 17px; height: 17px; }
/* the back */
.bc-qr { width: 172px; height: 172px; padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.bc-qr svg { display: block; width: 100%; height: 100%; }
.bc-back p { margin: 0; max-width: 30ch; color: var(--mut); font-size: 12.5px; line-height: 1.6; }
.bc-qs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bc-q { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.bc-q:hover { border-color: var(--brand); color: var(--ink); text-decoration: none; } .bc-q .ic { width: 15px; height: 15px; color: var(--brand); }
.bc-back-b { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
/* only the face that shows takes clicks; the back as a whole turns the card over again */
.bcard.flip .bc-front, .bcard:not(.flip) .bc-back { pointer-events: none; } .bcard.flip .bc-back { cursor: pointer; } .bcard.flip .bc-qr { cursor: default; }
.bc-back-b:hover { border-color: var(--brand); color: var(--ink); } .bc-back-b .ic { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .bc-in { transition: none; } .bcard { transition: none; } }
@media (max-width: 480px) { .bc-front, .bc-back { min-height: 0; padding: 18px 18px 12px; } .bc-wm { font-size: 150px; bottom: -34px; } }

/* ---------- Opportunities as a feed (views/feed.js), in the manner of Instagram's home ---------- */
.feed { display: grid; grid-template-columns: minmax(0, 600px) 280px; gap: 40px; justify-content: center; align-items: start; }
.fd-col { min-width: 0; }
/* what are you looking for */
.fd-ask { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 6px; padding-inline-start: 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); margin-bottom: 18px; }
.fd-ask:focus-within { border-color: color-mix(in srgb, var(--mut) 55%, var(--line-2)); box-shadow: var(--shadow-md); }
.fd-ask .ic-w .ic { color: var(--mut); }
.fd-ask input { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: 8px 0; min-height: 40px; }
.fd-ask input:focus { box-shadow: none; }
.fd-ask .btn { min-height: 40px; border-radius: 12px; padding: 0 16px; }
/* the sectors as stories */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; display: grid; justify-items: center; gap: 6px; width: 74px; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink-2); }
.st-ring { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; border: 2px solid var(--line-2); padding: 3px; transition: border-color .15s, transform .15s; }
.story.mine .st-ring { border-color: var(--council); }
.story.on .st-ring { border-color: var(--brand); border-width: 3px; }
.story:hover .st-ring { transform: scale(1.04); }
.st-in { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--surface-2); color: var(--brand); }
.story.on .st-in { background: var(--brand-soft); }
.st-in .ic { width: 22px; height: 22px; }
.st-l { max-width: 74px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story.on .st-l { color: var(--ink); font-weight: 700; }
/* a post */
.post { margin: 18px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.post-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.post-av { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--council); }
.post-av .ic { width: 18px; height: 18px; }
.post-h > div { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.post-h b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .post-h small { color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-tag { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-size: 12px; font-weight: 600; }
.post-tag.co { background: var(--surface-2); color: var(--ink-2); }
/* the post's picture: a quiet panel set in type — the opportunity's title and size, or the company's monogram and name */
.post-media { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; width: 100%; aspect-ratio: 5 / 4; padding: 28px; border: 0; border-block: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-align: start; font: inherit; cursor: pointer; overflow: hidden; }
.post-media:hover .pm-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.pm-k { position: relative; color: var(--brand-2); font-size: 13px; font-weight: 600; }
.pm-t { position: relative; font-family: var(--font-d); font-weight: 600; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pm-n { position: relative; font-family: var(--font-d); font-weight: 600; font-size: 20px; color: var(--brand-2); }
.pm-g { position: absolute; top: 26px; inset-inline-end: 26px; color: var(--council); opacity: .55; }
.pm-g .ic { width: 64px; height: 64px; stroke-width: 1.2; }
.post-media.co { justify-content: center; align-items: center; text-align: center; background: var(--surface); }
.pm-mono { display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: 6px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); font-family: var(--font-d); font-weight: 600; font-size: 46px; box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--council); }
.post-media.co .pm-t { font-size: clamp(20px, 2.8vw, 26px); -webkit-line-clamp: 2; }
.pm-en { color: var(--mut); font-size: 13px; letter-spacing: .02em; }
/* actions, caption, and why it is shown */
.post-acts { display: flex; align-items: center; gap: 2px; padding: 6px 8px; }
.pa { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pa:hover { background: var(--surface-2); color: var(--ink); } .pa .ic { width: 18px; height: 18px; }
.pa.pri { color: var(--brand-2); } .pa.pri .ic { color: var(--brand); }
.pa.on { color: var(--brand-2); } .pa.on .ic { fill: var(--council); color: var(--brand); }
.pa:last-child { margin-inline-start: auto; }
.post-cap { margin: 0 16px 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-why { display: flex; gap: 6px; align-items: flex-start; margin: 4px 16px 14px; color: var(--mut); font-size: 12.5px; }
.post-why .ic { width: 14px; height: 14px; color: var(--brand); flex: none; margin-top: 3px; }
.fd-end { display: grid; place-items: center; min-height: 60px; padding-bottom: 20px; }
.fd-done { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--mut); font-size: 14px; max-width: 46ch; } .fd-done > .ic { color: var(--ok); }
/* beside the feed */
.fd-side { position: sticky; top: 24px; display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.fd-side h3 { font-size: 15px; }
.fd-basis { display: flex; flex-wrap: wrap; gap: 6px; } .fd-basis span { padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-size: 13px; font-weight: 600; }
.fd-side p { margin: 0; }
.fd-side-acts { display: grid; gap: 6px; } .fd-side-acts .btn { justify-content: flex-start; }
@media (max-width: 1100px) { .feed { grid-template-columns: minmax(0, 600px); } .fd-side { display: none; } }
@media (max-width: 560px) { .post { margin: 14px -4px; border-radius: 16px; } .post-media { padding: 22px; } .pm-g .ic { width: 52px; height: 52px; } .pa span { font-size: 13px; } .pa { padding: 0 8px; } }
/* who provides the platform */
.credit { margin: 14px 0 0; text-align: center; color: var(--mut); font-size: 12.5px; line-height: 1.6; }
.um-credit { margin: 8px 10px 4px; color: var(--mut); font-size: 11.5px; line-height: 1.55; }

/* the council and the bank it recommends (partners.js): the gold thread runs down the card's start edge */
.pbank { position: relative; margin: 14px 0 4px; padding: 14px 16px 12px; padding-inline-start: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; }
.pbank::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: linear-gradient(var(--council), var(--brand)); }
.pb-h { display: flex; gap: 10px; align-items: center; }
.pb-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.pb-mark svg { width: 18px; height: 18px; }
.pb-h b { display: block; font-family: 'Readex Pro', inherit; font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--ink); }
.pb-k { display: block; font-size: 11.5px; color: var(--brand); font-weight: 600; }
.pb-fact { margin: 8px 0 0; font-size: 12.5px; color: var(--mut); }
.pb-svc { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.pb-svc li { display: flex; gap: 7px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; }
.pb-svc svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--council); }
.pb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pb-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--mut); }
.pbank.compact { margin: 12px 0 2px; padding-block: 11px 10px; }
.pbank.compact .pb-svc { margin-top: 7px; }
.pbank.compact .pb-acts { margin-top: 9px; }
.pcouncil { display: flex; gap: 10px; align-items: center; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); text-align: start; }
.pcouncil p { margin: 0; flex: 1; font-size: 12.5px; line-height: 1.6; color: var(--mut); }
.pc-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.pc-mark svg { width: 15px; height: 15px; }
.pc-svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pc-svc li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.pc-svc svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--brand); }
.pc-bank { margin-top: 18px; }
.pc-bank > small { color: var(--mut); font-size: 12px; }
.gs-cc { display: flex; gap: 9px; align-items: center; width: 100%; margin-bottom: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.gs-cc:hover { border-color: var(--council); }
.gs-cc:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.gs-cc > svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.gs-cc b { display: block; font-size: 12.5px; font-weight: 600; }
.gs-cc small { display: block; font-size: 11px; color: var(--mut); line-height: 1.45; }
.post-tag.pt, .post-av.pt { background: var(--brand-soft); color: var(--brand); }
.post-media.pt { position: relative; background: linear-gradient(135deg, var(--brand-soft), var(--bg)); text-decoration: none; color: var(--ink); }
.post-media.pt::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--council); }

/* Sign in with Google: Google's neutral button (white / dark surface, the four-colour G) and the "or" rule */
.g-slot { display: grid; gap: 14px; }
.g-btn { text-decoration: none; background: var(--surface); border-color: var(--line-2); color: var(--ink); gap: 12px; }
.g-btn:hover { background: var(--surface-2); border-color: var(--mut); }
.g-btn:focus-visible { outline: 2px solid var(--brand, #4285F4); outline-offset: 2px; }
.g-logo { width: 20px; height: 20px; flex: none; }
.g-or { display: flex; align-items: center; gap: 12px; color: var(--mut); font-size: 13px; }
.g-or::before, .g-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-copy { display: flex; gap: 8px; } .g-copy input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.g-steps { margin: 4px 0 16px; padding-inline-start: 22px; display: grid; gap: 6px; line-height: 1.7; }
