/* Attribution tab: lander card grid + per-lander report page. */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 2px 16px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font: 600 12px var(--sans); color: var(--muted); padding: 6px 11px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.custom-range { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.custom-range[hidden] { display: none; }
.custom-range input { font: 500 12px var(--mono); border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: var(--panel); color: var(--ink); }
.custom-range button { border: 0; background: var(--ink); color: #fff; font: 600 12px var(--sans); padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.toolbar .hint { margin-left: auto; font-size: 12px; color: var(--faint); }

.lgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 1280px) { .lgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) { .lgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .lgrid { grid-template-columns: 1fr; } }
.lcard { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; padding: 16px 16px 14px; }
.lcard:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(15,20,32,0.55); }
.lcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lcard .name { font-size: 15px; }
.lcard .big { font-size: 22px; }
.deal .sv.pos { color: #4ade80; } .deal .sv.neg { color: #ef8b85; }
.lcard.bucket { background: linear-gradient(158deg, #2a2e37, #1d2027); }
.idle-list { font-size: 12.5px; color: var(--muted); margin: -12px 2px 26px; line-height: 1.7; }
.idle-list b { color: var(--ink); font-weight: 600; }
td.pos { color: #0e9c6d; } td.neg { color: var(--neg); }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #fafbfc; }

/* per-lander report */
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: 600 12.5px var(--sans); color: var(--muted); cursor: pointer; padding: 4px 0; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.rhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rhead .kick { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.rhead h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.rhead h2 i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.rhead small { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.rhead .asof { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); text-align: right; }
.kpis.k6 { grid-template-columns: repeat(4, 1fr); }
.kpi .v.pos { color: var(--pos); } .kpi .v.neg { color: var(--neg); }
.rsec { margin-bottom: 26px; }
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; }
.pcard .pn { font-size: 12px; font-weight: 700; color: var(--muted); }
.pcard .pv { font-family: var(--mono); font-size: 21px; font-weight: 700; margin: 6px 0 8px; }
.pcard .pbar { height: 4px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.pcard .pbar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.pcard .pm { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 7px; }
.chartwrap { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 16px 18px 10px; position: relative; }
.chartwrap .legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chartwrap .legend span { display: inline-flex; align-items: center; gap: 6px; }
.chartwrap .legend i { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.chartwrap svg { width: 100%; height: 260px; display: block; }
.chartwrap .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 9px; padding: 8px 10px; font-size: 11.5px; line-height: 1.55; min-width: 150px; display: none; box-shadow: 0 10px 30px -12px rgba(0,0,0,0.5); }
.chartwrap .tip b { font-family: var(--mono); }
.chartwrap .tip .d { color: #9aa1ac; font-family: var(--mono); font-size: 10.5px; margin-bottom: 2px; }
.chartwrap .tip i { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 6px; }
.cap { max-height: 26rem; overflow: auto; }
.cap thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
td.adcell { font-family: var(--mono); font-size: 12px; max-width: 300px; }
td.adcell a { color: var(--ink); text-decoration: underline dotted; text-underline-offset: 3px; }
td.adcell small { display: block; font-family: var(--sans); color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
td.trunc { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.today-note { background: #effbf5; border: 1px solid #cfeede; color: #1f5a41; border-radius: 12px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 18px; }
@media (max-width: 1080px) { .kpis.k6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .rhead .asof { margin-left: 0; text-align: left; } .rhead h2 { font-size: 22px; } }

/* sortable headers (tables.js) */
table[data-sk] th { cursor: pointer; user-select: none; white-space: nowrap; }
table[data-sk] th:hover { color: var(--ink); }
table[data-sk] th::after { content: "▼"; display: inline-block; width: 12px; margin-left: 3px; font-size: 8px; text-align: center; opacity: 0; }
table[data-sk] th:hover::after { opacity: 0.35; }
table[data-sk] th[aria-sort] { color: var(--ink); }
table[data-sk] th[aria-sort="ascending"]::after { content: "▲"; opacity: 1; }
table[data-sk] th[aria-sort="descending"]::after { opacity: 1; }
table[data-sk] th:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* table search */
.tsearch { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; flex: 1 1 280px; max-width: 420px; }
.tsearch:focus-within { border-color: var(--ink); }
.tsearch svg { width: 15px; height: 15px; stroke: var(--faint); flex: none; }
.tsearch input { border: 0; outline: 0; background: transparent; font: 500 13px var(--sans); color: var(--ink); padding: 8px 0; width: 100%; min-width: 0; }
.tcount { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
tr[hidden] { display: none; }

/* expandable hours + hourly RPM (hourly.js) */
.xbtn { border: 0; background: var(--line2); color: var(--muted); width: 20px; height: 20px; border-radius: 6px; margin-right: 9px; cursor: pointer; font-size: 10px; line-height: 20px; transition: transform 0.15s; vertical-align: middle; }
.xbtn[aria-expanded="true"] { transform: rotate(90deg); background: var(--ink); color: #fff; }
.xpad { display: inline-block; width: 29px; }
tr.sub td { background: #fafbfc; font-size: 12px; padding-top: 7px; padding-bottom: 7px; color: #3d434e; }
tr.sub td.hcell { padding-left: 45px; }
td.hcell { font-family: var(--sans); font-weight: 600; white-space: nowrap; }
tr.muted-row td { color: var(--faint); }
tr.total-row td { border-top: 1px solid var(--line); font-weight: 700; }
.nowtag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #0e7d63; background: #dcf5ec; border-radius: 20px; padding: 1px 7px; margin-left: 6px; }
td.rpmcell { white-space: nowrap; }
.rpmbar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--line2); margin-right: 10px; vertical-align: middle; overflow: hidden; }
.rpmbar i { display: block; height: 100%; border-radius: 4px; }
span.muted { color: var(--faint); }
.pfoot { padding: 11px 20px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); line-height: 1.5; }
@media (max-width: 620px) { .rpmbar { width: 44px; } .tsearch { max-width: none; } }
.rpmbar.off { visibility: hidden; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 12.5px var(--sans); padding: 7px 12px; border-radius: 10px; cursor: pointer; }
.tbtn:hover { border-color: var(--ink); }
.tbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tbtn svg { width: 14px; height: 14px; stroke: currentColor; flex: none; }
.toolbar .tbtn { margin-left: auto; }
