/*
 * AstroForge Knowledge Base — Frontend Styles
 * Version: 1.3.0
 */

/* ------------------------------------------------------------------
   Reset / base
   ------------------------------------------------------------------ */
.akb-single,
.akb-archive {
	max-width: 860px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
}

/* ------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------ */
.akb-breadcrumb {
	font-size: 0.875rem;
	color: #666;
	margin-bottom: 0.75rem;
}
.akb-breadcrumb a { color: inherit; text-decoration: none; }
.akb-breadcrumb a:hover { text-decoration: underline; }
.akb-breadcrumb__sep { margin: 0 0.35rem; }

/* ------------------------------------------------------------------
   Status banner
   ------------------------------------------------------------------ */
.akb-status-banner {
	background: #fff3cd;
	border-left: 4px solid #d4a017;
	padding: 0.6rem 1rem;
	margin-bottom: 1.25rem;
	font-size: 0.9rem;
	border-radius: 2px;
}

/* ------------------------------------------------------------------
   Single article
   ------------------------------------------------------------------ */
.akb-article__title {
	font-size: 1.75rem;
	line-height: 1.25;
	margin: 0 0 0.5rem;
}
.akb-article__meta {
	font-size: 0.8rem;
	color: #888;
	margin-bottom: 1.5rem;
}
.akb-article__meta span + span::before {
	content: " · ";
}
.akb-article__body {
	line-height: 1.7;
}
.akb-article__footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e5e5;
	font-size: 0.875rem;
}
.akb-article__tags {
	display: inline;
	list-style: none;
	margin: 0;
	padding: 0;
}
.akb-article__tags li {
	display: inline;
}
.akb-article__tags li + li::before {
	content: ", ";
}
.akb-article__tags a {
	color: #555;
	text-decoration: none;
}
.akb-article__tags a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   Helpful voting
   ------------------------------------------------------------------ */
.akb-helpful {
	margin-top: 2.5rem;
	padding: 1.25rem;
	background: #f7f7f7;
	border-radius: 6px;
	text-align: center;
}
.akb-helpful__question {
	font-weight: 600;
	margin: 0 0 0.75rem;
}
.akb-helpful__buttons {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
}
.akb-helpful__btn {
	padding: 0.45rem 1.25rem;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95rem;
	transition: background 0.15s, border-color 0.15s;
}
.akb-helpful__btn:hover { background: #e8f0fe; border-color: #4285f4; }
.akb-helpful__btn--yes:hover { border-color: #197a43; background: #e6f4ea; }
.akb-helpful__btn--no:hover  { border-color: #a00;    background: #fce8e6; }
.akb-helpful__thanks { font-style: italic; color: #555; margin: 0.75rem 0 0; }

/* ------------------------------------------------------------------
   Related articles
   ------------------------------------------------------------------ */
.akb-related {
	margin-top: 2.5rem;
}
.akb-related__title {
	font-size: 1.1rem;
	margin-bottom: 0.75rem;
}
.akb-related__list {
	padding: 0;
	margin: 0;
	list-style: none;
}
.akb-related__list li { margin-bottom: 0.4rem; }
.akb-related__list a { color: #1a73e8; text-decoration: none; }
.akb-related__list a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   Archive header
   ------------------------------------------------------------------ */
.akb-archive__title {
	font-size: 1.75rem;
	margin: 0 0 0.5rem;
}
.akb-archive__description {
	color: #555;
	margin-bottom: 1.25rem;
}

/* ------------------------------------------------------------------
   Search
   ------------------------------------------------------------------ */
.akb-search {
	position: relative;
	max-width: 520px;
	margin: 1rem 0 1.5rem;
}
.akb-search__input {
	width: 100%;
	padding: 0.55rem 1rem;
	font-size: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}
.akb-search__results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ccc;
	border-top: none;
	border-radius: 0 0 4px 4px;
	z-index: 100;
	max-height: 360px;
	overflow-y: auto;
	box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.akb-search__result {
	display: block;
	padding: 0.6rem 1rem;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f0f0f0;
}
.akb-search__result:last-child { border-bottom: none; }
.akb-search__result:hover, .akb-search__result:focus { background: #f0f7ff; }
.akb-search__result-title { font-weight: 600; font-size: 0.95rem; }
.akb-search__result-cat  { font-size: 0.75rem; color: #888; }
.akb-search__result-excerpt { font-size: 0.85rem; color: #555; margin-top: 0.2rem; }
.akb-search__message { padding: 0.75rem 1rem; color: #666; font-style: italic; font-size: 0.9rem; }

/* ------------------------------------------------------------------
   Category index
   ------------------------------------------------------------------ */
.akb-category-index { margin-bottom: 2rem; }
.akb-category-index__list {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.akb-category-index__item a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.akb-category-index__item a:hover { border-color: #1a73e8; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.akb-category-index__name  { font-weight: 600; }
.akb-category-index__count { font-size: 0.8rem; color: #888; }

/* ------------------------------------------------------------------
   Article list / cards
   ------------------------------------------------------------------ */
.akb-article-list { display: flex; flex-direction: column; gap: 1rem; }

.akb-article-card {
	padding: 1.1rem 1.25rem;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	transition: box-shadow 0.15s;
}
.akb-article-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.akb-article-card__header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
}
.akb-article-card__title {
	font-size: 1.05rem;
	margin: 0;
}
.akb-article-card__title a { text-decoration: none; color: #1a73e8; }
.akb-article-card__title a:hover { text-decoration: underline; }

.akb-article-card__badge {
	font-size: 0.7rem;
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.akb-article-card__badge--internal { background: #e8f0fe; color: #174ea6; }
.akb-article-card__badge--status   { background: #fff3cd; color: #7a5000; }

.akb-article-card__excerpt { font-size: 0.9rem; color: #555; margin: 0 0 0.5rem; }

.akb-article-card__footer {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	color: #888;
}
.akb-article-card__category a { color: inherit; text-decoration: none; }
.akb-article-card__category a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   Shortcode grid
   ------------------------------------------------------------------ */
.akb-articles-grid { display: grid; gap: 1rem; }
.akb-cols-1 { grid-template-columns: 1fr; }
.akb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.akb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.akb-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) {
	.akb-cols-2,
	.akb-cols-3,
	.akb-cols-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   No-results
   ------------------------------------------------------------------ */
.akb-no-articles { color: #666; font-style: italic; }
