/* Divine Comedy. Layout from the 2026-12-04 ledger brief (rules instead of boxes, ledger tables, left-aligned with a
   margin column, no radius/shadow/gradient/motion); type and colour reworked the same day (owner: the vellum-and-serif
   version was hard to read and "looked Claude-developed"). One readable family (IBM Plex Sans; Plex Mono for numbers)
   and three colour schemes, chosen by <html data-look> (static/look.js): slate (default), alliance, ironforge.
   docs/visual-identity.md has the rules. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-400-italic.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-500-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-condensed-latin-500-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2?v=1") format("woff2"); }

:root {
  --body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --head: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
  --ui: var(--body); --ui-caps: var(--head);
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
  --margin: 13rem;
}
/* every text colour below passes 4.5:1 on both the page and the striped-row background (checked 2026-12-04) */
/* slate (default): cool near-black, steel-blue accent, WoW coin and item colours */
:root, [data-look="slate"] {
  --chip-bg: #1E232B; --chip-b: #272E38;
  --field: #6E7885;
  --bg: #111418; --bg-alt: #181C22; --fg: #E7E9EC; --fg-2: #A3ABB6; --rule: #4A535F; --hair: #2A3039;
  --top-bg: #0A0C0F; --top-fg: #E7E9EC; --top-2: #A3ABB6; --top-rule: #2A3039; --nav-on: #7AAEF5;
  --accent: #7AAEF5; --accent-text: #7AAEF5; --cta-bg: #2F6ACB; --cta-fg: #FFFFFF; --cta-hover: #2A5FB8;
  --up: #5CC08A; --down: #F0857C; --coin-g: #E3BC5B; --coin-s: #C3CAD3; --coin-c: #D9965F;
  --series: #7AAEF5; --bar-bg: #2A3039; --bar-fg: #7AAEF5;
  --q-poor: #9D9D9D; --q-uncommon: #4FD34F; --q-rare: #5AA9FF; --q-epic: #C690FF; --q-legendary: #FF9A3C;
  color-scheme: dark;
}
/* alliance: light, navy bar, royal blue with a gold underline */
[data-look="alliance"] {
  --chip-bg: #FFFFFF; --chip-b: #E1E7EF;
  --field: #6B7686;
  --bg: #F5F6F8; --bg-alt: #E9EDF2; --fg: #172033; --fg-2: #525D6C; --rule: #9AA4B2; --hair: #D5DBE3;
  --top-bg: #13203A; --top-fg: #F5F6F8; --top-2: #B9C4D6; --top-rule: #13203A; --nav-on: #E0B44A;
  --accent: #1F56C3; --accent-text: #1F56C3; --cta-bg: #1F56C3; --cta-fg: #FFFFFF; --cta-hover: #13203A;
  --up: #1B7240; --down: #B0302B; --coin-g: #7E600C; --coin-s: #56616E; --coin-c: #9A5226;
  --series: #1F56C3; --bar-bg: #D5DBE3; --bar-fg: #1F56C3;
  --q-poor: #6B6B6B; --q-uncommon: #127212; --q-rare: #0A58B8; --q-epic: #7A2FC4; --q-legendary: #A65300;
  color-scheme: light;
}
/* ironforge: warm charcoal and forge gold */
[data-look="ironforge"] {
  --chip-bg: #282521; --chip-b: #332F2A;
  --field: #7A7268;
  --bg: #1A1917; --bg-alt: #22201D; --fg: #ECE7DF; --fg-2: #AEA69B; --rule: #575049; --hair: #2F2C28;
  --top-bg: #100F0D; --top-fg: #ECE7DF; --top-2: #AEA69B; --top-rule: #2F2C28; --nav-on: #E6BC5C;
  --accent: #E6BC5C; --accent-text: #E6BC5C; --cta-bg: #C99A30; --cta-fg: #17150F; --cta-hover: #E6BC5C;
  --up: #7CC57E; --down: #EE8A7A; --coin-g: #E6BC5C; --coin-s: #C9C6C0; --coin-c: #D9965F;
  --series: #E6BC5C; --bar-bg: #2F2C28; --bar-fg: #E6BC5C;
  --q-poor: #9D9D9D; --q-uncommon: #5BD35B; --q-rare: #5AA9FF; --q-epic: #C690FF; --q-legendary: #FF9A3C;
  color-scheme: dark;
}

/* ---- page ---- */
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--body); }
main { max-width: calc(64rem + var(--margin)); margin: 0; padding: 1.5rem calc(var(--margin) + 2rem) 3rem 2rem; position: relative; }
@media (max-width: 70rem) { main { padding: 1.25rem 1rem 2.5rem; } }
a { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-text); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: 0; line-height: 1.2; }
h1 { font-size: 2.1rem; margin: .4rem 0 1.25rem; padding-bottom: .35rem; border-bottom: 3px double var(--rule); }
h2 { font-size: 1.45rem; margin: 2.25rem 0 .75rem; padding-bottom: .2rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.15rem; margin: 0; }
p { margin: .5rem 0; }
.muted, .rank { color: var(--fg-2); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-alt); padding: 0 .25rem; }
/* map-annotation labels: small caps, letter-spaced, pewter */
.label, th, .tile > .muted:first-child, dl.stats dt, .plan li > span:first-child, fieldset legend {
  font-family: var(--ui-caps); font-weight: 600; font-size: .78rem; letter-spacing: .06em; color: var(--fg-2); text-transform: uppercase; }
/* margin notes: notes and timestamps sit in the right-hand margin column on wide screens */
.note { color: var(--fg-2); font-size: .85rem; font-family: var(--ui); }
@media (min-width: 70rem) {
  .note { float: right; clear: right; width: calc(var(--margin) - 1rem); margin: .2rem calc(-1 * var(--margin) - 1rem) 0 0;
          padding-top: .3rem; border-top: 1px solid var(--hair); }
}

/* ---- top bar and footer: the only ink-deep surfaces ---- */
.top { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; padding: .55rem 2rem;
       background: var(--top-bg); color: var(--top-fg); border-bottom: 1px solid var(--top-rule); }
.brand { display: flex; gap: .55rem; align-items: center; color: var(--top-fg); text-decoration: none;
         font: 600 1.3rem/1 var(--head); }
.brand svg { width: 26px; height: 26px; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: baseline; font-family: var(--ui);
           font-weight: 500; font-size: .95rem; }
.top nav button.link { font: inherit; letter-spacing: inherit; text-transform: inherit; }
.top nav a, .top nav button.link { color: var(--top-fg); text-decoration: none; padding: .15rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav button.link:hover { color: var(--top-fg); border-bottom-color: var(--top-2); }
.top nav a.on { border-bottom-color: var(--nav-on); }
.badge { color: var(--fg-2); font-family: var(--ui); letter-spacing: 0; text-transform: none; font-size: .9rem; }
.top .badge { color: var(--top-2); }
.top .badge b { color: var(--top-fg); font-weight: 500; }
.top .badge a { text-decoration: underline; border: 0; }
body > footer { background: var(--top-bg); color: var(--top-2); font: .85rem/1.5 var(--ui); padding: 1.5rem 2rem 2rem;
         border-top: 1px solid var(--top-rule); }
body > footer p { margin: .15rem 0; }
body > footer a { color: var(--top-fg); }
body > footer .made-by { color: var(--top-fg); }
@media (max-width: 70rem) { .top { padding: .5rem 1rem; } body > footer { padding: 1.25rem 1rem 1.5rem; } }
/* phones: the nav folds behind a Menu button (only with JS; without it the nav simply wraps) */
.menu-btn { display: none; }
@media (max-width: 48rem) {
  .js .menu-btn { display: inline-block; margin-left: auto; color: var(--top-fg); border-color: var(--top-2); padding: .35rem .8rem; }
  .js .menu-btn:hover { background: transparent; border-color: var(--top-fg); }
  .js .top nav { display: none; }
  .js .top.open nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 100%; padding: .4rem 0 .2rem; }
  .js .top.open nav > * { padding: .55rem 0; border-bottom: 1px solid var(--top-rule); }
  .js .top.open nav > :last-child { border-bottom: 0; }
  .js .top.open nav a.on { border-left: 3px solid var(--nav-on); padding-left: .6rem; }
  .js .top.open nav form button.link { padding: 0; }
}

/* ---- controls ---- */
button { font: 500 .95rem/1.2 var(--ui); letter-spacing: .02em; color: var(--fg); background: transparent;
         border: 1px solid var(--rule); border-radius: 0; padding: .45rem .9rem; cursor: pointer; }
button:hover { background: var(--bg-alt); }
button.link { border: 0; background: none; padding: 0; color: var(--fg); text-decoration: underline; font: inherit; }
button.link:hover { color: var(--accent-text); background: none; }
button.danger, button.danger:hover { border-color: var(--down); color: var(--down); background: transparent; }
button.secondary { border-color: var(--rule); }
/* the page's one call to action */
.search button, .cta { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-fg); }
.search button:hover, .cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-fg); }
label { display: flex; flex-direction: column; gap: .2rem; font: .9rem var(--ui); color: var(--fg-2); }
label.check { display: inline-flex; flex-direction: row; align-items: center; gap: .4rem; }
input, select, textarea { font: 1rem var(--body); color: var(--fg); background: var(--bg); border: 0; border-bottom: 1px solid var(--field);
                          border-radius: 0; padding: .35rem .15rem; min-width: 6rem; }
select { border: 1px solid var(--field); padding: .3rem .4rem; }
input[type=number] { width: 6.5rem; min-width: 0; font-family: var(--mono); }
input[type=checkbox] { min-width: 0; accent-color: var(--accent); }
select:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--fg); outline-offset: 2px; }
/* underline fields: focus thickens the rule and shades the field instead of drawing a box around it */
input:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--fg); background: var(--bg-alt); margin-bottom: -1px; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.error { color: var(--down); }
ul.error { padding-left: 1.2rem; }
.search { display: flex; gap: .75rem; align-items: end; margin: 1rem 0 1.25rem; }
.search input { flex: 1; font-size: 1.1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin: .5rem 0 1rem; }
.calc { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; margin: .5rem 0; }
.pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick .current { border-width: 2px; font-weight: 500; }
.charform fieldset { border: 0; border-top: 1px solid var(--rule); margin: 1rem 0; padding: .5rem 0 0; }
.charform .row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin: .4rem 0; }
.charform .lookup { align-self: end; }
.lookup-status { margin: .3rem 0 .6rem; }
details.manual { margin: .4rem 0; } details.manual > summary { cursor: pointer; margin-bottom: .4rem; }
.add summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: .6rem; align-items: center; }
.add summary::-webkit-details-marker { display: none; }
.plus { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid var(--rule);
        font: 1.2rem/1 var(--mono); }
.add[open] summary { margin-bottom: 1rem; }
.danger { margin-top: 1rem; }
details.inline-edit summary { cursor: pointer; text-decoration: underline; }
details.help { margin-top: 2rem; }
details.help summary, .plan-steps summary { cursor: pointer; font-weight: 600; }

/* ---- sections: rules, not boxes ---- */
.card { border-top: 1px solid var(--rule); padding: .75rem 0 .9rem; min-width: 0; }
h2 + .card, h2 + .grid > :first-child, h2 + table, h2 + form + .grid > :first-child { border-top: 0 !important; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; border: 0; padding: 0; }
a.card { color: var(--fg); text-decoration: none; }
a.card:hover h3, a.card:hover b { color: var(--accent-text); }
.narrow { max-width: 30rem; margin: 2rem 0; }
.grid { display: grid; gap: 0 2rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); }
.grid > * { min-width: 0; }
.chars { grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); align-items: start; }
.char header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.char header .avatar-link { order: -1; margin-right: .2rem; }
.char header h3 { flex: 1; }
/* the roster and the market's index are ledgers too: one ruled row per entry */
.grid.members, .grid.cats { display: block; border-bottom: 1px solid var(--rule); }
.grid.members .member { display: grid; grid-template-columns: minmax(10rem, 14rem) minmax(8rem, 12rem) 1fr; gap: .2rem 1.25rem;
                        align-items: center; border-top: 1px solid var(--hair); padding: .5rem 0; }
.grid.members .member:first-child { border-top: 1px solid var(--rule); }
.grid.members .member:nth-child(even) { background: var(--bg-alt); }
.member h3 { display: flex; align-items: center; gap: .55rem; font-size: 1.25rem; }
.grid.cats .cat { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: .2rem 1.25rem; align-items: baseline;
                  border-top: 1px solid var(--hair); padding: .5rem 0; }
.grid.cats .cat:first-child { border-top: 1px solid var(--rule); }
.grid.cats.quick { margin-top: 1rem; }
.cat b { font-weight: 600; }
@media (max-width: 40rem) { .grid.members .member, .grid.cats .cat { grid-template-columns: 1fr; } }
/* figures: a row of numbers divided by hairlines, not tiles */
.grid.tiles { display: flex; flex-wrap: wrap; gap: 0; margin: 1rem 0 1.5rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tile { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 11rem; padding: .6rem 1.25rem .7rem 0; border: 0; }
.grid.tiles .tile + .tile { border-left: 1px solid var(--hair); padding-left: 1.25rem; }
.hero { font: 500 1.6rem/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.briefing { border: 1px solid var(--rule); padding: .75rem 1.1rem .9rem; margin-bottom: 1.5rem; }
.briefing h2 { border: 0; margin: 0 0 .25rem; padding: 0; }
.briefing ul { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
.welcome { border: 1px solid var(--accent); padding: .9rem 1.2rem 1rem; margin: 0 0 1.5rem; }
.welcome[hidden] { display: none; }
.welcome h2 { margin: 0 0 .4rem; border: 0; padding: 0; }
.welcome .steps { margin: .5rem 0 .75rem; padding-left: 1.4rem; }
.welcome .steps li { margin: .35rem 0; }
.welcome .steps li.done { color: var(--fg-2); }
.welcome .steps li.done::after { content: " ✓"; color: var(--up); }
.disclaimer { border-left: 1px solid var(--rule); padding-left: .7rem; color: var(--fg-2); }

/* ---- tables are ledgers ---- */
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
thead th { border-bottom: 1px solid var(--rule); }
th, td { text-align: left; padding: .32rem .55rem; vertical-align: top; }
th { padding-top: .5rem; white-space: nowrap; }
td { border-bottom: 1px solid var(--hair); }
tbody tr:nth-child(even) td { background: var(--bg-alt); }
table tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
td.num, th.num, .skill, .ilvl { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; }
th.num { font-family: var(--ui-caps); font-size: .78rem; }
table.items td, table.items th { padding: .3rem .55rem; }
table.items.compact { font-size: .92rem; }
table.items td:first-child { overflow-wrap: break-word; }
tr.current td { font-weight: 600; }
tr.dim td, tr.dim td a { color: var(--fg-2); }
table.recipes td:first-child { min-width: 16rem; }
table.crafters td, table.makers td { padding-top: .55rem; padding-bottom: .55rem; vertical-align: middle; }
table.crafters td:first-child, table.makers td:not(:last-child) { border-right: 1px solid var(--hair); white-space: nowrap; padding-right: 1rem; }
table.crafters td:first-child { width: 13rem; font-weight: 500; }
/* official profession icons (Blizzard's profession media) */
.picon { border: 1px solid var(--rule); vertical-align: middle; flex: none; }
a.prof-name { display: inline-flex; align-items: center; gap: .55rem; }
.prof-head { display: flex; align-items: center; gap: .75rem; }
.picon.big { width: 40px; height: 40px; }
table.makers td:first-child { white-space: normal; }
table.recipes .pb-fast .pb { color: var(--up); }
table.recipes .pb-never .pb, table.recipes .pb-none .pb { color: var(--fg-2); }
.card { overflow-x: auto; }

/* ---- numbers, money, direction ---- */
.money { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coin-g { color: var(--coin-g); } .coin-s { color: var(--coin-s); } .coin-c { color: var(--coin-c); }
.coin-g, .coin-s, .coin-c { font-weight: 500; margin-left: .03em; }
.up, .down, .gain { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); }
.gain { font-weight: 500; margin-left: .3rem; }
.ok-text { color: var(--up); } .warn-text { color: var(--down); }
.sync { margin: .2rem 0 .4rem; color: var(--fg-2); } .sync .ok { color: var(--up); } .sync .warn { color: var(--down); font-weight: 600; }
.ench { color: var(--up); }
.spec { color: var(--fg-2); }

/* item names: WoW quality colours, on item names only */
.q-poor { color: var(--q-poor); } .q-common { color: var(--fg); } .q-uncommon { color: var(--q-uncommon); }
.q-rare { color: var(--q-rare); } .q-epic { color: var(--q-epic); } .q-legendary { color: var(--q-legendary); }
a.item { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
a.item:hover { text-decoration: underline; }
a.item img, .itemhead img, ul.gear img, ul.ups img, ul.loot img { border: 1px solid var(--rule); border-radius: 0; }
a.wh { font: .78rem var(--ui); color: var(--fg-2); text-decoration: none; margin-left: .3rem; }
a.wh:hover { color: var(--accent-text); text-decoration: underline; }

/* ---- small marks ---- */
.tag { font: 600 .72rem/1.4 var(--ui-caps); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle;
       border: 1px solid var(--hair); padding: 0 .35rem; color: var(--fg-2); }
.tag.main { border-color: var(--rule); color: var(--fg); }
.tag.forever { border-color: var(--rule); color: var(--fg); }
/* character tags: name, then the number (skill, upgrades) in its own ruled box; a wrap of them keeps clear gaps */
.chips { display: inline-flex; flex-wrap: wrap; gap: .4rem .45rem; vertical-align: middle; }
.chip { display: inline-flex; align-items: stretch; border: 1px solid var(--rule); background: var(--chip-bg);
        font-size: .9rem; line-height: 1.35; color: var(--fg); text-decoration: none; white-space: nowrap; }
.chip .nm { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .55rem; }
.chip > b { display: inline-flex; align-items: center; padding: .18rem .5rem; border-left: 1px solid var(--rule);
            background: var(--chip-b); font: 500 .85rem var(--mono); }
.chip.main .nm { font-weight: 600; }
.chip.main { border-color: var(--accent); }
a.chip:hover { border-color: var(--accent); color: var(--fg); }
a.chip:hover .nm { text-decoration: underline; }
.chip .tag { padding: 0 .3rem; }
.chip .avatar { width: 18px; height: 18px; }
/* class colours (Blizzard's standard ones): a stripe down the left edge and a light tint; the name text keeps the
   normal text colour so it stays readable on every scheme */
.chip[class*="cls-"] { border-left: 4px solid var(--cls); background: color-mix(in srgb, var(--cls) 13%, var(--chip-bg)); }
.cls-warrior { --cls: #C69B6D; } .cls-paladin { --cls: #F48CBA; } .cls-hunter { --cls: #AAD372; }
.cls-rogue { --cls: #FFF468; } .cls-priest { --cls: #FFFFFF; } .cls-shaman { --cls: #0070DD; }
.cls-mage { --cls: #3FC7EB; } .cls-warlock { --cls: #8788EE; } .cls-druid { --cls: #FF7C0A; }
/* on the light scheme the palest ones need depth to show at all */
[data-look="alliance"] .cls-priest { --cls: #717C8A; } [data-look="alliance"] .cls-rogue { --cls: #9C8A00; }
[data-look="alliance"] .cls-paladin { --cls: #D9609A; }
[data-look="alliance"] .cls-hunter { --cls: #5E8A2A; } [data-look="alliance"] .cls-mage { --cls: #1C8FB0; }
.chip.dim { color: var(--fg-2); border-style: dashed; }
.avatar { border: 1px solid var(--rule); border-radius: 0; object-fit: cover; vertical-align: middle; flex: none; }
.avatar.big { width: 84px; height: 84px; }
/* the "i" note mark: hover, tap or keyboard focus shows the text */
.hint { position: relative; display: inline-grid; place-items: center; cursor: help; color: var(--fg-2);
        width: .95rem; height: .95rem; border: 1px solid currentColor; border-radius: 0;
        font: italic 500 .68rem/1 var(--body); vertical-align: .4em; margin-left: .25rem;
        text-transform: none; letter-spacing: 0; }
.hint:hover, .hint:focus { color: var(--accent-text); }
.hint:focus { outline: 2px solid var(--fg); outline-offset: 2px; }
.hint:hover::after, .hint:focus::after {
  content: attr(data-tip); position: absolute; left: 50%; top: 1.4em; transform: translateX(-50%); z-index: 10;
  width: max-content; max-width: min(20rem, 80vw); white-space: normal; text-align: left;
  background: var(--bg); color: var(--fg); border: 1px solid var(--rule); padding: .45rem .6rem;
  font: normal 400 .85rem/1.45 var(--body); }
th .hint:hover::after, th .hint:focus::after { left: auto; right: 0; transform: none; }

/* ---- professions ---- */
.profs { list-style: none; margin: 0 0 .6rem; padding: 0; }
.profs.secondary { border-top: 1px dotted var(--hair); padding-top: .5rem; }
.prof { display: grid; grid-template-columns: 7.5rem 1fr 2.6rem 5.5rem; gap: .5rem; align-items: center; margin: .25rem 0; }
.prof .rank { font: .9rem var(--ui); }
.bar { height: 5px; background: var(--bar-bg); border: 1px solid var(--hair); }
.bar span { display: block; height: 100%; background: var(--bar-fg); }
.repbar { display: inline-block; width: 9rem; vertical-align: middle; margin-left: .5rem; }

/* ---- item page ---- */
.itemhead { display: flex; gap: 1rem; align-items: center; }
.itemhead h1 { margin: 0; border: 0; padding: 0; }
.itemhead { border-bottom: 3px double var(--rule); padding-bottom: .5rem; margin-bottom: 1.25rem; }
.verdict { display: flex; gap: .7rem; align-items: baseline; margin-bottom: 1rem; }
.vicon { font: 1rem var(--mono); flex: none; color: var(--fg-2); }
.v-high .vicon, .v-climbing .vicon { color: var(--up); }
.v-low .vicon, .v-falling .vicon { color: var(--down); }
.verdict .trendline { margin: .35rem 0 0; }
.ahtabs { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .5rem 0 .4rem; border-bottom: 1px solid var(--hair); }
.ahtabs a { text-decoration: none; color: var(--fg-2); padding: .3rem 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
            display: inline-flex; gap: .45rem; align-items: baseline; font-family: var(--ui); }
.ahtabs a:hover { color: var(--fg); }
.ahtabs a.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 500; }
.plan { list-style: none; padding: 0; margin: 0 0 1rem; }
.plan li { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; padding: .25rem 0; border-bottom: 1px solid var(--hair); }
.plan li > span:first-child { min-width: 8.5rem; }

/* ---- charts: thin ink lines on paper, no fills ---- */
.charthead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.charthead h2 { border: 0; margin: 0; padding: 0; }
.ranges { display: flex; gap: 0; }
.ranges button { padding: .2rem .55rem; font: .85rem var(--mono); border-color: var(--hair); margin-left: -1px; }
.ranges button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chart { position: relative; width: 100%; min-height: 120px; margin: .5rem 0; }
.chart.empty { color: var(--fg-2); padding: 1rem 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg:focus { outline: 2px solid var(--fg); outline-offset: 2px; }
.chart .grid line { stroke: var(--hair); stroke-width: 1; stroke-dasharray: 1 3; }
.chart .tick { fill: var(--fg-2); font: 11px var(--mono); }
.chart .line { fill: none; stroke: var(--series); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: butt; }
.chart .area { display: none; }
.chart .dot { fill: var(--series); stroke: var(--bg); stroke-width: 2; }
.chart .endlabel { fill: var(--fg); font: 500 12px var(--mono); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.chart .hair { stroke: var(--fg-2); stroke-width: 1; }
.chart .boundary { stroke: var(--fg-2); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--rule); padding: .3rem .5rem;
       display: flex; flex-direction: column; font: .85rem var(--ui); white-space: nowrap; }
.tip[hidden] { display: none; }
.tip b { font: 500 1rem var(--mono); }
.tip span { color: var(--fg-2); }
svg.spark polyline { fill: none; stroke: var(--series); stroke-width: 1.25; stroke-linejoin: round; }
td.wk { white-space: nowrap; } td.wk .spark { vertical-align: middle; }

/* ---- character page ---- */
.charhead { display: flex; gap: 1rem; align-items: center; min-height: 8rem; border-bottom: 3px double var(--rule);
            padding-bottom: .6rem; margin-bottom: 1.25rem; }
.charhead h1 { margin: 0; border: 0; padding: 0; } .charhead p { margin: .15rem 0; } .charhead .big { font-size: 1.15rem; }
.charhead > div { flex: 1; }
.charhead .render { height: 11rem; width: auto; flex: none; order: 3; margin: -1rem 0 -.6rem; }
@media (max-width: 40rem) { .charhead .render { display: none; } }
a.cname { color: var(--fg); text-decoration: none; } a.cname:hover { color: var(--accent-text); text-decoration: underline; }
ul.gear { list-style: none; padding: 0; margin: 0; }
ul.gear li { display: grid; grid-template-columns: 5.5rem 1fr 2.5rem; gap: .5rem; align-items: center; padding: .25rem 0; border-bottom: 1px solid var(--hair); }
ul.gear li > :first-child { font: .9rem var(--ui); color: var(--fg-2); }
ul.gear .gname { display: inline; } ul.gear img { vertical-align: middle; margin-right: .3rem; }
dl.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); }
dl.stats div { border-bottom: 1px solid var(--hair); padding: .3rem .5rem .3rem 0; }
dl.stats dt { font-size: .82rem; } dl.stats dd { margin: 0; font: 500 1rem var(--mono); font-variant-numeric: tabular-nums; }

/* ---- dungeons ---- */
ul.ups, ul.loot { list-style: none; padding: 0; margin: .3rem 0 .6rem; }
ul.ups li, ul.loot li { padding: .2rem 0; border-bottom: 1px solid var(--hair); overflow-wrap: anywhere; }
ul.ups img, ul.loot img { vertical-align: middle; margin-right: .3rem; }
ul.ups li.later, ul.ups li.later a { color: var(--fg-2); }
.chip .avatar, .who .avatar, .dung .avatar { vertical-align: middle; }
details.who { padding: .3rem 0; border-bottom: 1px solid var(--hair); } details.who summary, .dung details summary { cursor: pointer; }
.boss h3 { margin-top: 0; } .credits { margin-top: 1.5rem; }
.fill-best { font-weight: 600; } .fill-best a { color: var(--fg); }
.guild-brief { padding-top: 0; }
.brief-row { border-bottom: 1px solid var(--hair); padding: .45rem 0; }
.brief-row:last-of-type { border-bottom: 1px solid var(--rule); }
.brief-row > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; list-style: none; }
.brief-row > summary::-webkit-details-marker { display: none; }
.brief-row > summary::before { content: "▸"; color: var(--fg-2); width: .8rem; }
.brief-row[open] > summary::before { content: "▾"; }
.brief-row .brief-meta { margin-left: auto; font: .88rem var(--ui); color: var(--fg-2); }
.brief-row .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .2rem 1.2rem; }
.brief-row .ups { margin-top: .4rem; }

/* ---- phones ---- */
@media (max-width: 40rem) {
  h1 { font-size: 2rem; }
  table.items td, table.items th { padding: .3rem .3rem; } .hero { font-size: 1.3rem; }
  /* a wide table scrolls inside itself instead of pushing the whole page sideways; the trend label stays */
  table.items { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  td.wk .spark { display: none; }
  select, input, textarea { max-width: 100%; }
  .calc label, .filters label { min-width: 0; max-width: 100%; }
  .calc select, .filters select { width: 100%; }
  /* the other wide tables scroll inside themselves too; chips may wrap */
  table.crafters, table.makers { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chip { white-space: normal; }
  /* the name column stays put while a wide table scrolls, so Profit etc. read against it */
  table.items tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); border-right: 1px solid var(--hair); }
  table.items tbody tr:nth-child(even) > :first-child { background: var(--bg-alt); }
  /* tap targets */
  .hint { width: 1.5rem; height: 1.5rem; font-size: .8rem; vertical-align: middle; }
  .hint:hover::after, .hint:focus::after, th .hint:hover::after, th .hint:focus::after {
    position: fixed; left: 1rem; right: 1rem; top: auto; bottom: 1rem; transform: none; width: auto; max-width: none; }
  label.check { min-height: 2.5rem; }
  input[type=checkbox] { width: 1.25rem; height: 1.25rem; }
  .ranges button { padding: .5rem .8rem; }
  .js .menu-btn { padding: .6rem 1rem; }
  .grid.tiles .tile + .tile { border-left: 0; padding-left: 0; }
  .grid.tiles .tile { border-top: 1px solid var(--hair); }
}
@media print { .top nav, .search, body > footer { display: none; } }
