/* Wørdlehjælp.dk — fælles stylesheet */
:root {
	--green: #2e7d32;
	--green-dark: #1b5e20;
	--green-bg: #e8f5e9;
	--orange: #e8a33d;
	--orange-dark: #b86b00;
	--orange-bg: #fff4e0;
	--grey: #6b7280;
	--grey-bg: #f3f4f6;
	--blue: #3b82f6;
	--blue-dark: #1d4ed8;
	--blue-ink: #0b2a66;
	--card-bg: #ffffff;
	--card-border: #e5e7eb;
	--ink: #111827;
	--muted: #6b7280;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	background: #fafafa;
	color: var(--ink);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	line-height: 1.5;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

/* Topbar */
.topbar {
	background: #fff;
	border-bottom: 1px solid var(--card-border);
	position: sticky; top: 0; z-index: 500;
	box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.topbar-inner {
	max-width: 1080px; margin: 0 auto;
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 20px; gap: 16px;
}
.brand {
	display: inline-flex; align-items: center; gap: 10px;
	text-decoration: none; color: var(--ink);
}
.brand-tile {
	width: 34px; height: 34px; border-radius: 8px;
	background: var(--green); color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 20px; line-height: 1;
	box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}
.brand-text {
	font-weight: 800; font-size: 18px; letter-spacing: -0.3px;
}
.brand-dot { color: var(--muted); font-weight: 600; }
.site-nav ul {
	display: flex; align-items: center; gap: 4px;
	margin: 0; padding: 0; list-style: none;
}
.site-nav a {
	display: inline-block; padding: 8px 14px; border-radius: 8px;
	color: #374151; font-weight: 500; font-size: 14px;
	text-decoration: none; transition: background 0.12s, color 0.12s;
}
.site-nav a:hover { background: var(--grey-bg); color: var(--ink); }
.site-nav a.is-active {
	background: var(--green-bg); color: var(--green-dark); font-weight: 600;
}

/* Hamburger */
.nav-toggle {
	display: none; background: none; border: 0;
	width: 40px; height: 40px; padding: 0; cursor: pointer;
	flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
	display: block; width: 22px; height: 2px; background: var(--ink);
	border-radius: 1px; transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
	.nav-toggle { display: flex; }
	.site-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; border-bottom: 1px solid var(--card-border);
		box-shadow: 0 6px 18px rgba(0,0,0,0.06);
		max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
	}
	.site-nav.is-open { max-height: 400px; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
	.site-nav li { padding: 0 12px; }
	.site-nav a { display: block; padding: 12px 14px; font-size: 15px; }
}

/* Index — værktøjet */
.helper-cont { text-align: center; padding: 32px 0 48px; }
h1 { font-weight: 800; font-size: 36px; margin: 10px 0 18px; letter-spacing: -0.5px; }
.lede { max-width: 440px; margin: 0 auto 28px; color: #4b5563; font-size: 15px; line-height: 1.5; }

.card {
	max-width: 360px;
	margin: 0 auto;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	padding: 22px 20px 24px;
	text-align: left;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.section + .section { margin-top: 22px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-swatch { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.section-swatch.green  { background: var(--green); }
.section-swatch.orange { background: var(--orange); }
.section-swatch.grey   { background: var(--grey); }
.section-title { font-weight: 700; font-size: 16px; flex: 1; }
.help-btn {
	background: none; border: 1.5px solid #d1d5db; color: #9ca3af;
	cursor: pointer; padding: 0; width: 22px; height: 22px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 600; line-height: 1;
}
.help-btn:hover, .help-btn.is-open { color: var(--blue); border-color: var(--blue); }
.help-callout {
	display: none; font-size: 13px; line-height: 1.45; padding: 12px 14px;
	border-radius: 10px; margin-bottom: 12px; color: #374151;
}
.help-callout.is-open { display: block; }
.help-callout.green  { background: var(--green-bg); }
.help-callout.orange { background: var(--orange-bg); }
.help-callout.grey   { background: var(--grey-bg); }

.row-cells { display: flex; gap: 8px; justify-content: center; }
.orange-row-wrap + .orange-row-wrap { margin-top: 8px; }
.cell {
	width: 56px; height: 56px; padding: 0; border-radius: 12px;
	border: 2px solid var(--card-border); background: #fff;
	font-size: 22px; font-weight: 800; text-align: center;
	text-transform: uppercase; color: var(--ink);
	outline: none; caret-color: transparent;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
	font-family: 'Inter', sans-serif;
}
.cell.cell--green  { border-color: var(--green); color: var(--green); background: #fff; }
.cell.cell--green.has-value  { background: var(--green);  color: #fff; border-color: var(--green); }
.cell.cell--orange { border-color: var(--orange); color: var(--orange-dark); background: #fff; }
.cell.cell--orange.has-value { background: var(--orange); color: #fff; border-color: var(--orange); }
.cell:focus { outline: 2px solid #93c5fd; outline-offset: 1px; }

.orange-row-wrap { position: relative; }
.remove-row {
	position: absolute; top: -8px; right: -8px; width: 22px; height: 22px;
	background: #4b5563; color: #fff; border: none; border-radius: 50%;
	cursor: pointer; font-size: 13px; line-height: 1;
	display: none; align-items: center; justify-content: center;
}
.orange-row-wrap:hover .remove-row { display: inline-flex; }
.orange-row-wrap:first-child .remove-row { display: none !important; }

.add-row {
	margin-top: 12px; background: var(--orange-bg); color: var(--orange-dark);
	border: none; border-radius: 999px; padding: 8px 16px;
	font-size: 13px; font-weight: 700; cursor: pointer;
	display: inline-flex; align-items: center; gap: 6px;
}
.add-row:hover { filter: brightness(0.97); }

input.grey-input {
	width: 100%; padding: 14px 16px; border: 1px solid var(--card-border);
	background: #f9fafb; border-radius: 10px; font-size: 18px; font-weight: 700;
	letter-spacing: 6px; text-transform: uppercase; color: var(--ink);
}

.actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.btn {
	padding: 10px 22px; font-size: 14px; font-weight: 700;
	border-radius: 10px; border: none; cursor: pointer;
	font-family: inherit;
}
.btn-primary { background-color: var(--green-dark); color: #fff; border: 1px solid var(--green-dark); }
.btn-primary:hover { background-color: #154a1a; }
.btn-primary:active { background-color: #0f3813; }
.btn-secondary { background-color: #fff; color: var(--ink); border: 1px solid var(--card-border); }
.btn-secondary:hover { background-color: #f9fafb; }
.btn-secondary:active { background-color: #f3f4f6; }

/* Resultater */
.results-card {
	max-width: 360px; margin: 28px auto 0;
	background: #2743cf; border-radius: 20px;
	padding: 26px 20px 28px; color: #fff; text-align: center;
}
.results-card h3 {
	font-size: 20px; font-weight: 800; margin: 0 0 18px;
	letter-spacing: 0; text-transform: none; padding: 0; color: #fff;
}
.result-grid {
	display: grid; grid-template-columns: repeat(5, 56px);
	gap: 8px; justify-content: center; margin-bottom: 10px;
}
.rcell {
	width: 56px; height: 56px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 22px; text-transform: uppercase; color: #fff;
}
.rcell.green   { background: #2e7d32; }
.rcell.orange  { background: var(--orange); }
.rcell.neutral { background: #5f7ce8; }
.result-note { font-size: 13px; opacity: 0.9; margin-top: 12px; }

.best-suggestion {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 14px;
	padding: 14px 12px 12px;
	margin-bottom: 18px;
}
.best-label {
	font-size: 12px; font-weight: 700; letter-spacing: 0.6px;
	text-transform: uppercase; opacity: 0.9; margin-bottom: 10px;
}
.best-suggestion .result-grid { margin-bottom: 8px; }
.best-note { font-size: 12px; opacity: 0.85; margin: 6px 4px 0; line-height: 1.45; }
.other-matches-label {
	font-size: 12px; font-weight: 700; letter-spacing: 0.6px;
	text-transform: uppercase; opacity: 0.75; margin-bottom: 10px; text-align: left; padding-left: 4px;
}

/* Brødtekst-sider (indhold under værktøjet + undersider) */
.content { max-width: 680px; margin: 56px auto 0; text-align: left; color: #1f2937; padding: 0 16px; }
.content h2 { font-size: 24px; font-weight: 800; margin: 36px 0 12px; letter-spacing: -0.3px; color: var(--ink); }
.content h3 { font-size: 17px; font-weight: 700; margin: 24px 0 8px; color: var(--ink); }
.content p { font-size: 15px; line-height: 1.65; margin: 0 0 14px; color: #374151; }
.content ul, .content ol { font-size: 15px; line-height: 1.65; color: #374151; padding-left: 22px; margin: 0 0 14px; }
.content li { margin-bottom: 6px; }
.content strong { color: var(--ink); font-weight: 700; }
.content img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.content .swatch-g, .content .swatch-o, .content .swatch-x {
	display: inline-block; width: 14px; height: 14px; border-radius: 3px;
	vertical-align: middle; margin-right: 4px;
}
.content .swatch-g { background: var(--green); }
.content .swatch-o { background: var(--orange); }
.content .swatch-x { background: var(--grey); }

/* FAQ */
.faq-item { border-top: 1px solid var(--card-border); padding: 14px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--card-border); }
.faq-item summary {
	cursor: pointer; font-weight: 700; font-size: 15px;
	list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--muted); }
.faq-item[open] summary::after { content: '–'; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin-top: 10px; font-size: 14px; }

/* Artikler — ordliste-grid */
.wordlist { columns: 3 auto; column-gap: 24px; max-width: 680px; margin: 20px auto; padding: 0 16px; font-size: 14px; }
.wordlist a { color: var(--ink); text-decoration: none; display: block; padding: 2px 0; }
@media (max-width: 640px) { .wordlist { columns: 2 auto; } }
@media (max-width: 420px) { .wordlist { columns: 1 auto; } }

/* Hero på undersider */
.page-head { max-width: 680px; margin: 0 auto; padding: 36px 16px 0; text-align: center; }
.page-head h1 { font-size: 30px; margin: 8px 0 8px; }
.page-head .sub { color: var(--muted); font-size: 15px; max-width: 540px; margin: 0 auto 0; }

/* Footer */
footer {
	font-size: 13px; text-align: center; padding: 36px 16px 24px;
	color: var(--muted); border-top: 1px solid var(--card-border); margin-top: 48px;
}
footer a { color: var(--blue-dark); }
footer .footer-nav { margin-bottom: 10px; }
footer .footer-nav a { margin: 0 10px; }

/* Cookie-banner */
.cookie-banner {
	position: fixed; left: 16px; right: 16px; bottom: 16px;
	background: #fff; border: 1px solid var(--card-border); border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08);
	padding: 16px 18px; max-width: 580px; margin: 0 auto;
	display: none; z-index: 9999; font-size: 14px; color: var(--ink);
}
.cookie-banner.is-open { display: block; }
.cookie-banner p { margin: 0 0 10px; }
.cookie-banner .actions { justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cookie-banner .btn { padding: 8px 14px; font-size: 13px; }

/* Mobil */
@media (max-width: 480px) {
	.card, .results-card { margin-left: 12px; margin-right: 12px; }
	.cell, .rcell { width: 50px; height: 50px; font-size: 20px; }
	.result-grid { grid-template-columns: repeat(5, 50px); }
	h1 { font-size: 28px; }
	.page-head h1 { font-size: 24px; }
	.content h2 { font-size: 20px; }
}

/* Statistik-tabeller */
.stat-table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 18px;
	font-size: 15px;
}
.stat-table th,
.stat-table td {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 1px solid var(--card-border);
}
.stat-table th {
	background: #f6f7f9;
	font-weight: 600;
	color: var(--ink);
}
.stat-table tbody tr:hover { background: #fafbfc; }
.stat-table td strong { color: #2e7d32; font-weight: 700; }
