/* Black, white and greys only (Ryan's page rule). Emphasis = weight, darkness, underline. Light only. */
/* BEGIN generated by shared/gen.mjs from shared/gear.json: edit gear.json, then run node shared/gen.mjs */
:root {
  --bg: #ffffff;
  --panel: #f6f6f6;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --ink-3: #6e6e6e;  /* 5.1:1 on white, 4.7:1 on --panel */
  --line: #dddddd;
  --line-2: #8a8a8a;  /* 3.4:1: control borders need 3:1 */
  --row-line: #f0f0f0;  /* rule between result rows */
  --check: #222222;  /* checkbox and slider fill */
  --press: #333333;  /* primary button hover / pressed */
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
/* END generated */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body); }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--ink); }
code { font: 12.5px var(--mono); background: var(--panel); padding: 1px 4px; border-radius: 3px; overflow-wrap: anywhere; }
button, input { font: inherit; color: inherit; }
/* one keyboard focus ring for every control: ink, 2px, outside the box (the browser's own is a colored 1px line) */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tabs button[aria-selected=true]:focus-visible, .primary:focus-visible { outline-offset: 3px; }

.top { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.top h1 { font: 600 18px var(--mono); margin: 0; letter-spacing: -0.3px; }
.meta { font: 12px var(--mono); color: var(--ink-3); }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - 110px); }
.side { border-right: 1px solid var(--line); padding: 4px 18px 24px; background: var(--panel); }
.side section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.side section:last-child { border-bottom: 0; }
.side h2 { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: 0.8px; margin: 0 0 8px; color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 8px; }

.primary { width: 100%; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 6px; padding: 8px 10px; cursor: pointer; font-weight: 700; }
.primary:hover { background: var(--press); }
.folder .or { margin-top: 10px; }
#chars .check { display: flex; margin: 3px 0; }
.drop { display: block; border: 1.5px dashed var(--line-2); border-radius: 6px; padding: 14px; font-size: 13.5px; cursor: pointer; background: var(--bg); }
.drop.over, .drop:hover { border-color: var(--ink); }
/* the file input stays in the tab order (Tab, then Space or Enter opens the picker); hidden only to the eye */
.drop input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.drop { position: relative; }
.drop:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.drop.loaded { border-style: solid; }
.how { font-size: 13px; margin-top: 8px; color: var(--ink-2); }
.how summary { cursor: pointer; }
.how ol { padding-left: 18px; margin: 6px 0; }
.how p { margin: 4px 0; }
.link { background: none; border: 0; padding: 0; min-height: 24px; margin-top: 6px; text-decoration: underline; cursor: pointer; font-size: 13px; color: var(--ink-2); }

.classes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 6px; }
.check.off { color: var(--ink-3); cursor: not-allowed; }
.check.off input { cursor: not-allowed; }
.check .why { font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.classes .check { font: 13px var(--mono); }
input[type=checkbox] { accent-color: var(--check); width: 18px; height: 18px; margin: 0; }
/* 24px targets on desktop too (WCAG 2.5.8): the whole label is the target for a checkbox */
.check { min-height: 24px; }

.tier { display: flex; align-items: center; gap: 10px; }
.tier button { width: 30px; height: 30px; border: 1px solid var(--line-2); background: var(--bg); border-radius: 5px; cursor: pointer; font-size: 17px; line-height: 1; }
.tier button:hover { border-color: var(--ink); }

.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button, .tabs button { border: 1px solid var(--line-2); background: var(--bg); border-radius: 999px; padding: 3px 11px; cursor: pointer; font-size: 13px; }
.presets button:hover, .tabs button:hover { border-color: var(--ink); }
.presets button[aria-pressed=true], .presets .custom { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.presets .custom { border: 1px solid var(--ink); border-radius: 999px; padding: 3px 11px; font-size: 13px; }
.presets .custom[hidden] { display: none; }
.w { display: grid; grid-template-columns: 82px minmax(0, 1fr) 48px; align-items: center; gap: 8px; margin: 3px 0; font-size: 13.5px; }
.w input[type=range] { width: 100%; height: 24px; margin: 0; accent-color: var(--check); }
.w input[type=number] { width: 48px; min-height: 24px; padding: 2px 4px; border: 1px solid var(--line-2); border-radius: 4px; font: 12.5px var(--mono); background: var(--bg); }
.w.on span { font-weight: 700; }

.main { padding: 0 22px 40px; min-width: 0; }
.bar { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; }
.tabs button[aria-selected=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#search { flex: 1 1 220px; max-width: 360px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); }
#search:focus, #search:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
.bar .meta { margin-left: auto; }
.bar [hidden] { display: none; }

.slot { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.slot h3 { font: 600 16px var(--mono); margin: 0 0 6px; }
.slot h3 small { font-weight: 400; color: var(--ink-3); }
.worn { font-size: 14px; color: var(--ink-2); margin: 2px 0; }
.worn b { color: var(--ink); }
.pick { display: grid; grid-template-columns: 22px 24px 32px minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; border-top: 1px solid var(--row-line); }
.pick .rank { font: 13px var(--mono); color: var(--ink-3); text-align: right; padding-top: 2px; }
.star { align-self: start; background: none; border: 0; padding: 0; cursor: pointer; font-size: 17px; line-height: 1.2; color: var(--line-2); min-width: 24px; min-height: 24px; }
.star.on { color: var(--ink); }
.name { font-weight: 700; }
.line1 { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.era { font-size: 12px; color: var(--ink-3); }
.tag { font-size: 11.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; white-space: nowrap; color: var(--ink-2); }
.tag.owned { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.stats { font: 12px var(--mono); color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.stats .wt { color: var(--ink); font-weight: 600; }
.zones { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.nums { text-align: right; max-width: 200px; }
.score { text-align: right; font: 600 15px var(--mono); white-space: nowrap; }
.delta { font: 12px var(--mono); color: var(--ink-3); }
.delta.up { color: var(--ink); font-weight: 600; }
.empty { color: var(--ink-3); padding: 40px 0; text-align: center; }
.retry { border: 1px solid var(--ink); background: var(--bg); color: var(--ink); border-radius: 6px; padding: 3px 12px; min-height: 24px; cursor: pointer; font-weight: 700; }
@media (max-width: 820px) { .retry { min-height: 44px; } }

.icon { display: inline-block; image-rendering: pixelated; border-radius: 4px; background: var(--panel); vertical-align: middle; flex: none; }
.icon.none { background: var(--line); }
.icon.all { width: 34px; height: 34px; line-height: 34px; text-align: center; font-size: 20px; background: none; }
.worn .icon { margin-right: 6px; }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); cursor: pointer; min-width: 0; }
.tile:hover { border-color: var(--ink-3); }
.tile.on { border: 2px solid var(--ink); padding: 5px 1px; background: var(--panel); }
.tile .tl { font-size: 11.5px; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tb { font: 11px var(--mono); color: var(--ink-3); }
.tile .tb.up { color: var(--ink); font-weight: 600; }
.paths { margin: 6px 0; }
.path { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; }
.path code { flex: 1; display: block; padding: 4px 6px; }
.path button { border: 1px solid var(--line-2); background: var(--bg); border-radius: 4px; padding: 2px 8px; min-height: 24px; cursor: pointer; font-size: 12px; flex: none; }
.how[open] summary { font-weight: 700; }
.card { position: fixed; z-index: 10; display: none; width: 340px; max-width: calc(100vw - 16px); background: var(--bg); border: 1px solid var(--ink); border-radius: 8px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); pointer-events: none; }
.card-head { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.card-head .name { font-weight: 700; }
.card-block { font: 12px/1.5 var(--mono); padding: 8px 0; white-space: pre-wrap; }
.card-at { font: 600 12px var(--mono); border-top: 1px solid var(--line); padding: 6px 0; }
.card-src { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
img.icon { cursor: help; }
.pic { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; align-self: start; line-height: 0; border-radius: 4px; }
/* a pinned card takes the mouse (copy a coordinate) and scrolls when it is taller than the window */
.card { max-height: calc(100vh - 16px); overflow-y: auto; }
.card.pinned { pointer-events: auto; }
.planbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 0 6px; }
.planbar .primary { width: auto; padding: 8px 16px; }
.planbar button:not(.primary) { border: 1px solid var(--line-2); background: var(--bg); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.plan h3 { font: 600 15px var(--mono); margin: 22px 0 6px; }
.stop { padding: 8px 0; border-bottom: 1px solid var(--line); }
.stop h4 { margin: 0 0 4px; font-size: 15px; }
.task { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 14px; cursor: pointer; }
.task input { margin-top: 3px; flex: none; }
.task.done > span { text-decoration: line-through; color: var(--ink-3); }
.for { color: var(--ink-3); font-size: 12.5px; }
.shop { margin: 4px 0; padding-left: 20px; font-size: 14px; }
.notes { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.plan .slot > div { font-size: 13.5px; margin: 3px 0; }
.plan .line1 { gap: 8px; align-items: center; }
.quest { border-left: 3px solid var(--line-2); padding: 4px 0 4px 10px; margin: 6px 0; }
.qtop { font-size: 13px; color: var(--ink-2); }
.steps { font-size: 13px; padding-left: 20px; }
.foot { border-top: 1px solid var(--line); padding: 14px 20px; font-size: 12.5px; color: var(--ink-3); }

.side-toggle { display: none; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  /* results first: the settings open from the header's Settings button */
  .layout.side-closed .side { display: none; }
  .side-toggle { display: inline-block; flex: none; white-space: nowrap; margin-left: auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); background: var(--bg); border-radius: 999px; cursor: pointer; font-size: 14px; }
  .side-toggle[aria-expanded=true] { background: var(--ink); color: var(--bg); }
  .top { flex-wrap: nowrap; align-items: center; gap: 10px; }
  .top h1 { white-space: nowrap; }
  .top .meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* top bar in two rows: tabs + Owned only, then search; the inventory status lives in Settings on a phone */
  .bar { position: static; gap: 8px 10px; }
  .bar .meta { display: none; }
  #search { order: 3; flex: 1 1 100%; max-width: none; min-height: 44px; }
  /* tap targets at least 44px */
  .tabs button, .presets button, .planbar button, .path button { min-height: 44px; }
  .presets .custom:not([hidden]) { display: inline-flex; align-items: center; min-height: 44px; }
  .tier button { width: 44px; height: 44px; }
  .check { min-height: 44px; }
  input[type=checkbox] { width: 22px; height: 22px; }
  .link { min-height: 44px; }
  .how summary { padding: 13px 0; }
  .w { min-height: 44px; }
  .w input[type=number], .w input[type=range] { height: 44px; }
  .star { width: 44px; min-height: 44px; font-size: 20px; }
  .pick .rank input[type=checkbox] { width: 24px; height: 24px; margin: 10px; }
  .task { min-height: 44px; align-items: center; }
  .task input { margin-top: 0; }
  .coord { position: relative; }
  .coord::after { content: ""; position: absolute; inset: -14px -4px; }
  /* long effect names wrap inside their tag instead of pushing the page sideways */
  .tag { white-space: normal; overflow-wrap: anywhere; max-width: 100%; border-radius: 10px; }
  .pick .icon.none { width: 28px !important; height: 28px !important; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 16px 12px; }
  .main { padding: 0 16px 32px; }
  .top { padding: 12px 16px; }
  .pick { grid-template-columns: auto 44px 28px minmax(0, 1fr) auto; gap: 6px; }
  .pick .icon { width: 28px; height: 28px; }
  /* the two numbers get their own line under the item: "vs your Drop of Crystallized Flame" squeezed the name column */
  .nums { grid-column: 4 / -1; max-width: none; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; text-align: left; }
  .score { font-size: 13px; text-align: left; }
  .strip { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
}

.pick .weapon { font-size: 13px; font-weight: 600; color: var(--ink); }

/* mob locations (Ryan 10/26): the wiki's text as written, bracketed coordinates copy on click */
.mob { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; overflow-wrap: anywhere; }
.mob b { color: var(--ink-2); }
.card .mob { font-size: 12px; }
.coord { font: 600 12px var(--mono); color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; pointer-events: auto; }
.coord:hover { text-decoration-color: var(--ink); }
/* coordinates sit in a line of text: a taller invisible hit area instead of a taller line */
.coord { position: relative; }
.coord::after { content: ""; position: absolute; inset: -4px -2px; }
@media (max-width: 820px) { .coord::after { inset: -14px -4px; } }

/* wish list by location (Ryan 10/26) */
.planbar .sort { margin-left: auto; }
.planbar .tabs button { border-radius: 999px; padding: 3px 11px; }
.planbar .tabs button[aria-selected=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pick .rank input { margin-top: 3px; }
.wgroup h3 { font: 600 16px var(--mono); margin: 22px 0 2px; }
.slot.grouped { padding-top: 6px; }
