/* The Crab Champions wiki's start page, the landing page of the wiki and the
   save editor (Includes/Partials/CrabWikiHome.php). It opens with the game's
   Steam banner (CrabSuite.css); Home.css lays out the sections like the site's
   start page, and this adds the search under the banner, the search results,
   and the save editor's section with its steps. */

/* The site's start page spaces its sections for a few big statements; these hold more. */
.crab-landing {
  --hx-gap: clamp(3rem, 6vw, 4.75rem);
}

.crab-landing .crab-head {
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* The wiki's search, under the banner. */
.crab-home-search {
  max-width: 34rem;
  margin: 1.25rem 0 0;
}

.crab-home-search .cwiki-search {
  max-width: none;
}

/* The items the search finds, in place of the sections; nothing while it is empty. */
.crab-landing-results {
  padding: 0;
}

.crab-landing-results:has([data-cwiki-home-results]:not([hidden]), [data-cwiki-empty]:not([hidden])) {
  padding: 0 0 4rem;
}

.crab-landing-subtitle {
  margin: 2.25rem 0 0.9rem;
  color: var(--color-text-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

/* The save editor's section: what it changes beside how to edit a save. */
.crab-landing-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
}

.crab-landing-editor .crab-landing-subtitle {
  margin-top: 0;
}

.crab-landing-tool {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(var(--ds-link-rgb), 0.07), transparent 60%),
    var(--color-bg-card);
}

.crab-landing-features {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crab-landing-features li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.crab-landing-features i {
  flex: 0 0 1.2rem;
  color: var(--color-accent-blue);
  font-size: 0.9rem;
  text-align: center;
}

.crab-landing-tool-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: auto;
  padding-top: 1.75rem;
}

.crab-landing-tool-meta {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

/* Editing a save, in three steps: a number beside each. */
.crab-landing-steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crab-landing-step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--hx-rule);
}

.crab-landing-step-number {
  display: block;
  color: var(--color-accent-blue);
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.crab-landing-step h4 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
}

.crab-landing-step p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.crab-landing-path {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.8rem;
  padding: 0.35rem 0.35rem 0.35rem 0.7rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--ds-bg-code);
}

.crab-landing-path code {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-text-primary);
  font-size: 0.78rem;
  overflow-wrap: break-word; /* the path breaks after its backslashes (<wbr>) */
}

.crab-landing-path .icon-button.is-done {
  color: var(--color-success, var(--ds-success, #22c55e));
}

@media (max-width: 992px) {
  .crab-landing-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}
