:root {
  --ink: #071112;
  --deep: #102022;
  --panel: rgba(17, 31, 34, 0.94);
  --panel-strong: #172b2e;
  --text: #f7fbf7;
  --soft: #cfe0db;
  --muted: #9eb5af;
  --line: rgba(213, 242, 234, 0.16);
  --aqua: #78e9d3;
  --green: #8ef0a4;
  --gold: #f2c766;
  --coral: #ff8b74;
  --violet: #a88cff;
  --heading: "Nunito Sans", "Avenir Next", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", Arial, sans-serif;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 8% 0, rgba(120, 233, 211, 0.2), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(242, 199, 102, 0.13), transparent 26rem),
    linear-gradient(145deg, #071112, #0e1b1d 48%, #121924);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  background:
    linear-gradient(90deg, rgba(120, 233, 211, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(242, 199, 102, 0.04) 1px, transparent 1px);
  background-size: 86px 86px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: inherit;
}

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

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

.site-header {
  background: rgba(7, 17, 18, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0.8rem 1.25rem;
}

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

.brand-mark span:first-child {
  color: var(--aqua);
  text-shadow: 0 0 16px rgba(120, 233, 211, 0.42);
}

.brand-mark span:last-child {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(242, 199, 102, 0.28);
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 0.88rem;
}

.nav-links a {
  color: var(--muted);
  font-family: var(--heading);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a[aria-current="page"] {
  color: var(--aqua);
}

.nav-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(120, 233, 211, 0.48);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  gap: 0.23rem;
  height: 2.65rem;
  justify-content: center;
  width: 2.85rem;
}

.nav-toggle span {
  background: var(--aqua);
  display: block;
  height: 2px;
  width: 1.15rem;
}

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

.hero {
  align-items: center;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.82fr);
  min-height: calc(100vh - 70px);
  padding-bottom: 4rem;
  padding-top: 4.5rem;
}

.page-hero {
  padding-bottom: 3rem;
  padding-top: 5rem;
}

.section {
  padding-bottom: clamp(3.25rem, 7vw, 5.7rem);
  padding-top: clamp(3.25rem, 7vw, 5.7rem);
}

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

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

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

h2 {
  font-size: clamp(2rem, 4.7vw, 3.65rem);
  max-width: 13ch;
}

h3 {
  font-size: 1.26rem;
}

p {
  margin: 0;
  overflow-wrap: anywhere;
}

.hero-lede {
  color: var(--soft);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  margin-top: 1.25rem;
  max-width: 58rem;
}

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

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

.button.primary {
  background: var(--aqua);
  border: 1px solid var(--aqua);
  color: var(--ink);
}

.button.secondary {
  background: rgba(7, 17, 18, 0.42);
  border: 1px solid rgba(120, 233, 211, 0.34);
  color: var(--text);
}

.button.danger {
  background: rgba(255, 139, 116, 0.12);
  border: 1px solid rgba(255, 139, 116, 0.45);
  color: var(--text);
}

.gear-board {
  background: linear-gradient(160deg, rgba(23, 43, 46, 0.96), rgba(9, 20, 22, 0.96));
  border: 1px solid rgba(120, 233, 211, 0.22);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.board-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
}

.board-header span {
  background: var(--muted);
  border-radius: 999px;
  height: 0.62rem;
  width: 0.62rem;
}

.board-header span:nth-child(1) {
  background: var(--coral);
}

.board-header span:nth-child(2) {
  background: var(--gold);
}

.board-header span:nth-child(3) {
  background: var(--green);
}

.board-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem;
}

.gear-tile {
  background: rgba(7, 17, 18, 0.66);
  border: 1px solid rgba(213, 242, 234, 0.13);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  min-height: 7rem;
  padding: 1rem;
}

.gear-tile.wide {
  grid-column: 1 / -1;
}

.gear-tile.accent {
  border-color: rgba(242, 199, 102, 0.42);
}

.gear-tile strong {
  color: var(--aqua);
  font-family: var(--heading);
  font-size: 1.2rem;
}

.gear-tile span {
  color: var(--muted);
}

.intro-band {
  background: rgba(120, 233, 211, 0.09);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-family: var(--heading);
  font-weight: 800;
  padding: 1rem 1.25rem;
  text-align: center;
}

.section-heading {
  max-width: 64rem;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 0.85rem;
}

.tool-grid,
.related-grid,
.brief-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2rem;
}

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

.tool-card,
.related-card,
.brief-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 0.75rem;
  min-height: 13rem;
  padding: 1.1rem;
  text-decoration: none;
}

.tool-card:hover,
.tool-card:focus,
.related-card:hover,
.related-card:focus {
  border-color: rgba(120, 233, 211, 0.55);
}

.tool-card span,
.brief-card span {
  color: var(--gold);
  font-family: var(--heading);
  font-size: 0.82rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.tool-card p,
.related-card p,
.brief-card p,
.page-copy {
  color: var(--muted);
}

.page-copy {
  margin-top: 1rem;
}

.split-section {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.42fr);
}

.link-stack {
  display: grid;
  gap: 0.7rem;
}

.link-stack a {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--aqua);
  font-family: var(--heading);
  font-weight: 900;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.builder-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.72fr);
  padding-top: 2rem;
}

.builder-form,
.output-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 1.1rem;
}

.builder-form {
  display: grid;
  gap: 1rem;
}

.builder-form fieldset {
  border: 1px solid rgba(120, 233, 211, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  margin: 0;
  min-inline-size: 0;
  padding: 1rem;
}

.builder-form legend,
.output-panel > label {
  color: var(--gold);
  font-family: var(--heading);
  font-weight: 900;
  padding: 0 0.35rem;
}

.builder-form label,
.output-panel > label {
  color: var(--soft);
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.builder-form input,
.builder-form textarea,
.builder-form select,
.markdown-output {
  background: rgba(7, 17, 18, 0.72);
  border: 1px solid rgba(120, 233, 211, 0.22);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-width: 0;
  padding: 0.72rem 0.78rem;
  width: 100%;
}

.builder-form textarea {
  min-height: 6.4rem;
  resize: vertical;
}

.builder-form input:focus,
.builder-form textarea:focus,
.builder-form select:focus,
.markdown-output:focus {
  border-color: rgba(120, 233, 211, 0.82);
  outline: none;
}

.builder-form ::placeholder {
  color: rgba(207, 224, 219, 0.48);
}

.field-group {
  display: grid;
  gap: 0.65rem;
}

.field-group > p {
  color: var(--soft);
  font-size: 0.92rem;
}

.option-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-grid label {
  align-items: start;
  background: rgba(7, 17, 18, 0.48);
  border: 1px solid rgba(120, 233, 211, 0.14);
  border-radius: 8px;
  color: var(--soft);
  display: grid;
  gap: 0.45rem;
  grid-template-columns: auto minmax(0, 1fr);
  line-height: 1.25;
  padding: 0.68rem 0.72rem;
}

.option-grid input {
  accent-color: var(--aqua);
  height: 1.05rem;
  margin: 0.1rem 0 0;
  padding: 0;
  width: 1.05rem;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.builder-actions .button {
  min-width: 0;
}

.status {
  color: var(--green);
  font-family: var(--heading);
  font-size: 0.9rem;
  font-weight: 900;
  min-height: 1.4rem;
}

.output-panel {
  display: grid;
  gap: 0.7rem;
  position: sticky;
  top: 6rem;
}

.markdown-output {
  color: var(--soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 46rem;
  resize: vertical;
  white-space: pre-wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-bottom: 2rem;
  padding-top: 2rem;
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: none;
    padding: 0.75rem;
    position: absolute;
    right: 1rem;
    top: 4.2rem;
    width: min(18rem, calc(100vw - 2rem));
  }

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

  .hero,
  .split-section,
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .output-panel {
    position: static;
  }

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

@media (max-width: 620px) {
  .hero,
  .page-hero,
  .section,
  .site-footer {
    max-width: 100vw;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
  }

  .hero {
    padding-bottom: 3.5rem;
    padding-top: 3.75rem;
  }

  .page-hero {
    padding-bottom: 2.25rem;
    padding-top: 3.25rem;
  }

  h1 {
    font-size: clamp(2.3rem, 10vw, 2.9rem);
  }

  h2 {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }

  .tool-grid,
  .related-grid,
  .brief-grid,
  .option-grid,
  .option-grid.compact,
  .board-grid {
    grid-template-columns: 1fr;
  }

  .button,
  .builder-actions .button {
    width: 100%;
  }

  .builder-form,
  .output-panel {
    padding: 0.85rem;
  }

  .builder-form fieldset {
    padding: 0.85rem;
  }
}
