/* Crownspire Casino: shared look for every page.
   The house style of the Galactic Empire's own sites: charcoal panels,
   Imperial periwinkle rules, pale slab title tabs, Orbitron and Saira. */

@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Saira:ital,wght@0,300;0,500;1,300&family=Saira+Semi+Condensed:wght@300;500&display=swap");

:root {
  /* The names are kept from the first, black-and-gold look, so every page
     picks the new colours up without being rewritten. */
  --obsidian: #181818;
  --lacquer: #242424;
  --lacquer-lit: #292929;
  --gold: #666699;              /* Imperial periwinkle: rules, borders, active fills */
  --gold-bright: #c2c2d6;       /* its pale form: links and highlights */
  --gold-deep: #3d3d5c;
  --ivory: #dddddd;
  --ash: #9d9db0;
  --hairline: rgba(102, 102, 153, 0.8);
  --hairline-dim: rgba(221, 221, 221, 0.16);
  --crimson: #a3262b;
  --crimson-deep: #5e1216;
  --sapphire: #2f55ad;
  --sapphire-deep: #172c63;

  --display: Orbitron, Arial, sans-serif;
  --text: Saira, Lato, Verdana, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--obsidian);
  color: var(--ivory);
  font-family: var(--text);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
strong, b { font-weight: 500; }

.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.02em; }
.num { font-variant-numeric: tabular-nums; }

a { color: var(--gold-bright); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #ffffff; }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

/* ---- titles ---- */

/* A page title is a pale slab cut on the slant, standing on a rule. */
h1.display {
  display: inline-block;
  height: 0;
  margin: 1rem 0 0 !important;
  padding: 0 0.6rem 0 0.5rem;
  border-bottom: 2rem solid var(--ivory);
  border-right: 1.3rem solid transparent;
  line-height: 2.1rem !important;
  font-size: clamp(0.95rem, 3.6vw, 1.25rem) !important;
  font-weight: 900;
  font-variant: small-caps;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: left !important;
  color: var(--lacquer) !important;
  text-shadow: none !important;
  max-width: 100%;
}
h1.display + * {
  max-width: none !important;
  margin-top: 0 !important;
  padding-top: 0.8rem;
  border-top: 2px solid var(--ivory);
}
/* The way back sits on its own line above the title. */
a.back { display: block; width: max-content; }
/* A section heading is underlined in periwinkle. */
h2.display {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--gold);
  font-size: 1.125rem !important;
  color: var(--ivory) !important;
  text-shadow: 1px 1px 2px #000;
  text-align: left !important;
}

/* ---- header ---- */

.cs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding: 0 clamp(0.75rem, 4vw, 3rem) 0 0;
  border-bottom: 2px solid var(--ivory);
  background: var(--lacquer);
  min-height: 3.25rem;
}

.cs-brand {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 2.4rem 0.3rem clamp(0.75rem, 4vw, 3rem);
  color: var(--lacquer);
  background: var(--ivory);
  clip-path: polygon(0 0, 100% 0, calc(100% - 1.6rem) 100%, 0 100%);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-variant: small-caps;
  font-size: 1.125rem;
  white-space: nowrap;
}
.cs-brand svg { width: 1.5rem; height: 1.5rem; flex: none; }
.cs-brand:hover { color: #000; background: #ffffff; }

.cs-who { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem 0.9rem; padding: 0.4rem 0; }
.cs-name { color: var(--ivory); font-size: 0.9375rem; }
.cs-avatar { width: 2.25rem; height: 2.25rem; border-radius: 3px; border: 1px solid var(--gold); object-fit: cover; display: block; }
.cs-wallet {
  padding: 0.2rem 0.8rem;
  border: 2px solid var(--gold);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 0.9375rem;
  white-space: nowrap;
  text-decoration: none;
}
a.cs-wallet:hover { background: var(--gold); color: #ffffff; border-color: var(--ivory); }

/* ---- buttons: the Empire's menu bars ---- */

.cs-button {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  min-height: 2.6rem;
  padding: 0.4rem 1.3rem;
  border: 2px solid var(--gold);
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.cs-button:hover:not(:disabled) { border-color: var(--ivory); background: var(--gold); color: #ffffff; }
.cs-button:active:not(:disabled) { transform: translateY(1px); }
.cs-button:disabled { opacity: 0.4; cursor: not-allowed; }

/* The main action on a page: the bar already lit. */
.cs-button.gold {
  background: var(--gold);
  border-color: var(--ivory);
  color: #ffffff;
}
.cs-button.gold:hover:not(:disabled) { background: #7d7db3; color: #ffffff; }
.cs-button.small { min-height: 2rem; padding: 0.15rem 0.8rem; font-size: 0.8125rem; }

.cs-input {
  font: inherit;
  min-height: 2.6rem;
  min-width: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid #666666;
  border-radius: 0;
  background: #111111;
  color: #cccccc;
}
.cs-input:focus { box-shadow: 0 0 5px 1px var(--gold); outline: none; }
.cs-input:disabled { opacity: 0.5; }

/* ---- footer ---- */

.cs-foot {
  margin-top: auto;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem;
  border-top: 1px solid var(--ivory);
  color: var(--ash);
  font-size: 0.875rem;
  text-align: center;
}
.cs-foot p { max-width: 46rem; margin: 0 auto 0.5rem; }
.cs-foot strong { color: var(--ivory); font-weight: 500; }

/* ---- practice tools: only on a development copy ---- */

.cs-practice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 0.6rem 1rem;
  border-top: 1px dashed var(--hairline);
  background: var(--lacquer);
  color: var(--ash);
  font-size: 0.875rem;
}
.cs-practice form { display: flex; gap: 0.5rem; }
.cs-practice .cs-input { min-height: 2.25rem; width: 11rem; padding: 0.2rem 0.6rem; }
.cs-practice-error { color: #e49a94; }
