/* Empires & Allies' own look on its page of the platform: the war table (green felt, manila dossiers, brass,
   chalk), carried over from the game's first site. Scoped to <main> so the platform's bar and footer stay its own. */
@font-face { font-family: "Alfa Slab One"; font-weight: 400; font-display: swap; src: url("../../fonts/alfa-slab-one-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alfa Slab One"; font-weight: 400; font-display: swap; src: url("../../fonts/alfa-slab-one-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../../fonts/barlow-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../../fonts/barlow-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../../fonts/barlow-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../../fonts/barlow-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Special Elite"; font-weight: 400; font-display: swap; src: url("../../fonts/special-elite-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Special Elite"; font-weight: 400; font-display: swap; src: url("../../fonts/special-elite-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.theme-war-table main {
	--felt: #17271f;
	--felt-deep: #0f1b15;
	--panel: #1d3128;
	--paper: #e8d9ae;
	--paper-edge: #c9b47c;
	--ink: #2a2216;
	--brass: #f0b43a;
	--brass-soft: #ffd77a;
	--brass-shade: #c98a1a;
	--brass-deep: #4a2f05;
	--signal: #b8382a;
	--chalk: #efe7cc;
	--chalk-muted: #b3bca3;
	--line: rgba(239, 231, 204, 0.12);
	--radius: 10px;
	--shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
	--font-display: "Alfa Slab One", Rockwell, Georgia, serif;
	--font-body: "Barlow", "Segoe UI", Roboto, sans-serif;
	--font-type: "Special Elite", "Courier New", serif;
	background: var(--felt) url("../../img/games/empires-and-allies/contours.svg");
	color: var(--chalk);
	font-family: var(--font-body);
	line-height: 1.6;
}
.theme-war-table main h1, .theme-war-table main h2, .theme-war-table main h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.005em; line-height: 1.1; margin: 0 0 0.5em; }
.theme-war-table main p { margin: 0 0 1em; }
.theme-war-table main a { color: var(--brass); }
.theme-war-table main ::selection { background: var(--brass); color: var(--brass-deep); }
.theme-war-table .container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.theme-war-table .war-btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.theme-war-table .inline-form { display: inline; }

/* Landing page: the briefing over a player's island, then each chapter as an intel dossier lying on the green table
   next to taped photos. The theme itself (table, paper, brass, fonts, top bar) comes from site.css. */

.landing { font-size: 18px; }

/* Brass buttons, pressed down like the game's */

.war-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 12px 28px;
	border-radius: 8px;
	font-family: var(--font-display);
	font-size: 1.15rem;
	line-height: 1.1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.landing .war-btn-brass {
	border: 2px solid var(--brass-deep);
	background: linear-gradient(180deg, #ffe09a 0%, var(--brass) 48%, #c98a1a 100%);
	color: #2b1a02;
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 5px 0 var(--brass-deep), 0 12px 22px rgba(0, 0, 0, 0.35);
}
.landing .war-btn-brass:hover { color: #2b1a02; filter: brightness(1.05); }
.landing .war-btn-brass:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 1px 0 var(--brass-deep); }
/* Discord's own colour, so players recognise it at a glance */
.landing .war-btn-discord {
	gap: 10px;
	border: 2px solid #2a2f7a;
	background: linear-gradient(180deg, #7983f5 0%, #5865f2 50%, #4752c4 100%);
	color: #fff;
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 5px 0 #2a2f7a, 0 12px 22px rgba(0, 0, 0, 0.35);
}
.landing .war-btn-discord:hover { color: #fff; filter: brightness(1.06); }
.landing .war-btn-discord:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 1px 0 #2a2f7a; }

/* Hero: the briefing over a player's island */

.war-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: min(88vh, 760px);
	padding: 56px 0 72px;
	overflow: hidden;
	isolation: isolate;
}
/* A player's island, captured at three times the screen resolution without the game's buttons, darkened on the left
   for the briefing. Both layers fade out at the bottom, so the table and its map lines continue without an edge. */
.war-hero::before, .war-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	-webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.war-hero::before { z-index: -2; background: url("../../img/games/empires-and-allies/hero.jpg") 62% 45% / cover no-repeat; }
.war-hero::after {
	z-index: -1;
	background: linear-gradient(90deg, rgba(15, 27, 21, 0.95) 0%, rgba(15, 27, 21, 0.84) 40%, rgba(15, 27, 21, 0.4) 72%, rgba(15, 27, 21, 0.55) 100%);
}
.war-hero-inner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: 48px; }
.war-hero h1 { margin: 0 0 22px; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.02; color: var(--chalk); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45); max-width: 11em; }
.war-lead { margin: 0; max-width: 34em; font-size: 1.2rem; line-height: 1.55; color: #e2dcc4; }
.war-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 32px 0 18px; }
.war-actions .inline-form { display: contents; }
.war-note { margin: 0; color: var(--chalk-muted); font-size: 0.98rem; }

.war-hero-art { position: relative; margin: 0; justify-self: center; width: min(560px, 100%); }
.war-hero-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55)); }
/* Chapters: a dossier on the table, photos beside it */

.chapter { padding: 104px 0; }
.chapter + .chapter { padding-top: 24px; }
.chapter-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 72px; }
.chapter-flip .chapter-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.chapter-flip .dossier { order: 2; transform: rotate(0.7deg); }

.dossier {
	position: relative;
	padding: 40px 40px 34px;
	border-radius: 3px 6px 4px 3px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 22%),
		var(--paper);
	border: 1px solid var(--paper-edge);
	color: var(--ink);
	box-shadow: 0 2px 0 var(--paper-edge), 0 24px 40px rgba(0, 0, 0, 0.45);
	transform: rotate(-0.7deg);
}
/* The folder tab */
.dossier::before {
	content: "";
	position: absolute;
	top: -17px;
	left: 26px;
	width: 132px;
	height: 18px;
	border-radius: 7px 7px 0 0;
	background: var(--paper);
	border: 1px solid var(--paper-edge);
	border-bottom: 0;
}
.dossier h2 { margin: 0 0 16px; font-size: clamp(1.8rem, 2.8vw, 2.35rem); line-height: 1.08; color: var(--ink); }
.dossier p { margin: 0 0 14px; line-height: 1.6; }
.dossier-intel { font-family: var(--font-type); font-size: 1.02rem; color: #3b2d17; }
.dossier-intel span { color: var(--signal); }

.supplies { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; padding: 16px 0 0; list-style: none; border-top: 1px dashed rgba(42, 34, 22, 0.35); font-weight: 700; }
.supplies li { display: inline-flex; align-items: center; gap: 8px; }
.supplies img { width: 34px; height: 34px; object-fit: contain; }

.officers-label { margin: 22px 0 10px; padding-top: 16px; border-top: 1px dashed rgba(42, 34, 22, 0.35); font-weight: 700; }
.officers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; font-family: var(--font-type); font-size: 0.95rem; }
.officers li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; line-height: 1.25; }
/* Round portraits like the game's quest givers; the full-length pictures show their head and shoulders */
.officers img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 6%;
	background: #d9c48c;
	border: 3px solid #a8741a;
}
.officers li:first-child img { object-position: center; background: none; border: 0; }

/* Photos taped to the table */

.photo {
	position: relative;
	margin: 0;
	padding: 10px 10px 12px;
	background: #f4efe2;
	box-shadow: 0 20px 34px rgba(0, 0, 0, 0.5);
	transform: rotate(1.2deg);
}
.photo img { display: block; width: 100%; height: auto; }
.photo::after {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	width: 110px;
	height: 26px;
	margin-left: -55px;
	background: rgba(232, 217, 174, 0.72);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transform: rotate(-3deg);
}
.photo figcaption { padding-top: 8px; font-family: var(--font-type); color: var(--ink); text-align: center; }
.photo-wide { justify-self: stretch; }
/* Game art is small (450 px): the photo keeps its size instead of stretching the frame around it */
.photo-art { justify-self: center; width: min(520px, 100%); }

.photo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.photo-row .photo:nth-child(1) { transform: rotate(-2deg); }
.photo-row .photo:nth-child(2) { transform: rotate(1.4deg) translateY(18px); }
.photo-row .photo:nth-child(3) { transform: rotate(-0.8deg); }

/* Duty roster: who is playing and who leads */

.roster {
	padding: 30px 32px 26px;
	border-radius: 10px;
	background: rgba(15, 27, 21, 0.85);
	border: 1px solid rgba(239, 231, 204, 0.14);
	box-shadow: 0 22px 36px rgba(0, 0, 0, 0.4);
}
.roster h3 { margin: 0 0 14px; font-size: 1.5rem; color: var(--chalk); }
.roster-online { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; font-weight: 700; color: #b9e6c6; }
.roster-faces { display: inline-flex; }
.roster-faces img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--felt-deep); }
.roster-faces img + img { margin-left: -10px; }
.roster-list { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.roster-list li { counter-increment: rank; border-top: 1px solid rgba(239, 231, 204, 0.1); }
.roster-list a { display: grid; grid-template-columns: 30px 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; color: var(--chalk); text-decoration: none; }
.roster-list a::before { content: counter(rank); font-family: var(--font-display); font-size: 1.15rem; color: var(--brass); text-align: center; }
.roster-list a:hover .roster-name { color: var(--brass); }
.roster-list img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.roster-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.roster-level { color: var(--chalk-muted); font-size: 0.92rem; white-space: nowrap; }
.roster-empty { margin: 0; color: var(--chalk-muted); }
.roster-more { display: inline-block; margin-top: 16px; font-weight: 700; }

/* Questions */

.war-faq { padding: 96px 0; border-top: 1px solid rgba(240, 180, 58, 0.16); }
.war-faq-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.war-faq h2 { margin: 0; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.05; color: var(--chalk); }
.war-faq-list details { border-bottom: 1px solid rgba(239, 231, 204, 0.16); }
.war-faq-list details:first-child { border-top: 1px solid rgba(239, 231, 204, 0.16); }
.war-faq-list summary {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	padding: 20px 0;
	cursor: pointer;
	list-style: none;
	font-weight: 700;
	font-size: 1.15rem;
}
.war-faq-list summary::-webkit-details-marker { display: none; }
.war-faq-list summary::after { content: "+"; color: var(--brass); font-family: var(--font-display); font-size: 1.4rem; line-height: 1; }
.war-faq-list details[open] summary::after { content: "–"; }
.war-faq-list details p { margin: 0 0 22px; max-width: 40em; color: #d6d0b8; line-height: 1.6; }

/* Last call */

.war-cta { padding: 80px 0; background: var(--felt-deep); border-top: 1px solid rgba(240, 180, 58, 0.22); }
.war-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.war-cta h2 { margin: 0 0 6px; font-size: clamp(2rem, 3.6vw, 3rem); color: var(--chalk); }
.war-cta p { margin: 0; color: var(--chalk-muted); font-size: 1.15rem; }
.war-cta .inline-form { display: contents; }

/* Narrow screens */

@media (max-width: 980px) {
	.war-hero { min-height: 0; padding: 40px 0 56px; }
	.war-hero-inner { grid-template-columns: 1fr; gap: 28px; }
	.war-hero-art { width: min(340px, 82%); grid-row: 1; }
	.war-hero::after { background: linear-gradient(180deg, rgba(15, 27, 21, 0.55) 0%, rgba(15, 27, 21, 0.9) 45%); }
	.chapter { padding: 72px 0; }
	.chapter-inner, .chapter-flip .chapter-inner { grid-template-columns: 1fr; gap: 44px; }
	.chapter-flip .dossier { order: 0; }
	.war-faq-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 620px) {
	.landing { font-size: 17px; }
	.war-hero-art { width: min(240px, 68%); }
	.war-hero h1 { font-size: 2.3rem; }
	.war-actions { flex-direction: column; }
	.war-actions .war-btn { width: 100%; }
	.dossier { padding: 32px 22px 26px; transform: none; }
	.chapter-flip .dossier { transform: none; }
	.photo-row { grid-template-columns: 1fr 1fr; }
	.photo-row .photo:nth-child(3) { grid-column: 1 / -1; width: 62%; justify-self: center; }
	.roster { padding: 24px 18px 20px; }
	.war-cta .war-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.war-btn { transition: none; }
}

/* Server status sits on its own line above the note */
.theme-war-table .war-note { color: var(--chalk); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.theme-war-table .war-note .state { display: flex; width: max-content; margin-bottom: 6px; color: var(--chalk); }
