/* Speeding Fines guides: the guide pages inside the site shell. Sits on top of /app/app.css and uses its tokens
   (--panel, --line, --red...), cards, badges, tabs and buttons; only what is particular to long-form guides lives here. */
.gp { --c: var(--red); --bg2: #0b0d12; --link: #8fb4ff; }
html { scroll-padding-top: 18px; }
@media (max-width: 900px) { html { scroll-padding-top: 72px; } }

/* ---------- top bar: breadcrumbs + search ---------- */
.g-bar { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; margin: 0 0 16px; }
.g-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 0.86rem; color: var(--dim); }
.g-crumbs li + li::before { content: "/"; margin: 0 9px; color: var(--line2); }
.g-crumbs a { color: var(--muted); text-decoration: none; }
.g-crumbs a:hover { color: #fff; }
.g-crumbs [aria-current] { color: #c7ccd7; }
.g-search { position: relative; margin-left: auto; width: min(380px, 100%); }
.g-search input { width: 100%; height: 40px; padding: 0 40px 0 38px; border-radius: 10px; border: 1px solid var(--line2); background: var(--field);
  color: var(--text); font-size: 0.95rem; -webkit-appearance: none; appearance: none; }
.g-search input::placeholder { color: var(--dim); }
.g-search input:focus { border-color: rgba(229, 72, 77, 0.7); outline: none; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15); }
.g-search-ic { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--dim); pointer-events: none; }
.g-search kbd { position: absolute; right: 9px; top: 9px; min-width: 22px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2);
  font: 600 0.75rem/1.2 var(--mono); color: var(--dim); text-align: center; pointer-events: none; }
.g-search input:focus ~ kbd, .g-search input:not(:placeholder-shown) ~ kbd { display: none; }
.g-results { position: absolute; top: 46px; right: 0; z-index: 60; width: min(560px, calc(100vw - 28px)); max-height: min(70vh, 560px); overflow-y: auto;
  background: #141821; border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65); padding: 6px; }
.g-results a { display: block; padding: 9px 11px; border-radius: 8px; color: var(--text); text-decoration: none; }
.g-results a:hover, .g-results a.on { background: rgba(255, 255, 255, 0.07); }
.g-results .r-t { font: 700 1.04rem/1.2 var(--head); letter-spacing: 0.02em; text-transform: uppercase; }
.g-results .r-t small { color: var(--muted); font: 400 0.84rem var(--body); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.g-results .r-x { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.45; margin-top: 2px; }
.g-results mark { background: rgba(245, 177, 76, 0.28); color: #fff; border-radius: 3px; padding: 0 1px; }
.g-results .r-none { padding: 12px; margin: 0; color: var(--muted); }

/* ---------- article + rail ---------- */
.g-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.g-main { min-width: 0; }
.gp-page .g-main, .gp-post .g-main, .gp-folder .g-main, .gp-class .g-main, .gp-sources .g-main, .gp-missing .g-main, .gp-classes .g-main {
  background: linear-gradient(180deg, #10131a 0%, #0c0f14 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 32px 30px; }
.gp-class .g-main { padding-top: 0; overflow: hidden; }
.g-rail { display: none; }
@media (min-width: 1200px) {
  .g-grid.has-rail:not(.wide) { grid-template-columns: minmax(0, 1fr) 232px; max-width: 1240px; }
  .g-grid.has-rail:not(.wide) > .g-rail { display: block; }
  .g-grid.has-rail:not(.wide) .g-toc-m { display: none; }
}
@media (min-width: 1560px) {
  .g-grid.has-rail.wide { grid-template-columns: minmax(0, 1fr) 232px; }
  .g-grid.has-rail.wide > .g-rail { display: block; }
}
.g-rail { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 12px; }
.g-rail-sec { padding: 0 0 14px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.g-rail-sec:last-child { border-bottom: 0; }
.g-rail-h { margin: 0 0 8px; font: 700 0.74rem/1 var(--head); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); display: flex; gap: 6px; }
.g-rail-h small { font: inherit; color: var(--line2); }
.g-rail ol { list-style: none; margin: 0; padding: 0; }
.g-toc ol { border-left: 1px solid var(--line); }
.g-toc li a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none;
  font-size: 0.87rem; line-height: 1.35; }
.g-toc li a:hover { color: #fff; }
.g-toc li a.on { color: #fff; border-left-color: var(--c); }
.js .g-toc[data-panel]:not(.on) { display: none; }
.g-sibs ol { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 4px; padding-bottom: 4px; max-height: 42vh; overflow-y: auto; scrollbar-width: thin; margin-right: -4px; padding-right: 4px; }
.g-sibs li a { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 0.86rem; line-height: 1.3; }
.g-sibs li a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.g-sibs li a[aria-current] { color: #fff; background: var(--red-bg); }
.g-sibs small { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-rail-foot p { margin: 0 0 8px; color: var(--dim); font-size: 0.82rem; line-height: 1.45; }
.g-rail-foot a { color: var(--muted); }
.g-rail-foot a:hover { color: #fff; }

/* ---------- page head ---------- */
.g-head { margin: 0 0 20px; }
.g-head h1, .g-classhead h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); font-weight: 800; line-height: 1; overflow-wrap: anywhere; }
.g-head h1::before { content: ""; display: block; width: 46px; height: 3px; background: var(--c); border-radius: 2px; margin-bottom: 12px; }
.g-head .kicker, .g-classhead .kicker { display: block; margin: 0 0 8px; }
.g-head .kicker + h1::before { display: none; }
.g-lead { margin: 10px 0 0; color: #c2c7d2; font-size: 1.06rem; line-height: 1.55; max-width: 66ch; }
.g-meta, .g-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.g-badges { margin-top: 10px; }
.g-meta .badge, .g-badges .badge { font-size: 0.74rem; padding: 4px 9px; }
.g-meta a.badge { text-decoration: none; }
.g-meta a.badge:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.badge.lv { background: #232833; color: #fff; }
.badge .i-warn { margin-left: 4px; }
.g-build { margin: 8px 0 0; color: var(--dim); font-size: 0.8rem; }
.g-note { color: var(--muted); font-size: 0.9rem; margin: 18px 2px 0; }
.g-note a { color: var(--link); }

/* contents box (phones and narrow screens; the rail has it on wide screens) */
.g-toc-m { margin: 0 0 22px; border: 1px solid var(--line2); border-radius: 10px; background: var(--field); }
.g-toc-m summary { cursor: pointer; padding: 10px 14px; font: 700 0.95rem/1.2 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: #c7ccd7; }
.g-toc-m summary small { text-transform: none; letter-spacing: 0; font: 400 0.84rem var(--body); color: var(--dim); margin-left: 6px; }
.g-toc-m ol { margin: 0; padding: 0 14px 12px 34px; columns: 2 220px; column-gap: 26px; font-size: 0.92rem; }
.g-toc-m li { break-inside: avoid; padding: 2px 0; color: var(--dim); }
.g-toc-m a { color: var(--muted); text-decoration: none; }
.g-toc-m a:hover { color: #fff; text-decoration: underline; }

/* ---------- prose ---------- */
.g-prose { font-size: 16.5px; line-height: 1.65; color: #d3d7e0; overflow-wrap: break-word; }
.g-prose > p, .g-prose > ul, .g-prose > ol, .g-prose > blockquote { max-width: 76ch; }
.g-prose a { color: var(--link); text-underline-offset: 2px; }
.g-prose a:hover { color: #c3d6ff; }
.g-prose h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: 0.03em; margin: 40px 0 14px; padding-top: 18px; position: relative; scroll-margin-top: 18px; }
.g-prose h2::before { content: ""; position: absolute; left: 0; top: 0; width: 34px; height: 3px; background: var(--c); border-radius: 2px; }
.g-prose h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.06em; color: #fff; margin: 26px 0 8px; }
.g-prose > :first-child { margin-top: 0; }
.g-prose p { margin: 0 0 14px; }
.g-prose ul, .g-prose ol { margin: 0 0 16px; padding-left: 22px; }
.g-prose li { margin: 0 0 7px; }
.g-prose li > ul, .g-prose li > ol { margin: 7px 0 0; }
.g-prose ul > li::marker { color: var(--c); }
.g-prose ol > li::marker { color: var(--muted); font-weight: 600; }
.g-prose strong { color: #fff; font-weight: 600; }
.g-prose code { font: 0.86em/1.4 var(--mono); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.g-prose blockquote { margin: 0 0 16px; padding: 8px 14px; border-left: 3px solid var(--line2); color: var(--muted); }
.g-prose .small { font-size: 0.85rem; color: var(--dim); }
.srcline { margin-top: 30px !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--dim); line-height: 1.75; }
.srcline span { font: 700 0.76rem/1 var(--head); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.g-prose .srcline a { color: var(--muted); }
.spoiler { background: var(--line2); color: transparent; border-radius: 4px; cursor: pointer; }
.spoiler:focus, .spoiler:hover { color: inherit; background: rgba(255, 255, 255, 0.08); }

.tldr { margin: 0 0 24px; padding: 14px 18px 4px; border-radius: 12px; border: 1px solid rgba(229, 72, 77, 0.32);
  background: linear-gradient(160deg, rgba(229, 72, 77, 0.13), rgba(229, 72, 77, 0.03) 70%); max-width: 80ch; }
.tldr-k { display: block; font: 800 0.82rem/1 var(--head); letter-spacing: 0.22em; text-transform: uppercase; color: #ff8a8d; margin-bottom: 8px; }
.tldr p { margin-bottom: 10px; }

/* inline markers (from the Discord emoji) */
.i-new { display: inline-block; vertical-align: 0.12em; font: 700 0.62rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--red); padding: 3px 5px 2px; border-radius: 4px; margin: 0 2px; }
.i-warn { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; vertical-align: -0.12em;
  border-radius: 50%; background: var(--amber); color: #1a1205; font: 800 0.72em/1 var(--body); margin: 0 2px; cursor: help; }
.i-ok { color: var(--green); font-weight: 700; margin: 0 2px; }
.i-dot { display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%; vertical-align: 0.06em; margin: 0 2px; }
.i-dot.g { background: #3fbf6a; } .i-dot.r { background: #e5484d; } .i-dot.w { background: #e9ecf2; }
.tag { display: inline-block; vertical-align: 0.1em; font: 700 0.64rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 6px 2px; border-radius: 4px; margin: 0 2px; cursor: help; }
.tag.beta { color: #f8d9a8; background: var(--amber-bg); border: 1px solid rgba(245, 177, 76, 0.4); }
.tag.live { color: #b9ecd2; background: var(--green-bg); border: 1px solid rgba(76, 195, 138, 0.4); }

/* items: our own tooltips (public/js/tooltip.js puts the icon in front and the quality colour on) */
.g-item { cursor: help; font-weight: 600; text-decoration: none !important; border-bottom: 1px dotted color-mix(in srgb, currentColor 45%, transparent); }
.g-item.sft-q3 { color: #3a95f0; } /* rare blue, a touch lighter so it reads on the dark page */
.g-item:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 3px; }
.g-item .sft-inline-icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; border-radius: 3px; }

/* components fill these (talent planner, rotation, levelling gear); empty until their script ships */
.g-widget:empty { display: none; }
div.g-widget { margin: 0 0 18px; max-width: 100%; min-width: 0; }
html:not(.js) div.g-widget[data-talents], html:not(.js) div.g-widget[data-rotation] { display: none; }
/* the text version of a talent order or rotation, folded under its widget */
.g-astext { margin: -6px 0 20px; }
.g-astext > summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; font-weight: 600; width: fit-content; padding: 4px 0; }
.g-astext > summary:hover { color: #fff; }
.g-astext[open] > summary { margin-bottom: 8px; }
html:not(.js) .g-astext > summary { pointer-events: none; }
/* +++ folded blocks (e.g. the Classic Era comparison builds) */
.g-fold { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); padding: 0 14px; }
.g-fold > summary { cursor: pointer; padding: 11px 0; font-weight: 700; color: var(--text); }
.g-fold > summary:hover { color: #fff; }
.g-fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
/* levelling gear box: spec / game / view / level, then the finder's own widget */
.g-lg { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); padding: 12px; }
.g-lg-link { font-weight: 600; }
.g-lg-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 10px; }
.g-lg-bar .seg button { border: 0; cursor: pointer; font: inherit; font-size: 0.86rem; padding: 6px 10px; }
.g-lg-bar .seg button:not([aria-pressed="true"]), .g-sug .seg button:not([aria-pressed="true"]) { background: none; }
.g-lg-one { font-weight: 700; }
.g-lg-sel select { height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: var(--field); color: var(--text); padding: 0 10px; font: inherit; }
.g-lg-lv { display: flex; align-items: center; gap: 10px; min-width: 200px; font-size: 0.9rem; color: var(--muted); }
.g-lg-lv span { white-space: nowrap; }
.g-lg-lv input { accent-color: var(--red); flex: 1; min-height: 32px; }
.g-lg-lv b { color: var(--text); font-variant-numeric: tabular-nums; display: inline-block; min-width: 2ch; }
.g-lg-out .lg-widget { margin: 0; }
@media (max-width: 560px) { .g-lg { padding: 10px; } .g-lg-lv { flex: 1 1 100%; } .g-lg-bar .seg { flex-wrap: wrap; } }

/* ---------- tables ---------- */
.tbl { margin: 4px 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 0.93rem; line-height: 1.45; }
.tbl th { text-align: left; font: 700 0.78rem/1.2 var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line2); background: rgba(255, 255, 255, 0.025); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.018); }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.035); }
.talents td.lv { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; width: 5.5em; }
.talents td.pts { white-space: nowrap; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; width: 4.5em; }
.talents th:last-child { text-align: right; }
.tree { display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line2); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: 0.1em; }
.labels td:first-child { font-weight: 600; color: #fff; white-space: nowrap; width: 1%; }
.cols td:first-child { white-space: nowrap; }
.tbl:has(> table.cols), .tbl:has(> table.labels) { width: fit-content; max-width: 100%; min-width: min(100%, 360px); }
.tbl table.cols td, .tbl table.labels td { padding-right: 22px; }
.g-ledger .tbl td { min-width: 120px; }
.g-ledger .tbl td:first-child { min-width: 0; }
pre.block { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 0.86rem; }

.macro { position: relative; margin: 4px 0 16px; }
.macro pre { margin: 0; background: #07090c; border: 1px solid var(--line2); border-radius: 10px; padding: 11px 74px 11px 14px; overflow-x: auto; }
.macro code { font: 0.88rem/1.55 var(--mono); color: #dfe6f3; background: none; border: 0; padding: 0; }
.copy { position: absolute; top: 7px; right: 7px; font: 600 0.78rem/1 var(--body); padding: 6px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); }
.copy:hover { color: #fff; }
.copy.done { color: var(--green); border-color: rgba(76, 195, 138, 0.5); }

/* ---------- folders: card grid, filter; prev / next ---------- */
.g-folder { margin-top: 40px; }
.g-folder h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: 0.03em; margin: 0 0 14px; padding-top: 18px; position: relative; }
.g-folder h2::before { content: ""; position: absolute; left: 0; top: 0; width: 34px; height: 3px; background: var(--c); border-radius: 2px; }
.g-folder h2 small { font: 600 0.9rem var(--body); color: var(--dim); margin-left: 6px; letter-spacing: 0; }
.g-filter { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.g-filter input { flex: 1; max-width: 340px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line2); background: var(--field); color: var(--text); }
.g-filter input:focus { border-color: rgba(229, 72, 77, 0.7); outline: none; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15); }
.g-filter-n { color: var(--dim); font-size: 0.85rem; }
.g-filter-none { color: var(--muted); }
.g-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.g-card { display: grid; align-content: start; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; height: 100%; padding: 12px 14px; border-radius: 10px;
  text-decoration: none; background: var(--field); border: 1px solid var(--line2); transition: border-color 0.15s, transform 0.15s; }
.g-card:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
.g-card .lvl { grid-row: span 2; align-self: start; font: 800 1rem/1 var(--head); color: #fff; background: #1b1f28; border: 1px solid var(--line2);
  border-radius: 8px; padding: 7px 6px; min-width: 3.7em; text-align: center; font-variant-numeric: tabular-nums; }
.g-card .nm { font: 700 1.15rem/1.15 var(--head); letter-spacing: 0.02em; text-transform: uppercase; color: #fff; }
.g-card .ds { color: var(--muted); font-size: 0.84rem; line-height: 1.4; grid-column: 2; }
.g-card:not(:has(.lvl)) .nm, .g-card:not(:has(.lvl)) .ds { grid-column: 1 / -1; }

.g-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.g-pn.has-up { grid-template-columns: 1fr auto 1fr; }
.g-pn a { display: block; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--field); text-decoration: none; min-width: 0; }
.g-pn a:hover { border-color: rgba(255, 255, 255, 0.3); }
.g-pn small { display: block; font: 700 0.72rem/1 var(--head); color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 5px; }
.g-pn b { display: block; font: 700 1.1rem/1.2 var(--head); text-transform: uppercase; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-pn .pn-prev b::before { content: "\2190  "; color: var(--c); }
.g-pn .pn-next { text-align: right; }
.g-pn .pn-next b::after { content: "  \2192"; color: var(--c); }
.g-pn .pn-up { text-align: center; }

/* ---------- class page ---------- */
.g-classhead { position: relative; margin: 0 -32px; padding: 30px 32px 0;
  background: radial-gradient(760px 260px at 12% 0, color-mix(in srgb, var(--c) 24%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, transparent), transparent); border-bottom: 1px solid var(--line); }
.g-classhead .kicker { color: var(--c); }
.g-classhead h1 { color: var(--c); font-size: clamp(2.8rem, 6vw, 4.2rem); text-shadow: 0 2px 22px color-mix(in srgb, var(--c) 32%, transparent); }
.g-classhead h1::before { content: ""; display: block; width: 64px; height: 4px; background: var(--c); border-radius: 2px; margin-bottom: 12px; }
.g-classhead .kicker + h1::before { display: none; }
.g-tabs { margin: 18px 0 0; border-bottom: 0; }
.g-tabs a { font-size: 1.05rem; padding: 10px 16px 12px; }
.g-tabs [aria-selected="true"] { color: #fff; border-bottom: 3px solid var(--c); }
.g-panel { padding-top: 24px; }
.js .g-panel:not(.on):not(:first-of-type), .js .gp[data-tab] .g-panel:not(.on) { display: none; }
.g-panel + .g-panel { border-top: 1px solid var(--line); margin-top: 30px; }
.js .g-panel + .g-panel { border-top: 0; margin-top: 0; }
.g-panel-head { margin: 0 0 18px; }
.g-ptitle { font-size: 1.5rem; margin: 0 0 6px; }
.js .g-ptitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.g-part { font-size: 1.9rem; margin: 36px 0 12px; padding-top: 18px; border-top: 1px solid var(--line2); }
.g-classes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.g-class { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av nm" "ds ds" "go go"; align-items: center; gap: 8px 12px; height: 100%;
  padding: 14px 16px 8px; border-radius: 12px; text-decoration: none; border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #10131a) 0%, #0c0f14 60%); transition: border-color 0.15s, transform 0.15s; }
.g-class:hover { border-color: var(--c); transform: translateY(-1px); }
/* The game's class icon in a class-colour frame, like an in-game portrait. */
.g-cicon { display: block; flex: none; width: 42px; height: 42px; border-radius: 9px; border: 2px solid color-mix(in srgb, var(--c, #888) 70%, transparent);
  background: #0b0a0d; box-shadow: 0 0 0 1px #000, 0 0 8px color-mix(in srgb, var(--c, #888) 22%, transparent); object-fit: cover; }
.g-class .g-cicon { grid-area: av; }
.g-class .nm { grid-area: nm; font: 800 1.6rem/1 var(--head); color: var(--c); text-transform: uppercase; letter-spacing: 0.02em; }
.g-class .ds { grid-area: ds; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.g-class .go { grid-area: go; display: flex; flex-wrap: wrap; gap: 0 18px; font: 700 0.78rem/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: #c7ccd7; }
/* The class name is the card's link (it covers the card); the three tab links sit above it. */
.g-class .nm { text-decoration: none; }
.g-class .nm::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.g-class .go a { position: relative; z-index: 1; display: inline-block; padding: 10px 0; color: inherit; text-decoration: none; }
.g-class .go a:hover, .g-class .go a:focus-visible { color: var(--c); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- section colours (theme.css --sf-sec-*): home cards and panels, and a band on every page in the section ---------- */
[data-sec="basics"], .gs-basics { --sec: var(--sf-sec-basics); --sec-text: var(--sf-sec-basics-text); }
[data-sec="levelling"], .gs-levelling { --sec: var(--sf-sec-levelling); --sec-text: var(--sf-sec-levelling-text); }
[data-sec="professions"], .gs-professions { --sec: var(--sf-sec-professions); --sec-text: var(--sf-sec-professions-text); }
[data-sec="endgame"], .gs-endgame { --sec: var(--sf-sec-endgame); --sec-text: var(--sf-sec-endgame-text); }
[data-sec="meta"], .gs-meta { --sec: var(--sf-sec-meta); --sec-text: var(--sf-sec-meta-text); }
.gs-classes { --sec: var(--sf-sec-classes); --sec-text: var(--sf-sec-classes-text); }
/* guide pages: the kicker (the section's name) in its colour, with a short band before it */
.gp:is([data-sec="basics"], [data-sec="levelling"], [data-sec="professions"], [data-sec="endgame"], [data-sec="meta"]) .g-head .kicker {
  color: var(--sec-text); display: flex; align-items: center; gap: 9px; }
.gp:is([data-sec="basics"], [data-sec="levelling"], [data-sec="professions"], [data-sec="endgame"], [data-sec="meta"]) .g-head .kicker::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--sec); flex: none; }
.gp:is([data-sec="basics"], [data-sec="levelling"], [data-sec="professions"], [data-sec="endgame"], [data-sec="meta"]) .g-head h1::before { background: var(--sec); }

/* ---------- guides home ---------- */
.g-hero .hero-main { width: min(720px, 62vw); }
.g-hero .hmeta { font-size: 1.05rem; max-width: 52ch; }
.g-statline { margin: 14px 0 0; color: var(--sf-text-muted); font-size: 0.86rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.g-feature { text-decoration: none; position: relative; overflow: hidden; gap: 8px; border-color: rgba(229, 72, 77, 0.38);
  background: radial-gradient(520px 220px at 100% 100%, rgba(62, 130, 247, 0.12), transparent 70%), linear-gradient(140deg, rgba(229, 72, 77, 0.18), rgba(229, 72, 77, 0.03) 60%), #0e1117; }
.g-feature:hover { border-color: var(--red); }
.g-feature > b { font: 800 2.1rem/1 var(--head); text-transform: uppercase; letter-spacing: 0.02em; }
.g-feature > span:not(.kicker):not(.go):not(.g-tiers-demo) { color: #c2c7d2; max-width: 52ch; }
.g-feature .go { margin-top: auto; padding-top: 6px; font-weight: 600; color: #ff9a9c; display: inline-flex; align-items: center; gap: 6px; }
.g-feature .go svg { width: 16px; height: 16px; }
.g-tiers-demo { display: flex; gap: 6px; margin: 4px 0 2px; }
.g-tiers-demo i { font: 800 1.15rem/1 var(--head); font-style: normal; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 7px; background: var(--t); color: #111318; }
.g-classcard .g-cchips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-cchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 10px; text-decoration: none; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--field)); }
.g-cchip:hover { border-color: var(--c); }
.g-cchip .g-cicon { width: 28px; height: 28px; border-radius: 7px; border-width: 1px; box-shadow: 0 0 0 1px #000; }

/* A section card: a band of its colour along the top, a bigger heading with a bigger diamond in its colour, its glyph
   faint in the corner, and a gold line glyph by every guide. */
:root .g-sec { overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 11%, var(--sf-surface-2)), var(--sf-surface) 150px); }
.g-sec::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--sec), color-mix(in srgb, var(--sec) 40%, transparent)); }
.g-sec-ic { position: absolute; right: 14px; bottom: 14px; width: 74px; height: 74px; color: var(--sec); opacity: 0.12; pointer-events: none; }
.g-sec-ic svg { width: 100%; height: 100%; }
.g-sec .card-h { border-bottom-color: color-mix(in srgb, var(--sec) 35%, transparent); }
:root .g-sec .card-h h2 { font-size: 1.55rem; letter-spacing: 0.06em; gap: 12px; outline: none; }
:root .g-sec .card-h h2::before { width: 17px; height: 17px; background: linear-gradient(135deg, color-mix(in srgb, var(--sec) 55%, #fff) 0 28%, var(--sec) 28% 66%, color-mix(in srgb, var(--sec) 55%, #000) 66%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--sec) 55%, transparent)); }
.g-sec .card-h h2 a { color: #fff; text-decoration: none; }
.g-sec .card-h .more { color: var(--sec-text); }
.g-sec .sub { margin: -2px 0 0; }
/* The card's top (band, glyph, heading, short line) is one link: the heading's link stretched over all of it. The
   Open hint and the "All ..." arrow are part of the picture (aria-hidden); the X sits above the stretch. */
.g-top { position: relative; margin: -16px -18px 10px; padding: 16px 18px 12px; border-radius: var(--radius) var(--radius) 0 0;
  transition: background-color 0.15s ease; }
.g-hit { outline: none; }
.g-hit::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.g-hit:focus-visible::after { outline: 2px solid var(--sf-gold-300); outline-offset: -3px; }
.g-sec:not(.open) .g-top:hover { background-color: color-mix(in srgb, var(--sec) 13%, transparent); }
.g-sec:not(.open) .g-top:active { background-color: color-mix(in srgb, var(--sec) 20%, transparent); }
.g-sec:not(.open) .g-top:hover .card-h h2 a { color: var(--sec-text); }
.g-open { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--sec-text); font-size: 0.82rem;
  font-weight: 600; letter-spacing: 0.04em; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--sec) 40%, transparent); border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }
.g-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.g-top:hover .g-open, .g-top:has(.g-hit:focus-visible) .g-open { color: #fff; border-color: var(--sec); background: color-mix(in srgb, var(--sec) 22%, transparent); }
.g-top:hover .more { color: #fff; }
.g-sec.open .g-top { margin-bottom: 4px; }
.g-sec.open .g-hit { pointer-events: none; }
.g-sec.open .g-hit::after { display: none; }

/* The close button: the game's red square close X (dark red face, gold rim, pale cross), drawn here. */
.g-x { display: none; margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 7px; place-items: center; position: relative; z-index: 2;
  background: radial-gradient(120% 90% at 50% 15%, #c8322a 0%, #8f1712 48%, #4d0906 100%);
  border: 1px solid #1b0302; box-shadow: 0 0 0 2px #8a6a2c, 0 0 0 3px #1b0302, inset 0 1px 0 rgba(255, 210, 160, 0.45), inset 0 -2px 3px rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.6); }
.g-x svg { width: 18px; height: 18px; fill: none; stroke: #f6dfb8; stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7)); }
.g-x:hover { background: radial-gradient(120% 90% at 50% 15%, #e34236 0%, #a91d16 48%, #5c0b07 100%); box-shadow: 0 0 0 2px #c79a40, 0 0 0 3px #1b0302, inset 0 1px 0 rgba(255, 220, 170, 0.55), 0 0 12px rgba(227, 66, 54, 0.45); }
.g-x:active { transform: translateY(1px); box-shadow: 0 0 0 2px #8a6a2c, 0 0 0 3px #1b0302, inset 0 2px 4px rgba(0, 0, 0, 0.6); }
.g-x:focus-visible { outline: 2px solid var(--sf-gold-300); outline-offset: 5px; }

.g-list { list-style: none; margin: 0; padding: 0; position: relative; }
.g-list > li { border-top: 1px solid var(--line); padding: 3px 0; }
/* A guide's row is one link: the title's link stretched over the whole row (build.py sec_card .g-row), with the
   section colour on hover and a gold ring on keyboard focus, like the card tops. Pages and deep links under it are
   rows of their own, never inside it. */
.g-row { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 2px 10px; margin: 0 -8px; padding: 8px;
  border-radius: var(--sf-radius-sm); transition: background-color 0.15s ease; }
.g-row .t { outline: none; }
.g-row .t::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.g-row .t:focus-visible::after { outline: 2px solid var(--sf-gold-300); outline-offset: -2px; }
.g-row:hover { background-color: color-mix(in srgb, var(--sec) 13%, transparent); }
.g-row:active { background-color: color-mix(in srgb, var(--sec) 20%, transparent); }
.g-row:hover .t, .g-row:has(.t:focus-visible) .t { color: var(--sec-text); }
.g-row:hover .g-ic { border-color: color-mix(in srgb, var(--sec) 65%, transparent); }
.g-list .g-ic { grid-row: 1 / span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--sf-gold-300);
  background: color-mix(in srgb, var(--sec) 9%, var(--sf-sunken)); border: 1px solid var(--sf-gold-hair); }
.g-list .g-ic svg { width: 19px; height: 19px; }
.g-list .t { font: 700 1.05rem/1.2 var(--head); text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; color: #f1ece2; align-self: center; }
.g-list .n { color: var(--dim); font-size: 0.8rem; align-self: center; }
.g-list .d { grid-column: 2 / -1; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.g-list .kids { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 5px 6px; margin: 2px 0 8px 32px; }
.g-list .kids a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #d6d0c4; border: 1px solid var(--line2); border-radius: 999px;
  padding: 3px 10px; text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease; }
.g-list .kids a:hover { color: #fff; border-color: var(--sec); background: color-mix(in srgb, var(--sec) 13%, transparent); }
.g-list .kids a:focus-visible { outline: 2px solid var(--sf-gold-300); outline-offset: 2px; }
.g-list .kids small { color: var(--dim); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.g-list .g-kic { width: 14px; height: 14px; color: var(--sf-gold-300); flex: none; }
.g-list em { grid-column: 2 / -1; font-style: normal; color: var(--dim); font-size: 0.76rem; }
/* a panel section's card lists its guides; the pages inside them show when it opens */
.g-sec[data-panel]:not(.open) .kids { display: none; }

/* Lit: where to look. A card reached by its #anchor (no script), or the one a closed panel goes back to. */
@keyframes g-lit { 0%, 35% { box-shadow: var(--sf-frame), 0 0 0 3px var(--sec), 0 0 34px color-mix(in srgb, var(--sec) 55%, transparent); }
  100% { box-shadow: var(--sf-frame), var(--sf-shadow-2); } }
.g-sec:target, .g-sec.lit { animation: g-lit 2.2s ease-out both; }
.g-sec:target { scroll-margin-top: 24px; }

/* ---------- a section open as a panel: it takes the whole guides area (guides.js; its own URL without script too) ---------- */
.g-home.is-open > .g-hero, .g-home.is-open > .g-note, .g-home.is-open .g-homegrid > :not(.open) { display: none; }
.g-home.is-open .g-homegrid { display: block; }
.g-sec.open { min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px); padding: 22px 26px 30px; }
.g-sec.open::before { height: 5px; }
.g-sec.open .card-h { margin-bottom: 14px; padding-bottom: 14px; }
:root .g-sec.open .card-h h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
:root .g-sec.open .card-h h2::before { width: 24px; height: 24px; }
.g-sec.open .g-open { display: none; }
.g-sec.open .g-x { display: grid; }
.g-sec.open .g-sec-ic { right: 24px; bottom: 22px; width: 160px; height: 160px; opacity: 0.08; }
.g-sec.open .sub { font-size: 1.02rem; margin: 0 0 18px; max-width: 60ch; }
.g-sec.open .g-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.g-sec.open .g-list > li { border: 1px solid var(--sf-gold-hair); border-top: 3px solid var(--sec); border-radius: var(--sf-radius-md); padding: 0;
  display: flex; flex-direction: column; background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 7%, var(--sf-surface-2)), var(--sf-surface)); }
.g-sec.open .g-list > li.wide { grid-column: 1 / -1; }
.g-sec.open .g-row { margin: 0; padding: 14px 16px 12px; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px;
  border-radius: calc(var(--sf-radius-md) - 1px) calc(var(--sf-radius-md) - 1px) 0 0; }
.g-sec.open .g-list .g-ic { width: 40px; height: 40px; }
.g-sec.open .g-list .g-ic svg { width: 25px; height: 25px; }
.g-sec.open .g-list .t { font-size: 1.3rem; }
.g-sec.open .g-row > .d, .g-sec.open .g-row > em { display: none; }

/* What an open panel adds per guide (build.py guide_more): stamp, summary and members line in the guide's row
   (.g-mhead); its sections and pages as rows of their own below it (.g-more) */
.g-mhead, .g-more { display: none; min-width: 0; }
.g-sec.open .g-mhead { display: grid; gap: 10px; grid-column: 2 / -1; margin-top: 4px; }
.g-sec.open .g-more { display: grid; gap: 12px; align-content: start; padding: 2px 16px 16px; }
.g-stamp { display: flex; flex-wrap: wrap; gap: 6px; }
.g-stamp .badge { font-size: 0.72rem; padding: 2px 8px; }
.g-sum { margin: 0; color: #d9d3c7; font-size: 0.95rem; line-height: 1.5; max-width: 62ch; }
.g-mem { margin: 0; display: flex; gap: 8px; align-items: flex-start; color: var(--dim); font-size: 0.8rem; line-height: 1.4; }
.g-mem b { color: var(--sf-gold-300); font-weight: 600; }
.g-mem .g-mem-ic { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--sf-gold-300); }
.g-mem span { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-in-h { margin: 2px 0 6px; font: 700 0.74rem/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sec-text); }
.g-in-h small { color: var(--dim); font-weight: 600; margin-left: 4px; }
/* "In this guide": every section a full-width row link */
.g-in ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.g-in a { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0 -8px; padding: 6px 8px; border-radius: var(--sf-radius-sm);
  color: #e6e0d4; text-decoration: none; font-size: 0.9rem; line-height: 1.3; outline: none; transition: background-color 0.15s ease, color 0.15s ease; }
.g-in a::before { content: ""; width: 6px; height: 6px; flex: none; transform: rotate(45deg); background: var(--sec); opacity: 0.8; }
.g-in a::after { content: "\203A"; margin-left: auto; padding-left: 6px; color: var(--sec-text); font-size: 1.1rem; line-height: 1; opacity: 0; transition: opacity 0.15s ease; }
.g-in a:hover, .g-in a:focus-visible { color: var(--sec-text); background: color-mix(in srgb, var(--sec) 13%, transparent); }
.g-in a:active { background: color-mix(in srgb, var(--sec) 20%, transparent); }
.g-in a:hover::before, .g-in a:focus-visible::before { opacity: 1; }
.g-in a:hover::after, .g-in a:focus-visible::after { opacity: 1; }
.g-in a:focus-visible { box-shadow: inset 0 0 0 2px var(--sf-gold-300); }
.g-sec.open .g-list > li.wide .g-in ol { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); column-gap: 22px; }
/* a folder's pages (dungeons, raids): each a card that is one link */
.g-pgs { margin-top: 4px; }
.g-pgs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 8px; }
.g-pg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; height: 100%; padding: 9px 11px; border-radius: var(--sf-radius-sm);
  background: var(--sf-sunken); border: 1px solid var(--line2); text-decoration: none; color: #ece6da; outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease; }
.g-pg:hover, .g-pg:focus-visible { border-color: var(--sec); background: color-mix(in srgb, var(--sec) 13%, var(--sf-sunken)); }
.g-pg:active { background: color-mix(in srgb, var(--sec) 20%, var(--sf-sunken)); }
.g-pg:focus-visible { box-shadow: 0 0 0 2px var(--sf-gold-300); }
.g-pg:hover .nm, .g-pg:focus-visible .nm { color: var(--sec-text); }
.g-pg .nm { font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
.g-pg .lv { font: 600 0.78rem/1.25 var(--body); color: var(--sec-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-pg .wh, .g-pg .ds { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-pg .g-kic { width: 14px; height: 14px; color: var(--sf-gold-300); }
/* the other whole-card links on the home: the featured tier lists and the class chips get the same focus ring */
.g-feature:focus-visible, .g-cchip:focus-visible { outline: 2px solid var(--sf-gold-300); outline-offset: 2px; }

/* The guides sidebar: every entry is already one row link (src/guides.js); here its hover takes its section's colour,
   keyboard focus gets the ring, and touch screens get taller rows. */
.nav-sub a:hover { background: color-mix(in srgb, var(--sec, var(--sf-trim)) 14%, transparent); }
.nav-sub a:focus-visible { outline: 2px solid var(--sf-gold-300); outline-offset: -2px; }
@media (pointer: coarse), (max-width: 720px) {
  :root .nav > .nav-sub a { min-height: 44px; }
}

/* The expand: a View Transition from the card's place to the whole area (guides.js names the card g-panel while it runs) */
::view-transition-group(g-panel) { animation-duration: 0.36s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); overflow: clip; border-radius: 12px; }
::view-transition-old(g-panel), ::view-transition-new(g-panel) { width: 100%; height: 100%; object-fit: none; object-position: left top; }
::view-transition-old(g-panel) { animation-duration: 0.18s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.24s; }
/* no View Transitions: the panel still comes in softly */
@keyframes g-panel-in { from { opacity: 0.4; transform: translateY(6px) scale(0.99); } to { opacity: 1; transform: none; } }
.g-sec.open.swap-in { animation: g-panel-in 0.22s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .g-sec:target, .g-sec.lit { animation: none; box-shadow: var(--sf-frame), 0 0 0 2px var(--sec); }
  .g-top, .g-open, .g-pg, .g-row, .g-in a, .g-in a::after, .g-list .kids a { transition: none; }
  .g-sec.open.swap-in { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (max-width: 720px) {
  .g-sec.open { padding: 16px 14px 22px; min-height: 0; }
  :root .g-sec .card-h h2 { font-size: 1.4rem; }
  .g-sec-ic { width: 60px; height: 60px; }
  .g-sec.open .g-sec-ic { width: 96px; height: 96px; right: 12px; bottom: 12px; }
  .g-sec.open .g-top { margin: -16px -14px 4px; padding: 16px 14px 12px; }
  .g-sec.open .g-row { padding: 12px; grid-template-columns: 34px minmax(0, 1fr) auto; }
  .g-sec.open .g-list .g-ic { width: 34px; height: 34px; }
  .g-sec.open .g-mhead { grid-column: 1 / -1; }
  .g-sec.open .g-more { padding: 2px 12px 14px; }
  /* generous tap targets */
  .g-row { min-height: 52px; padding: 10px 8px; }
  .g-in a { min-height: 44px; padding: 10px 8px; }
  .g-pg { min-height: 48px; padding: 11px 12px; }
  .g-list .kids a { min-height: 40px; padding: 6px 12px; }
}
.g-404 { margin: 10px 0; }

.t-S { --t: #ff5f57; } .t-A { --t: #ff9f43; } .t-B { --t: #f6d155; } .t-C { --t: #6fd39b; } .t-D { --t: #93a4bd; }

/* ---------- hover / tap tips ([data-tip], guides.js) ---------- */
[data-tip] { cursor: help; }
.g-tip { position: fixed; z-index: 9000; max-width: min(300px, calc(100vw - 20px)); padding: 8px 11px; border-radius: 9px; background: #1b1f28;
  border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); color: #e8ebf1; font: 500 0.84rem/1.4 var(--body);
  text-transform: none; letter-spacing: 0; pointer-events: none; }
.g-tip[hidden] { display: none; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .g-search { width: 100%; order: -1; margin-left: 0; }
  .g-search kbd { display: none; }
}
@media (max-width: 1100px) { .g-hero .hero-main { width: auto; } }
@media (max-width: 720px) {
  .gp-page .g-main, .gp-post .g-main, .gp-folder .g-main, .gp-class .g-main, .gp-sources .g-main, .gp-missing .g-main, .gp-classes .g-main {
    background: none; border: 0; border-radius: 0; padding: 0; }
  .gp-class .g-main { overflow: visible; }
  .g-classhead { margin: 0 -14px; padding: 22px 14px 0; }
  .g-tabs { margin: 14px -14px 0; padding: 0 6px; }
  .g-prose { font-size: 16px; }
  .g-prose h2, .g-folder h2 { font-size: 1.45rem; margin-top: 32px; }
  .g-pn, .g-pn.has-up { grid-template-columns: 1fr 1fr; }
  .g-pn .pn-up { grid-column: 1 / -1; grid-row: 1; }
  .g-pn .pn-gap { display: none; }
  .g-toc-m ol { columns: 1; }
  .g-cards { grid-template-columns: minmax(0, 1fr); }
  .g-feature > b { font-size: 1.7rem; }
  .tbl td, .tbl th { padding: 8px 10px; }
  /* 3+ column tables: one card per row, "Header: value" */
  .tbl:has(> table.stack) { border: 0; background: none; overflow: visible; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); margin: 0 0 8px; padding: 6px 0; }
  table.stack tbody tr:nth-child(even) td, table.stack tbody tr:hover td { background: none; }
  table.stack td { border: 0; padding: 4px 12px; display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr); gap: 10px; }
  table.stack td::before { content: attr(data-label); font: 700 0.72rem/1.6 var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
  table.stack td:not([data-label])::before { content: ""; }
  table.stack td:first-child { font-weight: 600; color: #fff; }
  .g-ledger .tbl td { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .g-card, .g-class { transition: none; } .g-card:hover, .g-class:hover { transform: none; } }

/* ---------- "Suggest an edit" (members) ---------- */
.g-sug-btn { margin-left: 8px; vertical-align: middle; border: 1px solid var(--line2); background: transparent; color: var(--dim); border-radius: 999px;
  padding: 2px 9px; font: 600 0.72rem/1.5 var(--body); letter-spacing: 0; text-transform: none; cursor: pointer; opacity: 0.75; }
.g-sug-btn:hover, .g-sug-btn:focus-visible { color: #fff; border-color: var(--red); opacity: 1; }
.g-sug-btn.top { display: block; margin: 0 0 10px auto; }
@media (hover: hover) { h2 > .g-sug-btn { opacity: 0; } h2:hover > .g-sug-btn, h2 > .g-sug-btn:focus-visible { opacity: 0.9; } }
dialog.g-sug { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--line2); border-radius: 14px; padding: 0;
  background: var(--panel, #11141b); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7); }
dialog.g-sug::backdrop { background: rgba(0, 0, 0, 0.6); }
.g-sug-f { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.g-sug-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-sug-top h2 { margin: 0; font: 700 1.2rem/1.2 var(--head); text-transform: uppercase; letter-spacing: 0.04em; }
.g-sug-x { border: 0; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.g-sug-where { margin: 0; color: var(--muted); font-size: 0.9rem; }
.g-sug .seg button { border: 0; cursor: pointer; font: inherit; font-size: 0.88rem; }
#g-sug-md { width: 100%; min-height: 280px; resize: vertical; font: 0.88rem/1.5 var(--mono, ui-monospace, monospace); color: var(--text); background: var(--field);
  border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; }
.g-sug-prev { border: 1px solid var(--line); border-radius: 10px; padding: 2px 14px; max-height: 50vh; overflow: auto; }
.g-sug-help { margin: 6px 0 0; font-size: 0.82rem; color: var(--dim); }
#g-sug-why { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--field); color: var(--text); padding: 0 12px; font: inherit; }
.g-sug-msg { margin: 0; min-height: 1.3em; font-size: 0.9rem; color: var(--muted); }
.g-sug-msg.ok { color: #7fd18b; } .g-sug-msg.err, .g-sug-err { color: #ff8a8e; }
.g-sug-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) { .g-sug-f { padding: 12px; } #g-sug-md { min-height: 220px; } }
