:root {
  --ink: #060607;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.045);
  --panel-3: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f0ec;
  --text-dim: #a8adb3;
  --text-faint: #6b7078;
  --orange: #f0940c;
  --orange-2: #ff7a1a;
  --green: #3fb56f;
  --red: #e6503f;
  --blue: #3f8cf2;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  text-align: center;
}

.wordmark {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.wordmark-gun {
  color: var(--text);
}

.wordmark-broker {
  color: var(--orange);
}

.subtitle {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.intro {
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
  margin: -8px 0 0;
  line-height: 1.5;
}

.quick-selects {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.quick-selects-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.chip:hover {
  border-color: var(--orange);
  background: var(--panel-3);
}

.chip:active {
  transform: scale(0.97);
}

.chip .chip-state {
  color: var(--text);
  font-weight: 600;
}

.chip .chip-sep {
  color: var(--text-faint);
  margin: 0 4px;
}

.chip .chip-cat {
  color: var(--orange);
  font-weight: 600;
}

.selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selector-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.selector {
  appearance: none;
  -webkit-appearance: none;
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a8adb3' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 40px 14px 16px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.selector:hover {
  border-color: var(--text-faint);
}

.selector:focus {
  outline: none;
  border-color: var(--orange);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-faint);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 14px;
  opacity: 0.6;
}

.empty-state p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}

.results-panel {
  background: linear-gradient(180deg, var(--panel-3), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

[hidden] {
  display: none !important;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.results-title {
  font-size: 18px;
  font-weight: 700;
}

.results-title span#resultCategory {
  color: var(--orange);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge-green {
  background: rgba(63, 181, 111, 0.14);
  color: var(--green);
}

.badge-yellow {
  background: rgba(240, 148, 12, 0.14);
  color: var(--orange);
}

.badge-red {
  background: rgba(230, 80, 63, 0.14);
  color: var(--red);
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rule-card {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.rule-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.rule-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.note-box {
  display: flex;
  gap: 12px;
  background: rgba(240, 148, 12, 0.08);
  border: 1px solid rgba(240, 148, 12, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
}

.note-icon {
  color: var(--orange);
  font-size: 16px;
  line-height: 1.5;
}

.note-text {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, opacity 0.15s ease;
  flex: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--orange);
  color: #1a1300;
}

.btn-primary:hover {
  background: var(--orange-2);
}

.btn-ghost {
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  flex: 0 0 auto;
}

.btn-ghost:hover {
  background: var(--line);
}

.success-state {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(63, 181, 111, 0.1);
  border: 1px solid rgba(63, 181, 111, 0.3);
  border-radius: 14px;
  padding: 16px 18px;
}

.success-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #0a1a10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.success-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.disclaimer {
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-faint);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .page {
    padding: 40px 16px 32px;
  }

  .wordmark {
    font-size: 28px;
  }

  .selectors {
    grid-template-columns: 1fr;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
  }

  .btn-ghost {
    flex: 1;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
