:root {
  --night-ink: #101020;
  --deep-panel: #202030;
  --strange-purple: #8f4dff;
  --true-cyan: #5fd8ff;
  --idea-gold: #ffd166;
  --help-green: #62f6a5;
  --aura-pink: #ff7ad9;
  --soft-white: #f7f3ff;
  --muted-light: #c9c3de;
  --ink-text: #17202a;
  --heading: "Nunito Sans", "Avenir Next", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", "Source Sans 3", Arial, sans-serif;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(143, 77, 255, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 16%, rgba(255, 122, 217, 0.15), transparent 24rem),
    radial-gradient(circle at 52% 86%, rgba(95, 216, 255, 0.15), transparent 30rem),
    var(--night-ink);
  color: var(--soft-white);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 20;
  padding: 0.6rem 0.8rem;
  background: var(--idea-gold);
  color: var(--ink-text);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(247, 243, 255, 0.12);
  background: rgba(16, 16, 32, 0.92);
  backdrop-filter: blur(16px);
}

.nav,
.page-hero,
.section,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.brand-mark {
  display: grid;
  color: var(--soft-white);
  font-family: var(--heading);
  font-weight: 900;
  line-height: 0.95;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-strange {
  color: var(--strange-purple);
  text-shadow: 0 0 12px rgba(143, 77, 255, 0.8);
}

.brand-but {
  color: var(--true-cyan);
  text-shadow: 0 0 12px rgba(95, 216, 255, 0.8);
}

.brand-true {
  color: var(--idea-gold);
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.7);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
}

.nav-links a,
.nav-delete {
  color: var(--muted-light);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--true-cyan);
}

.nav-delete {
  border: 0;
  background: transparent;
  color: var(--idea-gold);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(95, 216, 255, 0.35);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  background: rgba(32, 32, 48, 0.88);
  color: var(--true-cyan);
  cursor: pointer;
  font-family: var(--heading);
  font-size: 0.92rem;
  font-weight: 900;
}

main {
  animation: page-in 360ms ease both;
}

.page-hero {
  display: grid;
  min-height: calc(100vh - 74px);
  align-items: center;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 0.94fr) minmax(300px, 0.82fr);
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.page-hero.compact {
  min-height: auto;
  padding-top: 4rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--help-green);
  font-family: var(--heading);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--heading);
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 6.3vw, 5.2rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.7rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0;
}

.hero-lede,
.muted,
.card p,
.field-hint,
.instructions,
.instructions li {
  color: var(--muted-light);
}

.hero-lede {
  max-width: 39rem;
  margin-top: 1.35rem;
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
}

.section-intro {
  max-width: 48rem;
  margin-top: 1rem;
  margin-bottom: 1.6rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-width: 10rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-family: var(--heading);
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  background: var(--strange-purple);
  box-shadow: 0 0 22px rgba(143, 77, 255, 0.72);
  color: var(--soft-white);
}

.button.secondary {
  border: 1px solid rgba(95, 216, 255, 0.75);
  background: transparent;
  color: var(--true-cyan);
}

.button.gold {
  background: var(--idea-gold);
  color: var(--ink-text);
}

.button.danger {
  border: 1px solid rgba(255, 209, 102, 0.65);
  background: transparent;
  color: var(--idea-gold);
}

.aura-panel,
.card,
.form-panel,
.instructions {
  border: 1px solid rgba(247, 243, 255, 0.12);
  border-radius: 8px;
  background: rgba(32, 32, 48, 0.92);
}

.aura-panel {
  position: relative;
  overflow: hidden;
  min-height: 27rem;
  padding: 1.25rem;
}

.aura-panel::before {
  position: absolute;
  inset: -22%;
  content: "";
  background:
    radial-gradient(circle at 18% 26%, rgba(143, 77, 255, 0.42), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(255, 122, 217, 0.3), transparent 26%),
    radial-gradient(circle at 50% 86%, rgba(95, 216, 255, 0.24), transparent 32%);
  animation: auraGlow 12s ease-in-out infinite alternate;
}

.aura-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 24rem;
  align-content: end;
  gap: 0.8rem;
}

.aura-title {
  max-width: 14rem;
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 0.98;
}

.section {
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.component-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.card {
  padding: 1.25rem;
}

.card h3 {
  color: var(--true-cyan);
}

.card p {
  margin-top: 0.65rem;
}

.component-layout,
.output-layout {
  display: grid;
  align-items: start;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.44fr);
}

.form-panel,
.instructions {
  padding: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1.15rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-family: var(--heading);
  font-weight: 900;
}

.field-hint {
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(95, 216, 255, 0.24);
  border-radius: 8px;
  outline: none;
  background: rgba(5, 5, 13, 0.52);
  color: var(--soft-white);
}

input {
  min-height: 3rem;
  padding: 0 0.85rem;
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
  padding: 0.85rem;
}

input:focus,
textarea:focus {
  border-color: rgba(95, 216, 255, 0.78);
  box-shadow: 0 0 0 4px rgba(95, 216, 255, 0.12);
}

.markdown-output {
  min-height: 38rem;
  white-space: pre-wrap;
}

.status {
  min-height: 1.4rem;
  margin-top: 1rem;
  color: var(--help-green);
  font-weight: 700;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(247, 243, 255, 0.12);
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  color: var(--muted-light);
}

.site-footer a {
  color: var(--true-cyan);
}

@media (max-width: 900px) {
  .page-hero,
  .component-layout,
  .output-layout {
    grid-template-columns: 1fr;
  }

  .component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: calc(100% - 0.2rem);
    right: 1.25rem;
    display: none;
    width: min(18rem, calc(100vw - 2.5rem));
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(95, 216, 255, 0.28);
    border-radius: 8px;
    padding: 0.55rem;
    background: rgba(16, 16, 32, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a,
  .nav-delete {
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    text-align: left;
  }

  .actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auraGlow {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(2%, 1%, 0) scale(1.08);
  }
}
