/* 247999.xyz v0.3.0 public guides and tools-directory search.
 *
 * Scoped styles for /guides, a single guide page, and the client-side search
 * on /tools. Palette, spacing, shape, and dark-theme tokens come from
 * site.css; nothing here redefines a shared component. Mobile-first: base
 * rules target a narrow screen and wider layouts are added with min-width
 * queries.
 */

/* ------------------------------------------------------------ guides list */

.guide-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .guide-grid--related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.guide-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.guide-card__top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.guide-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--lime-wash);
  color: var(--ink);
}

.guide-card__title {
  margin: 0;
  font-size: 18px;
}

.guide-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.guide-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.guide-card__cta svg {
  flex: none;
}

/* ------------------------------------------------------------- breadcrumb */

.guide-breadcrumb {
  padding-top: var(--space-5);
}

.guide-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-muted);
}

.guide-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.guide-breadcrumb li:not(:first-child)::before {
  content: "/";
  color: var(--line-strong);
}

.guide-breadcrumb a {
  color: var(--ink-muted);
}

/* ------------------------------------------------------------- guide body */

.guide-head {
  padding-bottom: 0;
}

.guide-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.guide-section h2 {
  font-size: 21px;
}

.guide-section p {
  margin: var(--space-3) 0 0;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-steps li {
  position: relative;
  padding-left: 38px;
  counter-increment: guide-step;
}

.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--ink-on-lime);
  font-size: 13px;
  font-weight: 700;
}

.guide-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  padding-left: var(--space-5);
}

.guide-limits {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.guide-limits li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.guide-limits svg {
  flex: none;
  margin-top: 3px;
  color: var(--warning);
}

.guide-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
}

.guide-back svg {
  flex: none;
}

.guide-references {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-5);
}

.guide-references__url {
  display: block;
  color: var(--ink-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------- tools directory search */

.tool-search {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.tool-search__field {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.tool-search__icon {
  position: absolute;
  top: 50%;
  left: 13px;
  display: inline-flex;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}

.tool-search .input {
  flex: 1 1 12rem;
  min-width: 0;
  padding-left: 40px;
}

/* The visible Clear button is the one control, so the browser's own search
 * reset is hidden to keep a single clear affordance in the field. */
.tool-search .input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.tool-search__reset {
  flex: none;
}

.tool-search__count {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.tool-search__empty {
  margin: 0;
  padding: var(--space-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  font-size: 14px;
}
