/* All Game Data. The look follows aion2data.com (owner, 28 Nov 2026: "как aion2 все красиво и понятно"): dark by
   default with a light switch, the game's own art across the head of pages, sections as big art tiles with real counts,
   the game's icons in frames. Each game sets its accent (--ac) and its heading font (--display). docs/design.md */
:root, [data-theme="dark"] {
  --bg: #0c1317;
  --bg-2: #0f181d;
  --panel: #121d23;
  --panel-2: #172630;
  --line: #24363f;
  --line-2: #2f4652;
  --ink: #e9eff2;
  --ink-soft: #c4d1d7;
  --muted: #8ea2ab;
  --head: rgba(9, 14, 17, .94);
  --ac: #e7b04c;
  --ac-ink: #f6d58e;
  --frame: #b88a35;
  --shade: rgba(6, 10, 12, .72);
  --display: 'Marcellus', Georgia, serif;
  --body: 'Nunito Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #ebe8df;
  --panel: #ffffff;
  --panel-2: #f7f5ef;
  --line: #ddd8cb;
  --line-2: #cbc4b2;
  --ink: #1b2230;
  --ink-soft: #343d52;
  --muted: #5e6678;
  --head: rgba(20, 26, 34, .96);
  --ac: var(--ac-light, #9a6a0a);
  --ac-ink: var(--ac-light, #7a5306);
  --frame: #b0893f;
  --shade: rgba(14, 18, 24, .62);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--ac); text-decoration: none; }
a:hover { color: var(--ac-ink); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
small { color: var(--muted); font-size: .86em; }
code, .cmd { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .005em; }

/* ---------- header (always dark, like the game's own UI) */
.top { position: sticky; top: 0; z-index: 40; background: var(--head); color: #eef2f4; backdrop-filter: blur(6px); border-bottom: 1px solid rgba(255,255,255,.07); }
.bar { max-width: 1240px; margin: 0 auto; padding: 0 18px; }
.head1 { display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap; }
.logo { color: #fff; font: 400 22px/1 var(--display); white-space: nowrap; }
.logo:hover { color: #fff; text-decoration: none; }
.gname { color: #fff; font: 400 21px/1.1 var(--display); display: flex; flex-direction: column; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.16); }
.gname:hover { color: #fff; text-decoration: none; }
.gname small { color: #9fb0b8; font: 400 12.5px/1.4 var(--body); }
.head1 .find { margin-left: auto; }
.lang, .theme { color: #cfd8dc; font-size: 15px; white-space: nowrap; background: none; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 6px 10px; cursor: pointer; font-family: var(--body); }
.lang:hover, .theme:hover { color: #fff; border-color: rgba(255,255,255,.4); text-decoration: none; }
.menu { display: flex; gap: 2px; flex-wrap: wrap; }
.menu > a, .dd-top { display: block; color: #d3dce0; padding: 9px 12px 11px; font-size: 15.5px; border-bottom: 2px solid transparent; }
.menu > a:hover, .dd-top:hover { color: #fff; text-decoration: none; }
.menu [aria-current] { color: #fff; border-bottom-color: var(--ac); }
.dd { position: relative; }
.dd-list { display: none; position: absolute; left: 0; top: 100%; z-index: 50; min-width: 240px; background: #121b20; border: 1px solid #2a3b44; box-shadow: 0 10px 28px rgba(0,0,0,.45); padding: 6px 0; border-radius: 8px; }
.dd-list a { display: block; padding: 7px 14px; color: #dbe3e6; }
.dd-list a:hover, .dd-list [aria-current] { background: #1b2a32; color: #fff; text-decoration: none; }
@media (hover: hover) { .dd:hover .dd-list { display: block; } }
.dd.open .dd-list { display: block; }

/* ---------- search */
.find { position: relative; }
.find input { width: 340px; max-width: 100%; padding: 9px 12px; border: 1px solid #34444d; border-radius: 8px; background: #172228; color: #fff; font: inherit; font-size: 15px; }
.find input::placeholder { color: #8b9ba3; }
.find.big { margin: 6px 0 4px; max-width: 620px; }
.find.big input { width: 100%; font-size: 17px; padding: 12px 14px; background: rgba(12, 19, 23, .78); }
.find-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); min-width: 300px; background: #121b20; border: 1px solid #2a3b44; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.5); max-height: 70vh; overflow: auto; }
.find-list a, .hits a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; color: #e6edf0; border-bottom: 1px solid #1d2b32; }
.find-list a:hover, .hits a:hover { background: #1a2830; text-decoration: none; }
.hits { max-width: 680px; border: 1px solid var(--line); border-radius: 8px; background: #121b20; }

/* ---------- page */
.page { max-width: 1240px; margin: 0 auto; padding: 22px 18px 64px; }
body.wide .page { max-width: 1560px; }
.sample { background: #5a4710; color: #fff3cc; text-align: center; padding: 6px 12px; font-size: 14px; }
.crumbs { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--ink-soft); }
h1 { font-size: 42px; line-height: 1.12; margin: 8px 0 10px; }
h2 { font-size: 28px; line-height: 1.2; margin: 44px 0 12px; }
h3 { font-size: 21px; margin: 26px 0 8px; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 780px; margin: 0 0 16px; }
.prose { max-width: 760px; }
.prose p { margin: 0 0 12px; }
ul.prose { padding-left: 20px; }
ul.prose li { margin: 6px 0; }
p.hint, .source { color: var(--muted); font-size: 14px; max-width: 780px; }

/* ---------- the game's art across the head of a page */
.hero-art { position: relative; margin: -22px calc(50% - 50vw) 8px; padding: 0 calc(50vw - 50% ); min-height: 300px; display: flex; align-items: flex-end; background: #0a1013 center / cover no-repeat; overflow: hidden; }
.hero-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-art::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,12,15,.15) 0%, rgba(8,12,15,.35) 55%, var(--bg) 100%); }
.hero-in { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto; padding: 70px 18px 22px; }
.hero-art h1 { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); margin-bottom: 10px; }
.hero-art .crumbs, .hero-art .crumbs a { color: #d8e1e5; }
.hero-art .lede, .hero-box { display: inline-block; color: #eef3f5; background: var(--shade); border-radius: 8px; padding: 10px 14px; margin: 0 0 8px; max-width: 760px; }
.hero-art .source { color: #c9d3d8; margin: 0; }
.hero-home { min-height: 460px; }
.hero-home h1 { font-size: 50px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; }
.quick a { color: #f3dfb0; font-size: 15.5px; }
.quick a::after { content: ' \2192'; }

/* ---------- sections as big art tiles: the picture, the title over it, one line, real counts */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin: 18px 0; }
.tile { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--ink); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--frame); transform: translateY(-2px); text-decoration: none; color: var(--ink); }
.tile-art { position: relative; height: 150px; background: var(--panel-2) center / cover no-repeat; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,12,15,.82)); }
.tile-art b { position: absolute; z-index: 1; left: 14px; bottom: 10px; color: #fff; font: 400 26px/1.15 var(--display); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.tile p { margin: 12px 16px 6px; color: var(--ink-soft); font-size: 15.5px; }
.tile small { display: block; margin: auto 16px 14px; }
.tile.noart .tile-art { height: 84px; background: linear-gradient(135deg, var(--panel-2), var(--bg-2)); }

/* ---------- a pick-one block with the game's icons (class, faction, country) */
.picker { background: rgba(14, 22, 27, .86); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px 12px; margin: 16px 0 6px; max-width: 900px; }
.picker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.picker-head b { font: 400 22px/1.2 var(--display); color: #fff; }
.picker-list { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-top: 10px; }
.picker-list a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; color: #e8eef1; font-size: 14.5px; text-align: center; padding: 6px 2px; border-radius: 8px; }
.picker-list a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.picker-list img { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; border: 2px solid var(--frame); background: #0b1115; padding: 4px; }

/* ---------- the game's icons in frames: categories with counts */
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin: 14px 0; }
.icon-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; color: var(--ink); }
.icon-tile:hover { border-color: var(--frame); text-decoration: none; color: var(--ink); }
.icon-tile img, .frame { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--frame); border-radius: 8px; background: radial-gradient(circle at 50% 40%, #233741, #0e161a); padding: 4px; margin-bottom: 6px; }
.icon-tile b { font-weight: 700; font-size: 16px; }
.icon-tile em { font-style: normal; color: var(--ac); font-size: 13.5px; }

/* ---------- tables */
.tbl { overflow-x: auto; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: middle; padding: 8px 12px; border-bottom: 1px solid var(--line); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font-weight: 700; font-size: 13.5px; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
tbody th { font-weight: 600; }
tbody tr:hover { background: var(--panel-2); }
th[data-sort] { cursor: pointer; }
th[data-sort]::after { content: ' \2195'; color: var(--line-2); font-weight: 400; }
th[data-dir="asc"]::after { content: ' \2191'; color: var(--ac); }
th[data-dir="desc"]::after { content: ' \2193'; color: var(--ac); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td small, th small { display: block; }
.filter { margin: 12px 0 4px; }
.filter input { width: 340px; max-width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; background: var(--panel); color: var(--ink); }
.shown { color: var(--muted); font-size: 14px; margin-left: 6px; }
.pic { vertical-align: middle; margin-right: 10px; width: 36px; height: 36px; object-fit: contain; border: 1px solid var(--frame); border-radius: 6px; background: #0e161a; padding: 2px; float: left; }

/* ---------- one entity: its icon and name, then label/value rows */
.ehead { display: flex; gap: 16px; align-items: center; margin: 6px 0 12px; }
.ehead .frame { width: 84px; height: 84px; margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 12px 0 18px; max-width: 780px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.facts dt, .facts dd { padding: 8px 14px; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); background: var(--panel-2); }
.facts dd { font-variant-numeric: tabular-nums; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

/* ---------- copyable codes */
.cmd { background: var(--panel-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 5px; }
button.copy { margin-left: 6px; font: 600 13px/1 var(--body); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; }
button.copy:hover { border-color: var(--ac); color: var(--ac); }
button.copy.done { background: var(--ac); border-color: var(--ac); color: #111; }

/* ---------- forms in calculators */
label { display: block; font-weight: 600; margin: 10px 0 4px; }
select, input[type="number"] { font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink); min-width: 240px; max-width: 100%; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 22px 0 34px; background: var(--bg-2); }
footer a { color: var(--ink-soft); }

@media (max-width: 760px) {
  h1 { font-size: 32px; }
  .hero-home h1 { font-size: 36px; }
  h2 { font-size: 24px; }
  .head1 { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .gname { padding-left: 10px; font-size: 18px; }
  .head1 .find { margin-left: 0; order: 9; width: 100%; }
  .find input { width: 100%; }
  .menu { overflow-x: auto; flex-wrap: nowrap; }
  .menu > a, .dd-top { white-space: nowrap; padding: 8px 10px 10px; }
  .hero-art { min-height: 220px; }
  .hero-home { min-height: 340px; }
  .tiles { grid-template-columns: 1fr; }
  .picker-list a { width: 78px; font-size: 13px; }
  .picker-list img { width: 44px; height: 44px; }
  th, td { padding: 7px 9px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
}

/* a country's map colour as a round mark */
.dot { display: inline-block; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--frame); box-shadow: inset 0 0 0 4px rgba(10, 16, 20, .55); }
.dot.sm { width: 14px; height: 14px; border-width: 1px; box-shadow: none; vertical-align: -2px; margin-right: 6px; }
.picker-list small { color: #9fb0b8; font-size: 12px; margin-top: -4px; }

/* flags: in a line of text, in the picker, at the head of a country's page */
.flag { width: 27px; height: 18px; vertical-align: -3px; margin-right: 7px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.35); }
.picker-list img.pflag { width: 66px; height: 44px; border-radius: 4px; padding: 0; object-fit: cover; border: 0; box-shadow: 0 0 0 2px var(--frame), 0 3px 8px rgba(0,0,0,.45); margin: 4px 0; }
.flagbig { float: left; width: 81px; height: 54px; margin: 3px 14px 4px 0; border-radius: 4px; box-shadow: 0 0 0 2px var(--frame), 0 3px 10px rgba(0,0,0,.5); }

/* feedback form (/report.js draws the panel; these colours make it the site's own) */
:root, [data-theme="dark"] { --report-bg: #121b20; --report-fg: var(--ink); --report-muted: var(--muted); --report-line: var(--line-2); --report-accent: var(--ac); --report-error: #e0675f; --report-ok: #6fbf73; }
[data-theme="light"] { --report-bg: #ffffff; --report-error: #b3261e; --report-ok: #2e7d32; }
.report-btn { flex: none; font: 600 14px var(--body); color: #d9e1e4; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 6px 11px; cursor: pointer; }
.report-btn:hover { color: #fff; border-color: var(--ac); }
.report-line { margin: 28px auto 0; padding-bottom: 18px; font-size: 15px; color: var(--muted); }
.report-line button { font: inherit; color: var(--ac); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* lists: a table that fits the page keeps its head on screen while you scroll (--top is the header's height) */
.tbl.fits { overflow: visible; }
.tbl.fits thead th { position: sticky; top: var(--top, 0px); z-index: 3; }
.shown.none { color: #e0675f; }
code[data-copy] { cursor: copy; }
code[data-copy]:hover { border-color: var(--ac); }

/* societal values as the game's sliders: the two sides with their pictures, the bar, where the country stands */
.svals { display: grid; gap: 8px; margin: 12px 0 18px; max-width: 900px; }
.sv { display: grid; grid-template-columns: 1fr minmax(120px, 2fr) 1fr 52px; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.sv:hover { border-color: var(--frame); text-decoration: none; color: var(--ink); }
.sv-side { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.sv-side.r { justify-content: flex-end; text-align: right; }
.sv-i { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; border: 1px solid var(--frame); background: #0e161a; }
.sv-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3b6fa8, #59636b 50%, #b0503f); }
.sv-bar i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #f4e3b5; border: 2px solid #1a1206; box-shadow: 0 0 0 2px var(--frame); }
.sv-v { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .sv { grid-template-columns: 1fr 1fr; } .sv-bar { grid-column: 1 / -1; order: 3; } .sv-v { display: none; } }

/* a game's own colours (set on <body> as --game-ac, --game-ac-ink, --game-ac-light) for the theme in use */
body { --ac: var(--game-ac, #e7b04c); --ac-ink: var(--game-ac-ink, #f6d58e); }
[data-theme="light"] body { --ac: var(--game-ac-light, #9a6a0a); --ac-ink: var(--game-ac-light, #7a5306); }

/* hover cards (src/site.js): the card of the page a link points to */
.tipcard { position: absolute; z-index: 70; width: 320px; max-width: calc(100vw - 16px); background: #111a1f; color: #e8eef1; border: 1px solid var(--frame); border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.55); padding: 12px 14px; pointer-events: none; font-size: 14px; line-height: 1.45; }
.tipcard .tc-head { display: flex; align-items: center; gap: 10px; }
.tipcard .tc-head img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--frame); border-radius: 6px; background: #0b1115; padding: 2px; flex: none; }
.tipcard b { font: 400 19px/1.2 var(--display); color: #fff; }
.tipcard p { margin: 8px 0 0; color: #c4d1d7; }
.tipcard dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid #2a3b44; }
.tipcard dt { color: #8ea2ab; }
.tipcard dd { margin: 0; }
.linkbtn { font: inherit; color: var(--ac); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
