/* Comparables in the Find visual system (public/screener.html): same tokens,
   type scale, tabs, sector chips, .stbl table and footer. Scoped to this page. */
:root{
 --navy:#1b2642;--gold:#b88b47;--gold-lt:#d4aa6a;--gold-dim:rgba(184,139,71,0.10);--gold-rule:rgba(184,139,71,0.30);
 --cream:#f5f1eb;--white:#ffffff;--ink:#1b2642;--gray-mid:#8a9098;--gray-txt:#606060;
 --green:#2a7a56;--red:#9b2335;--amber:#b8860b;--rule:rgba(27,38,66,0.09);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:var(--cream);color:var(--ink);font-family:'Archivo','Helvetica Neue',sans-serif;font-size:14px;line-height:1.5;min-height:100vh;display:flex;flex-direction:column}
button,input,textarea{font-family:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
button:disabled{opacity:.5;cursor:not-allowed}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
a{color:var(--gold)}
.skip{position:fixed;top:-100px;left:0;padding:12px;background:var(--white);z-index:1100}
.skip:focus{top:0}

/* HEADER — identical to Find */
header{background:var(--navy);border-bottom:2px solid var(--gold);padding:0 48px;display:flex;align-items:center;min-height:64px;justify-content:space-between}
.logo{font-size:20px;font-weight:700;color:var(--white);text-decoration:none}.logo span{color:var(--gold);font-weight:300}
.hnav{display:flex;gap:8px}
.hnav a{font-size:10px;font-weight:500;letter-spacing:0.18em;text-transform:uppercase;padding:8px 16px;color:rgba(255,255,255,0.5);text-decoration:none;border:1px solid transparent;transition:all .2s}
.hnav a:hover{color:var(--gold);border-color:var(--gold-rule)}
.hnav a.active{color:var(--gold);border-color:var(--gold)}

/* PAGE HEADING */
main{width:100%;max-width:1500px;margin:0 auto;padding:36px 48px 60px;flex:1}
.slbl{font-size:9px;font-weight:500;letter-spacing:0.25em;text-transform:uppercase;color:var(--gold);margin-bottom:8px;display:flex;align-items:center;gap:10px}
.slbl::before{content:'';display:block;width:16px;height:1px;background:var(--gold)}
h1{font-size:26px;font-weight:700;letter-spacing:-0.02em;color:var(--navy);margin-bottom:4px}
.sub{font-size:12px;color:var(--gray-mid);font-weight:300;margin-bottom:6px}
.meta{font-size:10px;color:var(--gray-mid);font-weight:300;margin-bottom:20px;font-style:italic}
.link-button{font-size:inherit;font-style:normal;font-weight:500;color:var(--gold);border-bottom:1px dotted var(--gold-rule)}
.link-button:hover{color:var(--navy)}

/* FIND MODE TABS */
.mode-tabs{display:flex;gap:0;margin-bottom:28px;border-bottom:1px solid var(--rule);overflow-x:auto;scrollbar-width:none}
.mode-tabs::-webkit-scrollbar{display:none}
.mode-tab{font-size:11px;font-weight:600;letter-spacing:0.18em;text-transform:uppercase;padding:14px 28px;border-bottom:2px solid transparent;color:var(--gray-mid);text-decoration:none;transition:all .2s;margin-bottom:-1px;white-space:nowrap}
.mode-tab:hover{color:var(--navy)}
.mode-tab.active{color:var(--gold);border-bottom-color:var(--gold)}

/* GROUP CHIPS — Sector Tracker .sector-tab */
.group-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:24px}
.group-list{display:contents}
.sector-tab{font-size:10px;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;padding:8px 18px;background:none;border:1px solid var(--rule);color:var(--gray-mid);transition:all .2s;text-align:left}
.sector-tab:hover{border-color:var(--gold-rule);color:var(--navy)}
.sector-tab.active{border-color:var(--gold);color:var(--gold);background:var(--gold-dim)}
.group-stamp{letter-spacing:0.05em;margin-left:4px;opacity:.75}
.add-group{border-style:dashed}

/* GROUP HEADER */
.sector-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 16px;margin-bottom:6px}
.sector-title-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;min-width:0}
h2{font-size:18px;font-weight:700;letter-spacing:-0.02em;color:var(--navy);overflow-wrap:anywhere}
.group-management{display:flex;gap:14px;margin-left:auto}
.group-management:empty{display:none}
.text-button{font-size:10px;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--gray-mid)}
.text-button:hover{color:var(--gold)}
.simple-caption{font-size:10px;color:var(--gray-mid);font-weight:300}
.group-meta{font-size:10px;color:var(--gray-mid);font-weight:300;font-style:italic;margin-bottom:20px}

/* VIEW TABS + TOOLBAR — .section-hdr rhythm */
.view-bar{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:12px;border-bottom:1px solid var(--rule);margin-bottom:12px}
.tabs{display:flex;flex-wrap:wrap}
.tab{font-size:10px;font-weight:600;letter-spacing:0.2em;text-transform:uppercase;padding:10px 16px 8px;border-bottom:2px solid transparent;color:var(--gray-mid);margin-bottom:-1px}
.tab:first-child{padding-left:0}
.tab:hover{color:var(--navy)}
.tab.selected{color:var(--navy);border-bottom-color:var(--gold)}
.search{display:flex;align-items:center;gap:6px;min-width:0;flex:0 1 260px;margin-bottom:6px}
.search-symbol{font-size:14px;color:var(--gray-mid)}
.search input{width:100%;min-width:0;padding:6px 10px;border:1px solid var(--rule);background:var(--white);font-size:12px;color:var(--ink);outline:none}
.search input:focus{border-color:var(--gold)}
.toolbar-note{font-size:10px;color:var(--gray-mid);font-style:italic;margin-bottom:10px}
.shortlist-feedback{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:11px;margin-bottom:10px;color:var(--gray-txt)}
.shortlist-feedback:has(#shortlist-status:empty){justify-content:flex-end}
.shortlist-feedback a{margin-left:auto;white-space:nowrap;font-size:10px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;text-decoration:none;color:var(--gold)}
.shortlist-feedback a:hover{color:var(--navy)}

/* TABLE — Sector Tracker .stbl */
.table-wrap{overflow-x:auto;overscroll-behavior-x:contain;margin-bottom:10px}
.stbl{width:100%;border-collapse:collapse;background:var(--white);border:1px solid var(--rule);font-size:12px;min-width:860px}
.stbl th{background:var(--navy);color:var(--white);font-size:8.5px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;padding:0;text-align:right;white-space:nowrap;vertical-align:bottom}
.stbl th.static{padding:10px 12px}
.stbl th button{display:block;width:100%;padding:10px 20px 8px 12px;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;text-align:inherit;position:relative}
.stbl th button:hover{background:#2a3858}
.stbl th small{display:block;font-size:8px;font-weight:400;letter-spacing:0.04em;text-transform:none;color:rgba(255,255,255,0.55);margin-top:2px}
.sort-indicator{position:absolute;right:6px;top:10px;font-size:10px;font-weight:400;opacity:0.35}
th[aria-sort="ascending"] .sort-indicator,th[aria-sort="descending"] .sort-indicator{opacity:1;color:var(--gold)}
.stbl th:first-child,.stbl th:nth-child(2){text-align:left}
.stbl td{padding:9px 12px;border-bottom:1px solid rgba(27,38,66,0.05);text-align:right;font-variant-numeric:tabular-nums;font-size:12px;vertical-align:middle}
.stbl td:first-child,.stbl td:nth-child(2){text-align:left}
.stbl tbody tr:hover{background:rgba(184,139,71,0.03)}
.stbl .ticker-cell{position:sticky;left:0;z-index:2;background:var(--white);box-shadow:2px 0 6px -3px rgba(27,38,66,0.18)}
.stbl thead th.ticker-cell{background:var(--navy);z-index:3}
.company-button{display:block;text-align:left;color:inherit}
.company-button strong{font-weight:700;font-size:13px;color:var(--navy);letter-spacing:-0.01em;border-bottom:1px dotted rgba(184,139,71,0.5)}
.company-button:hover strong{color:var(--gold)}
.company-name{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.company-note{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--amber);margin-top:2px}
.note-form{margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--rule)}
.note-form .field{margin-bottom:8px}.note-form textarea{min-height:64px}
.note-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fiscal-label,.value-date{display:block;font-size:9.5px;color:var(--gray-mid);font-weight:300;margin-top:1px}
.missing{color:var(--gray-mid)}
td[data-state="pending"] .missing{color:var(--amber)}
.stbl .shortlist-cell{text-align:right;width:1%;white-space:nowrap}
.shortlist-button{font-size:9px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;white-space:nowrap;padding:5px 12px;border:1px solid var(--navy);background:var(--navy);color:var(--white);transition:all .15s}
.shortlist-button:hover:not(:disabled){background:var(--gold);border-color:var(--gold)}
.shortlist-button:disabled{background:transparent;color:var(--gray-mid);border-color:var(--rule);opacity:1}
.panel-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;color:var(--gray-mid)}
.panel-footer button{font-size:10px;font-weight:600;letter-spacing:0.15em;text-transform:uppercase;color:var(--gold)}
.panel-footer button:hover{color:var(--navy)}
.simple-source,.refresh-window-note{font-size:10px;line-height:1.7;color:var(--gray-mid);font-style:italic;font-weight:300;margin-top:14px}
.simple-source a{color:var(--gold)}

/* STATES */
.empty{padding:40px 24px;text-align:center;background:var(--white);border:1px solid var(--rule)}
.stbl .empty{border:0}
.empty h2,.empty h3{font-size:14px;margin-bottom:8px}
.empty p{max-width:480px;margin:0 auto;font-size:12px;color:var(--gray-txt)}
.loading{font-size:11px;color:var(--gray-mid);font-style:italic}

/* FOOTER — identical to Find */
footer{background:var(--navy);padding:16px 48px;display:flex;justify-content:space-between;gap:16px;font-size:10px;color:rgba(255,255,255,0.35);letter-spacing:0.08em}

/* DIALOGS */
dialog{border:1px solid var(--rule);padding:0;width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;color:var(--ink);background:var(--white);box-shadow:0 12px 48px rgba(27,38,66,.16)}
dialog::backdrop{background:rgba(27,38,66,.4)}
dialog.drawer{margin:0 0 0 auto;width:min(520px,100%);max-width:100%;height:100dvh;max-height:100dvh;border:0;border-left:2px solid var(--gold)}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 24px;background:var(--navy);color:var(--white)}
.modal-head h2{font-size:14px;color:var(--white);letter-spacing:0}
.close{font-size:22px;min-width:40px;min-height:40px;color:rgba(255,255,255,.7);flex-shrink:0}
.close:hover{color:var(--gold)}
.modal-body{padding:20px 24px}
.modal-body p{font-size:12px;color:var(--gray-txt);margin-bottom:14px;line-height:1.7}
.field{display:block;font-size:10px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;color:var(--gray-mid);margin-bottom:14px}
.field input,.field textarea{display:block;width:100%;padding:10px 12px;margin-top:6px;border:1px solid var(--rule);background:var(--cream);font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--ink);outline:none}
.field input:focus,.field textarea:focus{border-color:var(--gold);background:var(--white)}
.field textarea{min-height:96px;resize:vertical}
.helper,.cell-reference{font-size:10.5px;color:var(--gray-mid);font-weight:300}
.error,.modal-body .error{color:var(--red)}
.button{display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;letter-spacing:0.15em;text-transform:uppercase;padding:9px 18px;border:1px solid var(--rule);background:var(--white);color:var(--navy);transition:all .15s}
.button:hover{border-color:var(--gold-rule)}
.button.primary{background:var(--navy);border-color:var(--navy);color:var(--white)}
.button.primary:hover{background:var(--gold);border-color:var(--gold)}
.button.danger{color:var(--red);border-color:rgba(155,35,53,0.4)}
.button.danger:hover{background:rgba(155,35,53,0.08)}
.group-dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.simple-section{font-size:10px;font-weight:600;letter-spacing:0.2em;text-transform:uppercase;color:var(--navy);margin:24px 0 4px;padding-bottom:8px;border-bottom:1px solid var(--rule)}
.review-line{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid rgba(27,38,66,0.05);font-size:12px}
.review-line strong{font-variant-numeric:tabular-nums;flex-shrink:0;color:var(--navy)}
.cell-reference{display:block;margin-top:2px}
.real-definitions{border-bottom:1px solid var(--rule);padding:10px 0}
.real-definitions summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--navy)}
.real-definitions p{margin-top:8px}

@media(max-width:1100px){
 main{padding:20px 16px}header{padding:0 16px}footer{padding:16px;flex-wrap:wrap}
 .stbl{font-size:11px}.stbl td{padding:7px 8px}.stbl th button{padding:8px 18px 7px 8px}.stbl th.static{padding:8px}
 .mode-tab{padding:12px 16px;font-size:10px}
}
@media(max-width:600px){
 .mode-tab{padding:12px 12px;letter-spacing:0.12em}
 .sector-tab{padding:10px 14px}
 .view-bar{align-items:stretch}.search{flex-basis:100%}.search input{font-size:16px}
 .tab{padding:10px 10px 8px;letter-spacing:0.12em}
 .company-name,.company-note{max-width:120px}
 .shortlist-button{padding:9px 10px}
 .modal-body,.modal-head{padding-left:16px;padding-right:16px}
 .field input,.field textarea{font-size:16px}
 .review-line strong{max-width:45%;text-align:right}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
