/* GTA 6 tools (ATH). Colours come from the theme's variables, so light and dark both follow the site toggle. */
.g6t {
	--g-paper: var(--almanac-bg-paper, #fbf8ef);
	--g-panel: var(--almanac-bg-cream, #f3eedf);
	--g-panel-2: var(--almanac-bg-mist, #ebe6d6);
	--g-line: var(--almanac-border, #ddd5c0);
	--g-line-2: var(--almanac-border-strong, #b9ae92);
	--g-ink: var(--almanac-fg-primary, #1a1a1a);
	--g-ink-2: var(--almanac-fg-secondary, #4a4a4a);
	--g-ink-3: var(--almanac-fg-tertiary, #6b6b6b);
	--g-acc: var(--almanac-yellow, #ffd700);
	--g-acc-deep: var(--almanac-yellow-deep, #c9a400);
	--g-on-acc: var(--almanac-on-yellow, #231a00);
	--g-ok: #2f9e44;
	--g-bar: #e8590c;
	--g-r: var(--almanac-radius-md, 8px);
	container-type: inline-size;
	margin: 1.5rem 0 2rem;
	color: var(--g-ink);
	font-size: 15px;
	line-height: 1.45;
}
[data-almanac-theme="dark"] .g6t { --g-ok: #51cf66; --g-bar: #ff922b; }
.g6t *, .g6t *::before, .g6t *::after { box-sizing: border-box; }
.g6t button, .g6t input, .g6t select { font: inherit; color: inherit; }
.g6t a { color: inherit; }
.g6t :focus-visible { outline: 3px solid var(--almanac-info, #1b58c4); outline-offset: 2px; }
.g6t-loading { color: var(--g-ink-3); }

/* bar: totals + controls */
.g6t-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px; border: 1px solid var(--g-line); border-radius: var(--g-r); background: var(--g-panel); margin-bottom: 12px; }
.g6t-total { flex: 1 1 220px; min-width: 0; }
.g6t-total__n { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.g6t-total__n small { font-weight: 400; font-size: 14px; color: var(--g-ink-3); margin-left: 6px; }
.g6t-prog { height: 8px; border-radius: 4px; background: var(--g-panel-2); overflow: hidden; margin-top: 6px; border: 1px solid var(--g-line); }
.g6t-prog > i { display: block; height: 100%; width: 0; background: var(--g-ok); transition: width .2s; }
.g6t-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g6t-search { min-height: 40px; padding: 0 12px; border: 1px solid var(--g-line-2); border-radius: var(--g-r); background: var(--g-paper); width: 220px; max-width: 100%; }
.g6t-sel { min-height: 40px; padding: 0 8px; border: 1px solid var(--g-line-2); border-radius: var(--g-r); background: var(--g-paper); max-width: 100%; }
.g6t-btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--g-line-2); border-radius: var(--g-r); background: var(--g-paper); cursor: pointer; font-weight: 600; font-size: 14px; }
.g6t-btn[aria-pressed="true"] { background: var(--g-acc); border-color: var(--g-acc-deep); color: var(--g-on-acc); }
.g6t-btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.g6t-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.g6t-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--g-line); border-radius: 18px; background: var(--g-panel); cursor: pointer; font-size: 14px; font-weight: 600; }
.g6t-chip[aria-pressed="true"] { background: var(--g-acc); border-color: var(--g-acc-deep); color: var(--g-on-acc); }
.g6t-chip small { font-weight: 400; opacity: .75; margin-left: 4px; }

.g6t ul, .g6t ol { list-style: none !important; margin-left: 0 !important; padding-left: 0 !important; counter-reset: none; }
.g6t li { margin: 0 !important; padding-left: 0; list-style: none !important; }
.g6t li::before, .g6t li::marker { content: none !important; display: none !important; }
.g6t .g6t-row { padding: 8px 0; }

/* checkbox */
.g6t-ck { position: relative; flex: none; width: 26px; height: 26px; margin: 0; cursor: pointer; appearance: none; -webkit-appearance: none; border: 2px solid var(--g-line-2); border-radius: 6px; background: var(--g-paper); }
.g6t-ck:checked { background: var(--g-ok); border-color: var(--g-ok); }
.g6t-ck:checked::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* sections (details) */
.g6t-sec { border: 1px solid var(--g-line); border-radius: var(--g-r); margin: 0 0 10px; background: var(--g-paper); }
.g6t-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 52px; }
.g6t-sec > summary::-webkit-details-marker { display: none; }
.g6t-sec__t { font-weight: 700; font-size: 16px; flex: 1 1 auto; min-width: 0; }
.g6t-sec__n { font-variant-numeric: tabular-nums; color: var(--g-ink-2); font-size: 14px; white-space: nowrap; }
.g6t-sec__p { flex: 0 0 70px; }
.g6t-sec__p .g6t-prog { margin: 0; }
.g6t-sec__body { padding: 0 12px 12px; }
.g6t-sec__tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.g6t-sec.is-done > summary .g6t-sec__n { color: var(--g-ok); font-weight: 700; }
.g6t-grp { margin: 10px 0 0; }
.g6t-grp__h { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14px; color: var(--g-ink-2); padding: 6px 0; border-bottom: 1px solid var(--g-line); }
.g6t-grp__h span:last-child { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* rows */
.g6t-rows { list-style: none; margin: 0; padding: 0; }
.g6t-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--g-line); }
.g6t-row:last-child { border-bottom: 0; }
.g6t-row label { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; cursor: pointer; margin: 0; }
.g6t-row__th { flex: none; width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--g-line); object-fit: cover; background: var(--g-panel-2); }
.g6t-row__txt { min-width: 0; }
.g6t-row__n { display: block; font-weight: 600; overflow-wrap: anywhere; }
.g6t-row__a { display: block; font-size: 13px; color: var(--g-ink-3); }
.g6t-row__d { display: block; font-size: 13px; color: var(--g-ink-2); }
.g6t-row.is-done .g6t-row__n { text-decoration: line-through; text-decoration-color: var(--g-ink-3); color: var(--g-ink-2); }
.g6t-row__go { flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--g-line); border-radius: 16px; font-size: 13px; font-weight: 600; text-decoration: none !important; background: var(--g-panel); white-space: nowrap; }
.g6t-row__go:hover { border-color: var(--g-line-2); }
.g6t-hide-done .g6t-row.is-done { display: none; }
.g6t-row[hidden], .g6t-grp[hidden], .g6t-sec[hidden] { display: none; }
.g6t-empty { color: var(--g-ink-3); padding: 12px 0; }

/* overview tiles */
.g6t-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 14px; }
.g6t-tile { display: block; text-align: left; padding: 10px; border: 1px solid var(--g-line); border-radius: var(--g-r); background: var(--g-panel); cursor: pointer; }
.g6t-tile b { display: block; font-size: 14px; line-height: 1.25; min-height: 2.5em; }
.g6t-tile span { display: block; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--g-ink-2); margin-top: 4px; }
.g6t-tile.is-done { border-color: var(--g-ok); }

/* missions */
.g6t-mnum { flex: none; width: 2em; text-align: right; color: var(--g-ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.g6t-spoil { display: block; font-size: 13px; color: var(--g-ink-2); margin-top: 2px; }
.g6t--missions:not(.g6t-show-d) .g6t-spoil { display: none; }
.g6t-sec__link { font-size: 13px; font-weight: 600; }

/* vehicles */
.g6t-vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.g6t-v { border: 1px solid var(--g-line); border-radius: var(--g-r); background: var(--g-paper); padding: 10px; display: grid; grid-template-columns: 62px 1fr auto; gap: 4px 12px; align-items: start; }
.g6t-v__th { width: 62px; height: 62px; border-radius: 8px; border: 1px solid var(--g-line); object-fit: cover; background: var(--g-panel-2); grid-row: span 2; }
.g6t-v__h { min-width: 0; }
.g6t-v__n { font-weight: 700; display: block; overflow-wrap: anywhere; }
.g6t-v__c { font-size: 13px; color: var(--g-ink-3); display: block; }
.g6t-v__act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.g6t-v__act label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; margin: 0; white-space: nowrap; }
.g6t-v__act .g6t-ck { width: 22px; height: 22px; }
.g6t-v__act .g6t-ck:checked::after { left: 5px; top: 1px; width: 6px; height: 11px; }
.g6t-v__stats { grid-column: 2 / 4; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 10px; }
.g6t-st { min-width: 0; }
.g6t-st__k { display: block; font-size: 12px; line-height: 1.2; color: var(--g-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g6t-st__r { display: flex; align-items: center; gap: 6px; }
.g6t-st__r b { flex: none; min-width: 2.1em; text-align: right; font-size: 13px; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.g6t-st__bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--g-panel-2); overflow: hidden; }
.g6t-st__bar i { display: block; height: 100%; background: var(--g-bar); }
.g6t-st.is-sort .g6t-st__bar i { background: var(--g-acc-deep); }
.g6t-v__more { grid-column: 1 / 4; font-size: 13px; color: var(--g-ink-2); margin-top: 4px; }
.g6t-v__kv { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; }
.g6t-v__kv b { color: var(--g-ink); font-weight: 600; }
.g6t-v__k { color: var(--g-ink-3); }
.g6t-v__more dl { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 4px 0 0; }
.g6t-v__more dt { color: var(--g-ink-3); display: inline; }
.g6t-v__more dd { display: inline; margin: 0 0 0 4px; font-weight: 600; color: var(--g-ink); }
.g6t-v.is-found { border-color: var(--g-ok); }
.g6t-rank { font-variant-numeric: tabular-nums; color: var(--g-ink-3); font-size: 13px; margin-right: 4px; }
.g6t-more { display: flex; justify-content: center; margin: 12px 0 0; }
.g6t-cmp { position: sticky; bottom: 0; z-index: 5; margin: 12px 0 0; border: 1px solid var(--g-line-2); border-radius: var(--g-r); background: var(--g-paper); box-shadow: 0 -4px 14px rgba(0,0,0,.12); padding: 10px; }
.g6t-cmp[hidden] { display: none; }
.g6t-cmp__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; }
.g6t-cmp__grid { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 10px; max-height: 46vh; overflow: auto; }
.g6t-cmp__col { min-width: 0; }
.g6t-cmp__col img { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--g-line); object-fit: cover; float: left; margin: 0 8px 4px 0; }
.g6t-cmp__n { font-weight: 700; font-size: 14px; display: block; overflow-wrap: anywhere; }
.g6t-cmp__col .g6t-st { clear: both; margin-top: 6px; }
.g6t-cmp__col .g6t-st.is-best .g6t-st__r b { color: var(--g-ok); }
.g6t-x { border: 0; background: none; cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; color: var(--g-ink-2); }

/* cheats */
.g6t-clist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.g6t-c { border: 1px solid var(--g-line); border-radius: var(--g-r); background: var(--g-paper); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.g6t-c.is-done { border-color: var(--g-ok); }
.g6t-c__h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.g6t-c__n { font-weight: 700; font-size: 16px; display: block; }
.g6t-c__cat { font-size: 12px; color: var(--g-ink-3); display: block; }
.g6t-c__e { margin: 0; font-size: 14px; }
.g6t-keys { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.g6t-key { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 7px; background: #262b33; color: #fff; font-weight: 700; font-size: 13px; line-height: 1; }
.g6t-key--hold { background: var(--g-panel-2); color: var(--g-ink); border: 1px solid var(--g-line-2); }
.g6t-key svg { width: 16px; height: 16px; fill: currentColor; }
.g6t-keys__sep { color: var(--g-ink-3); font-size: 13px; margin: 0 2px; }
.g6t-c__u { font-size: 13px; color: var(--g-ink-2); margin: 0; padding-top: 8px; border-top: 1px dashed var(--g-line); }
.g6t-c__u b { color: var(--g-ink); }
.g6t-c label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; margin: 0; white-space: nowrap; }
.g6t-c label .g6t-ck { width: 22px; height: 22px; }
.g6t-c label .g6t-ck:checked::after { left: 5px; top: 1px; width: 6px; height: 11px; }
.g6t-how { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; }
.g6t-how > span { display: inline-flex; gap: 6px; align-items: center; }

@container (max-width: 560px) {
	.g6t-search { width: 100%; flex: 1 1 100%; }
	.g6t-v { grid-template-columns: 52px 1fr; }
	.g6t-v__th { width: 52px; height: 52px; grid-row: auto; }
	.g6t-v__act { grid-column: 1 / 3; flex-direction: row; justify-content: flex-start; gap: 16px; }
	.g6t-v__stats { grid-column: 1 / 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.g6t-sec__p { display: none; }
	.g6t-clist { grid-template-columns: 1fr; }
	.g6t-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.g6t-cmp__grid { grid-template-columns: 1fr; }
}
