/* Writer directory, featured writers and tag pills. Built on the site's
   existing palette (cream, black, RAW red) and Lato. */

.section-title {
	font-size: 28px;
	margin: 0 0 16px;
}

.visually-hidden {
	clip: rect(0 0 0 0);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

/* ----- tag pills ----- */
.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}

.tag {
	background: #f2f2f2;
	border-radius: 999px;
	color: #222;
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	padding: 6px 10px;
	text-decoration: none;
}

a.tag:hover,
a.tag:focus {
	color: #000;
	text-decoration: underline;
}

.tag-writes { background: #ffe1cc; }
.tag-genres { background: #e3e0ff; }
.tag-also { background: #d9f0e3; }
.tag-open { background: #fff1b8; }

/* ----- featured ----- */
.featured {
	margin: 32px 0 40px;
}

.featured-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
	color: #111;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	text-decoration: none;
	transition: transform .15s, box-shadow .15s;
}

.feature:hover,
.feature:focus {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	color: #111;
	transform: translateY(-2px);
}

.feature-photo {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

.feature-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 20px;
}

.feature-name {
	font-size: 22px;
	font-weight: 900;
}

.feature-text {
	color: #333;
	font-size: 16px;
	line-height: 1.55;
}

.feature-more {
	color: #ef0000;
	font-weight: 700;
}

/* ----- directory ----- */
.directory {
	border-top: 1px solid #ddd;
	padding-top: 32px;
	scroll-margin-top: 90px;
}

.directory-head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}

.directory-count {
	color: #444;
	font-size: 16px;
	margin: 0;
}

.directory-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 8px 0 14px;
}

.directory-tools .search {
	flex: 1 1 320px;
	margin: 0;
}

.directory-tools input[type=search] {
	background: #f3f3f3;
	border: 2px solid transparent;
	border-radius: 999px;
	font-size: 17px;
	padding: 12px 20px;
	width: 100%;
}

.directory-tools input[type=search]:focus {
	background: #fff;
	border-color: #000;
	outline: none;
}

.order {
	display: inline-flex;
}

.order button {
	background: #fff;
	border: 2px solid #222;
	color: #111;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	padding: 9px 16px;
}

.order button:first-child {
	border-radius: 999px 0 0 999px;
}

.order button:last-child {
	border-left: 0;
	border-radius: 0 999px 999px 0;
}

.order button.on {
	background: #111;
	color: #fff;
}

/* ----- filter dropdowns ----- */
.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
	position: relative;
}

.filter {
	position: relative;
}

.filter summary {
	align-items: center;
	background: #fff;
	border: 2px solid #222;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	font-size: 15px;
	font-weight: 700;
	gap: 6px;
	list-style: none;
	padding: 8px 16px;
	user-select: none;
}

.filter summary::-webkit-details-marker {
	display: none;
}

.filter summary::after {
	content: "\25BE";
	font-size: 13px;
}

.filter[open] summary,
.filter.has-on summary {
	background: #111;
	color: #fff;
}

.filter-n {
	background: #ef0000;
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	min-width: 20px;
	padding: 1px 6px;
	text-align: center;
}

.filter-panel {
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
	left: 0;
	max-height: 360px;
	min-width: 240px;
	overflow-y: auto;
	padding: 8px 6px;
	position: absolute;
	top: calc(100% + 6px);
	z-index: 50;
}

.filter-opt {
	align-items: center;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	font-size: 16px;
	gap: 8px;
	margin: 0;
	padding: 7px 10px;
	white-space: nowrap;
}

.filter-opt:hover {
	background: #f3f3f3;
}

.filter-opt.sub {
	font-size: 15px;
	padding-left: 32px;
}

.filter-opt input {
	height: 18px;
	margin: 0;
	width: 18px;
}

.opt-count {
	color: #777;
	margin-left: auto;
	padding-left: 12px;
}

.active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.active-pill,
.active-clear {
	background: #111;
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	padding: 6px 12px;
}

.active-clear {
	background: transparent;
	color: #ef0000;
	text-decoration: underline;
}

.entry-content ul.cards,
.cards {
	display: grid;
	margin-left: 0;
	padding-left: 0;
	gap: 20px;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.entry-content .cards > li.card {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	list-style: none;
	margin: 0;
	overflow: hidden;
	transition: box-shadow .15s, transform .15s;
}

.card:hover,
.card:focus-within {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	transform: translateY(-2px);
}

.card[hidden] {
	display: none !important;
}

.card-link {
	color: #111;
	display: flex;
	flex: 1;
	flex-direction: column;
	text-decoration: none;
}

.card-link:hover,
.card-link:focus {
	color: #111;
}

.card-photo {
	aspect-ratio: 1 / 1;
	background: #eee;
	object-fit: cover;
	width: 100%;
}

.card-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 8px;
}

.card-name {
	font-size: 19px;
	font-weight: 900;
	line-height: 1.25;
}

.card-line {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	color: #444;
	display: -webkit-box;
	font-size: 15px;
	line-height: 1.5;
	overflow: hidden;
}

.card .tag-list {
	margin: 0;
	padding: 4px 16px 16px;
}

.card .tag {
	font-size: 12px;
	padding: 5px 9px;
}

.directory-empty,
.directory-join {
	font-size: 17px;
	margin-top: 24px;
}

.linklike {
	background: none;
	border: 0;
	color: #ef0000;
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

@media only screen and (max-width: 900px) {
	.featured-grid {
		grid-template-columns: 1fr;
	}

	.feature {
		flex-direction: row;
	}

	.feature-photo {
		aspect-ratio: 1 / 1;
		width: 38%;
	}
}

@media only screen and (max-width: 600px) {
	.cards {
		gap: 14px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.card-body {
		padding: 10px 12px 6px;
	}

	.card-name {
		font-size: 17px;
	}

	.card-line {
		font-size: 14px;
	}

	.card .tag-list {
		padding: 4px 12px 12px;
	}

	.feature {
		flex-direction: column;
	}

	.feature-photo {
		aspect-ratio: 4 / 3;
		width: 100%;
	}
}

/* ----- supporting businesses ----- */
.tag-biz { background: #dcecff; }

.biz-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 20px;
}

.biz-toggle {
	background: #fff;
	border: 2px solid #222;
	border-radius: 999px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	padding: 8px 16px;
}

.biz-toggle[aria-pressed="true"] {
	background: #111;
	color: #fff;
}

.biz-toggle[aria-pressed="true"] .opt-count {
	color: #ddd;
}

.entry-content ul.biz-cards,
.biz-cards {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.entry-content .biz-cards > li.biz-card {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	list-style: none;
	margin: 0;
	overflow: hidden;
}

.biz-card[hidden] {
	display: none !important;
}

.biz-logo {
	align-items: center;
	background: #faf7f0;
	display: flex;
	height: 200px;
	justify-content: center;
	padding: 18px;
}

.biz-logo img {
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.biz-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 20px 20px;
}

.entry-content .biz-name {
	font-size: 24px;
	margin: 0 0 10px;
}

.biz-desc p {
	font-size: 16px;
	line-height: 1.6;
	margin-bottom: 12px;
}

.entry-content ul.biz-contact {
	border-top: 1px solid #eee;
	list-style: none;
	margin: auto 0 0;
	padding: 12px 0 0;
}

.entry-content ul.biz-contact li {
	font-size: 16px;
	list-style: none;
	margin: 0 0 4px;
}

@media only screen and (max-width: 800px) {
	.entry-content ul.biz-cards,
	.biz-cards {
		grid-template-columns: 1fr;
	}
}

/* "+3" on a card opens the rest of that writer's tags */
.tag-more {
	background: #fff;
	border: 1px solid #999;
	cursor: pointer;
	font-family: inherit;
}

.tag-more:hover,
.tag-more:focus {
	border-color: #000;
}

.tag-rest {
	display: contents;
}

.tag-rest[hidden] {
	display: none;
}

/* ---------- Similar writers (bottom of each writer page) ---------- */
.similar {
	border-top: 1px solid #ddd;
	margin-top: 40px;
	padding-top: 24px;
}
.similar h2 {
	font-size: 24px;
	margin-bottom: 16px;
}
.similar-list {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}
.entry-content .similar-list li {
	list-style: none;
	margin: 0;
}
.similar-list a {
	background: #fff;
	border: 1px solid #e6d7b8;
	border-radius: 8px;
	color: #111;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	text-decoration: none;
}
.similar-list a:hover,
.similar-list a:focus {
	border-color: #111;
}
.similar-list img {
	aspect-ratio: 1 / 1;
	background: #eee;
	object-fit: cover;
	width: 100%;
}
.sim-name {
	font-size: 17px;
	font-weight: 700;
	padding: 10px 12px 2px;
}
.sim-tags {
	color: #444;
	font-size: 15px;
	padding: 0 12px 12px;
}

/* ---------- Homepage: next event and join box ---------- */
.next-event {
	align-items: center;
	background: #fbf3e2;
	border: 1px solid #e6d7b8;
	border-radius: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	justify-content: space-between;
	margin: 0 0 32px;
	padding: 16px 20px;
}
.next-event[hidden] {
	display: none;
}
.next-label {
	color: #5c4a2e;
	display: block;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.next-title {
	display: block;
	font-size: 19px;
	font-weight: 700;
}
.next-when {
	display: block;
	font-size: 16px;
}
.raw-outline-btn {
	border: 2px solid #111;
	border-radius: 4px;
	color: #111;
	display: inline-block;
	font-size: 16px;
	font-weight: 700;
	padding: 8px 16px;
	text-decoration: none;
}
.raw-outline-btn:hover,
.raw-outline-btn:focus {
	background: #111;
	color: #fff;
}
.join-box {
	background: #fbf3e2;
	border: 1px solid #e6d7b8;
	border-radius: 8px;
	margin: 40px 0 8px;
	padding: 20px 24px;
}
.join-box h2 {
	font-size: 24px;
	margin: 0 0 6px;
}
.join-box p {
	font-size: 17px;
	margin: 0 0 14px;
}
.join-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---------- About: common questions ---------- */
.faq {
	margin-top: 32px;
}
.faq h2 {
	font-size: 26px;
}
.faq h3 {
	font-size: 19px;
	margin: 22px 0 6px;
}
.raw-solid-btn {
	background: #111;
	border: 2px solid #111;
	border-radius: 4px;
	color: #fff;
	display: inline-block;
	font-size: 16px;
	font-weight: 700;
	padding: 8px 16px;
	text-decoration: none;
}
.raw-solid-btn:hover,
.raw-solid-btn:focus {
	background: #333;
	color: #fff;
}
