@import url("fonts.css");
:root {
  --bg: #101719;
  --surface: #182124;
  --surface-2: #202c30;
  --ink: #f0efe8;
  --muted: #acb9b9;
  --line: #354448;
  --accent: #d1b67b;
  --accent-ink: #171d1c;
  --danger: #ffb5a5;
  --success: #a8ceaf;
  --header: rgba(16, 23, 25, 0.97);
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Manrope", "Segoe UI", sans-serif;
  --radius: 4px;
  --space: clamp(20px, 5vw, 80px);
  --max: 1320px;
  --z-header: 10;
  --z-dialog: 20;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef0ec;
  --surface: #fff;
  --surface-2: #e1e7e3;
  --ink: #172a2c;
  --muted: #4e6264;
  --line: #b7c6c3;
  --accent: #765820;
  --accent-ink: #fff;
  --danger: #9f3026;
  --success: #2b623d;
  --header: rgba(238, 240, 236, 0.98);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
}
h1 {
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(32px, 3.5vw, 50px);
  letter-spacing: -0.02em;
}
h3 {
  font-size: 27px;
}
p {
  max-width: 68ch;
}
button {
  color: inherit;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
main:focus {
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 30;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 14px;
}
.skip-link:focus {
  top: 8px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}
.text-link {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}
.text-link::after {
  content: "↗";
  font-size: 19px;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  background: var(--surface);
  white-space: nowrap;
  transition:
    background 0.18s,
    transform 0.18s,
    border-color 0.18s;
}
.button:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}
.button:active {
  transform: translateY(1px);
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.button.primary:hover {
  filter: brightness(1.1);
}
.button.subtle {
  background: transparent;
}
.button.danger {
  color: var(--danger);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.header {
  height: 76px;
  padding: 0 clamp(16px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand > span {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.12em;
  font-weight: 600;
  line-height: 1.1;
}
.brand small {
  display: block;
  font-family: var(--body);
  font-size: 9px;
  letter-spacing: 0.55em;
  margin-top: 5px;
}
nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex: 1;
}
nav a {
  font-size: 13px;
  white-space: nowrap;
  color: var(--muted);
  min-height: 44px;
  display: flex;
  align-items: center;
}
nav a[aria-current="page"] {
  color: var(--ink);
  position: relative;
}
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
nav a:hover {
  color: var(--accent);
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
}
.account-link {
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-toggle {
  padding: 8px;
  font-size: 12px;
}
.menu-toggle,
.mobile-account {
  display: none;
}
.initial {
  padding: var(--space);
  min-height: 60vh;
}
/* Hero: one photographic moment, followed by ordinary document flow. */
.hero {
  position: relative;
  min-height: min(740px, calc(100svh - 76px));
  display: flex;
  align-items: center;
  isolation: isolate;
  background: #182124;
  color: #f0efe8;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 50%;
  z-index: -2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 35% 0 0;
  background: linear-gradient(
    90deg,
    rgba(10, 18, 21, 0.95),
    rgba(10, 18, 21, 0.8) 55%,
    transparent
  );
  z-index: -1;
}
.hero-copy {
  width: 100%;
  max-width: var(--max);
  margin: auto;
  padding: 54px var(--space) 70px;
}
.hero h1 {
  font-size: clamp(54px, 6.7vw, 94px);
  font-weight: 500;
  max-width: 640px;
  line-height: 1.02;
  margin: 22px 0;
}
.hero h1 em {
  font-style: italic;
  color: #dfc690;
}
.hero p {
  max-width: 390px;
  color: #d2d9d7;
  margin-bottom: 30px;
  font-size: 16px;
}
.hero .eyebrow {
  color: #dfc690;
}
.hero .button.primary {
  background: #d1b67b;
  color: #171d1c;
  border-color: #d1b67b;
}
.hero .text-link {
  color: #f0efe8;
}
.hero-credit {
  position: absolute;
  bottom: 15px;
  right: var(--space);
  font-size: 11px;
  color: #d3dad8;
}
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--space);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  max-width: 1600px;
  margin: auto;
}
.status-strip > span {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-symbol {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.section {
  padding: 88px var(--space);
  max-width: var(--max);
  margin: auto;
}
.section-heading {
  margin-bottom: 36px;
}
.section-heading p {
  color: var(--muted);
  margin-top: 16px;
  max-width: 580px;
}
.faction-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
  margin-top: 42px;
}
.faction-button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 20px 12px 24px;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 14px;
  font-size: 13px;
  transition: background 0.2s;
}
.faction-button:hover {
  background: var(--surface);
}
.faction-button[aria-pressed="true"] {
  background: var(--surface);
  border-bottom-color: var(--accent);
  color: var(--ink);
}
.crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 57px;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%);
  background: var(--faction, var(--accent));
  color: #101719;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
}
.crest.large {
  width: 100px;
  height: 120px;
  font-size: 64px;
}
.faction-story {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 42px;
}
.faction-story h3 {
  font-size: 42px;
  margin-bottom: 18px;
}
.faction-story p {
  color: var(--muted);
  margin-bottom: 18px;
}
.faction-aside {
  display: flex;
  align-items: center;
  gap: 30px;
  border-left: 1px solid var(--line);
  padding-left: 40px;
}
.fact-list {
  display: grid;
  gap: 20px;
}
.fact-list dt,
.definition dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.fact-list dd,
.definition dd {
  margin: 0;
  font-weight: 600;
}
.feature-section {
  background: var(--surface);
}
.feature-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 54px;
  align-items: center;
  max-width: var(--max);
  margin: auto;
  padding: 64px var(--space);
}
.feature-image {
  width: 100%;
  aspect-ratio: 1.4;
  object-fit: cover;
}
.feature-inner h2 {
  margin: 14px 0 22px;
}
.feature-inner p {
  color: var(--muted);
  margin-bottom: 22px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: steps;
}
.step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.step::before {
  counter-increment: steps;
  content: "0" counter(steps);
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: 25px;
}
.step h3 {
  margin-bottom: 16px;
}
.step p {
  color: var(--muted);
  font-size: 15px;
}
.community-home {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}
.community-home h2 {
  margin: 16px 0 22px;
}
.community-home p {
  color: var(--muted);
}
.home-topic {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.home-topic:first-child {
  padding-top: 0;
}
.home-topic strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
}
.home-topic span {
  font-size: 12px;
  color: var(--muted);
}
.home-topic:hover strong {
  color: var(--accent);
}
/* Shared footer and information pages. */
.footer {
  max-width: 1600px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 56px var(--space) 22px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  font-size: 13px;
}
.footer-brand p {
  margin: 20px 0 5px;
}
.footer h2 {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer > div:not(.footer-brand):not(.footer-bottom) > a {
  display: block;
  min-height: 38px;
  color: var(--muted);
}
.footer a:hover {
  color: var(--accent);
}
.footer-bottom {
  grid-column: 1/-1;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding-top: 28px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.page {
  max-width: var(--max);
  margin: auto;
  padding: 52px var(--space) 88px;
  min-height: 65vh;
}
.page-head {
  margin-bottom: 32px;
}
.page-head h1 {
  margin: 8px 0 16px;
}
.page-head p {
  color: var(--muted);
  max-width: 650px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.breadcrumb a {
  color: var(--accent);
}
.notice {
  padding: 16px 20px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0;
}
.notice strong {
  color: var(--ink);
}
.toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field label {
  font-size: 13px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 46px;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field textarea {
  min-height: 140px;
  resize: vertical;
}
.field small {
  color: var(--muted);
  font-size: 12px;
}
.search {
  flex: 1;
  min-width: 180px;
}
.checkbox-field {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  font-size: 13px;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.filter-select {
  min-width: 155px;
}
.result-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.empty {
  padding: 42px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  display: grid;
  gap: 18px;
  justify-items: center;
}
.empty h2 {
  font-size: 28px;
}
.empty p {
  color: var(--muted);
  font-size: 14px;
}
.error {
  color: var(--danger);
  font-size: 14px;
  min-height: 1.5em;
  white-space: pre-line;
}
.success {
  color: var(--success);
}
.loading {
  min-height: 220px;
  padding: 40px;
  background: var(--surface);
  color: var(--muted);
}
/* Forum: readable discussion list, no decorative nested cards. */
.forum-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 38px;
}
.side-nav {
  display: grid;
  align-content: start;
  gap: 5px;
}
.side-nav button {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  min-height: 46px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
}
.side-nav button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 3px 0 var(--accent);
}
.side-nav button:hover {
  color: var(--accent);
}
.side-note {
  font-size: 13px;
  margin: 26px 14px;
  color: var(--muted);
}
.topic-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--display);
  font-size: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}
.topic-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  display: block;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.topic-row:hover .topic-title {
  color: var(--accent);
}
.meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.reply-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}
.reply-count strong {
  display: block;
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}
.forum-top {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.forum-top .search {
  flex: 1;
}
.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.85;
}
.post {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.post-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.post .prose {
  max-width: 74ch;
}
.reply-form {
  display: grid;
  gap: 18px;
  margin-top: 36px;
  max-width: 780px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 42px;
}
.aside-surface {
  padding: 24px;
  background: var(--surface);
  align-self: start;
}
.aside-surface h2 {
  font-size: 26px;
  margin-bottom: 18px;
}
.aside-surface p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
/* Map: bounded, independently scrollable coordinate surface. */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
}
.map-viewport {
  height: 570px;
  overflow: auto;
  position: relative;
  border: 1px solid var(--line);
  background: #263336;
  overscroll-behavior: contain;
}
.map-world {
  position: relative;
  width: 980px;
  height: 620px;
  background:
    linear-gradient(rgba(24, 32, 32, 0.35), rgba(24, 32, 32, 0.35)),
    url("assets/war-table-1280.webp") center/cover;
  transform-origin: top left;
}
.map-world::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 21, 23, 0.15);
}
.map-point {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}
.map-point::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #e7e3d7;
  border-radius: 50%;
  background: var(--faction);
}
.map-point[aria-pressed="true"]::before {
  outline: 3px solid #dfc690;
  outline-offset: 5px;
}
.map-point span {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  background: #152023;
  padding: 1px 5px;
  font-size: 11px;
  white-space: nowrap;
  line-height: 1.5;
  border-radius: 2px;
}
.map-point.siege::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #ffd1a4;
  border-radius: 50%;
}
.map-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.map-controls .button {
  padding: 8px 15px;
}
.place-list {
  max-height: 280px;
  overflow: auto;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.place-list button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}
.place-list button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--surface-2);
}
.place-detail h2 {
  font-size: 32px;
  margin: 16px 0;
}
.place-detail dl {
  display: grid;
  gap: 14px;
}
.map-source {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
/* Wiki and ranking data use their own layout instead of the marketing grid. */
.wiki-banner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: center;
  background: var(--surface);
  padding: 26px 32px;
  margin-bottom: 28px;
}
.wiki-banner img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.wiki-banner h2 {
  font-size: 30px;
}
.wiki-banner p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
}
.tab-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tab-list button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.wiki-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 32px;
}
.branch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.branch .troop {
  flex: 1;
  min-width: 125px;
  max-width: 190px;
  min-height: 82px;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 13px;
}
.troop small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.troop[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--surface-2);
}
.branch-arrow {
  color: var(--accent);
}
.troop-detail {
  background: var(--surface);
  padding: 28px;
  align-self: start;
  position: sticky;
  top: 104px;
}
.troop-detail h2 {
  font-size: 34px;
  margin: 18px 0;
}
.troop-detail p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.stats {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
.stat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 13px;
}
.stat-row meter {
  grid-column: 1/-1;
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
.tag {
  font-size: 11px;
  display: inline-flex;
  padding: 3px 9px;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 2px;
  align-items: center;
}
.ranking-podium {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 24px;
  margin: 30px 0;
}
.podium-item {
  padding: 28px;
  background: var(--surface);
  border-top: 2px solid var(--line);
  display: flex;
  gap: 20px;
  align-items: center;
}
.podium-item:first-child {
  border-top-color: var(--accent);
}
.podium-number {
  font-family: var(--display);
  font-size: 48px;
  color: var(--accent);
}
.podium-item strong {
  font-size: 14px;
  display: block;
}
.podium-item small {
  font-size: 12px;
  color: var(--muted);
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  text-align: left;
  font-size: 14px;
}
caption {
  text-align: left;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: var(--surface);
}
td,
th {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td .profile-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 6px 0;
  text-align: left;
  font-weight: 600;
  min-height: 44px;
}
.profile-button:hover {
  color: var(--accent);
}
/* Clan profiles, actual application forms and release states. */
.clan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.clan-card {
  padding: 28px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  position: relative;
  border: 1px solid var(--line);
}
.clan-card h2 {
  font-size: 32px;
  margin: 8px 0 16px;
}
.clan-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.clan-card .clan-meta {
  grid-column: 1/-1;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.clan-card .text-link {
  grid-column: 1/-1;
  justify-self: start;
}
.clan-banner {
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 30px 0 42px;
}
.clan-banner h1 {
  margin: 8px 0 16px;
}
.clan-banner p {
  color: var(--muted);
  max-width: 550px;
}
.definition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 28px 0;
}
.application-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.download-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 54px;
  align-items: center;
  margin: 36px 0 60px;
}
.download-image {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  object-position: 75%;
}
.release-box {
  background: var(--surface);
  padding: 32px;
}
.release-box h2 {
  margin: 18px 0;
  font-size: 36px;
}
.release-box p {
  color: var(--muted);
  margin-bottom: 24px;
}
.checksum {
  font-size: 12px;
  word-break: break-all;
  padding: 14px;
  background: var(--bg);
  display: block;
}
.faq {
  max-width: 850px;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.faq summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  min-height: 44px;
}
.faq details p {
  color: var(--muted);
  padding: 12px 0;
  white-space: pre-line;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 32px;
}
.auth-panel {
  padding: 32px;
  background: var(--surface);
  max-width: 550px;
}
.auth-panel h2 {
  margin-bottom: 18px;
}
.form-stack {
  display: grid;
  gap: 20px;
}
.form-stack p {
  font-size: 14px;
  color: var(--muted);
}
.form-stack .actions {
  margin-top: 4px;
}
.application-row {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.application-row h3 {
  font-size: 26px;
  margin-bottom: 12px;
}
.application-row p {
  font-size: 14px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.recovery-code {
  font-family: monospace;
  font-size: 17px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
  margin: 22px 0;
}
.source-grid {
  display: grid;
  gap: 32px;
  max-width: 850px;
}
.source-grid h2 {
  font-size: 30px;
  margin-bottom: 14px;
}
.source-grid p {
  color: var(--muted);
}
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100svh - 40px);
  overflow: auto;
  z-index: var(--z-dialog);
}
dialog::backdrop {
  background: rgba(5, 14, 17, 0.8);
}
dialog h2 {
  font-size: 34px;
  padding-right: 30px;
  margin-bottom: 22px;
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 24px;
  padding: 4px 12px;
}
.dialog-lede {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: arrive 0.7s ease both;
  }
  .faction-story {
    animation: arrive 0.3s ease;
  }
  .button:hover {
    transform: translateY(-1px);
  }
  @keyframes arrive {
    from {
      opacity: 0.2;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 1250px) {
  .header {
    gap: 20px;
  }
  nav {
    gap: 16px;
  }
  .header-actions {
    gap: 12px;
  }
  .theme-toggle {
    font-size: 11px;
  }
  .brand > span {
    font-size: 20px;
  }
}
@media (max-width: 1120px) {
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .header-actions {
    margin-left: 0;
  }
  .header nav {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 20px var(--space);
    border-bottom: 1px solid var(--line);
  }
  .header nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
  }
  .header nav a {
    padding: 10px 0;
    font-size: 15px;
  }
  .mobile-account {
    display: flex;
  }
  .account-link {
    display: none;
  }
  .header {
    gap: 16px;
  }
  .hero {
    min-height: 650px;
  }
  .hero h1 {
    font-size: 70px;
  }
  .hero::before {
    right: 20%;
  }
  .forum-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
  }
  .podium-item {
    padding: 20px;
    gap: 10px;
  }
  .podium-number {
    font-size: 36px;
  }
  .map-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .map-viewport {
    height: 520px;
  }
  .feature-inner {
    gap: 32px;
  }
  .faction-story {
    gap: 32px;
  }
}
@media (max-width: 767px) {
  :root {
    --space: 24px;
  }
  .header {
    height: 68px;
    padding: 0 20px;
    gap: 10px;
  }
  .brand {
    gap: 8px;
  }
  .brand img {
    width: 29px;
    height: 35px;
  }
  .brand > span {
    font-size: 17px;
    letter-spacing: 0.08em;
  }
  .brand small {
    font-size: 8px;
  }
  .header nav {
    top: 67px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-download {
    display: none;
  }
  .theme-toggle {
    font-size: 0;
    width: 40px;
    padding: 8px;
  }
  .theme-toggle::after {
    content: "◐";
    font-size: 20px;
  }
  .menu-toggle {
    font-size: 12px;
    padding: 9px 12px;
  }
  .hero {
    min-height: 660px;
    align-items: end;
  }
  .hero-art {
    object-position: 70% center;
  }
  .hero::before {
    inset: 15% 0 0;
    background: linear-gradient(
      0deg,
      rgba(10, 18, 21, 0.98),
      rgba(10, 18, 21, 0.82) 40%,
      transparent
    );
  }
  .hero-copy {
    padding: 200px var(--space) 60px;
  }
  .hero h1 {
    font-size: 58px;
    margin: 18px 0;
  }
  .hero p {
    font-size: 15px;
    max-width: 32ch;
  }
  .hero .eyebrow {
    font-size: 10px;
    letter-spacing: 0.13em;
  }
  .hero-credit {
    font-size: 10px;
    right: 24px;
  }
  .status-strip {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    padding: 18px 24px;
  }
  .section {
    padding: 58px 24px;
  }
  .section-heading {
    margin-bottom: 24px;
  }
  .faction-selector {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 26px;
  }
  .faction-button {
    padding: 18px 8px;
    font-size: 12px;
    gap: 10px;
  }
  .faction-story {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }
  .faction-story h3 {
    font-size: 36px;
  }
  .faction-aside {
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .feature-inner {
    grid-template-columns: 1fr;
    padding: 32px 24px 48px;
  }
  .feature-image {
    aspect-ratio: 1.55;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .step {
    padding-top: 18px;
  }
  .step::before {
    margin-bottom: 15px;
  }
  .community-home {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer {
    grid-template-columns: 1fr 1fr;
    padding: 40px 24px 24px;
    gap: 32px 20px;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }
  .page {
    padding: 32px 24px 58px;
  }
  .page-head {
    margin-bottom: 24px;
  }
  .page-head h1 {
    font-size: 42px;
    overflow-wrap: anywhere;
  }
  .toolbar {
    gap: 12px;
  }
  .filter-select {
    min-width: 0;
    flex: 1;
  }
  .forum-layout {
    grid-template-columns: 1fr;
  }
  .side-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .side-nav button {
    font-size: 12px;
    padding: 10px;
  }
  .side-note {
    display: none;
  }
  .forum-top {
    align-items: end;
    gap: 10px;
  }
  .forum-top > .button {
    font-size: 12px;
    padding: 12px;
  }
  .topic-row {
    grid-template-columns: 34px minmax(0, 1fr) 35px;
    gap: 12px;
    padding: 20px 0;
  }
  .avatar {
    width: 34px;
    height: 34px;
    font-size: 21px;
  }
  .topic-title {
    font-size: 14px;
  }
  .meta {
    font-size: 11px;
    gap: 6px 12px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .map-layout {
    grid-template-columns: 1fr;
  }
  .map-viewport {
    height: 440px;
  }
  .map-layout > aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .place-list {
    max-height: 270px;
    margin-top: 0;
  }
  .map-controls .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .wiki-banner {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .wiki-banner img {
    display: none;
  }
  .wiki-layout {
    grid-template-columns: 1fr;
  }
  .troop-detail {
    position: static;
    grid-row: 1;
    padding: 24px;
  }
  .troop-detail h2 {
    font-size: 29px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .branch .troop {
    min-width: 110px;
    font-size: 12px;
  }
  .branch {
    gap: 8px;
  }
  .tab-list {
    gap: 6px;
  }
  .tab-list .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .ranking-podium {
    gap: 10px;
    grid-template-columns: 1fr;
  }
  .podium-item {
    padding: 16px 22px;
  }
  .podium-number {
    min-width: 32px;
  }
  .podium-item strong {
    font-size: 14px;
  }
  .clan-grid {
    grid-template-columns: 1fr;
  }
  .clan-card {
    padding: 24px;
    gap: 16px;
  }
  .clan-banner {
    gap: 20px;
    align-items: start;
  }
  .clan-banner .crest.large {
    width: 65px;
    height: 80px;
    font-size: 45px;
  }
  .clan-banner h1 {
    font-size: 38px;
  }
  .clan-banner p {
    font-size: 14px;
  }
  .download-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 24px 0 38px;
  }
  .download-image {
    max-height: 290px;
    object-position: 70% 40%;
  }
  .release-box {
    padding: 24px;
  }
  .release-box h2 {
    font-size: 32px;
  }
  .account-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .auth-panel {
    padding: 24px;
  }
  .notice {
    padding: 14px 16px;
    font-size: 12px;
  }
  .definition {
    gap: 20px;
  }
  .page-head > .actions {
    margin-top: 22px;
  }
  dialog {
    padding: 30px 22px;
  }
  .form-stack .actions {
    align-items: stretch;
  }
  .form-stack .actions > .button {
    flex: 1;
  }
}
@media (max-width: 359px) {
  :root {
    --space: 16px;
  }
  .header {
    padding: 0 12px;
    gap: 6px;
  }
  .hero-copy,
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero {
    min-height: 620px;
  }
  .hero h1 {
    font-size: 48px;
  }
  .hero .actions {
    gap: 8px;
  }
  .hero .button {
    padding: 12px 16px;
  }
  .hero .text-link {
    font-size: 13px;
  }
  .clan-card {
    padding: 18px;
  }
  .forum-top {
    flex-wrap: wrap;
  }
  .forum-top .search {
    flex-basis: 100%;
  }
  .map-layout > aside {
    grid-template-columns: 1fr;
  }
  .toolbar > * {
    max-width: 100%;
  }
}
/* Grid children must be allowed to shrink below an atlas/table's intrinsic width. */
.map-layout > *,
.wiki-layout > *,
.forum-layout > *,
.detail-layout > *,
.account-grid > * {
  min-width: 0;
}
.map-viewport {
  width: 100%;
  min-width: 0;
}
#map-size {
  overflow: hidden;
}
.meta,
.tag,
.field small,
.map-source,
.fact-list dt,
.definition dt,
.footer-bottom {
  font-size: 13px;
}
.troop small {
  font-size: 12px;
}
.page-head h1:focus,
.hero h1:focus {
  outline: none;
}
.footer > div:not(.footer-brand):not(.footer-bottom) > a {
  min-height: 44px;
}
/* Shared server/client context remains visible after progressive enhancement. */
.page-context { border-top: 1px solid var(--line); margin-top: 48px; }
.seo-context > p { max-width: 76ch; line-height: 1.75; margin-bottom: 32px; white-space: pre-line; }
.seo-context nav { margin-top: 32px; }
.seo-context nav ul { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-left: 20px; }
.seo-context nav a { text-decoration: underline; text-underline-offset: 4px; }
