:root {
  --bg: #0b1218; --panel: #151f27; --panel-2: #1b2932; --line: #34424a;
  --text: #edf0ef; --muted: #aab5ba; --gold: #f18a34; --gold-2: #ffbb6b;
  --ok: #79c7a2; --warn: #f1a44d; --bad: #e4776f;
  --bellato: #e7b667; --cora: #bd9ce2; --accretia: #83aed2;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); font: 16px/1.6 system-ui, "Segoe UI", Roboto, sans-serif;
       min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--gold-2); }
.preview-notice { padding: .55rem 1rem; text-align: center; color: #fff1df;
                  background: #40291b; border-bottom: 1px solid var(--gold); font-size: .9rem; }
.preview-notice strong { color: var(--gold-2); text-transform: uppercase;
                         letter-spacing: .08em; margin-right: .6rem; }
.preview-detail { max-width: 42rem; margin: 1.5rem auto; padding: 1rem 1.2rem;
                  background: var(--panel); border-left: 3px solid var(--gold); }
header.top { display: flex; align-items: center; gap: 2rem; padding: .8rem 2rem;
             background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { color: var(--gold); font-weight: 800; font-size: 1.25rem; text-decoration: none;
         letter-spacing: .03em; }
nav.main { display: flex; gap: 1.4rem; flex: 1; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--gold-2); }
nav a[aria-current="page"] { border-bottom-color: var(--gold); }
nav.account { display: flex; gap: 1rem; align-items: center; }
nav.account button { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0; }
nav.account button:hover { color: var(--gold-2); }
main { flex: 1; width: 100%; max-width: 60rem; margin: 0 auto; padding: 2rem 1.5rem; }
footer { color: var(--muted); font-size: .85rem; text-align: center; padding: 1.5rem;
         border-top: 1px solid var(--line); }
h1 { margin-top: 0; }
.hint { color: var(--muted); }
.hero { text-align: center; padding: 3rem 1rem; margin-bottom: 2rem; border-radius: 12px;
        background: radial-gradient(ellipse at top, #2a2317 0%, var(--panel) 70%);
        border: 1px solid var(--line); }
.hero h1 { font-size: 2.6rem; color: var(--gold); margin-bottom: .2rem; }
.tagline { color: var(--muted); margin-top: 0; font-size: 1.15rem; }
.button, button.primary { display: inline-block; background: var(--gold); color: #15120b;
          padding: .7rem 1.4rem; border-radius: 8px; text-decoration: none; border: 0;
          font: inherit; font-weight: 700; cursor: pointer; }
.button:hover, button.primary:hover { background: var(--gold-2); }
button.primary[disabled] { opacity: .6; cursor: wait; }
.server-status { margin-bottom: 2rem; }
.state { font-size: 1.3rem; font-weight: 700; margin: 0 0 1rem; }
.state.online { color: var(--ok); }
.state.closed { color: var(--warn); }
.state.offline { color: var(--bad); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.cards[hidden] { display: none; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.card h3 { margin: 0; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card .value { font-size: 2.1rem; font-weight: 800; }
.card.bellato { border-top: 3px solid var(--bellato); }
.card.cora { border-top: 3px solid var(--cora); }
.card.accretia { border-top: 3px solid var(--accretia); }
.news article { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
                padding: 1rem 1.4rem; margin-bottom: 1rem; }
.news article h3 { margin: 0; }
.news time { color: var(--muted); font-size: .85rem; }
.steps li { margin-bottom: .8rem; }
.prose { max-width: 45rem; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4rem .8rem; }
.box { display: grid; gap: .45rem; max-width: 24rem; background: var(--panel);
       border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem; margin-bottom: 1rem; }
.box[hidden] { display: none; }
.box label { font-weight: 600; margin-top: .4rem; }
.box input { padding: .6rem .7rem; border-radius: 6px; border: 1px solid var(--line);
             background: var(--bg); color: var(--text); font: inherit; }
.box input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.box button { margin-top: .8rem; }
.field-hint { color: var(--muted); font-size: .85rem; margin: 0; }
.flash { padding: .7rem 1rem; border-radius: 8px; background: var(--panel);
         border-left: 4px solid var(--gold); margin: 0 0 1rem; }
.flash[hidden] { display: none; }
.flash.error { border-left-color: var(--bad); }
.flash.ok { border-left-color: var(--ok); }
table.details { border-collapse: collapse; width: 100%; background: var(--panel);
                border: 1px solid var(--line); border-radius: 10px; margin-bottom: 1.5rem; }
table.details[hidden] { display: none; }
table.details th, table.details td { text-align: left; padding: .6rem 1rem;
                                     border-bottom: 1px solid var(--line); }
table.details th { color: var(--muted); font-weight: 500; width: 40%; }
table.details.list th { width: auto; }
table.details tr.warn td { color: var(--bad); font-weight: 700; }
.faction.bellato { color: var(--bellato); }
.faction.cora { color: var(--cora); }
.faction.accretia { color: var(--accretia); }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: var(--panel); color: var(--text); border: 1px solid var(--line);
               border-radius: 8px; padding: .5rem 1rem; font: inherit; cursor: pointer; }
.tabs button:hover { border-color: var(--gold); }
.tabs button[aria-selected="true"] { background: var(--gold); color: #15120b; border-color: var(--gold);
                                     font-weight: 700; }

/* Reforged identity: warm metal over the cool machinery of the three races. */
html { scroll-behavior: smooth;
  background-color: var(--bg);
  background-image: linear-gradient(90deg, #071016a6, #0710169c 48%, #071016a6),
                    linear-gradient(0deg, #071016b0, #0710162c 70%),
                    url("/static/img/rf-fleet-bg.jpg");
  background-position: center, center, center 34%;
  background-size: cover;
  background-attachment: fixed;
}
body {
  background: radial-gradient(ellipse 85rem 38rem at 50% -12rem, #23333d66 0%, transparent 72%);
}
::selection { color: #0b1218; background: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.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; }
header.top {
  position: relative; z-index: 2; gap: clamp(1rem, 3vw, 3rem);
  padding: .85rem clamp(1rem, 3vw, 3rem);
  background: rgba(12, 20, 26, .94); border-bottom-color: #3c4b52;
  box-shadow: 0 12px 32px #0003;
}
header.top::after { content: ""; position: absolute; left: 0; bottom: -1px;
  width: clamp(6rem, 22vw, 18rem); height: 2px;
  background: linear-gradient(90deg, #df6328, #ffc266, transparent); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); line-height: 1; }
.brand img { flex: none; width: 42px; height: 42px; }
.brand-words { display: grid; gap: .2rem; white-space: nowrap; }
.brand-main { font: 500 .8rem/1 "Arial Narrow", Bahnschrift, sans-serif; letter-spacing: .24em; }
.brand-sub { font: 600 .9rem/1 "Arial Narrow", Bahnschrift, sans-serif; letter-spacing: .21em; }
.brand-sub b { color: var(--gold); font-weight: 800; }
nav.main { gap: clamp(.7rem, 1.8vw, 1.7rem); }
nav a { font-size: .88rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
nav a[aria-current="page"] { color: var(--gold-2); }
main { max-width: 76rem; padding: clamp(1.4rem, 3.5vw, 3rem) clamp(1rem, 3vw, 2rem) 5rem; }
main > h1, .prose h1 { font: 500 clamp(2.1rem, 4vw, 3.5rem)/1.1 "Arial Narrow", Bahnschrift, sans-serif;
  text-transform: uppercase; letter-spacing: .065em; }
h2 { font: 500 clamp(1.7rem, 3vw, 2.5rem)/1.15 "Arial Narrow", Bahnschrift, sans-serif;
  letter-spacing: .04em; }
footer { background: #0a1116; }
.footer-brand { color: var(--text); font-weight: 700; }
.eyebrow, .quick-number { color: var(--gold-2); font: 700 .76rem/1.4 "Arial Narrow", Bahnschrift, sans-serif;
  letter-spacing: .28em; text-transform: uppercase; }
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 5vw, 5rem) 1rem 3rem;
  min-height: 38rem; display: grid; place-items: center; border-radius: 2px;
  background: radial-gradient(ellipse 38rem 24rem at 50% 48%, #2a3942 0%, transparent 82%),
              linear-gradient(135deg, #0c141b, #14212a 50%, #0b141b);
  border: 1px solid #46515a; box-shadow: inset 0 0 0 8px #0c141b, 0 30px 70px #0005; }
.hero::before { content: ""; position: absolute; inset: 1rem;
  border: 1px solid #65737a55; pointer-events: none;
  clip-path: polygon(0 0, 12% 0, 12% 1px, 88% 1px, 88% 0, 100% 0, 100% 100%, 0 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 5px;
  background: linear-gradient(90deg, transparent, #d95d25 28%, #ffb155 50%, #d95d25 72%, transparent); }
.hero-inner { position: relative; z-index: 1; width: min(100%, 55rem); }
.hero .eyebrow { margin: 0 0 1.5rem; }
.hero-logo { display: block; width: min(100%, 37rem); height: auto; margin: -.25rem auto 0;
  filter: drop-shadow(0 13px 23px #0009); }
.tagline { color: #d5dcdd; font-size: clamp(.95rem, 1.6vw, 1.15rem);
  letter-spacing: .11em; text-transform: uppercase; margin: 1rem 0 2rem; }
.hero-actions { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.button, button.primary { border-radius: 2px; background: linear-gradient(105deg, #e76c2b, #f5a04a);
  color: #10151a; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
  box-shadow: 0 5px 0 #813b1f; transition: transform .16s, box-shadow .16s, background .16s; }
.button:hover, button.primary:hover { background: linear-gradient(105deg, #f28a3d, #ffc073);
  transform: translateY(-2px); box-shadow: 0 7px 0 #813b1f; }
.button:active, button.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #813b1f; }
.button-ghost { background: #14222a; border: 1px solid #65737a; color: var(--text); box-shadow: none; }
.button-ghost:hover { background: #20333d; box-shadow: none; }
.server-status { margin: 2.5rem 0; }
.server-status h2, .section-heading h2 { margin: .15rem 0 1.2rem; }
.state { font-family: "Arial Narrow", Bahnschrift, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.card, .news article { border-radius: 2px; background: linear-gradient(145deg, #1b2932, #121d24);
  border-color: #40505a; box-shadow: inset 0 1px #ffffff0b, 0 12px 25px #0002; }
.card { position: relative; padding: 1.2rem 1.4rem; }
.card::after { content: ""; position: absolute; right: 0; bottom: 0;
  border-style: solid; border-width: 0 0 12px 12px; border-color: transparent transparent var(--bg) transparent; }
.card h3 { letter-spacing: .17em; }
.card .value { font-family: "Arial Narrow", Bahnschrift, sans-serif; font-weight: 600; }
.monthly-spotlight { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  margin: 2.5rem 0 0; }
.monthly-tile { position: relative; min-width: 0; min-height: 19rem; overflow: hidden;
  display: flex; flex-direction: column; padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid #52616a; background: #111d24; box-shadow: inset 0 1px #ffffff12, 0 18px 35px #0004; }
.monthly-tile::after { content: ""; position: absolute; inset: auto 0 0; height: 3px;
  background: linear-gradient(90deg, #da6328, #ffc170, transparent); }
.monthly-champion { background: linear-gradient(95deg, #0b151cf2, #13232acc),
  url("/static/img/rf-fleet-bg.jpg") center / cover; }
.monthly-reward { background: radial-gradient(circle at 82% 54%, #6b3a1e66, transparent 37%),
  linear-gradient(130deg, #15212a, #101b23); }
.monthly-tile-top { display: flex; justify-content: space-between; gap: .8rem; align-items: start; }
.monthly-tile-number { color: #dcb381; font: 500 1.5rem/1 "Arial Narrow", Bahnschrift, sans-serif; }
.monthly-tile-body { margin: auto 0 1rem; }
.monthly-tile-kicker { margin: 0 0 .35rem; color: #d9b98c; font-size: .83rem;
  text-transform: uppercase; letter-spacing: .14em; }
.monthly-tile h2 { margin: 0 0 .65rem; font: 500 clamp(2rem, 3.5vw, 3rem)/1 "Arial Narrow", Bahnschrift, sans-serif;
  text-transform: uppercase; letter-spacing: .035em; }
.monthly-tile-body > p:last-child, .monthly-reward-note { max-width: 24rem; margin: 0;
  color: #c6d0d2; font-size: .94rem; }
.monthly-tile-link { align-self: start; color: var(--gold-2); font-weight: 700;
  text-decoration: none; border-bottom: 1px solid #eaa04a75; }
.monthly-tile-link:hover { color: #ffce90; border-bottom-color: currentColor; }
.monthly-reward-main { display: flex; gap: 1.35rem; align-items: center; flex: 1; }
.monthly-reward-main strong { display: inline-block; color: #ffe0ac; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .16em; }
.monthly-charm-mark { position: relative; flex: none; display: grid; place-items: center;
  width: 5.3rem; height: 5.3rem; border: 2px solid #eaaa5e; border-radius: 50%;
  background: radial-gradient(circle, #e88b3866 0 24%, #3e342e 25% 49%, #182730 50%);
  box-shadow: inset 0 0 0 6px #f9bf7130, 0 0 28px #db743950; }
.monthly-charm-mark::before, .monthly-charm-mark::after { content: ""; position: absolute;
  width: 1.5rem; height: 2px; background: #f3b56d; transform: skewY(-24deg); }
.monthly-charm-mark::before { left: -1.15rem; top: 38%; }
.monthly-charm-mark::after { right: -1.15rem; bottom: 35%; }
.monthly-charm-mark span { color: #fff2d7; font: 700 2.7rem/1 Georgia, serif; text-shadow: 0 0 14px #ffb655; }
.monthly-reward-note { padding-top: .8rem; border-top: 1px solid #e9a96a3d; }
.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 3rem 0 4rem; }
.quick-link { position: relative; display: grid; align-content: start; gap: .9rem; min-height: 12rem;
  padding: 1.4rem 1.5rem; background: #111d24; border: 1px solid #3b4b54;
  color: var(--muted); text-decoration: none; transition: border-color .2s, transform .2s; }
.quick-link:hover { border-color: var(--gold); transform: translateY(-3px); }
.quick-link strong { font: 500 1.65rem/1.1 "Arial Narrow", Bahnschrift, sans-serif;
  color: var(--text); text-transform: uppercase; letter-spacing: .03em; }
.quick-link > span:nth-child(3) { max-width: 15rem; font-size: .9rem; }
.quick-arrow { position: absolute; right: 1.3rem; top: 1.2rem; color: var(--gold-2); font-size: 1.25rem; }
.news { max-width: 60rem; }
.news article { padding: 1.4rem 1.7rem; }
.news article h3 { font-size: 1.15rem; }
.news article + article { margin-top: .85rem; }
.hero {
  background-image: linear-gradient(90deg, #091219e8 0%, #0b151bc9 47%, #0b151ba8 100%),
                    radial-gradient(ellipse at 50% 50%, #14242b00 0%, #071016d9 100%),
                    url("/static/img/rf-warrior-bg.jpg");
  background-size: cover; background-position: center, center, center 38%;
}
.auth-stage { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(21rem, .95fr);
  min-height: 39rem; border: 1px solid #53616a; background: #111d25;
  box-shadow: 0 28px 70px #0006; }
.auth-art { display: flex; flex-direction: column; justify-content: end; gap: .7rem;
  min-height: 32rem; padding: clamp(1.5rem, 3vw, 3rem); border-right: 1px solid #53616a;
  background: linear-gradient(0deg, #08131bf5 0%, #0a1928ae 45%, #06121b23 100%),
              url("/static/img/rf-ether-bg.jpg") center / cover;
  color: var(--text); }
.auth-art strong { max-width: 20rem; font: 500 clamp(2rem, 3.5vw, 3.4rem)/1.03 "Arial Narrow", Bahnschrift, sans-serif;
  text-transform: uppercase; letter-spacing: .035em; text-shadow: 0 3px 16px #071016; }
.auth-content { min-width: 0; padding: clamp(1.6rem, 4vw, 3.5rem); align-self: center; }
.auth-content h1 { font: 500 clamp(2.4rem, 4vw, 3.6rem)/1 "Arial Narrow", Bahnschrift, sans-serif;
  text-transform: uppercase; letter-spacing: .04em; margin: .5rem 0 1rem; }
.auth-content .box { max-width: none; background: #182630; padding: 1.6rem; margin: 1.6rem 0; }
.auth-content > .hint:last-child { font-size: .88rem; }
.account-banner { min-height: 13rem; display: flex; flex-direction: column; justify-content: end;
  padding: 1.6rem 2rem; margin-bottom: 1.6rem; border: 1px solid #53616a;
  background: linear-gradient(90deg, #08131bee, #0a1925cc 56%, #0a192555),
              url("/static/img/rf-ether-bg.jpg") center 57% / cover; }
.account-banner h1 { font: 500 clamp(2.4rem, 5vw, 4rem)/1 "Arial Narrow", Bahnschrift, sans-serif;
  text-transform: uppercase; margin: .4rem 0; }
.account-banner p { margin: 0; color: #dce5e8; }
#account-login { font: 500 clamp(2rem, 4vw, 2.7rem)/1.1 "Arial Narrow", Bahnschrift, sans-serif;
  text-transform: uppercase; letter-spacing: .04em; }
#account-details { display: table; width: min(100%, 42rem); }
#account-characters { display: table; width: min(100%, 48rem); }
.box { border-radius: 2px; }
.box input { border-radius: 2px; }
.tabs button { border-radius: 2px; }
table.details { border-radius: 2px; display: block; overflow-x: auto; }
table.details[hidden] { display: none; }
table.details tr:nth-child(even) { background: #ffffff05; }
table.details.list th { color: var(--gold-2); text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; }
@media (max-width: 800px) {
  header.top { gap: .9rem; }
  nav.main { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: .25rem .9rem; }
  nav.account { margin-left: auto; }
  .hero { min-height: 28rem; }
  .monthly-spotlight { grid-template-columns: 1fr; }
  .monthly-tile { min-height: 16rem; }
  .quick-links { grid-template-columns: 1fr; }
  .quick-link { min-height: 8rem; }
  .auth-stage { grid-template-columns: 1fr; }
  .auth-art { min-height: 13rem; border-right: 0; border-bottom: 1px solid #53616a;
    background-position: center, center 45%; }
  .auth-art strong { max-width: none; }
}
@media (max-width: 520px) {
  header.top { padding: .7rem 1rem; }
  .brand img { width: 34px; height: 34px; }
  .brand-main { font-size: .64rem; }
  .brand-sub { font-size: .75rem; }
  nav.account { gap: .6rem; }
  nav.account a, nav.account button { font-size: .8rem; }
  .hero { min-height: 23rem; padding: 2rem .7rem; }
  .hero .eyebrow { font-size: .64rem; letter-spacing: .18em; }
  .hero-logo { margin: 0 auto; }
  .tagline { letter-spacing: .04em; }
  .hero-actions { gap: .6rem; }
  .hero-actions .button { width: 100%; }
  .monthly-reward-main { gap: 1rem; }
  .monthly-charm-mark { width: 4.2rem; height: 4.2rem; }
  .monthly-charm-mark span { font-size: 2.1rem; }
  .auth-art { min-height: 11rem; padding: 1.2rem; }
  .auth-art strong { font-size: 1.8rem; }
  .auth-content { padding: 1.3rem; }
  .auth-content .box { padding: 1.1rem; }
  .account-banner { padding: 1.2rem; }
  #account-characters { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, button.primary, .quick-link { transition: none; }
}
