/* Copyright (c) 2026 Nour Host. Owner: Anas Osama Al-Halabi (أنس أسامة الحلبية). Resale requires prior written permission. See LICENSE. */
:root {
  color-scheme: light;
  --nf-ink: #071536;
  --nf-ink-soft: #415171;
  --nf-blue: #135df4;
  --nf-blue-dark: #0638a8;
  --nf-cyan: #0edaf0;
  --nf-violet: #6f47ff;
  --nf-line: #dce4f1;
  --nf-surface: #ffffff;
  --nf-surface-soft: #f5f8fd;
  --nf-success: #087f5b;
  --nf-danger: #b42318;
  --nf-radius: 18px;
  --nf-shadow: 0 18px 60px rgba(7, 21, 54, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(14, 218, 240, .1), transparent 28rem),
    linear-gradient(180deg, #fafdff 0, var(--nf-surface-soft) 35rem);
  color: var(--nf-ink);
  font-family: Tahoma, Arial, "Noto Sans Arabic", sans-serif;
  line-height: 1.75;
}
a { color: var(--nf-blue-dark); text-decoration: none; }
a:hover { color: var(--nf-blue); }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; }
.nf-shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.nf-main { min-height: 64vh; padding-block: 36px 72px; }
.nf-skip { position: fixed; inset: -100px auto auto 16px; z-index: 1000; padding: 10px 16px; background: #fff; }
.nf-skip:focus { inset-block-start: 16px; }

.nf-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(220,228,241,.9);
  backdrop-filter: blur(18px);
}
.nf-nav { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nf-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--nf-ink); }
.nf-brand img { width: 64px; height: 64px; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 24px rgba(6,56,168,.12); }
.nf-brand span { display: grid; line-height: 1.35; }
.nf-brand strong { font-size: 1.13rem; letter-spacing: .02em; }
.nf-brand small { color: var(--nf-ink-soft); }
.nf-links { display: flex; align-items: center; gap: 22px; }
.nf-links > a:not(.nf-button), .nf-link-button { color: var(--nf-ink); font-weight: 700; }
.nf-user { color: var(--nf-ink-soft); font-size: .92rem; }
.nf-inline-form { display: inline; margin: 0; }
.nf-link-button { border: 0; background: transparent; cursor: pointer; padding: 0; }
.nf-menu-button { display: none; border: 1px solid var(--nf-line); border-radius: 10px; background: #fff; padding: 8px 12px; }

.nf-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--nf-blue); border-radius: 12px; padding: 11px 20px;
  background: linear-gradient(135deg, var(--nf-blue), var(--nf-blue-dark)); color: #fff;
  font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(19,93,244,.18);
}
.nf-button:hover { color: #fff; transform: translateY(-1px); }
.nf-button-small { padding: 7px 14px; border-radius: 10px; }
.nf-button-ghost { color: var(--nf-blue-dark); background: #fff; border-color: #bfccec; box-shadow: none; }
.nf-button-ghost:hover { color: var(--nf-blue); background: #f7faff; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block-start: 24px; }
.nf-grow { flex: 1; min-width: 0; }
.nf-muted { color: var(--nf-ink-soft); }
.nf-kicker { color: var(--nf-blue); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

.nf-hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); align-items: center; gap: 40px;
  min-height: 430px; margin-block-end: 30px; padding: 52px clamp(26px, 5vw, 66px);
  border: 1px solid rgba(191,204,236,.8); border-radius: 30px; overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,247,255,.94)); box-shadow: var(--nf-shadow);
}
.nf-hero h1 { max-width: 760px; margin: 8px 0 12px; font-size: clamp(2rem, 4.5vw, 4.1rem); line-height: 1.15; letter-spacing: -.04em; }
.nf-hero p { max-width: 720px; margin: 0; color: var(--nf-ink-soft); font-size: 1.08rem; }
.nf-hero-mark { position: relative; display: grid; place-items: center; }
.nf-hero-mark::before { content: ""; position: absolute; width: 85%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(14,218,240,.27), rgba(111,71,255,.08) 55%, transparent 72%); }
.nf-hero-mark img { position: relative; width: min(100%, 360px); border-radius: 28px; mix-blend-mode: multiply; }

.nf-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-block: 26px; }
.nf-stat-grid > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px; background: var(--nf-surface); border: 1px solid var(--nf-line); border-radius: var(--nf-radius); }
.nf-stat-grid strong { font-size: 1.65rem; }
.nf-stat-grid span { color: var(--nf-ink-soft); }
.nf-content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 24px; align-items: start; }
.nf-section-heading, .nf-page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-block-end: 18px; }
.nf-section-heading h2, .nf-page-head h1 { margin: 2px 0; line-height: 1.3; }
.nf-page-head { align-items: center; padding-block: 10px 18px; }
.nf-page-head p { margin: 4px 0 0; color: var(--nf-ink-soft); }

.nf-card, .nf-category {
  background: var(--nf-surface); border: 1px solid var(--nf-line); border-radius: var(--nf-radius); box-shadow: 0 10px 36px rgba(7,21,54,.05);
}
.nf-category { overflow: hidden; margin-block-end: 18px; margin-inline-start: min(calc(var(--nf-category-depth, 0) * 18px), 90px); }
.nf-category-depth-0 { --nf-category-depth: 0; }
.nf-category-depth-1 { --nf-category-depth: 1; }
.nf-category-depth-2 { --nf-category-depth: 2; }
.nf-category-depth-3 { --nf-category-depth: 3; }
.nf-category-depth-4 { --nf-category-depth: 4; }
.nf-category-depth-5 { --nf-category-depth: 5; }
.nf-category-depth-6 { --nf-category-depth: 6; }
.nf-category-depth-7 { --nf-category-depth: 7; }
.nf-category-depth-8 { --nf-category-depth: 8; }
.nf-category-depth-9 { --nf-category-depth: 9; }
.nf-category-depth-10 { --nf-category-depth: 10; }
.nf-category > header { padding: 18px 22px; border-bottom: 1px solid var(--nf-line); background: linear-gradient(90deg, rgba(19,93,244,.05), transparent); }
.nf-category > header h3, .nf-category > header p { margin: 0; }
.nf-category > header p { color: var(--nf-ink-soft); font-size: .92rem; }
.nf-forum-row, .nf-thread-row { display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 18px 22px; border-bottom: 1px solid var(--nf-line); color: var(--nf-ink); transition: background .2s ease; }
.nf-forum-row:last-child, .nf-thread-row:last-child { border-bottom: 0; }
.nf-forum-row:hover, .nf-thread-row:hover { background: #f8fbff; color: var(--nf-ink); }
.nf-forum-icon, .nf-thread-state, .nf-avatar { flex: 0 0 46px; display: grid; place-items: center; width: 46px; height: 46px; align-self: center; border-radius: 14px; background: linear-gradient(135deg, var(--nf-blue), var(--nf-violet)); color: #fff; font-weight: 900; box-shadow: 0 8px 18px rgba(19,93,244,.2); }
.nf-forum-row .nf-grow, .nf-thread-row .nf-grow { display: grid; }
.nf-forum-row small, .nf-thread-row small { color: var(--nf-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-count { flex: 0 0 auto; color: var(--nf-ink-soft); font-size: .78rem; text-align: left; line-height: 1.5; }
.nf-count b { color: var(--nf-ink); }
.nf-sticky { position: sticky; inset-block-start: 110px; padding: 22px; }
.nf-sticky h2 { margin: 2px 0 14px; }
.nf-recent-list { display: grid; gap: 4px; }
.nf-recent-list a { display: grid; padding: 12px 0; border-bottom: 1px solid var(--nf-line); color: var(--nf-ink); }
.nf-recent-list a:last-child { border-bottom: 0; }
.nf-recent-list small { color: var(--nf-ink-soft); }
.nf-thread-list { overflow: hidden; }
.nf-empty { padding: 30px; text-align: center; color: var(--nf-ink-soft); background: var(--nf-surface); border: 1px dashed #bcc9df; border-radius: var(--nf-radius); }

.nf-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 16px; color: var(--nf-ink-soft); font-size: .9rem; }
.nf-breadcrumb strong { color: var(--nf-ink); }
.nf-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-block: 24px; }
.nf-pagination a, .nf-pagination span { padding: 8px 14px; border: 1px solid var(--nf-line); border-radius: 10px; background: #fff; }
.nf-pagination .is-disabled { pointer-events: none; opacity: .45; }

.nf-post-list { display: grid; gap: 18px; }
.nf-post { display: grid; grid-template-columns: 170px minmax(0, 1fr); background: #fff; border: 1px solid var(--nf-line); border-radius: var(--nf-radius); overflow: hidden; box-shadow: 0 10px 32px rgba(7,21,54,.05); }
.nf-post.is-solution { border-color: #55c79f; box-shadow: 0 10px 34px rgba(8,127,91,.11); }
.nf-author { display: flex; flex-direction: column; align-items: center; padding: 26px 18px; background: linear-gradient(180deg, #f6f9fe, #fff); border-left: 1px solid var(--nf-line); }
.nf-author .nf-avatar { width: 66px; height: 66px; border-radius: 22px; font-size: 1.5rem; margin-block-end: 10px; }
.nf-author small { color: var(--nf-ink-soft); }
.nf-post-main { min-width: 0; }
.nf-post-main > header { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 10px 20px; border-bottom: 1px solid var(--nf-line); color: var(--nf-ink-soft); font-size: .85rem; }
.nf-post-main > header time { margin-inline-end: auto; }
.nf-post-body { min-height: 130px; padding: 28px; overflow-wrap: anywhere; }
.nf-post-body blockquote { margin: 18px 0; padding: 16px 20px; border-right: 4px solid var(--nf-blue); background: #f4f8ff; border-radius: 12px; }
.nf-post-body blockquote cite { display: block; color: var(--nf-blue-dark); font-weight: 700; }
.nf-align-center { text-align: center; }
.nf-align-left { text-align: left; direction: ltr; }
.nf-align-right { text-align: right; }
.nf-align-justify { text-align: justify; }
.nf-text-size-1 { font-size: .72em; } .nf-text-size-2 { font-size: .82em; } .nf-text-size-3 { font-size: 1em; }
.nf-text-size-4 { font-size: 1.15em; } .nf-text-size-5 { font-size: 1.35em; } .nf-text-size-6 { font-size: 1.6em; } .nf-text-size-7 { font-size: 2em; }
.nf-font-tahoma { font-family: Tahoma, Arial, sans-serif; }
.nf-font-arial { font-family: Arial, sans-serif; }
.nf-font-arial-black { font-family: "Arial Black", Arial, sans-serif; }
.nf-font-verdana { font-family: Verdana, Arial, sans-serif; }
.nf-font-georgia { font-family: Georgia, "Times New Roman", serif; }
.nf-font-times { font-family: "Times New Roman", Times, serif; }
.nf-font-courier { font-family: "Courier New", Courier, monospace; }
.nf-font-amiri { font-family: Amiri, "Noto Naskh Arabic", serif; }
.nf-font-noto-kufi { font-family: "Noto Kufi Arabic", Tahoma, sans-serif; }
.nf-color-black { color: #000; } .nf-color-white { color: #fff; } .nf-color-red { color: #c92a2a; }
.nf-color-green { color: #087f5b; } .nf-color-blue { color: #135df4; } .nf-color-navy { color: #071536; }
.nf-color-purple { color: #7048e8; } .nf-color-gray { color: #667085; } .nf-color-orange { color: #d9480f; } .nf-color-brown { color: #7f4f24; }
.nf-legacy-box { display: block; margin: 16px 0; padding: 14px 18px; border: 1px solid #bfcbe0; border-radius: 12px; background: #f7f9fd; }
.nf-legacy-info { border-color: #8bc5ff; background: #eef7ff; }
.nf-legacy-warning { border-color: #f0a5a0; background: #fff1f0; }
.nf-legacy-caution { border-color: #e7cb75; background: #fffbe6; }
.nf-legacy-hidden { border-style: dashed; background: #f4f1ff; }
.nf-legacy-fieldset { margin: 16px 0; border: 1px solid var(--nf-line); border-radius: 12px; padding: 14px 18px; }
.nf-legacy-fieldset legend { padding-inline: 8px; color: var(--nf-blue-dark); font-weight: 800; }
.nf-legacy-poem { white-space: pre-wrap; text-align: center; line-height: 2.1; }
.nf-legacy-effect { display: inline-block; padding: 2px 5px; border-radius: 5px; background: #f5f7fb; }
.nf-remote-image { display: block; width: auto; height: auto; max-height: 900px; margin: 16px auto; border-radius: 12px; }
.nf-code { direction: ltr; text-align: left; overflow: auto; padding: 18px; background: #071536; color: #e7efff; border-radius: 12px; }
.nf-media { width: min(100%, 760px); aspect-ratio: 16 / 9; margin: 20px auto; border-radius: 16px; overflow: hidden; background: #071536; }
.nf-media iframe { width: 100%; height: 100%; border: 0; }
.nf-media-link { display: inline-flex; padding: 8px 12px; border: 1px solid var(--nf-line); border-radius: 9px; }
.nf-solution-badge { padding: 3px 9px; border-radius: 999px; background: #d7f8eb; color: var(--nf-success); font-weight: 800; }
.nf-solution-form { padding: 0 28px 24px; }
.nf-solution-form button { border: 1px solid #55c79f; border-radius: 9px; background: #edfff8; color: var(--nf-success); padding: 6px 11px; cursor: pointer; }

.nf-form-card { width: min(900px, 100%); margin-inline: auto; padding: clamp(22px, 4vw, 42px); }
.nf-form-card h1, .nf-form-card h2 { margin: 3px 0 8px; }
form label { display: grid; gap: 7px; margin-block: 18px; color: var(--nf-ink); font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid #bfcbe0; border-radius: 11px; padding: 11px 13px; background: #fff; color: var(--nf-ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--nf-blue); box-shadow: 0 0 0 4px rgba(19,93,244,.1); }
textarea { resize: vertical; min-height: 150px; direction: rtl; line-height: 1.8; }
.nf-editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid #bfcbe0; border-bottom: 0; border-radius: 11px 11px 0 0; background: #f6f9fe; }
.nf-editor-toolbar + textarea { border-radius: 0 0 11px 11px; }
.nf-editor-toolbar button { min-width: 36px; height: 34px; border: 1px solid var(--nf-line); border-radius: 8px; background: #fff; cursor: pointer; color: var(--nf-ink); }
.nf-editor-toolbar button:hover { border-color: var(--nf-blue); color: var(--nf-blue); }
.nf-editor-toolbar button[disabled] { opacity: .5; cursor: wait; }
.nf-editor-toolbar button.is-recording { background: #b42318; color: #fff; border-color: #b42318; animation: nf-recording-pulse 1.2s ease-in-out infinite; }
@keyframes nf-recording-pulse { 50% { opacity: .68; } }
.nf-security-scan-progress { display:grid; grid-template-columns:minmax(160px,1fr) auto; gap:8px 12px; align-items:center; margin-top:14px; padding:12px; border:1px solid var(--nf-line); border-radius:12px; background:#f6f9fe; }
.nf-security-scan-progress progress { width:100%; }
.nf-security-scan-progress span { grid-column:1/-1; color:var(--nf-muted); }
.nf-editor-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nf-toolbar-note { align-self: center; margin-inline-start: auto; color: var(--nf-ink-soft); font-size: .72rem; }
.nf-editor-count { display: block; margin-block-start: 5px; color: var(--nf-ink-soft); text-align: left; font-weight: normal; }
.nf-honeypot { position: absolute !important; inset-inline-start: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.nf-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.nf-reply-box { margin-block-start: 28px; }
.nf-auth-wrap { min-height: 60vh; display: grid; place-items: center; }
.nf-auth-wrap .nf-form-card { max-width: 520px; }
.nf-oauth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--nf-ink-soft); }
.nf-oauth-divider::before,.nf-oauth-divider::after { content:""; height: 1px; background: var(--nf-line); flex: 1; }
.nf-button-google { width: 100%; color: #202124; background: #fff; border-color: #dadce0; box-shadow: none; }
.nf-button-google:hover { color: #202124; background: #f8f9fa; }
.nf-form-switch { text-align: center; color: var(--nf-ink-soft); }
.nf-search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-block-end: 24px; }
.nf-install-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 24px 0; padding: 0; list-style: none; counter-reset: nf-install; }
.nf-install-steps li { position: relative; padding: 10px 8px; border: 1px solid var(--nf-line); border-radius: 10px; background: #f6f9fe; color: var(--nf-ink-soft); text-align: center; font-size: .8rem; font-weight: 800; }
.nf-install-steps li::before { counter-increment: nf-install; content: counter(nf-install); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-end: 5px; border-radius: 50%; background: #dce4f1; }
.nf-install-steps li.is-active { border-color: #9ab7f9; background: #eef4ff; color: var(--nf-blue-dark); }
.nf-install-steps li.is-active::before { background: var(--nf-blue); color: #fff; }

.nf-alert { margin-block: 18px; padding: 16px 20px; border: 1px solid #bfd1ee; border-radius: 13px; background: #f4f8ff; }
.nf-alert p { margin: 4px 0 0; }
.nf-alert-success { border-color: #8dd9bd; background: #ecfff7; color: #075f46; }
.nf-alert-error { border-color: #f1aaa4; background: #fff2f0; color: var(--nf-danger); }
.nf-ai-summary { border-color: #b8a8ff; background: linear-gradient(135deg, #f7f4ff, #f3fbff); }
.nf-status { padding: 6px 12px; border-radius: 999px; background: #edf0f5; color: var(--nf-ink-soft); font-weight: 800; }
.nf-status.is-on { background: #d7f8eb; color: var(--nf-success); }
.nf-table-wrap { overflow-x: auto; }
.nf-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block: 22px; }
.nf-admin-card { padding: 22px; }
.nf-admin-card h2 { margin-block-start: 0; }
.nf-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-block-end: 20px; }
.nf-panel-heading h1, .nf-panel-heading p { margin: 3px 0; }
.nf-role-badge { padding: 8px 14px; border-radius: 999px; background: #eaf1ff; color: var(--nf-blue-dark); font-weight: 900; }
.nf-control-nav { display: flex; gap: 8px; overflow-x: auto; padding: 8px; border: 1px solid var(--nf-line); border-radius: 14px; background: var(--nf-surface); }
.nf-control-nav a { flex: 0 0 auto; padding: 8px 12px; border-radius: 9px; color: var(--nf-ink); font-weight: 800; }
.nf-control-nav a.is-active { background: var(--nf-blue); color: #fff; }
.nf-panel-stats { margin-block: 18px; }
.nf-quick-links { display: grid; gap: 10px; }
.nf-quick-links a { display: grid; padding: 14px; border: 1px solid var(--nf-line); border-radius: 12px; color: var(--nf-ink); }
.nf-quick-links span, .nf-table small { display: block; color: var(--nf-ink-soft); font-size: .82rem; }
.nf-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nf-moderation-options { margin: 18px 0; padding: 16px; border: 1px solid var(--nf-border); border-radius: var(--nf-radius); background: rgba(19, 93, 244, .04); }
.nf-moderation-options legend { padding-inline: 8px; font-weight: 800; color: var(--nf-blue); }
.nf-form-row > label { min-width: 0; }
.nf-color-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nf-color-grid label { margin-block: 8px; font-size: .8rem; }
.nf-color-grid input[type="color"] { min-height: 46px; padding: 4px; cursor: pointer; }
.nf-check { display: flex; grid-template-columns: none; align-items: center; gap: 9px; font-weight: 700; }
.nf-check input { width: auto; flex: 0 0 auto; }
.nf-checkbox-list { display: grid; gap: 8px; margin-block: 14px 20px; }
.nf-checkbox-list label { display: flex; grid-template-columns: none; align-items: flex-start; gap: 10px; margin: 0; padding: 10px; border: 1px solid var(--nf-line); border-radius: 10px; }
.nf-checkbox-list input { width: auto; margin-block-start: 5px; }
.nf-checkbox-list span { display: grid; }
.nf-checkbox-list small { color: var(--nf-ink-soft); direction: ltr; text-align: right; }
.nf-row-form { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(160px, 1fr) minmax(140px, 1fr) auto; align-items: center; gap: 8px; margin: 0; }
.nf-log-list { display: grid; gap: 8px; }
.nf-log-list > div { display: grid; padding: 11px 0; border-bottom: 1px solid var(--nf-line); }
.nf-log-list > div:last-child { border-bottom: 0; }
.nf-log-list span, .nf-log-list small { color: var(--nf-ink-soft); }
.nf-log-list a { justify-self: start; font-weight: 800; }
.nf-top-gap { margin-block-start: 20px; }
.nf-danger-text { color: var(--nf-danger); }
.nf-import-report { margin-block: 14px; padding: 14px; border-radius: 12px; background: #f5f8ff; }
.nf-import-report > strong, .nf-import-report > span { display: block; }
.nf-import-report ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; padding-inline-start: 20px; }
.nf-import-jobs { display: grid; gap: 16px; }
.nf-import-job { padding: 18px; border: 1px solid var(--nf-line); border-radius: 14px; background: #f9fbff; }
.nf-import-job > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.nf-import-job > header div { display: grid; }
.nf-import-job > header small, .nf-import-job > p { color: var(--nf-ink-soft); }
.nf-progress-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-block: 18px 8px; }
.nf-progress-line progress { width: 100%; height: 18px; accent-color: var(--nf-blue); }
.nf-import-counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nf-import-counters span { display: flex; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 9px; background: #edf3ff; color: var(--nf-ink-soft); }

/* Beta 5 community and modern display */
.nf-community-compose { margin-block: 18px; padding: 18px 22px; }
.nf-community-compose > summary { cursor: pointer; font-weight: 900; color: var(--nf-blue-dark); }
.nf-story-strip { display: flex; gap: 18px; overflow-x: auto; padding: 14px 4px 24px; scroll-snap-type: inline mandatory; }
.nf-story-circle { flex: 0 0 94px; display: grid; justify-items: center; gap: 5px; color: var(--nf-ink); text-align: center; scroll-snap-align: start; }
.nf-story-circle img, .nf-story-circle > span { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; padding: 3px; border: 3px solid transparent; background: linear-gradient(#fff,#fff) padding-box,linear-gradient(135deg,#ff3e80,#7048e8,#1ec8ff) border-box; box-shadow: 0 8px 24px rgba(112,72,232,.18); }
.nf-story-circle > span { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--nf-blue),var(--nf-violet)); font-size: 1.6rem; font-weight: 900; }
.nf-story-circle.is-seen img, .nf-story-circle.is-seen > span { filter: saturate(.45); opacity: .72; }
.nf-story-circle strong { max-width: 94px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.nf-story-circle small { color: var(--nf-ink-soft); font-size: .7rem; }
.nf-home-stories { margin-block: 24px 32px; }
.nf-story-view { width: min(620px,100%); margin-inline: auto; overflow: hidden; background: #071536; color: #fff; }
.nf-story-view > header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(5,15,40,.92); }
.nf-story-view > header div { display: grid; }
.nf-story-view > header small { color: #aebbd6; }
.nf-story-stage { position: relative; display: grid; place-items: center; min-height: min(72vh,760px); }
.nf-story-stage img,.nf-story-stage video { display: block; width: 100%; max-height: min(72vh,760px); object-fit: contain; }
.nf-story-caption { position: absolute; inset: auto 16px 18px; max-height: 35%; overflow: auto; padding: 12px 16px; border-radius: 14px; background: rgba(0,0,0,.62); text-align: center; backdrop-filter: blur(8px); }
.nf-media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.nf-media-tile { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--nf-line); border-radius: 16px; background: #fff; color: var(--nf-ink); box-shadow: 0 10px 28px rgba(7,21,54,.06); }
.nf-media-tile > a:first-child { position: relative; display: block; aspect-ratio: 1; background: #071536; }
.nf-media-tile img,.nf-media-tile video { width: 100%; height: 100%; object-fit: cover; }
.nf-media-tile > div { display: grid; gap: 3px; padding: 12px 14px; }
.nf-media-tile small { color: var(--nf-ink-soft); }
.nf-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; }
.nf-media-detail { width: min(880px,100%); margin-inline: auto; overflow: hidden; }
.nf-media-detail > header { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.nf-media-stage { display: grid; place-items: center; min-height: 360px; background: #071536; }
.nf-media-stage img,.nf-media-stage video { display: block; max-width: 100%; max-height: 78vh; }
.nf-media-caption { padding: 18px 22px; }
.nf-reaction-bar { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 18px; border-top: 1px solid var(--nf-line); }
.nf-reaction-bar form { margin: 0; }
.nf-reaction-bar button { display: inline-flex; align-items: center; gap: 3px; min-width: 38px; height: 38px; padding: 5px 8px; border: 1px solid var(--nf-line); border-radius: 999px; background: #fff; cursor: pointer; }
.nf-reaction-bar button:hover,.nf-reaction-bar button.is-active { border-color: var(--nf-blue); background: #edf4ff; transform: translateY(-2px); }
.nf-reaction-bar button small { color: var(--nf-ink-soft); }
.nf-share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; padding: 10px 18px 16px; color: var(--nf-ink-soft); font-size: .82rem; }
.nf-share-bar button { border: 0; background: transparent; color: var(--nf-blue); cursor: pointer; }
.nf-post-community { border-top: 1px solid var(--nf-line); }
.nf-post-community .nf-reaction-bar { border-top: 0; }
.nf-author-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-block-start: 10px; }
.nf-author-social a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #eaf1ff; color: var(--nf-blue-dark); font-size: .72rem; font-weight: 900; }
.nf-community-comments { width: min(880px,100%); margin: 18px auto; padding: 22px; }
.nf-community-comments article { padding: 13px 0; border-bottom: 1px solid var(--nf-line); }
.nf-community-comments article p { margin: 4px 0; }
.nf-community-comments article small { color: var(--nf-ink-soft); }
.nf-conversation-list { display: grid; }
.nf-conversation-list a { position: relative; display: grid; padding: 13px; border-bottom: 1px solid var(--nf-line); color: var(--nf-ink); }
.nf-conversation-list a span { color: var(--nf-ink-soft); }
.nf-conversation-list a b { position: absolute; inset: 12px auto auto 12px; min-width: 24px; padding: 2px 7px; border-radius: 999px; background: var(--nf-blue); color: #fff; text-align: center; }
.nf-chat-thread { width: min(900px,100%); margin-inline: auto; padding: 22px; }
.nf-chat-thread > header { border-bottom: 1px solid var(--nf-line); }
.nf-chat-thread > div { display: grid; gap: 10px; max-height: 62vh; overflow: auto; padding: 18px 0; }
.nf-chat-thread article { width: min(78%,680px); padding: 11px 14px; border-radius: 14px 14px 14px 4px; background: #f0f4fb; }
.nf-chat-thread article.is-mine { justify-self: end; border-radius: 14px 14px 4px 14px; background: #e4efff; }
.nf-chat-thread article small { color: var(--nf-ink-soft); }
.nf-notification-list { overflow: hidden; }
.nf-notification-list a { display: grid; gap: 3px; padding: 16px 20px; border-bottom: 1px solid var(--nf-line); color: var(--nf-ink); }
.nf-notification-list a.is-unread { background: #edf4ff; border-inline-start: 4px solid var(--nf-blue); }
.nf-notification-list span { color: var(--nf-ink-soft); }
.nf-donation-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 18px; }
.nf-community-chat { margin-block-start: 26px; padding: 22px; }
.nf-chat-box { max-height: 320px; overflow: auto; display: grid; gap: 5px; }
.nf-chat-box p { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 10px; background: #f7f9fd; }
.nf-chat-box small { color: var(--nf-ink-soft); }
.nf-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-block-start: 14px; }
.nf-chat-form input { margin: 0; }
.nf-profile-cover { height: clamp(180px,28vw,330px); margin-block-end: -68px; border-radius: 24px; background: linear-gradient(135deg,#dcecff,#ece8ff); background-size: cover; background-position: center; }
.nf-profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.nf-profile-head { position: relative; }
.nf-verified { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--nf-blue); color: #fff; font-size: .78rem; vertical-align: middle; }
.nf-profile-titles,.nf-social-links,.nf-award-grid,.nf-album-list { display: flex; flex-wrap: wrap; gap: 9px; margin-block: 12px 22px; }
.nf-profile-titles span,.nf-award-grid span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: #edf3ff; color: var(--nf-blue-dark); font-weight: 800; }
.nf-social-links a,.nf-album-list a { display: grid; min-width: 100px; padding: 9px 12px; border: 1px solid var(--nf-line); border-radius: 10px; background: #fff; text-align: center; }
.nf-social-links small,.nf-album-list small { color: var(--nf-ink-soft); }
.nf-spoiler { margin: 14px 0; padding: 12px 15px; border: 1px dashed var(--nf-blue); border-radius: 12px; background: #f7faff; }
.nf-spoiler summary { cursor: pointer; font-weight: 800; }
.nf-translated-post { margin: 0 28px 18px; padding: 12px 15px; border: 1px solid #a6d9cc; border-radius: 12px; background: #f0fff9; }
.nf-translate-form { padding: 0 28px 18px; }
.nf-translate-form button { border: 1px solid var(--nf-line); border-radius: 9px; background: #fff; color: var(--nf-blue); padding: 7px 11px; cursor: pointer; }
.nf-bb-list { margin-block: 12px; }
.nf-mode-modern .nf-category,.nf-mode-modern .nf-card,.nf-mode-modern .nf-post { border-color: rgba(176,191,226,.68); box-shadow: 0 20px 54px rgba(32,49,102,.09); }
.nf-mode-modern .nf-forum-row { margin: 8px; border: 0; border-radius: 14px; background: linear-gradient(110deg,#f8fbff,#fff); }
.nf-mode-modern .nf-content-grid { grid-template-columns: minmax(0,1fr); }
.nf-mode-modern .nf-content-grid > aside { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); }

@media (max-width: 800px) {
  .nf-media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .nf-chat-thread article { width: 90%; }
  .nf-chat-box p { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nf-media-grid { grid-template-columns: 1fr; }
  .nf-story-circle { flex-basis: 82px; }
  .nf-story-circle img,.nf-story-circle > span { width: 66px; height: 66px; }
}
.nf-filter-form { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(150px, .7fr)) auto; align-items: end; gap: 10px; margin-block: 18px; }
.nf-filter-form label { margin: 0; }
.nf-structure-group { display: grid; gap: 5px; padding-block: 14px; margin-inline-start: min(calc(var(--nf-category-depth, 0) * 18px), 90px); border-bottom: 1px solid var(--nf-line); }
.nf-structure-group:last-child { border-bottom: 0; }
.nf-structure-group > small { color: var(--nf-ink-soft); }
.nf-structure-group > a { display: flex; justify-content: space-between; gap: 18px; padding: 9px 12px; border-radius: 8px; color: var(--nf-ink); background: #f8faff; }
.nf-structure-group > a:hover { background: #eef4ff; }
.nf-structure-group > a small { color: var(--nf-ink-soft); }
.nf-structure-forum { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.nf-structure-forum > a { display: flex; justify-content: space-between; gap: 18px; padding: 9px 12px; border-radius: 8px; color: var(--nf-ink); background: #f8faff; }
.nf-structure-forum > a:hover { background: #eef4ff; }
.nf-structure-forum > a small { color: var(--nf-ink-soft); }
.nf-structure-forum details, .nf-structure-group > details { padding: 8px 10px; border: 1px solid var(--nf-line); border-radius: 9px; background: var(--nf-surface); }
.nf-structure-forum details[open], .nf-structure-group > details[open] { grid-column: 1 / -1; }
.nf-depth-1 { padding-inline-start: 34px !important; }
.nf-depth-2 { padding-inline-start: 58px !important; }
.nf-depth-3 { padding-inline-start: 82px !important; }
.nf-depth-4 { padding-inline-start: 106px !important; }
.nf-depth-5 { padding-inline-start: 130px !important; }
.nf-depth-6, .nf-depth-7, .nf-depth-8, .nf-depth-9, .nf-depth-10 { padding-inline-start: 154px !important; }
.nf-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.nf-member-card { display: flex; align-items: center; gap: 13px; padding: 16px; }
.nf-member-card .nf-avatar { width: 48px; height: 48px; }
.nf-member-card { color: inherit; text-decoration: none; }
.nf-profile-head { display: flex; align-items: center; gap: 22px; padding: 26px; margin-bottom: 18px; }
.nf-profile-head > div { flex: 1; }
.nf-profile-head h1 { margin: 4px 0; }
.nf-profile-avatar { width: 128px !important; height: 128px !important; border-radius: 30px !important; object-fit: cover; }
.nf-avatar { object-fit: cover; }
.nf-signature { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--nf-border); color: var(--nf-muted); font-size: .92rem; }
.nf-signature-image { display: block; max-width: min(100%, 800px); max-height: 300px; margin-top: 10px; object-fit: contain; }
.nf-member-card div { min-width: 0; display: grid; }
.nf-member-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-member-card small { color: var(--nf-ink-soft); }
.is-hidden { display: none !important; }
.nf-moderation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.nf-queue-item { padding: 14px 0; border-bottom: 1px solid var(--nf-line); }
.nf-queue-item:last-child { border-bottom: 0; }
.nf-queue-item p { margin: 6px 0; }
.nf-queue-item small { display: block; color: var(--nf-ink-soft); }
.nf-queue-item form { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(180px, 1fr) auto; align-items: center; gap: 8px; margin-block-start: 10px; }
.nf-queue-item form select, .nf-queue-item form input { margin: 0; }
.nf-report-box { margin: 0 28px 24px; color: var(--nf-ink-soft); }
.nf-report-box summary { cursor: pointer; font-size: .85rem; }
.nf-report-box form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-block-start: 8px; }
.nf-report-box label { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--nf-line); text-align: right; white-space: nowrap; }
th { background: #f6f9fe; }
.nf-error-page { min-height: 56vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.nf-error-page > span { font-size: clamp(5rem, 15vw, 10rem); line-height: 1; font-weight: 900; background: linear-gradient(135deg, var(--nf-blue), var(--nf-cyan)); -webkit-background-clip: text; color: transparent; }

.nf-ai-provider-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 18px; }
.nf-external-ai { display: inline-flex; margin-top: 14px; color: var(--nf-blue); font-weight: 700; }
.nf-editor-toolbar select { width: auto; min-width: 118px; padding: 7px 9px; margin: 0; }
.nf-toolbar-link { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 9px; border: 1px solid var(--nf-line); border-radius: 8px; background: #fff; color: var(--nf-blue-dark); font-size: .78rem; font-weight: 700; }
.nf-ad { width: min(100% - 32px,1180px); margin: 18px auto; padding: 14px 20px; text-align: center; border: 1px solid var(--nf-line); border-radius: 14px; background: var(--nf-surface); overflow: hidden; }
.nf-ad p { margin: 5px 0; }
.nf-ad img { display: block; max-width: 100%; height: auto; margin: auto; }
.nf-ad-adsense { min-height: 90px; }
.nf-ad-adsense ins { display: block; }
.nf-ad-stack { width: min(100% - 32px,1180px); margin: 18px auto; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: inline mandatory; }
.nf-ad-stack .nf-ad { flex: 0 0 min(680px,90vw); width: auto; margin: 0; scroll-snap-align: center; }
.nf-ad-banner { border-radius: 5px; background: linear-gradient(90deg,#eaf2ff,#fff); }
.nf-ad-ticker { white-space: nowrap; }
.nf-ad-ticker > * { display: inline-block; animation: nf-ad-ticker var(--nf-ad-speed,8s) linear infinite alternate; }
.nf-ad-floating { box-shadow: 0 18px 50px rgba(7,21,54,.16); border-color: #adc2ee; }
@keyframes nf-ad-ticker { from { transform: translateX(8%); } to { transform: translateX(-8%); } }
.nf-impersonation { padding: 10px 0; color: #fff; background: #8d240d; }
.nf-impersonation > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nf-impersonation form { margin: 0; }
.nf-required-read { border: 2px solid #d36b00; background: #fff7e7; }
.nf-profile-titles img { max-width: 180px; max-height: 70px; object-fit: contain; }
.nf-profile-email { text-align: center; }
.nf-fieldset { margin: 18px 0; padding: 16px; border: 1px solid var(--nf-line); border-radius: 12px; }

.nf-footer { border-top: 1px solid var(--nf-line); background: #071536; color: #dce8ff; padding-block: 34px; }
.nf-footer-grid { display: flex; justify-content: space-between; gap: 30px; }
.nf-footer p { margin: 4px 0; color: #9fb0d0; }
.nf-footer-grid > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.nf-footer a { color: var(--nf-cyan); }
.nf-language-form, .nf-language-form label { display: inline; margin: 0; }
.nf-language-form select { width: auto; min-width: 120px; padding: 6px 9px; border-color: #51617f; background: #122247; color: #fff; }

@media (max-width: 900px) {
  .nf-content-grid, .nf-hero { grid-template-columns: 1fr; }
  .nf-admin-grid { grid-template-columns: 1fr; }
  .nf-moderation-grid { grid-template-columns: 1fr; }
  .nf-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-hero { min-height: auto; }
  .nf-hero-mark { display: none; }
  .nf-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .nf-menu-button { display: block; }
  .nf-links { display: none; position: absolute; inset: 88px 16px auto; flex-direction: column; align-items: stretch; padding: 18px; background: #fff; border: 1px solid var(--nf-line); border-radius: 16px; box-shadow: var(--nf-shadow); }
  .nf-links.is-open { display: flex; }
  .nf-sticky { position: static; }
}

@media (max-width: 650px) {
  .nf-shell { width: min(100% - 20px, 1180px); }
  .nf-main { padding-block-start: 22px; }
  .nf-brand img { width: 52px; height: 52px; }
  .nf-brand small { display: none; }
  .nf-hero { padding: 30px 22px; border-radius: 22px; }
  .nf-stat-grid { grid-template-columns: 1fr 1fr; }
  .nf-community-stats dl { grid-template-columns: 1fr 1fr; }
  .nf-stat-grid > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .nf-stat-grid > div { display: grid; padding: 15px; }
  .nf-page-head { align-items: flex-start; flex-direction: column; }
  .nf-forum-row, .nf-thread-row { padding: 15px; }
  .nf-forum-icon, .nf-thread-state { width: 40px; height: 40px; }
  .nf-count { display: none; }
  .nf-post { grid-template-columns: 1fr; }
  .nf-author { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 14px 18px; border-left: 0; border-bottom: 1px solid var(--nf-line); }
  .nf-author .nf-avatar { width: 42px; height: 42px; margin: 0; border-radius: 13px; font-size: 1rem; }
  .nf-post-body { padding: 20px; }
  .nf-toolbar-note { display: none; }
  .nf-search-form { grid-template-columns: 1fr; }
  .nf-form-row, .nf-row-form, .nf-queue-item form, .nf-report-box form { grid-template-columns: 1fr; }
  .nf-filter-form { grid-template-columns: 1fr; }
  .nf-import-counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-install-steps { grid-template-columns: 1fr 1fr; }
  .nf-footer-grid { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Beta 6: advanced thread, profile, administration and display systems */
.nf-thread-stamps { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 0 18px; }
.nf-thread-stamps > span { --stamp-color: var(--nf-blue); display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 7px 14px; border: 1px solid color-mix(in srgb,var(--stamp-color),#fff 60%); border-radius: 999px; background: color-mix(in srgb,var(--stamp-color),#fff 90%); color: var(--stamp-color); box-shadow: 0 8px 24px color-mix(in srgb,var(--stamp-color),transparent 82%); }
.nf-palette-1 { --stamp-color: #1736b6; --group-color: #1736b6; color: #1736b6; }
.nf-palette-2 { --stamp-color: #087f5b; --group-color: #087f5b; color: #087f5b; }
.nf-palette-3 { --stamp-color: #7b35e8; --group-color: #7b35e8; color: #7b35e8; }
.nf-palette-4 { --stamp-color: #c2410c; --group-color: #c2410c; color: #c2410c; }
.nf-palette-5 { --stamp-color: #b42318; --group-color: #b42318; color: #b42318; }
.nf-palette-6 { --stamp-color: #0369a1; --group-color: #0369a1; color: #0369a1; }
.nf-palette-7 { --stamp-color: #8a5a00; --group-color: #8a5a00; color: #8a5a00; }
.nf-palette-8 { --stamp-color: #596580; --group-color: #596580; color: #596580; }
.nf-group-accent { font-weight: 900; }
.nf-thread-stamps img { width: 30px; height: 30px; object-fit: contain; }
.nf-thread-tools { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; margin-block-end: 18px; padding: 0; overflow: visible; }
.nf-thread-tools details { position: relative; min-width: 0; border-inline-end: 1px solid var(--nf-line); }
.nf-thread-tools details:last-child { border-inline-end: 0; }
.nf-thread-tools summary { min-height: 48px; display: grid; place-items: center; padding: 10px; cursor: pointer; font-weight: 800; text-align: center; list-style: none; }
.nf-thread-tools summary::-webkit-details-marker { display: none; }
.nf-thread-tools details[open] > :not(summary) { position: absolute; z-index: 12; inset: calc(100% + 6px) 0 auto; width: min(340px,90vw); padding: 14px; border: 1px solid var(--nf-line); border-radius: 12px; background: var(--nf-surface); box-shadow: var(--nf-shadow); }
.nf-thread-tools details[open] > div { display: grid; gap: 9px; }
.nf-thread-tools form { display: grid; gap: 8px; margin: 0; }
.nf-thread-tools button,.nf-thread-tools a { padding: 7px 10px; border: 1px solid var(--nf-line); border-radius: 8px; background: var(--nf-surface); color: var(--nf-blue-dark); cursor: pointer; text-align: center; }
.nf-thread-tools select,.nf-thread-tools input { margin: 0; padding: 7px 9px; }
.nf-post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: auto; }
.nf-post-actions a,.nf-post-actions button { padding: 4px 8px; border: 1px solid var(--nf-line); border-radius: 7px; background: var(--nf-surface); color: var(--nf-blue-dark); cursor: pointer; font-size: .76rem; }
.nf-post-actions button.is-active { border-color: var(--nf-blue); background: #e7efff; }
.nf-postbit-title { display: grid; place-items: center; max-width: 145px; margin-block: 5px; text-align: center; font-weight: 800; }
.nf-member-title-image,.nf-postbit-title img { display: block; width: auto; max-width: 138px; max-height: 54px; object-fit: contain; }
.nf-postbit-rank { display: grid; place-items: center; gap: 4px; margin-block: 7px 10px; color: var(--nf-blue-dark); font-size: .78rem; text-align: center; }
.nf-postbit-rank img { width: auto; max-width: 138px; max-height: 54px; object-fit: contain; }
.nf-postbit-stats { width: 100%; margin: 8px 0; padding-block: 8px; border-block: 1px solid var(--nf-line); font-size: .7rem; }
.nf-postbit-stats > div { display: flex; justify-content: space-between; gap: 8px; padding-block: 2px; }
.nf-postbit-stats dt { color: var(--nf-ink-soft); }
.nf-postbit-stats dd { margin: 0; font-weight: 800; text-align: end; }
.nf-postbit-awards { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-block-start: 7px; }
.nf-postbit-awards span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #edf3ff; }
.nf-postbit-awards img { width: 24px; height: 24px; object-fit: contain; }
.nf-postbit-awards small { flex-basis: 100%; color: var(--nf-ink-soft); text-align: center; }
.nf-code-preview { margin: 0 28px 18px; padding: 12px; border: 1px solid var(--nf-line); border-radius: 12px; background: #f7f9fd; }
.nf-code-preview summary { cursor: pointer; font-weight: 800; }
.nf-code-preview iframe { display: block; width: 100%; min-height: 360px; margin-block: 10px; border: 1px solid #cad4e7; border-radius: 10px; background: #fff; }
.nf-code-preview small { color: var(--nf-ink-soft); }
.nf-code-source { position: relative; overflow: auto; direction: ltr; text-align: left; white-space: pre-wrap; padding: 16px; border-radius: 10px; background: #071536; color: #e6efff; }
.nf-bb-table { display: block; width: 100%; overflow-x: auto; margin-block: 16px; }
.nf-bb-table th,.nf-bb-table td { border: 1px solid var(--nf-line); }
.nf-thread-tags,.nf-thread-viewers { margin-block: 18px; padding: 20px; }
.nf-thread-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.nf-thread-tags a { padding: 5px 10px; border-radius: 999px; background: #edf3ff; color: var(--nf-blue-dark); }
.nf-thread-viewers > div:last-child,.nf-profile-people { display: flex; flex-wrap: wrap; gap: 10px; }
.nf-thread-viewers > div:last-child > a,.nf-profile-people > a { display: inline-grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; min-width: 130px; padding: 8px 11px; border: 1px solid var(--nf-line); border-radius: 11px; background: var(--nf-surface); }
.nf-thread-viewers img,.nf-profile-people img { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; }
.nf-profile-people small { grid-column: 2; color: var(--nf-ink-soft); }
.nf-thanks-form { padding: 0 28px 18px; }
.nf-thanks-form button { padding: 7px 11px; border: 1px solid #e6be54; border-radius: 9px; background: #fff8dc; color: #785800; cursor: pointer; font-weight: 800; }
.nf-similar-topics { margin-block: 10px; padding: 12px; border: 1px solid #e6be54; border-radius: 11px; background: #fffaf0; }
.nf-similar-topics a { display: flex; justify-content: space-between; gap: 12px; padding-block: 5px; border-bottom: 1px dashed #ead79f; }
.nf-similar-topics a:last-child { border-bottom: 0; }
.nf-forum-grid-2,.nf-mode-grid2 .nf-forum-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.nf-forum-grid-3,.nf-mode-grid3 .nf-forum-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.nf-forum-grid-2 .nf-forum-row,.nf-forum-grid-3 .nf-forum-row,.nf-mode-grid2 .nf-forum-row,.nf-mode-grid3 .nf-forum-row { min-width: 0; border-inline-end: 1px solid var(--nf-line); }
.nf-mode-grid2 .nf-content-grid,.nf-mode-grid3 .nf-content-grid { grid-template-columns: minmax(0,1fr); }
.nf-mode-grid2 .nf-content-grid > aside,.nf-mode-grid3 .nf-content-grid > aside { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 18px; }
.nf-online-summary { margin-block: 26px 14px; padding: 22px; }
.nf-online-summary .nf-section-heading { margin: 0 0 10px; }
.nf-online-total { min-width: 2.5rem; padding: 6px 11px; border-radius: 999px; background: #edf3ff; color: var(--nf-blue-dark); text-align: center; }
.nf-community-stats { margin-block-start: 20px; padding-block-start: 18px; border-top: 1px solid var(--nf-line); }
.nf-community-stats h3 { margin: 0 0 12px; }
.nf-community-stats dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0; }
.nf-community-stats dl div { display: flex; justify-content: space-between; gap: 8px; padding: 11px 13px; border-radius: 10px; background: #f4f7fd; }
.nf-community-stats dt { color: var(--nf-ink-soft); }
.nf-community-stats dd { margin: 0; font-weight: 900; }
.nf-community-stats p { margin: 14px 0 0; }
.nf-online-members,.nf-group-legend,.nf-forum-legend { display: flex; flex-wrap: wrap; gap: 9px; }
.nf-online-members a,.nf-group-legend span { padding: 5px 10px; border-radius: 999px; background: #edf3ff; }
.nf-group-legend { margin-block-start: 12px; }
.nf-group-legend span { border-inline-start: 4px solid var(--group-color); }
.nf-forum-legend { justify-content: center; margin-block: 14px 28px; color: var(--nf-ink-soft); font-size: .85rem; }
.nf-forum-legend span { padding: 7px 11px; }
.nf-forum-legend i { font-style: normal; }
.nf-forum-legend .is-new { color: var(--nf-blue); }.nf-forum-legend .is-old { color: #94a3b8; }.nf-forum-legend .is-locked { color: var(--nf-danger); }
.nf-group-admin-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(360px,1fr)); gap: 14px; }
.nf-permission-matrix { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 8px; margin-block: 16px; }
.nf-permission-matrix label { display: grid; grid-template-columns: minmax(0,1fr) 110px; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--nf-line); border-radius: 10px; background: #f8faff; }
.nf-permission-matrix label > span { display: grid; min-width: 0; }
.nf-permission-matrix small { overflow: hidden; color: var(--nf-ink-soft); direction: ltr; text-overflow: ellipsis; }
.nf-permission-matrix select { margin: 0; padding: 7px; }
.nf-table-wrap,.nf-activity-table { width: 100%; overflow-x: auto; }
.nf-activity-table a { overflow-wrap: anywhere; }
.nf-activity-table td { vertical-align: top; white-space: normal; min-width: 120px; }
.nf-audit-table td { vertical-align: top; min-width: 145px; white-space: normal; }
.nf-audit-table td > strong,.nf-audit-table td > small,.nf-audit-table td > time { display: block; margin-block: 0 5px; }
.nf-audit-table details { min-width: 230px; }
.nf-audit-table summary { cursor: pointer; color: var(--nf-blue-dark); font-weight: 800; }
.nf-audit-table pre { max-width: 440px; max-height: 240px; overflow: auto; padding: 10px; border-radius: 8px; background: #071536; color: #e6efff; direction: ltr; font-size: .72rem; white-space: pre-wrap; }
.nf-archive-links { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 12px; }
.nf-archive-links a { display: grid; padding: 14px; border: 1px solid var(--nf-line); border-radius: 11px; background: var(--nf-surface); }
.nf-theme-switcher,.nf-theme-switcher label { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.nf-theme-switcher select { width: auto; min-width: 130px; padding: 6px 9px; border-color: #51617f; background: #122247; color: #fff; }
.nf-thread-selection { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 7px; margin-block: 14px; }
.nf-thread-selection label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border: 1px solid var(--nf-line); border-radius: 9px; background: #f8faff; }
.nf-thread-selection input { width: auto; margin: 0; }
.nf-subscription-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 18px; }
.nf-plan-price { display: block; margin-block: 14px 2px; color: var(--nf-blue-dark); font-size: 1.8rem; }
body[data-thread-view="compact"] .nf-post-list { gap: 8px; }
body[data-thread-view="compact"] .nf-post-body { min-height: 70px; padding-block: 16px; }
body[data-thread-view="wide"] .nf-shell { width: min(1480px,calc(100% - 32px)); }

@media (max-width: 920px) {
  .nf-thread-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nf-thread-tools details { border-bottom: 1px solid var(--nf-line); }
  .nf-forum-grid-3,.nf-mode-grid3 .nf-forum-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nf-post-actions { flex-basis: 100%; margin-inline-start: 0; }
}
@media (max-width: 650px) {
  .nf-thread-tools,.nf-forum-grid-2,.nf-forum-grid-3,.nf-mode-grid2 .nf-forum-list,.nf-mode-grid3 .nf-forum-list { grid-template-columns: 1fr; }
  .nf-thread-tools details[open] > :not(summary) { position: static; width: 100%; border: 0; border-top: 1px solid var(--nf-line); border-radius: 0; box-shadow: none; }
  .nf-group-admin-grid,.nf-permission-matrix { grid-template-columns: 1fr; }
  .nf-permission-matrix label { grid-template-columns: 1fr; }
  .nf-postbit-stats,.nf-postbit-awards,.nf-postbit-title,.nf-postbit-rank { display: none; }
  .nf-code-preview,.nf-thread-tags,.nf-thread-viewers { margin-inline: 0; }
}
@media print {
  .nf-header,.nf-footer,.nf-thread-tools,.nf-post-actions,.nf-reaction-bar,.nf-share-bar,.nf-thanks-form,.nf-report-box,.nf-reply-box,.nf-pagination,.nf-ad { display: none !important; }
  body { background: #fff; color: #000; }
  .nf-shell { width: 100%; }
  .nf-post { break-inside: avoid; box-shadow: none; }
}

/* Beta 7: uncluttered navigation, durable deletion, attachments and unified ads */
.nf-button-danger { border-color: #b42318; background: linear-gradient(135deg,#d92d20,#912018); color: #fff; box-shadow: 0 9px 22px rgba(180,35,24,.16); }
.nf-button-danger:hover { color: #fff; }
.nf-links { flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
.nf-links > a:not(.nf-button),.nf-link-button,.nf-nav-group > summary,.nf-welcome { min-height: 38px; display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 9px; white-space: nowrap; }
.nf-links > a:not(.nf-button):hover,.nf-link-button:hover,.nf-nav-group > summary:hover { background: #edf4ff; }
.nf-nav-group { position: relative; }
.nf-nav-group > summary { list-style: none; cursor: pointer; color: var(--nf-ink); font-weight: 800; }
.nf-nav-group > summary::-webkit-details-marker { display: none; }
.nf-nav-group > summary::after { content: "⌄"; margin-inline-start: 6px; color: var(--nf-blue); }
.nf-nav-group[open] > summary { background: #e9f1ff; color: var(--nf-blue-dark); }
.nf-nav-group > div { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; z-index: 80; min-width: 210px; display: grid; gap: 3px; padding: 9px; border: 1px solid var(--nf-line); border-radius: 13px; background: #fff; box-shadow: 0 18px 45px rgba(7,21,54,.16); }
.nf-nav-group > div a { padding: 8px 11px; border-radius: 8px; color: var(--nf-ink); font-weight: 700; }
.nf-nav-group > div a:hover { background: #edf4ff; }
.nf-welcome { color: var(--nf-ink-soft); font-size: .82rem; }

.nf-author-social a,.nf-social-links a { color: var(--nf-blue-dark); }
.nf-author-social svg { width: 17px; height: 17px; }
.nf-social-links svg { width: 22px; height: 22px; margin-inline: auto; }
.nf-postbit-title { width: 100%; max-width: 178px; min-height: 34px; overflow: hidden; }
.nf-member-title-image,.nf-postbit-title img { width: auto; max-width: 100%; height: auto; max-height: 92px; object-fit: contain; }
.nf-thread-stamps > span { max-width: 100%; border-radius: 16px; }
.nf-thread-stamps img { width: auto; max-width: min(100%,520px); height: auto; max-height: 170px; }
.nf-thread-stamp-small { display: inline-flex; align-items: center; gap: 5px; margin-inline-end: 7px; }
.nf-thread-stamp-small img { width: auto; max-width: 72px; height: 24px; object-fit: contain; }
img.nf-thread-stamp-small { width: auto; max-width: 72px; height: 24px; object-fit: contain; vertical-align: middle; }

.nf-post-actions form { display: inline-flex; margin: 0; }
.nf-post-actions form button { color: var(--nf-danger); }
.nf-attachments { margin: 8px 28px 18px; padding: 14px; border: 1px solid #c9d7ef; border-radius: 13px; background: #f7faff; }
.nf-attachments > strong { display: block; margin-block-end: 8px; }
.nf-attachments > div { display: grid; gap: 7px; }
.nf-attachments article { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--nf-line); border-radius: 9px; background: #fff; }
.nf-attachments a { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.nf-attachments a span { overflow-wrap: anywhere; }
.nf-attachments form { margin: 0; }
.nf-attachments button { border: 0; background: transparent; color: var(--nf-danger); cursor: pointer; font-weight: 800; }
.nf-attachment-picker { display: grid; gap: 5px; padding: 13px; border: 1px dashed #a9bce3; border-radius: 11px; background: #f7faff; }
.nf-thanks-area { border-top: 1px solid var(--nf-line); padding-block: 12px; }
.nf-thanks-area p { margin: 0 28px 10px; color: var(--nf-ink-soft); }
.nf-thanks-form button.is-active { border-color: #087f5b; background: #e9fff6; color: #076447; }

.nf-ad-unit { width: min(calc(100% - 32px),var(--nf-ad-width)); height: min(var(--nf-ad-height),60vw); min-height: 40px; margin: 18px auto; overflow: hidden; border: 1px solid var(--nf-line); border-radius: 14px; background: #fff; box-shadow: 0 10px 35px rgba(7,21,54,.06); }
.nf-ad-track { width: 100%; height: 100%; display: flex; overflow-x: auto; scroll-snap-type: inline mandatory; scrollbar-width: thin; }
.nf-ad-item { flex: 0 0 100%; width: 100%; height: 100%; display: grid; place-items: center; align-content: center; padding: 10px 16px; overflow: hidden; scroll-snap-align: center; text-align: center; }
.nf-ad-item img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.nf-ad-item p { max-width: 100%; margin: 4px; overflow-wrap: anywhere; }
.nf-ad-unit.is-multiple .nf-ad-track { scroll-behavior: smooth; }
.nf-ad-unit.nf-ad-ticker .nf-ad-track { overflow: hidden; }
.nf-ad-unit.nf-ad-ticker.is-multiple .nf-ad-item { animation: nf-ad-slide calc(var(--nf-ad-speed) * 2) ease-in-out infinite alternate; }
.nf-ad-unit.nf-ad-banner { border-radius: 6px; background: linear-gradient(90deg,#edf4ff,#fff,#f4f0ff); }
.nf-ad-unit.nf-ad-floating { box-shadow: 0 20px 55px rgba(7,21,54,.17); border-color: #aabfe9; }
@keyframes nf-ad-slide { from { transform: translateX(0); } to { transform: translateX(100%); } }

.nf-structure-board { display: grid; gap: 13px; }
.nf-structure-category { padding: 14px; border: 1px solid var(--nf-line); border-radius: 14px; background: #fbfdff; }
.nf-structure-category > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nf-structure-category > header div:first-child { display: grid; }
.nf-structure-category.is-dragging,.nf-structure-forum.is-dragging { opacity: .45; }
.nf-structure-drop { margin-block: 8px; padding: 9px 12px; border: 1px dashed #a7bce7; border-radius: 9px; color: var(--nf-ink-soft); text-align: center; }
.nf-structure-drop.is-drop-target { border-color: var(--nf-blue); background: #eaf2ff; color: var(--nf-blue-dark); }
.nf-drag-handle { border: 1px solid var(--nf-line); border-radius: 8px; background: #fff; cursor: grab; }
.nf-content-delete { display: flex; justify-content: flex-end; margin-block: 0 14px; }

.nf-chat-box { gap: 8px; }
.nf-chat-message { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: start; gap: 8px; padding: 10px 12px; border-radius: 11px; background: #f7f9fd; }
.nf-chat-message p { margin: 0; overflow-wrap: anywhere; }
.nf-chat-message small { color: var(--nf-ink-soft); white-space: nowrap; }
.nf-chat-manage > summary { cursor: pointer; color: var(--nf-blue-dark); font-size: .78rem; font-weight: 800; }
.nf-chat-manage[open] { grid-column: 1 / -1; padding: 10px; border-top: 1px solid var(--nf-line); }
.nf-chat-manage form { display: flex; align-items: end; gap: 8px; margin-block: 7px; }
.nf-chat-manage label { flex: 1; margin: 0; }
.nf-chat-compose { display: grid; gap: 7px; }
.nf-chat-emojis { display: flex; flex-wrap: wrap; gap: 4px; }
.nf-chat-emojis button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 1px solid var(--nf-line); border-radius: 8px; background: #fff; cursor: pointer; }
.nf-table details pre { max-width: 520px; max-height: 220px; overflow: auto; padding: 10px; border-radius: 9px; background: #071536; color: #eff5ff; direction: ltr; white-space: pre-wrap; }

@media (max-width: 1100px) {
  .nf-nav { align-items: flex-start; padding-block: 12px; }
  .nf-brand span { display: none; }
  .nf-brand img { width: 52px; height: 52px; }
}
@media (max-width: 760px) {
  .nf-nav { align-items: center; }
  .nf-nav-group { width: 100%; }
  .nf-nav-group > summary { width: 100%; justify-content: space-between; }
  .nf-nav-group > div { position: static; margin-block-start: 5px; box-shadow: none; }
  .nf-chat-form { grid-template-columns: 1fr; }
  .nf-chat-message { grid-template-columns: 1fr auto; }
  .nf-chat-message p { grid-column: 1 / -1; }
  .nf-chat-manage { grid-column: 1 / -1; }
  .nf-structure-category > header { align-items: flex-start; flex-direction: column; }
  .nf-attachments { margin-inline: 10px; }
}

/* Beta 8: forum policy, verified identities and separated AdSense units */
.nf-forum-icon { overflow: hidden; text-align: center; }
.nf-forum-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nf-forum-list { overflow: hidden; border-radius: 0 0 var(--nf-radius) var(--nf-radius); }
.nf-forum-row .nf-count { flex: 0 0 92px; text-align: start; }
.nf-forum-row .nf-grow { min-width: 0; }
.nf-forum-staff-box a { color: var(--nf-blue-dark); font-weight: 800; }
.nf-forum-staff { display: block; margin-block-start: 5px; color: var(--nf-blue-dark); font-weight: 700; }
.nf-forum-staff-box { margin-block: 12px; padding: 12px 16px; border: 1px solid var(--nf-line); border-radius: 12px; background: #f8faff; }
.nf-verification-badge { display: inline-block; width: 20px; height: 20px; margin-inline-start: 4px; object-fit: contain; vertical-align: text-bottom; }
.nf-adsense-stack { width: 100%; margin-block: 18px; }
.nf-adsense { min-height: 90px; overflow: hidden; text-align: center; }
.nf-adsense ins { display: block; max-width: 100%; }
.nf-member-title-text,.nf-member-title-image { display: inline-block; }
.nf-profile-titles .nf-member-title-image { max-width: min(100%,420px); max-height: 130px; }
.nf-postbit-title .nf-member-title-image { width: 100%; max-height: 92px; }
.nf-pending-notice { margin-block: 12px; padding: 12px 16px; border: 1px solid #e6be54; border-radius: 12px; background: #fff8dc; color: #785800; }
@media (max-width: 650px) {
  .nf-adsense { min-height: 60px; }
  .nf-verification-badge { width: 18px; height: 18px; }
}
.nf-thread-bookmark .is-active{background:#fff3bf;color:#7a4b00;border-color:#f5c542;box-shadow:0 0 0 3px rgba(245,197,66,.16)}
.nf-thread-rating-summary{display:flex!important;align-items:center;gap:.75rem;flex-wrap:wrap;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--border,#dce4f3)}
.nf-thread-rating-summary .nf-rating-stars{color:#f59f00;font-size:1.55rem;letter-spacing:.08em;direction:ltr}
.nf-thread-rating-summary small{color:var(--muted,#596580)}
.nf-forum-staff-box{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.nf-forum-staff-box strong{margin-inline-end:.2rem}
.nf-search-advanced{padding:1rem;margin-bottom:1rem}.nf-search-advanced details{margin-top:.8rem}.nf-search-advanced details>summary{cursor:pointer;font-weight:700}.nf-search-advanced .nf-form-row{margin-top:.8rem}
