/* filings.css — the Surety Filings tab (#89 M2b): a live SEC EDGAR filings browser + "ask about
   this". The financial WORKFLOW stays the primary plane; this tab lets a user look up a public
   company's recent filings and hand any of them to the inline Syndex dock for a grounded, cited
   answer. Palette matches the app shell (cyan accent on dark). */

/* The Data/Evidence tabs are <button>s so they can toggle client-side; reset button chrome but
   re-assert the transparent bottom border so .app-tab.active's cyan underline still wins on
   specificity. Do NOT set `font`/`line-height` here: the `font` shorthand would clobber .app-tab's
   own font-size (13px) — element+class beats the class alone — making these buttons render larger
   than the Workflow <a> link. Omitting font lets .app-tab's Inter/13px/500 win over the UA button
   default (a class selector outranks the element-level UA rule), matching the nav links exactly. */
button.app-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

/* #filings-content is the full-width lane; .fil-inner is the centered readable column. Splitting
   them lets the column RE-CENTER within the remaining space when the dock opens (the lane gets a
   right margin; the inner column centers inside the narrowed lane) — instead of margin:auto fighting
   a pinned margin-right and shoving the content against the dock. */
/* #filings-content is its own scroll container (the app locks body to 100vh + overflow:hidden and
   scrolls inner panels — mirrors #financial-content), so a long filings list scrolls even with the
   dock open. The dock-open margin-right narrows this lane; .fil-inner re-centers inside it. */
#filings-content, #evidence-content {
    flex: 1;
    overflow-y: auto;
    padding: 26px 30px 60px;
    position: relative;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}
#filings-content::-webkit-scrollbar, #evidence-content::-webkit-scrollbar { width: 5px; }
#filings-content::-webkit-scrollbar-thumb, #evidence-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.fil-inner { max-width: 1100px; margin: 0 auto; }
.fil-intro { margin-bottom: 18px; }

/* Data-tab header: title + "?" help + "Manage in Syndex ↗" (the bridge to the management layer). */
.fil-intro-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.fil-help-btn {
    width: 18px; height: 18px; line-height: 15px; text-align: center; padding: 0; margin-left: 9px;
    border-radius: 50%; border: 1px solid rgba(120, 134, 160, 0.3); background: none; color: #8c97ab;
    font-size: 11px; font-weight: 600; cursor: pointer; vertical-align: middle;
}
.fil-help-btn:hover { color: #00c8ff; border-color: rgba(0, 200, 255, 0.4); }
.fil-manage { font-family: 'Inter', sans-serif; font-size: 12px; color: #00c8ff; text-decoration: none; white-space: nowrap; }
.fil-manage:hover { text-decoration: underline; }
.fil-help {
    margin-top: 12px; padding: 14px 16px; max-width: 760px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(120, 134, 160, 0.18); border-radius: 10px;
    font-size: 12.5px; color: #b9c6d8; line-height: 1.5;
}
.fil-help[hidden] { display: none; }
.fil-help p { margin: 0 0 8px; }
.fil-help p:last-child { margin-bottom: 0; }
.fil-help strong { color: #e8ecf4; }
.fil-help ul { margin: 6px 0 8px; padding-left: 18px; }
.fil-help li { margin: 3px 0; }
.fil-help-note { color: #8c97ab; border-top: 1px solid rgba(120, 134, 160, 0.12); padding-top: 8px; }
.fil-help a { color: #00c8ff; text-decoration: none; }
.fil-help a:hover { text-decoration: underline; }

/* Per-source info bar (situational awareness, read-only): name · what it provides · live host. */
.fil-srcinfo { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px; }
.fil-srcinfo-name { color: #cfe3ff; font-weight: 600; }
.fil-srcinfo-desc { color: #8c97ab; }
.fil-srcinfo-live {
    margin-left: auto; font-size: 10.5px; color: #6fd3a8; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    background: rgba(111, 211, 168, 0.08); border: 1px solid rgba(111, 211, 168, 0.2); border-radius: 5px; padding: 1px 7px;
}

.fil-search { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fil-input {
    flex: 1; min-width: 220px; background: #06070d; border: 1px solid rgba(120, 134, 160, 0.22);
    border-radius: 8px; color: #e0e8f0; font-family: 'Inter', sans-serif; font-size: 14px;
    padding: 10px 13px; outline: none;
}
.fil-input:focus { border-color: rgba(0, 200, 255, 0.35); }
.fil-input::placeholder { color: #3a4a5a; }
.fil-form-filter {
    background: #06070d; border: 1px solid rgba(120, 134, 160, 0.22); border-radius: 8px;
    color: #cfd6e4; font-family: 'Inter', sans-serif; font-size: 13px; padding: 0 10px;
}
.fil-btn {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2), rgba(120, 80, 255, 0.2));
    border: 1px solid rgba(0, 200, 255, 0.3); color: #00c8ff; border-radius: 8px;
    padding: 0 20px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
}
.fil-btn:hover { background: linear-gradient(135deg, rgba(0, 200, 255, 0.3), rgba(120, 80, 255, 0.3)); }

.fil-status { font-size: 12.5px; color: #8c97ab; min-height: 18px; margin-bottom: 12px; }
.fil-status-ok { color: #6fd3a8; }
.fil-status-warn { color: #ffaa30; }
.fil-status-err { color: #ff8da3; }

.fil-context {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.05), rgba(120, 80, 255, 0.05));
    border: 1px solid rgba(0, 200, 255, 0.18); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.fil-ctx-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fil-ctx-co { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 500; color: #e8ecf4; }
.fil-ctx-meta { font-size: 12px; color: #8c97ab; }
.fil-ctx-figs { display: flex; gap: 26px; margin: 12px 0 4px; flex-wrap: wrap; }
.fil-fig { display: flex; flex-direction: column; gap: 2px; }
.fil-fig-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: #6b7689; }
.fil-fig-v { font-size: 18px; font-weight: 600; color: #cfe3ff; font-family: 'Outfit', sans-serif; }
.fil-ctx-src { font-size: 10.5px; color: #5a6678; margin-top: 8px; }

.fil-results { display: flex; flex-direction: column; gap: 7px; }
.fil-rowwrap {
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(120, 134, 160, 0.14); border-radius: 9px;
}
.fil-row {
    display: grid; grid-template-columns: 70px 1fr auto auto auto; align-items: center; gap: 14px;
    padding: 10px 14px;
}
.fil-form { font-weight: 600; color: #cfe3ff; font-size: 13px; }
.fil-dates { font-size: 12.5px; color: #b9c6d8; }
.fil-dates b { color: #e0e8f0; font-weight: 600; }
.fil-acc { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 11px; color: #7c8aa0; }
.fil-ask, .fil-ask-co {
    background: rgba(0, 200, 255, 0.08); border: 1px solid rgba(0, 200, 255, 0.22); color: #00c8ff;
    border-radius: 6px; padding: 4px 12px; cursor: pointer; font-family: 'Inter', sans-serif;
    font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.fil-ask:hover, .fil-ask-co:hover { background: rgba(0, 200, 255, 0.16); }
.fil-ask-co { margin-top: 12px; }

@media (max-width: 640px) {
    .fil-row { grid-template-columns: 56px 1fr auto; }
    .fil-acc, .fil-fig-btn, .fil-fig-spacer { display: none; }
}

/* --- M2b: source selector + panels --- */
.fil-sources { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.fil-src {
    font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 500; cursor: pointer;
    color: #8c97ab; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(120, 134, 160, 0.2);
    border-radius: 7px; padding: 6px 14px; transition: all 0.15s;
}
.fil-src:hover { color: #e8ecf4; border-color: rgba(0, 200, 255, 0.3); }
.fil-src.active {
    color: #00c8ff; border-color: rgba(0, 200, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.12), rgba(120, 80, 255, 0.12));
}
.fil-panel[hidden] { display: none; }

/* --- EDGAR per-filing [Figures] (period-targeted, inline) --- */
.fil-fig-btn, .fil-fig-spacer { justify-self: end; }
.fil-fig-btn {
    background: none; border: 1px solid rgba(120, 134, 160, 0.22); color: #9fb2c8;
    border-radius: 6px; padding: 4px 10px; cursor: pointer; font-family: 'Inter', sans-serif;
    font-size: 11.5px; white-space: nowrap;
}
.fil-fig-btn:hover { color: #cfe3ff; border-color: rgba(0, 200, 255, 0.3); }
.fil-figs:not(:empty) {
    display: flex; flex-wrap: wrap; gap: 6px 18px;
    padding: 10px 14px 12px; border-top: 1px solid rgba(120, 134, 160, 0.1);
}
.fil-figrow { display: flex; flex-direction: column; gap: 1px; }
.fil-figrow-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7689; }
.fil-figrow-v { font-size: 13px; font-weight: 600; color: #cfe3ff; }

/* --- Treasury panel --- */
.fil-stat-row { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 14px; }
.fil-stat { display: flex; flex-direction: column; gap: 2px; }
.fil-stat-v { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 600; color: #cfe3ff; }
.fil-stat-sub { font-size: 11px; color: #6b7689; }
.fil-rates { margin-bottom: 14px; }
.fil-rate {
    display: flex; justify-content: space-between; max-width: 460px;
    padding: 5px 0; border-bottom: 1px solid rgba(120, 134, 160, 0.1); font-size: 13px; color: #b9c6d8;
}
.fil-rate-v { color: #cfe3ff; font-weight: 600; }

/* --- Federal Register feed --- */
.fil-fr-row {
    display: grid; grid-template-columns: 110px 1fr auto; align-items: start; gap: 14px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(120, 134, 160, 0.14);
    border-radius: 9px; padding: 11px 14px; margin-bottom: 7px;
}
.fil-fr-type {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
    color: #9fe0ff; background: rgba(0, 200, 255, 0.08); border: 1px solid rgba(0, 200, 255, 0.16);
    border-radius: 5px; padding: 2px 7px; white-space: nowrap; justify-self: start;
}
.fil-fr-title { font-size: 13px; color: #e0e8f0; line-height: 1.4; }
.fil-fr-meta { font-size: 11.5px; color: #6b7689; margin-top: 3px; }
.fil-fr-meta a { color: #00c8ff; text-decoration: none; }
.fil-fr-meta a:hover { text-decoration: underline; }
@media (max-width: 640px) {
    .fil-fr-row { grid-template-columns: 1fr auto; }
    .fil-fr-type { grid-column: 1 / -1; }
}
/* On wide screens, push the Filings content when the dock is open (mirrors #financial-content). */
@media (min-width: 1200px) {
    body.dock-open #filings-content, body.dock-open #evidence-content { margin-right: 392px; }
}

/* --- M4: Evidence tab (acting plane, read side) --- */
.ev-list { display: flex; flex-direction: column; gap: 7px; }
.ev-row {
    display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 14px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(120, 134, 160, 0.14);
    border-radius: 9px; padding: 11px 14px;
}
.ev-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ev-title { font-size: 13.5px; font-weight: 600; color: #e8ecf4; }
.ev-row-filing { font-size: 11.5px; color: #6b7689; }
.ev-row-meta { font-size: 12px; color: #8c97ab; white-space: nowrap; }
.ev-gap { color: #ffaa30; }
.ev-badge {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
    border-radius: 5px; padding: 2px 7px; white-space: nowrap;
}
.ev-badge-ok { color: #6fd3a8; background: rgba(111, 211, 168, 0.08); border: 1px solid rgba(111, 211, 168, 0.22); }
.ev-badge-active { color: #00c8ff; background: rgba(0, 200, 255, 0.08); border: 1px solid rgba(0, 200, 255, 0.2); }
.ev-badge-draft, .ev-badge-open { color: #9fb2c8; background: rgba(120, 134, 160, 0.08); border: 1px solid rgba(120, 134, 160, 0.22); }
.ev-badge-gap { color: #ffaa30; background: rgba(255, 170, 48, 0.08); border: 1px solid rgba(255, 170, 48, 0.25); }

.ev-detail { margin-top: 16px; }
.ev-back { background: none; border: none; color: #00c8ff; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 12px; padding: 0 0 10px; }
.ev-back:hover { text-decoration: underline; }
.ev-detail-head { display: flex; align-items: baseline; gap: 12px; }
.ev-detail-meta { font-size: 12px; color: #8c97ab; margin: 4px 0 14px; }
.ev-items { display: flex; flex-direction: column; gap: 8px; }
.ev-item { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(120, 134, 160, 0.14); border-radius: 9px; padding: 11px 14px; }
.ev-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ev-item-req { font-size: 13px; color: #e0e8f0; font-weight: 500; }
.ev-item-cite { font-size: 11.5px; color: #9fe0ff; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.ev-ref { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 6px 0 0 6px; font-size: 12px; color: #b9c6d8; }
.ev-ref-desc { color: #cfd6e4; }
.ev-ref-src { color: #9fb2c8; }
.ev-ref-cap { margin-left: auto; font-size: 11px; color: #6b7689; white-space: nowrap; }
.ev-noref { font-size: 11.5px; color: #6b7689; font-style: italic; padding: 4px 0 0 6px; }

/* --- Capture flow: write-action buttons (violet-tinted, distinct from the cyan read "Ask") --- */
.fil-cap-btn {
    background: linear-gradient(135deg, rgba(120, 80, 255, 0.16), rgba(0, 200, 255, 0.12));
    border: 1px solid rgba(120, 80, 255, 0.32); color: #c7b8ff;
    border-radius: 6px; padding: 5px 12px; cursor: pointer; font-family: 'Inter', sans-serif;
    font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.fil-cap-btn:hover { background: linear-gradient(135deg, rgba(120, 80, 255, 0.26), rgba(0, 200, 255, 0.18)); color: #e0d8ff; }
.fil-figs .fil-cap-btn { flex-basis: 100%; margin-top: 8px; }
.fil-ctx-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.fil-ctx-actions .fil-ask-co, .fil-ctx-actions .fil-cap-co { margin-top: 0; }

.ev-actions { margin-top: 14px; }
.ev-compile-btn {
    background: linear-gradient(135deg, rgba(120, 80, 255, 0.16), rgba(0, 200, 255, 0.12));
    border: 1px solid rgba(120, 80, 255, 0.32); color: #c7b8ff;
    border-radius: 7px; padding: 7px 16px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
}
.ev-compile-btn:hover { background: linear-gradient(135deg, rgba(120, 80, 255, 0.26), rgba(0, 200, 255, 0.18)); color: #e0d8ff; }
.ev-compiled-note { font-size: 12px; color: #6fd3a8; }
.ev-new-btn { background: none; border: none; font: inherit; cursor: pointer; }
@media (max-width: 640px) {
    .ev-row { grid-template-columns: 1fr auto; }
    .ev-row-meta { grid-column: 1 / -1; white-space: normal; }
}
