/* NoSwearing.com - 2026 redesign. The pre-redesign stylesheet is in ../backups/. */

:root {
	--ink: #111111;
	--paper: #FAFAF7;
	--white: #FFFFFF;
	--accent: #FFD23F;
	--pale: #FFF6CC;
	--body: #333333;
	--muted: #555555;
	--rule: #DDDDD5;
	--ad-bg: #F3F3EE;
	--display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--display);
	font-size: 16px;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}

a { color: var(--ink); }
a:hover { color: #000000; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .wrap { padding-left: 16px; padding-right: 16px; } }

/* ---------- Header ---------- */

.site-header { background: var(--white); border-bottom: 2px solid var(--ink); }
.site-header .wrap {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
	padding-top: 14px; padding-bottom: 14px;
}
.logo {
	display: flex; align-items: center; gap: 3px; text-decoration: none; color: var(--ink);
	font-weight: 800; font-size: 26px; letter-spacing: -0.02em; line-height: 1.2;
}
.logo:hover { color: var(--ink); }
.logo-bar {
	display: inline-block; background: var(--ink); color: var(--accent);
	padding: 2px 9px; border-radius: 5px; transform: rotate(-2deg);
}
.logo-tld { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }

.site-nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 auto; }
.site-nav a {
	padding: 12px; font-size: 15px; font-weight: 600; text-decoration: none;
	border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--ink); }

.search { display: flex; flex: 0 1 260px; min-width: 200px; margin: 0; }
.search input {
	flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px;
	border: 2px solid var(--ink); border-right: 0; border-radius: 10px 0 0 10px;
	font: inherit; font-size: 15px; background: var(--white); color: var(--ink);
}
.search button {
	width: 48px; height: 44px; border: 2px solid var(--ink); border-radius: 0 10px 10px 0;
	background: var(--ink); color: var(--accent); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}

/* ---------- Shared pieces ---------- */

.card { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 52px; padding: 0 32px; border: 2px solid var(--ink); border-radius: 10px;
	background: var(--ink); color: var(--accent); font: inherit; font-size: 18px; font-weight: 800;
	text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--accent); background: #000000; }
.btn-accent {
	align-self: flex-start; height: 46px; padding: 0 20px; font-size: 16px;
	background: var(--accent); border-color: var(--accent); color: var(--ink);
}
.btn-accent:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.label {
	font-family: var(--mono); font-size: 13px; font-weight: 600;
	letter-spacing: 0.06em; text-transform: uppercase;
}

.ad { display: flex; justify-content: center; align-items: center; max-width: 100%; overflow: hidden; }
.ad-leaderboard { min-height: 90px; padding-top: 8px; padding-bottom: 40px; }
.ad-box { min-height: 250px; }
.ad-sky { min-height: 600px; }

/* ---------- Home: filter ---------- */

.filter-section {
	padding-top: 56px; padding-bottom: 40px;
	display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.filter-card {
	width: 100%; max-width: 920px; margin: 0; border-radius: 18px; box-shadow: 8px 8px 0 var(--ink);
	padding: 32px; display: flex; flex-direction: column; gap: 20px;
}
.filter-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.filter-head h1 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
.filter-head p { margin: 6px 0 0; font-size: 17px; line-height: 1.45; color: var(--body); }


.panes { display: flex; flex-wrap: wrap; gap: 16px; }
.pane { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pane textarea, .pane .output {
	width: 100%; height: 220px; padding: 14px; border: 2px solid var(--ink); border-radius: 10px;
	font-family: var(--mono); font-size: 15px; line-height: 1.55; color: var(--ink);
}
.pane textarea { resize: vertical; background: var(--white); }
.pane textarea::placeholder { color: var(--muted); opacity: 1; }
.output { background: var(--pale); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.output .placeholder { color: var(--muted); }

.filter-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.filter-foot p { margin: 0; font-size: 15px; color: var(--body); }
.filter-foot a { font-weight: 700; }
.smurf { margin: 0; font-size: 16px; color: var(--body); text-align: center; }
.smurf a { font-weight: 700; }

@media (max-width: 600px) {
	.filter-section { padding-top: 28px; }
	.filter-card { padding: 20px; box-shadow: 5px 5px 0 var(--ink); }
	.filter-head h1 { font-size: 27px; }
	.filter-foot .btn { width: 100%; }
}

/* ---------- Home: features + letters ---------- */

.features { display: flex; flex-wrap: wrap; gap: 20px; padding-bottom: 64px; }
.feature { flex: 1 1 300px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
.feature p { margin: 0; color: var(--body); }
.feature > a { margin-top: auto; padding-top: 8px; font-weight: 700; }
.feature-icon {
	width: 48px; height: 48px; border-radius: 12px; background: var(--accent); border: 2px solid var(--ink);
	display: flex; align-items: center; justify-content: center;
}

.band { background: var(--ink); color: var(--white); }
.band .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.band h2 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; }
.grawlix { margin: 0; font-family: var(--mono); font-size: 15px; color: var(--accent); }
.letter-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.letter-grid a {
	width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
	border: 2px solid var(--white); border-radius: 10px; color: var(--white);
	font-size: 20px; font-weight: 800; text-decoration: none;
}
.letter-grid a:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
@media (max-width: 600px) { .band h2 { font-size: 27px; } .letter-grid a { width: 46px; height: 46px; } }

/* ---------- Inner pages ---------- */

.page-head { padding-top: 40px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 18px; }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px; }
.big-letter {
	flex: 0 0 auto; min-width: 96px; height: 96px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 18px;
	background: var(--accent); box-shadow: 6px 6px 0 var(--ink);
	display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 800; line-height: 1;
}
.big-letter.is-small { font-size: 36px; }
.title-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.page-title { margin: 0; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.lede { margin: 0; font-size: 18px; color: var(--body); max-width: 760px; }
.intro { margin: 0; font-size: 16px; color: var(--body); max-width: 760px; }

.letter-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.letter-tabs a {
	min-width: 44px; height: 44px; padding: 0 8px; display: flex; align-items: center; justify-content: center;
	border: 2px solid var(--ink); border-radius: 10px; background: var(--white);
	font-size: 16px; font-weight: 800; text-decoration: none;
}
.letter-tabs a:hover { background: var(--accent); }
.letter-tabs a[aria-current="page"] { background: var(--ink); color: var(--accent); }

.with-sidebar { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 8px; padding-bottom: 64px; }
.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sidebar { flex: 1 1 300px; display: flex; flex-direction: column; align-items: stretch; gap: 20px; }

.count { margin: 0; font-family: var(--mono); font-size: 14px; color: var(--muted); }

.word-list { overflow: hidden; }
.word {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
	padding: 18px 24px; border-bottom: 1px solid var(--rule);
}
.word-list > :last-child { border-bottom: 0; }
.word-name {
	margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 800;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px; overflow-wrap: anywhere;
}
.clean { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-head {
	display: flex; justify-content: space-between; gap: 24px; padding: 12px 24px;
	border-bottom: 2px solid var(--ink); background: var(--paper);
	font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 600px) { .list-head { padding: 10px 16px; } }
.clean-word { padding: 6px 12px; border-radius: 8px; background: var(--pale); border: 1.5px solid var(--ink); font-weight: 700; }
.group-title { margin: 0; padding: 12px 24px; background: var(--ink); color: var(--accent); font-size: 20px; }
.list-ad {
	padding: 20px 24px; border-bottom: 1px solid var(--rule); background: var(--ad-bg);
	display: flex; justify-content: center; min-height: 290px;
}
.empty { padding: 24px; margin: 0; }
@media (max-width: 600px) { .word { padding: 16px; } .word-name { font-size: 20px; } }

.side-dark { background: var(--ink); color: var(--white); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.side-dark h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.side-dark p { margin: 0; color: #E5E5E5; }
.side-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.side-card h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.side-card p { margin: 0; font-size: 15px; color: var(--body); }
.side-card a { font-weight: 700; }

/* ---------- Text pages (FAQ, API) ---------- */

.prose { max-width: 808px; padding-top: 40px; padding-bottom: 64px; }
.prose h1 { margin: 0 0 24px; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.prose h2 { margin: 36px 0 8px; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; color: var(--body); }
.prose p { margin: 0 0 12px; }
.prose code {
	font-family: var(--mono); font-size: 14px; background: var(--white);
	border: 1px solid var(--rule); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere;
}
.prose pre {
	font-family: var(--mono); font-size: 14px; background: var(--white); border: 2px solid var(--ink);
	border-radius: 10px; padding: 14px; overflow-x: auto;
}

/* ---------- Add a word ---------- */

.form-page { padding-top: 32px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.form-card { flex: 1 1 420px; min-width: 0; max-width: 640px; padding: 28px; display: flex; flex-direction: column; gap: 18px; margin: 0; }
.form-card h1 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; }
.form-card > p { margin: 0; color: var(--body); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; }
.field input[type="text"], .field select {
	height: 46px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 10px;
	font: inherit; background: var(--white); color: var(--ink); max-width: 100%;
}
.field[hidden] { display: none; }
fieldset.options { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
fieldset.options legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.guidelines { flex: 1 1 280px; padding: 24px; }
.guidelines h2 { margin: 0 0 8px; font-size: 20px; }
.guidelines ol { margin: 0; padding-left: 20px; color: var(--body); }
.guidelines li { margin-bottom: 6px; }
.notice { padding: 24px; margin: 0; max-width: 640px; font-size: 17px; }
.notice p { margin: 0 0 12px; }
.notice a { font-weight: 700; }
.error { color: #B00020; font-weight: 700; margin: 0; }

/* ---------- Footer ---------- */

.site-footer { border-top: 2px solid var(--ink); background: var(--white); }
.family { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 32px; padding-bottom: 8px; }
.family h2 { margin: 0; font-size: 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
	display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border: 2px solid var(--ink);
	border-radius: 999px; background: var(--white); font-weight: 600; text-decoration: none;
}
.pill:hover { background: var(--accent); }
.footer-bar {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
	padding-top: 20px; padding-bottom: 28px; font-size: 15px;
}
.footer-bar p { margin: 0; color: var(--body); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-nav a, .footer-nav button { padding: 10px 0; }
.link-button { background: none; border: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
