/* ------------------------------------------------------------------
   THEME TOKENS — tweak these to match your brand/look
-------------------------------------------------------------------*/

:root {
  /* Fonts */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;



  /**
  $background-color: #141010 !default;
  $text-color: #fff6fb !default;
  $primary-color: #ff0062 !default;
  $border-color: #7e0000 !default;
  $code-background-color: mix(#000, $background-color, 15%) !default;
  $code-background-color-dark: mix(#000, $background-color, 20%) !default;
  $form-background-color: mix(#000, $background-color, 15%) !default;
  $footer-background-color: #550004 !default;
  $link-color: $primary-color !default;
  $link-color-hover: mix(#fff, $link-color, 25%) !default;
  $link-color-visited: mix(#000, $link-color, 25%) !default;
  $masthead-link-color: $text-color !default;
  $masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
  $navicon-link-color-hover: mix(#000, $background-color, 30%) !default;

  /* notices 
  $notice-background-mix: 90% !default;
  $code-notice-background-mix: 95% !default;

  */

  /* Base colors */
  --bg: #141010;
  --fg: #fff6fb;
  --muted: #fff6fb;

  /* Brand */
  --primary: #ff0062;            /* buttons, links */
  --primary-contrast: #fff6fb;
  --accent: #ff0062;             /* secondary / outline button border & text */

  /* Surfaces & borders */
  --surface: #141010;
  --surface-alt: #222222;
  --border: #550004;
  --shadow: #7e0000;

  /* States */
  --cell-owned-bg: #7e0000;
  --cell-taken-bg: #00ff00;
  --note-bg: #141010;
  --note-border: #7e0000;
  --note-fg: #e0a100;
  --error-fg: #b91c1c;
  --focus-ring: #7e0000;

  /* Shapes & rhythm */
  --radius: 10px;
  --radius-sm: 10px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Typography scale */
  --fs-xxs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.35rem;
  --fs-2xl: 1.75rem;
}

/* ------------------------------------------------------------------
   GLOBAL RESET-ish
-------------------------------------------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg {
  max-width: 100%;
  display: block;
}

/* Focus visibility */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------
   LAYOUT
-------------------------------------------------------------------*/
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4) 4rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

h1 {
  margin: 0;
  font-size: var(--fs-2xl);
  font-weight: 700;
}

h2, h3 {
  margin: var(--space-6) 0 var(--space-3);
  font-weight: 600;
}

.small {
  font-size: var(--fs-sm);
  color: var(--muted);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   BUTTONS
-------------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: var(--fs-md);
  transition: transform 0.05s ease, filter 0.1s ease;
}
.btn:hover {
  filter: brightness(0.98);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

.inline {
  display: inline-block;
  margin-left: .35rem;
}

/* ------------------------------------------------------------------
   CARDS & NOTES
-------------------------------------------------------------------*/
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5) var(--space-6);
  max-width: 640px;
}
.card.narrow {
  max-width: 420px;
}

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  color: var(--note-fg);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

/* ------------------------------------------------------------------
   FORMS
-------------------------------------------------------------------*/
form {
  margin: var(--space-4) 0;
}

.field {
  display: block;
  margin-bottom: var(--space-4);
}
.field > span,
.field > label > span {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field select {
  width: 100%;
  font-size: var(--fs-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--fg);
}
fieldset.field {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}
fieldset.field legend {
  padding: 0 .35rem;
  font-weight: 600;
}

.error {
  color: var(--error-fg);
  margin: var(--space-2) 0 var(--space-4);
}
.error ul {
  margin: var(--space-1) 0 0 1rem;
}

/* ------------------------------------------------------------------
   TABLE / GRID
-------------------------------------------------------------------*/
.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.grid th,
.grid td {
  border: 1px solid var(--border);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: var(--fs-sm);
}
.grid th:first-child,
.grid td:first-child {
  text-align: left;
  background: var(--surface-alt);
  font-weight: 600;
}
.grid th {
  background: var(--surface-alt);
  font-weight: 600;
}

td.cell-owned { background: var(--cell-owned-bg); }
td.cell-taken { background: var(--cell-taken-bg); }
td.claimable,
td.ownable { cursor: pointer; }

/* On mobile, allow horizontal scroll for wide tables */
.grid-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
}

.login-intro h2 {
  margin-top: 0;
  font-size: var(--fs-xl);
}

.login-intro h3 {
  margin-top: var(--space-5);
  font-size: var(--fs-lg);
}

.benefits {
  margin: var(--space-3) 0 var(--space-4) 1.1rem;
  padding: 0;
}
.benefits li {
  margin-bottom: .4rem;
}

td.cell-blocked {
  background: var(--surface-alt);
  color: var(--muted);
  text-decoration: line-through;
}

/* ----------------------------------------------------------
   Dark form controls
---------------------------------------------------------- */

:root {
  /* add these if you don't have them yet */
  --input-bg: var(--surface-alt);   /* pick your darkest form bg */
  --input-border: var(--border);
  --input-fg: var(--fg);
  --placeholder: var(--muted);
}

/* Text inputs, passwords, emails, etc. */
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="time"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  background: var(--input-bg);
  color: var(--input-fg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  caret-color: var(--primary);
}

/* Make sure labels stay readable too */
.field > span,
.field legend {
  color: var(--fg);
}

/* Placeholder text */
::placeholder {
  color: var(--placeholder);
  opacity: 1; /* Firefox */
}

/* Chrome autofill fix (keeps text readable on dark bg) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--input-fg);
  transition: background-color 9999s ease-out 0s;
}

/* Optional: on focus show a clearer border */
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: var(--focus-ring);
  outline-offset: 2px;
  border-color: transparent;
}




/* ------------------------------------------------------------------
   UTILITIES
-------------------------------------------------------------------*/
.hidden { display: none !important; }
.center { text-align: center; }
.right  { text-align: right; }
.w-100 { width: 100%; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }

