:root {
  --forest: #18332a;
  --forest-deep: #10251f;
  --pine: #235241;
  --gold: #f0ce82;
  --brass: #89672f;
  --wine: #842e3e;
  --paper: #f5f5ed;
  --mist: #e7ecdf;
  --ink: #24362c;
  --muted: #526256;
  --rule: #cdd6c7;
  --white: #fffef5;
  --display: Georgia, "Palatino Linotype", serif;
  --text: Candara, Calibri, "Trebuchet MS", sans-serif;
  --width: 1120px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 20px; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font: 1rem/1.5 var(--text);
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: anywhere;
}
main { flex: 1; }
h1, h2, p, dl, dd, ul { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.15; }
h1 { font-size: 3rem; }
h2 { font-size: 1.6rem; }
a { color: var(--pine); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
.wrap { width: min(var(--width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.muted { color: var(--muted); }
.reading-width { max-width: 780px; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; pointer-events: none; }
.skip-link { position: absolute; z-index: 2; top: 0; left: var(--gutter); padding: .5rem 1rem; transform: translateY(-120%); background: var(--paper); }
.skip-link:focus { transform: none; }

.page, .preview-banner { display: none; }
[data-page="client"] #view-client, [data-page="forum"] #view-forum,
[data-page="faq"] #view-faq, [data-page="recommend"] #view-recommend,
[data-page="login"] #view-login, [data-page="register"] #view-register,
[data-page="history"] #view-history, [data-page="account"] #view-account,
[data-page="agreement"] #view-agreement, [data-mode="preview"] .preview-banner { display: block; }
[data-download="ready"] .download-pending { display: none; }
[data-download="ready"] .download-ready { display: inline-flex; }

.site-header { color: var(--white); background: var(--forest-deep); border-bottom: 1px solid #6d623d; }
.header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(112px, auto); gap: 2rem; align-items: center; min-height: 66px; }
.wordmark { color: var(--gold); font: 600 1.45rem/1 var(--display); text-decoration: none; }
.top-nav { display: flex; flex-wrap: wrap; align-items: stretch; align-self: stretch; gap: .2rem; }
.top-nav a { display: grid; place-items: center; min-height: 42px; padding: .55rem .75rem; border-block: 2px solid transparent; color: #dde8dc; font-size: .95rem; text-align: center; text-decoration: none; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--gold); background: #1b362c; }
.top-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.account { justify-self: end; }
.account-active { display: flex; align-items: center; gap: .55rem; }
.preview-banner { padding: .3rem 0; background: #e6e9d9; color: var(--forest); border-bottom: 1px solid var(--rule); font-size: .82rem; font-weight: 700; }
.preview-banner span { margin-left: .7rem; font-weight: 400; }

.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: .5rem .95rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.button-header, .icon-button { min-height: 40px; color: var(--gold); background: transparent; border-color: #766947; }
.icon-button { flex: none; width: 40px; padding: 0; }
.button-header:hover, .button-header[aria-current="page"], .icon-button:hover { background: var(--forest); border-color: var(--gold); }
.button-gold { color: #202817; background: var(--gold); border-color: var(--gold); }
.button-gold:hover { background: #fce3aa; }
.button-primary { color: var(--white); background: var(--pine); border-color: var(--pine); }
.button-primary:hover { background: var(--forest); }
.button-secondary { color: var(--pine); background: transparent; border-color: #a4b49d; }
.button-secondary:hover { background: var(--mist); border-color: var(--pine); }
.button:disabled, .icon-button:disabled { opacity: .6; cursor: not-allowed; }
.download-ready { display: none; }

.hero { position: relative; display: grid; align-items: center; width: 100%; aspect-ratio: 1541 / 626; min-height: 425px; overflow: hidden; isolation: isolate; background: var(--forest); color: var(--white); }
.hero-art { position: absolute; z-index: -2; width: 100%; height: 100%; inset: 0; object-fit: cover; }
.hero::before { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #0e251edb, #132c238c 37%, #1d39271a 72%); }
.hero-content { padding-block: 4.25rem; animation: enter .45s ease-out both; }
.eyebrow { font-size: .82rem; font-weight: 700; text-transform: uppercase; color: var(--wine); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { margin-top: .25rem; color: var(--white); font-size: 6.15rem; line-height: 1.02; }
.hero-subtitle { margin-top: .5rem; color: #e6e9d8; font: 1.48rem/1.3 var(--display); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-actions { margin-top: 1.5rem; }
@keyframes enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.world-strip { border-block: 1px solid var(--rule); background: var(--mist); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics > div { min-width: 0; padding: 1rem 1.5rem; border-inline-start: 1px solid var(--rule); }
.metrics > div:last-child { border-inline-end: 1px solid var(--rule); }
.metrics dt { font-size: .9rem; color: var(--muted); }
.metrics dd { color: var(--forest); font: 1.9rem/1.15 var(--display); font-variant-numeric: tabular-nums; }
.metrics dd[data-state="offline"] { color: var(--wine); font-size: 1.2rem; line-height: 1.8; }
.signal { display: inline-block; width: 7px; height: 7px; margin-right: .45rem; border-radius: 50%; vertical-align: .12em; background: var(--muted); }
.signal[data-state="online"] { background: #478364; }
.signal[data-state="offline"] { background: var(--wine); }
.news-band { border-bottom: 1px solid var(--rule); padding-block: 1.6rem 1.8rem; }
.published-text:not(:empty) + .content-empty { display: none; }
.page-heading > .section-bar { margin-bottom: 0; }
.world-content { padding-block: 2.65rem 3.3rem; }
.account-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.25rem; }
.world-content h2, .account-layout h2 { margin-bottom: 1rem; }
.download-module { padding-top: 1rem; border-top: 1px solid var(--rule); }
.download-platform { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.download-platform .icon { width: 28px; height: 28px; color: var(--brass); }
.ranking-band { background: #edf0e5; border-top: 1px solid var(--rule); }
.ranking-content { padding-block: 2.5rem 3.5rem; }
.ranking-content h2 { margin: .25rem 0 1.1rem; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; text-align: left; }
th, td { padding: .7rem .65rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-size: .9rem; font-weight: 700; background: #e4eadc; }
.numeric { width: 8rem; text-align: right; }
#world-table th:nth-child(2) { width: 5.5rem; }
#ranking-table th:first-child { width: 3rem; }
#ranking-table .numeric { width: 5.5rem; }
#ranking-table td:first-child { color: var(--brass); }

.page-heading { background: repeating-linear-gradient(120deg, transparent 0 23px, #cfd8c954 24px, transparent 25px 47px), #e7ecdf; border-bottom: 1px solid var(--rule); }
.page-heading > .wrap { padding-block: 2.8rem; }
.page-heading h1 { margin-top: .3rem; }
.page-body { padding-block: 2rem 4rem; }
.section-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.section-bar > * { min-width: 0; }
.topic-list { padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.topic-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem 1rem; align-items: center; padding: .85rem .65rem; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.topic-list a:hover { background: var(--mist); }
.topic-list strong { display: block; color: var(--pine); font-size: 1.12rem; }
.topic-meta { display: block; font-size: .9rem; color: var(--muted); }
.topic-count { min-width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.back-link { display: inline-block; margin-bottom: 1rem; }
.forum-path { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .55rem; margin-bottom: 1rem; }
.forum-path a + a::before { content: "/"; display: inline-block; margin-right: .55rem; color: var(--muted); }
.section-description { margin-bottom: 1rem; white-space: pre-line; }
.forum-restriction { margin-block: .5rem 1rem; }
.forum-tool { width: 44px; min-height: 44px; padding: 0; }
.forum-tool.danger { color: var(--wine); }
.topic-tools .editor { margin-top: .85rem; }
.message { padding-block: 1rem; border-block-start: 1px solid var(--rule); }
.message-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .55rem; color: var(--muted); font-size: .9rem; }
.message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.message h2 { margin: .2rem 0 .7rem; }
.message-text, .legal-text { white-space: pre-wrap; }
.reactions { display: flex; gap: .5rem; margin-top: .8rem; }
.reaction-button { min-width: 4.25rem; min-height: 40px; padding: .35rem .65rem; font-variant-numeric: tabular-nums; }
.reaction-button[aria-pressed="true"] { background: var(--mist); border-color: var(--pine); }
.reaction-button[data-vote="-1"][aria-pressed="true"] { color: var(--wine); border-color: var(--wine); }
.reaction-button:disabled { opacity: 1; color: var(--muted); background: transparent; border-color: var(--rule); cursor: default; }
.reactions[aria-busy="true"] .reaction-button { cursor: progress; }
.reply-heading { margin: 1.7rem 0 .75rem; }
#no-replies { margin-bottom: 1rem; }
.more-button { margin-top: .85rem; }
#reply-signin { margin-top: .85rem; }

.faq-item { border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; min-height: 3.25rem; gap: 1rem; padding: .7rem .35rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--pine); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 0 .35rem 1rem; color: var(--muted); }
.auth-form, .editor { display: grid; gap: .9rem; width: min(100%, 460px); align-content: start; }
.editor { width: min(100%, 700px); margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--rule); border-left: 3px solid var(--brass); border-radius: 4px; background: #fbfcf6; }
.reply-form { margin-top: 1.1rem; }
.auth-form label, .editor label { font-weight: 700; }
.auth-form .button, .editor .button { justify-self: start; }
input:not([type="checkbox"]), textarea, select { display: block; width: 100%; min-width: 0; margin-top: .3rem; padding: .55rem .7rem; border: 1px solid #a9b8a7; border-radius: 4px; background: #fbfcf6; color: var(--ink); font-weight: 400; }
input:not([type="checkbox"]), select { min-height: 44px; }
textarea { resize: vertical; }
.consent { display: grid; grid-template-columns: 1.15rem minmax(0, 1fr); align-items: start; gap: .65rem; }
.consent input { width: 1.15rem; height: 1.15rem; margin: .18rem 0 0; accent-color: var(--pine); }
.consent a { display: inline-block; font-size: .9rem; }
.field-hint { margin-top: -.65rem; }
.form-switch { padding-top: .3rem; color: var(--muted); }
form[aria-busy="true"] button[type="submit"] { opacity: .7; cursor: progress; }
.status { color: var(--muted); }
.status:not(:empty) { margin-block: .3rem .7rem; }
.wrap.status:not(:empty) { margin-inline: auto; }
.status:empty { display: none; }
.status[data-state="error"] { color: var(--wine); }
.status[data-state="success"] { color: var(--pine); }
.legal-text { max-width: 70ch; }

.site-footer { background: var(--forest-deep); border-top: 1px solid #72623b; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.4rem; padding-block: 1.25rem; }
.footer-inner a { color: #d8e1d6; font-size: .9rem; }
.footer-inner .footer-brand { margin-right: auto; color: var(--gold); font: 1.2rem/1.2 var(--display); text-decoration: none; }

@media (min-width: 1100px) {
  .hero { max-height: calc(100svh - 9rem); }
  .hero-art { object-fit: contain; }
}

@media (max-width: 880px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem; padding-top: .55rem; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; margin-top: .25rem; }
  .hero h1 { font-size: 5.2rem; }
  .account-layout { gap: 2rem; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.4rem; }
  .top-nav { gap: 0; }
  .top-nav a { flex: 1 0 auto; padding: .35rem .55rem; font-size: .87rem; line-height: 1.15; }
  .account .button-header { padding-inline: .6rem; font-size: .9rem; }
  .hero { min-height: 315px; }
  .hero-content { padding-block: 2.25rem; }
  .hero::before { background: linear-gradient(90deg, #10271edb, #183227a6 67%, #1d39275c); }
  .hero h1 { font-size: 3.75rem; }
  .hero-subtitle { font-size: 1.2rem; }
  .hero-actions { margin-top: 1.2rem; }
  .metrics > div { padding: .75rem .55rem; }
  .metrics dt { font-size: .82rem; }
  .metrics dd { font-size: 1.65rem; }
  .world-content { padding-block: 1.8rem 2.25rem; }
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .page-heading > .wrap, .ranking-content { padding-block: 1.65rem; }
  .page-body { padding-block: 1.25rem 2.5rem; }
  .numeric { width: 6.3rem; }
  #ranking-table th:first-child { width: 1.75rem; }
  #ranking-table .numeric { width: 4rem; }
  th, td { padding: .55rem .3rem; }
  .footer-inner .footer-brand { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content { animation: none; }
}