/* layout, type and accessibility only; every visual comes from a period graphic */
body { margin: 0; padding: 10px 10px 30px; box-sizing: border-box; font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
img { vertical-align: middle; }
a { font-weight: bold; text-decoration: underline; }
a:hover { color: #99ff33; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #99ff33; outline-offset: 2px; }
.page p, .page li { line-height: 1.6; }
.page h1, .page h2 { margin: 6px 0 8px; font-weight: bold; }
.page h1 { font-size: 1.9em; }
.page h3 { color: #99ff33; font-family: Georgia, serif; }
.page b { color: #ffe28a; }
.page a b, .page th b { color: inherit; }
.page td, .page th { color: #e8dcc0; }
.page th.tier { min-width: 44px; }
/* masthead: one black slab, orange frame on the outside only */
table.masthead { border: 4px ridge #3a9bff; }
.site-name { margin: 4px 10px; line-height: 1.0; font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
  font-size: 58px; font-weight: normal; }
.site-name a { text-decoration: none; color: #4aa8ff;
  text-shadow: 1px 1px 0 #1a5fb0, 2px 2px 0 #124a8a, 3px 3px 0 #0c3566, 4px 4px 0 #07224a, 0 0 18px rgba(60, 150, 255, .55); }
.site-name a:hover { color: #6bbaff; }
.tagline { margin: 4px 0 10px; font-family: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif; font-size: 22px; color: #e8dcc0;
  letter-spacing: 1px; text-shadow: 0 0 8px rgba(60, 150, 255, .45); }
.draft { color: #ff6666; font-family: "Courier New", monospace; }
.tile { display: inline-block; }
/* mirrors a corner decoration; the paused-GIF canvas needs it too */
.flip img, .flip canvas.still { transform: scaleX(-1); }
.support img { margin: 3px 2px; }
.nav-sub { display: block; margin: 2px 0 0 22px; font-size: 13px; white-space: normal; max-width: 128px; }
.nav-item { margin: 5px 0 5px; padding-left: 20px; position: relative; white-space: normal; }
.nav-dot { position: absolute; left: 2px; top: 3px; color: #3a9bff; font-size: 12px; }
.nav-here .nav-dot { color: #99ff33; }
.nav-here > a b { color: #99ff33; }
.nav-group { margin: 14px 0 4px; padding: 3px 0 2px; border-bottom: 1px solid #173f73; color: #7fd0ff; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; font-family: "Trebuchet MS", Verdana, sans-serif; text-align: left; }
.finder { margin: 0 0 8px; position: relative; }
.finder input { width: 100%; box-sizing: border-box; background: #000; color: #e8dcc0; border: 2px solid #3a9bff; padding: 5px 6px;
  font: 14px Georgia, serif; }
.finder input:focus { outline: 2px solid #99ff33; }
.finder ul { position: absolute; z-index: 30; left: 0; top: 100%; width: 232px; margin: 3px 0 0; padding: 3px; list-style: none;
  background: #000; border: 3px ridge #3a9bff; box-shadow: 0 0 0 2px #0a1530, 0 6px 14px #000; text-align: left; }
.finder ul[hidden] { display: none; }
.finder li { display: flex; align-items: center; gap: 8px; padding: 3px 5px; cursor: pointer; color: #7fd0ff;
  font: bold 15px Georgia, "Times New Roman", serif; border: 1px solid transparent; }
.finder li img { width: 32px; height: 32px; object-fit: cover; border: 2px solid #1d4f8f; flex: none; }
.finder li.on { background: #0a1530; border-color: #99ff33; color: #99ff33; }
.finder li.on img { border-color: #99ff33; }
.finder li.none { color: #c8bfa0; font-weight: normal; cursor: default; }
div[role=navigation] td { text-align: left; }
.cap { color: #e8dcc0; font-weight: bold; text-align: left; padding: 0 0 6px; }
.page td.tc { color: #000000; font-weight: bold; }
.page table.movers th, .page table.movers td { overflow-wrap: normal; }
.page table.nexus th, .page table.nexus td { overflow-wrap: normal; }
.tier-hero { display: inline-block; width: 84px; margin: 4px 1px; text-align: center; vertical-align: top; font-size: 13px; }
.portrait { filter: sepia(.55) contrast(1.15) brightness(.85); }
.tile:hover .portrait, .tile:focus .portrait, .portrait:hover { filter: none; }

/* visually hidden but read by screen readers */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: #000; color: #99ff33;
  padding: 8px 12px; border: 3px solid #99ff33; }
.skip:focus { left: 8px; }

/* square pause/play button pinned to the top-right corner */
#motion { position: fixed; top: 8px; right: 8px; z-index: 20; width: 36px; height: 36px; padding: 0;
  font: bold 16px/1 Georgia, serif; color: #000; background: #ffcc33; border: 3px outset #7fd0ff; cursor: pointer; }
#motion:active { border-style: inset; }
/* paused: hide each GIF until its frozen frame is drawn, then show only the frame */
.calm img[src$=".gif"]:not([data-frozen]), .calm img[src$=".GIF"]:not([data-frozen]) { visibility: hidden; }
.calm img[data-frozen] { display: none !important; }
canvas.still { vertical-align: middle; }

.scroll { max-width: 100%; overflow-x: auto; }

/* reflow: stack the fixed-width tables at narrow widths and high zoom */
@media (max-width: 900px) {
  table[role=presentation] { width: 100% !important; }
  table.lay > tbody > tr > td { display: block; width: auto !important; }
  table.slab { width: 100% !important; }
  table.frame { width: auto !important; }
  table.lay td.orn, .orn, .vine { display: none !important; }
  .site-name { font-size: 40px; }
  table.lay { table-layout: fixed; }
  .page td { overflow-wrap: anywhere; }
  table.grid > tbody > tr > td { display: inline-block; width: 45% !important; }
  img { max-width: 100%; height: auto; }
  img.icon { width: auto; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* hover tooltips (tips.js) */
.tip.on { text-decoration: underline dotted #99ff33; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: help; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tip.on:hover, .tip.on[aria-expanded=true] { background: rgba(153, 255, 51, .18); }
.tip.on:focus-visible { outline: 3px solid #99ff33; outline-offset: 2px; }
.tip-panel { position: fixed; z-index: 1000; box-sizing: border-box; display: block; width: 300px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); touch-action: pan-y; overscroll-behavior: contain; overflow-y: auto; padding: 8px 10px 9px; background: #000; border: 3px solid #3a9bff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .65); color: #e8dcc0; font: normal 14px/1.45 Georgia, "Times New Roman", serif;
  text-align: left; text-indent: 0; letter-spacing: 0; white-space: normal; overflow-wrap: normal; text-decoration: none; }
.tip-panel[hidden] { display: none; }
.tip-panel .tip-panel { border-color: #99ff33; }
.tip-panel .tip-panel .tip-panel { border-color: #3a9bff; }
.tip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tip-close { display: none; margin-left: auto; padding: 0 6px; color: #7fd0ff; font-size: 22px; line-height: 1; cursor: pointer; }
.tip-name { color: #7fd0ff; font-size: 16px; font-weight: bold; }
.tip-cost { color: #ffe28a; font-weight: bold; white-space: nowrap; }
.tip-type { display: block; margin: 1px 0 6px; color: #99ff33; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.tip-body { display: block; }
.tip-foot { display: block; margin-top: 7px; padding-top: 5px; border-top: 1px solid #173f73; color: #c9bd9c; font-size: 12px; }
.tip-ring { position: fixed; z-index: 1100; display: none; width: 24px; height: 24px; border-radius: 50%; background: #000;
  pointer-events: none; }
.tip-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: conic-gradient(#7fd0ff var(--deg, 0deg), #1d3a66 0);
  -webkit-mask: radial-gradient(circle, transparent 4px, #000 5px); mask: radial-gradient(circle, transparent 4px, #000 5px); }
.tip-note { border: 2px solid #99ff33; padding: 6px 10px; margin: 0 0 10px; }
@media (pointer: coarse) {
  .tip.on { cursor: pointer; padding: 6px 2px; margin: -6px -2px; }
  .tip-panel { width: min(300px, calc(100vw - 16px)); }
  .tip-close { display: block; }
  .tip-cost { margin-left: auto; }
  .tip-close { margin-left: 4px; padding: 4px 8px; }
}
@media print { .tip-panel, .tip-ring { display: none !important; } }

.page blockquote { margin: 6px 0 10px 10px; padding: 6px 12px; border-left: 3px solid #7fd0ff; background: #0b1a38; color: #e8dcc0; }
.page h4 { color: #7fd0ff; font-family: Georgia, serif; font-size: 1.15em; margin: 22px 0 6px; padding-bottom: 3px; border-bottom: 1px dotted #1d4f8f; }

.page .lbl { color: #b8a98a; font-size: 0.82em; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.page table.stats { margin: 4px 0 8px; }
.page table.stats th { background: #0b1a38; color: #b8a98a; font-size: 0.82em; letter-spacing: 1px; text-transform: uppercase; text-align: left; }
.page table.stats td { color: #ffffff; }
.page table.stats th, .page table.stats td { overflow-wrap: normal; padding: 4px 10px; }

/* kit text on the Nexus Read */
.page .kind { font-family: "Courier New", monospace; font-size: 0.7em; color: #c8bfa0; font-weight: normal; margin-left: 6px; }
.page .facts { margin: 2px 0 4px; font-family: "Courier New", monospace; font-size: 0.9em; color: #c8bfa0; }
.page .dl { font-family: "Courier New", monospace; color: #ffffff; letter-spacing: 2px; }
.page ul.kit { margin: 0 0 10px; padding-left: 20px; }
.page ul.kit ul { margin: 2px 0 2px; padding-left: 20px; list-style: circle; }

/* stats page */
.sortbtn { font: inherit; color: #7fd0ff; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.sortbtn:hover, .sortbtn:focus { color: #99ff33; }

/* fluid layout: the page uses the whole window, with the prose kept to a readable line length */
/* one centered column for the whole site, so the left and right margins match at any window width */
table.lay, div.strip { max-width: 1240px; margin-left: auto; margin-right: auto; }
.page p, .page li, .page blockquote { max-width: none; }
div.strip { display: flex; justify-content: center; overflow: hidden; width: 100%; }
div.strip img.tile3 { flex: none; height: 66px; width: auto; image-rendering: pixelated; }
@media (max-width: 900px) { body { padding: 6px 4px 20px; } .page p, .page li { max-width: none; } }

/* a soft caution box (Current Meta): dark red, light text, kept to a readable measure */
.page .note-box { background: #0c1c44; border: 3px outset #2f6fd0; padding: 4px 16px; margin: 6px 0 16px; }
.page .note-box p, .page .note-box li { color: #f3e6c8; } .page .note-box b { color: #ffe28a; }
.page .note-box a { color: #ffe28a; }
.page .note-box a:hover { color: #99ff33; }

/* stats page: win rate diverges at 50%, blue above and red below on a gray midpoint (validated for color blindness
   on the black surface); text always stays in the ink colors, the colored mark beside it carries direction */
.st { position: relative; --up: #3987e5; --down: #e66767; --mid: #383835; --ink: #e8dcc0; --muted: #c8bfa0; --rule: #3a2208; }
.st-bar-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; }
.st-lbl { color: #ffe28a; font-weight: bold; font-size: .92em; }
.st-note { color: var(--muted); font-size: .92em; margin: 4px 0; }
.ex-pill { font: inherit; font-size: 14px; color: #ffe28a; background: #0b1a38; border: 2px outset #1d4f8f; padding: 4px 12px; cursor: pointer; }
.ex-pill:hover:not(:disabled) { color: #99ff33; border-color: #99ff33; }
.ex-pill.on { background: #3a9bff; color: #000; border-style: inset; }
.st select { font: inherit; font-size: 15px; color: var(--ink); background: #000; border: 2px solid #1d4f8f; padding: 4px 6px; max-width: 100%; }
.st-table th, .st-table td { font-size: 15px; font-variant-numeric: tabular-nums; }
.st-table th a { text-decoration: none; }
.st-table img.portrait, .st-list img.portrait { border: 1px solid #1d4f8f; }
.st-rank { color: var(--muted); }
/* win rate: the number's color carries how far from 50% it is (stats.js) */
.st-val { color: var(--ink); font-weight: bold; }
/* hero view */
.st-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 6px 0 10px; }
.st-head img.portrait { border: 2px solid #3a9bff; }
.st-head h2 { margin: 0; }
.st-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 16px; }
.st-tile { border: 2px solid #1d4f8f; background: #050d1f; padding: 8px 14px; min-width: 110px; }
.st-tile .k { color: var(--muted); font-size: .85em; }
.st-tile .v { color: var(--ink); font-size: 1.7em; font-weight: bold; line-height: 1.2; }
.st-tile .s { color: var(--muted); font-size: .8em; }
.st-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 26px; }
.st-list { list-style: none; margin: 0; padding: 0; }
.st-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; }
.st-list a { text-decoration: none; }
.st-list .n { color: var(--muted); font-size: .85em; margin-left: 32px; }
/* charts */
.st-chart { position: relative; }
.st-chart svg { width: 100%; height: auto; display: block; }
.st-tip { position: absolute; z-index: 20; pointer-events: none; background: #000; border: 2px solid #3a9bff; padding: 5px 9px;
  color: var(--muted); font-size: 13px; white-space: nowrap; box-shadow: 4px 4px 0 rgba(0, 0, 0, .7); }
.st-tip b { display: block; color: var(--ink); font-size: 15px; }
.st-tip[hidden] { display: none; }
.st details summary { cursor: pointer; color: #7fd0ff; font-weight: bold; margin: 6px 0; }
/* matchup chart */
.st-heat { border-collapse: separate; border-spacing: 2px; }
.st-heat td { width: 20px; height: 20px; padding: 0; cursor: pointer; }
.st-heat td.self { background: #000; cursor: default; }
.st-heat td.few { background: radial-gradient(circle, #8a8170 1.5px, #000 2px); }
.st-heat td:hover, .st-heat td:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.st-heat th { font-size: 12px; font-weight: normal; white-space: nowrap; color: var(--ink); }
.st-heat th.row { text-align: right; padding-right: 6px; }
.st-heat th.row a { text-decoration: none; }
.st-heat th.col { vertical-align: bottom; height: 150px; padding: 0 0 4px; }
.st-heat th.col span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; }
.st-heat tr.hl th.row, .st-heat th.col.hl { color: #99ff33; }
.st-legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9em; flex-wrap: wrap; }
.st-legend .grad { width: 220px; height: 12px; background: linear-gradient(90deg, var(--down), var(--mid), var(--up)); }
.page .st-table td, .page .st-table th { overflow-wrap: normal; }
.st-table td { white-space: nowrap; }
@media (max-width: 640px) {
  .st-table .opt { display: none; }
  .st-table th, .st-table td { font-size: 14px; padding: 4px 3px; }
  .st-tile { min-width: 0; flex: 1 1 40%; }
}

.page div.upg { margin: 0 0 12px 10px; padding-left: 14px; border-left: 3px solid #3a9bff; }
.page div.upg h4 { margin-top: 6px; }
.page ul.tiers { list-style: none; padding-left: 4px; }
.page ul.tiers .need { font-family: "Courier New", monospace; font-size: 0.9em; color: #c8bfa0; margin-right: 6px; }

/* Hero card types, colour coded after the card frames: Instant red, Main Phase blue, Roll Phase orange, Hero Upgrade green */
.page div.card { margin: 0 0 8px; padding-left: 10px; border-left: 5px solid #888; }
.page div.card h4 { margin-top: 4px; }
.page div.card .facts { font-weight: bold; }
.page div.ct-instant { border-left-color: #e0413a; } .page div.ct-instant .facts { color: #ff6b63; }
.page div.ct-main_phase { border-left-color: #3b82e0; } .page div.ct-main_phase .facts { color: #6aa8ff; }
.page div.ct-roll_phase { border-left-color: #ff9a1f; } .page div.ct-roll_phase .facts { color: #ffb347; }
.page div.ct-upgrade { border-left-color: #3a9bff; } .page div.ct-upgrade .facts { color: #7bd47f; }
.page div.ct-spell { border-left-color: #a45be0; } .page div.ct-spell .facts { color: #c58bff; }
.page div.ct-ore { border-left-color: #999; } .page div.ct-ore .facts { color: #bbb; }
.page div.upg h4 .kind { color: #7bd47f; }

.page p.dice { margin: 4px 0 8px; } .page p.dice span { display: inline-block; text-align: center; margin-right: 8px; font-family: "Courier New", monospace; font-size: 0.8em; color: #c8bfa0; }
.page p.dice img { border: 1px solid #1d4f8f; }
.page img.sym { vertical-align: middle; margin: 0 1px; }

/* polish: hero header, reading width */
.page .herohead { display: flex; align-items: center; gap: 20px; margin: 0 0 6px; }
.page .herohead img { border: 4px solid #3a9bff; flex: none; }
.page .herohead h1 { margin: 0 0 4px; font-size: 2.3em; }
.page .tierline { margin: 0 0 6px; font-size: 1.4em; }
.page .backlink { margin: 0; font-size: 0.95em; }
.page > tbody > tr > td > p, .page > tbody > tr > td > ul, .page > tbody > tr > td > ol, .page > tbody > tr > td > blockquote { max-width: 52em; }
.page ul.kit, .page ul.tiers { max-width: 52em; }
.page > tbody > tr > td > center { margin: 4px 0; }
.page > tbody > tr > td > center img { max-height: 20px; width: auto; opacity: .65; }
.site-name { font-weight: bold; font-size: 50px; letter-spacing: 1px; }
.site-name a { color: #7fd0ff; text-shadow: 1px 1px 0 #1a5fb0, 2px 2px 0 #124a8a, 3px 3px 0 #0c3566, 0 0 18px rgba(60, 150, 255, .6); }
.site-name a:hover { color: #ffe28a; }
.tagline { font-weight: bold; letter-spacing: 3px; font-size: 16px; }

.page img.stat-icon { vertical-align: middle; margin-right: 8px; }

/* guide page polish: one text measure, readable small labels, consistent sub-headings */
.page .guide > * { max-width: 56em; }
.page .guide > .scroll, .page .guide > table { max-width: none; }
.page h3 { color: #ffe28a; }
.page .facts { font-size: 0.95em; color: #e2d9bb; }
.page .kind { font-size: 0.8em; color: #d8d0b0; }
.page div.upg h4 .kind { color: #8ff08f; }
.page ul.tiers .need { font-family: "Courier New", monospace; }
.page img.sym { width: 22px; height: 22px; margin: 0 1px; }
.page div.card .text, .page .guide p { margin: 0.8em 0; }

/* QA pass 2 */
body, .page, .page p, .page li, .page td { font-family: "Times New Roman", Times, serif; }
.page p, .page li { font-size: 1.06em; }
.nw { white-space: nowrap; }
.page .tier-hero { width: 96px; }
.page p.dice span { display: inline-block; width: 84px; vertical-align: top; text-align: center; font-size: 0.72em; line-height: 1.25; overflow-wrap: anywhere; }
.page ul.tiers .need { display: inline-block; min-width: 132px; }
.page .note-box { max-width: none; }

/* every upgrade is a card: green for defense, purple for passives, white for everything else; added abilities nest inside */
.page div.upcard { border: 2px solid #e8e8e8; border-left: 6px solid #f4f4f4; background: #121318; padding: 2px 14px 10px; margin: 16px 0; max-width: 56em; }
.page div.up-def { border-color: #2fae5f; border-left-color: #3ecf6e; background: #08210f; }
.page div.up-pas { border-color: #8b57e6; border-left-color: #a56cff; background: #170d2e; }
.page div.up-ult { border-color: #c43a3a; border-left-color: #e84c4c; background: #250909; }
.page div.up-g { margin-left: 56px; }  /* gutter for the Glide Path arrows glide.js draws */
.page div.upcard > h4:first-child { margin-top: 12px; }
.page div.upcard div.grant { margin: 14px 0 0 18px; padding-left: 12px; border-left: 3px solid #9aa3b2; }
.page div.up-def div.grant { border-left-color: #3ecf6e; } .page div.up-pas div.grant { border-left-color: #a56cff; }
.page div.upcard div.grant h4 { margin-top: 6px; }
.page div.upcard div.grant .kind { color: #8ff08f; }
.page .kind .unearth { color: #4ade80; font-weight: bold; }
.tip-users { display: block; margin-top: 5px; color: #b0e4ff; font-size: 12px; font-style: italic; }
.page .charged { display: block; color: #ffe28a; font-weight: bold; }
.page ul.tiers .charged { padding-left: 140px; }
.page th.tier { min-width: 130px; } .page .tier-blurb { display: block; margin-top: 4px; font-size: 11px; line-height: 1.3; color: #1a1a1a; font-weight: normal; }

/* leaderboard */
.lbq { width: 260px; max-width: 100%; background: #000; color: #fff; border: 2px solid #1d4f8f; padding: 4px 6px; font: inherit; }
.lbtab { background: #0b1a38; color: #7fd0ff; border: 2px outset #3a9bff; padding: 3px 10px; font: inherit; cursor: pointer; }
.lbtab.on { background: #173f73; color: #fff; }
.page .lbwin { color: #7dff9a; }
.page .lbloss { color: #ff8a8a; }
.lbnote2 { color: #c8bfa0; font-size: 0.92em; }
.lbchart { background: #000; border: 1px solid #173f73; }
.page .lbwin, .page .lbloss { overflow-wrap: normal; }
.page td.nw { white-space: nowrap; }
.page table.stats td.lbwin { color: #7dff9a; }
.page table.stats td.lbloss { color: #ff8a8a; }
.page table.stats td.lbwin b { color: #7dff9a; }
.page table.stats td.lbloss b { color: #ff8a8a; }
.page table.lbsum td { font-size: 1.15em; padding: 6px 14px; }
.page table.lbsum th { text-align: center; }
.page table.stats .lbwin b, .page table.stats .lbwin { color: #7dff9a; }
.page table.stats .lbloss b, .page table.stats .lbloss { color: #ff8a8a; }
.page img.hp { vertical-align: middle; margin-right: 6px; border: 1px solid #173f73; }
.page div.plev { border: 2px solid #1d4f8f; margin: 10px 0; }
.page .plev-head { display: block; width: 100%; text-align: left; background: #0b1a38; color: #e8dcc0; border: 0; padding: 6px 8px; font: inherit; cursor: pointer; }
.page .plev-head:hover { background: #173f73; }
.page .plev-x { color: #99ff33; font-family: "Courier New", monospace; font-weight: bold; margin-right: 4px; }
.page .plev-rec { float: right; font-family: "Courier New", monospace; color: #ffcc33; }
.page .plev-body { padding: 4px 8px 8px; }
.page table.pl-tbl th { text-align: left; color: #3a9bff; font-family: Georgia, "Times New Roman", serif; border-bottom: 2px solid #1d4f8f; }
.page table.pl-tbl td { border-bottom: 1px solid #10264d; }
.page .pl-res { font-family: "Courier New", monospace; font-weight: bold; }
.page .pl-sc { font-family: "Courier New", monospace; white-space: nowrap; }
.page .pl-w { color: #3ecf6e; } .page .pl-l { color: #e84c4c; } .page .pl-t { color: #c8bfa0; }
.page .pl-heroes { margin: 10px 0; }
.page .pl-hero { display: inline-block; margin: 2px 14px 2px 0; white-space: nowrap; }
.page .x-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0; }
.page .x-f label { display: block; color: #ffe28a; font-size: .85em; font-weight: bold; margin-bottom: 2px; }
.page .x-f select, .page .x-f input { background: #000; color: #fff; border: 2px solid #1d4f8f; padding: 4px 6px; font: inherit; min-width: 150px; }
.page .x-card { border: 2px solid #10264d; border-left: 5px solid #1d4f8f; background: #05080f; padding: 6px 10px; margin: 8px 0; }
.page .x-card.x-w { border-left-color: #3ecf6e; }
.page .x-card.x-l { border-left-color: #e84c4c; }
.page .x-meta { color: #c8bfa0; font-size: .85em; margin-bottom: 4px; }
.page .x-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.page .x-side img.portrait { vertical-align: middle; margin-right: 4px; }
.page .x-winner { font-weight: bold; }
.page .x-score { font-family: "Courier New", monospace; color: #ffcc33; white-space: nowrap; }
@media (max-width: 620px) {
  .page .x-f { width: 100%; }
  .page .x-f select, .page .x-f input { width: 100%; box-sizing: border-box; }
}
.page .b3-h { font-family: Georgia, "Times New Roman", serif; color: #3a9bff; margin: 12px 0 6px; font-size: 16px; }
.page .b3-row { display: flex; flex-wrap: wrap; gap: 10px; }
.page .b3-slot { width: 110px; text-align: center; }
.page .b3-slot-btn { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; padding: 0;
  background: #05080f; border: 2px solid #1d4f8f; cursor: pointer; color: #3a9bff; font: inherit; margin: 0 auto; }
.page .b3-slot-btn img { display: block; }
.page .b3-empty { border-style: dashed; font-size: 44px; line-height: 1; }
.page button.b3-slot-btn:hover { border-color: #99ff33; color: #99ff33; }
.page .b3-static { cursor: default; color: #c8bfa0; }
.page .b3-pool { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px; max-width: 560px; }
.page .b3-pool-h { background: none; border: 0; padding: 0; cursor: pointer; opacity: .45; }
.page .b3-pool-h img { display: block; border: 2px solid #1d4f8f; }
.page .b3-pool-h:hover { opacity: .8; }
.page .b3-pool-h.on { opacity: 1; }
.page .b3-pool-h.on img { border-color: #ffcc33; box-shadow: 0 0 0 1px #ffcc33; }
.page .b3-finder { margin-top: 4px; }
.page .b3-finder input { font-size: .8em; }
.page .b3-finder ul { width: 200px; }
.page img.b3-pt { display: block; margin: 0 auto; border: 2px solid #1d4f8f; }
.page .b3-board { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 10px 0; }
.page .b3-hero { background: none; border: 0; padding: 0; width: 100px; text-align: center; cursor: pointer; color: #e8dcc0; font: inherit; position: relative; }
.page .b3-hero:disabled { cursor: default; }
.page .b3-hero .b3-nm { display: block; font-size: .78em; margin-top: 3px; }
.page .b3-hero:not(:disabled):hover img { border-color: #99ff33; }
.page .b3-banned img { filter: grayscale(1) brightness(.4); border-color: #e84c4c; }
.page .b3-banned::after { content: "BANNED"; position: absolute; top: 34px; left: 0; right: 0; color: #e84c4c; font-weight: bold; font-family: "Courier New", monospace; }
.page .b3-picked img { border-color: #ffcc33; box-shadow: 0 0 0 2px #ffcc33; }
.page .b3-dice { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.page .b3-die { font-size: 54px; line-height: 1; color: #e8dcc0; }
.page .b3-die-opp { color: #e84c4c; }
.page .b3-die-lbl { font-family: "Courier New", monospace; font-size: .85em; color: #c8bfa0; }
.page .b3-prompt { color: #ffcc33; font-weight: bold; }
.page .b3-log { border: 2px solid #1d4f8f; background: #05080f; padding: 8px 10px; margin-top: 14px; max-height: 240px; overflow-y: auto; font-family: "Courier New", monospace; font-size: .85em; }
.page .b3-log-row { padding: 1px 0; }
.page .b3-final { color: #ffcc33; font-weight: bold; }
.page .b3-tree { white-space: pre; }
.page .b3-ev-g { color: #3ecf6e; } .page .b3-ev-y { color: #ffcc33; } .page .b3-ev-r { color: #e84c4c; }
.page .b3-bonus input { width: 60px; background: #000; color: #fff; border: 2px solid #1d4f8f; padding: 3px 5px; font: inherit; }

/* 2027 Turn Reference (turn_page.py): phase cards reuse the kit upcard frame, one colour set per phase */
.page .tr-intro { max-width: 52em; }
.page div.tr-ph { max-width: 46em; }
.page div.tr-pu { border-color: #8b57e6; border-left-color: #a56cff; background: #170d2e; } .page .tr-pu h4 { color: #c79bff; }
.page div.tr-white { border-color: #e8e8e8; border-left-color: #f4f4f4; background: #121318; } .page .tr-white h4 { color: #f4f4f4; }
.page div.tr-bl { border-color: #2f6fd0; border-left-color: #3a9bff; background: #0a1530; } .page .tr-bl h4 { color: #7fd0ff; }
.page div.tr-or { border-color: #d9822b; border-left-color: #ff9a1f; background: #241405; } .page .tr-or h4 { color: #ffb347; }
.page div.tr-gr { border-color: #2fae5f; border-left-color: #3ecf6e; background: #08210f; } .page .tr-gr h4 { color: #6fe39a; }
.page div.tr-gold { border-color: #b8860b; border-left-color: #ffcc33; background: #1a1504; } .page .tr-gold h4 { color: #ffcc33; }
.page div.tr-loop { border-color: #2f6fd0; border-left-color: #3a9bff; background: #05080f; }
.page .tr-step { display: flex; gap: 10px; align-items: baseline; margin: 7px 0; }
.page .tr-n { flex: none; display: inline-block; width: 1.7em; text-align: center; font-family: "Courier New", monospace; font-weight: bold;
  border: 2px solid currentColor; color: #e8dcc0; line-height: 1.5; }
.page .tr-pu .tr-n { color: #c79bff; } .page .tr-white .tr-n { color: #f4f4f4; } .page .tr-bl .tr-n { color: #7fd0ff; }
.page .tr-or .tr-n { color: #ffb347; } .page .tr-gr .tr-n { color: #6fe39a; }
.page .tr-or div.tr-win { background: #000; }
.page .tr-n-blank { border-color: transparent; }
.page div.tr-win { border: 2px solid #b8860b; border-left: 6px solid #ffcc33; background: #1a1504; padding: 2px 12px; margin: 8px 0 8px 2.4em; }
.page .tr-win p { margin: 6px 0; }
.page .tr-wh { color: #ffcc33; font-weight: bold; font-family: Georgia, "Times New Roman", serif; }
.page div.tr-dwin { border-color: #2f6fd0; border-left-color: #8fd8ff; background: #05101f; }
.page .tr-dwin .tr-wh { color: #8fd8ff; }
.page p.tr-note { font-family: "Courier New", monospace; font-size: .85em; color: #c8bfa0; margin: 4px 0 4px 2.9em; }
.page .tr-row { display: flex; gap: 14px; margin: 7px 0; } .page .tr-row b { flex: 0 0 11em; }
.page .tr-gold .tr-row b { color: #ffcc33; }
.page .tr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: .9em; }
.page svg.tr-svg { display: block; width: 100%; max-width: 600px; height: auto; margin: 4px 0 8px; }
.tr-sv-ap { fill: #0a1530; stroke: #3a9bff; stroke-width: 2; }
.tr-sv-nap { fill: #1a1504; stroke: #ffcc33; stroke-width: 2; }
.tr-sv-next { fill: #121318; stroke: #9aa3b2; stroke-width: 2; stroke-dasharray: 5 4; }
.tr-sv-blue { fill: #7fd0ff; } .tr-sv-gold { fill: #ffcc33; } .tr-sv-ink { fill: #e8dcc0; }
.tr-sv-mono { fill: #c8bfa0; font-family: "Courier New", monospace; }
.tr-sv-arrow { fill: none; stroke: #e8dcc0; stroke-width: 2; } .tr-sv-head { fill: #e8dcc0; }
@media (max-width: 620px) {
  .page div.tr-win { margin-left: 0; }
  .page p.tr-note { margin-left: 0; }
  .page .tr-row { flex-direction: column; gap: 2px; } .page .tr-row b { flex: none; }
}

@media print {
  .noprint, marquee { display: none !important; }
  body { background: #fff none !important; color: #111 !important; }
  table.lay, table.page, td#main { background: #fff !important; border: 0 !important; }
  .page, .page p, .page h1, .page h1 font, .page b, .page span { color: #111 !important; }
  .page a { color: #111 !important; }
  .page h1 img, .page .skull { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page div.tr-ph, .page div.tr-win { background: #fff !important; break-inside: avoid; page-break-inside: avoid; }
  .page div.tr-ph h4 { color: #111 !important; }
  .page .tr-n { color: #111 !important; }
  .tr-sv-ap { fill: #e8f1ff; stroke: #1d4f8f; } .tr-sv-nap { fill: #fff4cc; stroke: #a07800; } .tr-sv-next { fill: #f2f2f2; stroke: #777; }
  .tr-sv-blue, .tr-sv-gold, .tr-sv-ink, .tr-sv-mono { fill: #111; }
  .tr-sv-arrow { stroke: #111; } .tr-sv-head { fill: #111; }
}
.page .tr-bl div.tr-dwin { background: #000; }
.tr-fc-step { fill: #05080f; stroke: #e8dcc0; stroke-width: 1.5; }
.tr-fc-dice { fill: #05101f; stroke: #8fd8ff; stroke-width: 2; }
.tr-fc-blue { fill: #8fd8ff; }
@media print {
  .tr-fc-step { fill: #fff; stroke: #333; } .tr-fc-dice { fill: #e6f6ff; stroke: #1d5f8f; } .tr-fc-blue { fill: #111; }
}
.page p.tr-def { margin: 4px 0; } .page p.tr-def b { color: #7fd0ff; }
.page div.tr-dloop { border-color: #2f6fd0; border-left-color: #8fd8ff; } .page .tr-dloop h4 { color: #8fd8ff; }
.page div.tr-loop p { margin: 4px 0 6px; }
.page ul.tr-wins { margin: 4px 0 10px; } .page ul.tr-wins b { color: #ffcc33; }
