/* FiendBot: shared styles for the redesigned public pages (stats, timeline, about,
   feedback, calculators, map). Loaded after main.css / now-ui-kit.css. */
:root {
	--fb-bg: #1D1E28;
	--fb-bg-2: #191a23;
	--fb-surface: #262836;
	--fb-surface-2: #2f3242;
	--fb-border: #3a3d4d;
	--fb-accent: #4c0000;
	--fb-accent-2: #6e0000;
	--fb-red: #c0392b;
	--fb-gold: #ddb464;
	--fb-text: #f2f2f5;
	--fb-muted: #a2a8bd;
}

/* Layout */
.fb-section { padding: 48px 0 56px; }
.fb-section-alt { background: var(--fb-bg-2); border-top: 1px solid var(--fb-border); border-bottom: 1px solid var(--fb-border); }
.fb-container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.fb-h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: #fff; margin: 0 0 8px; letter-spacing: -.01em; line-height: 1.15; }
.fb-h2 { font-size: 26px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.fb-h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.fb-intro { color: var(--fb-muted); font-family: Lato, sans-serif; font-size: 17px; max-width: 70ch; margin-bottom: 24px; }
.fb-panel { background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 14px; padding: 20px 22px; color: var(--fb-text); }
.fb-panel h2 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 14px; }
.fb-panel h2 small { color: var(--fb-muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.fb-link { color: #e27d72; font-weight: 600; }
.fb-link:hover { color: #ff9d92; text-decoration: none; }
.fb-up { color: #7ee2a0 !important; }
.fb-down { color: #ff9d92 !important; }
.fb-hint { color: var(--fb-muted); font-size: 13px; font-family: Lato, sans-serif; }

/* Alerts */
.fb-alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-family: Lato, sans-serif; }
.fb-alert-ok { background: rgba(46, 160, 67, .15); border: 1px solid rgba(46, 160, 67, .45); color: #9be9a8; }
.fb-alert-err { background: rgba(192, 57, 43, .15); border: 1px solid rgba(192, 57, 43, .45); color: #ffb3aa; }

/* Forms (feedback, calculators) */
.fb-form label, .fb-calc label { display: block; color: var(--fb-text); font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.fb-form textarea, .fb-form select, .fb-calc input, .fb-calc select {
	width: 100%; background: var(--fb-bg) !important; color: #fff !important; border: 1px solid var(--fb-border) !important;
	border-radius: 10px !important; padding: 10px 12px !important; font: 15px Lato, sans-serif; height: auto !important; box-shadow: none !important;
}
.fb-form textarea:focus, .fb-form select:focus, .fb-calc input:focus, .fb-calc select:focus {
	outline: none; border-color: var(--fb-red) !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .25) !important;
}
.fb-form textarea { resize: vertical; min-height: 160px; }
.fb-count { text-align: right; color: var(--fb-muted); font-size: 12px; margin-top: 4px; }
.fb-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Stats */
.fb-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.fb-status { color: #fff !important; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
	background: var(--fb-surface); border: 1px solid var(--fb-border); }
.fb-status small { color: #d6d9e4; font-weight: 400; margin-left: 4px; }
.fb-dot { width: 10px; height: 10px; border-radius: 50%; background: #888; }
.fb-status.is-on .fb-dot { background: #2ecc71; box-shadow: 0 0 0 4px rgba(46, 204, 113, .2); animation: fb-pulse 2s infinite; }
.fb-status.is-off .fb-dot { background: var(--fb-red); }
@keyframes fb-pulse { 50% { box-shadow: 0 0 0 7px rgba(46, 204, 113, .05); } }
.fb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.fb-kpi { background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; }
.fb-kpi span { color: var(--fb-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.fb-kpi b { font-size: 32px; color: #fff; line-height: 1.2; margin: 4px 0; }
.fb-kpi b em { font-style: normal; font-size: 16px; color: var(--fb-muted); }
.fb-kpi small { color: var(--fb-muted); font-size: 13px; }
.fb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fb-span-2 { grid-column: 1 / -1; }
.fb-chart { position: relative; height: 260px; }
.fb-span-2 .fb-chart { height: 320px; }
.fb-milestones { list-style: none; padding: 0; margin: 0 0 12px; max-height: 260px; overflow: auto; }
.fb-milestones li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--fb-border); font-family: Lato, sans-serif; }
.fb-milestones li span { color: var(--fb-muted); }
@media (max-width: 767px) { .fb-grid-2 { grid-template-columns: 1fr; } .fb-kpi b { font-size: 26px; } }

/* Timeline */
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.fb-chip { background: var(--fb-surface); color: var(--fb-text); border: 1px solid var(--fb-border); border-radius: 999px; padding: 6px 14px;
	font-weight: 600; font-size: 14px; cursor: pointer; }
.fb-chip span { color: var(--fb-muted); font-weight: 400; margin-left: 4px; }
.fb-chip.is-on { background: var(--fb-accent); border-color: var(--fb-red); }
.fb-chip.is-on span { color: #f3c9c4; }
.fb-tl { position: relative; padding-left: 28px; }
.fb-tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 0; width: 2px; background: linear-gradient(var(--fb-red), var(--fb-border)); }
.fb-tl-year { font-size: 22px; font-weight: 800; color: #fff; margin: 26px 0 10px -28px; padding-left: 28px; }
.fb-tl-year:first-child { margin-top: 0; }
.fb-tl-item { position: relative; margin-bottom: 14px; }
.fb-tl-dot { position: absolute; left: -26px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--fb-bg); border: 3px solid var(--fb-muted); }
.fb-tl-milestone .fb-tl-dot { border-color: var(--fb-gold); background: var(--fb-gold); }
.fb-tl-release .fb-tl-dot { border-color: var(--fb-red); }
.fb-tl-story .fb-tl-dot { border-color: #7ec8e3; }
.fb-tl-card { background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 12px; padding: 14px 18px; }
.fb-tl-milestone .fb-tl-card { border-color: rgba(221, 180, 100, .45); }
.fb-tl-meta { display: flex; gap: 10px; align-items: center; color: var(--fb-muted); font-size: 13px; margin-bottom: 2px; }
.fb-tl-tag { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--fb-border); }
.fb-tl-card h2 { font-size: 18px; font-weight: 700; color: #fff; margin: 0; }
.fb-tl-card p { color: var(--fb-muted); margin: 4px 0 0; font-family: Lato, sans-serif; }
.fb-tl-card details { margin-top: 6px; }
.fb-tl-card summary { color: #e27d72; cursor: pointer; font-size: 14px; font-weight: 600; }
.fb-tl-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--fb-text); font-family: Lato, sans-serif; font-size: 14px; }

/* About */
.fb-about-hero { background: radial-gradient(ellipse at 80% 0%, rgba(76, 0, 0, .45), transparent 60%); }
.fb-about-intro { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: center; }
.fb-about-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fb-facts li { background: var(--fb-surface); border: 1px solid var(--fb-border); border-left: 4px solid var(--fb-red); border-radius: 12px; padding: 14px 18px; }
.fb-facts b { display: block; font-size: 30px; color: #fff; line-height: 1.1; }
.fb-facts span { color: var(--fb-muted); }
.fb-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 8px; }
.fb-member { display: flex; gap: 16px; background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 14px; padding: 18px; }
.fb-member img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--fb-accent); flex: 0 0 auto; background: var(--fb-bg); }
.fb-member h3 { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.fb-member p { color: var(--fb-muted); font-family: Lato, sans-serif; margin: 0; font-size: 15px; }
.fb-member a { color: #e27d72; }
.fb-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--fb-gold); border: 1px solid rgba(221, 180, 100, .5);
	border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }
.fb-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.fb-link-card { display: block; background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 12px; padding: 16px 18px; color: #fff; transition: border-color .15s, transform .15s; }
.fb-link-card:hover { color: #fff; text-decoration: none; border-color: var(--fb-red); transform: translateY(-2px); }
.fb-link-card b { display: block; font-size: 16px; }
.fb-link-card span { color: var(--fb-muted); font-size: 14px; font-family: Lato, sans-serif; }
@media (max-width: 767px) { .fb-about-intro { grid-template-columns: 1fr; } }

/* Calculators */
.fb-tabs-pub { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fb-tab { background: var(--fb-surface); color: var(--fb-muted); border: 1px solid var(--fb-border); border-radius: 10px; padding: 8px 16px; font-weight: 600; cursor: pointer; }
.fb-tab:hover { color: #fff; }
.fb-tab.is-on { background: var(--fb-accent); color: #fff; border-color: var(--fb-red); }
.fb-calc-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.fb-inputs { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.fb-inputs-2 { grid-template-columns: 1fr 1fr; }
.fb-calc .fb-inputs label { margin-top: 10px; }
.fb-result { background: var(--fb-bg); border: 1px solid var(--fb-border); border-radius: 12px; padding: 14px 16px; position: sticky; top: 12px; }
.fb-r { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, .07); font-family: Lato, sans-serif; }
.fb-r span { color: var(--fb-muted); }
.fb-r b { color: #fff; text-align: right; }
.fb-r.fb-big b { font-size: 22px; color: var(--fb-gold); }
.fb-r-sep { margin-top: 12px; padding-top: 6px; color: var(--fb-gold); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 767px) { .fb-calc-grid { grid-template-columns: 1fr; } .fb-result { position: static; } }

/* Map */
body.fb-map-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.fb-map-page > nav.navbar { flex: 0 0 auto; }
.fb-map-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
#map { position: absolute; inset: 0; background: #12131a; }
.leaflet-container { font: 14px Lato, sans-serif; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--fb-surface); color: var(--fb-text); }
.leaflet-popup-content { margin: 10px 14px; }
.leaflet-bar { border: 1px solid var(--fb-border) !important; border-radius: 10px !important; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .35) !important; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--fb-surface); color: #fff; border-bottom-color: var(--fb-border); width: 36px; height: 36px; line-height: 36px; font-size: 20px; }
.leaflet-bar a:hover { background: var(--fb-surface-2); }
.leaflet-bottom.leaflet-right { margin: 0 12px 12px 0; }

.fb-map-panel { position: absolute; top: 12px; left: 12px; bottom: 12px; z-index: 1000; width: 320px; display: flex; flex-direction: column;
	background: rgba(30, 31, 42, .97); border: 1px solid var(--fb-border); border-radius: 14px; color: var(--fb-text);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
.fb-map-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--fb-border); }
.fb-map-panel-head h1 { font-size: 18px; font-weight: 800; color: #fff; margin: 0; }
.fb-map-collapse { background: var(--fb-surface-2); color: var(--fb-text); border: 1px solid var(--fb-border); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.fb-map-collapse:hover { color: #fff; border-color: var(--fb-red); }
.fb-map-collapse .when-closed { display: none; }
.fb-map-panel-body { overflow: auto; padding: 4px 16px 14px; flex: 1 1 auto; }
.fb-map-panel.is-closed { bottom: auto; width: auto; }
.fb-map-panel.is-closed .fb-map-panel-body { display: none; }
.fb-map-panel.is-closed .fb-map-panel-head { border-bottom: 0; }
.fb-map-panel.is-closed .fb-map-panel-head h1 { display: none; }
.fb-map-panel.is-closed .when-open { display: none; }
.fb-map-panel.is-closed .when-closed { display: inline; }
.fb-map-sec { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.fb-map-sec:last-of-type { border-bottom: 0; }
.fb-map-sec h2 { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--fb-gold); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.fb-map-sec h2 > span { color: var(--fb-muted); font-weight: 400; letter-spacing: 0; }
.fb-map-allnone { margin-left: auto; text-transform: none; }
.fb-map-allnone button { background: none; border: 0; padding: 0; color: #e27d72; font-size: 13px; font-weight: 600; cursor: pointer; }
.fb-map-goto { display: flex; gap: 8px; }
.fb-map-goto input { flex: 1 1 0; min-width: 0; background: var(--fb-bg); color: #fff; border: 1px solid var(--fb-border); border-radius: 8px; padding: 7px 10px; font-size: 15px; }
.fb-map-goto input:focus { outline: none; border-color: var(--fb-red); }
.fb-map-goto .btn { border-radius: 8px !important; padding: 6px 16px; font-size: 14px !important; margin: 0; }
.fb-map-check { display: flex !important; align-items: center; gap: 8px; color: var(--fb-text) !important; font-size: 14px; margin: 10px 0 0; cursor: pointer; }
.fb-map-check input { width: 16px; height: 16px; accent-color: var(--fb-red); }
.fb-map-hint { font-size: 13px; color: var(--fb-muted); margin: 8px 0 0; font-family: Lato, sans-serif; }
.fb-map-hint a { color: #e27d72; display: inline-block; }
.fb-map-note { font-size: 13px; color: #ffb3aa; margin: 10px 0 0; }
.fb-map-layers { list-style: none; padding: 0; margin: 0; }
.fb-map-layers label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--fb-text); }
.fb-map-layers label:hover { background: var(--fb-surface-2); }
.fb-map-layers input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--fb-red); }
.fb-map-sw { width: 22px; height: 22px; flex: 0 0 auto; object-fit: contain; }
.fb-map-dot { display: inline-block; width: 12px; height: 12px; margin: 0 5px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .6); }
.fb-map-lname { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-map-count { color: var(--fb-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fb-map-loading { color: var(--fb-muted); font-size: 13px; }
.fb-map-seg { display: flex; border: 1px solid var(--fb-border); border-radius: 8px; overflow: hidden; }
.fb-map-seg button { flex: 1 1 0; background: var(--fb-bg); color: var(--fb-muted); border: 0; padding: 7px 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.fb-map-seg button + button { border-left: 1px solid var(--fb-border); }
.fb-map-seg button.is-on { background: var(--fb-accent); color: #fff; }
.fb-map-list { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow: auto; }
.fb-map-list button { width: 100%; display: flex; justify-content: space-between; gap: 8px; background: none; border: 0; color: var(--fb-text);
	padding: 6px 8px; border-radius: 6px; text-align: left; font-size: 14px; cursor: pointer; }
.fb-map-list button:hover { background: var(--fb-surface-2); }
.fb-map-list b { color: var(--fb-gold); font-weight: 600; white-space: nowrap; }
.fb-map-credits { background: none; border: 0; color: var(--fb-muted); padding: 10px 0 0; font-size: 13px; cursor: pointer; }
.fb-map-credits:hover { color: #fff; }
.fb-map-coords { position: absolute; bottom: 12px; left: 344px; z-index: 1000; background: rgba(30, 31, 42, .95); color: #fff; border: 1px solid var(--fb-border);
	border-radius: 999px; padding: 5px 14px; font: 13px/1.4 Lato, sans-serif; font-variant-numeric: tabular-nums; pointer-events: none; }
.fb-map-panel.is-closed ~ .fb-map-coords { left: 12px; }
.fb-map-modal { background: var(--fb-surface); color: var(--fb-text); border: 1px solid var(--fb-border); border-radius: 14px; }
.fb-map-modal .modal-header { border-color: var(--fb-border); }
.fb-map-modal .close { color: #fff; text-shadow: none; }
@media (max-width: 767px) {
	.fb-map-panel { right: 12px; width: auto; bottom: 64px; }
	.fb-map-panel.is-closed { right: auto; }
	.fb-map-coords { display: none; }
}

/* States page: green = exists, red = merged/closed, grey = no data */
.fb-states-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fb-states-find { display: flex; gap: 8px; }
.fb-states-find input { width: 170px; background: var(--fb-bg); color: #fff; border: 1px solid var(--fb-border); border-radius: 10px; padding: 8px 12px; font: 15px Lato, sans-serif; }
.fb-states-find input:focus { outline: none; border-color: var(--fb-red); }
.fb-states-find .btn { border-radius: 10px !important; margin: 0; }
.fb-legend { color: var(--fb-muted); font-size: 13px; margin: 0 0 10px; font-family: Lato, sans-serif; }
.fb-legend .fb-sq { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 6px 0 14px; }
.fb-legend .fb-sq:first-child { margin-left: 0; }
.fb-state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
.fb-sq-cell { display: block; border: 0; border-radius: 5px; padding: 5px 0; text-align: center; font: 700 12px/1.3 Lato, sans-serif; color: #fff; cursor: pointer; }
.fb-sq-cell[hidden] { display: none; }
.fb-sq-yes { background: rgba(46, 160, 67, .72); }
.fb-sq-yes:hover { background: #2ea043; }
.fb-sq-no { background: rgba(192, 57, 43, .62); }
.fb-sq-no:hover { background: #c0392b; }
.fb-sq-none { background: var(--fb-surface-2); color: var(--fb-muted); cursor: default; }
.fb-sq-cell.is-sel { outline: 3px solid var(--fb-gold); outline-offset: 1px; }
.fb-state-detail { background: var(--fb-bg); border: 1px solid var(--fb-border); border-left: 4px solid var(--fb-gold); border-radius: 10px;
	padding: 12px 16px; margin-bottom: 14px; color: var(--fb-text); font-family: Lato, sans-serif; }
.fb-sd-head { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 4px; }
.fb-sd-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 10px; border-radius: 999px; }
.fb-sd-badge.is-yes { background: rgba(46, 160, 67, .2); color: #9be9a8; border: 1px solid rgba(46, 160, 67, .5); }
.fb-sd-badge.is-no { background: rgba(192, 57, 43, .2); color: #ffb3aa; border: 1px solid rgba(192, 57, 43, .5); }
