/* Exec Pay SA — paper/ink palette, Archivo + JetBrains Mono, square corners. */
:root {
  color-scheme: light;
  --bg: #f3f2ed;          /* paper */
  --surface: #fbfaf7;     /* header, cards, popovers */
  --surface-2: #e6e4dd;   /* segmented bg, notes, selected option */
  --row-hover: #ebe9e3;
  --border: #d6d4cc;      /* card borders */
  --rule: #dcdad3;        /* row rules */
  --rule-2: #e3e1da;      /* inner rules */
  --input-border: #c9c7be;
  --text: #141512;        /* ink */
  --text-2: #55544f;
  --text-3: #85837c;
  --accent: #1f8a68;
  --cobalt: #3a5fd0;
  --tip-bg: #141512; --tip-text: #f3f2ed; --tip-muted: #a3a199; --tip-fixed: #f3f2ed; /* fixed pay is paper on the ink tooltip */
  --warn: #a86a00;
  /* Pay groups, in REM.GROUPS order: fixed, sti_cash, sti_def, lti, dividends, signon, exit, other */
  --s1: #141512; --s2: #1f8a68; --s3: #9fd3bd; --s4: #3a5fd0;
  --s5: #a9b8ee; --s6: #e0a526; --s7: #d4503f; --s8: #b8b5ac;
  --up: #1f8a68; --down: #d4503f;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121310; --surface: #1b1c19; --surface-2: #2a2b27; --row-hover: #23241f;
    --border: #3a3b36; --rule: #31322d; --rule-2: #2c2d29; --input-border: #4a4b45;
    --text: #f3f2ed; --text-2: #b9b7ae; --text-3: #8a887f; --accent: #5ec29a; --cobalt: #6f8ee6;
    --tip-bg: #f3f2ed; --tip-text: #141512; --tip-muted: #6b6a63; --tip-fixed: #141512; --warn: #e0a040;
    --s1: #f3f2ed; --s2: #2fa47e; --s3: #9fd3bd; --s4: #5b7de0;
    --s5: #a9b8ee; --s6: #e0a526; --s7: #e0604f; --s8: #8a877e;
    --up: #5ec29a; --down: #e0604f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121310; --surface: #1b1c19; --surface-2: #2a2b27; --row-hover: #23241f;
  --border: #3a3b36; --rule: #31322d; --rule-2: #2c2d29; --input-border: #4a4b45;
  --text: #f3f2ed; --text-2: #b9b7ae; --text-3: #8a887f; --accent: #5ec29a; --cobalt: #6f8ee6;
  --tip-bg: #f3f2ed; --tip-text: #141512; --tip-muted: #6b6a63; --tip-fixed: #141512; --warn: #e0a040;
  --s1: #f3f2ed; --s2: #2fa47e; --s3: #9fd3bd; --s4: #5b7de0;
  --s5: #a9b8ee; --s6: #e0a526; --s7: #e0604f; --s8: #8a877e;
  --up: #5ec29a; --down: #e0604f;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Archivo, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
input, button { border-radius: 0; }
input[type=search], input[type=email], input[type=password] { outline-color: var(--accent); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand svg { width: 28px; height: 28px; display: block; }
.brand .wm { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; white-space: nowrap; }
.brand .wm b { color: var(--accent); font-weight: 700; }
.mk-fixed { fill: var(--s1); }
.topbar nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.topbar nav a { color: var(--text-2); padding: 7px 12px; font-size: 14px; font-weight: 500; }
.topbar nav a:hover { color: var(--text); background: var(--row-hover); text-decoration: none; }
.topbar nav a.on { background: var(--surface-2); color: var(--text); }
/* Header search: on the home page it snaps in once the in-page search has scrolled away. */
.hdr-search { flex: 0 1 auto; width: 220px; max-width: 220px; min-width: 0; overflow: hidden; display: flex; justify-content: flex-end;
  transition: max-width .3s ease, opacity .25s ease, transform .25s ease; }
.hdr-search input { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%; min-width: 120px; }
.hdr-search.away { max-width: 0; opacity: 0; transform: translateY(-8px); pointer-events: none; }
.auth-link { color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.auth-link svg { flex: none; }
.auth-link:hover { color: var(--text); text-decoration: none; }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text-2); width: 30px; height: 30px; cursor: pointer; font-size: 15px; flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--text-3); }

/* ---------- page ---------- */
main { max-width: 1160px; margin: 0 auto; padding: 40px 20px 64px; }
h1 { font-size: 46px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 10px; text-wrap: balance; max-width: 820px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 36px 0 12px; }
.lede { color: var(--text-2); margin: 0 0 20px; max-width: 760px; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 24px 0 8px; }
.tile { background: var(--surface); padding: 16px 18px; }
.tile .k { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.tile .v { font-size: 30px; font-weight: 700; margin-top: 2px; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 13px; color: var(--text-2); }

.card { background: var(--surface); border: 1px solid var(--border); padding: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 24px 0 12px; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--surface-2); padding: 3px; }
.seg[hidden] { display: none; }
.seg button { border: 0; background: none; color: var(--text-2); font-family: var(--mono); font-size: 12px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 700; }
input[type=search] { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--input-border); background: var(--surface); color: var(--text); min-width: 0; flex: 1 1 200px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); margin: 8px 0 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; display: inline-block; flex: none; }

/* ---------- top earners ---------- */
.page-search { margin-top: 20px; max-width: 340px; transition: opacity .2s ease; }
.page-search input { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--input-border); background: var(--surface); color: var(--text); width: 100%; }
.page-search.dim { opacity: .3; }
.sentence { margin: 16px 0 0; padding-bottom: 14px; border-bottom: 2px solid var(--text); font-size: 26px; line-height: 1.5; font-weight: 700; letter-spacing: -0.015em;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .3em; position: relative; z-index: 4; }
.pick { position: relative; }
.pick > button { font: inherit; letter-spacing: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; border-bottom: 2px dotted var(--accent); line-height: 1.25; }
.pick > button:hover, .pick.open > button { border-bottom-style: solid; }
.pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--text); box-shadow: 0 8px 24px rgba(20,21,18,.14);
  display: flex; flex-direction: column; padding: 4px; z-index: 6; }
.pop button { font: inherit; font-size: 14px; font-weight: 400; letter-spacing: 0; text-align: left; border: 0; padding: 8px 10px; cursor: pointer; background: transparent; color: var(--text);
  display: flex; justify-content: space-between; gap: 16px; white-space: nowrap; }
.pop button:hover { background: var(--row-hover); }
.pop button.on { background: var(--surface-2); font-weight: 700; }
.pop button.on::after { content: '✓'; color: var(--accent); }
.pop button:disabled { color: var(--text-3); cursor: default; background: transparent; }
.pop button small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.scrim { position: fixed; inset: 0; z-index: 3; }
.reset { font: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0; border: 0; background: transparent; color: var(--text-3); cursor: pointer; padding: 0 0 0 8px; align-self: center; }
.reset:hover { color: var(--text); }

.board { list-style: none; margin: 8px 0 0; padding: 0; }
.board li { display: grid; grid-template-columns: 32px minmax(150px, 250px) minmax(0, 1fr) 140px; gap: 16px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--rule); }
.board li:hover { background: var(--row-hover); }
.board li.link { cursor: pointer; }
.rank { font-family: var(--mono); font-size: 13px; color: var(--text-3); text-align: right; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who .n { font-weight: 600; font-size: 15px; color: var(--text); }
.who a.n { color: var(--accent); }
.who .r { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .r a { color: inherit; }
.who .r a:hover { color: var(--text); }
.tag { font-family: var(--mono); font-size: 10px; font-weight: 700; border: 1px solid var(--accent); color: var(--accent); padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
.amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.amt b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.amt .y { font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; font-weight: 400; }
/* Composition bar: always full width; tooltip below on hover. */
.mix-bar { position: relative; padding: 6px 0; }
.mix-bar .segs { display: flex; height: 16px; gap: 2px; width: 100%; }
.mix-bar .segs i { min-width: 2px; }
.mix-tip { display: none; position: absolute; top: calc(100% + 2px); left: 0; z-index: 6; min-width: 250px; background: var(--tip-bg); color: var(--tip-text); padding: 12px 14px;
  flex-direction: column; gap: 6px; box-shadow: 0 8px 24px rgba(20,21,18,.25); pointer-events: none; }
.mix-bar:hover .mix-tip { display: flex; }
.mix-tip div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mix-tip i { width: 10px; height: 10px; outline: 1px solid #55544f; flex: none; }
.mix-tip i.fixed, #tip .sw.fixed { background: var(--tip-fixed) !important; }
.mix-tip span { flex: 1; }
.mix-tip .p { flex: none; font-family: var(--mono); color: var(--tip-muted); }
.mix-tip .m { flex: none; font-family: var(--mono); font-weight: 700; min-width: 58px; text-align: right; }
.empty { padding: 40px 4px; font-size: 15px; color: var(--text-2); border-bottom: 1px solid var(--rule); }
.more { font-family: var(--mono); font-size: 12px; background: none; border: 1px solid var(--input-border); color: var(--text); padding: 7px 14px; cursor: pointer; margin-top: 16px; }
.more:hover { border-color: var(--text); }
.footnote { font-size: 13px; color: var(--text-3); margin: 16px 0 0; max-width: 760px; line-height: 1.5; }
.signin-note { font-size: 13px; color: var(--text-2); margin: 12px 0 0; }

/* older bars (company / executive pages) */
.bar { display: flex; height: 14px; gap: 2px; align-items: stretch; }
.bar i { display: block; height: 100%; min-width: 2px; }
.bar.tall { height: 22px; }

.badge { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 0 5px; border: 1px solid var(--text-3); color: var(--text-2); vertical-align: middle; text-transform: uppercase; letter-spacing: .04em; }
.badge.soe, .badge.government { border-color: var(--accent); color: var(--accent); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.co-card { display: block; color: var(--text); }
.co-card:hover { color: var(--text); text-decoration: none; border-color: var(--text); }
.co-card h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.01em; }
.co-card .meta { font-size: 13px; color: var(--text-2); }
.co-card .top { margin-top: 12px; font-size: 13px; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule-2); text-align: left; vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
td.n, th.n { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
tr.sub td { color: var(--text-2); }
tr.tot td { font-weight: 700; border-top: 2px solid var(--text); }
tr.grp td { font-weight: 600; background: var(--bg); }
tbody tr:hover td { background: var(--row-hover); }
.tbl-wrap { overflow-x: auto; }
.up { color: var(--up); } .down { color: var(--down); }
.warn { color: var(--warn); }

.year-bars { display: grid; grid-template-columns: 64px 1fr 96px; gap: 10px 14px; align-items: center; }
.year-bars .yl { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.note { font-size: 13.5px; color: var(--text-2); background: var(--surface-2); padding: 10px 12px; margin: 8px 0; }
.sources { font-size: 14px; }
.sources li { margin-bottom: 6px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

#tip { position: fixed; pointer-events: none; z-index: 50; background: var(--tip-bg); color: var(--tip-text); padding: 12px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(20,21,18,.25); opacity: 0; transition: opacity .1s; min-width: 220px; max-width: 300px; }
#tip.on { opacity: 1; }
#tip .t { font-weight: 600; margin-bottom: 6px; }
#tip .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 4px; }
#tip .row span:first-child { display: inline-flex; gap: 8px; align-items: center; }
#tip b { font-family: var(--mono); }

.foot { max-width: 1160px; margin: 0 auto; padding: 16px 20px 40px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.foot p { margin: 0; max-width: 620px; }

.badge.flag { border-color: var(--warn); color: var(--warn); cursor: help; }

/* ---------- sign-in ---------- */
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: 14px; background: var(--text); color: var(--bg); border: 0; padding: 9px 16px; cursor: pointer; }
.btn:hover { color: var(--bg); text-decoration: none; background: var(--accent); }
.btn:disabled { opacity: .6; cursor: default; }
.signin-card { max-width: 380px; display: grid; gap: 14px; padding: 24px; justify-items: start; }
.signin-card p { margin: 0; }
.google-btn { min-height: 44px; }

@media (max-width: 760px) {
  .topbar-in { gap: 12px; flex-wrap: wrap; padding: 10px 16px; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .hdr-search { order: 4; width: 100%; max-width: 100%; flex-basis: 100%; }
  .hdr-search.away { display: none; }
  .hdr-search input { min-width: 0; }
  .auth-link { margin-left: auto; }
  main { padding: 28px 16px 48px; }
  h1 { font-size: 34px; }
  .sentence { font-size: 21px; }
  .board li { grid-template-columns: 22px minmax(0, 1fr) 96px; gap: 4px 12px; }
  .board li .mix-bar { grid-column: 2 / 4; grid-row: 2; }
  .mix-tip { min-width: 0; width: 100%; }
  .two { grid-template-columns: 1fr; }
}
