/* Swing Timer's own layout, on top of the dither kit (ui/kit.css, ui/dither.css).
   Only how this app's pages are laid out: the home grids, the tool pages, the gear planner,
   the talent trees, the results. Every colour, size and space is a kit token; the only colours
   of its own are the game's (class colours and item quality, both kit tokens too).
   Texture comes from the kit's --dz-* tiles; nothing here draws a gradient, a glow or a radius. */

/* ---- shared ---- */
/* The heading of an app page starts at the left edge, like the panels under it. */
.sp.hero { max-width: none; margin: 0; }
.sp.hero .lead { margin-bottom: var(--s4); max-width: 110ch; }
.sp.hero .chips { margin: 0 0 var(--s4); }
.sp.hero .rank-note, .sp.hero .rank-heal { margin: 0 0 var(--s4); max-width: 130ch; line-height: 1.45; }
.rank-ties { margin: 0; }
.pad { padding: var(--s5); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin: var(--s5) 0 0; }
.pad > .btn-row:first-child, .pad > p:first-child { margin-top: 0; }
ul.plain { list-style: none; margin: var(--s2) 0 0; padding: 0; }
ul.plain li { margin: var(--s1) 0; line-height: 1.45; }
.prose p { margin: 0 0 var(--s4); color: var(--text-2); line-height: 1.5; }
.prose p:last-child { margin-bottom: 0; }
.prose a, .sp a:not(.btn):not(.cta):not(.hbtn):not(.update-head), .site-foot a, .note a, .alert a { color: var(--info-text); text-decoration: underline; text-underline-offset: 2px; }
kbd { padding: 0 var(--s2); border: 1px solid var(--line-2); background: var(--inset); font: var(--fs-2) var(--font-mono); }
img.ico, .it > img, .it > .ico { width: 18px; height: 18px; flex: none; vertical-align: -4px; margin-right: var(--s3); border: 1px solid var(--line); }
/* The game's own icons (client/icons.js classIcon, specIcon …): a framed square like the item icons, sized by its
   width and height attributes; the role atlases are round badges of their own and go unframed. Beside a drawn
   icon the two sit together in a .gi-pair, where the one icon stood before. */
img.gi { flex: none; display: inline-block; vertical-align: middle; border: 1px solid var(--line-2); background: var(--inset); }
img.gi.gi-atlas { border: 0; background: none; }
img.gi.gi-off { visibility: hidden; }
.gi-pair { display: inline-flex; flex: none; align-items: center; gap: var(--s2); vertical-align: middle; }
.gi-pair > img, .gi-pair > svg, .gi-pair > canvas { margin: 0; vertical-align: 0; }
.tab > img.gi { margin-right: var(--s3); }
.badge > img.gi, .panel > h2 .sub > img.gi { margin-right: var(--s1); }
td.item > .gi-pair { margin-right: var(--s3); }
.it { white-space: nowrap; }
.warn-text { color: var(--warn); }
/* The kit's tone class draws a hairline; these two only want its colour. */
p.note.warn, span.note.warn { border: 0; }
.sd-brand .sd-name a, .sd-brand .sd-name a:hover { text-decoration: none; }
.tab > canvas.dz-crest.sm { margin: 0 var(--s3) 0 0; vertical-align: 0; }
#hdCharName { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
#hdCharName:hover { text-decoration: none; color: var(--text); }
.site-foot { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s5); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); color: var(--dim); font-size: var(--fs-2); line-height: 1.5; }
/* A meter inside a table cell or a toolbar needs a width of its own. */
td.rk-bar { width: 26%; min-width: 120px; }
td.rk-bar .meter { height: 8px; }
/* A build's other races, under its row: set in and quieter. */
tr.rk-sub td { color: var(--dim); }
tr.rk-sub td.item { padding-left: var(--s7); }
tr.rk-sub td.rk-bar .meter { opacity: .6; }
.rk-table button[data-races] { margin-left: var(--s3); }
/* What to know before trusting a build's numbers (game.js SPECS `note`), under its row. */
tr.rk-note td { padding-top: 0; color: var(--text-2); font-size: var(--fs-3); line-height: 1.45; white-space: normal; }
.sim-progress { flex: 0 1 180px; min-width: 100px; height: 8px; }
/* A toolbar that sits inside a panel: the panel is its frame. */
.bar.inner { border: 0; border-bottom: 1px solid var(--line); background: none; }
/* The party of a dungeon-group buff scenario: four class selects in a row. */
.bar .party { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); color: var(--dim); }
.panel > h2 + h2, .panel > .pad + h2, .panel > p + h2 { border-top: 1px solid var(--line); }
.tab-body { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.empty a { color: var(--info-text); text-decoration: underline; }

/* ---- home ---- */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.tool-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: var(--s4) var(--s5); align-items: start; color: var(--text); background-color: var(--inset); }
.tool-card:hover { text-decoration: none; border-color: var(--accent-line); background-color: var(--hover); }
.tool-card img.tool-ico { width: 40px; height: 40px; border: 1px solid var(--line-2); }
.tool-card p { margin: var(--s2) 0 0; color: var(--dim); font-size: var(--fs-3); line-height: 1.45; }
.tool-card .btn { grid-column: 2; justify-self: start; }
.class-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.class-card { background-color: var(--inset); }
.class-card > header, .guide-head { display: flex; align-items: center; gap: var(--s5); }
.class-card > header { margin-bottom: var(--s4); }
.spec-list { display: flex; flex-direction: column; }
.spec-row, .spec-card { display: flex; align-items: center; gap: var(--s2); min-height: 34px; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); color: var(--text); }
.spec-row:hover, .spec-card:hover { text-decoration: none; background: var(--hover); }
.spec-row > .gi-pair + span, .spec-card > .gi-pair + span { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.spec-row small, .spec-card small, .opt small, .item-row small, .gear-slot small { color: var(--dim); font-size: var(--fs-2); font-weight: 400; }
.spec-row img.ico, .spec-card img.ico { width: 24px; height: 24px; vertical-align: 0; }
/* All specs: a spec's row links its Simulator, its builds and its guide. */
div.spec-row:hover { background: none; }
div.spec-row a:hover { text-decoration: underline; }
.spec-row .spec-builds a { color: var(--text-2); }
.spec-row .spec-guide { flex: none; height: var(--ctl-sm); margin-left: var(--s2); }

/* ---- all specs: the overview or the Simulator (html[data-allspecs=sim], set before the body is drawn) ---- */
.view-overview, .view-sim { display: contents; }
html[data-allspecs="sim"] .view-overview, html:not([data-allspecs="sim"]) .view-sim { display: none; }
/* The tier list: a row per tier, its dithered letter (the `tier` scene; the letter is text until
   it is drawn), then the builds in it, best first. */
.tier-list { display: flex; flex-direction: column; }
.tier-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s5); align-items: start; padding: var(--s4) 0; border-top: 1px solid var(--line); }
.tier-row:first-child { border-top: 0; padding-top: 0; }
.tier-row:last-child { padding-bottom: 0; }
.tier-label { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.tier-mark { position: relative; display: grid; place-items: center; width: 48px; height: 48px; background: var(--inset); }
.tier-mark canvas.dz-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.tier-letter { font: 700 28px/1 var(--font-num); }
.tier-mark canvas[data-key] + .tier-letter { color: transparent; }
.tier-cut { color: var(--dim); font: 400 var(--fs-1)/1.2 var(--font-num); white-space: nowrap; }
.tier-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); min-width: 0; }
.tier-none { margin: 0; align-self: center; line-height: 48px; }
.tier-tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3) var(--s4); align-items: center; padding: var(--s3) var(--s4); color: var(--text); background-color: var(--inset); }
.tier-tile:hover { text-decoration: none; border-color: var(--accent-line); background-color: var(--hover); }
.tier-tile .meter { grid-column: 1 / -1; height: 6px; }
.tt-name { display: flex; flex-direction: column; min-width: 0; }
.tt-name b, .tt-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-name small, .tt-fig small { color: var(--dim); font-size: var(--fs-2); font-weight: 400; }
.tt-fig { display: flex; flex-direction: column; align-items: flex-end; font: 600 var(--fs-4)/1.2 var(--font-num); font-variant-numeric: tabular-nums; }
.tt-fig small { font-family: var(--font-ui); }
/* a build on another engine than its table's (render.js engineTag): its badge on a row of its own under the meter */
.tier-tile .tt-engine { grid-column: 1 / -1; justify-self: start; }
.tt-tie { color: var(--text-2); }
.tier-note { margin: 0; max-width: 150ch; line-height: 1.5; }
.tier-note a { color: var(--info-text); text-decoration: underline; }
.home-char { gap: var(--s4) var(--s5); }
.home-char a { color: var(--info-text); text-decoration: underline; }
/* Posts: the rows of the home page's lists and of /updates/ (a row links to its post), /blog's list, the featured
   article's card, a post's page. */
.updates { list-style: none; margin: 0; padding: 0; }
.update { border-bottom: 1px solid var(--line); }
.update-head { display: flex; align-items: baseline; gap: var(--s5); padding: var(--s3) var(--s5) 0; color: var(--text); text-decoration: none; }
a.update-head:hover > span:nth-of-type(1) { color: var(--info-text); text-decoration: underline; text-underline-offset: 2px; }
.update-head time { flex: none; width: 104px; color: var(--dim); font: var(--fs-2) var(--font-num); }
.update-head > span:nth-of-type(1) { flex: 1 1 0; min-width: 0; font-weight: 600; }
.update-sum { margin: var(--s1) var(--s5) var(--s3) calc(104px + var(--s5) * 2); color: var(--text-2); font-size: var(--fs-3); line-height: 1.45; }
ol.posts { list-style: none; margin: var(--s6) 0 0; padding: 0; border-top: 1px solid var(--line); }
.post-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; column-gap: var(--s6); align-items: baseline; padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.post-item time { grid-row: 1 / 3; color: var(--dim); font: var(--fs-3) var(--font-num); }
.sp .post-item h2 { margin: 0; font-size: var(--fs-6); }
.sp .post-item p { grid-column: 2; margin: var(--s2) 0 0; font-size: var(--fs-4); }
.post-item .hbtn { grid-column: 3; grid-row: 1 / 3; align-self: center; }
.sp .post-updates { margin: var(--s6) 0; border-top: 1px solid var(--line); }
.sp .post-updates .update-head { padding-left: 0; }
.sp .post-updates .update-sum { margin-left: calc(104px + var(--s5)); }
/* The featured article (the pinned one, else the newest; /blog/ and the home page): its preview picture beside its
   words. The picture's width and height are in the markup and its box keeps their ratio, so nothing moves as it loads. */
.post-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6); align-items: center; }
.post-feature-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--line); }
.post-feature-copy > * { margin: 0 0 var(--s3); }
.post-feature-copy > :last-child { margin-bottom: 0; }
.post-feature-copy .badge { margin: 0 var(--s2) 0 0; }
.post-feature-copy :is(h2, h3) { font-size: var(--fs-6); font-weight: 600; line-height: 1.25; }
.post-feature-copy :is(h2, h3) a { color: var(--text); text-decoration: none; }
.post-feature-copy :is(h2, h3) a:hover { color: var(--info-text); text-decoration: underline; text-underline-offset: 2px; }
.post-feature-copy > p:not(.note):not(.btn-row) { color: var(--text-2); line-height: 1.5; }
.sp .post-feature { margin: var(--s6) 0; }
.home-articles > .pad + .updates { border-top: 1px solid var(--line); }
.home-articles > .pad + .btn-row { margin-top: 0; padding-top: 0; }
.sp.post { width: 100%; max-width: 820px; }
.post-body { font-size: var(--fs-5); }
.post-body > p { margin: 0 0 var(--s5); line-height: 1.6; }
.post-body .scroll { margin: var(--s5) 0 var(--s2); overflow-x: auto; }
.post-body .update-table caption { caption-side: top; text-align: left; padding: 0 0 var(--s3); color: var(--text); font-weight: 600; }
.post-body > .note { margin: 0 0 var(--s5); font-size: var(--fs-3); line-height: 1.45; }
.alert.callout { margin: var(--s5) 0; padding-right: var(--s5); font-size: var(--fs-4); line-height: 1.5; }
/* A post's revisions (client/updates.js revisionsHtml): the note, and the list in the kit's disclosure. */
.alert.revisions > p { margin: 0 0 var(--s3); }
.alert.revisions details.setup { margin: 0; color: var(--text); }
.revision-list ol { margin: var(--s3) 0 0; padding-left: var(--s5); }
.revision-list ol > li + li { margin-top: var(--s4); }
.revision-list p { margin: 0 0 var(--s2); }
.revision-list ul { margin: 0 0 var(--s2); padding-left: var(--s5); color: var(--text-2); }
/* A scene inside a post (the healers' section): a strip, not a poster. */
.post-body canvas.dz-scene.post-scene { display: block; width: 216px; height: 64px; margin: 0 0 var(--s5); }
.post .share-card { margin: var(--s7) 0 var(--s5); }
.post .share-card > h2 { font: 600 var(--fs-4)/1.2 var(--font-display); margin: 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin: var(--s5) 0; }
.post-nav a { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4) var(--s5); border: 1px solid var(--line); background: var(--panel); font-weight: 600; }
.post-nav a:hover { border-color: var(--accent); }
.post-nav .post-older { text-align: right; }
.post-nav .note { font-weight: 400; }
/* Charts in a post (client/updates.js chartHtml): one svg laid out for wide screens, one for phones. */
.chart { margin: var(--s6) 0; padding: var(--s5); background: var(--panel); border: 1px solid var(--line); }
.chart figcaption { margin: 0 0 var(--s5); color: var(--text); font-weight: 600; font-size: var(--fs-5); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .chart-wide { max-width: 720px; }
.chart .chart-narrow { display: none; max-width: 480px; }
.chart text { fill: var(--text-2); font-family: var(--font-ui); font-size: 12px; paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.chart text.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.chart text.dim { fill: var(--dim); }
.chart text.ref-label, .chart text.mark-label { fill: var(--text); }
.chart line.grid { stroke: var(--line); }
.chart line.axis { stroke: var(--line-2); }
.chart line.ref { stroke: var(--text); stroke-dasharray: 4 3; }
.chart line.median, .chart line.mark { stroke: var(--text); stroke-width: 2; }
.chart .tone-accent { color: var(--accent); } .chart .tone-good { color: var(--good); } .chart .tone-warn { color: var(--warn); }
.chart .tone-gold { color: var(--gold); } .chart .tone-dim { color: var(--dim); }
/* Points and dots are plain squares (no fill attribute, so the kit does not print them as bars). */
.chart rect.pt { fill: currentColor; }
.sp .chart > p.note { margin: var(--s4) 0 0; font-size: var(--fs-3); color: var(--dim); line-height: 1.45; }
.chart-data { margin-top: var(--s4); }
.chart-data .scroll { max-height: 320px; overflow: auto; }
.mini-h { margin: var(--s5) 0 var(--s2); font-size: var(--fs-3); font-weight: 600; }
.mini-h:first-child { margin-top: 0; }
.mini-h a { color: var(--info-text); }
table.mini td.rk-bar { width: 30%; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s5); font-size: var(--fs-3); }
.guide-grid > div { display: flex; flex-direction: column; gap: var(--s1); }
.guide-grid a { color: var(--text-2); }
.sp .card { margin: var(--s5) 0; }
/* A page's sections under its h1 are h2 (KIT.md, text page); a card that is one keeps the card title's look. */
.sp.text > :is(h2, h3), .sp.guide > :is(h2, h3) { margin-top: var(--s7); }
.sp .card > h2 { font-weight: 600; line-height: 1.25; }
.sp.text ol.steps, .sp.text ul:not(.updates) { margin: var(--s4) 0 var(--s4) var(--s7); padding: 0; }
.sp.text ol.steps li, .sp.text ul:not(.updates) li { margin: var(--s3) 0; }
.guide-head { margin-bottom: var(--s4); }
.guide-head canvas.dz-scene { width: 192px; height: 48px; }
.guide-head h1 { margin: 0; }
.guide-head .lead { margin: 0; }
/* Class guides (scripts/guides.mjs). /guides/<spec>/ is one article: its top, its contents (under the top on narrow
   screens, a sticky column beside the sections on wide ones), its sections. /guides/ lists every class's specs. */
.sp.guide-page { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s7); max-width: 1140px; margin: 0; }
.guide-page > .g-top, .guide-page > .g-body, .guide-page > .toc { min-width: 0; max-width: 880px; }
.guide-page .guide-head { align-items: flex-start; }
.guide-page .guide-head .lead { max-width: 80ch; margin-top: var(--s3); color: var(--text-2); line-height: 1.5; }
.guide-page .chips { margin: var(--s4) 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: 0 0 var(--s5); padding: 0; list-style: none; font-size: var(--fs-3); }
.crumbs li { margin: 0; color: var(--dim); }
.crumbs li + li::before { content: "/"; margin-right: var(--s3); color: var(--line-2); }
.crumbs [aria-current] { color: var(--text-2); }
.toc { margin: var(--s6) 0 0; padding: var(--s4) var(--s5); background: var(--panel); border: 1px solid var(--line); font-size: var(--fs-3); }
.toc .toc-h { margin: 0 0 var(--s3); color: var(--dim); font: 600 var(--fs-1)/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.sp.text .toc ol { columns: 2 220px; column-gap: var(--s7); margin: 0; padding: 0 0 0 var(--s6); }
.sp.text .toc li { margin: 0 0 var(--s2); break-inside: avoid; color: var(--dim); }
.sp .toc a:not(.btn) { color: var(--text-2); text-decoration: none; }
.sp .toc a:hover { color: var(--info-text); text-decoration: underline; }
.g-sec { scroll-margin-top: var(--s5); }
.sp .g-sec > h2 { margin: var(--s7) 0 var(--s4); padding-top: var(--s6); border-top: 1px solid var(--line); font-size: var(--fs-7); }
.sp .g-sec h3 { margin: var(--s6) 0 var(--s3); font-size: var(--fs-6); }
.g-sec > p, .g-sec .faq-item > p, .g-sec dd { max-width: 80ch; }
.sp.text ul.tldr { list-style: none; margin: 0; padding: var(--s5) var(--s6); background: var(--inset); border: 1px solid var(--line); border-left: 2px solid var(--good); }
.sp.text ul.tldr li { position: relative; margin: 0 0 var(--s3); padding-left: var(--s6); color: var(--text); }
.sp.text ul.tldr li:last-child { margin-bottom: 0; }
ul.tldr li::before { content: "▸"; position: absolute; left: 0; color: var(--good); }
/* Key facts (scripts/aeo.mjs keyFactsHtml): a guide's and a spec page's numbers, each with its date and source */
.key-facts { margin: var(--s5) 0 0; padding: var(--s4) var(--s5); background: var(--inset); border: 1px solid var(--line); border-left: 2px solid var(--accent); }
.sp .key-facts h2 { margin: 0 0 var(--s3); font-size: var(--fs-5); }
.key-facts ul { margin: 0; padding: 0 0 0 var(--s5); }
.key-facts li { margin: 0 0 var(--s3); max-width: 80ch; color: var(--text); line-height: 1.5; }
.key-facts li:last-child { margin-bottom: 0; }
.key-facts .fact-src { color: var(--dim); font-size: var(--fs-2); }
/* a priority list: its number, the spell's icon, the spell, when, and why */
.sp.text ol.prio { counter-reset: prio; list-style: none; margin: var(--s5) 0; padding: 0; border-top: 1px solid var(--line); }
.sp.text ol.prio > li { counter-increment: prio; display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: var(--s4); align-items: start; margin: 0; padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
ol.prio > li::before { content: counter(prio); color: var(--dim); font: 600 var(--fs-4)/24px var(--font-num); text-align: right; }
img.sp-ico { display: block; width: 24px; height: 24px; border: 1px solid var(--line-2); }
ol.prio b, ul.cds b { color: var(--text); font-size: var(--fs-5); }
ol.prio .when { color: var(--text-2); }
.sp ol.prio li p, .sp ul.cds li p { margin: var(--s2) 0 0; color: var(--dim); font-size: var(--fs-4); }
.sp.text ul.cds { list-style: none; margin: var(--s4) 0; padding: 0; }
.sp.text ul.cds > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); margin: 0 0 var(--s5); }
/* every line of the sim's priority list, folded */
details.setup.apl { margin: var(--s5) 0 0; }
details.apl > summary { cursor: pointer; }
details.apl > p.note { margin: var(--s4) 0 0; font-size: var(--fs-3); }
.sp.text details.apl ol.apl-list { margin: var(--s4) 0 0 var(--s7); padding: 0; }
.sp.text details.apl ul { margin: var(--s2) 0 var(--s2) var(--s6); }
.sp.text details.apl li { margin: var(--s2) 0; font-size: var(--fs-3); }
details.apl li b { color: var(--text); font-weight: 600; }
.sp details.apl li.off, .sp details.apl li.off b { color: var(--dim); }
details.apl .when { color: var(--text-2); }
/* talents */
.talent-string { padding: var(--s1) var(--s3); background: var(--inset); border: 1px solid var(--line); color: var(--text-2); font: var(--fs-3) var(--font-mono); overflow-wrap: anywhere; }
dl.key-talents { margin: var(--s4) 0 0; }
dl.key-talents dt { display: flex; align-items: center; gap: var(--s4); margin: var(--s5) 0 var(--s2); color: var(--text); font-weight: 600; }
dl.key-talents dd { margin: 0 0 0 32px; color: var(--text-2); line-height: 1.5; }
.g-sec .scroll { margin: var(--s4) 0 0; overflow-x: auto; }
.talent-table caption { caption-side: top; text-align: left; padding: 0 0 var(--s3); color: var(--dim); font-size: var(--fs-3); }
.talent-table td.item { color: var(--text); }
.talent-table .t-name { display: flex; align-items: center; gap: var(--s4); }
.talent-table td.t-desc { min-width: 260px; color: var(--text-2); font-size: var(--fs-3); line-height: 1.45; white-space: normal; }
.stat-test { padding: var(--s4) var(--s5); background: var(--inset); border: 1px solid var(--line); }
.guide-stats { margin: var(--s4) 0; }
.guide-stats + p.note { margin: 0 0 var(--s4); font-size: var(--fs-3); line-height: 1.45; }
.guide-tools { margin: var(--s4) 0 0; }
.guide-tools .card h3 { display: flex; align-items: center; gap: var(--s4); }
.guide-tools img.tool-ico { width: 28px; height: 28px; border: 1px solid var(--line-2); }
.sp .guide-tools .card p { margin: var(--s3) 0 0; font-size: var(--fs-4); }
.faq-item h3 { color: var(--text); }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s6); }
.sp .related h3 { margin-top: 0; }
.sp.text .related ul.plain { margin: 0; }
.sp.text .related ul.plain li { margin: 0 0 var(--s2); }
/* the hub: each class a panel, each spec a card */
.guide-class > h2 > .gi-pair { gap: var(--s3); }
ul.guide-list { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s5); }
ul.guide-list > li { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); background: var(--inset); border: 1px solid var(--line); }
ul.guide-list .g-name { color: var(--text); font-weight: 600; font-size: var(--fs-5); }
ul.guide-list .badge { align-self: flex-start; }
ul.guide-list p { margin: 0; color: var(--text-2); font-size: var(--fs-3); line-height: 1.45; }
ul.guide-list .hbtn { align-self: flex-start; }
/* The data answers (scripts/answers.mjs): the question's direct answer first, in a box of its own; tables whose rows a
   guide links to (#<spec's guide slug>); the home page's list of the questions; a guide's "Answered with data" list. */
.sp.text p.direct-answer { max-width: 80ch; margin: var(--s4) 0 0; padding: var(--s5) var(--s6); background: var(--inset); border: 1px solid var(--line); border-left: 2px solid var(--good); color: var(--text); font-size: var(--fs-5); line-height: 1.55; }
.answer-page .g-sec .scroll + .scroll, .answer-page .g-sec h3 + .scroll { margin-top: var(--s5); }
table.answer-table caption { caption-side: top; text-align: left; padding: 0 0 var(--s3); color: var(--text); font-weight: 600; }
table.answer-table th[scope="row"] { font-weight: 400; text-align: left; white-space: normal; min-width: 160px; }
table.answer-table td { white-space: normal; min-width: 64px; }
table.answer-table td.num { white-space: nowrap; }
table.answer-table tr[id] { scroll-margin-top: var(--s7); }
table.answer-table tr:target > * { background: var(--inset); }
.answer-page ul.method li, .answer-page ul.limits li { max-width: 80ch; line-height: 1.5; }
ul.answer-links { columns: 2 320px; column-gap: var(--s7); margin: 0; padding: var(--s4) var(--s5) 0 calc(var(--s5) + var(--s6)); font-size: var(--fs-4); }
ul.answer-links li { margin: 0 0 var(--s3); break-inside: avoid; }
.related .related-answers { grid-column: 1 / -1; }
/* The best-in-slot pages (scripts/bis.mjs): the set's total stats in columns; where to farm it, dungeon by dungeon,
   each boss with the pieces it drops; on a phone each slot of the set (and of a tank's threat-only set) as a block (the
   slot and its worth over the next best on top, the item, then where it comes from and its enchant), so nothing of it
   hides to the right. */
.sp.text ul.stat-list { list-style: none; margin: var(--s4) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 var(--s6); font-size: var(--fs-4); }
.sp.text ul.stat-list li { display: flex; justify-content: space-between; gap: var(--s4); margin: 0; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sp.text ul.stat-list li b { font-weight: 400; color: var(--text-2); }
.sp.text ul.farm-list { list-style: none; margin: var(--s3) 0 var(--s4); padding: 0; }
.sp.text ul.farm-list li { margin: 0; padding: var(--s3) 0; border-bottom: 1px solid var(--line); line-height: 1.7; }
.sp.text ul.farm-list .it { white-space: normal; }
.bis-page .g-sec h3 .count { margin-left: var(--s3); color: var(--text-2); font-weight: 400; font-size: var(--fs-3); }
table.bis-table .badge { margin-left: var(--s2); }
@media (max-width: 700px) {
  table.bis-set, table.bis-set tbody { display: block; }
  table.bis-set caption { display: block; white-space: normal; }
  table.bis-set thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.bis-set tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s5); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
  table.bis-set tr > th, table.bis-set tr > td { display: block; height: auto; min-width: 0; padding: 0; border: 0; white-space: normal; text-align: left; }
  table.bis-set th[scope="row"] { grid-area: 1 / 1; min-width: 0; color: var(--text-2); font-size: var(--fs-2); }
  table.bis-set td:nth-child(2) { grid-area: 2 / 1; }
  table.bis-set td:nth-child(2) .it { white-space: normal; }
  table.bis-set td:nth-child(5) { grid-area: 1 / 2 / 3 / 3; align-self: center; text-align: right; }
  table.bis-set td:nth-child(3), table.bis-set td:nth-child(4) { grid-column: 1 / -1; color: var(--text-2); font-size: var(--fs-3); }
}
@media (min-width: 1400px) {
  .sp.guide-page { grid-template-columns: minmax(0, 880px) 230px; grid-template-areas: "top toc" "body toc"; }
  .guide-page > .g-top { grid-area: top; }
  .guide-page > .g-body { grid-area: body; }
  .guide-page > .toc { grid-area: toc; align-self: start; position: sticky; top: var(--s5); margin: 0; }
  .sp.text .toc ol { columns: auto; }
}
@media (max-width: 700px) {
  /* the swing scene and the game's class and spec icons on one line, the title under them */
  .guide-head { flex-wrap: wrap; gap: var(--s4); }
  .guide-head > div { flex: 1 1 100%; }
  .sp.text .toc ol { columns: auto; }
  .sp.text ol.prio > li { grid-template-columns: 18px auto minmax(0, 1fr); gap: var(--s3); }
  dl.key-talents dd { margin-left: 0; }
  /* the talent table fits a phone: the tree is in the caption's points, names and the header wrap, the text takes the rest */
  .talent-table th:nth-child(2), .talent-table td:nth-child(2) { display: none; }
  .talent-table thead th { white-space: normal; }
  .talent-table td.item { padding-block: var(--s2); white-space: normal; }
  .talent-table td.t-desc { min-width: 0; }
}

/* ---- forms (auth, encounter, the report dialog) ---- */
.auth-wrap { max-width: 460px; margin: 0 auto; width: 100%; }
.card.auth > h2 { margin: 0; font-size: var(--fs-5); font-weight: 600; line-height: 1.25; }
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; margin: var(--s4) 0; }
.field > label { color: var(--text-2); font-size: var(--fs-3); font-weight: 600; }
.field > input, .field > select, .field > textarea { width: 100%; }
.form-msg { min-height: 16px; margin: var(--s3) 0 0; font-size: var(--fs-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 var(--s5); }
.form-grid .field { margin: 0 0 var(--s4); }
form.armory { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); font-size: var(--fs-3); color: var(--dim); }
form.armory label { display: inline-flex; align-items: center; gap: var(--s2); }
form.armory input[type=text] { width: 180px; }

/* ---- Report an issue (the kit's dialog, on every page; client/report.js) ---- */
.modal > .card.report-modal { width: min(640px, 96vw); }
.report-modal textarea { width: 100%; resize: vertical; }
.report-modal input[type=text], .report-modal select { width: 100%; }
.report-modal .rp-opt { color: var(--dim); font-weight: 400; }
.report-modal .rp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.report-modal fieldset.rp-ctx { margin: var(--s5) 0 var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--line); background: var(--inset); min-width: 0; }
.report-modal .rp-ctx legend { padding: 0 var(--s2); color: var(--text); font-weight: 600; }
.report-modal .rp-ctx .help { margin: 0 0 var(--s3); }
.rp-item { display: flex; align-items: flex-start; gap: var(--s4); padding: var(--s2) 0; font-size: var(--fs-3); line-height: 1.4; cursor: pointer; }
.rp-item input { flex: none; margin-top: 2px; }
.rp-item b { color: var(--text-2); font-weight: 600; }
.rp-item .rp-v { color: var(--dim); font-family: var(--font-mono); font-size: var(--fs-2); overflow-wrap: anywhere; }
.rp-item.off { opacity: .6; cursor: default; }
.report-modal .err.profit { color: var(--good); }
.report-modal .rp-thanks { font-size: var(--fs-5); }
.report-res { margin: var(--s4) 0 0; text-align: right; }
.report-res .hbtn { font-size: var(--fs-3); color: var(--dim); }
/* Real logs from Warcraft Logs (client/realworld.js): the tier list and rankings panel, the guide card, the line under a result. */
.rw-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--s5) var(--s6); }
.rw-spec { display: flex; flex-direction: column; gap: var(--s1); }
.rw-line p { margin: 0; line-height: 1.5; }
.rw-line p + p { margin-top: var(--s2); }
.rw-line details.setup { margin-top: var(--s2); padding: var(--s2) var(--s4); }
.rw-src { color: var(--info-text); text-decoration: underline; }
.rw-panel [data-rw-note] { margin: 0 0 var(--s5); }
.rw-result { margin: var(--s5) 0; padding: var(--s4) var(--s5); border-left: 2px solid var(--info-text); background: var(--panel); }
.rw-result p { margin: 0 0 var(--s3); max-width: 110ch; line-height: 1.5; }
.rw-result details.setup { margin-bottom: var(--s3); }
/* The drawer's copy of the top bar's button: only where the sidebar is a drawer. */
.sd-report { display: none; padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .sd-report { display: block; } }

/* ---- the six tools ---- */
textarea.code { height: 132px; min-height: 60px; resize: vertical; white-space: pre; }
textarea.code.tall { height: 360px; margin: var(--s5); width: calc(100% - var(--s5) * 2); }
/* The character: the first step without one, its bar with one. html[data-char] says which
   (set before the page is drawn, then kept by tools.js); the tool's own blocks need a character. */
html:not([data-char]) .needs-char { display: none; }
html[data-char] #charStart { display: none; }
.char-start .pad { max-width: 880px; }
.char-start textarea.code { height: 64px; }
.char-start .note { margin: var(--s3) 0 0; }
.char-start .btn-row { margin-top: var(--s4); }
.saved-chars { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.saved-chars:empty { display: none; }
.char-bar { gap: var(--s3) var(--s4); }
.char-bar canvas.dz-avatar { width: 28px; height: 28px; }
.char-bar .chips { margin: 0; gap: var(--s3); }
.char-bar .chip { padding: 2px var(--s4); font-size: var(--fs-2); }
.char-spec { font-weight: 600; }
button.badge { height: var(--ctl-sm); padding: 0 var(--s4); margin: 0; background: none; font: inherit; font-size: var(--fs-2); cursor: pointer; }
button.badge.warn:hover { background: var(--warn-bg); }
.char-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.char-id b { font-size: var(--fs-5); }
.import-msg:empty { display: none; }
.import-msg > .empty { min-height: 0; }
.modal > .card.char-modal { width: min(760px, 96vw); }
.modal > .card.char-details { width: min(980px, 96vw); }
.char-modal .fsubs { margin: var(--s4) 0; }
.char-modal textarea.code { height: 160px; }
.char-modal .err > .alert, .char-modal .err > .empty { margin-top: var(--s4); }
[data-details-body] { display: grid; gap: var(--s4); margin-top: var(--s4); grid-template-columns: minmax(0, 1fr); }
[data-details-body] > * { margin: 0; }
details.setup ul.plain { color: var(--text-2); }
details.setup > .scroll { margin-top: var(--s3); }
.tool-area > .note, .tool-area > .chips { margin: var(--s4) var(--s5); }
.tool-area > p.note { color: var(--text-2); font-size: var(--fs-3); line-height: 1.45; }
.pick-table td { height: auto; padding-top: var(--s2); padding-bottom: var(--s2); vertical-align: top; }
td.alts { white-space: normal; }
.alt { display: flex; align-items: center; gap: var(--s3); min-height: 22px; }
.add-list { display: flex; flex-wrap: wrap; gap: var(--s3); flex: 1 1 100%; }
.add-list .hbtn .it > img { margin-right: var(--s2); }
.result-box { padding: var(--s5); display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.result-box > *, .result-box > .alert, .result-box > details.setup { margin: 0; }
.result-box > .scroll { border: 1px solid var(--line); }
/* The share card under a result (client/share.js): the text as it will be pasted, the copy buttons. */
.share-text { margin: 0; padding: var(--s5); background: var(--inset); border: 1px solid var(--line); color: var(--text); font: var(--fs-5)/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.share-text .share-rank { cursor: help; text-decoration: underline dotted var(--line-2); text-underline-offset: 4px; }
.share-text .share-pending { color: var(--dim); }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin: var(--s5) 0 var(--s4); }
.share-actions .cta { height: 30px; padding: 0 var(--s6); font-weight: 600; font-size: var(--fs-4); }
.share-actions .share-url { flex: 1 1 260px; min-width: 0; font-family: var(--font-mono); }
.share-actions [data-share-msg] { flex: 1 1 100%; }
.share-actions [data-share-msg]:empty { display: none; }
.share-card p.note { margin: 0; }
.panel > h2 .share-jump { margin-left: auto; }
.res-cards { gap: var(--s5); }
p.engine { margin: 0; color: var(--text-2); font-size: var(--fs-3); line-height: 1.45; }
p.engine b { color: var(--text); }
.tl-chart { display: block; width: 100%; height: auto; }
.tl-label { fill: var(--dim); font: 10px var(--font-mono); }
dl.cfg, dl.kv { margin: 0; font-size: var(--fs-3); }
dl.cfg dt { margin-top: var(--s4); color: var(--dim); font: 600 var(--fs-1)/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
dl.cfg dt:first-child { margin-top: 0; }
dl.cfg dd { margin: var(--s1) 0 0; color: var(--text-2); line-height: 1.5; overflow-wrap: anywhere; }
dl.kv { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s5); }
dl.kv dt { min-height: 22px; color: var(--dim); border-bottom: 1px solid var(--line); }
dl.kv dd { margin: 0; min-height: 22px; text-align: right; font: var(--fs-2)/22px var(--font-num); border-bottom: 1px solid var(--line); }
.log-list { margin: 0; padding: var(--s4) var(--s5) var(--s4) 48px; max-height: 420px; overflow: auto; color: var(--text-2); font: var(--fs-2)/1.6 var(--font-mono); }
.log-list b { color: var(--dim); font-weight: 400; margin-right: var(--s4); }
table.rank-table td.item { max-width: none; white-space: normal; }
table.rank-table td { height: auto; min-height: var(--row); padding-top: var(--s1); padding-bottom: var(--s1); }
table.rank-table .id { display: block; margin: 0; }

/* ---- simulator: gear planner ---- */
#simBar canvas.dz-scene { width: 128px; height: 32px; }
#simBar > b { font-size: var(--fs-5); }
.gear-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: var(--s5); align-items: start; }
.gear-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); padding: var(--s5); }
.gear-slot { display: flex; align-items: center; gap: var(--s4); min-height: 48px; padding: var(--s2) var(--s4); background: var(--inset); border: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.gear-slot:hover { border-color: var(--accent-line); background: var(--hover); }
.gear-slot.unusable { opacity: .55; }
/* What the worn gear is, against the content phase: sits right under the slots. */
.gear-phase { padding-top: 0; }
.gear-phase .chips { margin-top: 0; }
.gear-phase .note { margin: var(--s3) 0 0; line-height: 1.45; }
.slot-icon { flex: none; width: 36px; height: 36px; border: 1px solid var(--line-2); background: var(--bg); }
.slot-icon img { display: block; width: 100%; height: 100%; }
.slot-copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.slot-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.slot-copy strong.none { color: var(--dim); font-weight: 400; }
.slot-copy em { color: var(--good-text); font-size: var(--fs-2); font-style: normal; }
.slot-copy em.neg { color: var(--bad); }
.slot-level { flex: none; color: var(--dim); font: var(--fs-3) var(--font-num); }
.set-block p { margin: 0 0 var(--s1); }
.set-block + .set-block { margin-top: var(--s4); }
.set-block li { font-size: var(--fs-2); }

/* ---- simulator: settings, rotation ---- */
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s2) var(--s5); }
.opt { display: flex; align-items: center; gap: var(--s3); min-height: 34px; padding: var(--s1) var(--s2); cursor: pointer; }
.opt:hover { background: var(--hover); }
.opt.dim { opacity: .55; }
.opt > .gi-pair + span { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.opt img.ico { width: 24px; height: 24px; margin: 0; vertical-align: 0; }
.spec-cards { display: flex; flex-direction: column; }
.spec-card:first-child { border-top: 0; }
.spec-card { position: relative; padding-left: var(--s4); }
.spec-card.on { background: var(--raised); }
.spec-card.on::before, .item-row.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent) var(--dz-vmark) left top / var(--dz-vmark-size); }
.rotation-list { margin: 0; padding-left: calc(var(--s5) + 22px); }
.rotation-list li { padding-left: 0; }
.rotation-list li::marker { color: var(--dim); font: var(--fs-2) var(--font-num); }
/* the Rotation tab's imported rotation's name (client/sim.js), as wide as the armory's name field */
#aplImportName { width: 180px; }
.check-list { display: flex; flex-direction: column; gap: var(--s3); font-size: var(--fs-3); }
.check-list label { display: flex; align-items: center; gap: var(--s3); }
.picker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin: 0 0 var(--s4); font-size: var(--fs-3); color: var(--dim); }
.picker-tools input[type=search], .picker-tools input[type=text] { flex: 1 1 200px; width: auto; }
.var-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 var(--s4); max-height: 340px; overflow: auto; border: 1px solid var(--line); background: var(--inset); }
button.chip { cursor: pointer; font: inherit; font-size: var(--fs-3); }
button.chip:hover { color: var(--text); border-color: var(--bad-line); }

/* ---- simulator: talents ---- */
.trees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.tree-board { position: relative; width: 240px; max-width: 100%; margin: var(--s5) auto; }
.talent { position: absolute; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); background: var(--inset); cursor: pointer; }
.talent img { display: block; width: 100%; height: 100%; opacity: .35; filter: grayscale(1); }
.talent.can img { opacity: .75; filter: none; }
.talent.learned img { opacity: 1; filter: none; }
.talent.can { border-color: var(--good-line); }
.talent.learned { border-color: var(--good); }
.talent.maxed { border-color: var(--gold); }
.talent span { position: absolute; right: -6px; bottom: -6px; padding: 0 3px; background: var(--bg); border: 1px solid var(--line-2); color: var(--dim); font: var(--fs-1)/1.3 var(--font-num); }
.talent.learned span { color: var(--good); border-color: var(--good-line); }
.talent.maxed span { color: var(--gold); }
/* the arrow from a talent to the one it opens: a 2px line and its head, lit once the talent above is full */
.talent-arrow { position: absolute; color: var(--line-2); background: currentColor; pointer-events: none; }
.talent-arrow.down { width: 2px; }
.talent-arrow.right { height: 2px; }
.talent-arrow::after { content: ''; position: absolute; border: 5px solid transparent; }
.talent-arrow.down::after { left: -4px; bottom: -6px; border-bottom: 0; border-top: 6px solid currentColor; }
.talent-arrow.right::after { top: -4px; right: -6px; border-right: 0; border-left: 6px solid currentColor; }
.talent-arrow.on { color: var(--gold); }
#talentInfo { min-height: 58px; }

/* ---- simulator: the item picker (the kit's dialog) and the item tooltip ---- */
.modal > .card.picker { width: min(860px, 96vw); display: flex; flex-direction: column; }
.item-list { flex: 1 1 auto; min-height: 160px; max-height: 52vh; overflow: auto; border: 1px solid var(--line); background: var(--inset); }
.item-row { position: relative; display: flex; align-items: center; gap: var(--s4); width: 100%; min-height: 38px; padding: var(--s2) var(--s4); background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.item-row:hover { background: var(--hover); }
.item-row.on { background: var(--sel); }
.item-row > span:nth-of-type(1) { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.item-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row img.ico { width: 28px; height: 28px; margin: 0; vertical-align: 0; }
.item-row .score { flex: none; color: var(--dim); font: var(--fs-2) var(--font-num); }
.wh-tip { position: fixed; z-index: 10000; display: flex; align-items: flex-start; gap: var(--s3); pointer-events: none; }
.wh-tip[hidden] { display: none; }
.wt-icon { width: 40px; height: 40px; border: 1px solid var(--line-2); }
.wt-box { width: 300px; padding: var(--s4) var(--s5); background: var(--inset); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text); font-size: var(--fs-3); line-height: 1.45; }
.wt-name { font-size: var(--fs-5); font-weight: 600; }
.wt-name.q-Poor { color: var(--q0); } .wt-name.q-Common { color: var(--q1); } .wt-name.q-Uncommon { color: var(--q2); }
.wt-name.q-Rare { color: var(--q3); } .wt-name.q-Epic { color: var(--q4); } .wt-name.q-Legendary { color: var(--q5); }
.wt-ilvl, .wt-setname { color: var(--gold); }
.wt-setname { margin-top: var(--s4); }
.wt-pair { display: flex; justify-content: space-between; gap: var(--s5); }
.wt-green { color: var(--q2); }
.wt-grey { color: var(--dim); }
.wt-red { color: var(--bad); }
.wt-piece { padding-left: var(--s5); }
.wt-note, .wt-foot { margin-top: var(--s3); color: var(--dim); font-size: var(--fs-2); }

/* ---- the welcome (client/onboarding.js) and what a stored profile tailors (client/foryou.js) ----
   html[data-role] is set before the page is drawn (scripts/build.mjs PROFILE_HEAD), so the sidebar's
   "For you" group and the home page's "Your next steps" hold their space from the first paint and
   nothing moves when they are drawn. Without a profile both take no space at all. */
html:not([data-role]) #navYou, html:not([data-role]) #youPanel { display: none; }
/* Without a profile: the welcome's card (scripts/build.mjs inviteCard) in the page's flow, shown from
   the first paint while html[data-invite] is set (a first visit), and the sidebar's "Personalise". */
html:not([data-invite]) .ob-invite, html[data-role] .nav-plan { display: none; }
.bar.ob-invite { gap: var(--s3) var(--s5); }
.ob-invite-copy { flex: 1 1 280px; min-width: 0; color: var(--dim); }
.ob-invite-cls { display: flex; flex-wrap: wrap; gap: var(--s2); }
button.hbtn.ob-invite-c { display: inline-flex; align-items: center; gap: var(--s2); height: 30px; padding: 0 var(--s3); }
button.hbtn.ob-invite-c > canvas.dz-crest.sm { margin: 0; }
.ob-invite > button.x { margin-left: auto; }
#navYou { --you-tab: 23px; display: flex; flex-direction: column; flex: none; min-height: calc(19px + 4 * var(--you-tab) + 6px); padding-bottom: 6px; margin-bottom: var(--s2); }
:root #navYou:not(:empty) { background: var(--dz-sep) repeat-x left bottom / var(--dz-sep-size); }
#navYou .tab { min-width: 0; }
.you-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#youPanel { min-height: 124px; }
#youPanel:empty { border-color: transparent; background: none; }
#youPanel > h2 .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#youPanel > h2 .count .hbtn { font-family: var(--font-ui); }
.you-steps { list-style: none; margin: 0; padding: var(--s5); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 64px; gap: var(--s4); }
.you-step { display: flex; align-items: flex-start; gap: var(--s4); height: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--line); background: var(--inset); color: var(--text); overflow: hidden; }
.you-step:hover { text-decoration: none; border-color: var(--accent-line); background: var(--hover); }
.you-step.first { border-color: var(--good-line); }
.you-n, .ob-n { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-2); color: var(--dim); font: 600 var(--fs-3)/1 var(--font-num); }
.you-step.first .you-n, .ob-card > .ob-list > li:first-child .ob-n { border-color: var(--good-line); background: var(--good-bg); color: var(--good-text); }
.you-copy { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.you-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.you-copy small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--dim); font-size: var(--fs-2); line-height: 1.35; }
/* The dialog: one question at a time, then the plan. */
.modal > .card.ob-card { position: relative; width: min(680px, 96vw); }
.ob-card .ob-close { position: absolute; top: var(--s4); right: var(--s4); }
.ob-card h2:focus { outline: none; }
.ob-card p.note { color: var(--dim); font-size: var(--fs-2); }
.ob-card p.note a { color: var(--info-text); text-decoration: underline; }
canvas.dz-scene.ob-scene { display: block; width: 216px; height: 64px; margin: 0 0 var(--s4); }
canvas.dz-scene.ob-scene.ob-swing { width: 192px; height: 48px; }
.ob-scene-row { display: flex; align-items: center; gap: var(--s4); margin: 0 0 var(--s4); }
.ob-scene-row > canvas.dz-scene.ob-scene { margin: 0; }
.ob-classes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: var(--s5) 0 0; }
button.card.ob-cls { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s4); color: var(--text); font: inherit; cursor: pointer; }
button.card.ob-cls b { font-size: var(--fs-5); }
button.card.ob-cls:hover, button.card.ob-cls.on { border-color: var(--accent); background-color: var(--accent-bg); }
.ob-specs { display: flex; flex-direction: column; margin: var(--s5) 0 0; border-bottom: 1px solid var(--line); }
button.ob-opt { position: relative; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
button.spec-row.ob-opt { min-height: 44px; }
button.ob-opt:hover { background: var(--hover); }
button.ob-opt.on { background: var(--raised); }
button.ob-opt.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent) var(--dz-vmark) left top / var(--dz-vmark-size); }
.ob-exps { display: flex; flex-direction: column; margin: var(--s5) 0 0; border-bottom: 1px solid var(--line); }
button.ob-exp { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4) var(--s5); }
.ob-goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: var(--s5) 0 0; }
label.ob-goal { display: flex; align-items: flex-start; gap: var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--line); background: var(--inset); cursor: pointer; }
label.ob-goal:hover { border-color: var(--dim); }
label.ob-goal:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
label.ob-goal input { margin-top: 2px; }
label.ob-goal > span { display: flex; flex-direction: column; gap: var(--s1); }
button.ob-exp small, label.ob-goal small { color: var(--dim); font-size: var(--fs-2); }
.ob-you { margin: var(--s4) 0 0; }
.ob-list { list-style: none; margin: var(--s5) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s4); }
.ob-list > li { display: flex; align-items: flex-start; gap: var(--s4); }
.ob-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); min-width: 0; }
.ob-copy a:not(.cta), .ob-also a { color: var(--info-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ob-copy small { color: var(--dim); font-size: var(--fs-3); line-height: 1.4; }
.ob-learn { margin: var(--s6) 0 0; padding: var(--s5); border: 1px dashed var(--line-2); }
.ob-learn h3 { margin: 0; font-size: var(--fs-5); }
.ob-learn .ob-list { margin-top: var(--s4); }
details.setup.ob-also { margin: var(--s6) 0 0; }
.ob-also ul.plain { margin-top: var(--s3); }
/* The account page's card: the stored answers. */
.you-card { margin-top: var(--s5); }
.you-id { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 0; font-size: var(--fs-5); }
/* All specs: a tank's or a healer's tier list from the first paint, until client/allspecs.js takes over (html[data-tiers]). */
html[data-role="tank"]:not([data-tiers]) .tier-panel[data-tier-role="dps"], html[data-role="healer"]:not([data-tiers]) .tier-panel[data-tier-role="dps"] { display: none; }
html[data-role="tank"]:not([data-tiers]) .tier-panel[data-tier-role="tank"], html[data-role="healer"]:not([data-tiers]) .tier-panel[data-tier-role="healer"] { display: flex !important; }
@media (max-width: 1100px) {
  #navYou { --you-tab: 32px; }
}
@media (max-width: 900px) {
  #youPanel { min-height: 196px; }
  .you-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  #youPanel { min-height: 316px; }
  #youPanel > h2 { flex-wrap: nowrap; }
  #youPanel > h2 .sub { display: none; }
  #youPanel > h2 .count { margin-left: auto; }
  .you-steps { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 58px; }
  .modal > .card.ob-card { padding: var(--s5); }
  .ob-invite-c > canvas.dz-crest.sm { display: none; }
  .ob-invite > button.x { order: 1; }
  .ob-invite-copy { order: 2; flex-basis: 100%; }
  .ob-invite-cls { order: 3; }
  .ob-goals { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the raid roster (client/roster.js: the Buffs bar's dialog, the Simulator's Settings) and the Raid Sim (client/raid.js) ---- */
.roster-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-bottom: var(--s5); }
.roster-head > .note { flex: 1 1 auto; }
.roster-parties { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s5); }
.roster-party { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; padding: var(--s4); border: 1px solid var(--line); background: var(--inset); }
.roster-party > b { color: var(--text-2); font-size: var(--fs-2); }
.roster-party.own { border-color: var(--line-2); }
.roster-party select { width: 100%; min-width: 0; }
.roster-party select option, .roster-party select optgroup { color: var(--text); }
.roster-party select.raid-unsimmed { color: var(--dim); }
.roster-you { display: block; height: var(--ctl); line-height: calc(var(--ctl) - 2px); padding: 0 var(--s3); border: 1px dashed var(--line-2); color: var(--text); font-size: var(--fs-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-party-buff { text-decoration: underline dotted var(--line-2); text-underline-offset: 3px; }
.roster-acts { white-space: nowrap; }
.roster-acts .btn + .btn { margin-left: var(--s2); }
.roster-adds-panel { margin-top: var(--s5); }
.modal > .card.roster-modal { width: min(1100px, 96vw); max-height: 92vh; overflow-y: auto; }
.bar .roster-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
#raidPanel > p.note { margin: 0; }
.panel > h2 .raid-share { display: inline-flex; gap: var(--s3); margin-left: auto; }
.raid-share-box { display: block; width: calc(100% - 2 * var(--s5)); height: 120px; margin: var(--s5); }
.raid-table td.raid-dps { width: 38%; min-width: 150px; }
.raid-bar { display: flex; align-items: center; gap: var(--s4); }
.raid-bar .meter { flex: 1 1 auto; height: 8px; }
.raid-bar > b { flex: none; min-width: 6ch; font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
/* A tank table's Survival column (client/render.js survCell): effective health, then what it avoided. */
td.rk-surv small { display: block; color: var(--dim); font-size: var(--fs-1); }

/* ---- narrower screens ---- */
@media (max-width: 1280px) {
  .tool-grid, .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trees { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  /* The kit caps panels at 70vh on narrow screens; these pages are one flowing column. */
  main.view.flow .panel { max-height: none; }
  .gear-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .tool-grid, .class-grid, .trees, .gear-slots { grid-template-columns: minmax(0, 1fr); }
  .tier-row { grid-template-columns: 44px minmax(0, 1fr); gap: var(--s4); }
  .tier-mark { width: 40px; height: 40px; }
  .tier-tiles { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .tier-tile { grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s3); padding: var(--s3); }
  .tier-tile > .gi-pair { flex-direction: column; }
  .tt-fig { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: var(--s2); }
  .guide-head canvas.dz-scene { width: 96px; }
  .update-head { flex-wrap: wrap; gap: var(--s1) var(--s4); }
  .update-sum { margin-left: var(--s5); }
  .post-item { grid-template-columns: minmax(0, 1fr); }
  .post-item time, .sp .post-item p, .post-item .hbtn { grid-column: 1; grid-row: auto; }
  .post-feature { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .sp .post-updates .update-sum { margin-left: 0; }
  .post-item .hbtn { justify-self: start; margin-top: var(--s3); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .post-older { text-align: left; }
  .chart { padding: var(--s4); margin-left: calc(var(--s4) * -1); margin-right: calc(var(--s4) * -1); }
  .chart .chart-wide { display: none; }
  .chart .chart-narrow { display: block; }
  .post-body { font-size: var(--fs-4); }
  td.rk-bar { min-width: 70px; }
  .wt-box { width: 240px; }
  #hdCharName { max-width: 150px; }
}
