@font-face {
  font-family: "Ioskeley Mono";
  src: url("../assets/fonts/IoskeleyMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body.wavecrate,
body.wavecrate button,
body.wavecrate input {
  font-family: "Ioskeley Mono", monospace;
}

body.wavecrate .wavecrate-header h1 {
  font-family: "Ioskeley Mono", monospace;
}

.wavecrate-hero {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.wavecrate-hero-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-button {
  display: inline-grid;
  place-items: center;
  min-width: 116px;
  min-height: 40px;
  text-decoration: none;
}

.hero-github-link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid #111;
  border-radius: 6px;
  color: #fff;
  background: #111;
  text-decoration: none;
}

.hero-github-link:hover,
.hero-github-link:focus-visible {
  color: #111;
  background: #fff;
}

.hero-github-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.hero-note,
.alpha-warning,
.section-copy p,
.workflow-list,
.problem-strip p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

.hero-note {
  max-width: 520px;
  font-size: 0.9rem;
}

.wavecrate-shot {
  margin: 0;
}

.wavecrate-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #111;
  background: #111;
}

.wavecrate-shot figcaption {
  margin-top: 8px;
  color: #555;
  line-height: 1.45;
}

.hero-shot {
  align-self: start;
}

.problem-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 34px;
}

.problem-strip p {
  min-height: 96px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
}

.problem-strip strong {
  display: block;
  margin-bottom: 5px;
  color: #111;
  font-weight: 400;
}

.positioning-section,
.usage-guide,
.wavecrate-chat,
.hotkey-guide {
  display: grid;
  gap: 18px;
  margin: 0 0 34px;
  padding-top: 18px;
  border-top: 1px solid #111;
}

.positioning-section h2,
.usage-guide h2,
.download-intro h2,
.wavecrate-chat h2,
.hotkey-guide h2 {
  margin: 4px 0 0;
  font-family: "Ioskeley Mono", monospace;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0;
}

.section-copy {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.loop-grid,
.comparison-grid,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.loop-grid section,
.comparison-grid section,
.usage-grid section,
.hotkey-card {
  min-height: 148px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
}

.loop-grid section {
  min-height: 132px;
}

.loop-grid h3,
.comparison-grid h3,
.usage-grid h3,
.hotkey-card h3 {
  margin: 0 0 8px;
  font-family: "Ioskeley Mono", monospace;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.loop-grid p,
.comparison-grid p,
.usage-grid p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

.jam-section {
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  align-items: start;
}

.workflow-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
  counter-reset: workflow-step;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
  counter-increment: workflow-step;
}

.workflow-list li::before {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #111;
  border-radius: 50%;
  color: #fff;
  background: #111;
  content: counter(workflow-step);
}

.download-intro {
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin-bottom: 18px;
}

.latest-release-log {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
}

.release-log-heading,
.changelog-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.release-log-link {
  color: #111;
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.release-log-link:hover,
.release-log-link:focus-visible {
  text-decoration-thickness: 2px;
}

.latest-release-log[hidden] {
  display: none;
}

.latest-release-log h2 {
  margin: 4px 0 0;
  font-family: "Ioskeley Mono", monospace;
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 0;
}

.release-log-content {
  display: grid;
  gap: 8px;
  color: #555;
  line-height: 1.45;
}

.release-log-content h3 {
  margin: 6px 0 0;
  color: #111;
  font-family: "Ioskeley Mono", monospace;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0;
}

.release-log-content h3:first-child {
  margin-top: 0;
}

.release-log-content p,
.release-log-content ul {
  margin: 0;
}

.release-log-content ul {
  display: grid;
  gap: 5px;
  padding-left: 20px;
}

.funding-panel {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
  scroll-margin-top: 18px;
}

.funding-heading,
.funding-row-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.funding-panel h2 {
  margin: 4px 0 0;
  font-family: "Ioskeley Mono", monospace;
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 0;
}

.funding-updated,
.funding-summary {
  margin: 0;
  color: #555;
  line-height: 1.45;
}

.funding-updated {
  max-width: 220px;
  font-size: 0.82rem;
  text-align: right;
}

.funding-bars {
  display: grid;
  gap: 12px;
}

.funding-row {
  display: grid;
  gap: 8px;
}

.funding-row-heading span {
  color: #555;
  line-height: 1.35;
}

.funding-row-heading strong {
  color: #111;
  font-weight: 400;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.funding-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid #111;
  border-radius: 4px;
  background: #f3f3f3;
}

.funding-bar {
  display: block;
  width: 0%;
  min-width: 0;
  height: 100%;
  transition: width 220ms ease;
}

.funding-bar-cost {
  background: #111;
}

.funding-bar-donations {
  background: #2d8668;
}

.funding-calculation {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid #dedede;
}

.funding-calculation div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #dedede;
}

.funding-calculation dt,
.funding-calculation dd {
  margin: 0;
}

.funding-calculation dt {
  display: grid;
  gap: 4px;
  color: #111;
  line-height: 1.35;
}

.funding-calculation dt span {
  color: #555;
  font-size: 0.88rem;
}

.funding-calculation dd {
  color: #111;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.release-channel-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
}

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

.release-channel-panel h2 {
  margin: 4px 0 0;
  font-family: "Ioskeley Mono", monospace;
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 0;
}

.release-channel-note {
  margin: 8px 0 0;
  color: #555;
  line-height: 1.45;
}

.release-channel-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.release-channel-option {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #111;
  border-radius: 6px;
  color: #111;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.release-channel-option[aria-current="true"] {
  color: #fff;
  background: #111;
}

.release-channel-option:hover,
.release-channel-option:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.release-channel-name,
.release-channel-detail {
  display: block;
  line-height: 1.35;
}

.release-channel-name {
  font-size: 1rem;
}

.release-channel-detail {
  color: #555;
  font-size: 0.84rem;
}

.release-channel-option[aria-current="true"] .release-channel-detail {
  color: #ddd;
}

.chat-identity,
.chat-status {
  margin: 0;
  color: #555;
  line-height: 1.45;
}

.chat-window {
  display: grid;
  gap: 12px;
  max-width: 760px;
  padding: 14px;
  border: 1px solid #111;
  border-radius: 6px;
  background: #fff;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #dedede;
  border-radius: 4px;
  background: #f8f8f8;
}

.chat-empty {
  margin: 0;
  color: #777;
  line-height: 1.45;
}

.chat-message {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e5e5;
}

.chat-message:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.chat-message-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.chat-message-author {
  color: #111;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.chat-message-time {
  color: #777;
  font-size: 0.82rem;
  white-space: nowrap;
}

.chat-message-body {
  margin: 0;
  color: #555;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.chat-input-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.chat-form textarea {
  width: 100%;
  min-height: 48px;
  max-height: 160px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #111;
  border-radius: 6px;
  color: #111;
  background: #fff;
  font: inherit;
  line-height: 1.35;
}

.chat-form textarea:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.chat-send {
  min-height: 48px;
}

.changelog-page {
  max-width: 900px;
}

.changelog-header {
  align-items: end;
}

.changelog-meta {
  margin: 8px 0 0;
  color: #555;
}

.changelog-history {
  margin-top: 18px;
}

.changelog-history .release-log-content {
  gap: 10px;
}

.alpha-warning {
  color: #333;
}

.hotkey-guide {
  margin-top: 34px;
}

.hotkey-note {
  margin: 8px 0 0;
  color: #555;
  line-height: 1.45;
}

.hotkey-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hotkey-highlights {
  max-width: 860px;
}

.hotkey-details {
  display: grid;
  gap: 12px;
}

.hotkey-details summary {
  width: fit-content;
  cursor: pointer;
  color: #111;
  font-family: "Ioskeley Mono", monospace;
  line-height: 1.35;
}

.hotkey-card {
  min-height: auto;
}

.hotkey-card dl {
  margin: 0;
}

.hotkey-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.46fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #dedede;
}

.hotkey-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.hotkey-row:last-child {
  padding-bottom: 0;
}

.hotkey-row dt,
.hotkey-row dd {
  margin: 0;
}

.hotkey-row dt {
  color: #111;
}

.hotkey-row dd {
  color: #555;
  line-height: 1.4;
}

.hotkey-guide kbd {
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid #111;
  border-radius: 4px;
  background: #f8f8f8;
  color: #111;
  font-family: "Ioskeley Mono", monospace;
  font-size: 0.88em;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .wavecrate-hero,
  .jam-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .wavecrate-hero {
    gap: 20px;
  }

  .problem-strip,
  .loop-grid,
  .comparison-grid,
  .usage-grid,
  .hotkey-list {
    grid-template-columns: 1fr;
  }

  .problem-strip p,
  .loop-grid section,
  .comparison-grid section,
  .usage-grid section {
    min-height: auto;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  }

  .hero-button {
    min-width: 0;
  }

  .hero-actions .download-button {
    padding: 0 10px;
  }

  .hotkey-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .chat-form,
  .chat-message-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-form {
    align-items: stretch;
  }

  .chat-send {
    width: 100%;
  }

  .release-log-heading,
  .funding-heading,
  .funding-row-heading,
  .changelog-header {
    display: grid;
    justify-content: stretch;
  }

  .funding-updated,
  .funding-row-heading strong {
    text-align: left;
  }

  .funding-calculation div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .funding-calculation dd {
    text-align: left;
  }

  .changelog-back-link {
    width: fit-content;
  }

  .release-channel-options {
    grid-template-columns: 1fr;
  }
}
