/*
  classic_front.css — anonymous front layout: the shell (menu bar, portal,
  bottom login bar) plus the start page's "Empty Field" content (`ef` prefix).
  Loaded by include_main_up()/include_main_down(), after ork_v2.css + style.css.
*/

body { background: #cccccc; }

#cfShell {
  box-sizing: border-box;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

/* ---- top menu bar -------------------------------------------------------- */
/* The bar's background shows through the 2px gaps as the cell dividers. */
.cfMenubar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border: 2px solid #2B3147;
  background: #2B3147;
  font: bold 13px verdana, "DejaVu Sans", sans-serif;
}

/* The game bar nests its tabs one level down, in .cfTabs (classic_game.css). */
.cfMenubar > *,
.cfMenubar > .cfTabs > * {
  box-sizing: border-box;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: #707D8E;
  color: #000;
  text-align: center;
}

.cfMenubar .cfTab,
.efCtaBtn { background: #8493A7; }
.cfMenubar .cfTab:hover,
.efCtaBtn:hover { background: #B8CDE9; }
.cfMenubar a.cfTab { color: #000; text-decoration: none; }

.cfMenubar .cfSpacer { flex: 1 1 auto; min-width: 0; }

/* Period column widths, and a single row: above the breakpoint the slack cell
   yields width rather than the bar wrapping and leaving the frame half empty. */
@media (min-width: 861px) {
  .cfMenubar .cfwMain   { flex: 0 0 8.5%; }
  .cfMenubar .cfwCreate { flex: 0 0 21%; }
  .cfMenubar .cfwAbout  { flex: 0 0 10%; }
  .cfMenubar .cfwManual { flex: 0 0 13%; }
  .cfMenubar { flex-wrap: nowrap; }
}

/* ---- portal (keeps id=portal so ork_v2's content colours apply) ---------- */
#cfShell #portal {
  position: static;
  top: auto; bottom: auto; left: auto;
  flex: 1 1 auto;
  /* border-box, or the 2px side borders push the portal 4px past the bars. */
  box-sizing: border-box;
  width: 100%;
  border-left: 2px solid #2B3147;
  border-right: 2px solid #2B3147;
}

/* ---- error / login-disabled notice strip --------------------------------- */
#cfNotice {
  flex: 0 0 auto;
  border-left: 2px solid #2B3147;
  border-right: 2px solid #2B3147;
  background: #2B3147;
  color: #E0E0E0;
  font: 13px verdana, "DejaVu Sans", sans-serif;
  text-align: center;
  padding: 8px 14px;
}
#cfNotice p { margin: 2px 0; }

/* ---- bottom login bar ---------------------------------------------------- */
#cfBottombar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 14px;
  border: 2px solid #2B3147;
  background: #707D8E;
  color: #CCC;
  font: bold 13px verdana, "DejaVu Sans", sans-serif;
}
#cfBottombar .cfBrand a { color: #B8CDE9; }

#cfBottombar .cfDisabled { font-weight: normal; font-style: italic; color: #CCC; }
#cfBottombar form { margin: 0; }

.cfLogin { display: inline-flex; align-items: center; gap: 8px; }

.cfField {
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
  width: 160px; padding: 6px 9px; font: 13px verdana, "DejaVu Sans", sans-serif; color: #283042;
  background: #c9cdd3; border: 1px solid #454d5e; border-radius: 6px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.cfField::placeholder { color: #6a7280; }
/* iOS zooms into a focused field set under 16px; touch screens get 16px fields. */
@media (hover: none) { .cfField { font-size: 16px; } }
.cfField:focus { border-color: #2B3147; box-shadow: 0 0 0 2px rgba(43, 49, 71, .22); }

.cfBtn {
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
  padding: 6px 18px; font: bold 13px verdana, "DejaVu Sans", sans-serif; color: #283042; cursor: pointer;
  background: #aab0b8; border: 1px solid #454d5e; border-radius: 6px;
  transition: background .12s;
}
.cfBtn:hover { background: #b7bcc3; }
.cfBtn:active { background: #9aa0a8; }

/* ---- phones: wrap the bars instead of overflowing the screen -------------- */
@media (max-width: 860px) {
  .cfMenubar > *,
  .cfMenubar > .cfTabs > * { flex: 1 1 auto; white-space: nowrap; }
  .cfMenubar .cfSpacer { display: none; }

  #cfBottombar { flex-wrap: wrap; height: auto; padding: 5px 10px; row-gap: 5px; }

  #cfBottombar form { flex: 1 1 auto; min-width: 0; }
  /* Scoped to the bar's own slots, so neither the floating panel nor the field and
     icon inside .cfPassWrap inherit them. */
  #cfBottombar .cfLogin { flex-wrap: wrap; justify-content: flex-end; }
  #cfBottombar .cfLogin > .cfField, #cfBottombar .cfPassWrap { flex: 1 1 110px; width: auto; min-width: 0; }
}

/* ---- detachable login: password managers that draw below a field ---------- */
/* Password field and detach icon share the old field's slot, so Login never moves. */
.cfPassWrap { display: inline-flex; gap: 4px; width: 160px; }
.cfPassWrap .cfField { width: auto; flex: 1 1 auto; min-width: 0; }
/* The icon reuses .cfField's look (it carries both classes); only its shape is here,
   at the same specificity as the rule above so it wins over it. */
.cfPassWrap .cfDetach { display: grid; place-items: center; flex: 0 0 30px; width: 30px; padding: 0; cursor: pointer; }
#cfFloatBox .cfDetach svg { transform: rotate(180deg); }
.cfDetach[hidden] { display: none; }

/* Native modal: the browser centres it in the top layer, draws ::backdrop, closes on Esc. */
#cfFloat { padding: 0; border: 0; background: transparent; overflow: visible; }
#cfFloat::backdrop { background: rgba(0, 0, 0, 0.6); }
#cfFloatBox { width: 280px; padding: 18px 18px 14px; border: 2px solid #2B3147; background: #707D8E; color: #CCC; font: bold 13px verdana, "DejaVu Sans", sans-serif; box-shadow: 0 8px 28px rgba(0, 0, 0, .45); }
#cfFloatBox h3 { margin: 0 0 12px; font-size: 13px; }
#cfFloatBox form { margin: 0; }
#cfFloatBox .cfLogin { display: flex; flex-direction: column; align-items: stretch; }
#cfFloatBox .cfField, #cfFloatBox .cfPassWrap { width: auto; }
/* The recovery link rides the form: hidden in the bar, shown once the form is floated. */
.cfLost { display: none; }
#cfFloatBox .cfLost { display: block; margin-top: 4px; text-align: center; font-weight: normal; font-size: 11px; color: #B8CDE9; }
/* Phones: near the top, clear of the on-screen keyboard. */
@media (max-width: 860px) { #cfFloat { margin: 16px auto auto; } }

/* ==========================================================================
   The Empty Field — the front page's own content, inside the shell's portal.
   ========================================================================== */

.efField {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  font: 13px verdana, "DejaVu Sans", sans-serif;
  color: #cccccc;
  /* #3F4F69, not #portal's #3B4B64: this page follows the 2003 archive. */
  background: #3F4F69 url('../img/back.gif');
}

.efCentre {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}
/* The air above and below the field: spacers rather than padding, so a short
   window takes it back before the portal scrolls. */
.efCentre::before,
.efCentre::after { content: ""; flex: 56 1 0; max-height: 56px; }
.efCentre::after { flex-grow: 64; max-height: 64px; }

.efField a,
.docPage a { color: #B8CDE9; text-decoration: none; }
.efField a:hover,
.docPage a:hover { color: #fff; text-decoration: underline; }
/* Links that must not outshine their surroundings: the signature's address,
   the about page's outbound footnote. */
.docPage .signature a,
.docPage .docQuiet a { color: inherit; font-weight: normal; text-decoration: underline; }
.docPage .docQuiet { font-size: 11px; opacity: 0.75; }

.efLogo { display: block; margin: 0 auto 10px; max-width: 100%; height: auto; }

.efAge {
  display: block;
  margin-top: 16px;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: bold;
  color: #fff;
  letter-spacing: 6px;
  text-shadow: 0 2px 0 #2B3147;
}

/* ---- the age timeline ---------------------------------------------------- */
.efStatus {
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

/* Typographic, not a box: a bordered slate fill is this page's button language. */
.efPill {
  display: inline-block;
  font: bold 13px verdana, "DejaVu Sans", sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.efRunning { color: #D8E4F2; }
.efSoon    { color: #fff; }
.efIdle    { color: #A7B2C2; }


.efWhen {
  font-size: 12px;
  color: #B8CDE9;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}

/* With no age to name, the state carries the screen in the heading's place; a
   start countdown keeps that size under the age heading too, since it's the
   one thing on the page that moves. */
.efStatusLead { margin-top: 30px; gap: 10px; }
.efStatusLead .efPill,
.efPill.efSoon {
  font-size: clamp(20px, 3.2vw, 30px);
  letter-spacing: 5px;
  color: #fff;
  text-shadow: 0 2px 0 #2B3147;
  font-variant-numeric: tabular-nums;
}
.efStatusLead .efWhen { font-size: 13px; }

.efTagline { margin: 18px 0 0; font-size: 14px; color: #cccccc; font-style: italic; }

/* ---- the world's size ---------------------------------------------------- */
.efStats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  /* width, not max-width: the centred column would otherwise shrink to fit. */
  margin: 22px auto 0;
  width: 100%;
  max-width: 720px;
  border-top: 1px solid #2B3147;
  border-bottom: 1px solid #2B3147;
  padding: 14px 0;
  font-size: 11px;
  color: #A7B2C2;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.efStats span { flex: 1 1 0; padding: 0 12px; white-space: nowrap; }
.efStats span + span { border-left: 1px solid #2B3147; }
.efStats b {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  color: #fff;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

/* ---- the period tab, reused as the one primary action -------------------- */
.efCta { margin: 22px 0 0; }
.efCtaBtn {
  display: inline-block;
  padding: 11px 26px;
  font: bold 13px verdana, "DejaVu Sans", sans-serif;
  color: #000 !important;
  border: 2px solid #2B3147;
}
.efCtaBtn:hover { text-decoration: none !important; }
.efCtaOff { background: #626D7C; color: #A7B2C2 !important; cursor: not-allowed; }
.efCtaAlt { margin-left: 18px; font-size: 12px; }

/* ---- the featured race, unit names only ---------------------------------- */
.efRace {
  margin: 30px 0 0;
  font-size: 11px;
  color: #A7B2C2;
  border-top: 1px solid #2B3147;
  padding-top: 12px;
  max-width: 620px;
}
.efRace b { color: #B8CDE9; }
.efRaceUnits { color: #98A5B6; }
.efRaceOf { color: #7E8A9B; }

/* ---- the chronicle strip, above the login bar ---------------------------- */
/* Sticky, so a field taller than the window scrolls under the strip rather
   than carrying it below the login bar. */
.efTicker {
  position: sticky;
  bottom: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  font-size: 11.5px;
  line-height: 16px; /* the rolling line's height, so every part shares a baseline */
  color: #cccccc;
  background: #626D7C;
  border-top: 2px solid #2B3147;
  overflow-x: auto;
  white-space: nowrap;
}
.efTickLabel {
  font-weight: bold;
  color: #2B3147;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.efTickSep { margin: 0 10px; color: #8D9EB3; }
.efTicker em { color: #A7B2C2; }

/* The newest lifecycle row holds still at the start of the strip, as
   wide as its text up to 55% of it; anything longer ends in an ellipsis (full text in the title). */
.efTickPin {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
  border-right: 1px solid #8D9EB3;
}

/* The rolling part: one line at a time, each item rising into view from below
   and holding, read top to bottom, in CSS alone. The track steps up one line
   per slot while the fold slides one line up in the same slot, so the two
   compose into slide-then-hold for any --n. The leading echo of the last item
   is what the first pushes out on a wrap. */
.efTickRoll {
  flex: 1 1 0;
  min-width: 0;
  height: 16px;
  overflow: hidden;
}
.efTickFold { display: flex; flex-direction: column; }
.efTickFold .efTickSep { display: none; }
.efTickFold > .efTickItem,
.efTickFold > .efTickEcho {
  flex: 0 0 16px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.efTickTrack[style] {
  animation: efTickStep calc(var(--n) * 5s) steps(var(--n), end) infinite;
}
.efTickTrack[style] .efTickFold { animation: efTickSlide 5s infinite; }
.efTickRoll:hover .efTickTrack,
.efTickRoll:hover .efTickFold,
.efTickRoll:focus-within .efTickTrack,
.efTickRoll:focus-within .efTickFold { animation-play-state: paused; }
@keyframes efTickStep {
  from { transform: translateY(-16px); }
  to   { transform: translateY(calc((var(--n) + 1) * -16px)); }
}
@keyframes efTickSlide {
  0%   { transform: translateY(16px); animation-timing-function: ease-out; }
  12%  { transform: translateY(0); }
  100% { transform: translateY(0); }
}
.efTickAll { flex: 0 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .efTickTrack { animation: none; }
  .efTickTrack[style] { transform: translateY(-16px); }
  .efTickTrack[style] .efTickFold { animation: none; }
}

/* Short windows (a 1280x800 laptop): the age heading sits closer to the logo. */
@media (max-height: 860px) {
  .efAge { margin-top: 8px; }
}

/* The world-news page. */
.worldNews { list-style: none; padding-left: 0; }
.worldNews li { padding: 4px 0; border-bottom: 1px solid #2B3147; }
.worldNewsAgo { display: inline-block; min-width: 64px; color: #A7B2C2; font-size: 12px; }
.worldNewsPager { display: flex; gap: 18px; justify-content: center; }

@media (max-width: 780px) {
  .efAge { font-size: 34px; letter-spacing: 3px; }
  .efStats { font-size: 10px; }
  .efStats span { padding: 0 6px; white-space: normal; }
  .efStats b { font-size: 17px; }

  /* Narrow screens: the pinned row takes its own line and wraps in full; the
     rolling part and the link share the line below. */
  .efTicker { flex-wrap: wrap; row-gap: 6px; }
  .efTickPin {
    flex: 1 1 calc(100% - 80px);
    min-width: 0;
    max-width: none;
    white-space: normal;
    padding-right: 0;
    border-right: 0;
  }
  .efTickRoll { flex: 1 1 60%; }
}

/* ==========================================================================
   Document pages (privacy, about, CoC, register): text straight on the field
   in the Empty Field's type — no lighter #text panel, 13px like the menus.
   ========================================================================== */

.docPage {
  box-sizing: border-box;
  max-width: 740px;
  margin: 0 auto;
  padding: 26px 20px 56px;
  font: 13px/1.8 verdana, "DejaVu Sans", sans-serif;
  color: #cccccc;
}

.docPage h1,
#portal h1 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.3;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 0 #2B3147;
}

.docUpdated {
  margin: -14px 0 26px;
  font-size: 12px;
  letter-spacing: .5px;
  text-align: center;
  color: #B8CDE9;
}

/* The game's page headings (classic_game.css) share this one rule. */
.docPage h2,
#portal h2:not(.cfTitle) {
  margin: 28px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #2B3147;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #D8E4F2;
}

.docPage p { margin: 0 0 12px; }
.docPage ul { margin: 0 0 12px; padding-left: 22px; }
.docPage li { margin: 2px 0; }
.docPage strong { color: #fff; }

/* Code of Conduct: the numbered rules sit indented under each section. */
.docPage blockquote { margin: 0 0 12px; padding-left: 20px; }

/* Register steps and report: a narrower, centred form column. */
.docForm { max-width: 620px; }
.docForm form { margin: 0; }
.docForm h2,
.docForm > p { text-align: center; }
.docForm div.row { padding-top: 10px; text-align: center; }
/* Label and field share a baseline, so a label lines up with an input's text
   and with plain text (step 2's confirmed e-mail) alike. */
.docForm div.row:has(> .label) { display: flex; align-items: baseline; gap: 12px; }
.docForm div.row .label { flex: 0 0 208px; text-align: right; color: #B8CDE9; font-weight: bold; }
.docForm div.row .formw { flex: 0 0 360px; text-align: left; }
/* The login bar's fields, with the frame colour as their edge: the bar's
   #454d5e border vanishes against the darker field. */
.docForm .cfField { width: 220px; border-color: #2B3147; }
.docForm textarea.cfField { width: 100%; max-width: 440px; }
.docForm select.cfField { -webkit-appearance: menulist; appearance: auto; }
.docForm .efCtaBtn { margin-top: 10px; cursor: pointer; }
/* A field's limits, under it (replaces the legacy <font size="-2">). */
.docForm .fieldHint { display: block; margin-top: 3px; font-size: 11px; color: #9DAEC6; }

@media (max-width: 780px) {
  .docPage { padding: 18px 14px 40px; }
  .docPage h1,
  #portal h1 { font-size: 18px; letter-spacing: 2px; }
  .docForm div.row:has(> .label) { display: block; }
  .docForm div.row .label,
  .docForm div.row .formw { display: block; text-align: center; }
}
