:root {
  --bg: #0d1014;
  --bg-soft: #141920;
  --panel: #1a212b;
  --text: #e9ecef;
  --muted: #a5afb9;
  --accent: #c49a5a;
  --accent-cyan: #78b8cf;
  --line: #2b3440;
  --max: 1120px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 6rem;
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 12% 0%, #1a2028 0%, var(--bg) 46%), var(--bg);
  color: var(--text);
  min-height: 100%;
}

body {
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  padding: 0.62rem 0.78rem;
  caret-color: var(--accent-cyan);
  appearance: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  padding-right: 2.15rem;
  background-image: linear-gradient(45deg, transparent 50%, #8394a5 50%), linear-gradient(135deg, #8394a5 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select::-ms-expand {
  display: none;
}

::placeholder {
  color: #93a0ad;
  opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #3c4857;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-color: var(--accent-cyan);
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  color: #8d97a3;
  border-color: #2a313b;
  background: rgba(255, 255, 255, 0.03);
  cursor: not-allowed;
}

input[type="checkbox"] {
  appearance: auto;
  width: 1rem;
  min-height: 1rem;
  margin: 0.12rem 0 0;
  accent-color: var(--accent-cyan);
  background: transparent;
  border: 0;
  padding: 0;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #121820 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Firefox scrollbar fallback */
* {
  scrollbar-width: thin;
  scrollbar-color: #3e5664 #141a22;
}

/* Chromium based scrollbar styling */
*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

*::-webkit-scrollbar-track {
  background: #141a22;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3f5563 0%, #334654 100%);
  border: 2px solid #141a22;
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4d6878 0%, #3e5664 100%);
}

main {
  position: relative;
  z-index: 2;
}

.surface {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--line);
}

.stack > * + * {
  margin-top: var(--space-4);
}

.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;
}
