/* Forge base theme. Classic forum layout; no framework. */

/* Noto Sans / Noto Sans Mono, self-hosted (SIL OFL 1.1, static/fonts/OFL.txt). */
@font-face {
	font-family: "Noto Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/noto-sans-latin-ext-400-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Noto Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/noto-sans-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Noto Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/static/fonts/noto-sans-latin-ext-700-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Noto Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/static/fonts/noto-sans-latin-700-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Noto Sans Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/noto-sans-mono-latin-ext-400-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Noto Sans Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/noto-sans-mono-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--font: "Noto Sans", Verdana, Tahoma, system-ui, sans-serif;
	--mono: "Noto Sans Mono", ui-monospace, Consolas, monospace;
	--bg: #e9edf2;
	--panel: #ffffff;
	--border: #b9c4d0;
	--head: #2f4a66;
	--head-text: #ffffff;
	--text: #1d2733;
	--muted: #5c6b7a;
	--link: #1f5d99;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 14px/1.5 var(--font);
}

a { color: var(--link); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--head); padding: 14px 0; }
.site-name { color: var(--head-text); font-size: 20px; font-weight: bold; text-decoration: none; }

main.wrap { padding-top: 20px; padding-bottom: 20px; }

.panel { background: var(--panel); border: 1px solid var(--border); margin-bottom: 16px; }
.panel-title { margin: 0; padding: 8px 12px; font-size: 15px; background: var(--head); color: var(--head-text); }
.panel-body { padding: 12px; }

.muted { color: var(--muted); font-size: 12px; }

.site-footer { color: var(--muted); font-size: 12px; padding: 16px 0 32px; text-align: center; }

.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.user-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--head-text); font-size: 13px; }
.user-nav a, .user-nav .link-button { color: var(--head-text); }
form.inline { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

.breadcrumbs { font-size: 13px; margin-bottom: 12px; }
.breadcrumbs .sep { color: var(--muted); margin: 0 6px; }

.notice { background: #fff6d6; border: 1px solid #e3c96a; padding: 8px 12px; margin-bottom: 16px; font-size: 13px; }
.form-error { background: #fde8e8; border: 1px solid #d99a9a; color: #7a1f1f; padding: 8px 12px; }
.form-ok { background: #e6f4e6; border: 1px solid #9ac79a; color: #1f5a1f; padding: 8px 12px; margin-bottom: 8px; }

.panel.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: bold; font-size: 13px; }
.form label.check { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.form input:not([type=checkbox]), .form textarea, .form select { font: inherit; padding: 6px 8px; border: 1px solid var(--border); width: 100%; }
button { font: inherit; padding: 6px 14px; background: var(--head); color: var(--head-text); border: 1px solid var(--head); cursor: pointer; justify-self: start; }
button.link-button { background: none; border: 0; padding: 0; color: var(--link); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { text-align: left; background: #d8e0ea; padding: 6px 10px; }
table.grid td { padding: 6px 10px; border-top: 1px solid var(--border); vertical-align: top; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.facts dt { font-weight: bold; }
.facts dd { margin: 0; }
.user-title { color: var(--muted); margin-top: 0; }

/* Forum listings */
.panel-title a { color: var(--head-text); }
.panel-sub { padding: 6px 12px; font-size: 12px; color: var(--muted); background: #f3f6f9; border-bottom: 1px solid var(--border); }
table.grid .num { text-align: center; width: 80px; }
table.grid .last { width: 240px; font-size: 12px; }
table.grid td.empty { text-align: center; color: var(--muted); padding: 16px; }
.forum-title, .thread-title { font-weight: bold; }
.last-title { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.subforums { font-size: 12px; margin-top: 2px; }
tr.sticky td { background: #f7f9e8; }
.tag { display: inline-block; font-size: 11px; padding: 0 5px; margin-right: 4px; border: 1px solid #b7b36a; background: #f1efc7; color: #5a5620; }
.tag.locked { border-color: #c59a9a; background: #f5dede; color: #6d2a2a; }
.mini-pages { font-size: 11px; }
.mini-pages a { margin: 0 2px; }
.depth-1 { padding-left: 34px !important; } .depth-2 { padding-left: 58px !important; } .depth-3 { padding-left: 82px !important; }
.depth-4 { padding-left: 106px !important; } .depth-5 { padding-left: 130px !important; } .depth-6 { padding-left: 154px !important; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 12px; }
.button { display: inline-block; padding: 6px 14px; background: var(--head); color: var(--head-text); text-decoration: none; font-weight: bold; }
button.secondary { background: #fff; color: var(--head); }
.form-buttons { display: flex; gap: 8px; }
.pager { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; margin-left: auto; }
.pager a, .pager strong, .pager .pager-label, .pager .gap { padding: 2px 7px; border: 1px solid var(--border); background: var(--panel); text-decoration: none; }
.pager strong { background: var(--head); color: var(--head-text); border-color: var(--head); }
.pager .gap { border: 0; background: none; }

/* Thread page */
.thread-heading { font-size: 18px; margin: 0 0 12px; }
.post { background: var(--panel); border: 1px solid var(--border); margin-bottom: 12px; }
.post-head { display: flex; justify-content: space-between; padding: 4px 10px; background: #d8e0ea; font-size: 12px; }
.post-number { font-weight: bold; text-decoration: none; }
.post-row { display: grid; grid-template-columns: 180px 1fr; }
.postbit { padding: 10px; border-right: 1px solid var(--border); background: #f3f6f9; font-size: 12px; }
.post-author { font-weight: bold; font-size: 14px; }
.postbit-facts { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; margin: 8px 0 0; }
.postbit-facts dt { color: var(--muted); }
.postbit-facts dd { margin: 0; }
.post-body { padding: 10px 14px; min-width: 0; display: flex; flex-direction: column; }
.post-content { overflow-wrap: anywhere; flex: 1; }
.post-content img { max-width: 100%; height: auto; }
.post-actions { display: flex; gap: 12px; justify-content: flex-end; font-size: 12px; margin-top: 10px; }
.edited { margin-top: 10px; font-style: italic; }
blockquote.quote { margin: 8px 0; padding: 6px 10px; border: 1px solid var(--border); border-left: 3px solid var(--head); background: #f3f6f9; }
.quote-author { font-size: 12px; font-weight: bold; margin-bottom: 4px; }
code, pre, kbd, samp { font-family: var(--mono); }
pre.code { background: #f4f4f4; border: 1px solid var(--border); padding: 8px; overflow-x: auto; font-size: 13px; }
.mod-tools { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; font-size: 12px; }
textarea { font: inherit; width: 100%; padding: 6px 8px; border: 1px solid var(--border); }

@media (max-width: 640px) {
	.post-row { grid-template-columns: 1fr; }
	.postbit { border-right: 0; border-bottom: 1px solid var(--border); }
	.postbit-facts { display: none; }
	table.grid .last, table.grid th.last { display: none; }
	table.grid .num { width: 56px; }
}

/* AdminCP */
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.admin-nav a { padding: 5px 12px; background: var(--panel); border: 1px solid var(--border); text-decoration: none; font-weight: bold; font-size: 13px; }
.perm-set { border: 1px solid var(--border); padding: 8px 12px; display: grid; gap: 4px; }
.perm-set legend { font-weight: bold; font-size: 13px; }
.perm-cells { display: grid; gap: 2px; }
.perm-cells .check, .perm-set .check { display: flex; gap: 6px; align-items: center; font-weight: normal; font-size: 13px; }
.never { color: #7a1f1f; }
.inline-form { display: flex; gap: 8px; align-items: end; }
td.details { font-family: var(--mono); font-size: 11px; max-width: 360px; overflow-wrap: anywhere; }

/* Moderation */
.post-deleted { opacity: .75; border-style: dashed; }
.deleted-note { background: #f5dede; color: #6d2a2a; font-size: 12px; padding: 4px 8px; margin-bottom: 8px; }
.deleted-notice { background: #f5dede; border-color: #c59a9a; }

/* Read tracking */
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c3ccd6; margin-right: 6px; vertical-align: middle; }
.status-dot.unread { background: #e0922f; }
.forum-title.unread, .thread-title.unread { font-weight: 800; }
.thread-title:not(.unread) { font-weight: normal; }
.new-link { display: inline-block; font-size: 10px; font-weight: bold; text-transform: uppercase; color: #fff; background: #e0922f; padding: 0 4px; margin-right: 4px; text-decoration: none; }
.site-nav { display: flex; gap: 14px; font-size: 13px; margin-right: auto; margin-left: 24px; }
.site-nav a { color: var(--head-text); }
.forum-tools, .thread-tools { font-size: 12px; justify-content: flex-start; gap: 16px; }
.thread-tools { margin: -6px 0 10px; }
.check-inline { font-size: 12px; margin-right: 4px; }

/* Community */
.avatar { display: block; border-radius: 4px; object-fit: cover; background: #d8e0ea; }
.avatar-empty { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; font-size: 26px; font-weight: bold; color: var(--head); }
.member-cell { display: flex; align-items: center; gap: 8px; }
.member-cell .avatar, .member-cell .avatar-empty { width: 24px; height: 24px; font-size: 12px; }
.postbit .avatar, .postbit .avatar-empty { margin-bottom: 6px; }
.profile-head { display: flex; gap: 16px; align-items: flex-start; }
.profile-head .avatar-empty { width: 96px; height: 96px; font-size: 40px; }
.profile-actions { display: flex; gap: 14px; }
.avatar-edit { display: grid; gap: 12px; justify-items: start; }
.avatar-edit .avatar-empty { width: 96px; height: 96px; font-size: 40px; }
.signature { border-top: 1px dashed var(--border); margin-top: 12px; padding-top: 6px; font-size: 12px; color: var(--muted); max-height: 120px; overflow: hidden; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 10px; }
.chip { background: #f3f6f9; color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 0 8px; font-size: 13px; line-height: 22px; }
button.chip.mine { background: #fdebd3; border-color: #e0922f; }
.who-reacted { font-size: 11px; margin-left: 6px; }
.snippet { padding: 6px 0; border-bottom: 1px solid #edf0f3; }
.online p { margin: 4px 0; }

/* Messaging */
.counter { text-decoration: none; font-weight: bold; }
.notif-unread { background: #fff7ea; }

/* AdminCP dashboard, 2FA */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--border); padding: 10px; font-size: 12px; color: var(--muted); }
.stat span { display: block; font-size: 22px; font-weight: bold; color: var(--text); }
button.danger { background: #8b2323; border-color: #8b2323; }
.site-notice { font-size: 14px; }
.recovery { font-size: 15px; line-height: 1.8; }
.setup-uri code { overflow-wrap: anywhere; }

/* Attachments, search */
.attachments { margin-top: 12px; padding-top: 6px; border-top: 1px dotted var(--border); display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; font-size: 13px; }
.attachments > .muted { width: 100%; }
.attachment-thumb img { display: block; max-width: 160px; max-height: 160px; border: 1px solid var(--border); }
.search-form { max-width: 560px; }
