:root {
  --bg: #050607;
  --bg-soft: #080a0d;
  --surface: rgba(11, 14, 18, 0.92);
  --surface-soft: rgba(14, 18, 23, 0.78);
  --surface-deep: rgba(5, 7, 9, 0.96);
  --ink: #eee8db;
  --ink-soft: #cfc7b8;
  --muted: #8d918e;
  --dim: #5f6668;
  --accent: #d8c28b;
  --accent-soft: #a9915e;
  --accent-faint: rgba(216, 194, 139, 0.12);
  --line: rgba(238, 232, 219, 0.075);
  --line-strong: rgba(216, 194, 139, 0.2);
  --shadow-soft: rgba(0, 0, 0, 0.28);
  --shadow-deep: rgba(0, 0, 0, 0.58);
  --radius: 10px;
  --radius-soft: 6px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, #0e1116 0%, #0a0c10 52%, #06080a 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.028), transparent 31rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: auto, 92px 92px, 92px 92px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22) 78%, transparent);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 50%, transparent 0 44%, rgba(0, 0, 0, 0.3) 100%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
}

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

button {
  min-height: 31px;
  padding: 0.42rem 0.72rem;
  color: var(--ink-soft);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.034);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius-soft);
  box-shadow: none;
  transition:
    transform 150ms ease,
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    opacity 150ms ease,
    filter 150ms ease;
}

button:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

button:focus-visible,
textarea:focus-visible,
select:focus-visible,
input[type="url"]:focus-visible {
  outline: 1px solid rgba(216, 194, 139, 0.56);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

button.primary {
  color: var(--accent);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(216, 194, 139, 0.14), rgba(216, 194, 139, 0.055));
  border-color: rgba(216, 194, 139, 0.24);
  border-radius: var(--radius-soft);
  box-shadow: none;
}

button.primary:hover:not(:disabled) {
  color: #f0dfb0;
  background: linear-gradient(180deg, rgba(216, 194, 139, 0.18), rgba(216, 194, 139, 0.08));
  border-color: rgba(216, 194, 139, 0.34);
}

textarea,
select,
input[type="url"] {
  width: 100%;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-soft);
  outline: none;
}

select {
  color-scheme: dark;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(0, 0, 0, 0.22);
}

select option,
select optgroup {
  background-color: #0a0d11;
  background-image: none;
  color: var(--ink);
  color-scheme: dark;
  forced-color-adjust: none;
}

select option:checked,
select option:hover,
select option:focus,
select option:active {
  background-color: #171b22 !important;
  background-image: linear-gradient(#171b22, #171b22) !important;
  box-shadow: inset 0 0 0 9999px #171b22 !important;
  color: #f3ead7 !important;
  forced-color-adjust: none;
}

textarea::placeholder,
input::placeholder {
  color: rgba(238, 232, 219, 0.34);
}

textarea {
  min-height: 38px;
  max-height: 58px;
  padding: 0.58rem 0.7rem;
  line-height: 1.35;
  resize: none;
}

select {
  min-height: 34px;
  padding: 0 2.15rem 0 0.72rem;
  appearance: none;
  cursor: pointer;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8' fill='none'%3E%3Cpath d='M1.25 1.25L6.5 6.25L11.75 1.25' stroke='%23d8c28b' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 13px) 50%;
}

@supports (appearance: base-select) {
  #spreadSelect,
  #interpretationEngineSelect,
  #compositionSelect {
    appearance: base-select;
    display: flex;
    align-items: center;
    background-image: none;
    padding: 3px 0.85rem 1px 0.72rem;
    line-height: 1.05;
  }

  #spreadSelect::picker-icon,
  #interpretationEngineSelect::picker-icon,
  #compositionSelect::picker-icon {
    content: "";
    inline-size: 13px;
    block-size: 8px;
    color: transparent;
    align-self: center;
    margin-inline-start: auto;
    margin-inline-end: 0;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8' fill='none'%3E%3Cpath d='M1.25 1.25L6.5 6.25L11.75 1.25' stroke='%23d8c28b' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / contain no-repeat;
    rotate: 0deg;
    translate: 0 0;
    transition: rotate 150ms ease;
  }

  #spreadSelect:open::picker-icon,
  #interpretationEngineSelect:open::picker-icon,
  #compositionSelect:open::picker-icon {
    rotate: 180deg;
  }

  ::picker(select) {
    appearance: base-select;
    margin-top: 4px;
    padding: 5px;
    overflow: clip;
    background: #0a0d11;
    border: 1px solid rgba(216, 194, 139, 0.18);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
  }

  ::picker(select) option {
    border-radius: 6px;
  }

  ::picker(select) option:checked,
  ::picker(select) option:hover,
  ::picker(select) option:focus,
  ::picker(select) option:active {
    background-color: #171b22 !important;
    background-image: linear-gradient(#171b22, #171b22) !important;
    box-shadow: inset 0 0 0 9999px #171b22 !important;
    color: #f3ead7 !important;
  }
}

input[type="url"] {
  min-height: 39px;
  padding: 0 0.7rem;
}

h1,
h2,
p {
  margin-top: 0;
}
