:root {
  --black: #050505;
  --ink: #111111;
  --paper: #ffffff;
  --soft: #f3f3f3;
  --muted: #666666;
  --line: rgba(17, 17, 17, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

.top-links {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100vw - 28px);
}

.top-links a,
.top-links button,
.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.top-links a:hover,
.top-links a:focus-visible,
.top-links button:hover,
.top-links button:focus-visible,
.modal-btn:hover,
.modal-btn:focus-visible {
  border-color: var(--black);
  background: var(--black);
  color: var(--paper);
  outline: none;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 78px 20px 36px;
}

.hero-panel {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 1.16fr) minmax(300px, 0.84fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-column {
  min-height: 560px;
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  align-content: center;
  gap: 18px;
  background: var(--black);
  color: var(--paper);
}

.main-icon {
  width: clamp(108px, 16vw, 170px);
  height: auto;
  display: block;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: var(--paper);
}

.badge {
  margin: 0;
  color: #cfcfcf;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.subhead {
  margin: 0;
  max-width: 48ch;
  color: #d4d4d4;
  font-size: 1.04rem;
  line-height: 1.55;
}

.panel {
  padding: clamp(26px, 5vw, 58px);
  display: grid;
  align-content: center;
  gap: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.controls {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
}

.select-wrap {
  position: relative;
}

select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

select:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.output {
  min-height: 154px;
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 22px;
}

.output-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

#selected-item {
  min-height: 42px;
  color: var(--black);
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  justify-content: flex-start;
}

.my-button {
  min-height: 42px;
  border: 1px solid var(--black);
  border-radius: 999px;
  padding: 9px 17px;
  background: var(--black);
  color: var(--paper);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.my-button:hover,
.my-button:focus-visible {
  background: var(--paper);
  color: var(--black);
  outline: none;
}

.help-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.48);
  z-index: 40;
}

.help-overlay.open {
  display: grid;
}

.help-modal {
  width: min(540px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  padding: 24px;
}

.help-modal h2 {
  margin: 0;
  font-size: 1.85rem;
}

.help-modal p,
.help-list {
  color: var(--muted);
  line-height: 1.55;
}

.help-modal p,
.help-list {
  margin-top: 0;
}

.help-list {
  padding-left: 20px;
}

.help-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .brand-column {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .stage {
    padding: 106px 14px 24px;
  }

  .top-links {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .top-links a,
  .top-links button {
    flex: 1 1 auto;
  }

  .my-button {
    width: 100%;
  }
}
