.discord-link a,
.discord-link a:hover,
.discord-link a:focus,
.discord-link a:visited {
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none !important;
}

.eml-rules-reader {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 16px 64px;
	color: var(--eml-text);
	font-size: 17px;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.eml-rules-reader * {
	box-sizing: border-box;
}

.eml-rules-reader a {
	color: var(--eml-accent);
}

.eml-rules-header {
	margin: 0 0 20px;
	padding: 18px 0 12px;
	border-bottom: 1px solid var(--eml-border);
}

.eml-rules-header h1 {
	margin: 0 0 8px;
	font-size: clamp(2rem,7vw,3rem);
	line-height: 1.08;
}

.eml-rules-header p {
	margin: 0;
	color: var(--eml-muted);
}

.eml-rules-tools {
	position: sticky;
	top: 0;
	z-index: 20;
	display: grid;
	grid-template-columns: minmax(0,1fr) auto;
	gap: 10px;
	padding: 10px 0;
	background: #fff;
}

.eml-rules-search {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--eml-border);
	border-radius: 9px;
	background: #fff;
	color: var(--eml-text);
	font: inherit;
}

.eml-rules-search:focus {
	outline: 2px solid var(--eml-accent);
	outline-offset: 2px;
}

.eml-clear-search {
	min-height: 46px;
	padding: 8px 14px;
	border: 1px solid var(--eml-border);
	border-radius: 9px;
	background: var(--eml-panel-2);
	color: var(--eml-text);
	font: inherit;
	cursor: pointer;
}

.eml-search-status {
	grid-column: 1/-1;
	min-height: 1.2em;
	color: var(--eml-muted);
	font-size: .9rem;
}

.eml-rules-toc {
	margin: 18px 0 30px;
	border: 1px solid var(--eml-border);
	border-radius: 10px;
	background: var(--eml-panel);
	overflow: hidden;
}

.eml-rules-toc summary {
	cursor: pointer;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 1.05rem;
	background: var(--eml-panel-2);
}

.eml-rules-toc ol {
	margin: 0;
	padding: 12px 20px 16px 42px;
	columns: 2;
	column-gap: 34px;
}

.eml-rules-toc li {
	break-inside: avoid;
	margin: 5px 0;
}

.eml-rule-section {
	scroll-margin-top: 90px;
}

.eml-rules-reader h2 {
	position: relative;
	margin: 2.3em 0 .8em;
	padding-top: .3em;
	border-top: 1px solid var(--eml-border);
	font-size: clamp(1.45rem,5vw,2rem);
	line-height: 1.25;
}

.eml-special-heading {
	scroll-margin-top: 90px;
}

.eml-rule {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	margin: 0 0 11px;
	padding: 8px 10px;
	border-radius: 8px;
	scroll-margin-top: 90px;
}

.eml-rule:hover {
	background: rgba(0,0,0,.035);
}

.eml-rule-number {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.eml-rule-depth-3 {
	margin-left: 22px;
}

.eml-rule-depth-4 {
	margin-left: 44px;
}

.eml-rule-anchor {
	position: absolute;
	left: -1.25em;
	opacity: 0;
	text-decoration: none;
	font-weight: 400;
}

.eml-rule:hover .eml-rule-anchor,
.eml-rules-reader h2:hover .eml-rule-anchor {
	opacity: .7;
}

.eml-prose,.eml-bullet {
	margin: .55em 0;
}

.eml-bullet {
	padding-left: 1.25em;
	text-indent: -1.1em;
}

.eml-search-hidden {
	display: none !important;
}

.eml-search-match {
	background: #fff8d6;
	outline: 1px solid #ead980;
}

.eml-back-top {
	display: inline-block;
	margin-top: 28px;
	padding: 8px 12px;
	border: 1px solid var(--eml-border);
	border-radius: 8px;
	text-decoration: none;
}

@media (max-width:700px) {
	.eml-rules-reader {
		padding-left: 14px;
		padding-right: 14px;
		font-size: 17px;
		line-height: 1.62;
	}
	
	.eml-rules-toc ol {
		columns: 1;
	}
	
	.eml-rule {
		grid-template-columns: 1fr;
		gap: 2px;
		padding: 9px 8px;
	}
	
	.eml-rule-depth-3 {
		margin-left: 12px;
	}
	
	.eml-rule-depth-4 {
		margin-left: 24px;
	}
	
	.eml-rule-anchor {
		display: none;
	}
}

/* WordPress theme override hardening for the rules reader */
.eml-rules-reader,
.eml-rules-reader p,
.eml-rules-reader div,
.eml-rules-reader li,
.eml-rules-reader a,
.eml-rules-reader input,
.eml-rules-reader button,
.eml-rules-reader summary {
	font-family: Arial, Helvetica, sans-serif !important;
}

.eml-rules-intro {
	margin: 0 0 18px;
}

.eml-rules-intro p {
	margin: 0 !important;
	font-size: 18px !important;
	line-height: 1.5 !important;
	color: var(--eml-muted) !important;
}

.eml-rules-tools {
	align-items: center;
}

.eml-rules-search {
	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	min-height: 46px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 10px 12px !important;
	border: 1px solid var(--eml-border) !important;
	border-radius: 9px !important;
	background: #fff !important;
	color: var(--eml-text) !important;
	box-shadow: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	font-size: 16px !important;
	line-height: 1.35 !important;
}

.eml-clear-search {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	min-width: 72px !important;
	min-height: 46px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 10px 14px !important;
	border: 1px solid var(--eml-border) !important;
	border-radius: 9px !important;
	background: var(--eml-panel-2) !important;
	color: var(--eml-text) !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-size: 16px !important;
	line-height: 1.2 !important;
}

.eml-rules-toc ul {
	margin: 0 !important;
	padding: 12px 20px 16px !important;
	columns: 2;
	column-gap: 34px;
	list-style: none !important;
}

.eml-rules-toc li {
	margin: 5px 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.eml-rules-toc li::before {
	content: none !important;
}

.eml-rules-toc a {
	font-size: 17px !important;
	line-height: 1.4 !important;
	text-decoration: underline !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

.eml-rules-reader h2,
.eml-rules-reader .eml-special-heading {
	font-family: Arial, Helvetica, sans-serif !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.eml-rules-reader .eml-rule {
	font-size: 17px !important;
	line-height: 1.62 !important;
}

@media (max-width:700px) {
	.eml-rules-tools {
		grid-template-columns: minmax(0,1fr) auto !important;
		gap: 8px !important;
	}
	
	.eml-rules-search,
	  .eml-clear-search {
		min-height: 44px !important;
	}
	
	.eml-rules-toc ul {
		columns: 1 !important;
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
	
	.eml-rules-toc a {
		font-size: 16px !important;
	}
	
	.eml-rules-reader .eml-rule {
		font-size: 16px !important;
		line-height: 1.58 !important;
	}
}

/* V3 mobile cleanup */
.eml-rules-reader {
	background: transparent !important;
	color: #202124 !important;
}

.eml-rules-tools {
	background: #fff !important;
}

.eml-rules-search {
	background: #fff !important;
	color: #202124 !important;
	border-color: #d9dde3 !important;
}

.eml-rules-search::placeholder {
	color: #6f747b !important;
	opacity: 1 !important;
}

.eml-clear-search {
	background: #eef2f7 !important;
	color: #202124 !important;
	border-color: #d9dde3 !important;
}

.eml-rules-toc {
	background: #f7f8fa !important;
}

.eml-rules-toc summary {
	background: #eef2f7 !important;
	color: #202124 !important;
}

.eml-rules-reader a {
	color: #0b57d0 !important;
}

.eml-rules-intro {
	margin: 0 0 12px !important;
}

@media (max-width:700px) {
	.eml-rules-reader {
		padding-top: 0 !important;
	}
	
	.eml-rules-intro p {
		font-size: 16px !important;
		line-height: 1.45 !important;
	}
	
	.eml-rules-tools {
		padding: 6px 0 8px !important;
	}
	
	.eml-rules-toc {
		margin: 12px 0 22px !important;
	}
	
	.eml-rules-toc summary {
		padding: 12px 14px !important;
		font-size: 17px !important;
	}
	
	.eml-rules-reader h2 {
		margin-top: 1.7em !important;
	}
	
	.eml-rule {
		margin-bottom: 8px !important;
	}
}

/* V4 search control - avoids WordPress stripping native search input */
.eml-rules-search[contenteditable="true"] {
	display: block !important;
	width: 100% !important;
	min-height: 46px !important;
	padding: 10px 12px !important;
	border: 1px solid #d9dde3 !important;
	border-radius: 9px !important;
	background: #fff !important;
	color: #202124 !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: 16px !important;
	line-height: 1.35 !important;
	box-shadow: none !important;
	outline: none !important;
	white-space: pre-wrap !important;
	overflow-wrap: anywhere !important;
}

.eml-rules-search[contenteditable="true"]:empty::before {
	content: attr(data-placeholder);
	color: #6f747b;
	pointer-events: none;
}

.eml-rules-search[contenteditable="true"]:focus {
	outline: 2px solid #0b57d0 !important;
	outline-offset: 2px !important;
}

.eml-clear-search {
	min-width: auto !important;
	padding: 8px 10px !important;
	background: transparent !important;
	border: 0 !important;
	color: #0b57d0 !important;
	text-decoration: underline !important;
}

@media (max-width:700px) {
	.eml-rules-tools {
		grid-template-columns: 1fr auto !important;
		align-items: center !important;
	}
	
	.eml-clear-search {
		min-height: auto !important;
		height: auto !important;
		padding: 6px 2px 6px 8px !important;
		font-size: 15px !important;
	}
}