/* The master site shares the Board's palette and native controls. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background-color: var(--home-bg);
	background-image: linear-gradient(var(--home-grid) 1px, transparent 1px), linear-gradient(90deg, var(--home-grid) 1px, transparent 1px);
	background-size: 35px 35px;
	background-position: center top;
	color: var(--text-primary);
	font-family: Arial, sans-serif;
	line-height: 1.6;
}

a {
	color: var(--text-link);
	text-decoration: none;
	text-underline-offset: .2em;
}

a:hover {
	color: var(--text-link-hover);
	text-decoration: underline;
}

:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

h1,
h2,
h3 {
	line-height: 1.25;
}

h1 {
	margin: 0 0 1rem;
	font-size: clamp(1.8rem, 4vw, 2.35rem);
	letter-spacing: -.025em;
}

h2 {
	margin: 2rem 0 .75rem;
	font-size: 1.25rem;
}

h3 {
	font-size: 1.1rem;
}

p {
	margin-block: 1rem;
}

h2[id],
h3[id] {
	scroll-margin-top: 7rem;
}

hr {
	margin-block: 2rem;
	border: 0;
	border-top: 1px solid var(--border-card);
}

[small],
[board-meta],
[eyebrow],
[directory-count] {
	color: var(--text-muted);
	font-size: .875rem;
}

[eyebrow] {
	margin: 0 0 .5rem;
	font-weight: 700;
	letter-spacing: .035em;
}

[intro] {
	max-width: 46rem;
	font-size: 1.075rem;
}

/* A recognizable way into the directory from any Board. */
[skip-link] {
	position: absolute;
	top: .5rem;
	left: 1rem;
	z-index: 10;
	padding: .6rem 1rem;
	transform: translateY(-160%);
	border-radius: 6px;
	background: var(--bg-card);
	color: var(--text-primary);
}

[skip-link]:focus {
	transform: none;
}

[header] {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: .7rem max(3%, calc((100% - 72rem) / 2));
	border-bottom: 1px solid #ffffff30;
	background: var(--header-bg);
	color: var(--header-text);
}

[header] a {
	color: inherit;
}

[brand] {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	line-height: 1.2;
}

[brand]:hover {
	text-decoration: none;
}

[brand-name] {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2rem;
	letter-spacing: -.055em;
}

[brand-context] {
	margin-top: .15rem;
	font-size: .7rem;
	letter-spacing: .025em;
}

[header] [home] {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .25rem;
}

[header] [home] a,
[header-action] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .55rem .7rem;
	border-radius: 6px;
	font-size: .9rem;
	font-weight: 600;
	white-space: nowrap;
}

[header] [home] a:hover,
[header] [home] a[aria-current] {
	background: var(--header-hover-bg);
	text-decoration: none;
}

[header] [home] a[aria-current] {
	box-shadow: inset 0 -3px currentColor;
}

[header-action] {
	border: 1px solid #ffffff90;
}

[header-action]:hover,
[header-action][aria-current] {
	background: var(--header-hover-bg);
	text-decoration: none;
}

[header-search] {
	position: relative;
	flex: 1;
	min-width: 12rem;
}

[header-search] input[type="search"] {
	padding-right: 3rem;
}

[header-search] button {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 100%;
	padding: .7rem;
	border: 0;
	background: transparent;
	color: var(--input-text);
	box-shadow: none;
}

[header-search] button:hover {
	background: var(--home-tile-forums);
}

[header-search] button:active {
	transform: none;
}

[header-search] svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

[content] {
	width: calc(100% - 2rem);
	max-width: 60rem;
	margin: 2rem auto;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	border: 1px solid var(--border-card);
	border-radius: 8px;
	background: var(--bg-card);
	overflow-wrap: anywhere;
}

[content][reading-page] {
	max-width: 48rem;
}

[content] > :first-child {
	margin-top: 0;
}

[content] > :last-child {
	margin-bottom: 0;
}

[footer] {
	margin-top: auto;
	padding: 1.5rem 1rem;
	background: var(--footer-bg);
	color: var(--footer-text);
	text-align: center;
}

[footer] nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .1rem 1rem;
}

[footer] a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	color: inherit;
	font-size: .875rem;
}

[footer] a[aria-current] {
	text-decoration: underline;
}

[copyright] {
	font-size: .75rem;
}

[copyright] p {
	margin: .75rem 0 0;
}

/* Ordinary links and forms remain usable without JavaScript. */
button,
input {
	font: inherit;
}

input[type="search"] {
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: .65rem .85rem;
	border: 1px solid var(--input-border);
	border-radius: 6px;
	background: var(--input-bg);
	color: var(--input-text);
}

input::placeholder {
	color: var(--text-muted);
	opacity: 1;
}

button,
[button] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	min-height: 44px;
	padding: .6rem 1rem;
	border: 1px solid var(--button-bg);
	border-radius: 6px;
	background: var(--button-bg);
	color: var(--button-text);
	box-shadow: 0 2px 0 var(--input-border);
	cursor: pointer;
	font-weight: 600;
	line-height: 1.5;
}

button:hover,
[button]:hover {
	background: var(--button-hover);
	color: var(--button-text);
	text-decoration: none;
}

button:active,
[button]:active {
	box-shadow: none;
	transform: translateY(1px);
}

[button][secondary] {
	border-color: var(--input-border);
	background: var(--bg-card);
	color: var(--text-primary);
}

[button][secondary]:hover {
	background: var(--bg-page);
}

[actions],
[page-heading] {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .75rem;
}

[page-heading] {
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

[page-heading] h1 {
	margin: 0;
}

[breadcrumb] {
	margin-bottom: 1.5rem;
	font-size: .875rem;
}

[view-tabs] {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-block: 1.5rem;
}

[view-tabs] a {
	min-height: 44px;
	padding: .55rem .7rem;
	border: 1px solid var(--border-card);
	border-radius: 6px;
}

[view-tabs] a:hover,
[view-tabs] a[aria-current] {
	border-color: var(--input-border);
	background: var(--bg-page);
	color: var(--text-primary);
	text-decoration: none;
}

[view-tabs] a[aria-current] {
	box-shadow: inset 0 -3px var(--text-link);
	font-weight: 600;
}

/* Board discovery */
[directory-search] label {
	display: block;
	margin-bottom: .5rem;
	font-weight: 600;
}

[search-controls] {
	display: flex;
	align-items: center;
	gap: .6rem;
}

[search-controls] input {
	flex: 1;
}

[clear-search] {
	padding: .5rem .25rem;
	font-size: .875rem;
}

[directory-count] {
	margin: 1.5rem 0 .65rem;
}

[board-list] {
	display: grid;
	gap: .75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

[board-card] {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem;
	border: 1px solid var(--border-card);
	border-radius: 6px;
	background: var(--bg-page);
	color: var(--text-primary);
}

[board-card]:hover {
	border-color: var(--text-link);
	background: var(--home-tile-forums);
	color: var(--text-primary);
	text-decoration: none;
}

[board-card] h2 {
	margin: 0;
	font-size: 1.125rem;
}

[board-card] p {
	margin: .35rem 0 0;
	font-size: .875rem;
}

[board-list] > [pinned] [board-card] {
	border-left: 3px solid var(--text-link);
}

[board-card] [board-pin-label] {
	margin: 0 0 .35rem;
	color: var(--text-muted);
	font-size: .75rem;
}

[board-destination] {
	flex-shrink: 0;
	color: var(--text-link);
	font-size: .875rem;
	font-weight: 600;
}

[board-empty] {
	padding: 1.75rem;
	border: 1px dashed var(--input-border);
	border-radius: 6px;
	background: var(--bg-page);
}

[board-empty] h2 {
	margin-top: 0;
}

/* Create and help */
[create-options] {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 1.25rem;
	margin-block: 2rem;
}

[create-option] {
	padding: 1.5rem;
	border: 1px solid var(--border-card);
	border-radius: 6px;
	background: var(--home-tile-account);
}

[create-option][independent] {
	background: var(--home-tile-forums);
}

[create-option] h2 {
	margin: 0;
}

[board-notice] {
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--text-link);
	background: var(--bg-page);
}

[setup-steps] {
	padding-left: 1.5rem;
	margin-block: 2rem;
}

[setup-steps] li {
	margin-block: 1.5rem;
	padding-left: .5rem;
}

[setup-steps] h2,
[setup-steps] h3 {
	margin: 0;
	font-size: 1.125rem;
}

[setup-steps] p {
	margin: .5rem 0 0;
}

[faq-item] {
	margin-top: 1.75rem;
	padding-top: .25rem;
	border-top: 1px solid var(--border-card);
}

[faq-item] h2 {
	margin-top: 1.25rem;
}

@media (max-width: 960px) {
	[header] {
		position: static;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: .6rem 1rem;
		padding: .75rem 1rem .5rem;
	}

	[header-search] {
		order: 2;
		flex-basis: 100%;
	}
}

@media (max-width: 650px) {
	[header] [home] {
		order: 1;
		width: 100%;
		margin: 0;
		border-top: 1px solid #ffffff30;
		padding-top: .35rem;
	}

	[content] {
		margin-block: 1rem;
	}

	[create-options] {
		grid-template-columns: 1fr;
	}

	[board-card] {
		align-items: flex-start;
		flex-direction: column;
		gap: .75rem;
	}
}

[board-member-count] {
	display: block;
	margin-bottom: .4rem;
	color: var(--text-muted);
	font-size: .8rem;
	font-weight: 400;
}

[board-member-count][hidden] {
	display: none;
}
