/* HOI4 Database: a war-room look. Slate header, paper body, dark red ink for links, brass for marks. */
:root {
  --paper: #efede6;
  --paper2: #e4e1d7;
  --ink: #1e2225;
  --muted: #5c6166;
  --line: #cdc8b9;
  --slate: #24292c;
  --slate2: #33393d;
  --red: #8f2a1c;
  --brass: #a88533;
  --olive: #5b6a38;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --head: 'Archivo Narrow', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 'Source Sans 3', system-ui, sans-serif; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #5e170c; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; font-weight: 700; letter-spacing: .005em; }
h1 { font-size: 2.15rem; margin: .3em 0 .25em; }
h2 { font-size: 1.5rem; margin: 1.8em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: .6em 0; }
code { font-family: var(--mono); font-size: .88em; }
small { color: var(--muted); }

.top { background: linear-gradient(#2c3331, #1f2425); color: #e8e4d8; position: sticky; top: 0; z-index: 20; border-bottom: 2px solid #8a6d2a; }
.bar { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.head1 { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; color: #f3eedf; text-decoration: none; white-space: nowrap; }
.logo img { display: block; }
.logo b { display: block; font: 700 1.45rem/1.05 var(--head); }
.logo b em { font-style: normal; color: #d1ae5a; }
.logo small { display: block; color: #a9a593; font-size: .78rem; }
.lang { color: #d9d4c4; text-decoration: none; font-size: .95rem; }
.lang:hover { color: #fff; }
.menu { display: flex; gap: 0 4px; flex-wrap: wrap; font: 600 1rem var(--head); letter-spacing: .01em; }
.menu > a, .dd-top { display: block; color: #ddd8c8; text-decoration: none; padding: 7px 10px 9px; }
.menu > a:first-child { padding-left: 0; }
.menu > a:hover, .dd:hover .dd-top, .dd-top:focus, .menu [aria-current] { color: #fff; }
.menu > a[aria-current], .dd.on .dd-top { box-shadow: inset 0 -3px #c49f4c; }
.dd { position: relative; }
.dd-top::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; vertical-align: 3px; }
.dd-list { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: #262b2c; border: 1px solid #4a4f4c; border-top: 2px solid #8a6d2a; padding: 6px 0; z-index: 40; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.dd:hover .dd-list, .dd:focus-within .dd-list, .dd.open .dd-list { display: block; }
.dd-list a { display: flex; align-items: center; gap: 9px; padding: 6px 14px; color: #e4dfd0; text-decoration: none; font: 500 .98rem 'Source Sans 3', sans-serif; }
.dd-list a:hover, .dd-list a[aria-current] { background: #343a3a; color: #fff; }
.mflag { width: 24px; height: 15px; border: 1px solid rgba(0,0,0,.5); flex: none; }
.find { position: relative; flex: 1 1 260px; max-width: 380px; margin-left: auto; }
.find input { width: 100%; font: inherit; font-size: .95rem; padding: 7px 11px; border: 1px solid #50575a; background: #171b1c; color: #f0ece0; border-radius: 2px; }
.find input::placeholder { color: #8f9598; }
.find-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.18); z-index: 30; max-height: 70vh; overflow: auto; text-align: left; }
.find-list a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; color: var(--ink); text-decoration: none; border-bottom: 1px solid #eee; }
.find-list a:hover { background: var(--paper); }
.find-list small { white-space: nowrap; }

.page { max-width: 1180px; margin: 0 auto; padding: 8px 18px 40px; }
.lede { font-size: 1.12rem; max-width: 760px; color: #33383c; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 12px 0 0; }
.note { font-size: .92rem; color: var(--muted); max-width: 780px; }
.prose { max-width: 760px; }

footer { border-top: 1px solid var(--line); background: var(--paper2); font-size: .9rem; color: var(--muted); }
footer .bar { padding: 18px; }

/* Feedback form (/report.js draws the panel; these colors make it the site's own) */
:root { --report-bg: var(--paper); --report-fg: var(--ink); --report-muted: var(--muted); --report-line: var(--line); --report-accent: var(--red); --report-error: #b3261e; --report-ok: var(--olive); }
.report-btn { flex: none; font: 600 .9rem var(--head); letter-spacing: .01em; color: #ddd8c8; background: transparent; border: 1px solid #50575a; border-radius: 2px; padding: 4px 10px; cursor: pointer; }
.report-btn:hover { color: #fff; border-color: #8a6d2a; }
.report-line { margin: 0 auto; padding-bottom: 18px; font-size: .95rem; color: var(--muted); }
.report-line button { padding: 0; border: 0; background: none; font: inherit; color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
.report-line button:hover { color: #5e170c; }

/* tables: no boxes, thin rules */
.tbl { overflow-x: auto; margin: 8px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--paper); font-family: var(--head); font-size: .98rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
th[data-sort] { cursor: pointer; }
th[data-sort]::after { content: ' \2195'; color: #9a9585; font-size: .8em; }
th[data-dir="asc"]::after { content: ' \2191'; color: var(--red); }
th[data-dir="desc"]::after { content: ' \2193'; color: var(--red); }
td.n, th.n { text-align: right; padding-right: 14px; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: rgba(168,133,51,.08); }
table.kv { max-width: 680px; }
table.kv th { width: 42%; font-family: inherit; font-weight: 600; position: static; border-bottom: 1px solid var(--line); background: none; font-size: .92rem; }
.filter input { font: inherit; padding: 7px 10px; width: min(420px, 100%); border: 1px solid var(--line); background: #fbfaf6; border-radius: 3px; }
.filter .shown { color: var(--muted); font-size: .9rem; margin-left: 8px; }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border: 1px solid rgba(0,0,0,.35); vertical-align: -1px; }

/* commands */
code.cmd { background: #fbfaf6; border: 1px solid var(--line); padding: 1px 6px; border-radius: 2px; white-space: nowrap; }
button.copy { font: 600 .78rem 'Source Sans 3', sans-serif; margin-left: 6px; padding: 2px 8px; border: 1px solid var(--line); background: var(--paper2); color: var(--ink); cursor: pointer; border-radius: 2px; vertical-align: 1px; }
button.copy:hover { border-color: var(--ink); }
button.copy.done { background: var(--olive); color: #fff; border-color: var(--olive); }
.cmdlist dt { margin-top: 18px; font-family: var(--mono); font-weight: 600; }
.cmdlist dd { margin: 4px 0 0; max-width: 780px; }
.cmdlist .args { color: var(--muted); font-size: .92rem; }
pre { background: #fbfaf6; border: 1px solid var(--line); padding: 10px 12px; overflow-x: auto; font: .88rem/1.45 var(--mono); }

/* map */
body.wide .page { max-width: none; padding: 0 0 30px; }
body.wide .page > h1, body.wide .page > .lede, body.wide .page > .after, body.wide .page > .crumbs { max-width: 1180px; margin-left: auto; margin-right: auto; padding: 0 18px; }
body.wide .page > .after { display: block; }
.mapbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 18px; background: var(--paper2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mapbar select, .mapbar input { font: inherit; font-size: .95rem; padding: 5px 8px; border: 1px solid var(--line); background: #fbfaf6; border-radius: 3px; }
.mapbar .quick button { font: 600 .9rem 'Source Sans 3', sans-serif; padding: 5px 10px; border: 1px solid var(--line); background: #fbfaf6; cursor: pointer; border-radius: 3px; }
.mapbar .quick button:hover { border-color: var(--ink); }
.mapfind { position: relative; }
.mapfind > div { position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); z-index: 15; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.mapfind button { display: block; width: 100%; text-align: left; font: inherit; font-size: .93rem; padding: 6px 10px; border: 0; border-bottom: 1px solid #eee; background: #fff; cursor: pointer; }
.mapfind button:hover { background: var(--paper); }
.mapwrap { display: grid; grid-template-columns: 1fr 340px; min-height: 72vh; }
#map { position: relative; background: #6f8693; min-height: 72vh; }
#map canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#map:not(.ready)::after { content: 'Loading the map'; position: absolute; inset: 0; display: grid; place-items: center; color: #eef; font-weight: 600; }
html[lang^="zh"] #map:not(.ready)::after { content: '地图加载中'; }
#map .zoom { position: absolute; right: 12px; top: 12px; display: grid; gap: 4px; }
#map .zoom button { width: 34px; height: 34px; font: 700 1.2rem sans-serif; background: rgba(36,41,44,.85); color: #fff; border: 0; cursor: pointer; border-radius: 3px; }
#map .legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; align-items: center; background: rgba(36,41,44,.85); color: #fff; padding: 4px 10px; font-size: .85rem; border-radius: 3px; }
#map .legend:empty { display: none; }
#map .legend i { display: block; width: 140px; height: 10px; }
#map .tip { position: absolute; pointer-events: none; background: rgba(28,31,33,.92); color: #f4f0e4; padding: 5px 9px; font-size: .88rem; max-width: 220px; border-radius: 3px; }
#map .tip span { color: var(--brass); font-family: var(--mono); font-size: .8rem; }
#map-panel { background: #f7f5ef; border-left: 1px solid var(--line); padding: 4px 16px 16px; overflow: auto; max-height: 72vh; }
#map-panel h2 { margin-top: .6em; }
#map-panel .pid { margin-top: 0; }
#map-panel .kv td, #map-panel .kv th { font-size: .9rem; }
@media (max-width: 860px) {
  .mapwrap { grid-template-columns: 1fr; }
  #map { min-height: 60vh; }
  #map-panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
}

/* home */
.hero { margin: 0 calc(50% - 50vw); }
.home-hero { background: #1d2120 center 35% / cover no-repeat; color: #f2eee2; position: relative; }
.home-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,18,18,.92) 0%, rgba(16,18,18,.72) 48%, rgba(16,18,18,.25) 100%); }
.hero-in { position: relative; max-width: 1180px; margin: 0 auto; padding: 64px 18px 46px; }
.home-hero h1 { font-size: 3.3rem; margin: 0 0 .15em; color: #fff; }
.home-hero .lede { color: #e2ddcf; max-width: 600px; font-size: 1.18rem; }
.kicker { margin: 0; color: #d1ae5a; font: 600 1rem var(--head); }
.find.big { max-width: 600px; margin: 18px 0 14px; }
.find.big input { font-size: 1.05rem; padding: 11px 14px; background: rgba(16,18,18,.75); border-color: #7c7354; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.quick a { color: #f2eee2; text-decoration: none; border: 1px solid rgba(209,174,90,.65); padding: 5px 12px; background: rgba(16,18,18,.55); font-size: .95rem; }
.quick a:hover { background: #8a6d2a; border-color: #8a6d2a; color: #fff; }
.play { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px 12px; }
.play a { color: var(--ink); text-decoration: none; display: block; }
.play .pm { display: block; aspect-ratio: 16 / 10; background: #3a4146 center / cover; border: 1px solid #b7b09c; position: relative; }
.play a:hover .pm { border-color: var(--ink); outline: 1px solid var(--ink); }
.play .pflag { position: absolute; left: 6px; bottom: 6px; width: 41px; height: 26px; border: 1px solid rgba(0,0,0,.6); }
.play b { display: block; margin-top: 5px; font: 700 1.02rem/1.2 var(--head); }
.play small { display: block; font-size: .82rem; }
.play a:hover b { color: var(--red); }
.play .all { display: flex; flex-direction: column; justify-content: center; border: 1px dashed #a9a28c; padding: 10px; aspect-ratio: 16 / 10; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { grid-column: span 2; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: #f7f5ef; }
.tile.big { grid-column: span 3; }
.tile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: sepia(.18) contrast(1.05); border-bottom: 1px solid var(--line); }
.tile.big img { aspect-ratio: 2 / 1; }
.tile .tt { font: 700 1.3rem/1.2 var(--head); padding: 10px 14px 2px; }
.tile .td { padding: 0 14px 12px; color: #3a3f43; font-size: .95rem; }
.tile:hover { border-color: var(--ink); }
.tile:hover .tt { color: var(--red); }
.tile.noimg .tt { padding-top: 14px; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr 1fr; } .tile, .tile.big { grid-column: span 1; } .home-hero h1 { font-size: 2.4rem; } .hero-in { padding: 40px 18px 30px; } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }

/* country pages */
.chead { display: grid; grid-template-columns: 1fr 440px; gap: 28px; align-items: start; margin: 0 calc(50% - 50vw); padding: 10px max(18px, calc(50vw - 572px)) 22px; border-bottom: 1px solid var(--line); }
.chead.photo { background: linear-gradient(90deg, rgba(18,20,20,.93) 0%, rgba(18,20,20,.84) 55%, rgba(18,20,20,.55) 100%), var(--photo) center 30% / cover no-repeat; color: #ece8dc; border-bottom: 2px solid #8a6d2a; padding-top: 14px; }
.chead.photo a { color: #e7c675; }
.chead.photo .crumbs, .chead.photo .official { color: #bdb8a8; }
.chead h1 { margin: 0; }
.chead.photo h1 { color: #fff; }
.chead.photo h1 small { color: #c9c3b2; }
.ctitle { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.bigflag { width: 82px; height: 52px; border: 1px solid rgba(0,0,0,.55); box-shadow: 0 1px 4px rgba(0,0,0,.35); flex: none; }
.official { margin: 4px 0 0; font-size: 1.05rem; color: var(--muted); }
.tagline { margin: 10px 0; }
.chead.photo code.cmd { background: #191c1c; color: #f0ebdd; border-color: #55554c; }
.chead.photo button.copy { background: #2d3231; color: #ece8dc; border-color: #55554c; }
.cmap { margin: 6px 0 0; }
.cmap img { display: block; width: 100%; height: auto; border: 1px solid #10120f; }
.cmap figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.chead.photo .cmap figcaption { color: #bdb8a8; }
.parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.party { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); background: #f7f5ef; }
.party.on { border-color: #8a6d2a; outline: 1px solid #8a6d2a; background: #f8f1dd; }
.party p { margin: 0; }
.party .pg { font: 700 1.02rem var(--head); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.party .pg span { font: 400 .85rem 'Source Sans 3', sans-serif; color: var(--muted); }
.party .pg .in { color: #6b5216; font-weight: 600; }
.party .pl { font-weight: 600; margin-top: 4px; }
.party .ps, .party .pn { font-size: .9rem; color: var(--muted); }
.pf { width: 20px; height: 13px; border: 1px solid rgba(0,0,0,.45); }
.portrait { width: 78px; height: 105px; object-fit: cover; border: 1px solid #6d6655; background: #c9c3b0; flex: none; display: block; }
.portrait.none { background: linear-gradient(#d4cebc, #bdb6a1); }
/* picture + name in a table cell: the flex box sits inside the cell, so the cell's bottom line still meets the row's */
div.who { display: flex; align-items: center; gap: 10px; }
div.who > span { min-width: 0; }
.mini { width: 39px; height: 52px; object-fit: cover; border: 1px solid #8d8672; flex: none; display: block; }
.mini.none { background: linear-gradient(#ddd8c8, #c9c2ad); border-color: #c9c2ad; }
img.idea { width: 48px; height: 43px; flex: none; }
.people td { vertical-align: middle; }
.tflag { width: 30px; height: 19px; border: 1px solid rgba(0,0,0,.4); margin-right: 8px; vertical-align: -4px; }
.treelink { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); background: #2b2f2c; color: #ece8dc; text-decoration: none; }
.treelink .strip { display: flex; gap: 6px; flex-wrap: wrap; }
.treelink:hover { outline: 1px solid #8a6d2a; color: #fff; }
.treelink > span:last-child { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .chead { grid-template-columns: 1fr; } }

/* focus trees */
.tree { position: relative; overflow: auto; border: 1px solid #0f100e; background: radial-gradient(ellipse at 50% 0%, #2d302a 0%, #1a1c19 60%, #131512 100%); max-height: 80vh; }
.tree-canvas { position: relative; }
.tree svg { position: absolute; inset: 0; display: block; }
.tree path { fill: none; stroke: #b5a47a; stroke-width: 1.6; }
.tree path.or { stroke-dasharray: 5 4; }
.tree path.mx { stroke: #d0493a; stroke-width: 2; }
.tree .f { position: absolute; width: 106px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: #ece6d2; font: inherit; }
.tree .f img { display: block; width: 64px; height: 57px; margin: 2px 0 4px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.tree .f.noicon::before { content: ""; display: block; width: 46px; height: 46px; margin: 7px 0 8px; border: 1px solid #6f6346; border-radius: 50%; background: radial-gradient(#4a4a3c, #2a2b24); }
.tree .fn { display: flex; align-items: center; justify-content: center; width: 106px; height: 38px; padding: 0 4px; background: linear-gradient(#3a3b33, #26271f); border: 1px solid #6f6346; font: 600 11px/1.15 'Source Sans 3', sans-serif; text-align: center; overflow: hidden; }
.tree .fd { position: absolute; right: 2px; top: 2px; font: 10px var(--mono); color: #c8bb93; background: rgba(0,0,0,.55); padding: 0 3px; }
.tree .f:hover .fn, .tree .f.on .fn { border-color: #e2c26f; background: linear-gradient(#55503a, #36342a); color: #fff; }
.tree .f.on img { filter: drop-shadow(0 0 6px rgba(226,194,111,.9)); }
.focus-info { margin-top: 12px; min-height: 60px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  .top { position: relative; }
  .head1 { flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; }
  .lang { margin-left: auto; }
  .head1 .find { max-width: none; order: 3; flex-basis: 100%; }
  .report-btn { padding: 3px 8px; font-size: .85rem; }
  .menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 12px; font-size: .95rem; }
  .menu > a, .dd-top { white-space: nowrap; padding: 6px 8px 8px; }
  .dd { position: static; }
  .dd-list { left: 0; right: 0; min-width: 0; }
  thead th { top: 0; position: static; }
}
@media (max-width: 380px) {
  .head1 { column-gap: 8px; }
  .report-btn { padding: 2px 6px; font-size: .8rem; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1 small { font-family: var(--mono); font-size: .55em; color: var(--muted); font-weight: 400; }

/* the designers: a dark board as in the game, the numbers on paper beside it */
.dd-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin: 14px 0 12px; }
.dd-presets, .dd-years { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dd-presets > span, .dd-years > span { font-weight: 600; margin-right: 4px; }
.dd-bar button, .dd-act button, .td-auto button { font: 600 .92rem 'Source Sans 3', sans-serif; padding: 5px 11px; border: 1px solid #b9b3a2; background: #fbfaf6; color: var(--ink); cursor: pointer; border-radius: 2px; }
.dd-bar button:hover, .dd-act button:hover { border-color: var(--ink); }
.dd-years button[aria-pressed=true], .dd-act button[aria-pressed=true] { background: var(--slate); color: #f1ede2; border-color: var(--slate); }
.dd-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.dd-act .b1, .td-auto .b1 { background: var(--olive); border-color: var(--olive); color: #fff; }
.dd-desk { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.dd-board { display: flex; gap: 18px; padding: 14px 16px 16px; background: linear-gradient(#30352f, #232723); border: 1px solid #10120f; box-shadow: inset 0 0 0 1px #4a4d40; color: #e6e1d2; overflow-x: auto; }
.dd-h { margin: 0 0 8px; font: 700 1rem var(--head); color: #d9cfae; }
.dd-h b { font: 400 .85rem var(--mono); color: #a9a28c; margin-left: 6px; }
.dd-sup { flex: none; padding-right: 16px; border-right: 1px solid #4a4d40; }
.dd-slots, .dd-col { display: flex; flex-direction: column; gap: 6px; }
.dd-cols { display: flex; gap: 8px; }
.slot { display: grid; place-items: center; width: 84px; height: 50px; padding: 0; background: #1a1d1a; border: 1px solid #5a5b4b; border-radius: 2px; cursor: pointer; color: #a9a28c; }
.slot img { width: 76px; height: 42px; object-fit: contain; display: block; }
.slot:not(.full):not(.off)::before { content: '+'; font: 300 1.6rem/1 'Source Sans 3', sans-serif; color: #c9b57a; }
.slot:hover { border-color: #c9a64a; background: #252a24; }
.slot.full { background: #262a25; }
.slot.off { cursor: default; opacity: .35; }
.slot.off:hover { border-color: #5a5b4b; background: #1a1d1a; }
.dd-hint { font-size: .9rem; color: var(--muted); margin: 8px 0; }
.dd-sub { margin: 18px 0 6px; }
.dd-need { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; }
.dd-need li { display: flex; align-items: center; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.dd-need img, .dd-need .noicon { width: 64px; height: 34px; object-fit: contain; flex: none; }
.dd-stats { background: #fbfaf6; border: 1px solid var(--line); padding: 12px 14px; position: sticky; top: 108px; max-height: calc(100vh - 120px); overflow: auto; }
.dd-stats h3 { font-size: 1.02rem; margin: 14px 0 4px; }
.dd-t { width: 100%; border-collapse: collapse; font-size: .94rem; }
.dd-t th { text-align: left; font-weight: 400; padding: 3px 0; border-bottom: 1px solid #e6e2d6; }
.dd-t td { text-align: right; font-family: var(--mono); font-size: .88rem; padding: 3px 0; border-bottom: 1px solid #e6e2d6; white-space: nowrap; }
.dd-t td.wr { white-space: normal; padding-left: 10px; }
.dd-left { min-width: 0; }
.dd-w th { font-weight: 700; font-size: 1.05rem; }
.dd-w td { font-size: 1.05rem; font-weight: 700; }
.dd-fit { font-size: .88rem; color: var(--muted); margin: 4px 0 0; }
.dd-t .d { font-size: .78rem; margin-left: 6px; }
.d.up { color: #3d6a1f; } .d.down { color: #a3261a; }
.dd-terr { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dd-terr th, .dd-terr td { padding: 3px 4px; border-bottom: 1px solid #e6e2d6; text-align: right; }
.dd-terr th:first-child { text-align: left; font-weight: 400; }
.dd-terr .pos { color: #3d6a1f; } .dd-terr .neg { color: #a3261a; }
.dd-empty { color: var(--muted); }
.warn { background: #f6e8c9; border: 1px solid #d9bf7c; padding: 6px 10px; font-size: .9rem; }
.dd-pick { width: min(760px, 94vw); max-height: 84vh; padding: 0; border: 1px solid #10120f; background: #262a25; color: #e6e1d2; }
.dd-pick::backdrop { background: rgba(10, 12, 10, .55); }
.dd-pick-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #4a4d40; position: sticky; top: 0; background: #262a25; }
.dd-pick-head p { margin: 0; font: 700 1.1rem var(--head); color: #f0e9d2; }
.dd-pick-head button, .dd-rm button { font: 600 .9rem 'Source Sans 3', sans-serif; padding: 4px 10px; background: #3a3f37; color: #eee7d3; border: 1px solid #5a5b4b; cursor: pointer; border-radius: 2px; }
#pick-list { padding: 4px 14px 16px; overflow: auto; max-height: calc(84vh - 56px); }
.dd-pg { margin: 12px 0 6px; font-weight: 700; color: #d9cfae; }
.dd-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.dd-units button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 4px 8px 4px 4px; background: #1d201d; border: 1px solid #4a4d40; color: #ece6d4; cursor: pointer; font: .93rem/1.25 'Source Sans 3', sans-serif; border-radius: 2px; }
.dd-units button:hover { border-color: #c9a64a; background: #2d322b; }
.dd-units img, .dd-units .noicon { width: 76px; height: 42px; object-fit: contain; flex: none; }
.dd-units small { display: block; color: #a9a28c; }
.dd-mini { display: none; }
@media (max-width: 900px) {
  .dd-desk { grid-template-columns: 1fr; }
  .dd-stats { position: static; max-height: none; }
  .slot { width: 62px; height: 40px; } .slot img { width: 58px; height: 32px; }
  .dd-board { gap: 10px; padding: 10px; } .dd-sup { padding-right: 10px; } .dd-cols { gap: 5px; }
  .dd-pick { max-height: 92vh; }
  .dd-mini:not(:empty) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; justify-content: space-around; padding: 6px 4px; background: var(--slate); color: #f1ede2; font: .95rem var(--mono); }
  .dd-mini small { display: block; font: .7rem 'Source Sans 3', sans-serif; color: #b9b3a2; }
}
/* tank designer: the game's blueprint, the part of the slot you point at lit up */
.td-head { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; }
.td-head label, .td-auto label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .92rem; }
.td-head select, .td-auto select, .td-auto input { font: 1rem 'Source Sans 3', sans-serif; padding: 5px 8px; border: 1px solid #b9b3a2; background: #fbfaf6; border-radius: 2px; min-width: 220px; }
.td-auto input { min-width: 0; width: 110px; }
.td-bp { position: relative; aspect-ratio: 508 / 248; background: #2f3539 center / cover no-repeat; border: 1px solid #10120f; }
.td-bp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: opacity .15s; }
.td-bp img.part { opacity: 0; }
.td-bp img.part.on { opacity: 1; }
.td-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 10px; background: linear-gradient(#30352f, #232723); border: 1px solid #10120f; border-top: 0; }
.td-slots .sp-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mslot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; background: #1a1d1a; border: 1px solid #5a5b4b; color: #ece6d4; cursor: pointer; font: .82rem/1.2 'Source Sans 3', sans-serif; border-radius: 2px; min-height: 96px; }
.mslot:hover, .mslot.hot { border-color: #c9a64a; background: #252a24; }
.mslot small { color: #a9a28c; font-size: .74rem; }
.mslot img { width: 56px; height: 42px; object-fit: contain; }
.mslot .noicon { width: 56px; height: 42px; display: grid; place-items: center; color: #c9b57a; font-size: 1.5rem; }
.mslot.bad { border-color: #c0473a; }
.td-ups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 12px; }
.td-ups label { font-weight: 600; font-size: .93rem; }
.td-ups output { font-family: var(--mono); margin-left: 6px; color: var(--red); }
.td-ups input { width: 100%; accent-color: var(--olive); }
.td-auto { margin: 14px 0; border: 1px solid var(--line); background: #fbfaf6; }
.td-auto summary { padding: 8px 12px; cursor: pointer; font-weight: 700; }
.td-auto-in { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; padding: 4px 12px 12px; }
.td-auto-in .dd-hint { flex-basis: 100%; }
.td-bat { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: 4px; }
.td-bat th, .td-bat td { padding: 3px 3px; border-bottom: 1px solid #e6e2d6; text-align: right; font-family: var(--mono); font-size: .8rem; }
.td-bat thead th { font-family: 'Source Sans 3', sans-serif; color: var(--muted); }
.td-bat tr.bn th { text-align: left; font: 600 .9rem 'Source Sans 3', sans-serif; border-bottom: 0; padding-top: 7px; }
@media (max-width: 480px) {
  .slot { width: 50px; height: 34px; } .slot img { width: 46px; height: 26px; }
  .dd-h { font-size: .88rem; } .dd-h b { display: block; margin: 0; }
  .dd-board { gap: 7px; padding: 8px; } .dd-sup { padding-right: 7px; } .dd-cols { gap: 4px; } .dd-slots, .dd-col { gap: 4px; }
  .dd-units { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .td-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } .td-slots .sp-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .td-ups { grid-template-columns: 1fr; } }
img.techpic { width: 72px; height: auto; max-height: 56px; object-fit: contain; flex: none; }
.phead { grid-template-columns: 1fr; padding-top: 16px; padding-bottom: 26px; margin-bottom: 10px; }
.phead h1 { margin-top: .35em; }
.phead .lede { color: #e2ddcf; }
.phead code { color: #f0ebdd; }
/* section heads: a loading screen of the game across the page, the title on it */
.hero-art { position: relative; margin: 16px 0 6px; height: clamp(170px, 26vw, 320px); overflow: hidden; background: #262a25; border: 1px solid #161816; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 14, 12, .82) 0%, rgba(12, 14, 12, .25) 45%, rgba(12, 14, 12, 0) 70%); }
.hero-art .hero-in { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 24px 18px; }
.hero-art .hero-in h1 { color: #fff; margin: .1em 0 0; font-size: clamp(1.8rem, 3.6vw, 2.7rem); text-shadow: 0 2px 10px rgba(0, 0, 0, .65); }
.hero-art .hero-in .crumbs { color: #d8d2c2; margin: 0; }
.hero-art .hero-in .crumbs a { color: #f1e3b8; }
.hero-lede { max-width: 820px; font-size: 1.08rem; margin: 10px 0 14px; }
@media (max-width: 600px) { .hero-art { margin: 10px -18px 6px; border-left: 0; border-right: 0; } .hero-art .hero-in { padding: 0 18px 12px; } }
.ficons { white-space: nowrap; } .ficons img { width: 40px; height: 36px; object-fit: contain; margin-right: 2px; vertical-align: middle; }
.idhub > div { padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.idhub h2 { margin: .8em 0 .35em; }
.istrip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 6px; }
.istrip img { height: 46px; width: auto; max-width: 90px; object-fit: contain; }
.istrip.fl img { height: 30px; border: 1px solid rgba(0, 0, 0, .35); }
.istrip.mp img { height: 70px; max-width: 120px; border: 1px solid #8d8672; }
.istrip.wide img { height: 40px; max-width: 96px; }

/* map as the game's (28 Nov 2026): a dark bar and a state view in the game's colours, the map tall */
.mapbar { background: linear-gradient(#30352f, #262a25); border-color: #10120f; color: #e6e1d2; }
.mapbar select, .mapbar input { background: #1d201d; color: #ece6d4; border-color: #4a4d40; }
.mapbar .quick button { background: #2a2e28; color: #ece6d4; border-color: #4a4d40; }
.mapbar .quick button:hover { border-color: #c9a64a; }
.mapbar .quick button[aria-pressed=true] { background: #c9a64a; color: #1b1a14; border-color: #c9a64a; }
.mapfind > div { background: #262a25; border-color: #4a4d40; }
.mapfind button { background: #262a25; color: #ece6d4; border-bottom-color: #3a3e36; }
.mapfind button:hover { background: #34392f; }
.mapwrap { grid-template-columns: 1fr 330px; min-height: calc(100vh - 160px); }
#map { background: #3d5a73; min-height: calc(100vh - 160px); }
#map .zoom button { background: rgba(30, 34, 30, .9); border: 1px solid #5a5b4b; }
#map .zoom button:hover { border-color: #c9a64a; }
#map .tip { background: rgba(30, 34, 30, .94); border: 1px solid #5a5b4b; }
#map .tip .mflag { vertical-align: -3px; margin-right: 5px; }
#map-panel { background: #262a25; color: #e6e1d2; border-left: 1px solid #10120f; max-height: calc(100vh - 160px); }
#map-panel h2 { color: #f2e9cc; margin: 0; font-size: 1.35rem; }
#map-panel h3 { color: #d9cfae; font-size: 1rem; margin: 14px 0 6px; }
#map-panel a { color: #e7c873; }
#map-panel code { color: #e8dfc4; }
#map-panel small { color: #a9a28c; }
#map-panel .kv th { color: #b9b29c; font-weight: 400; }
#map-panel .kv td, #map-panel .kv th { border-bottom-color: #3a3e36; }
#map-panel button.copy { background: #3a3f37; color: #eee7d3; border-color: #5a5b4b; }
#map-panel code.cmd { background: #1d201d; border-color: #4a4d40; }
.sv-head { display: flex; gap: 12px; align-items: center; padding: 14px 0 8px; border-bottom: 1px solid #4a4d40; margin-bottom: 8px; }
.sv-head p { margin: 2px 0 0; color: #cfc8b2; }
.mflag { border: 1px solid rgba(0, 0, 0, .5); vertical-align: -3px; margin-right: 4px; }
.mflag.big { width: 64px; height: 40px; margin: 0; flex: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.sv-icons { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.sv-icons li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.sv-icons img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.sv-icons b { font-family: var(--mono); color: #f2e9cc; min-width: 1.4em; }
.sv-icons span { font-size: .88rem; color: #cfc8b2; }
.sv-vp { list-style: none; padding: 0; margin: 0; }
.sv-vp li { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #3a3e36; font-size: .93rem; }
.sv-vp b { font-family: var(--mono); color: #e8c45a; }
@media (max-width: 860px) {
  .mapwrap { min-height: 0; grid-template-columns: 1fr; }
  #map { min-height: 64vh; }
  #map-panel { max-height: none; border-top: 1px solid #10120f; }
}
.mapbar .corepick select { min-width: 150px; max-width: 190px; }
.mapbar #map-mode { max-width: 240px; }
.corepick[hidden] { display: none; }
#map .legend .sq { width: 14px; height: 14px; display: inline-block; border: 1px solid rgba(255, 255, 255, .5); }
#map .legend .sq.hatch { background: repeating-linear-gradient(135deg, currentColor 0 3px, transparent 3px 6px); }
#map .legend .mflag { margin: 0; }
#map-panel table.wx { width: 100%; font-size: .82rem; }
#map-panel table.wx th { color: #d9cfae; font-weight: 600; padding: 3px 2px; }
#map-panel table.wx td { font-family: var(--mono); font-size: .78rem; padding: 3px 2px; color: #e6e1d2; }
#map-panel table.wx tr.now td { color: #f2d57e; }
/* ===== tools (feat/tools-ux): designers' toolbar, saved items, picker search, hover cards, compare column;
   console command builder; lists with sticky heads, remembered sort and copyable IDs ===== */
#designer, #desk, #builder { scroll-margin-top: calc(var(--top, 100px) + 8px); }
.dd-bar button[aria-pressed=true] { background: var(--slate); color: #f1ede2; border-color: var(--slate); }
.dd-yearhint { margin: 0; flex: 1 1 280px; }
.dd-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.dd-tools button, .dd-save button, .dd-mine button, .td-autobtn, .td-range button { font: 600 .92rem 'Source Sans 3', sans-serif; padding: 5px 11px; border: 1px solid #b9b3a2; background: #fbfaf6; color: var(--ink); cursor: pointer; border-radius: 2px; }
.dd-tools button:hover:not(:disabled), .dd-mine button:hover, .td-autobtn:hover, .td-range button:hover { border-color: var(--ink); }
.dd-tools button:disabled { opacity: .45; cursor: default; }
.dd-tools .b1, .dd-save .b1 { background: var(--olive); border-color: var(--olive); color: #fff; }
.dd-tools #undo, .dd-tools #redo { padding: 5px 9px; }
.dd-cmp { display: flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 600; font-size: .92rem; }
.dd-cmp select { font: .95rem 'Source Sans 3', sans-serif; padding: 4px 6px; border: 1px solid #b9b3a2; background: #fbfaf6; border-radius: 2px; max-width: 210px; }
.dd-save { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); background: #fbfaf6; }
.dd-save[hidden] { display: none; }
.dd-save label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.dd-save input { font: 1rem 'Source Sans 3', sans-serif; padding: 4px 8px; border: 1px solid #b9b3a2; width: min(320px, 60vw); }
.dd-mine { display: contents; }
.dd-saved { display: inline-flex; }
.dd-saved button[aria-pressed=true] { background: var(--slate); color: #f1ede2; border-color: var(--slate); }
.dd-saved .x { border-left: 0; padding: 5px 8px; color: var(--muted); }
.dd-saved .x:hover { color: var(--red); }
#mine[hidden] { display: none; }
.dd-touch { display: none; }
@media (hover: none) { .dd-mouse { display: none; } .dd-touch { display: block; } }
.dd-colctl { display: flex; justify-content: center; gap: 4px; min-height: 24px; }
.dd-colctl button { width: 30px; height: 22px; padding: 0; font: 700 1rem/1 'Source Sans 3', sans-serif; background: #1a1d1a; color: #d9cfae; border: 1px solid #5a5b4b; cursor: pointer; border-radius: 2px; }
.dd-colctl button:hover:not(:disabled) { border-color: #c9a64a; color: #fff; }
.dd-colctl button:disabled { opacity: .35; cursor: default; }
.slot:focus-visible, .mslot:focus-visible { outline: 2px solid #e2c26f; outline-offset: 1px; }
.dd-tip { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 16px); padding: 8px 11px; background: #1e221f; color: #ece6d4; border: 1px solid #6f6346; box-shadow: 0 8px 22px rgba(0,0,0,.4); font-size: .86rem; line-height: 1.35; pointer-events: none; }
.dd-tip[hidden] { display: none; }
.dd-tip p { margin: 4px 0; }
.dd-tip .tt-h { font: 700 1rem var(--head); color: #f3e7c2; margin-top: 0; }
.dd-tip .tt-h small { font: 400 .78rem var(--mono); color: #a9a28c; margin-left: 4px; }
.dd-tip .tt-s { color: #cfc8b4; }
.dd-tip .tt-d { font-style: italic; }
.dd-tip .tt-k { color: #9fd17a; border-top: 1px solid #3d4139; padding-top: 5px; margin-bottom: 0; }
.dd-tip .tt-t { width: 100%; border-collapse: collapse; margin: 4px 0; }
.dd-tip .tt-t th, .dd-tip .tt-t td { padding: 1px 0; border: 0; font-weight: 400; font-size: .84rem; }
.dd-tip .tt-t td { text-align: right; font-family: var(--mono); color: #fff; }
.dd-pick-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 14px 4px; }
.dd-pick-tools input[type=search] { flex: 1 1 220px; font: 1rem 'Source Sans 3', sans-serif; padding: 6px 10px; background: #171a17; color: #f0ece0; border: 1px solid #5a5b4b; border-radius: 2px; }
.dd-pick-tools input[type=search]::placeholder { color: #8f9588; }
.dd-count { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .9rem; color: #d9cfae; }
.dd-count:empty { display: none; }
.dd-count > span { margin-right: 4px; font-weight: 600; }
.dd-count button { font: 600 .9rem 'Source Sans 3', sans-serif; min-width: 30px; padding: 4px 9px; background: #1d201d; color: #ece6d4; border: 1px solid #5a5b4b; cursor: pointer; border-radius: 2px; }
.dd-count button[aria-pressed=true] { background: #c9a64a; color: #1a1c19; border-color: #c9a64a; }
.dd-check { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: #d9cfae; cursor: pointer; }
#pick-list { max-height: calc(84vh - 110px); }
.dd-pick { width: min(940px, 96vw); }
#pick-list .dd-units { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.dd-units button .nm { display: block; }
.dd-units small.nums, .dd-units small.dl, .dd-rm small.dl { font-size: .8rem; line-height: 1.3; color: #c9c2ab; margin-top: 1px; }
.dd-units button[aria-current=true] { border-color: #c9a64a; background: #34382c; }
.dd-units button.late { opacity: .8; }
.dd-units button:disabled { opacity: .55; cursor: default; }
.dd-units button:disabled:hover { border-color: #4a4d40; background: #1d201d; }
.dd-units small.why { color: #e0a08f; }
.dl .up { color: #9fd17a; } .dl .down { color: #f08f7f; }
.dd-units button:focus-visible { outline: 2px solid #e2c26f; outline-offset: 1px; }
.dd-none { color: #c9c2ab; }
.dd-more button { font: 600 .9rem 'Source Sans 3', sans-serif; background: none; border: 0; color: #e2c26f; text-decoration: underline; cursor: pointer; padding: 0; }
.dd-rm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dd-t thead td, .dd-t thead th { font: 600 .78rem 'Source Sans 3', sans-serif; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 0; }
.dd-stats thead th { background: none; border-bottom: 1px solid var(--line); }
.dd-t thead td { white-space: normal; }
.dd-t th { padding-right: 8px; }
.dd-cmpnote { margin: 0 0 6px; font-size: .88rem; color: var(--muted); }
@media (min-width: 901px) { .dd-desk { grid-template-columns: minmax(0, 1fr) 360px; } }
.dd-t td.o { color: var(--muted); padding-left: 10px; width: 1%; }
.dd-t td .d { margin: 0 0 0 6px; }
.td-auto label > span { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.dd-w td.o { font-size: .9rem; font-weight: 400; }
.dd-t th[title] { cursor: help; text-decoration: underline dotted #b9b3a2; text-underline-offset: 3px; }
.dd-fitall { font-size: .88rem; margin: 4px 0 8px; }
.dd-fitall summary { cursor: pointer; color: var(--red); }
.dd-fitall .dd-terr td small { color: var(--muted); }
.dd-need li > span small { display: block; font-size: .8rem; }
.dd-need .cnt { font-weight: 700; }
.td-head { align-items: flex-end; }
.td-autobtn { background: var(--slate); color: #f1ede2; border-color: var(--slate); padding: 7px 12px; margin-left: auto; }
.td-autobtn:hover { background: #3a4246; color: #fff; }
.td-up { display: flex; flex-direction: column; gap: 2px; }
.td-up label { font-weight: 600; font-size: .93rem; }
.td-up small { font-size: .84rem; }
.td-range { display: flex; align-items: center; gap: 6px; }
.td-range input { flex: 1; width: auto; accent-color: var(--olive); }
.td-range button { width: 32px; padding: 3px 0; }
@media (max-width: 600px) {
  .dd-presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-right: -18px; padding-right: 18px; }
  .dd-presets::-webkit-scrollbar { display: none; }
  .dd-presets > *, .dd-presets button { flex: none; }
  .dd-mine { display: flex; gap: 6px; }
  .dd-cmp { margin-left: 0; flex-basis: 100%; }
  .dd-cmp select { max-width: none; flex: 1; }
  .td-autobtn { margin-left: 0; }
  .dd-pick { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; }
  .dd-pick[open] { display: flex; flex-direction: column; }
  .dd-pick #pick-list { flex: 1; max-height: none; overflow: auto; }
}
@media (max-width: 480px) { .dd-colctl button { width: 22px; } .dd-colctl { gap: 3px; } }

/* console command builder */
.cb { margin: 10px 0 26px; padding: 14px 16px 16px; background: #f7f5ef; border: 1px solid var(--line); }
.cb h2 { margin: 0 0 4px; }
.cb > p { margin: 4px 0 10px; }
.cb-cmds { display: grid; gap: 6px; margin: 6px 0 14px; }
.cb-row { display: grid; grid-template-columns: 78px 1fr; gap: 6px; align-items: start; }
.cb-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-g { font-weight: 600; font-size: .9rem; color: var(--muted); padding-top: 5px; }
.cb-sel { display: none; }
.cb-list button > span { min-width: 0; overflow-wrap: anywhere; }
.cb-none { margin: 0; padding: 8px 10px; color: var(--muted); }
@media (max-width: 600px) {
  .cb { padding: 12px; }
  .cb-cmds { display: none; }
  .cb-sel { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .92rem; margin: 6px 0 12px; }
  .cb-sel select { font: 1.05rem var(--mono); padding: 7px 9px; border: 1px solid #b9b3a2; background: #fff; border-radius: 2px; }
  .cb-pick input { width: 100%; }
  .cb-args > * { flex: 1 1 100%; }
}
.cb-cmds button { font: 600 .9rem var(--mono); padding: 4px 9px; border: 1px solid #b9b3a2; background: #fbfaf6; color: var(--ink); cursor: pointer; border-radius: 2px; }
.cb-cmds button:hover { border-color: var(--ink); }
.cb-cmds button[aria-pressed=true] { background: var(--slate); color: #f1ede2; border-color: var(--slate); }
.cb-args { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.cb-args label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .92rem; }
.cb-args input, .cb-args select { font: 1rem 'Source Sans 3', sans-serif; padding: 6px 9px; border: 1px solid #b9b3a2; background: #fff; border-radius: 2px; }
.cb-args input[type=number] { width: 140px; font-family: var(--mono); }
.cb-pick { position: relative; }
.cb-pick input { width: min(320px, 82vw); }
.cb-list { position: absolute; top: 100%; left: 0; z-index: 25; width: max(100%, 300px); max-width: 88vw; max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.cb-list[hidden] { display: none; }
.cb-list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-bottom: 1px solid #eee; background: #fff; font: .95rem 'Source Sans 3', sans-serif; color: var(--ink); cursor: pointer; }
.cb-list button:hover, .cb-list button.on { background: var(--paper); }
.cb-list button code { color: var(--red); font-size: .85rem; flex: none; }
.cb-list button small { margin-left: auto; padding-left: 8px; flex: none; }
.cb-list img { width: 24px; height: 15px; border: 1px solid rgba(0,0,0,.4); flex: none; }
.cb-out { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.cb-out code.cmd { font-size: 1.05rem; padding: 5px 10px; white-space: normal; word-break: break-all; }
.cb-out button.copy { font-size: .9rem; padding: 5px 12px; background: var(--olive); color: #fff; border-color: var(--olive); }
.cb-help { font-size: .9rem; color: var(--muted); margin: 8px 0 0; max-width: 760px; }

/* lists: sticky heads when the table fits the page, copyable IDs, phone layout of the two-column command tables */
.tbl.fits { overflow: visible; }
.tbl.fits thead th { position: sticky; top: var(--top, 0px); z-index: 3; box-shadow: 0 2px 0 var(--ink); border-bottom-color: transparent; }
.cid { cursor: copy; border-bottom: 1px dotted #a09a88; }
.cid:hover, .cid:focus-visible { color: var(--red); border-bottom-color: var(--red); }
.cid.done { color: var(--olive); border-bottom-color: transparent; font-family: 'Source Sans 3', sans-serif; }
.filter .shown.none { color: var(--red); }
#spirit-list code.cmd, #law-list code.cmd { display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  table.pair, table.pair tbody, table.pair tr, table.pair td { display: block; width: auto; }
  table.pair thead { display: none; }
  table.pair tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.pair td { border: 0; padding: 2px 0; }
  table.pair code.cmd { white-space: normal; word-break: break-all; }
}
/* ===== research screen and doctrines (scripts/build/techtree.mjs, doctrines.mjs; src/techtree.js, doctrines.js) =====
   The game's own art at the game's own pixel positions; our panel beside it on paper. */
.rs-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 14px 0 0; padding: 0 0 0 10px; }
.rs-tabs { --s: 1; }
.rs-tabs a { flex: none; display: block; width: calc(var(--tw, 91px) * var(--s)); padding-top: calc(var(--th, 61px) * var(--s) + 3px); background: var(--tab) no-repeat 100% 0 / calc(var(--tw, 91px) * 2 * var(--s)) calc(var(--th, 61px) * var(--s)); color: #5c6166; text-decoration: none; font: 600 .8rem/1.05 var(--head); text-align: center; }
.rs-tabs a:hover, .rs-tabs a[aria-current] { background-position: 0 0; color: var(--ink); }
.rs-tabs a[aria-current] span { box-shadow: inset 0 -2px #c49f4c; }
.rs-c { position: relative; }
.rs-c > * { position: absolute; }
.rs-c .bgp { pointer-events: none; max-width: none; }
.rs-c .pnl { border: 32px solid transparent; border-image: var(--p) 32 fill / 32px round; opacity: .55; pointer-events: none; }
.rs-l { left: 0; top: 0; pointer-events: none; filter: drop-shadow(0 0 1px #000) drop-shadow(0 1px 1px #000); }
.rs-l path { fill: none; stroke: #c9a650; stroke-width: 3; }
.rs-l path.x { stroke: #b23a2c; stroke-width: 2; stroke-dasharray: 5 5; }
.rs-c .yr { font: 700 24px/1 var(--head); color: #d9d0b4; text-shadow: 0 1px 3px #000; pointer-events: none; }
.rs-c .ttl { font: 700 17px/1.1 var(--head); color: #e9e2cb; letter-spacing: .03em; text-shadow: 0 1px 3px #000; pointer-events: none; }
.rs-c .xor { width: 60px; height: 60px; pointer-events: none; z-index: 2; }
.rs-c .xor img { position: absolute; left: 0; top: 0; }
.rs-c .t { padding: 0; border: 0; margin: 0; background: var(--fr) no-repeat 0 0 / 100% 100%; cursor: pointer; color: #f1ead4; font: inherit; z-index: 1; }
.rs-c .t:hover, .rs-c .t.on { background-image: var(--on, var(--fr)); }
.rs-c .t.on { outline: 2px solid #e8c96a; outline-offset: 1px; z-index: 3; }
.rs-c .t:focus-visible { outline: 2px solid #fff; }
.rs-c .t .ic { position: absolute; max-width: none; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
.rs-c .t .tn { position: absolute; padding: 4px 4px 0; font: 700 12.5px/1.15 'Source Sans 3', sans-serif; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; pointer-events: none; }
.rs-c .t .sub { position: absolute; display: grid; place-items: center; background: var(--sb) no-repeat 0 0 / 100% 100%; }
.rs-c .t .sub img { max-width: 90%; max-height: 90%; }
.rs-c .t .sub:hover { outline: 1px solid #e8c96a; }
.tp { background: #fbfaf6; border: 1px solid var(--line); padding: 4px 14px 14px; position: sticky; top: 108px; max-height: calc(100vh - 120px); overflow: auto; font-size: .95rem; }
.tp-hint { color: var(--muted); }
.tp-close { display: none; }
.tp-head { margin: 10px -14px 0; padding: 10px 14px; min-height: 30px; background: linear-gradient(#30352f, #232723); display: flex; justify-content: center; }
.tp-head img { max-width: 100%; max-height: 90px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.tp h2 { margin: .5em 0 .1em; font-size: 1.35rem; }
.tp h3 { font-size: 1rem; margin: 1em 0 .3em; }
.tp ul { margin: 0; padding-left: 18px; }
.tp li { margin: 2px 0; }
.tp-meta { color: var(--muted); margin-top: 0; }
.tp-desc { color: #4a4f53; font-style: italic; }
.tp-x-or { color: #8f2a1c; }
.techhub h2 { display: flex; align-items: center; gap: 10px; }
.ficon { width: auto; height: 34px; }
@media (max-width: 860px) {
  .tp { display: none; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 72vh; border: 0; border-top: 3px solid #8a6d2a; box-shadow: 0 -8px 24px rgba(0,0,0,.35); padding-top: 2px; }
  .tp.open { display: block; }
  .tp-close { display: block; position: sticky; top: 0; margin: 0 -8px 0 auto; width: 40px; height: 36px; font: 400 1.8rem/1 sans-serif; border: 0; background: none; color: var(--ink); cursor: pointer; }
  .tp-head { margin-top: -30px; }
  .rs-tabs { --s: .7; }
  .rs-tabs a { font-size: .72rem; }
}
.dc-tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin: 14px 0 0; }
.dc-tabs a { flex: none; position: relative; display: grid; place-items: center; width: var(--tw, 256px); height: var(--th, 61px); background: var(--tab) no-repeat 100% 0 / calc(var(--tw, 256px) * 2) var(--th, 61px); color: #e9e2cb; text-decoration: none; font: 700 1rem/1 var(--head); text-shadow: 0 1px 2px #000; }
.dc-tabs a span { padding-left: 40px; }
.dc-tabs a:hover, .dc-tabs a[aria-current] { background-position: 0 0; color: #fff; }
.dc-c { position: relative; }
.dc-c > *, .dc-c .tks, .dc-c .tk, .dc-c .tk > *, .dc-c .rws, .dc-c .rw > * { position: absolute; }
.dc-c .tks, .dc-c .tk, .dc-c .rws { display: block; }
.dc-c button { padding: 0; border: 0; margin: 0; background-color: transparent; cursor: pointer; font: inherit; color: inherit; }
.dc-c .gd { z-index: 3; }
.dc-c .gd-ic, .dc-c .sd-ic { position: absolute; width: 64px; height: 64px; }
.dc-c .gd-ic img, .dc-c .sd-ic img { width: 64px; height: 64px; display: block; }
.dc-c .gd-n { position: absolute; left: 30px; right: 30px; top: 80px; height: 32px; display: grid; place-items: center; font: 700 21px/1 var(--head); color: #fff; text-shadow: 0 1px 3px #000; }
.dc-c .gd:hover .gd-ic, .dc-c .sd:hover .sd-ic { filter: brightness(1.2) drop-shadow(0 0 6px rgba(232,201,106,.8)); }
.dc-c .tk-bg { max-width: none; pointer-events: none; opacity: .9; }
.dc-c .tk-fr { pointer-events: none; }
.dc-c .ms { z-index: 2; width: 382px; height: 83px; }
.dc-c .ms > span { position: absolute; left: 0; top: 0; display: block; }
.dc-c .ms .ms-ic { left: 139px; top: 7px; }
.dc-c .ms:hover .ms-ic { filter: brightness(1.25); }
.dc-c .tk-n { width: 260px; height: 52px; display: grid; place-items: center; text-align: center; font: 700 22px/1.05 var(--head); color: #f2ecd8; text-shadow: 0 1px 3px #000; pointer-events: none; }
.dc-c .sd { z-index: 2; }
.dc-c .sd-n { position: absolute; left: 18px; top: 60px; width: 200px; height: 40px; display: grid; place-items: center; text-align: center; font: 700 14px/1.1 'Source Sans 3', sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
.dc-c .rws { width: 72px; }
.dc-c .rw { position: absolute; left: 0; width: 72px; height: 130px; }
.dc-c .rw .rw-l { left: 33px; top: 0; width: 6px; height: 88px; background: linear-gradient(90deg, #2a2a20, #b39553 30%, #e1c77c 50%, #b39553 70%, #2a2a20); }
.dc-c .rw:last-child .rw-l { height: 66px; }
.dc-c .rw-m { display: grid; place-items: center; font: 700 12px/1 'Source Sans 3', sans-serif; color: #fff; text-shadow: 0 1px 1px #000; }
.dc-c .rw-p, .dc-c .rw-p > span { display: block; }
.dc-c .rw-p > span { position: absolute; left: 0; top: 0; }
.dc-c .rw:hover .rw-p, .dc-c .rw:focus-visible .rw-p { filter: brightness(1.2) drop-shadow(0 0 6px rgba(232,201,106,.7)); }
.dc-c .rw-g { pointer-events: none; transform: scale(.7); }
.dc-c .rw-n { top: 104px; width: 130px; text-align: center; font: 600 12.5px/1.15 'Source Sans 3', sans-serif; color: #e9e2cb; text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; z-index: 1; }
.dc-pick .dc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px 0; }
.dc-pick .dc-list button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 8px; background: #1d201d; border: 1px solid #4a4d40; color: #ece6d4; cursor: pointer; font: .95rem/1.2 'Source Sans 3', sans-serif; border-radius: 2px; }
.dc-pick .dc-list button:hover, .dc-pick .dc-list button[aria-pressed="true"] { border-color: #c9a64a; background: #2d322b; }
.dc-pick .dc-list small { display: block; color: #a9a28c; }
.dc-pick #dc-pick-list { padding: 0 14px; }
.tp-rw { padding-left: 20px; }
.tp-rw > li { margin: 6px 0; }
.dc-h { display: flex; align-items: center; gap: 10px; }
.dc-h .gametext { display: inline-flex; align-items: center; gap: 10px; }
.dicon { width: 48px; height: 48px; flex: none; }
.dc-h .dicon { width: 56px; height: 56px; }
.dc-desc { max-width: 780px; font-style: italic; color: #3e4347; }
.dc-t td:first-child { min-width: 200px; }
.dc-rw { margin: 0; padding-left: 18px; }
.dc-rw li { margin: 0 0 6px; }
.dc-rw .rn { color: #6b5216; font-weight: 600; }
@media (max-width: 860px) {
  .dc-tabs a { width: 150px; background-size: 300px 36px; height: 36px; font-size: .9rem; }
  .dc-tabs a span { padding-left: 18px; }
  .dc-pick .dc-list { grid-template-columns: 1fr; }
}
/* the doctrine and research screens take the window as the focus tree does (28 Nov; scripts/build/stage.mjs,
   src/stage.js): the folder tabs and the buttons in a bar on top, the screen under it, the panel over its right side */
.gsv { position: relative; display: flex; flex-direction: column; margin: 10px calc(50% - 50vw) 0; height: calc(100vh - 98px); min-height: 480px; background: radial-gradient(ellipse at 50% 0%, #2e312b 0%, #1b1d1a 55%, #121411 100%); border-top: 1px solid #0f100e; border-bottom: 1px solid #0f100e; }
.gsv:fullscreen { height: 100vh; margin: 0; }
html.ftv-min .gsv { margin-top: 0; }
.gsv-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: rgba(10, 11, 9, .55); border-bottom: 1px solid #0f100e; }
.gsv-bar .rs-tabs, .gsv-bar .dc-tabs { margin: 0; padding: 0; min-width: 0; }
.gsv-bar .ftv-zoom { flex: none; }
.gsv .rs-tabs { --s: .72; }
.gsv .rs-tabs a { color: #aaa38f; font-size: .74rem; }
.gsv .rs-tabs a:hover, .gsv .rs-tabs a[aria-current] { color: #fff; }
.gsv .dc-tabs a { width: calc(var(--tw, 256px) * .72); height: calc(var(--th, 61px) * .72); background-size: calc(var(--tw, 256px) * 1.44) calc(var(--th, 61px) * .72); font-size: .9rem; }
.gsv .dc-tabs a span { padding-left: 30px; }
.gsv-body { position: relative; flex: 1; min-height: 0; }
.gsv-port { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.gsv-port:focus-visible { box-shadow: inset 0 0 0 2px #c9a64a; }
.gsv-port.drag { cursor: grabbing; }
.gsv-c { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.gsv .tp-close { display: block; position: sticky; top: 0; z-index: 2; margin: 0 -8px 0 auto; width: 36px; height: 34px; font: 400 1.7rem/1 sans-serif; border: 0; border-radius: 2px; background: rgba(251, 250, 246, .92); color: var(--ink); cursor: pointer; }
.gsv .tp-head { margin-top: -30px; }
@media (min-width: 861px) {
  .gsv .tp { display: none; position: absolute; top: 10px; right: 12px; bottom: 12px; width: 400px; max-height: none; z-index: 8; padding-top: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
  .gsv .tp.open { display: block; }
}
@media (max-width: 860px) {
  .gsv { height: calc(100vh - 150px); }
  .gsv-bar { flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
  .gsv-bar .rs-tabs, .gsv-bar .dc-tabs { flex: 1 1 100%; }
  .gsv .dc-tabs a { width: 150px; height: 36px; background-size: 300px 36px; }
  .gsv .dc-tabs a span { padding-left: 18px; }
  .gsv .rs-tabs { --s: .62; }
  .gsv-bar .ftv-zoom button[data-z="full"] { display: none; }
}
.dc-c .tk-clip { display: block; overflow: hidden; pointer-events: none; }
.dc-c .tk-clip img { position: absolute; }
/* ---------- events and focus effects (feat/events): what a focus or an event option does, in lists like the game's
   tooltips; the focus panel; the event window as the game draws it (clipboard, paper, olive option buttons,
   the newspaper for news). The window art comes in as --ev-* variables set on .evs (scripts/build/events.mjs). */
ul.fx { list-style: none; margin: 0; padding: 0; font-size: .9rem; line-height: 1.38; }
ul.fx ul.fx { padding-left: 16px; margin: 2px 0 3px; }
ul.fx li { margin: 2px 0; }
.fx-k, .fx-w { color: var(--muted); }
.fx-k { font-style: italic; }
.fxflag { width: 20px; height: 13px; vertical-align: -2px; margin-right: 4px; border: 1px solid rgba(0, 0, 0, .4); }
.fxidea { width: 36px; height: 32px; vertical-align: middle; margin: -4px 6px -2px 0; }
.fx-req { margin: 0 0 6px; font-size: .88rem; }
.fx-req > span { font-weight: 600; }
.fx-cond { color: #3a3f43; }
table.focus-list { table-layout: fixed; min-width: 820px; }
.focus-list th:nth-child(1) { width: 24%; } .focus-list th:nth-child(2) { width: 7%; } .focus-list th:nth-child(3) { width: 42%; }
.focus-list td { overflow-wrap: anywhere; }
.focus-list code { font-size: .8rem; }
small.fpre { display: block; margin-top: 4px; font-size: .84rem; line-height: 1.3; }
@media (max-width: 600px) {
  table.focus-list { min-width: 0; table-layout: auto; }
  .focus-list thead { display: none; }
  .focus-list tr, .focus-list td { display: block; width: auto; }
  .focus-list td { border: 0; padding: 3px 0; }
  .focus-list tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .focus-list td.n { text-align: left; }
  .focus-list td.n:not(:empty)::before { content: 'Days: '; color: var(--muted); }
}
/* the focus panel: the game's focus tooltip, beside the tree (a sheet from the bottom on a phone) */
.focus-info { position: fixed; right: 16px; top: 116px; width: 410px; max-height: calc(100vh - 132px); overflow: auto; z-index: 25; background: #1c1f1b; color: #e6e1d2; border: 1px solid #6f6346; box-shadow: 0 12px 34px rgba(0, 0, 0, .55); }
.focus-info[hidden] { display: none; }
.ftip-h { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: linear-gradient(#3a3b33, #26271f); border-bottom: 1px solid #6f6346; position: sticky; top: 0; z-index: 1; }
.ftip-h img { flex: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.ftip-h h2 { margin: 0; font-size: 1.22rem; color: #f1e3b8; }
.ftip-days { margin: 2px 0 0; color: #c8bb93; font-size: .88rem; }
.ftip-x { margin-left: auto; align-self: flex-start; background: none; border: 0; color: #e6e1d2; font: 1.6rem/1 sans-serif; cursor: pointer; padding: 0 4px; }
.ftip-b { padding: 6px 14px 12px; font-size: .94rem; }
.ftip-b p { margin: 6px 0; }
.ftip-l { color: #d9bd6e; font-weight: 600; }
p.ftip-l { margin: 8px 0 2px; }
.ftip-fx { margin: 8px 0; }
.ftip-desc { font-style: italic; color: #bdb6a1; border-top: 1px solid #3c3f36; padding-top: 8px; }
.ftip-id code.cmd { background: #111310; color: #f0ebdd; border-color: #55554c; white-space: normal; word-break: break-all; }
.ftip-id button.copy { background: #2d3231; color: #ece8dc; border-color: #55554c; }
.focus-info a { color: #e7c675; }
.focus-info .fx-k, .focus-info .fx-w, .focus-info .fx-cond { color: #b3ac95; }
.ftip-more { font-size: .88rem; }
@media (max-width: 700px) { .focus-info { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62vh; border-width: 1px 0 0; } }
/* event pages */
.evs { display: grid; gap: 34px; margin: 18px 0 10px; }
.ev { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 0 28px; align-items: start; min-width: 0; scroll-margin-top: 120px; content-visibility: auto; contain-intrinsic-block-size: auto 620px; }
.ev > .ev-win { grid-column: 1; grid-row: 1 / span 3; }
.ev > .ev-when, .ev > .ev-meta { grid-column: 2; }
.ev[hidden] { display: none; }
@media (max-width: 1000px) { .ev { grid-template-columns: minmax(0, 600px); } .ev > .ev-win { grid-row: auto; } .ev > .ev-when, .ev > .ev-meta { grid-column: 1; } }
.ev-win { position: relative; min-height: min(330px, 56vw); padding: calc(68 / 581 * 100%) calc(30 / 581 * 100%) calc(30 / 581 * 100%); color: #2a2318; background: var(--ev-top) center top / 100% auto no-repeat, var(--ev-bottom) center bottom / 100% auto no-repeat, var(--ev-mid) center top / 100% auto repeat-y, #e2cfa0; font-family: 'Courier Prime', 'Courier New', monospace; }
.ev.on .ev-win { box-shadow: 0 0 0 3px #c49f4c; }
.ev-t { margin: 0 0 12px; text-align: center; font: 700 1.32rem/1.2 'Courier Prime', 'Courier New', monospace; color: #1f1a12; }
.ev-d { margin: 0 0 14px; font-size: .97rem; line-height: 1.45; }
.ev-im { margin: 0 0 12px; }
.ev-low { display: flex; gap: 16px; align-items: flex-start; }
.ev-pic { position: relative; flex: none; }
.ev-pic > img:first-child { display: block; width: 210px; height: 176px; border: 1px solid #4d4231; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.ev-clip { position: absolute; left: -9px; top: 28px; }
.ev-opts { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: grid; gap: 9px; }
.ev-o { display: block; margin: 0; padding: 10px 14px; min-height: 42px; background: var(--ev-opt) center / 100% 100% no-repeat, #3d3f2f; color: #f3edd8; font: 600 .95rem/1.25 'Source Sans 3', sans-serif; text-shadow: 0 1px 1px #000; }
.ev-ow { display: block; margin: 0; padding: 3px 2px 0; font: .82rem/1.3 'Source Sans 3', sans-serif; color: #5a4d36; }
.ev-fx { padding: 6px 10px 8px; background: rgba(27, 29, 25, .93); color: #e8e2cf; font-family: 'Source Sans 3', sans-serif; border: 1px solid #10120f; border-top: 0; }
.ev-fx ul.fx { font-size: .86rem; }
.ev-fx a, .ev-im a { color: #e7c675; }
.ev-fx .fx-k, .ev-fx .fx-w { color: #b3ac95; }
.ev-im { padding: 6px 10px; background: rgba(27, 29, 25, .88); color: #e8e2cf; font-family: 'Source Sans 3', sans-serif; }
.ev-im .fx-k, .ev-im .fx-w { color: #b3ac95; }
.ev-d a, .ev-t a { color: #6e1d10; }
.ev-when { margin: 8px 0 0; font-size: .9rem; }
.ev-when > span { font-weight: 600; }
.ev-meta { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.ev-meta code.cmd { white-space: nowrap; }
.ev.news .ev-win { padding: 0 calc(36 / 528 * 100%) 22px; background: #e7e4dc; border: 1px solid #b9b4a8; box-shadow: 2px 3px 0 #cfcbc1, 4px 6px 0 #bdb9ae; font-family: Georgia, 'Times New Roman', serif; color: #1c1c1c; min-height: 0; }
.ev.news .ev-win::before { content: ''; display: block; margin: 0 calc(-36 / 528 * 100% - 0px); aspect-ratio: 528 / 82; background: var(--ev-news) center top / 100% auto no-repeat; }
.ev.news .ev-t { font: 700 1.55rem/1.15 Georgia, 'Times New Roman', serif; margin: 6px 0 10px; }
.ev-npic { margin: 0 0 12px; }
.ev-npic img { display: block; width: 100%; height: auto; border: 1px solid #4a4a46; }
.ev.news .ev-d { font-size: 1rem; }
.evstrip { white-space: nowrap; }
.evstrip img { width: 60px; height: 50px; object-fit: cover; margin-right: 3px; border: 1px solid #8d8672; vertical-align: middle; }
.evlink .strip img { width: 72px; height: 60px; object-fit: cover; border: 1px solid #10120f; }
@media (max-width: 600px) {
  .ev-win { padding-left: 16px; padding-right: 16px; }
  .ev-low { flex-direction: column; align-items: stretch; }
  .ev-pic { align-self: center; }
  .ev-t { font-size: 1.15rem; }
  .ev.news .ev-win::before { margin: 0 -16px; }
}
.ftip-note { font-size: .86rem; color: #b9b3a2; margin: 4px 0; } .ftip-note code { color: #e8dfc4; }

/* focus tree as the game's focus window (28 Nov): the whole screen, the game's name plates, a tooltip on hover */
.h1flag { width: 46px; height: 29px; vertical-align: -3px; margin-right: 12px; border: 1px solid rgba(0, 0, 0, .4); }
.ftv { position: relative; margin: 10px calc(50% - 50vw) 0; height: calc(100vh - 98px); min-height: 480px; background: radial-gradient(ellipse at 50% 0%, #2e312b 0%, #1b1d1a 55%, #121411 100%); border-top: 1px solid #0f100e; border-bottom: 1px solid #0f100e; overflow: hidden; }
.ftv:fullscreen { height: 100vh; margin: 0; }
.ftv .tree { position: absolute; inset: 0; overflow: hidden; max-height: none; border: 0; background: none; cursor: grab; touch-action: none; user-select: none; }
.ftv .tree.drag { cursor: grabbing; }
.ftv .tree-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.ftv .tree .f { width: 108px; }
.ftv .tree .fn { width: 108px; height: 33px; padding: 0 9px 2px; border: 0; background: var(--plate, linear-gradient(#3a3b33, #26271f)) center / 100% 100% no-repeat; color: #ece6d2; text-shadow: 0 1px 2px #000; font-size: 11px; line-height: 1.05; }
.ftv .tree .f.root .fn { background-image: var(--plate-root, var(--plate)); }
.ftv .tree .f:hover .fn, .ftv .tree .f.on .fn, .ftv .tree .f.cur .fn, .ftv .tree .f.path .fn { background-image: var(--plate-done, var(--plate)); color: #2b2008; text-shadow: 0 1px 0 rgba(255, 240, 200, .4); border: 0; }
.ftv .tree .f.excl .fn { filter: sepia(1) saturate(4) hue-rotate(-38deg) brightness(.75); }
.ftv .tree .f.excl img { filter: grayscale(.6) brightness(.7) drop-shadow(0 0 5px rgba(208, 73, 58, .9)); }
.ftv .tree .f.cur img, .ftv .tree .f.path img { filter: drop-shadow(0 0 6px rgba(240, 205, 120, .85)); }
.ftv .tree .f.hit .fn { outline: 2px solid #7fc7ff; outline-offset: 1px; }
.ftv .tree path.hl { stroke: #f2d27a; stroke-width: 3; }
.ftv .tree .f:focus-visible { outline: 2px solid #f2d27a; outline-offset: 2px; }
.ftv-bar { position: absolute; top: 10px; left: 12px; right: 12px; z-index: 6; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.ftv-bar > * { pointer-events: auto; }
.ftv-bar input { width: 240px; font: inherit; font-size: .95rem; padding: 6px 10px; background: rgba(20, 22, 19, .9); color: #ece6d2; border: 1px solid #5a5b4b; border-radius: 3px; }
.ftv-hits { color: #c8bb93; font-size: .9rem; text-shadow: 0 1px 2px #000; }
.ftv-zoom { margin-left: auto; display: flex; gap: 4px; }
.ftv-zoom button { font: 600 .9rem 'Source Sans 3', sans-serif; min-width: 34px; height: 32px; padding: 0 10px; background: rgba(30, 34, 30, .92); color: #ece6d2; border: 1px solid #5a5b4b; border-radius: 3px; cursor: pointer; }
.ftv-zoom button:hover { border-color: #c9a64a; }
.ftv-zoom button[aria-pressed="true"] { border-color: #c9a64a; color: #f2d27a; }
/* the title above the tree, hidden with the "Hide title" button */
html.ftv-min .page > .crumbs, html.ftv-min .page > h1, html.ftv-min .page > .lede { display: none; }
html.ftv-min .ftv { margin-top: 0; }
html.ftv-min .page { padding-top: 0; }
.ftt { position: absolute; z-index: 7; width: 400px; max-height: 72%; overflow: hidden; pointer-events: none; background: #1c1f1b; color: #e6e1d2; border: 1px solid #6f6346; box-shadow: 0 8px 24px rgba(0, 0, 0, .6); font-size: .9rem; }
.ftt[hidden] { display: none; }
.ftt .ftip-b { padding: 4px 12px 10px; }
.ftt .ftip-more { color: #9f9882; font-size: .8rem; margin: 6px 0 0; }
.ftv .focus-info { position: absolute; right: 12px; top: 54px; bottom: 12px; width: 410px; max-height: none; z-index: 8; }
@media (max-width: 860px) {
  .ftv { height: calc(100vh - 150px); }
  .ftv-bar input { width: 150px; }
  .ftv-zoom button[data-z="full"] { display: none; }
  .ftv .focus-info { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62vh; }
}
#map .map-stale { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #f2ead3; font-weight: 600; background: rgba(20, 22, 19, .8); }
.ftv .tree .alt-off { display: none; } .ftv-path { color: #d9cfae; font-size: .88rem; text-shadow: 0 1px 2px #000; display: flex; gap: 6px; align-items: center; } .ftv-path select { font: inherit; font-size: .88rem; max-width: 220px; padding: 5px 6px; background: rgba(20, 22, 19, .92); color: #ece6d2; border: 1px solid #5a5b4b; border-radius: 3px; }
.ftv-paths { position: relative; }
.ftv-paths summary { list-style: none; cursor: pointer; font: 600 .9rem 'Source Sans 3', sans-serif; padding: 6px 12px; background: rgba(30, 34, 30, .92); color: #ece6d2; border: 1px solid #5a5b4b; border-radius: 3px; }
.ftv-paths summary::-webkit-details-marker { display: none; }
.ftv-paths[open] summary, .ftv-paths summary:hover { border-color: #c9a64a; }
.ftv-paths-in { position: absolute; top: calc(100% + 4px); left: 0; z-index: 9; width: min(420px, 90vw); max-height: 60vh; overflow: auto; padding: 8px 12px 12px; background: #1c1f1b; border: 1px solid #6f6346; box-shadow: 0 8px 24px rgba(0, 0, 0, .6); display: grid; gap: 6px; }
.ftv-paths-in p { margin: 0 0 4px; color: #b9b3a2; font-size: .85rem; }
.ftv-paths-in .ftv-path { justify-content: space-between; }
.ftv-paths-in .ftv-path select { max-width: 300px; flex: 1; }

/* event pages as a list and one open window (28 Nov): the list keeps its place on the left, the window on the right */
.evx { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 26px; margin: 16px calc(50% - 50vw) 10px; padding: 0 24px; align-items: start; }
.evx-list { position: sticky; top: 106px; height: calc(100vh - 118px); min-height: 420px; display: flex; flex-direction: column; background: #fbfaf6; border: 1px solid var(--line); }
.evx-tools { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px; border-bottom: 1px solid var(--line); background: #f3efe4; }
.evx-tools input { grid-column: 1 / -1; width: 100%; font: inherit; padding: 7px 10px; border: 1px solid #b9b19c; background: #fff; }
.evx-tools select { font: inherit; font-size: .9rem; padding: 4px 6px; border: 1px solid #b9b19c; background: #fff; min-width: 0; }
.evx-tools .shown { align-self: center; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.evx-rows { flex: 1; overflow: auto; overscroll-behavior: contain; }
.evr { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; gap: 1px 10px; align-items: center; padding: 6px 10px; border-bottom: 1px solid #e7e1d2; color: var(--ink); text-decoration: none; }
.evr > img, .evr-np { grid-row: 1 / span 2; width: 48px; height: 40px; object-fit: cover; border: 1px solid #8d8672; background: #d9d0b8; }
.evr-t { font-weight: 600; font-size: .95rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evr-s { font-size: .8rem; color: var(--muted); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evr[data-d="1"] { padding-left: 26px; } .evr[data-d="2"] { padding-left: 42px; } .evr[data-d="3"] { padding-left: 58px; } .evr[data-d="4"], .evr[data-d="5"] { padding-left: 74px; }
.evr:not([data-d="0"]) .evr-t::before { content: '\21B3\00a0'; color: #9a8f74; font-weight: 400; }
.evr:hover { background: #efe9da; }
.evr.cur { background: #2c3331; color: #f2ead3; }
.evr.cur .evr-s { color: #c9c1aa; }
.evr.cur:not([data-d="0"]) .evr-t::before { color: #c9a64a; }
.evr[hidden] { display: none; }
.evx-bar { display: none; }
.evx.js .evx-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.evx-bar button { font: 600 .95rem 'Source Sans 3', sans-serif; padding: 5px 14px; background: #2c3331; color: #f2ead3; border: 1px solid #1a1e1d; border-radius: 3px; cursor: pointer; }
.evx-bar button:hover { background: #3b4442; }
.evx-bar [data-evpos] { min-width: 70px; text-align: center; font-size: .92rem; color: var(--muted); }
.evx-keys { margin-left: auto; font-size: .82rem; color: var(--muted); }
.evx .evx-back { display: none; }
.evx .evs { margin-top: 0; }
.evx.js .evs > .ev:not(.cur) { display: none; }
.evx.js .ev { content-visibility: visible; }
.evx-view { container-type: inline-size; min-width: 0; }
@container (max-width: 980px) {
  .evx .ev { grid-template-columns: minmax(0, 600px); }
  .evx .ev > .ev-win { grid-row: auto; }
  .evx .ev > .ev-when, .evx .ev > .ev-meta { grid-column: 1; }
}
ul.ev-meta { list-style: none; padding: 0; display: grid; gap: 6px; }
ul.ev-meta li { margin: 0; }
@media (max-width: 1100px) { .evx { grid-template-columns: 320px minmax(0, 1fr); gap: 18px; padding: 0 14px; } }
@media (max-width: 760px) {
  .evx { grid-template-columns: minmax(0, 1fr); padding: 0 10px; }
  .evx-list { position: static; height: auto; min-height: 0; }
  .evx-rows { overflow: visible; }
  .evx.js.open .evx-list { display: none; }
  .evx.js:not(.open) .evx-view { display: none; }
  .evx .evx-back { display: inline-block; }
  .evx-keys { display: none; }
}
.evx.js .evx-bar { position: sticky; top: 98px; z-index: 6; background: var(--paper); padding: 8px 0; margin: 0 0 4px; }
@media (max-width: 760px) { .evx.js .evx-bar { top: 0; } }
.evx-view { min-height: calc(100vh - 118px); } @media (max-width: 760px) { .evx-view { min-height: 0; } }
.stand-in { filter: grayscale(1) sepia(.15) contrast(.92); opacity: .82; }
/* ---------- equipment, battalions, designer modules, MIOs (feat/equipment, 28 Nov 2026)
   The game's equipment tooltip as a dark panel beside our facts; the designers' drawings; the MIO screen with the
   game's window, frames and connection lines, its tooltip in a panel beside it (a sheet from the bottom on phones). */
.eqhead { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 22px; align-items: start; margin: 8px 0 14px; }
.eqtip { background: #1f2320; color: #e6e1d2; border: 1px solid #10120f; padding: 12px 14px 14px; font-size: .93rem; box-shadow: 0 2px 0 #b9b4a8; }
.eqtip-h { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.eqtip-h > div { min-width: 0; }
.eqtip-h > div > span { display: block; color: #f2d57e; font: 700 1.2rem/1.15 var(--head); }
.eqtip-h small { display: block; color: #aaa38c; font-size: .85rem; margin-top: 2px; }
img.eqtip-pic { width: auto; height: auto; max-width: 132px; max-height: 76px; flex: none; }
img.eqtip-pic.counter { max-width: 76px; }
img.eqtip-pic.modpic { max-width: 92px; }
img.eqtip-pic.miopic { max-width: 64px; }
.eqtip-g { margin: 10px 0 3px; padding-bottom: 2px; border-bottom: 1px solid #3a3e36; color: #d9cfae; font: 600 .95rem var(--head); }
table.tipt { font-size: inherit; }
table.tipt th, table.tipt td { border: 0; padding: 1px 0; background: none; }
table.tipt th { color: #c9c3ae; font: 400 1em 'Source Sans 3', sans-serif; text-align: left; }
table.tipt td { color: #f6efd9; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
table.tipt tr[title] th { cursor: help; text-decoration: underline dotted #6c6a5b; text-underline-offset: 3px; }
table.tipt tr.g th { padding: 10px 0 2px; border-bottom: 1px solid #3a3e36; color: #d9cfae; font: 600 .95rem var(--head); text-decoration: none; }
table.tipt tr.g:first-child th { padding-top: 4px; }
table.tipt tbody tr:hover, table.tipt tr:hover { background: none; }
.eqtip-res { margin: 4px 0 0; color: #e6e1d2; }
.eqtip a { color: #e7c873; }
.eqtip .mflag { vertical-align: -2px; margin-right: 3px; }
.res { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
img.resic { width: 18px; height: 18px; }
.eqfacts table.kv { max-width: none; }
.eqfacts .kv td { overflow-wrap: anywhere; }
.eqfl-h { margin: 14px 0 4px; font-weight: 600; font-size: .95rem; }
.eqfl { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.eqfl span { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.eqfl img:not(.mflag) { height: 46px; width: auto; max-width: 110px; object-fit: contain; }
.eqdesc { max-width: 760px; color: #4a4f52; font-style: italic; }
ul.users { list-style: none; padding: 0; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 6px; }
ul.users li { display: flex; align-items: center; gap: 10px; }
ul.users li > span { min-width: 0; }
ul.users.many { display: block; columns: 3 250px; column-gap: 24px; }
ul.users.many li { break-inside: avoid; margin-bottom: 6px; }
img.unitic { width: auto; height: 34px; max-width: 76px; object-fit: contain; flex: none; }
img.modic { width: auto; height: 30px; max-width: 56px; object-fit: contain; flex: none; }
img.slotic { width: auto; height: 22px; max-width: 40px; margin-right: 6px; vertical-align: -5px; }
.mod { display: inline-flex; align-items: center; gap: 6px; }
table.slots tr[data-slot] { cursor: pointer; }
table.fam tr.on td { background: rgba(168, 133, 51, .16); }
td.eqs { min-width: 210px; }
.bpwrap { margin: 8px 0 12px; max-width: 640px; }
.bp { position: relative; border: 1px solid #10120f; background: #22303a center / cover no-repeat; }
.bp img { display: block; }
.bp.ship img.bp-base { width: 100%; height: auto; }
.bp-part, .bp-hl { position: absolute; height: auto; pointer-events: none; }
.bp-hl { opacity: 0; transition: opacity .12s; }
.bp-hl.on { opacity: 1; }
.bp.plane img, .bp.tank img { width: 100%; height: auto; }
.roles { display: flex; flex-wrap: wrap; gap: 14px; }
.roles figure { margin: 0; width: min(300px, 100%); }
.roles figcaption { font-size: .92rem; margin-top: 4px; }
.jump { line-height: 1.9; }
dl.fams { margin: 0; }
dl.fams dt { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; font: 700 1.08rem var(--head); }
dl.fams dt small { font: 400 .85rem 'Source Sans 3', sans-serif; }
dl.fams dd { margin: 0 0 6px; }
ul.models { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
ul.models li { display: flex; align-items: center; gap: 6px; }
ul.models li a { display: inline-flex; align-items: center; gap: 7px; }
ul.models.wide { flex-direction: column; gap: 5px; }
ul.models.wide li { flex-wrap: wrap; }
img.mpic { width: auto; height: 32px; max-width: 64px; object-fit: contain; flex: none; }
p.sib { display: flex; flex-wrap: wrap; gap: 6px 18px; }
p.sib a { display: inline-flex; align-items: center; gap: 6px; }
a.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 2px; font: 600 .98rem var(--head); }
a.btn:hover { background: #6e1d10; color: #fff; }
ul.dept { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 3px; }
ul.dept li { display: flex; align-items: center; gap: 8px; }
img.depic { width: 30px; height: 30px; flex: none; }
.eqtip ul.mt-l, .mio-panel ul.mt-l { margin: 2px 0 6px; padding-left: 18px; }
/* the MIO screen */
/* the screen is 945 px wide as in the game: the desk takes more than the page's column when the window has room */
.mio-desk { --bw: min(1300px, calc(100vw - 36px)); width: var(--bw); margin: 12px 0 8px calc((100% - var(--bw)) / 2); display: grid; grid-template-columns: minmax(0, 947px) 320px; justify-content: center; gap: 14px; align-items: start; }
.mio-tree { overflow: auto; border: 1px solid #10120f; background: #1b1e1b; max-height: 700px; }
.mio-scr { position: relative; width: var(--w); height: var(--h); }
.mio-c { position: absolute; inset: 0; background: #2a2d27 left top / 945px 660px no-repeat; }
.mt-hd { position: absolute; top: 9px; margin: 0; transform: translateX(-50%); white-space: nowrap; color: #ece2bf; font: 600 .95rem var(--head); text-shadow: 0 1px 2px #000; }
svg.mt-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
svg.mt-lines path { fill: none; stroke: rgb(171, 191, 237); stroke-width: 2; }
svg.mt-lines path.mx { stroke: #d8664c; stroke-dasharray: 4 4; }
a.mt { position: absolute; width: 87px; height: 117px; text-decoration: none; color: #ece6d0; }
.mt-f { position: absolute; left: 11px; top: 18px; width: 64px; height: 80px; background: left top / 300% 100% no-repeat; }
a.mt:hover .mt-f, a.mt.on .mt-f { background-position: 100% 0; }
a.mt.on .mt-f { filter: drop-shadow(0 0 5px #f2d57e); }
img.mt-i { position: absolute; left: 8px; top: 8px; width: 48px; height: 48px; }
.mt-n { position: absolute; left: -4px; right: -4px; top: 99px; text-align: center; font: 600 11px/1.1 'Source Sans 3', sans-serif; text-shadow: 0 1px 2px #000; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mio-panel { background: #262a25; color: #e6e1d2; border: 1px solid #10120f; padding: 10px 14px 14px; max-height: 700px; overflow: auto; font-size: .93rem; position: sticky; top: 108px; }
.mio-panel a { color: #e7c873; }
.mio-panel .note { color: #b3ac95; }
.mt-name { margin: 2px 0 6px; color: #f2d57e; font: 700 1.15rem var(--head); }
.mt-lim, .mt-h { margin: 8px 0 2px; color: #d9cfae; font-weight: 600; }
.mt-need { margin: 8px 0 0; color: #c9c3ae; }
.mio-panel b.up { color: #8fd37a; font-weight: 600; }
.mio-panel b.down { color: #e3765f; font-weight: 600; }
.mio-panel ul.fx { font-size: .9rem; }
.mio-panel .fx-k, .mio-panel .fx-w { color: #b3ac95; }
.mp-close { display: none; }
@media (max-width: 860px) {
  .eqhead { grid-template-columns: minmax(0, 1fr); }
  .mio-desk { display: block; }
  .mio-tree { max-height: 560px; }
  .mio-panel { display: none; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 70vh; border: 0; border-top: 3px solid #8a6d2a; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
  .mio-panel.open { display: block; }
  .mp-close { display: block; position: sticky; top: 0; margin: 0 -8px 0 auto; width: 40px; height: 36px; font: 400 1.8rem/1 sans-serif; border: 0; background: none; color: #e6e1d2; cursor: pointer; }
}
/* ===== characters and traits (feat/characters; scripts/build/traits.mjs, characters.mjs; src/traits.js, characters.js)
   The trait window is the game's leader details screen: its dark background, the trait buttons of the game
   (pickable, picked, disabled) placed at gui_row and gui_column, grey lines to the traits they need. */
.ti { width: 23px; height: 33px; flex: none; vertical-align: middle; }
.tstrip { display: inline-block; width: 28px; height: 28px; flex: none; vertical-align: middle; background: var(--strip) calc(var(--f) * -28px) 0 / auto 28px no-repeat; }
.ti-s { width: 16px; height: 23px; vertical-align: -6px; margin-right: 3px; }
.tstrip.ti-s { width: 20px; height: 20px; background-size: auto 20px; background-position: calc(var(--f) * -20px) 0; vertical-align: -5px; }
.tchip { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 2px 0; }
.tchip .ti { width: 16px; height: 23px; }
.tchip .tstrip { width: 20px; height: 20px; background-size: auto 20px; background-position: calc(var(--f) * -20px) 0; }
/* trait tables */
table.traits { min-width: 860px; table-layout: fixed; }
.traits th:nth-child(1) { width: 25%; } .traits th:nth-child(2) { width: 33%; } .traits th:nth-child(3) { width: 26%; }
.traits td { overflow-wrap: anywhere; }
.traits tr:target td { background: #f5e9c6; }
.traits tr { scroll-margin-top: calc(var(--top, 100px) + 12px); }
.traits .who { align-items: flex-start; }
.tname { font-weight: 600; }
code.tid { font-size: .76rem; color: var(--muted); }
.traits button.copy { font-size: .7rem; padding: 0 6px; }
.tkind { display: block; margin-top: 4px; }
.tdesc { font-style: italic; color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.tnone { color: var(--muted); font-size: .88rem; margin: 0; }
.thow { font-size: .9rem; }
.thow p { margin: 0 0 5px; }
table.levels { max-width: 1000px; }
.levels td { font-size: .86rem; }
.skico { width: 22px; height: 20px; vertical-align: -4px; margin-right: 4px; }
@media (max-width: 700px) {
  table.traits { min-width: 0; table-layout: auto; }
  .traits thead { display: none; }
  .traits tr, .traits td { display: block; width: auto; }
  .traits td { border: 0; padding: 3px 0; }
  .traits tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
}
/* /traits/: the groups, each with a strip of its icons */
ul.tsec { list-style: none; padding: 0; margin: 10px 0; max-width: 820px; }
.tsec li { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.tsec h2 { margin: 0 0 6px; font-size: 1.35rem; }
.tsec p { margin: 6px 0 0; }
.tsec-strip { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 8px; background: #23272a; width: fit-content; max-width: 100%; }
.tsec-strip .tstrip-i { width: 23px; height: 33px; }
.tsec-strip span.tstrip-i { display: inline-block; width: 28px; height: 28px; background: var(--strip) calc(var(--f) * -28px) 0 / auto 28px no-repeat; filter: invert(.86); }
/* the trait window */
.tw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0 8px; }
.tw-bar p { margin: 0; }
.tw-mode { display: inline-flex; border: 1px solid #50575a; border-radius: 2px; overflow: hidden; }
.tw-mode button, .tw-reset { font: 600 .92rem var(--head); padding: 5px 12px; border: 0; background: #e4e1d7; color: var(--ink); cursor: pointer; }
.tw-mode button[aria-pressed="true"] { background: #2c3331; color: #f1e3b8; }
.tw-reset { border: 1px solid var(--line); border-radius: 2px; }
.tw-sum { flex: 1 1 260px; font-size: .92rem; color: var(--muted); }
.tw { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; background: #141515; border: 2px solid #3b3e3a; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.tw-panel { min-width: 0; max-width: 100%; display: flex; flex-direction: column; background: #161717 var(--twbg) no-repeat; }
.tw-reg { background-position: -284px -60px; border-right: 2px solid #2b2d2a; }
.tw-ter { background-position: -930px -60px; }
.tw-heads { display: flex; position: sticky; top: 0; z-index: 3; background: linear-gradient(#3b3c38, #282926); border-bottom: 1px solid #0c0d0c; color: #e9e3cf; font: 700 1rem var(--head); }
.tw-heads span { flex: none; padding: 8px 6px; text-align: center; }
.tw-heads span[title] { cursor: help; }
.tw-scroll { overflow: auto; max-height: min(72vh, 820px); overscroll-behavior: contain; }
.tw-tree { position: relative; margin: 4px 0 8px; }
.tw-lines { position: absolute; inset: 0; pointer-events: none; }
.tw-lines path { fill: none; stroke: #9a9584; stroke-width: 2; }
.tw-x { position: absolute; z-index: 2; }
.tw-t { position: absolute; width: 166px; height: 39px; padding: 0 6px 0 40px; border: 0; background: var(--tw-off) 0 0 / 166px 39px no-repeat; color: #9c978a; font: 600 .86rem/1.05 'Source Sans 3', sans-serif; text-align: left; cursor: pointer; display: flex; align-items: center; }
.tw-t[data-s="can"] { background-image: var(--tw-can); color: #f1ecdc; }
.tw-t[data-s="earn"] { color: #cfc9b6; }
.tw-t[data-s="on"] { background-image: var(--tw-on); color: #fff; }
.tw-t:hover, .tw-t:focus-visible { filter: brightness(1.25); outline: none; }
.tw-t.cur { box-shadow: 0 0 0 2px #d9bd6e; border-radius: 20px 3px 3px 20px; }
.tw-i { position: absolute; left: 10px; top: 4px; width: 23px; height: 33px; }
.tw-i img { display: block; width: 23px; height: 33px; }
.tw-t[data-s="off"] .tw-i { opacity: .55; }
.tw-n { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-shadow: 0 1px 1px #000; }
/* the panel beside the window (a sheet from the bottom on a phone), in the game's tooltip colours */
.tw-info { position: fixed; right: 16px; top: 116px; width: 400px; max-height: calc(100vh - 132px); overflow: auto; z-index: 25; background: #1c1f1b; color: #e6e1d2; border: 1px solid #6f6346; box-shadow: 0 12px 34px rgba(0, 0, 0, .55); }
.tw-info[hidden] { display: none; }
.ti-h { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: linear-gradient(#3a3b33, #26271f); border-bottom: 1px solid #6f6346; position: sticky; top: 0; }
.ti-h .tbig { width: 34px; height: 49px; }
.ti-h h2 { margin: 0; font-size: 1.22rem; color: #f1e3b8; }
.ti-k { margin: 2px 0 0; color: #c8bb93; font-size: .88rem; }
.ti-x { margin-left: auto; align-self: flex-start; background: none; border: 0; color: #e6e1d2; font: 1.6rem/1 sans-serif; cursor: pointer; padding: 0 4px; }
.ti-b { padding: 6px 14px 12px; font-size: .93rem; }
.ti-b p { margin: 6px 0; }
.ti-state { color: #d9bd6e; font-weight: 600; }
.tw-info a { color: #e7c675; }
.tw-info .fx-k, .tw-info .fx-w, .tw-info .tdesc { color: #b3ac95; }
.tw-info code.cmd, .tw-info code.tid { background: #111310; color: #f0ebdd; border-color: #55554c; }
.tw-info button.copy { background: #2d3231; color: #ece8dc; border-color: #55554c; }
.ti-more { font-size: .88rem; }
@media (max-width: 700px) {
  .tw-info { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 60vh; border-width: 1px 0 0; }
  .tw-scroll { max-height: 62vh; }
}
/* /characters/: the list */
.cl-f { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 10px 0; }
.cl-f input[type="search"], .cl-f select { font: inherit; padding: 6px 9px; border: 1px solid var(--line); background: #fbfaf6; border-radius: 3px; max-width: 100%; }
.cl-f input[type="search"] { width: min(260px, 100%); }
.cl-f select { max-width: min(260px, 100%); }
.cl-s { font-size: .92rem; }
.cl-t { font-size: .92rem; background: #f8f1dd; border: 1px solid #c9b783; padding: 2px 4px 2px 8px; border-radius: 2px; }
.cl-t button { border: 0; background: none; font: 1.1rem/1 sans-serif; cursor: pointer; color: var(--red); }
.cl-n { color: var(--muted); font-size: .92rem; }
table.cl-tab td { vertical-align: middle; font-size: .92rem; }
.cl-tab td:nth-child(1) { min-width: 210px; }
.cl-tab td:nth-child(3) { min-width: 190px; }
.cl-tab code { font-size: .72rem; color: var(--muted); }
.cl-c { white-space: nowrap; display: inline-block; margin-right: 6px; }
.cl-sk { font-family: var(--head); font-size: 1.05rem; }
.cl-late { color: #7a6a3a; }
.cl-more { font: 600 .95rem var(--head); padding: 6px 16px; border: 1px solid var(--line); background: var(--paper2); cursor: pointer; }
.cl-all h3 { font-size: 1.02rem; margin: 14px 0 2px; }
.cl-all p { margin: 0; font-size: .92rem; }
@media (max-width: 700px) {
  table.cl-tab thead { display: none; }
  .cl-tab tr, .cl-tab td { display: block; }
  .cl-tab td { border: 0; padding: 2px 0; min-width: 0 !important; }
  .cl-tab tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
}
/* a character's page: the portrait, then the skill in the game's badge and the four skills with the game's icons */
.cperson { grid-template-columns: 1fr; }
.cp-title { display: flex; gap: 18px; align-items: flex-end; margin-top: 10px; }
.cp-pic img { display: block; width: 156px; height: 210px; object-fit: cover; border: 2px solid #6d6655; background: #c9c3b0; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); }
.cp-title h1 { margin: 0 0 6px; }
.cp-roles { margin: 0; font: 600 1.05rem var(--head); }
.chead.photo .cp-roles { color: #e7c675; }
.cp-tags { margin: 6px 0; }
.ctag { display: inline-flex; align-items: center; margin-right: 10px; }
.crole { margin-top: 8px; }
.cskills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 8px 0 10px; padding: 10px 14px; background: #222624; color: #ece8dc; width: fit-content; max-width: 100%; }
.cskill { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 60px; background: var(--skbg) center / contain no-repeat; }
.cskill b { font: 700 1.5rem var(--head); color: #fff; text-shadow: 0 1px 2px #000; margin-top: -8px; }
.cskill small { position: absolute; left: -9999px; }
.cst { display: inline-flex; align-items: center; gap: 5px; }
.cst b { font: 700 1.25rem var(--head); }
.cst small { font-size: .78rem; color: #b8b2a0; }
.cgives { list-style: none; padding: 0; margin: 0 0 10px; font-size: .9rem; }
.cgives li span:first-child { font-weight: 600; }
ul.ctraits { list-style: none; padding: 0; margin: 6px 0 12px; display: grid; gap: 10px; max-width: 820px; }
.ctr { display: flex; gap: 10px; align-items: flex-start; }
.ctr-n { margin: 0 0 2px; font-weight: 600; }
.cnamed { columns: 2 280px; padding-left: 18px; margin: 4px 0 10px; font-size: .94rem; }
@media (max-width: 600px) {
  .cp-title { flex-direction: column; align-items: flex-start; }
  .cp-pic img { width: 117px; height: 158px; }
}
.wh { white-space: nowrap; }
.stand-in { filter: grayscale(1) sepia(.15) contrast(.92); opacity: .82; }
.cp-note { margin: 6px 0 0; }
.chead.photo .cp-note { color: #bdb8a8; }
/* ===== decisions, achievements and the game's systems (feat/systems; scripts/build/decisions.mjs, achievements.mjs,
   systems.mjs; src/decisions.js, achievements.js) =====
   decision pages: the game's decision panel (tiled dark ground, category header plate, a row strip with three states:
   grey, green when open), the game's tooltip under a row; the list of categories beside it */
.dc-all { font: 600 .9rem var(--head); padding: 6px 12px; border: 1px solid var(--line); background: #fbfaf6; color: var(--ink); border-radius: 3px; cursor: pointer; margin-left: 8px; }
.dc-wrap { display: grid; grid-template-columns: minmax(0, 660px) minmax(0, 1fr); gap: 0 28px; align-items: start; }
.dc-panel { grid-column: 1; grid-row: 1; min-width: 0; padding: 0; background: #1c1f1f; border: 10px solid #1c1f1f; border-image: var(--dc-tile) 16 fill / 10px round; }
.dc-index { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--top, 100px) + 12px); max-height: calc(100vh - var(--top, 100px) - 24px); overflow: auto; font-size: .92rem; }
.dc-index > p { font: 700 1.05rem var(--head); margin: 0 0 6px; }
.dc-index ul { list-style: none; margin: 0; padding: 0; }
.dc-index li a { display: flex; align-items: center; gap: 8px; padding: 3px 0; text-decoration: none; color: var(--ink); }
.dc-index li a:hover { color: var(--red); }
.dc-index img { width: 26px; height: 20px; object-fit: contain; flex: none; }
.dcat { margin: 0 0 14px; scroll-margin-top: calc(var(--top, 100px) + 8px); }
.dcat[hidden] { display: none; }
.dc-head { display: flex; align-items: center; gap: 12px; min-height: 53px; padding: 5px 16px 5px 12px; background: var(--dc-head, none) center / 100% 100% no-repeat, #3a3025; color: #f1e7c9; }
.dc-head h2 { flex: 1; margin: 0; font: 700 1.12rem/1.2 var(--head); text-shadow: 0 1px 1px #000; }
.dc-cico { flex: none; display: grid; place-items: center; width: 51px; height: 40px; }
.dc-cico img { max-width: 51px; max-height: 40px; }
.dc-count { color: #c9b98e; font-size: .9rem; }
.dc-cdesc { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0; padding: 8px; background: rgba(8, 9, 9, .55); color: #d8d1bb; font-size: .9rem; line-height: 1.4; }
.dc-cdesc img { flex: none; width: 114px; height: 101px; border: 1px solid #000; }
.dc-cdesc p { margin: 0; }
.dc-panel .dc-note { margin: 4px 2px; padding: 0 6px; color: #bcb5a0; font-size: .86rem; }
.dc-panel .dc-note > span:first-child { color: #e0c47c; margin-right: 5px; }
.dc-panel .dc-note a, .dc-body a, .dc-cdesc a { color: #e7c675; }
.dc-panel .fx-k, .dc-panel .fx-w, .dc-panel .fx-cond { color: #b3ac95; }
.dc-list { display: grid; gap: 3px; margin-top: 4px; }
details.dc { scroll-margin-top: calc(var(--top, 100px) + 8px); }
details.dc[hidden] { display: none; }
.dc-row { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-height: 40px; padding: 2px 12px 2px 6px; background: var(--dc-row, none) 0 0 / 300% 100% no-repeat, #2e3030; color: #efe9d6; cursor: pointer; }
.dc-row::-webkit-details-marker { display: none; }
.dc-row:hover, details.dc[open] > .dc-row { background-position: 50% 0; }
.dc-row:focus-visible { outline: 2px solid #c49f4c; outline-offset: -2px; }
details.dc.on > .dc-row { box-shadow: inset 0 0 0 2px #c49f4c; }
.dc-ico { position: relative; flex: none; display: grid; place-items: center; width: 50px; height: 38px; }
.dc-ico img:first-child { max-width: 50px; max-height: 38px; }
.dc-tflag { position: absolute; right: -6px; bottom: 0; width: 24px; height: 15px; border: 1px solid #000; }
.dc-n { flex: 1 1 200px; margin: 0; font: 600 .98rem/1.2 'Source Sans 3', sans-serif; text-shadow: 0 1px 1px #000; }
.dc-right { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: .9rem; white-space: nowrap; }
.dc-cost img.ti { width: 18px; height: 18px; vertical-align: -4px; margin-right: 3px; }
.dc-days { color: #d6cfb8; }
.dc-days.mission { color: #f0c66a; }
.dc-body { margin: 0 0 4px; padding: 8px 14px 10px; background: rgba(17, 19, 18, .97); color: #e8e2cf; border: 1px solid #000; border-top: 0; font-size: .9rem; }
.dc-body .dc-note { margin: 7px 0 0; padding: 0; }
.dc-d { margin: 0 0 6px; color: #d9d1b9; line-height: 1.42; }
.dc-h { margin: 8px 0 2px; color: #f2d27a; font-weight: 600; }
.dc-sec ul.fx { font-size: .88rem; }
.dc-id code.cmd { white-space: nowrap; }
.dcstrip { white-space: nowrap; }
.dcstrip img { width: 32px; height: 25px; object-fit: contain; margin-right: 3px; vertical-align: middle; background: #2b2f2c; }
.declink .strip img { width: 51px; height: 40px; object-fit: contain; }
@media (max-width: 960px) {
  .dc-wrap { grid-template-columns: minmax(0, 1fr); }
  .dc-index { grid-column: 1; grid-row: 1; position: static; max-height: 210px; margin-bottom: 12px; padding: 6px 10px; border: 1px solid var(--line); background: #fbfaf6; }
  .dc-panel { grid-row: 2; padding: 4px; }
}
@media (max-width: 520px) {
  .dc-cdesc { flex-direction: column; }
  .dc-right { margin-left: 60px; }
  .dc-body { padding: 8px 10px; }
}

/* achievements: the entry frame of the game's achievements window, the conditions beside it on paper */
.ach-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.ach-filter input, .ach-filter select { font: inherit; font-size: .95rem; padding: 6px 9px; border: 1px solid var(--line); background: #fbfaf6; border-radius: 3px; max-width: 100%; }
.ach-filter input { width: min(320px, 100%); }
.ach-filter .shown { color: var(--muted); font-size: .9rem; }
.achs { display: grid; gap: 12px; }
.ach { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 6px 26px; align-items: start; scroll-margin-top: calc(var(--top, 100px) + 8px); content-visibility: auto; contain-intrinsic-block-size: auto 110px; }
.ach[hidden] { display: none; }
.ach-entry { display: flex; gap: 22px; align-items: flex-start; min-height: 88px; padding: 12px 18px 12px 14px; background: var(--ach-entry, none) left top / 100% 100% no-repeat, #1b1c1c; color: #e8e2cf; }
.ach.on .ach-entry { box-shadow: 0 0 0 3px #c49f4c; }
.ach-icon { flex: none; width: 64px; height: 64px; }
.ach-text { min-width: 0; padding-top: 2px; }
.ach-entry h2 { margin: 0 0 4px; font: 700 1.12rem/1.2 var(--head); color: #f3e9c9; }
.ach-entry p { margin: 0; font-size: .93rem; color: #cdc6b0; }
.ach-info { font-size: .92rem; }
.ach-info p { margin: 0 0 4px; }
.ach-who > span, .ach-h { font-weight: 600; }
.ach-when { margin-top: 6px; }
@media (max-width: 1000px) { .ach { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .ach-entry { gap: 12px; padding: 10px; } .ach-icon { width: 52px; height: 52px; } }

/* the systems' pages: sections with the game's pictures, conditions and effects in the game's words */
.frame { display: inline-block; flex: none; vertical-align: middle; background-repeat: no-repeat; }
.sy-jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 4px; }
.sy-jump a { display: inline-flex; align-items: center; gap: 6px; }
.sy-jump img { max-height: 24px; width: auto; }
.sy-sec { margin-top: 26px; }
.sy-sec > h2 { display: flex; align-items: center; gap: 10px; }
.sp, .op, .ag, .fg, .gr { padding: 16px 0 12px; border-top: 1px solid var(--line); max-width: 920px; scroll-margin-top: calc(var(--top, 100px) + 8px); }
.sp h3, .op h3, .ag h3, .fg h3, .gr h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.sp h3 small, .ag h3 small, .fg h3 small { font: 400 .9rem 'Source Sans 3', sans-serif; }
.sp-head { display: flex; gap: 16px; align-items: flex-start; }
.sp-head > img, .sp-head > .frame { flex: none; background-color: #1e2121; border: 1px solid #0d0f0f; padding: 4px; box-sizing: content-box; }
.sp-head > div { min-width: 0; }
.sp .sp-head > img { background-color: #24445f; } /* project icons are white line drawings for the game's blueprint */
.sp-head p { margin: 4px 0; }
.sp-facts { font-size: .93rem; color: var(--muted); }
.sp-facts img { vertical-align: -4px; }
.sy-note { margin: 8px 0; font-size: .93rem; }
.sy-note > span:first-child { font-weight: 600; margin-right: 6px; }
div.sy-note > div { margin-top: 2px; }
.sy-h { font-weight: 600; margin: 12px 0 4px; }
.sy-sub { margin: 6px 0 2px; font-size: .88rem; color: var(--muted); }
.sp-uniq { margin-top: 8px; }
.sp-rew { margin: 6px 0 12px; padding: 8px 12px; background: var(--paper2); }
.sp-rn { margin: 0 0 2px; font-weight: 600; }
.sp-rn small { font-weight: 400; }
.sp-rd { margin: 2px 0 6px; font-size: .92rem; }
.sp-opt { margin: 4px 0 4px 14px; }
.sp-on { margin: 0; font-style: italic; }
.sp-shared { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 0 18px; }
.ag { display: flex; gap: 16px; align-items: flex-start; }
.ag-pic { flex: none; width: 78px; }
.ag-pic img { background: #1e2121; padding: 4px; border: 1px solid #0d0f0f; }
.op-step { margin: 10px 0 0; }
.op-ph { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 10px; }
.op-ph > img { flex: none; width: 120px; height: auto; border: 1px solid #0d0f0f; }
.op-ph p { margin: 2px 0; font-size: .93rem; }
.op-pn { font-weight: 600; }
.op-pn small { font-weight: 400; color: var(--muted); }
.fg > img, .fg > .frame { float: left; margin: 0 10px 4px 0; }
.gr table { font-size: .92rem; }
.gr-def td:first-child { font-weight: 600; }
@media (max-width: 520px) { .op-ph { flex-direction: column; } .ag-pic { width: 60px; } .ag-pic img { width: 52px; height: auto; } }
/* balance of power: the game's view (dark plate, the side portraits, the bar with its ranges, the needle at the start) */
.bop-view { position: relative; max-width: 540px; aspect-ratio: 540 / 160; margin: 10px 0 12px; background: var(--bop-bg, none) center / 100% 100% no-repeat, #141515; color: #ece4cc; container-type: inline-size; }
.bop-icon { position: absolute; top: 25%; width: 13.3%; }
.bop-icon.l { left: 2.8%; }
.bop-icon.r { left: 83.9%; }
.bop-icon img { display: block; width: 100%; height: auto; }
.bop-name { position: absolute; left: 18%; right: 18%; top: 9%; margin: 0; text-align: center; font: 700 clamp(.8rem, 3.2cqi, 1.05rem)/1.2 var(--head); }
.bop-bar { position: absolute; left: 16.7%; width: 66.6%; top: 50.6%; height: 11.25%; background: #222; outline: 3px solid #0c0c0c; }
.bop-seg { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(0, 0, 0, .7); }
.bop-n { background: #77735f; }
.bop-l.d0, .bop-l.d1 { background: #6f9ac2; }
.bop-l.d2 { background: #4c78a3; }
.bop-l.d3 { background: #2f5a85; }
.bop-r.d0, .bop-r.d1 { background: #d8a052; }
.bop-r.d2 { background: #b97f31; }
.bop-r.d3 { background: #93601e; }
.bop-needle { position: absolute; top: -45%; transform: translateX(-50%); }
.bop-needle img { display: block; }
.bop-sides { position: absolute; left: 16.7%; width: 66.6%; top: 68%; margin: 0; display: flex; justify-content: space-between; gap: 8px; font-size: clamp(.7rem, 2.6cqi, .9rem); color: #d9d0b4; }
.bop-sides span:last-child { text-align: right; }
/* words for readers without the picture (Markdown copies, screen readers), hidden on screen */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* ===== map layers (feat/maplayers): the province panel (its commands, the tag for setcontroller), the legend's
   hint in "cores and claims", a legend that wraps on a phone ===== */
#map .legend { max-width: calc(100% - 24px); flex-wrap: wrap; }
#map .legend .lg-hint { color: #cfc8b2; }
#map-panel .pcmds { list-style: none; padding: 0; margin: 0; }
#map-panel .pcmds li { padding: 7px 0; border-bottom: 1px solid #3a3e36; }
#map-panel .pcmds small { display: block; margin-top: 3px; }
#map-panel .ptag { font-size: .85rem; color: #b9b29c; white-space: nowrap; }
#map-panel .ptag input { width: 4.2em; margin-left: 4px; font: 600 .85rem var(--mono); text-transform: uppercase; padding: 1px 4px; background: #1d201d; color: #ece6d4; border: 1px solid #4a4d40; border-radius: 2px; }
@media (max-width: 520px) { #map .legend .lg-hint { display: none; } }
#map-panel .pidnote { margin: 8px 0 14px; }
/* ---------- ship and plane designers (/ships/, /planes/; scripts/build/sea-air.mjs, src/sea-air/app.js; feat/designers):
   the game's window as a dark board: a row of slots, the hull from above or the airframe drawing, the other row */
.sa-pre { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.sa-pre select, .sa-mission select { font: 1rem 'Source Sans 3', sans-serif; padding: 5px 8px; border: 1px solid #b9b3a2; background: #fbfaf6; border-radius: 2px; max-width: min(360px, 70vw); }
.sa-board { background: linear-gradient(#30352f, #232723); border: 1px solid #10120f; box-shadow: inset 0 0 0 1px #4a4d40; padding: 8px; }
.sa-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sa-row[hidden] { display: none; }
.sa-row .mslot { min-height: 92px; }
.sa-row .mslot span { overflow-wrap: anywhere; }
.sa-row .mslot.empty { color: #b9b3a2; }
.sa-row .mslot.empty.req { border-style: dashed; border-color: #a88533; }
.sa-row .mslot img.si { width: 42px; height: 42px; opacity: .8; }
.sa-view { position: relative; margin: 8px 0; background: #2f3539 center / cover no-repeat; border: 1px solid #10120f; overflow: hidden; }
.sa-view img { position: absolute; pointer-events: none; }
.sa-ship .sa-view img.base { left: 0; top: 0; height: auto; }
.sa-ship .sa-view img.part, .sa-ship .sa-view img.hl { height: auto; }
.sa-ship .sa-view img.hl { opacity: 0; transition: opacity .15s; }
.sa-ship .sa-view img.hl.on { opacity: 1; }
.sa-plane .sa-view img.base { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sa-mission { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: .92rem; margin: 8px 0; }
.sa-mis { font-size: .9rem; }
.sa-mis th, .sa-mis td { padding: 4px 8px 4px 0; }
.sa-mis td.n, .sa-mis th.n { text-align: right; font-family: var(--mono); font-size: .84rem; white-space: nowrap; }
.sa-mis th.n { font-family: var(--head); font-size: .9rem; }
.sa-mis tbody tr { cursor: pointer; }
.sa-mis tbody tr:hover td { background: #e9e5d9; }
.sa-mis tr.on td { background: #e4dcc4; }
.sa-mis td.over { color: #a3261a; font-weight: 600; }
.sa-hist small { color: var(--muted); }
.sa-hist td.n { white-space: nowrap; }
#sa ul.warn { list-style: none; margin: 8px 0; }
#sa ul.warn li + li { margin-top: 4px; }
.dd-tip .tt-s span:first-child { color: #e2c26f; }
@media (max-width: 900px) { .sa-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sa-row { gap: 4px; } .sa-row .mslot { min-height: 84px; font-size: .76rem; padding: 4px 2px; } .sa-row .mslot img { width: 46px; height: 34px; } .sa-board { padding: 6px; } .sa-pre { flex-wrap: wrap; } }

/* ---- feat/polish: kind buttons over long lists (src/site.js, table({ kinds })) */
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.kinds button { font: 600 .86rem 'Source Sans 3', sans-serif; padding: 4px 10px; border: 1px solid var(--line); background: var(--paper2); color: var(--ink); cursor: pointer; border-radius: 2px; }
.kinds button span { font-weight: 400; color: var(--muted); margin-left: 2px; }
.kinds button:hover { border-color: var(--ink); }
.kinds button[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); color: #f1ecdc; }
.kinds button[aria-pressed="true"] span { color: #c9c2ab; }

/* ---- feat/polish: the /search/ page (src/site.js): a light box on paper, results as the header list shows them */
#search-page { margin-left: 0; }
#search-page input { background: #fbfaf6; color: var(--ink); border-color: var(--line); }
#search-page input::placeholder { color: var(--muted); }
#search-results h2 small { font: 400 .9rem 'Source Sans 3', sans-serif; margin-left: 6px; }
.find-res { max-width: 760px; border-top: 1px solid var(--line); }
.find-res a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 4px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.find-res a:hover { background: var(--paper2); }
.find-res small { white-space: nowrap; }
/* ---------- ships, planes and rockets as units (feat/units, scripts/build/navalair.mjs): a critical hit icon is one
   frame of the game's strip; the hull's picture beside the facts */
.na-crit { display: inline-block; flex: none; background-repeat: no-repeat; }
img.na-pic { display: block; width: auto; height: auto; max-width: min(100%, 320px); }
/* ---------- the windows of their own that 20 decision categories show in the game (scripted GUIs; feat/gui, 28 Nov)
   Drawn from the game's .gui: every element at its position in game pixels, --u is one game pixel at the width the
   category has here. Pictures are whole strips, the frame picked by --fx. Hover or tap shows the game's tooltip. */
.gw { container-type: inline-size; margin: 4px 0 6px; }
.gw-in { position: relative; --u: calc(100cqw / var(--gw)); }
.gw-e { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
.gw-i, .gw-b { background-repeat: no-repeat; background-size: calc(var(--bw) * var(--u)) calc(var(--bh) * var(--u)); background-position: calc(var(--fx) * var(--u) * -1) 0; }
.gw-i > img, .gw-b > img { display: block; width: 100%; height: 100%; }
.gw-b { cursor: pointer; }
.gw-dim { opacity: .45; }
.gw-pass { pointer-events: none; }
.gw-g { border: 1px dashed rgba(201, 185, 142, .35); }
.gw-x { height: auto; font-size: calc(var(--fs) * var(--u)); line-height: calc(var(--lh) * var(--u)); white-space: normal; overflow-wrap: break-word; font-family: 'Source Sans 3', sans-serif; font-weight: 600; text-shadow: 0 1px 1px rgba(0, 0, 0, .6); }
.gw-x.gw-nw { white-space: nowrap; }
.gw-sp { display: inline-block; width: calc(var(--n) * var(--u)); }
.gw-h { font-family: var(--head); font-weight: 700; letter-spacing: .03em; }
.gw-m { font-family: 'Courier Prime', 'Courier New', monospace; font-weight: 700; text-shadow: none; }
.gw-c { text-align: center; }
.gw-r { text-align: right; }
.gw-ti { display: inline-block; vertical-align: -.2em; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); background-repeat: no-repeat; background-size: calc(var(--bw) * var(--u)) 100%; }
.gw-fl { display: inline-block; width: calc(24 * var(--u)); height: auto; vertical-align: -.15em; }
.gw-e[tabindex]:hover, .gw-e[tabindex]:focus-visible { outline: 1px solid rgba(232, 201, 106, .7); outline-offset: 1px; z-index: 5; }
.gw-e[tabindex]:focus { z-index: 5; }
.gw-tip { display: none; position: absolute; left: 0; top: 100%; z-index: 6; width: max-content; max-width: min(340px, 80cqw); margin-top: 4px; padding: 7px 10px; background: #1e221f; color: #ece6d4; border: 1px solid #6f6346; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); font: 400 .86rem/1.35 'Source Sans 3', sans-serif; text-align: left; white-space: normal; text-shadow: none; cursor: auto; }
.gw-tip.gw-tr { left: auto; right: 0; }
.gw-tip.gw-tu { top: auto; bottom: 100%; margin: 0 0 4px; }
.gw-e:hover > .gw-tip, .gw-e:focus > .gw-tip { display: block; }
.gw-tip .gw-tn { margin: 6px 0 2px; color: #e0c47c; font-size: .82rem; }
.gw-tip .gw-tn:first-child { margin-top: 0; }
.gw-tip .gw-tv { padding: 3px 0; border-top: 1px solid #3d4139; }
.gw-tip .fx { margin: 0; padding-left: 16px; }
.gw-tip .gw-ti { --u: 1px; }
.gw-tip .gw-fl { width: 20px; }
.gw-note { margin: 2px 6px 0; color: #bcb5a0; font-size: .84rem; }
.gw-above { margin: 2px 6px 6px; padding: 6px 9px; background: rgba(8, 9, 9, .55); color: #d8d1bb; font-size: .86rem; line-height: 1.4; }
/* a flag inside a category's text (Naval Treaties: "between 90% and 100% of @ENG Britain") took the 114 px size of the
   category picture */
.dc-cdesc p img.fxflag { width: 20px; height: 13px; border: 0; vertical-align: -2px; }

/* lore pages (feat/lore): the start screen text, the spirits, the focus tree read as a story with its events */
.lstart { display: flex; gap: 16px; align-items: flex-start; max-width: 820px; }
.lstart .lflag { width: 82px; height: 52px; flex: none; margin-top: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.lstart p { font-size: 1.08rem; }
.lsp { max-width: 820px; margin-bottom: 1em; }
.lsp-i, .lf { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); max-width: 860px; }
.lsp-i img { flex: none; }
.lsp-i p.gametext, .lf-b > p.gametext { margin: .3em 0; }
.lf-i { flex: none; width: 64px; height: 57px; }
.lf-b { min-width: 0; flex: 1; }
.lf-n { font: 700 1.05rem/1.25 var(--head); margin: 0 0 .15em; }
.lf-n small { font: 400 .85rem 'Source Sans 3', system-ui, sans-serif; margin-left: 6px; }
.lf-x, .lev-o, .lev-again { font-size: .9rem; color: var(--muted); }
.lev { display: flex; gap: 12px; margin: 10px 0 4px; padding: 10px 12px; background: var(--paper2); border: 1px solid var(--line); }
.lev img { flex: none; width: 105px; height: 88px; object-fit: cover; }
.lev > div { min-width: 0; }
.lev-t { font: 700 1rem/1.25 var(--head); margin: 0 0 .2em; }
.lev p.gametext { font-size: .96rem; margin: .35em 0; }
.ltoc { max-width: 860px; margin: 1em 0 1.6em; padding: 10px 14px; border: 1px solid var(--line); }
.ltoc ul { margin: 0; padding: 0; list-style: none; columns: 2 300px; column-gap: 28px; }
.ltoc li { break-inside: avoid; padding: 1px 0; }
.ltoc .l4 { padding-left: 16px; }
.page h4[id^="b-"], .page h5[id^="b-"] { font: 700 1.08rem/1.2 var(--head); margin: 1.3em 0 .3em; }
.page [id^="b-"], .lf, .page h2[id^="y"] { scroll-margin-top: 112px; }
@media (max-width: 640px) {
  .lstart, .lev { flex-direction: column; }
  .lf-i { width: 48px; height: 43px; }
}
