:root {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f0f2f5;
  color: #111;
  line-height: 1.4;
  --border: 1px solid #dce0e8;
  --focus: 0 0 0 2px rgba(33, 111, 237, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.hero {
  background-color: #f0f2f5;
}

.hero__content {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.hero-card {
  background: #fff;
  border: var(--border);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-card--stack {
  align-items: center;
}

.hero-card__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-card__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.hero-logo {
  width: 64px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.logo-tile {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.logo-red {
  background: #f25022;
}

.logo-green {
  background: #7fba00;
}

.logo-blue {
  background: #00a4ef;
}

.logo-yellow {
  background: #ffb900;
}

.hero-text h1 {
  margin: 0 0 0.5rem;
}

.eyebrow {
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  margin: 0 0 0.5rem;
}

.panel {
  background: #fff;
  border: var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 5px 25px rgba(15, 23, 42, 0.08);
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #374151;
}

.field input {
  width: 100%;
  border: var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  background-color: #fdfdfd;
}

.field input:focus,
.select-display:focus,
.select-search:focus {
  outline: none;
  box-shadow: var(--focus);
  border-color: #216fed;
}

.search-select {
  position: relative;
}

.select-display {
  width: 100%;
  border: var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  background: #fdfdfd;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
}

.select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  z-index: 10;
}

.select-panel[hidden] {
  display: none;
}

.select-search {
  width: 100%;
  border: var(--border);
  border-radius: 7px;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.4rem;
}

.select-options {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.select-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f2937;
  background: linear-gradient(90deg, #e0e7ff 0%, #f5f5f5 100%);
  padding: 0.6rem 0.65rem 0.3rem;
  border-top: 1px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}

.select-heading:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(67, 56, 202, 0.6);
}

.select-heading .chevron {
  font-size: 0.85rem;
  color: #4338ca;
}

.select-heading.is-collapsed .chevron {
  transform: rotate(0deg);
}
.select-options li:not(.select-heading) {
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.option-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: #1f2937;
}

.option-code {
  font-size: 0.85rem;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  border: 1px solid #c7d2fe;
}

.select-options li:not(.select-heading) strong {
  font-size: 0.9rem;
}

.option-subline {
  font-size: 0.75rem;
  color: #6b7280;
  display: block;
}

.select-options li:not(.select-heading):hover,
.select-options li[aria-selected='true'] {
  background-color: #eff6ff;
}

.resource-meta {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 9px;
  background: #f6f8fb;
  border: 1px dashed #cbd5f5;
  font-size: 0.9rem;
  color: #1f2933;
}

.resource-meta strong {
  font-size: 1rem;
}

.resource-meta code {
  background: #e2e8f0;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  word-break: break-word;
}

.resource-meta .muted {
  color: #6b7280;
  margin-top: 0.4rem;
}

.muted {
  color: #94a3b8;
}

.resource-meta__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.resource-meta__chip {
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.resource-meta__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0.5rem;
}

.resource-meta__label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 0.15rem;
}

.output {
  border: 1px solid #a7c4ff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  background: #fdfefe;
  min-height: 56px;
  display: flex;
  align-items: center;
}

.output code {
  font-size: 1.15rem;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  color: #0f172a;
  word-break: break-all;
}

.output[data-too-long=\"true\"] {
  border-color: #f97316;
  background: #fff7ec;
}

.copy-btn {
  margin-top: 0.75rem;
  border: 1px solid #216fed;
  background: #216fed;
  color: #fff;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: #1853b4;
}

.copy-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #9db8f6;
  border-color: #9db8f6;
}

#copyStatus {
  margin-left: 0.75rem;
  color: #166534;
  font-size: 0.85rem;
}

footer {
  text-align: center;
  padding: 1rem 0 2rem;
  color: #6b7280;
  font-size: 0.85rem;
}

footer a {
  color: inherit;
}

footer small {
  display: block;
}

footer small + small {
  margin-top: 0.25rem;
}

.site-footer {
  text-align: center;
  padding: 0.5rem 1rem 2rem;
  color: #4b5563;
  font-size: 0.9rem;
}

.site-footer a {
  color: #2563eb;
  font-weight: 600;
}

@media (max-width: 640px) {
  .panel {
    padding: 1.25rem;
  }

  .hero__content {
    padding: 2.5rem 1.25rem 1.75rem;
  }
}
