/* ZW Forum — @version 1.0.1
   Uses your theme's colors and fonts when they exist (the var(--name, fallback)
   pattern: "use the theme's value, or this one if the theme doesn't have it"). */

.zwf {
	--zwf-navy:   var(--navy, #0d1b2e);
	--zwf-amber:  var(--amber, #f59e0b);
	--zwf-text:   var(--text, #1a1a2e);
	--zwf-muted:  var(--text-muted, #6b7280);
	--zwf-line:   var(--grey-mid, #e2e2e4);
	--zwf-card:   #fff;
	--zwf-bg:     var(--grey-bg, #f0eff0);
	--zwf-mono:   var(--font-mono, ui-monospace, monospace);
	--zwf-display:var(--font-display, Impact, sans-serif);
	background: var(--zwf-bg);
	color: var(--zwf-text);
}

.zwf-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: 0.5rem var(--gutter, 1.5rem) 4rem;
}
.zwf-wrap--form { max-width: 620px; }

.zwf-h2 {
	font-family: var(--zwf-display);
	font-weight: 400;
	font-size: 1.6rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--zwf-navy);
	margin: 2.25rem 0 0.9rem;
	line-height: 1;
}
.zwf-opt { font-family: var(--zwf-mono); font-size: 0.7rem; color: var(--zwf-muted); letter-spacing: 0.06em; text-transform: none; }

.zwf a { color: var(--zwf-navy); text-decoration-color: color-mix(in srgb, var(--zwf-amber) 70%, transparent); text-underline-offset: 3px; }
.zwf a:hover { color: #b45309; }

/* Breadcrumb */
.zwf-crumbs {
	font-family: var(--zwf-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--zwf-muted);
	margin: 0 0 1rem;
}
.zwf-crumbs a { text-decoration: none; color: var(--zwf-muted); }
.zwf-crumbs a:hover { color: var(--zwf-navy); }

/* Member bar */
.zwf-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	padding: 0.8rem 1rem;
	background: var(--zwf-card);
	border: 1px solid var(--zwf-line);
	border-left: 3px solid var(--zwf-amber);
	border-radius: 6px;
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
}
.zwf-bar-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-family: var(--zwf-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.zwf-bar-links a:not(.zwf-btn) { text-decoration: none; }

/* Buttons */
.zwf-btn,
.zwf .form-submit .zwf-btn {
	display: inline-block;
	padding: 0.7rem 1.2rem;
	background: var(--zwf-navy);
	color: #fff !important;
	border: 0;
	border-radius: 5px;
	font-family: var(--zwf-mono);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zwf-amber) 40%, transparent);
	transition: background 0.15s, box-shadow 0.15s;
}
.zwf-btn:hover { background: #13284a; box-shadow: inset 0 0 0 1px var(--zwf-amber); color: var(--zwf-amber) !important; }
.zwf-btn--small { padding: 0.45rem 0.8rem; font-size: 0.7rem; }

/* Boards */
.zwf-boards, .zwf-list, .zwf-stats, .zwf-badge-grid { list-style: none; margin: 0; padding: 0; }
.zwf-board {
	background: var(--zwf-card);
	border: 1px solid var(--zwf-line);
	border-radius: 6px;
	padding: 1.1rem 1.25rem;
	margin-bottom: 0.75rem;
	transition: border-color 0.15s;
}
.zwf-board:hover { border-color: color-mix(in srgb, var(--zwf-amber) 60%, var(--zwf-line)); }
.zwf-board-name {
	font-family: var(--zwf-display);
	font-size: 1.45rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
}
.zwf-board-desc { margin: 0.35rem 0 0; color: var(--zwf-muted); font-size: 0.92rem; }
.zwf-board-meta { margin-top: 0.6rem; font-size: 0.8rem; color: var(--zwf-muted); }
.zwf-dot { margin: 0 0.4rem; color: var(--zwf-line); }

/* Topic rows */
.zwf-list { background: var(--zwf-card); border: 1px solid var(--zwf-line); border-radius: 6px; overflow: hidden; }
.zwf-row {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 1.1rem;
	border-top: 1px solid var(--zwf-line);
}
.zwf-row:first-child { border-top: 0; }
.zwf-row.is-pinned { background: color-mix(in srgb, var(--zwf-amber) 6%, #fff); }
.zwf-row-main { min-width: 0; }
.zwf-row-title { font-weight: 600; font-size: 1rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.zwf-row-meta { margin-top: 0.25rem; font-size: 0.8rem; color: var(--zwf-muted); }
.zwf-board-link { color: var(--zwf-muted) !important; }
.zwf-row-stats { flex: none; text-align: right; font-family: var(--zwf-mono); line-height: 1.25; }
.zwf-count { display: block; font-size: 1.05rem; color: var(--zwf-navy); }
.zwf-count-label, .zwf-when { display: block; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--zwf-muted); }
.zwf-flag { color: var(--zwf-amber); display: inline-flex; }

/* Author line + badges */
.zwf-author { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; }
.zwf-author > a { font-weight: 600; text-decoration: none; color: var(--zwf-text); }
.zwf-no { font-family: var(--zwf-mono); font-size: 0.68rem; color: var(--zwf-muted); letter-spacing: 0.04em; }
.zwf-badges { display: inline-flex; gap: 0.2rem; margin-left: 0.15rem; }
.zwf-badge {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--zwf-navy);
	color: var(--zwf-amber);
}
.zwf-badge .zwf-icon { width: 13px; height: 13px; }

/* Posts */
.zwf-post {
	background: var(--zwf-card);
	border: 1px solid var(--zwf-line);
	border-radius: 6px;
	padding: 1.1rem 1.3rem 1.2rem;
	margin-top: 0.75rem;
	scroll-margin-top: 90px;
}
.zwf-post--op { margin-top: 1rem; border-top: 3px solid var(--zwf-navy); }
.zwf-post:target { box-shadow: 0 0 0 2px var(--zwf-amber); }
.zwf-post.is-held { opacity: 0.75; border-style: dashed; }
.zwf-post-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	padding-bottom: 0.7rem;
	margin-bottom: 0.8rem;
	border-bottom: 1px dashed var(--zwf-line);
	font-size: 0.85rem;
}
.zwf-post-head time { font-family: var(--zwf-mono); font-size: 0.7rem; color: var(--zwf-muted); letter-spacing: 0.04em; }
.zwf-permalink { text-decoration: none; }
.zwf-post-body { line-height: 1.7; overflow-wrap: anywhere; }
.zwf-post-body > :first-child { margin-top: 0; }
.zwf-post-body > :last-child { margin-bottom: 0; }

/* 1.0.1: formatting inside posts (headings, lists, quotes). Topics written
   in the dashboard can use these; before, they had no spacing at all. */
.zwf-post-body p { margin: 0 0 1em; }
.zwf-post-body h2,
.zwf-post-body h3,
.zwf-post-body h4 {
	font-family: var(--zwf-display);
	font-weight: 400;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--zwf-navy);
	line-height: 1.1;
	margin: 1.8em 0 0.55em;
}
.zwf-post-body h2 { font-size: 1.5rem; }
.zwf-post-body h3 { font-size: 1.3rem; }
.zwf-post-body h4 { font-size: 1.1rem; }
.zwf-post-body ul,
.zwf-post-body ol {
	margin: 0 0 1.1em;
	padding-left: 1.4em;
}
.zwf-post-body ul { list-style: disc; }
.zwf-post-body ol { list-style: decimal; }
.zwf-post-body li { margin: 0 0 0.45em; padding-left: 0.2em; }
.zwf-post-body li::marker { color: var(--zwf-amber); }
.zwf-post-body blockquote {
	margin: 0 0 1.1em;
	padding: 0.7em 1em;
	border-left: 3px solid var(--zwf-amber);
	background: color-mix(in srgb, var(--zwf-amber) 6%, #fff);
	border-radius: 0 6px 6px 0;
}
.zwf-post-body blockquote > :last-child { margin-bottom: 0; }
.zwf-post-body code { font-family: var(--zwf-mono); font-size: 0.88em; background: #f3f4f6; padding: 0.1em 0.35em; border-radius: 3px; }
.zwf-post-body pre { background: var(--zwf-navy); color: #e5e7eb; padding: 1em; border-radius: 6px; overflow-x: auto; }
.zwf-post-body pre code { background: none; padding: 0; color: inherit; }
.zwf-held-note { font-family: var(--zwf-mono); font-size: 0.72rem; color: #b45309; margin: 0 0 0.6rem; }

/* Forms */
.zwf-form, .zwf .comment-form { background: var(--zwf-card); border: 1px solid var(--zwf-line); border-radius: 6px; padding: 1.4rem; }
.zwf-field { margin: 0 0 1.1rem; }
.zwf-field label { display: block; font-family: var(--zwf-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--zwf-navy); margin-bottom: 0.4rem; }
.zwf-check label { font-family: inherit; font-size: 0.9rem; letter-spacing: 0; text-transform: none; color: var(--zwf-text); display: flex; gap: 0.5rem; align-items: center; }
.zwf input[type="text"], .zwf input[type="email"], .zwf input[type="password"], .zwf select, .zwf textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.8rem;
	border: 1px solid #cfd2d8;
	border-radius: 5px;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	color: var(--zwf-text);
}
.zwf input:focus, .zwf select:focus, .zwf textarea:focus { outline: none; border-color: var(--zwf-amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--zwf-amber) 20%, transparent); }
.zwf-hint { display: block; margin-top: 0.4rem; font-size: 0.8rem; color: var(--zwf-muted); }
.zwf-lead { font-size: 1rem; line-height: 1.65; margin: 0 0 1.25rem; }
.zwf .comment-form .form-submit { margin: 0; }
.zwf .comment-reply-title { margin-top: 2.25rem; margin-bottom: 0.9rem; }
.zwf .comment-respond { margin: 0; padding: 0; }
.zwf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Notices */
.zwf-notice { padding: 0.85rem 1rem; border-radius: 6px; margin: 0 0 1rem; font-size: 0.92rem; border: 1px solid; }
.zwf-notice--ok    { background: #ecfdf3; border-color: #a7f3c4; color: #14532d; }
.zwf-notice--error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.zwf-notice--info  { background: #fffbeb; border-color: #fde68a; color: #78350f; margin-top: 1rem; }

.zwf-empty { color: var(--zwf-muted); background: var(--zwf-card); border: 1px dashed var(--zwf-line); border-radius: 6px; padding: 1.2rem; }
.zwf-cta { margin-top: 2rem; background: var(--zwf-navy); color: rgba(255,255,255,.75); border-radius: 6px; padding: 1.3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.zwf-cta p { margin: 0; flex: 1 1 260px; }
.zwf-cta strong { color: #fff; }
.zwf-cta a:not(.zwf-btn) { color: var(--zwf-amber); font-family: var(--zwf-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.zwf-cta .zwf-btn { background: var(--zwf-amber); color: var(--zwf-navy) !important; }

/* Profile */
.zwf-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.zwf-stats li { background: var(--zwf-card); border: 1px solid var(--zwf-line); border-radius: 6px; padding: 0.7rem 1rem; font-size: 0.85rem; color: var(--zwf-muted); }
.zwf-stats strong { color: var(--zwf-navy); font-size: 1rem; }
.zwf-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; }
.zwf-badge-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.35rem;
	padding: 1.1rem 0.8rem;
	border: 1px dashed #cfd2d8;
	border-radius: 8px;
	background: transparent;
	color: var(--zwf-muted);
}
.zwf-badge-card .zwf-badge-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px dashed currentColor; opacity: 0.6; }
.zwf-badge-name { font-family: var(--zwf-display); font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.zwf-badge-how { font-size: 0.75rem; }
.zwf-badge-card.is-earned { background: var(--zwf-navy); border: 1px solid var(--zwf-navy); color: rgba(255,255,255,.6); position: relative; }
.zwf-badge-card.is-earned::before { /* the same stitching as the page tag */
	content: ""; position: absolute; inset: 5px; border: 1.5px dashed color-mix(in srgb, var(--zwf-amber) 80%, transparent); border-radius: 5px; pointer-events: none;
}
.zwf-badge-card.is-earned .zwf-badge-icon { opacity: 1; border: 0; background: rgba(245,158,11,.12); color: var(--zwf-amber); }
.zwf-badge-card.is-earned .zwf-badge-name { color: #fff; }

/* Pagination */
.zwf-pages { margin-top: 1.25rem; font-family: var(--zwf-mono); font-size: 0.8rem; }
.zwf-pages .page-numbers { padding: 0.3rem 0.6rem; }
.zwf-pages .current { background: var(--zwf-navy); color: #fff; border-radius: 4px; }

@media (max-width: 600px) {
	.zwf-row { flex-direction: column; align-items: flex-start; }
	.zwf-row-stats { text-align: left; display: flex; gap: 0.5rem; align-items: baseline; }
	.zwf-count, .zwf-count-label, .zwf-when { display: inline; }
}
