
/* ============================================================
   Mobile: Category headers & Board rows
   ============================================================ */

/* --- Category header: icon + title on one line, desc below - */
.kf-category__header {
  display: flex;
  flex-wrap: wrap;        /* allow wrapping */
  align-items: center;
  gap: 0;
  padding: 12px 18px;
}
.kf-category__icon {
  font-size: 1rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  line-height: 1.6;
}
.kf-category__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--pur-700);
  white-space: nowrap;          /* never wraps mid-word */
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  padding-left: 8px;
  line-height: 1.5;
}
.kf-category__desc {
  font-size: 0.8rem;
  color: var(--text-3);
  width: 100%;                  /* always its own row */
  padding-left: 32px;           /* indent under the icon */
  margin-top: 2px;
  line-height: 1.4;
}

/* ============================================================
   Board rows — clean mobile-first layout
   ============================================================ */

/* The board article: simple column stack on mobile */
.kf-board {
  display: block !important;   /* override any grid from forum.css */
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  grid-template-columns: unset !important;
}
.kf-board:last-child { border-bottom: none; }
.kf-board:hover      { background: var(--bg-alt); }

/* ── Row 1: icon + title + inline stats ─────────────────── */
.kf-board__top {
  display: flex !important;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

/* Icon: fixed-width column, consistent on every board */
.kf-board__icon {
  font-size: 0.85rem !important;
  color: var(--accent);
  width: 22px !important;
  min-width: 22px !important;
  text-align: center;
  flex-shrink: 0 !important;
  padding-top: 3px;
  line-height: 1.4;
}

/* Info: fills remaining space, clips if needed */
.kf-board__info {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
}
.kf-board__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: block;
  line-height: 1.4;
  transition: color 0.15s;
  white-space: normal;
}
.kf-board__title:hover { color: var(--accent); text-decoration: none; }
.kf-board__desc {
  font-size: 0.76rem;
  color: var(--text-3);
  margin-top: 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stats: two small pills, right-aligned, no wrap */
.kf-board__stats {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 1px;
}
.kf-board__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  min-width: 32px;
}
.kf-board__stat-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kf-board__stat-label {
  font-size: 0.58rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Row 2: last post — full width below ─────────────────── */
.kf-board__last {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
  margin-top: 7px;
  padding-top: 7px;
  padding-left: 32px;   /* aligns with title text, under icon */
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--text-3);
}
.kf-board__last-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-3);
  flex-shrink: 0;
}
.kf-board__last-thread {
  color: var(--text-2);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(280px, calc(100vw - 120px));
  display: inline-block;
}
.kf-board__last-thread:hover { color: var(--accent); text-decoration: none; }
.kf-board__last-user { color: var(--text-3); font-size: 0.72rem; flex-shrink: 0; }
.kf-board__no-post {
  color: var(--text-3);
  font-size: 0.74rem;
  margin-top: 6px;
  padding-top: 6px;
  padding-left: 32px;
  border-top: 1px solid var(--border);
}

/* Subboard pills */
.kf-subboards { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.kf-subboard-link {
  font-size: 0.7rem; color: var(--accent);
  background: var(--accent-soft); padding: 2px 8px;
  border-radius: 100px; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  transition: all 0.12s;
}
.kf-subboard-link:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ── Wide screens: 3-column grid ─────────────────────────── */
@media (min-width: 860px) {
  .kf-board {
    display: grid !important;
    grid-template-columns: 1fr 100px 170px !important;
    grid-template-rows: auto !important;
    align-items: center;
    padding: 14px 20px !important;
  }
  .kf-board__top   { grid-column: 1; grid-row: 1; }
  .kf-board__stats {
    grid-column: 2; grid-row: 1;
    justify-content: center;
    padding-top: 0;
  }
  .kf-board__last {
    grid-column: 3; grid-row: 1;
    margin-top: 0; padding-top: 0; padding-left: 0;
    border-top: none;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 2px;
  }
  .kf-board__last-thread { max-width: 155px; }
  .kf-board__no-post { margin-top: 0; padding-top: 0; padding-left: 0; border-top: none; text-align: right; }
}

/* Override forum.css board icon (was 1.4rem, centered — caused large floating icon) */
.kf-board__icon,
.kf-board__icon i {
  font-size: 0.85rem !important;
  width: 22px !important;
  display: inline-block;
  text-align: center;
}
