/* ==========================================================================
   MILLENNIUM 2099 — Evennia website theme
   ==========================================================================

   HOW THIS FILE IS LOADED
   Evennia's web/templates/website/base.html loads, in order:
       vendor/bootstrap-4.6.2.min.css   (vendored — see ../vendor/README.md)
       website/css/website.css          (Evennia's own base styles)
       website/css/custom.css           (THIS FILE)
   Being last, this file wins without needing !important on most rules.
   `!important` below is reserved for the places Bootstrap ships an
   equally-specific utility class that would otherwise tie on specificity
   and win on source order (.text-white, .btn-*, .bg-*).

   DESIGN TOKENS
   The :root block is the canonical brand token set, mirrored from
   brand/wordpress/strikeforceniner-child/css/tokens.css so the marketing
   site (strikeforceniner.com) and this game site never drift.

   VARIABLE NAMES ARE PART OF THE CONTRACT. An earlier revision of this
   file renamed --m-accent-glow to --m-glow and --m-font-mono to --m-mono;
   the values still matched but a copy-paste sync would silently miss them.
   Names here are now byte-identical to tokens.css. tests/unit/web/
   test_brand_tokens.py pins the values so drift fails CI rather than
   shipping — this matters because brand/ is gitignored and therefore is
   NOT available on the deployment or in CI to diff against.

   Discipline (from docs/development/private/m2099_theme_design_system.md):
   neutrals carry ~90% of every screen; green is the only routine accent
   (links, focus rings, CTAs, hairlines); amber appears rarely, for
   emphasis and status. Glow is a whisper, not a bloom.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — self-hosted (see ../vendor/README.md for why)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  /* Variable font: the wght axis really is 400–800 (read off the file's
     fvar table). Declaring the true range lets 500/700 render as genuine
     interpolated instances rather than browser-synthesised fake bold. */
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323-400.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   2. Canonical brand tokens — mirror of tokens.css
   -------------------------------------------------------------------------- */

:root {
  /* neutrals — blacks / grays / whites (the 90%) */
  --m-bg:        #0B0B0E;  /* near-black page base */
  --m-surface:   #141419;  /* panels, cards */
  --m-surface-2: #1E1E26;  /* raised / hover */
  --m-border:    #2A2A33;  /* hairline rules */
  --m-muted:     #8A8A97;  /* secondary text */
  --m-text:      #E9E9EF;  /* body text (off-white) */
  --m-text-hi:   #F5F5F8;  /* headings */

  /* accent — retro green/amber CRT phosphor (the 10%, used sparingly) */
  --m-accent:      #39FF14;                 /* neon phosphor green */
  --m-accent-ink:  #0E7A2E;                 /* darker green — legible on WHITE */
  --m-accent-2:    #FFB000;                 /* amber phosphor — emphasis/status */
  --m-accent-glow: rgba(57, 255, 20, 0.30); /* subtle CTA/hover glow */

  /* type */
  --m-font-body:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --m-font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --m-font-display: "VT323", "JetBrains Mono", monospace;

  /* Derived, theme-local. Not part of the shared token contract — these
     exist only because this surface needs them and the marketing site
     expresses the same ideas through its parent theme. */
  --m-ink-on-accent: #06250B;                 /* text on a filled green button */
  --m-radius:        10px;
  --m-radius-sm:     8px;
  --m-hairline:      1px solid var(--m-border);
  --m-danger:        #FF4D4D;
  --m-danger-bg:     rgba(255, 77, 77, 0.10);
  --m-warn-bg:       rgba(255, 176, 0, 0.10);
  --m-ok-bg:         rgba(57, 255, 20, 0.10);
}

/* --------------------------------------------------------------------------
   3. Base page
   -------------------------------------------------------------------------- */

html,
body {
  background-color: var(--m-bg);
}

body {
  color: var(--m-text);
  font-family: var(--m-font-body);
  /* Bootstrap's body line-height (1.5) is tight for a monospace face at
     body size; monospace has no ascender/descender variety to rest on. */
  line-height: 1.65;
  /* Keep the footer at the bottom on short pages (404, login) instead of
     floating mid-viewport. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > .container,
body > .main-content {
  flex: 1 0 auto;
}

.main-content,
.container,
#main-copy {
  background: transparent;
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  color: var(--m-text-hi);
  font-family: var(--m-font-mono);
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }

a {
  color: var(--m-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--m-accent);
  text-shadow: 0 0 8px var(--m-accent-glow);
  text-decoration: underline;
}

hr {
  border: 0;
  border-top: var(--m-hairline);
  opacity: 1;
}

code, kbd, pre, samp {
  font-family: var(--m-font-mono);
  color: var(--m-accent-2);
}

::selection {
  background: rgba(57, 255, 20, 0.28);
  color: var(--m-bg);
}

small,
.small,
.text-muted {
  color: var(--m-muted) !important;
}

/* --------------------------------------------------------------------------
   5. Navbar
   -------------------------------------------------------------------------- */

.navbar {
  background-color: var(--m-bg) !important;
  border-bottom: var(--m-hairline);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.navbar-brand {
  color: var(--m-text-hi) !important;
  font-family: var(--m-font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.navbar-brand:hover .m2099-wordmark__yr {
  text-shadow: 0 0 10px var(--m-accent-glow);
}

/* The brand mark (the >_ prompt tile). Evennia's stock template calls this
   .navbar-brand-logo and points it at the Evennia logo; our _menu.html
   override points it at m2099-mark.svg. */
.navbar-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.navbar-brand small {
  display: block;
  color: var(--m-muted);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.navbar .nav-link {
  color: var(--m-text) !important;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--m-accent) !important;
}

/* Evennia renders Log In / Log Out as <button class="nav-link btn btn-link">
   inside a form, so they must be neutralised back to link appearance or the
   .btn rules below would paint them as filled green CTAs in the navbar. */
.navbar .btn-link,
.navbar .nav-link.btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--m-text) !important;
  box-shadow: none !important;
  font-family: var(--m-font-body);
  font-weight: 400;
  padding: 0.5rem 0.85rem;
}

.navbar .btn-link:hover,
.navbar .nav-link.btn:hover {
  color: var(--m-accent) !important;
  text-decoration: none;
}

.navbar-toggler {
  border-color: var(--m-border);
}

/* Bootstrap ships this icon as an inlined SVG with a hard-coded stroke
   colour; recolour it to the accent rather than leave it Bootstrap grey. */
.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(57,255,20,0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.dropdown-menu {
  background-color: var(--m-surface);
  border: var(--m-hairline);
  border-radius: var(--m-radius);
  padding: 0.35rem;
}

.dropdown-item {
  color: var(--m-text);
  border-radius: var(--m-radius-sm);
  font-size: 0.92rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--m-surface-2);
  color: var(--m-accent);
}

.dropdown-divider {
  border-top: var(--m-hairline);
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.footer {
  flex-shrink: 0;
  background-color: var(--m-bg) !important;
  border-top: var(--m-hairline);
  padding: 1.4rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
}

.footer,
.footer .text-white,
.footer a {
  color: var(--m-muted) !important;
}

.footer a:hover {
  color: var(--m-accent) !important;
}

/* The World Engine credit. Styled as emphasis rather than as a link, because
   it is not one yet — a "how it works" page is planned on the marketing site.
   Keeping it visually distinct now means turning it into an <a> later is a
   markup change with no visual jump. */
.m2099-engine {
  color: var(--m-text) !important;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. Cards — the dominant container on every non-landing page
   -------------------------------------------------------------------------- */

.card {
  background-color: var(--m-surface);
  border: var(--m-hairline);
  border-radius: var(--m-radius);
  color: var(--m-text);
}

.card-header {
  background: transparent;
  border-bottom: var(--m-hairline);
  color: var(--m-text-hi);
  font-family: var(--m-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.card-title {
  color: var(--m-text-hi);
  font-family: var(--m-font-mono);
}

.card-subtitle {
  color: var(--m-muted);
  font-weight: 400;
}

/* Bootstrap's .border-light is near-white — wrong on a dark surface. */
.card.border-light {
  border-color: var(--m-border) !important;
  background-color: var(--m-surface-2);
}

/* --------------------------------------------------------------------------
   8. Forms — login, register, password reset, character create
   -------------------------------------------------------------------------- */

label,
.col-form-label {
  color: var(--m-muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  background-color: var(--m-bg);
  border: var(--m-hairline);
  border-radius: var(--m-radius-sm);
  color: var(--m-text);
  font-family: var(--m-font-body);
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  background-color: var(--m-bg);
  border-color: var(--m-accent);
  color: var(--m-text);
  box-shadow: 0 0 0 0.15rem var(--m-accent-glow);
  outline: none;
}

.form-control::placeholder {
  color: var(--m-muted);
  opacity: 0.7;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: var(--m-surface-2);
  color: var(--m-muted);
}

/* Chrome paints autofilled inputs with an opaque near-white background that
   no background-color can override; the huge inset shadow is the standard
   workaround, and text-fill-color restores the foreground. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--m-bg) inset;
  -webkit-text-fill-color: var(--m-text);
  caret-color: var(--m-text);
}

.form-text {
  color: var(--m-muted);
  font-size: 0.8rem;
}

/* Django renders unstyled <ul class="errorlist"> for field errors. */
.errorlist {
  list-style: none;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
  background: var(--m-danger-bg);
  border: 1px solid var(--m-danger);
  border-radius: var(--m-radius-sm);
  color: var(--m-danger);
  font-size: 0.85rem;
}

.helptext {
  color: var(--m-muted);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   9. Buttons
   -------------------------------------------------------------------------- */

.btn {
  font-family: var(--m-font-mono);
  font-weight: 500;
  border-radius: var(--m-radius-sm);
  letter-spacing: 0.03em;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary,
.btn-success,
.playbutton {
  background-color: var(--m-accent) !important;
  border: 1px solid var(--m-accent) !important;
  color: var(--m-ink-on-accent) !important;
}

.btn-primary:hover,
.btn-success:hover,
.playbutton:hover,
.btn-primary:focus,
.btn-success:focus {
  background-color: var(--m-accent) !important;
  color: var(--m-ink-on-accent) !important;
  box-shadow: 0 0 14px var(--m-accent-glow) !important;
}

.btn-secondary,
.btn-outline-secondary,
.btn-info,
.btn-light,
.btn-dark {
  background-color: transparent !important;
  border: 1px solid var(--m-accent) !important;
  color: var(--m-accent) !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-info:hover,
.btn-light:hover,
.btn-dark:hover,
.btn-secondary:focus,
.btn-outline-secondary:focus,
.btn-info:focus {
  background-color: rgba(57, 255, 20, 0.10) !important;
  color: var(--m-accent) !important;
  box-shadow: 0 0 12px var(--m-accent-glow) !important;
}

.btn-danger {
  background-color: transparent !important;
  border: 1px solid var(--m-danger) !important;
  color: var(--m-danger) !important;
}

.btn-danger:hover {
  background-color: var(--m-danger-bg) !important;
}

/* Evennia's form templates ship submits as
   <input class="form-control btn btn-outline-secondary" type="submit">.
   .form-control and .btn have equal specificity, so without this the
   result depends on source order and the submit renders as a text input.
   The attribute selector raises specificity enough to settle it. */
input[type="submit"].btn,
button[type="submit"].btn,
input[type="submit"].form-control,
button[type="submit"].form-control {
  background-color: var(--m-accent) !important;
  border: 1px solid var(--m-accent) !important;
  color: var(--m-ink-on-accent) !important;
  font-family: var(--m-font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  height: auto;
  padding: 0.6rem 1rem;
}

input[type="submit"].btn:hover,
button[type="submit"].btn:hover,
input[type="submit"].form-control:hover,
button[type="submit"].form-control:hover {
  box-shadow: 0 0 16px var(--m-accent-glow) !important;
}

/* --------------------------------------------------------------------------
   10. Alerts — Django messages + inline form errors
   -------------------------------------------------------------------------- */

.alert {
  background-color: var(--m-surface);
  border: var(--m-hairline);
  border-radius: var(--m-radius);
  color: var(--m-text);
}

.alert-heading {
  color: var(--m-text-hi);
}

.alert-link {
  color: var(--m-accent) !important;
  font-weight: 700;
}

.alert-danger,
.alert-error {
  background-color: var(--m-danger-bg);
  border-color: var(--m-danger);
  color: var(--m-danger);
}

.alert-warning {
  background-color: var(--m-warn-bg);
  border-color: var(--m-accent-2);
  color: var(--m-accent-2);
}

.alert-success {
  background-color: var(--m-ok-bg);
  border-color: var(--m-accent);
  color: var(--m-accent);
}

.alert-info,
.alert-secondary,
.alert-debug {
  background-color: var(--m-surface-2);
  border-color: var(--m-border);
  color: var(--m-text);
}

/* --------------------------------------------------------------------------
   11. Lists, tables, breadcrumbs, pagination
   -------------------------------------------------------------------------- */

.list-group {
  border-radius: var(--m-radius);
}

.list-group-item {
  background-color: transparent;
  border-color: var(--m-border);
  color: var(--m-text);
}

a.list-group-item:hover,
a.list-group-item:focus {
  background-color: var(--m-surface-2);
  color: var(--m-accent);
}

table,
.table {
  color: var(--m-text);
}

.table td,
.table th {
  border-color: var(--m-border);
}

.table thead th {
  border-bottom: 2px solid var(--m-border);
  color: var(--m-muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}

.table-hover tbody tr:hover {
  background-color: var(--m-surface-2);
  color: var(--m-text);
}

.breadcrumb {
  background-color: var(--m-surface-2);
  border: var(--m-hairline);
  border-radius: var(--m-radius-sm);
  font-size: 0.85rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--m-muted);
  content: "/";
}

.breadcrumb-item.active {
  color: var(--m-muted);
}

.page-link {
  background-color: var(--m-surface);
  border: var(--m-hairline);
  color: var(--m-accent);
}

.page-link:hover {
  background-color: var(--m-surface-2);
  border-color: var(--m-accent);
  color: var(--m-accent);
}

.page-item.active .page-link {
  background-color: var(--m-accent);
  border-color: var(--m-accent);
  color: var(--m-ink-on-accent);
}

.page-item.disabled .page-link {
  background-color: var(--m-surface);
  border-color: var(--m-border);
  color: var(--m-muted);
}

.badge {
  font-family: var(--m-font-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.badge-primary,
.bg-primary {
  background-color: var(--m-accent) !important;
  color: var(--m-ink-on-accent) !important;
}

/* Bootstrap's modal/close chrome is white-on-white by default. */
.modal-content {
  background-color: var(--m-surface);
  border: var(--m-hairline);
  color: var(--m-text);
}

.modal-header,
.modal-footer {
  border-color: var(--m-border);
}

.close,
.btn-close {
  color: var(--m-text);
  text-shadow: none;
  opacity: 0.7;
}

.close:hover,
.btn-close:hover {
  color: var(--m-accent);
  opacity: 1;
}

/* ==========================================================================
   12. Landing-page components (web/templates/website/index.html)
   ========================================================================== */

.m2099-hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  border-bottom: var(--m-hairline);
  margin-bottom: 2rem;
  overflow: hidden;
}

.m2099-hero__kicker {
  font-family: var(--m-font-mono);
  color: var(--m-accent);
  letter-spacing: 0.35em;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.m2099-hero__title {
  font-family: var(--m-font-mono);
  font-weight: 800;
  color: var(--m-text-hi);
  font-size: clamp(2rem, 7vw, 4.5rem);
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0;
  text-shadow: 0 0 18px var(--m-accent-glow);
}

.m2099-hero__title .yr {
  color: var(--m-accent);
}

.m2099-hero__tagline {
  font-family: var(--m-font-display);
  font-size: 1.75rem;
  color: var(--m-muted);
  letter-spacing: 0.05em;
  margin-top: 0.6rem;
}

/* Faint CRT scanline over the hero only (design system §4: "optional, off
   by default until we see it" — enabled, kept at 4% opacity). Sits above
   the text but is pointer-events:none so it never intercepts the CTAs. */
.m2099-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(57, 255, 20, 0.04) 0,
    rgba(57, 255, 20, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
}

.m2099-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 1.75rem;
}

.m2099-btn {
  font-family: var(--m-font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--m-radius-sm);
  border: 1px solid var(--m-accent);
  display: inline-block;
  background-color: var(--m-accent);
  color: var(--m-ink-on-accent);
  letter-spacing: 0.05em;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.m2099-btn:hover,
.m2099-btn:focus {
  background-color: var(--m-accent);
  color: var(--m-ink-on-accent);
  box-shadow: 0 0 16px var(--m-accent-glow);
  text-decoration: none;
  text-shadow: none;
}

.m2099-btn--ghost {
  background-color: transparent;
  color: var(--m-accent);
  font-weight: 500;
}

.m2099-btn--ghost:hover,
.m2099-btn--ghost:focus {
  background-color: rgba(57, 255, 20, 0.10);
  color: var(--m-accent);
}

.m2099-uplink {
  font-family: var(--m-font-mono);
  color: var(--m-muted);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 1.25rem;
}

.m2099-uplink strong {
  color: var(--m-accent-2);
  font-weight: 500;
}

.m2099-blurb {
  max-width: 680px;
  margin: 0 auto;
  color: var(--m-text);
  text-align: center;
  line-height: 1.8;
}

.m2099-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 2.5rem 0;
}

.m2099-card {
  background-color: var(--m-surface);
  border: var(--m-hairline);
  border-radius: var(--m-radius);
  padding: 1.1rem 1.25rem;
}

.m2099-card h3 {
  font-family: var(--m-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--m-muted);
  margin: 0 0 0.6rem;
}

.m2099-stat {
  font-family: var(--m-font-display);
  font-size: 2.6rem;
  color: var(--m-accent);
  line-height: 1;
}

.m2099-card p {
  margin: 0.4rem 0 0;
  color: var(--m-text);
  font-size: 0.9rem;
}

.m2099-card ul {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
}

.m2099-card li {
  color: var(--m-text);
  font-size: 0.88rem;
  padding: 0.25rem 0;
  border-bottom: var(--m-hairline);
}

.m2099-card li:last-child {
  border-bottom: none;
}

.m2099-card li em {
  color: var(--m-muted);
  font-style: normal;
}

/* Breakdown rows under a headline figure: muted label left, value right.
   These also do structural work — the grid stretches all cards to the
   tallest, so without them a card holding only a number and one line of text
   left a large dead area beneath it. */
.m2099-statlist {
  margin-top: 0.9rem !important;
}

.m2099-statlist li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding: 0.3rem 0;
}

.m2099-statlist span {
  color: var(--m-muted);
}

.m2099-statlist b {
  color: var(--m-text-hi);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Caption under the sample terminal. */
.m2099-caption {
  max-width: 680px;
  margin: 0.85rem auto 0;
  text-align: center;
  color: var(--m-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Build-status chip. Amber is the design system's status colour — it is used
   sparingly and deliberately, and a build stage is exactly the kind of
   metadata it exists for. Previously this text sat inside the sample `look`
   output, where it read as part of the room rather than as a page-level
   status. */
.m2099-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 3px 10px;
  border: 1px solid var(--m-accent-2);
  border-radius: 999px;
  color: var(--m-accent-2);
  font-family: var(--m-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.m2099-terminal {
  background: #08080A;
  border: var(--m-hairline);
  border-radius: var(--m-radius);
  padding: 16px 18px;
  font-family: var(--m-font-mono);
  font-size: 0.9rem;
  color: var(--m-text);
  margin: 2rem auto 0;
  max-width: 680px;
  line-height: 1.7;
  /* Long generated prose must scroll inside the frame rather than force
     the page body to scroll sideways on a phone. */
  overflow-x: auto;
}

.m2099-terminal .p { color: var(--m-accent); }
.m2099-terminal .a { color: var(--m-accent-2); }

/* Room title inside the sample render — the game shows it highlighted above
   the prose, so the sample does too. */
.m2099-terminal .h {
  color: var(--m-text-hi);
  font-weight: 700;
}

/* Vertical rhythm inside the sample.
   The blank lines between the command, the room title, the prose and the
   exits are MARGINS, not empty spacer elements. The prose itself is a single
   flowing <p>: hard-wrapping it per source line produced a short orphan
   fragment under every line once the container narrowed below the wrap
   width. `text-wrap: pretty` additionally discourages a one-word last line
   where the browser supports it. */
.m2099-terminal .cmd {
  margin-bottom: 1.15em;
}

.m2099-terminal .room {
  margin-bottom: 0.85em;
}

.m2099-terminal p {
  margin: 0 0 1.15em;
  text-wrap: pretty;
}

.m2099-terminal .exits {
  margin-top: 1.15em;
}

/* The prose wraps naturally, so nothing should force a sideways scroll —
   but a long unbroken token (a URL, an ID) still must not widen the page.
   `break-word` rather than `anywhere`: it breaks only a token that would
   actually overflow, and unlike `anywhere` it does not shrink the element's
   intrinsic min-content width. */
.m2099-terminal {
  overflow-wrap: break-word;
}

/* Shared-component aliases. The WordPress child theme (brand/) names these
   .btn-phosphor / .btn-ghost / .prompt / .amber. Accepting both names means
   an HTML snippet can be pasted between the marketing site and this one
   without silently losing its styling — which the brand kit's README
   explicitly invites contributors to do. */
.m2099-cta .btn-phosphor,
.m2099-cta .btn-ghost {
  font-family: var(--m-font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--m-radius-sm);
  border: 1px solid var(--m-accent);
  display: inline-block;
  letter-spacing: 0.05em;
}

.m2099-cta .btn-phosphor {
  background-color: var(--m-accent);
  color: var(--m-ink-on-accent);
}

.m2099-cta .btn-ghost {
  background-color: transparent;
  color: var(--m-accent);
  font-weight: 500;
}

.m2099-terminal .prompt { color: var(--m-accent); }
.m2099-terminal .amber  { color: var(--m-accent-2); }

/* --------------------------------------------------------------------------
   12b. Habitability seal
   --------------------------------------------------------------------------
   The closing beat of the page: an in-world municipal certification, stamped
   with the ASCII thumbs-up mark. It carries copy, so it is a content block
   rather than decoration — but deliberately NOT a call to action. The page
   already offers "Jack in" in the hero, and a third button here would turn a
   dry joke into a marketing panel.

   The mark is amber because the mark IS amber — its glyphs sit within a few
   points of --m-accent-2, which is the design system's status/emphasis
   colour. That is why it reads as belonging here instead of competing with
   the green primary: it is the same role the `alpha build` chip plays.

   The asset is keyed out of its black plate (alpha derived from luminance at
   build time), so the glow dissolves into --m-bg rather than sitting in a
   near-black square whose edge would show. It therefore needs NO background
   of its own — do not give .m2099-seal__mark one.
   -------------------------------------------------------------------------- */

.m2099-seal {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 780px;
  margin: 3.5rem auto 1rem;
  padding: 1.5rem 0 0;
  border-top: var(--m-hairline);
}

.m2099-seal__mark {
  flex: 0 0 auto;
  width: 168px;
  height: auto;
}

.m2099-seal__body {
  min-width: 0;
}

.m2099-seal__label {
  color: var(--m-muted);
  font-family: var(--m-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.m2099-seal__rating {
  margin: 0.3rem 0 0.6rem;
  color: var(--m-accent-2);
  font-family: var(--m-font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Deliberately small and grey: it is fine print, and reading it as fine print
   is most of the joke. */
.m2099-seal__fine {
  margin: 0;
  color: var(--m-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 575.98px) {
  .m2099-seal {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .m2099-seal__mark {
    width: 132px;
  }
}

/* --------------------------------------------------------------------------
   13. Accessibility + motion
   -------------------------------------------------------------------------- */

/* A visible, high-contrast focus ring on every interactive element.
   Bootstrap 4's default is a soft blue halo that all but disappears on a
   near-black background — a real keyboard-navigation problem, not a
   cosmetic one. :focus-visible keeps it off for mouse users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.m2099-btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--m-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* The skip-to-content link Evennia puts at the top of base.html. */
.sr-only-focusable:focus,
.sr-only-focusable:focus-visible {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--m-accent);
  color: var(--m-ink-on-accent);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Users who ask for more contrast get the decorative scanline and every
   glow removed, and hairlines promoted to a legible grey. */
@media (prefers-contrast: more) {
  .m2099-hero::after {
    display: none;
  }

  :root {
    --m-border: #4A4A57;
    --m-muted: #B0B0BC;
    --m-accent-glow: transparent;
  }
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
  .m2099-hero {
    padding: 2.25rem 0.75rem 1.75rem;
  }

  .m2099-hero__tagline {
    font-size: 1.4rem;
  }

  .m2099-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .m2099-btn {
    text-align: center;
  }

  .m2099-stat {
    font-size: 2.2rem;
  }
}

/* Wide content must never make the page body scroll sideways. */
.table-responsive,
pre {
  overflow-x: auto;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}
