/* /app/ tools hub (app/index.php) - moved out of assets/css/main.css on 2026-10-13.
   Hub-only styles live here so the ~300 KB main.css does not carry them on every page. */

/* =====================================================================
   /app/ tools hub (app/index.php) - moved out of the page's inline <style>
   2026-10-13: search + category filter, sectioned grid, compact cards
   ===================================================================== */
.apps-intro {
	color: #3d6680;
	font-size: 1.02rem;
	line-height: 1.6;
	margin: -0.5rem 0 0;
	padding: 1rem 2rem 1.25rem;
	background: #f0f7fa;
}
.apps-intro p { margin: 0 0 .45rem; }
.apps-intro p:last-child { margin-bottom: 0; }
.apps-intro strong { color: #2f6e8d; }

/* Search + category chips */
.apps-toolbar {
	padding: 1.25rem 2rem .25rem;
	display: flex;
	flex-direction: column;
	gap: .85rem;
}
.apps-toolbar[hidden] { display: none; }
.apps-search { position: relative; }
.apps-search__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #5a87a3;
	font-size: 1rem;
	pointer-events: none;
}
.apps-search__input {
	width: 100%;
	min-height: 48px;
	padding: 10px 44px 10px 42px;
	border: 1px solid #c9dde8;
	border-radius: 10px;
	background: #fff;
	font-size: 1rem;
	font-family: inherit;
	color: #24485c;
	transition: border-color .2s, box-shadow .2s;
}
.apps-search__input::placeholder { color: #7f98a8; }
.apps-search__input:focus {
	outline: none;
	border-color: #4bb2d5;
	box-shadow: 0 0 0 3px rgba(75,178,213,.25);
}
.apps-search__key {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	min-width: 22px;
	padding: 1px 6px;
	border: 1px solid #c9dde8;
	border-radius: 5px;
	background: #f5f9fb;
	color: #5a7d92;
	font-size: .8rem;
	text-align: center;
}
.apps-search__input:focus + .apps-search__key { display: none; }

.apps-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.apps-chip {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 38px;
	padding: 6px 12px;
	border: 1px solid #c9dde8;
	border-radius: 19px;
	background: #fff;
	color: #2f6e8d;
	font-family: inherit;
	font-size: .88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.apps-chip:hover { border-color: #4bb2d5; background: #f0f8fc; }
.apps-chip:focus-visible { outline: 3px solid #4bb2d5; outline-offset: 2px; }
.apps-chip__n {
	padding: 0 7px;
	border-radius: 10px;
	background: #e3f0f6;
	color: #2f6e8d;
	font-size: .75rem;
	line-height: 1.5;
}
.apps-chip[aria-pressed="true"] {
	background: #2f6e8d;
	border-color: #2f6e8d;
	color: #fff;
}
.apps-chip[aria-pressed="true"] .apps-chip__n { background: rgba(255,255,255,.22); color: #fff; }
.apps-chip--pranks[aria-pressed="true"] { background: #b5451b; border-color: #b5451b; }
.apps-status {
	margin: 0;
	min-height: 1.2em;
	color: #5a7d92;
	font-size: .85rem;
}

/* Sections */
.apps-section { padding: 1.5rem 2rem; }
.apps-section[hidden] { display: none; }
.apps-section + .apps-section { padding-top: .5rem; }
.apps-section--pranks {
	margin-top: 1rem;
	padding-top: 1.5rem !important;
	background: linear-gradient(180deg, #fdf6f0 0%, #fff 100%);
	border-top: 1px solid #f5d6c0;
	border-bottom: 1px solid #f5d6c0;
}
.apps-section__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	padding-bottom: .75rem;
	border-bottom: 2px solid #e9ecef;
}
.apps-section--pranks .apps-section__head { border-bottom-color: #f5d6c0; }
.apps-section__title {
	margin: 0;
	display: flex;
	align-items: center;
	gap: .6rem;
	font-size: 1.3rem;
	font-weight: 700;
	color: #2f6e8d;
}
.apps-section__title .bi { color: #4bb2d5; font-size: 1.35rem; }
.apps-section--pranks .apps-section__title { color: #a3431b; }
.apps-section--pranks .apps-section__title .bi { color: #e8590c; }
.apps-section__count {
	flex-shrink: 0;
	padding: .25rem .8rem;
	border-radius: 20px;
	background: #e3f0f6;
	color: #2f6e8d;              /* 6:1 */
	font-size: .82rem;
	font-weight: 700;
}
.apps-section--pranks .apps-section__count { background: #fbe3d4; color: #a3431b; }
.apps-section__sub {
	margin: -.25rem 0 1.25rem;
	color: #8a3a17;
	font-size: .9rem;
	line-height: 1.5;
}

/* Grid + cards */
.apps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}
.app-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.1rem 1.15rem 1rem;
	background: #fff;
	border: 1px solid #e3eaef;
	border-radius: 12px;
	color: inherit;
	text-decoration: none;
	transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.app-card[hidden] { display: none; }
.app-card:hover {
	border-color: var(--accent, #4bb2d5);
	box-shadow: 0 8px 22px rgba(47,110,141,.14);
	transform: translateY(-2px);
}
.app-card:focus-visible {
	outline: 3px solid #2f6e8d;
	outline-offset: 3px;
}
.app-card__head {
	display: flex;
	align-items: flex-start;
	gap: .8rem;
	margin-bottom: .65rem;
}
.app-card__icon {
	width: 46px;
	height: 46px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	background: var(--accent, #4bb2d5);
	color: #fff;
	font-size: 1.4rem;
	box-shadow: 0 3px 10px rgba(0,0,0,.08);
	transition: transform .25s ease;
}
.app-card:hover .app-card__icon { transform: scale(1.06) rotate(-3deg); }
.app-card__title-wrap { flex: 1; min-width: 0; }
.app-card__title {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	color: #24566f;
}
.app-card__badge {
	display: inline-block;
	padding: .05rem .4rem;
	border-radius: 4px;
	background: #ce3527;
	color: #fff;
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .5px;
	line-height: 1.5;
	text-transform: uppercase;
}
.app-card__tagline {
	margin: .2rem 0 0;
	color: #476a7f;              /* neutral: accent colours like amber fail contrast on white */
	font-size: .85rem;
	font-weight: 600;
	line-height: 1.35;
}
.app-card__desc {
	margin: 0 0 .85rem;          /* no flex:1 - stretching it would let a 4th line show past the clamp */
	color: #5a6c7d;
	font-size: .88rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;       /* full text stays in the page for search engines and the filter */
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.app-card__cta {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: auto;
	padding-top: .65rem;
	border-top: 1px solid #eef3f6;
	color: #2f6e8d;
	font-size: .88rem;
	font-weight: 700;
}
.app-card__cta .bi { transition: transform .2s ease; }
.app-card:hover .app-card__cta .bi { transform: translateX(4px); }

/* Empty search state */
.apps-empty {
	margin: 0 2rem 1.5rem;
	padding: 2rem 1rem;
	border: 1px dashed #c9dde8;
	border-radius: 12px;
	text-align: center;
	color: #5a7d92;
}
.apps-empty[hidden] { display: none; }
.apps-empty .bi { font-size: 1.8rem; color: #9bbccd; }
.apps-empty p { margin: .5rem 0 1rem; font-weight: 600; }
.apps-empty__reset {
	min-height: 44px;
	padding: 8px 18px;
	border: none;
	border-radius: 22px;
	background: #2f6e8d;
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}
.apps-empty__reset:focus-visible { outline: 3px solid #4bb2d5; outline-offset: 2px; }

.apps-faq { margin-left: 2rem; margin-right: 2rem; }

@media (max-width: 768px) {
	.apps-intro { padding: 1rem; font-size: .95rem; }
	.apps-toolbar { padding: 1rem 1rem 0; }
	.apps-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		margin: 0 -1rem;
		padding: 0 1rem 4px;
	}
	.apps-chips::-webkit-scrollbar { display: none; }
	.apps-chip { flex-shrink: 0; }
	.apps-section { padding: 1.25rem 1rem; }
	.apps-section__title { font-size: 1.15rem; }
	.apps-grid { grid-template-columns: 1fr; gap: .75rem; }
	.app-card { padding: 1rem; }
	.apps-empty { margin: 0 1rem 1rem; }
	.apps-faq { margin-left: 1rem; margin-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.app-card, .app-card__icon, .app-card__cta .bi { transition: none; }
	.app-card:hover, .app-card:hover .app-card__icon { transform: none; }
}

/* /app/ hub - "Recently used" row (filled from the visitor's localStorage) */
.apps-recent {
	margin: 1.25rem 2rem 0;
	padding: .85rem 1rem 1rem;
	background: #fff;
	border: 1px solid #d6e7f0;
	border-radius: 12px;
}
.apps-recent[hidden] { display: none; }
.apps-recent__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: .6rem;
}
.apps-recent__title {
	margin: 0;
	display: flex;
	align-items: center;
	gap: .45rem;
	font-size: .95rem;
	font-weight: 700;
	color: #2f6e8d;
}
.apps-recent__title .bi { color: #4bb2d5; }
.apps-recent__clear {
	min-height: 32px;
	padding: 2px 10px;
	border: none;
	border-radius: 6px;
	background: none;
	color: #476a7f;
	font-family: inherit;
	font-size: .82rem;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}
.apps-recent__clear:hover { color: #2f6e8d; }
.apps-recent__clear:focus-visible { outline: 3px solid #4bb2d5; outline-offset: 2px; }
.apps-recent__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: .5rem;
}
.apps-recent__item {
	display: flex;
	align-items: center;
	gap: .6rem;
	min-height: 48px;
	padding: 6px 10px 6px 6px;
	border: 1px solid #e3eaef;
	border-radius: 10px;
	background: #f8fbfc;
	color: #24566f;
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	transition: border-color .2s, background .2s;
}
.apps-recent__item:hover { border-color: var(--accent, #4bb2d5); background: #fff; }
.apps-recent__item:focus-visible { outline: 3px solid #2f6e8d; outline-offset: 2px; }
.apps-recent__icon {
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var(--accent, #4bb2d5);
	color: #fff;
	font-size: 1.05rem;
}
@media (max-width: 768px) {
	.apps-recent { margin: 1rem 1rem 0; }
	.apps-recent__list { grid-template-columns: 1fr 1fr; }
	.apps-recent__item { font-size: .85rem; }
}
