/* Frontier Solutions v2 — 2026-07 brand system (navy/bone/orange, squared,
   hairline borders). Restyled surfaces: chrome, page header band, Dashboard.
   Module-page classes below the brand layer keep the legacy look until each
   screen is converted (see design handoff README). */
@import url('brand-fonts.css');
/* Open Sans, self-hosted (fonts/) — was a Google Fonts @import, blocked by the
   fleet-wide CSP's style-src/font-src (no fonts.googleapis.com/fonts.gstatic.com). */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/OpenSans-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/OpenSans-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/OpenSans-600-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/OpenSans-600-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/OpenSans-700-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/OpenSans-700-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/OpenSans-800-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/OpenSans-800-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* ---- Brand tokens (design handoff, final and exact) ---- */
    --navy-900:   #0F1E3D;   /* app chrome, header band, display type on light */
    --navy-800:   #17294C;   /* inverted panel fill (Money group, navy rail panel) */
    --navy-600:   #26375C;   /* hairline on navy; avatar chip fill */
    --navy-500:   #3D4F73;   /* secondary button border on navy */
    --navy-300:   #8FA0BF;   /* mono labels / inactive nav on navy */
    --navy-200:   #A9B5CC;   /* body copy on navy */
    --orange-500: #EE7734;   /* accent FILL only — never text on light */
    --orange-700: #A8480F;   /* orange as text/links on light (AA) */
    --green-500:  #4FC48C;   /* realized/measured figures ONLY */
    --bone-100:   #F4F1EA;   /* app canvas; type on navy */
    --sand-300:   #DCD6C9;   /* hairline on light surfaces */
    --sand-200:   #EDE8DC;   /* list-row divider inside white cards */
    --stone-600:  #6E6A5E;   /* mono labels on light (contrast floor) */
    --stone-500:  #7C7768;   /* secondary/sub copy on light */
    --navy-hover: #1D3157;   /* navy tile/skeleton hover state */
    --font-display: 'Archivo', sans-serif;
    --font-body:    'IBM Plex Sans', sans-serif;
    --font-mono:    'IBM Plex Mono', monospace;
    --t-fast: 130ms ease-out;

    /* ---- Legacy tokens (module pages pending conversion) ---- */
    --fs-primary:      #1D4A6E;
    --fs-primary-lt:   #2A5D8A;
    --fs-primary-dk:   #0D2035;
    --fs-accent:       #E05C2A;
    --fs-accent-hover: #C94D1F;
    --bg:              #EEF1F6;
    --surface:         #FFFFFF;
    --border:          #D8E0EA;
    --text:            #1D2235;
    --text-mid:        #4A5568;
    --text-light:      #8A97AA;
    --shadow-sm:       0 1px 4px rgba(29, 74, 110, 0.08);
    --shadow:          0 3px 16px rgba(29, 74, 110, 0.12);
    --radius:          12px;
    --success:         #16A34A;
    --warning:         #F59E0B;
    --danger:          #DC2626;
}

html, body { min-height: 100vh; font-family: 'Open Sans', sans-serif; background: var(--bone-100); color: var(--text); }

main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
main.wide { max-width: min(1700px, 96vw); }

/* ---------- Hero banner ---------- */
.hero {
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-dk) 100%);
    color: white; border-radius: 16px; padding: 28px 32px; margin-bottom: 28px;
    position: relative; overflow: hidden;
}
.hero::after {
    content: '🌄'; position: absolute; right: 36px; top: 50%;
    transform: translateY(-50%); font-size: 84px; opacity: 0.14;
}
.hero h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.01em; }
.hero h1 .accent { color: var(--fs-accent); }
.hero p { font-size: 14px; opacity: 0.85; max-width: 620px; line-height: 1.55; }
.hero .tag {
    display: inline-block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    background: rgba(255,255,255,0.15); padding: 4px 10px;
    border-radius: 999px; margin-bottom: 10px;
}

/* ---------- Section header ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 14px; }
.section-head h2 { font-size: 16px; font-weight: 800; color: var(--text); }
.section-head .hint { font-size: 12px; color: var(--text-light); }

/* ---------- KPI grid (Dashboard) ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi-card {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
    display: block; text-decoration: none; color: inherit; cursor: pointer;
}
.kpi-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--fs-primary); line-height: 1.1; }
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-top: 4px; }
.kpi-sub   { font-size: 12px; color: var(--text-mid); margin-top: 4px; }

/* ---------- Tile grid (Products) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile {
    background: var(--surface); border: 0.5px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow-sm); transition: all 0.15s;
    text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--fs-accent); }
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile-title { font-size: 15px; font-weight: 800; color: var(--text); }
.tile-meta  { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.tile-body  { font-size: 13px; color: var(--text-mid); line-height: 1.5; }
.tile-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 0.5px solid var(--border); }
.tile-price { font-size: 13px; font-weight: 700; color: var(--fs-primary); }
.tile-link  { font-size: 12px; font-weight: 600; color: var(--fs-accent); text-decoration: none; }
.tile-link:hover { text-decoration: underline; }

/* ---------- Stage badge (Products) ---------- */
.stage {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    flex-shrink: 0;
}
.stage.idea       { background: #f1f5f9; color: #475569; }
.stage.sketched   { background: #ede9fe; color: #6d28d9; }
.stage.poc        { background: #fef3c7; color: #92400e; }
.stage.demoed     { background: #fed7aa; color: #9a3412; }
.stage.approved   { background: #dbeafe; color: #1d4ed8; }
.stage.building   { background: #fef9c3; color: #854d0e; }
.stage.live       { background: #dcfce7; color: #15803d; }
.stage.shelved    { background: #fee2e2; color: #b91c1c; }

/* Published-on-LLC chip */
.pub-chip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
            background: var(--fs-accent); color: white; }

/* ---------- Buttons ---------- */
.btn {
    padding: 8px 14px; border-radius: 6px; border: 1px solid transparent;
    font-size: 14px; cursor: pointer; font-weight: 600; font-family: inherit;
    text-decoration: none; display: inline-block; transition: all 0.15s;
}
.btn-primary   { background: var(--fs-primary); color: #fff; border-color: var(--fs-primary); }
.btn-primary:hover { background: var(--fs-primary-lt); }
.btn-accent    { background: var(--fs-accent); color: #fff; border-color: var(--fs-accent); }
.btn-accent:hover { background: var(--fs-accent-hover); }
.btn-secondary { background: #fff; color: var(--text-mid); border-color: var(--border); }
.btn-secondary:hover { background: #F1F5F9; }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Top navigation (brand system: navy bar, scrolling tab row) ---------- */
.topnav {
    background: var(--navy-900); border-bottom: 1px solid var(--navy-600);
    height: 60px; padding: 0 32px;
    display: flex; align-items: stretch; gap: 24px;
}
.topnav .brand {
    flex-shrink: 0; display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--bone-100);
    font-family: var(--font-display); font-weight: 700; font-size: 15.5px;
    letter-spacing: 0.01em; white-space: nowrap;
}
.topnav .brand-mark { width: 12px; height: 12px; background: var(--orange-500); display: inline-block; flex-shrink: 0; }
.topnav .tab-row {
    flex: 1; min-width: 0; overflow-x: auto;
    display: flex; align-items: stretch; gap: 2px;
    list-style: none; margin: 0; padding: 0;
    scrollbar-width: none;
}
.topnav .tab-row::-webkit-scrollbar { display: none; }
.topnav .tab {
    display: block; padding: 19px 10px 17px;
    font-family: var(--font-body); font-weight: 500; font-size: 13px;
    letter-spacing: 0.01em; white-space: nowrap; cursor: pointer;
    text-decoration: none; color: var(--navy-300);
    border-bottom: 3px solid transparent;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.topnav .tab:hover { color: var(--bone-100); }
.topnav .tab.active { color: var(--bone-100); border-bottom-color: var(--orange-500); }
.topnav .nav-user { flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.topnav .nav-user-name {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--navy-300);
}
.topnav .nav-avatar {
    width: 28px; height: 28px; background: var(--navy-600); color: var(--bone-100);
    font-family: var(--font-display); font-weight: 700; font-size: 11.5px;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; background: var(--surface);
             border: 0.5px solid var(--border); border-radius: var(--radius); overflow: hidden;
             box-shadow: var(--shadow-sm); }
table.data th, table.data td { padding: 11px 14px; text-align: left;
                               border-bottom: 0.5px solid var(--border); font-size: 14px; vertical-align: middle; }
table.data th { background: #F8FAFC; font-size: 12px; text-transform: uppercase;
                letter-spacing: 0.04em; color: var(--text-mid); font-weight: 700; }
table.data tbody tr:hover { background: #FAFBFD; }
table.data small { color: var(--text-light); font-size: 11px; }

/* ---------- Sub-tab bar (Knowledge tabs) ---------- */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.subtab {
    padding: 8px 14px; font-size: 13px; font-weight: 600;
    color: var(--text-mid); border: none; background: none;
    border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--fs-primary); border-bottom-color: var(--fs-accent); }

/* ---------- Empty / loading ---------- */
.empty-state { padding: 2.5rem; text-align: center; color: var(--text-light);
               background: var(--surface); border: 0.5px dashed var(--border); border-radius: var(--radius); }
.loading     { padding: 2rem; text-align: center; color: var(--text-mid); }
.spinner { display:inline-block; width:14px; height:14px;
           border:2px solid var(--border); border-top-color: var(--fs-primary);
           border-radius:50%; animation: spin 0.7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Filter row ---------- */
.filter-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-row label { font-size: 13px; color: var(--text-mid); }
.filter-row select, .filter-row input { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 18px; border-radius: 8px;
         box-shadow: 0 6px 24px rgba(0,0,0,0.15); font-size: 14px; display: none; z-index: 2000;
         font-weight: 600; }
#toast.success { background: #DCFCE7; color: #15803D; border: 1px solid #86EFAC; }
#toast.error   { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay { position: absolute; inset: 0; background: rgba(13, 32, 53, 0.6); }
.modal-content { position: relative; background: var(--surface); border-radius: var(--radius);
                 box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 90%; max-width: 540px;
                 max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between;
                padding: 14px 18px; border-bottom: 0.5px solid var(--border); background: #F8FAFC; }
.modal-header h3 { margin: 0; font-size: 16px; color: var(--fs-primary); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 24px; line-height: 1;
               color: var(--text-light); padding: 0 4px; }
.modal-close:hover { color: var(--fs-primary); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-body label { display:block; margin-top: 8px; margin-bottom: 4px;
                    font-size: 13px; font-weight: 600; color: var(--text-mid); }
.modal-body input, .modal-body select, .modal-body textarea {
    width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:6px;
    font-size:14px; box-sizing:border-box; font-family: inherit;
}
.modal-body textarea { resize: vertical; min-height: 80px; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem;
                padding: 12px 18px; border-top: 0.5px solid var(--border); background: #F8FAFC; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.modal-error { color: var(--danger); font-size: 13px; margin-bottom: .5rem; display: none; }

/* ---------- View toggle (Board / List) ---------- */
.view-toggle { display: inline-flex; gap: 0; background: var(--surface);
               border: 0.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-toggle button {
    background: transparent; border: 0; padding: 7px 14px; font-size: 12px;
    font-weight: 700; color: var(--text-mid); cursor: pointer; font-family: inherit;
}
.view-toggle button:hover { background: rgba(0,0,0,0.04); }
.view-toggle button.active { background: var(--fs-primary); color: white; }

/* ---------- Kanban board ---------- */
.kanban-board {
    display: grid; gap: 10px; overflow-x: auto; padding-bottom: 8px;
}
.kanban-col {
    background: rgba(29, 74, 110, 0.04); border: 0.5px solid var(--border);
    border-radius: 10px; padding: 10px; min-height: 220px;
    display: flex; flex-direction: column; gap: 8px;
    min-width: 280px;
}
.kanban-col-hdr {
    display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px;
    font-size: 11px; font-weight: 800; color: var(--text-mid);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.kanban-col-hdr .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #94a3b8); }
.kanban-col-hdr .count {
    margin-left: auto; background: var(--surface); padding: 2px 8px;
    border-radius: 999px; font-size: 11px; color: var(--text); border: 0.5px solid var(--border);
}
.kanban-card {
    background: var(--surface); border: 0.5px solid var(--border);
    border-left: 3px solid var(--c, #94a3b8); border-radius: 6px; padding: 10px 12px;
    cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; box-shadow: var(--shadow-sm);
}
.kanban-card:hover { transform: translateY(-1px); border-color: var(--fs-accent); box-shadow: var(--shadow); }
.kanban-card .k-title { font-size: 13px; font-weight: 800; line-height: 1.3; color: var(--text); }
.kanban-card .k-meta  { font-size: 11px; color: var(--text-light); margin-top: 3px; }
.kanban-card .k-foot  { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 10px; }
.kanban-card .k-tag {
    background: rgba(29, 74, 110, 0.08); color: var(--fs-primary);
    padding: 2px 7px; border-radius: 999px; font-weight: 700; letter-spacing: 0.02em;
}
.kanban-card .k-tag.accent { background: var(--fs-accent); color: white; }
.kanban-empty { font-size: 11px; color: var(--text-light); padding: 14px 4px; text-align: center; font-style: italic; }
.k-adv {
    border: none; background: rgba(29,74,110,0.08); color: var(--fs-primary);
    font-weight: 800; border-radius: 999px; width: 20px; height: 20px; line-height: 20px;
    text-align: center; cursor: pointer; padding: 0; font-size: 12px;
}
.k-adv:hover { background: var(--fs-accent); color: white; }

/* Stage colors — Product (Roadmap) stages */
.stage-col.idea     { --c: #8A97AA; }
.stage-col.sketched { --c: #00AAE7; }
.stage-col.poc      { --c: #2A2F8F; }
.stage-col.demoed   { --c: #F7921E; }
.stage-col.approved { --c: #82C341; }
.stage-col.building { --c: #21A179; }
.stage-col.live     { --c: #4F7A1F; }
.stage-col.shelved  { --c: #545D6A; }

/* Stage colors — Project (engagement) stages */
.stage-col.prospect   { --c: #8A97AA; }
.stage-col.proposal   { --c: #00AAE7; }
.stage-col.engaged    { --c: #2A2F8F; }
.stage-col.delivering { --c: #F7921E; }
.stage-col.delivered  { --c: #82C341; }
.stage-col.ongoing    { --c: #21A179; }
.stage-col.closed     { --c: #545D6A; }

/* ---------- Conference tile (variation on .tile with ROI line) ---------- */
.conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.conf-tile {
    background: var(--surface); border: 0.5px solid var(--border); border-left: 3px solid var(--fs-accent);
    border-radius: var(--radius); padding: 16px 18px;
    box-shadow: var(--shadow-sm); cursor: pointer;
    display: flex; flex-direction: column; gap: 8px; transition: all 0.15s;
}
.conf-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-left-color: var(--fs-primary); }
.conf-tile.past { border-left-color: #94a3b8; opacity: 0.85; }
.conf-tile.past:hover { border-left-color: var(--fs-primary); opacity: 1; }
.conf-tile .ct-title { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; }
.conf-tile .ct-when  { font-size: 12px; color: var(--text-mid); }
.conf-tile .ct-where { font-size: 12px; color: var(--text-light); }
.conf-tile .ct-roi {
    display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px;
    border-top: 0.5px solid var(--border); font-size: 11px;
}
.conf-tile .ct-roi .ct-stat .v { font-size: 16px; font-weight: 800; color: var(--fs-primary); }
.conf-tile .ct-roi .ct-stat .k { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }

/* Lead status pills */
.lead-pill { display: inline-block; padding: 2px 9px; border-radius: 999px;
             font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.lead-pill.new       { background: #DBEAFE; color: #1D4ED8; }
.lead-pill.contacted { background: #FEF3C7; color: #92400E; }
.lead-pill.qualified { background: #FED7AA; color: #9A3412; }
.lead-pill.converted { background: #DCFCE7; color: #15803D; }
.lead-pill.dead      { background: #FEE2E2; color: #B91C1C; }

/* Invoice + receipt status pills (reuse lead-pill base style) */
.inv-pill { display: inline-block; padding: 2px 9px; border-radius: 999px;
            font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.inv-pill.draft    { background: #F1F5F9; color: #475569; }
.inv-pill.sent     { background: #DBEAFE; color: #1D4ED8; }
.inv-pill.paid     { background: #DCFCE7; color: #15803D; }
.inv-pill.overdue  { background: #FEE2E2; color: #B91C1C; }
.inv-pill.void     { background: #E5E5E5; color: #6B7280; }
.inv-pill.uncategorized { background: #FEF3C7; color: #92400E; }
.inv-pill.categorized   { background: #DBEAFE; color: #1D4ED8; }
.inv-pill.matched       { background: #DCFCE7; color: #15803D; }
.inv-pill.personal      { background: #E5E5E5; color: #6B7280; }

/* Sub-tab bar variant for accounting (vertical inside main, not pinned) */
.acct-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.acct-subtab {
    padding: 10px 16px; font-size: 13px; font-weight: 700;
    color: var(--text-mid); border: none; background: none;
    border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.acct-subtab:hover { color: var(--text); }
.acct-subtab.active { color: var(--fs-primary); border-bottom-color: var(--fs-accent); }

/* P&L summary card */
.pnl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pnl-card { background: var(--surface); border: 0.5px solid var(--border);
            border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.pnl-card .v { font-size: 24px; font-weight: 800; line-height: 1.1; }
.pnl-card .l { font-size: 11px; color: var(--text-light); margin-top: 4px;
               text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.pnl-card .v.green  { color: #15803D; }
.pnl-card .v.amber  { color: #92400E; }
.pnl-card .v.red    { color: #B91C1C; }
.pnl-card .v.navy   { color: var(--fs-primary); }

/* Reconcile pair view */
.recon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.recon-col h4 { font-size: 13px; font-weight: 800; color: var(--fs-primary);
                margin-bottom: 8px; display: flex; justify-content: space-between; }
.recon-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
             background: var(--surface); border: 0.5px solid var(--border);
             border-radius: 6px; margin-bottom: 6px; font-size: 13px; }
.recon-row.matched { border-color: #82C341; background: #F0FDF4; }
.recon-row .when { font-size: 11px; color: var(--text-light); width: 80px; flex-shrink: 0; }
.recon-row .merch { font-weight: 700; flex: 1; }
.recon-row .amt { font-weight: 800; color: var(--text); }
.recon-row .actions { display: flex; gap: 4px; }
.recon-row.selectable { cursor: pointer; }
.recon-row.selectable:hover { border-color: var(--fs-accent); }
.recon-row.selected { border-color: var(--fs-accent); background: rgba(224, 92, 42, 0.06); box-shadow: 0 0 0 1px var(--fs-accent); }

/* Sub-section header inside the conference detail modal */
.sub-section { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.sub-section h4 { font-size: 13px; font-weight: 800; color: var(--fs-primary); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }

/* ---------- Article reader ---------- */
.article-reader { background: var(--surface); border-radius: var(--radius);
                  padding: 32px 36px; box-shadow: var(--shadow-sm); border: 0.5px solid var(--border); }
.article-reader h1 { font-size: 26px; font-weight: 800; color: var(--fs-primary); margin-bottom: 8px; }
.article-reader .meta { font-size: 12px; color: var(--text-light); margin-bottom: 22px; }
.article-reader .body { font-size: 15px; line-height: 1.7; color: var(--text); }
.article-reader .body p { margin-bottom: 14px; }
.article-reader .body h2 { font-size: 19px; margin: 20px 0 10px; color: var(--fs-primary); }
.article-reader .body h3 { font-size: 16px; margin: 16px 0 8px; color: var(--fs-primary-lt); }

/* ---------- Mobile / narrow-viewport pass ----------
   Targeted fixes, not a full redesign: tables scroll inside `main` instead of
   dragging the fixed topnav off-screen with them; two-column forms collapse to
   one; the smallest tap targets (row action buttons, kanban quick-advance
   chips) grow to a thumb-friendly size. */
@media (max-width: 700px) {
    main { overflow-x: auto; }
    table.data { min-width: 640px; }
    .form-row-2 { grid-template-columns: 1fr; }
    .btn-sm { padding: 7px 12px; font-size: 13px; min-height: 30px; }
    .k-adv { width: 30px; height: 30px; line-height: 30px; font-size: 14px; }
    .recon-grid { grid-template-columns: 1fr; }
}
.article-reader .body ul, .article-reader .body ol { margin: 0 0 14px 24px; }

/* ==========================================================================
   Brand layer — page header band + Dashboard (2026-07 restyle)
   Squared corners and hairline borders only; no box-shadow, no transform.
   ========================================================================== */

/* ---------- Page header band (every route) ---------- */
.page-head { background: var(--navy-900); }
.page-head-inner {
    max-width: 1560px; margin: 0 auto; padding: 34px 32px 36px;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 48px; flex-wrap: wrap;
}
.page-head-left { display: flex; flex-direction: column; gap: 14px; }
.page-eyebrow {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.20em;
    text-transform: uppercase; color: var(--orange-500);
}
.page-head h1 {
    font-family: var(--font-display); font-weight: 800; font-size: 34px;
    letter-spacing: -0.035em; line-height: 1.06; color: var(--bone-100);
}
.page-sub {
    font-family: var(--font-body); font-size: 15px; line-height: 1.55;
    color: var(--navy-200); max-width: 620px; text-wrap: pretty;
}
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-band-primary {
    background: var(--orange-500); color: var(--navy-900); border: none; border-radius: 0;
    font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
    padding: 12px 18px; text-decoration: none; display: inline-block; cursor: pointer;
    transition: background-color var(--t-fast);
}
.btn-band-primary:hover { background: var(--bone-100); }
.btn-band-secondary {
    background: transparent; color: var(--bone-100); border: 1px solid var(--navy-500); border-radius: 0;
    font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
    padding: 11px 18px; text-decoration: none; display: inline-block; cursor: pointer;
    transition: border-color var(--t-fast);
}
.btn-band-secondary:hover { border-color: var(--bone-100); }

/* ---------- Dashboard layout ---------- */
.dash-wrap {
    max-width: 1560px; margin: 0 auto; padding: 36px 32px 56px;
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px;
    align-items: start;
}
.dash-left { display: flex; flex-direction: column; gap: 32px; min-width: 0; }

.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.group-head .g-label {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--stone-600);
}
.group-head .g-rule { flex: 1; height: 1px; background: var(--sand-300); }

/* Metric grid — each cell owns its background + right/bottom hairline, the
   container supplies top/left. Empty slots in the last row stay invisible;
   never draw hairlines with a background-plus-gap trick. */
.metric-grid { display: grid; gap: 0; border: 1px solid var(--sand-300); border-right: none; border-bottom: none; }
.metric-grid.g-attention { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.metric-grid.g-money     { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-color: var(--navy-600); }
.metric-grid.g-pipeline  { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.metric-tile {
    display: flex; flex-direction: column; gap: 7px; padding: 22px 24px;
    background: #FFFFFF; border-right: 1px solid var(--sand-300); border-bottom: 1px solid var(--sand-300);
    text-decoration: none; transition: background-color var(--t-fast);
}
a.metric-tile:hover { background: var(--bone-100); }
.metric-tile .m-value {
    font-family: var(--font-display); font-weight: 800; font-size: 32px;
    letter-spacing: -0.035em; line-height: 1; color: var(--navy-900);
}
.g-pipeline .metric-tile .m-value { font-size: 30px; }
.metric-tile .m-label {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--stone-600);
}
.metric-tile .m-sub { font-family: var(--font-body); font-size: 13.5px; line-height: 1.4; color: var(--stone-500); }

.g-money .metric-tile { background: var(--navy-800); border-right-color: var(--navy-600); border-bottom-color: var(--navy-600); padding: 24px; }
.g-money a.metric-tile:hover { background: var(--navy-hover); }
.g-money .metric-tile .m-value { color: var(--bone-100); }
.g-money .metric-tile .m-label { color: var(--navy-300); }
.g-money .metric-tile .m-sub   { color: var(--navy-200); }

/* Realized/measured figures only (MTD Net, ROI realized) */
.m-value.realized { color: var(--green-500) !important; }
/* Absent data (not zero) */
.absent { color: var(--stone-500); }

/* ---------- Right rail ---------- */
.dash-rail { display: flex; flex-direction: column; gap: 24px; }
.rail-panel { background: #FFFFFF; border: 1px solid var(--sand-300); }
.rail-head {
    padding: 16px 20px; border-bottom: 1px solid var(--sand-300);
    display: flex; justify-content: space-between; align-items: center;
}
.rail-head .r-label {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--navy-900);
}
.rail-alert-dot { width: 8px; height: 8px; background: var(--orange-500); flex-shrink: 0; }
.rail-empty { padding: 28px 20px; display: flex; flex-direction: column; gap: 8px; }
.rail-empty h3 {
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
    letter-spacing: -0.02em; color: var(--navy-900);
}
.rail-empty p { font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--stone-500); }

.rail-item {
    display: flex; gap: 10px; align-items: baseline; padding: 14px 20px;
    border-bottom: 1px solid var(--sand-200); text-decoration: none;
    transition: background-color var(--t-fast);
}
.rail-item:last-child { border-bottom: none; }
.rail-item:hover { background: var(--bone-100); }
.rail-item .ri-date {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--stone-600); min-width: 56px; flex-shrink: 0;
}
.rail-item .ri-title { font-family: var(--font-body); font-size: 14px; color: var(--navy-900); flex: 1; }

.jump-row {
    display: flex; justify-content: space-between; align-items: baseline; padding: 14px 20px;
    border-bottom: 1px solid var(--sand-200); text-decoration: none;
    transition: background-color var(--t-fast);
}
.jump-row:last-child { border-bottom: none; }
.jump-row:hover { background: var(--bone-100); }
.jump-row .j-label { font-family: var(--font-body); font-size: 14px; color: var(--navy-900); }
.jump-row .j-count { font-family: var(--font-mono); font-size: 12px; color: var(--stone-600); }
.jump-row .j-count.action { color: var(--orange-700); }

/* ---------- Loading skeletons (tile-sized blocks, no spinners) ---------- */
.skel { display: inline-block; width: 64px; height: 1em; background: var(--sand-200); }
.g-money .skel { background: var(--navy-hover); }

/* ---------- Keyboard focus (restyled surfaces) ---------- */
.topnav a:focus-visible, .page-head a:focus-visible, .page-head button:focus-visible,
.g-money a.metric-tile:focus-visible {
    outline: 2px solid var(--bone-100); outline-offset: 2px;
}
.dash-wrap a:focus-visible, .dash-wrap button:focus-visible {
    outline: 2px solid var(--orange-500); outline-offset: 2px;
}
.g-money a.metric-tile:focus-visible { outline-color: var(--bone-100); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .dash-wrap { grid-template-columns: 1fr; }
}
