:root {
  --bg: #0a0a0a;
  --panel: #121212;
  --panel-2: #181818;
  --line: #2e2e2e;
  --line-strong: #454545;
  --text: #ededea;
  --muted: #84837c;
  --accent: #e6a13b;
  --accent-dim: #8a6a2f;
  --accent-text: #0a0a0a;
  --good: #7fa876;
  --bad: #c2604d;
  --warn: #c98a3d;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

a {
  text-decoration: underline wavy;
  color: var(--accent);
}

code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 1px 5px;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

.wrap {
  width: 100%;
  max-width: 900px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brand b {
  color: var(--text);
  font-weight: 600;
  letter-spacing: .06em;
}

.brand .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.stepper {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 22px;
  align-items: center;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  position: relative;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.stepper-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}

.stepper-item.active .stepper-num {
  border-color: var(--accent);
  color: var(--accent);
}

.stepper-item.active .stepper-label {
  color: var(--text);
}

.stepper-item.done .stepper-num {
  background: var(--good);
  border-color: var(--good);
  color: var(--bg);
}

.stepper-item.done .stepper-label {
  color: var(--muted);
}

@media (max-width: 560px) {
  .stepper-label {
    display: none;
  }

  .stepper-item {
    padding: 0 10px;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.step-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.card h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 19px;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

.step-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 20px;
}

.subsection {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 4px;
}

.subsection-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.subsection-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 18px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 7px;
}

.field .hint {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 9px;
  line-height: 1.5;
}

textarea,
input[type="text"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color .12s ease;
}

textarea:focus,
input[type="text"]:focus {
  border-color: var(--accent);
}

.filerow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.filelabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
  line-height: 1.4;
  height: 34px;
}

.filelabel.wide {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 14px;
  height: auto;
}

.filelabel:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.filelabel input {
  display: none;
}

button.secondary {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
  line-height: 1.4;
  height: 34px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

button.secondary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.token-count {
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin-left: 10px;
}

.placeholder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.placeholder-row {
  display: grid;
  grid-template-columns: 0.2fr 1fr;
  gap: 10px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.placeholder-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 4px 9px;
  white-space: nowrap;
}

.placeholder-select,
.select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  outline: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 6px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.checkrow {
  margin-bottom: 12px;
}

.checkrow-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.checkrow-label input[type="checkbox"] {
  margin: 0;
}

.help-text {
  display: block;
  margin-left: 28px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.actions button {
  flex: 1;
  justify-content: center;
  height: auto;
  padding: 12px 18px;
  font-size: 14px;
}

button.primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease;
}

button.primary:hover {
  background: #f0b055;
}

button.primary:active {
  background: var(--accent-dim);
}

.errormessage {
  color: var(--bad);
  font-size: 12px;
  margin-top: 9px;
  font-family: 'JetBrains Mono', monospace;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.results-head h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  margin: 0;
}

.filegrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 700px) {
  .filegrid {
    grid-template-columns: 1fr;
  }
}

.filecard {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.filecard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.filecard-head .fname {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex-gap {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.filecard-head .copy {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
}

.filecard-head .copy:hover {
  color: var(--text);
}

.filecard textarea {
  width: 100%;
  height: 340px;
  background: transparent;
  border: none;
  border-radius: 0;
  resize: vertical;
  font-size: 11.5px;
  padding: 12px;
}

.css-card textarea {
  height: 160px;
}

.note {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--panel-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 16px;
}

button.download-all {
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}

button.download-all:hover {
  border-color: var(--accent);
  background: var(--panel);
}

.fallback-toggle {
  display: inline-block;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
  margin-bottom: 20px;
}

.fallback-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.detect-panel {
  margin: -6px 0 20px;
  padding: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
}

.detect-panel .field:last-of-type,
.detect-panel .field:only-child {
  margin-bottom: 0;
}

.detect-panel-title {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.detect-panel-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.detect-panel .fallback-toggle {
  margin-bottom: 16px;
}

.detect-panel #php-fallback-field {
  margin-bottom: 0;
}

.hidden {
  display: none !important;
}

.site-footer {
  margin-top: 32px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
  transition: color .12s ease;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.reference-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.reference-details summary {
  padding: 10px 14px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  list-style: none;
}

.reference-details summary::-webkit-details-marker {
  display: none;
}

.reference-details summary:hover {
  background: var(--panel);
}

.ref-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 16px;
  padding: 10px 14px;
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.ref-item {
  display: contents;
}

.ref-item>code:first-child {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 1px 6px;
  white-space: nowrap;
  font-weight: 600;
}

.ref-label {
  color: var(--text);
}

.ref-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.ref-aliases code {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 1px 6px;
  font-size: 11px;
  white-space: nowrap;
}