:root {
  --nf-bg: #0c0f0d;
  --nf-bg-soft: #121815;
  --nf-panel: #171f1b;
  --nf-panel-2: #202a24;
  --nf-border: #334139;
  --nf-text: #e8efe9;
  --nf-muted: #a9b9ad;
  --nf-accent: #d68b45;
  --nf-accent-2: #9dbb73;
  --nf-danger: #d05b4f;
  --nf-success: #7fb36d;
  --nf-shadow: 0 22px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
body.nf-body { margin: 0; color: var(--nf-text); background: radial-gradient(circle at 20% 0%, #20251d 0, #0c0f0d 38rem), var(--nf-bg); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: #f0b26c; text-decoration: none; }
a:hover { color: #ffd09b; }
.nf-app { min-height: 100vh; display: flex; flex-direction: column; }
.nf-site-header { border-bottom: 1px solid var(--nf-border); background: rgba(12, 15, 13, .94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.nf-brand-row, .nf-shell, .nf-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.nf-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0 12px; }
.nf-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--nf-text); }
.nf-brand__mark, .nf-sigil { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--nf-accent); background: linear-gradient(145deg, #3a2417, #111613); color: #ffd09b; font-weight: 800; letter-spacing: .08em; }
.nf-brand small { display: block; color: var(--nf-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; }
.nf-brand strong { display: block; font-size: 20px; }
.nf-auth-links, .nf-main-nav, .nf-footer nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nf-auth-links a, .nf-main-nav a, .nf-footer a { color: var(--nf-muted); }
.nf-main-nav { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 0 0 14px; }
.nf-main-nav a { padding: 8px 0; font-weight: 700; }
.nf-status-bar { display: flex; gap: 16px; overflow-x: auto; padding: 10px max(16px, calc((100vw - 1180px) / 2)); border-top: 1px solid rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .18); color: var(--nf-muted); }
.nf-status-bar strong { color: var(--nf-text); }
.nf-shell { flex: 1; padding: 32px 0 54px; }
.nf-hero { width: min(1180px, calc(100% - 32px)); margin: 0 auto 28px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 22px; align-items: stretch; }
.nf-hero__copy, .nf-hero__panel, .nf-panel, .nf-card, .nf-stat { border: 1px solid var(--nf-border); background: linear-gradient(180deg, rgba(32, 42, 36, .92), rgba(18, 24, 21, .96)); box-shadow: var(--nf-shadow); }
.nf-hero__copy { padding: clamp(28px, 5vw, 64px); min-height: 430px; display: flex; flex-direction: column; justify-content: center; }
.nf-hero__panel { padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; background-image: linear-gradient(180deg, rgba(32, 42, 36, .5), #131815), repeating-linear-gradient(135deg, rgba(214, 139, 69, .08) 0 1px, transparent 1px 12px); }
.nf-hero h1, .nf-page-head h1, .nf-auth h1 { font-size: clamp(42px, 8vw, 84px); line-height: .9; margin: 0 0 18px; letter-spacing: -.06em; }
.nf-kicker { margin: 0 0 12px; color: var(--nf-accent); font-size: 12px; text-transform: uppercase; letter-spacing: .22em; font-weight: 800; }
.nf-lead { max-width: 720px; color: #d9e2da; font-size: clamp(18px, 2.5vw, 24px); }
.nf-muted { color: var(--nf-muted); }
.nf-actions, .nf-action-stack { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.nf-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--nf-accent); background: var(--nf-accent); color: #15100b; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.nf-button:hover { color: #15100b; filter: brightness(1.08); }
.nf-button--ghost { background: transparent; color: #ffd09b; }
.nf-button--ghost:hover { color: #fff0dc; }
.nf-button--small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.nf-grid { width: min(1180px, calc(100% - 32px)); margin: 0 auto 22px; display: grid; gap: 18px; }
.nf-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nf-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nf-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nf-panel, .nf-card, .nf-stat { padding: 22px; }
.nf-card h2, .nf-panel h2 { margin-top: 0; }
.nf-stat span { display: block; color: var(--nf-muted); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.nf-stat strong { display: block; font-size: 34px; }
.nf-page-head { width: min(1180px, calc(100% - 32px)); margin: 0 auto 22px; display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.nf-page-head h1 { font-size: clamp(34px, 5vw, 58px); }
.nf-alert { width: min(1180px, calc(100% - 32px)); margin: 0 auto 18px; padding: 14px 16px; border: 1px solid var(--nf-border); background: var(--nf-panel); }
.nf-alert--success { border-color: var(--nf-success); }
.nf-alert--danger, .nf-alert--warning { border-color: var(--nf-danger); }
.nf-resource-list, .nf-link-grid, .nf-build-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.nf-resource-list span, .nf-link-grid a, .nf-build-progress span { padding: 12px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .16); }
.nf-resource-list strong { float: right; color: var(--nf-accent-2); }
.nf-log, .nf-thread-list { margin: 0; padding-left: 20px; }
.nf-log li, .nf-thread-list li { margin: 0 0 10px; color: #dce5de; }
.nf-log span, .nf-thread-list span, .nf-posts span { display: block; color: var(--nf-muted); font-size: 12px; }
.nf-auth { min-height: 62vh; display: grid; place-items: center; }
.nf-auth__panel { width: min(520px, 100%); }
.nf-form { display: grid; gap: 14px; }
.nf-form label { display: grid; gap: 6px; color: var(--nf-muted); font-weight: 700; }
.nf-form input, .nf-form textarea, .nf-row-form input { width: 100%; border: 1px solid var(--nf-border); background: #0e1411; color: var(--nf-text); padding: 11px 12px; }
.nf-form textarea { resize: vertical; }
.nf-form--compact { margin-top: 12px; }
.nf-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.nf-row-form { display: grid; grid-template-columns: 1fr 78px auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nf-map-grid { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); gap: 10px; }
.nf-map-tile { min-height: 104px; padding: 12px; border: 1px solid var(--nf-border); background: #121815; display: flex; flex-direction: column; justify-content: space-between; }
.nf-map-tile--town { border-color: var(--nf-accent-2); background: #1b281d; }
.nf-map-tile--current { outline: 2px solid var(--nf-accent); }
.nf-danger-3, .nf-danger-4 { background: #241c16; }
.nf-danger-5 { background: #2a1513; border-color: #7f3932; }
.nf-badge { display: inline-block; margin-left: 8px; padding: 3px 7px; border: 1px solid var(--nf-success); color: var(--nf-success); font-size: 12px; text-transform: uppercase; }
.nf-posts article { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nf-table-wrap { overflow-x: auto; }
.nf-table { width: 100%; border-collapse: collapse; }
.nf-table th, .nf-table td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; }
.nf-footer { padding: 28px 0; border-top: 1px solid var(--nf-border); display: flex; justify-content: space-between; gap: 18px; color: var(--nf-muted); }

@media (max-width: 820px) {
  .nf-hero, .nf-grid--two, .nf-grid--three, .nf-grid--four { grid-template-columns: 1fr; }
  .nf-page-head, .nf-brand-row, .nf-footer { align-items: flex-start; flex-direction: column; }
  .nf-hero__copy { min-height: 320px; }
  .nf-map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-row-form { grid-template-columns: 1fr; }
}
