/* ============================================
   WIN95.CSS — Windows 95 Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* --- CSS VARIABLES --- */
:root {
  --win-bg: #008080;
  --win-silver: #C0C0C0;
  --win-dark: #808080;
  --win-light: #DFDFDF;
  --win-white: #FFFFFF;
  --win-black: #000000;
  --win-title-active: linear-gradient(90deg, #000080, #1084D0);
  --win-title-inactive: linear-gradient(90deg, #808080, #B0B0B0);
  --win-title-text: #FFFFFF;
  --win-btn-face: #C0C0C0;
  --win-highlight: #000080;
  --win-link: #0000FF;
  --win-danger: #FF0000;
  --win-green: #008000;
  --win-yellow: #808000;
  --font-system: 'Pixelated MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', 'Segoe UI', sans-serif;
  --font-mono: 'VT323', 'Fixedsys', 'Courier New', monospace;
  --border-raised: 2px outset var(--win-silver);
  --border-sunken: 2px inset var(--win-silver);
  --border-groove: 2px groove var(--win-silver);
}

/* --- WARNING DIALOG --- */
.warn-overlay {
  position: fixed;
  inset: 0;
  background: #008080;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.warn-overlay.hidden {
  display: none;
}

.warn-dialog {
  background: var(--win-silver);
  border: var(--border-raised);
  box-shadow: 2px 2px 0 var(--win-black);
  width: 480px;
  max-width: 90vw;
}

.warn-titlebar {
  background: var(--win-title-active);
  color: var(--win-white);
  padding: 3px 6px;
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}

.warn-body {
  display: flex;
  gap: 16px;
  padding: 20px 16px 12px;
  align-items: flex-start;
}

.warn-icon {
  flex-shrink: 0;
}

.warn-text {
  font-family: var(--font-system);
  font-size: 12px;
  line-height: 1.6;
  color: var(--win-black);
}

.warn-text p {
  margin: 0 0 8px 0;
}

.warn-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 16px;
}

.warn-checkbox {
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--win-black);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin-right: 8px;
}

.warn-btn {
  font-family: var(--font-system);
  font-size: 12px;
  padding: 4px 24px;
  background: var(--win-btn-face);
  border: var(--border-raised);
  cursor: pointer;
  min-width: 80px;
}

.warn-btn:active {
  border: var(--border-sunken);
}

.warn-btn:focus {
  outline: 1px dotted var(--win-black);
  outline-offset: -4px;
}

/* --- WARNING LOADING BAR --- */
.warn-loading {
  padding: 4px 16px 12px;
}

.warn-loading-label {
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--win-black);
  margin-bottom: 4px;
}

.warn-progress-track {
  height: 18px;
  background: var(--win-white);
  border: var(--border-sunken);
  padding: 2px;
}

.warn-progress-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg,
      var(--win-highlight) 0px,
      var(--win-highlight) 8px,
      transparent 8px,
      transparent 10px);
  transition: width 80ms steps(1);
}

/* --- BOOT SEQUENCE --- */
.boot-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 100000;
  padding: 20px;
  overflow-y: auto;
  font-family: 'VT323', 'Fixedsys', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  color: #AAAAAA;
}

.boot-terminal {
  white-space: pre-wrap;
  word-break: break-all;
}

.boot-terminal .boot-ok {
  color: #00FF00;
}

.boot-terminal .boot-warn {
  color: #FFFF00;
}

.boot-terminal .boot-info {
  color: #00AAFF;
}

.boot-terminal .boot-header {
  color: #FFFFFF;
  font-weight: bold;
}

.boot-terminal .boot-success {
  color: #00FF00;
  font-weight: bold;
}

.boot-cursor {
  display: inline;
  color: #AAAAAA;
  animation: blink-cursor 0.5s step-end infinite;
}

@keyframes blink-cursor {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* --- GIT NETWORK GRAPH --- */
.git-branch {
  font-family: 'Courier New', 'Fixedsys', monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 8px 8px 24px;
  border-left: 3px solid var(--branch-color, #808080);
  margin-left: 12px;
}

.git-commit {
  margin-bottom: 14px;
  position: relative;
}

.git-commit-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.git-dot {
  font-size: 16px;
  line-height: 1;
  margin-left: -30px;
}

.git-commit-name {
  font-weight: bold;
  font-size: 13px;
  color: var(--win-highlight);
}

.git-commit-title {
  font-size: 11px;
  color: #808080;
  font-style: italic;
  margin-left: 2px;
  margin-top: 1px;
}

.git-tree {
  margin: 4px 0 0 4px;
  font-size: 11px;
}

.git-tree-item {
  color: var(--win-black);
  padding: 1px 0;
  line-height: 1.5;
}

.git-line {
  color: #808080;
  font-family: 'Courier New', monospace;
}

.git-cross {
  font-style: italic;
  font-weight: bold;
}

.git-merges {
  padding: 4px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
}

.git-merge-line {
  padding: 4px 4px;
  border-bottom: 1px dotted #c0c0c0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.git-merge-line:last-child {
  border-bottom: none;
}

.git-merge-from {
  font-weight: bold;
}

.git-merge-arrow {
  color: #808080;
}

.git-merge-to {
  font-weight: bold;
}

.git-merge-label {
  color: #808080;
  font-style: italic;
  width: 100%;
  padding-left: 24px;
  font-size: 10px;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 13px;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

body {
  font-family: var(--font-system);
  background: var(--win-bg);
  color: var(--win-black);
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
  cursor: default;
}

/* --- DESKTOP --- */
.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 36px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  z-index: 1;
}

/* --- DESKTOP ICONS --- */
.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 76px;
  padding: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}

.desktop-icon:hover {
  border: 1px dotted var(--win-white);
}

.desktop-icon.selected {
  border: 1px dotted var(--win-white);
}

.desktop-icon.selected .icon-label {
  background: var(--win-highlight);
  color: var(--win-white);
}

.desktop-icon .icon-img {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  image-rendering: pixelated;
}

.desktop-icon .icon-label {
  font-size: 11px;
  color: var(--win-white);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
  padding: 1px 3px;
  word-break: break-word;
  line-height: 1.3;
}

/* --- SVG ICON SYSTEM --- */
.icon-svg {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}

.icon-svg-lg {
  width: 20px;
  height: 20px;
}

/* --- WINDOW --- */
.window {
  position: fixed;
  background: var(--win-silver);
  border: var(--border-raised);
  box-shadow: 1px 1px 0 var(--win-black);
  display: flex;
  flex-direction: column;
  z-index: 10;
  min-width: 320px;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100vh - 36px) !important;
}

.window.minimized {
  display: none;
}

.window-main {
  top: 40px;
  left: 60px;
  width: calc(100vw - 120px);
  height: calc(100vh - 120px);
}

/* --- TITLE BAR --- */
.title-bar {
  background: var(--win-title-active);
  padding: 3px 3px 3px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: default;
  flex-shrink: 0;
}

.title-bar .title-icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.title-bar .title-text {
  flex: 1;
  color: var(--win-title-text);
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

/* --- WINDOW CONTROLS --- */
.window-controls {
  display: flex;
  gap: 2px;
}

.window-controls button {
  width: 16px;
  height: 14px;
  background: var(--win-btn-face);
  border: var(--border-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 8px;
  font-family: 'Marlett', sans-serif;
  line-height: 1;
  padding: 0;
  color: var(--win-black);
}

.window-controls button:active {
  border: var(--border-sunken);
  padding: 1px 0 0 1px;
}

/* --- MENU BAR --- */
.menu-bar {
  display: flex;
  background: var(--win-silver);
  border-bottom: 1px solid var(--win-dark);
  padding: 1px 0;
  flex-shrink: 0;
}

.menu-bar .menu-item {
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  position: relative;
}

.menu-bar .menu-item:hover {
  background: var(--win-highlight);
  color: var(--win-white);
}

.menu-bar .menu-item .underline {
  text-decoration: underline;
}

/* --- TAB BAR --- */
.tab-bar {
  display: flex;
  background: var(--win-silver);
  padding: 4px 4px 0 4px;
  gap: 0;
  flex-shrink: 0;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--win-silver);
}

.tab-btn {
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--win-silver);
  border: 1px solid var(--win-dark);
  border-bottom: none;
  cursor: pointer;
  position: relative;
  top: 2px;
  color: var(--win-dark);
  letter-spacing: 0.5px;
  margin-right: -1px;
  transition: none;
}

.tab-btn:hover {
  color: var(--win-black);
}

.tab-btn.active {
  background: var(--win-silver);
  border-color: var(--win-dark) var(--win-dark) var(--win-silver);
  border-top: 2px solid var(--win-highlight);
  color: var(--win-black);
  font-weight: bold;
  z-index: 2;
  top: 2px;
  padding-bottom: 5px;
}

/* --- WINDOW BODY / CONTENT --- */
.window-body {
  flex: 1;
  overflow: auto;
  border: var(--border-sunken);
  margin: 2px 4px 4px 4px;
  background: var(--win-white);
  padding: 0;
}

/* --- STATUS BAR --- */
.status-bar {
  display: flex;
  background: var(--win-silver);
  border-top: 1px solid var(--win-dark);
  padding: 2px 4px;
  gap: 2px;
  flex-shrink: 0;
}

.status-bar .status-field {
  border: var(--border-sunken);
  padding: 1px 6px;
  font-size: 11px;
  color: var(--win-black);
  white-space: nowrap;
  background: var(--win-silver);
}

.status-bar .status-field:first-child {
  flex: 1;
}

/* --- SECTION PANELS --- */
.section-panel {
  display: none;
  padding: 12px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.section-panel.active {
  display: block;
}

/* --- SECTION HEADER --- */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--win-silver);
  border: var(--border-raised);
  justify-content: center;
}

.hex-badge {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--win-highlight);
  background: var(--win-white);
  border: var(--border-sunken);
  padding: 6px 12px;
  white-space: nowrap;
  letter-spacing: 1px;
  line-height: 1;
}

.section-meta {
  flex: 1;
}

.section-meta h2 {
  font-size: 14px;
  font-weight: bold;
  color: var(--win-black);
  margin-bottom: 4px;
}

.section-meta .file-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--win-dark);
  margin-bottom: 4px;
}

.category-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid;
}

.category-tag.cat-root {
  background: #FFFFCC;
  border-color: #808000;
  color: #808000;
}

.category-tag.cat-cia {
  background: #CCDDFF;
  border-color: #000080;
  color: #000080;
}

.category-tag.cat-covid {
  background: #FFCCCC;
  border-color: #800000;
  color: #800000;
}

/* --- FIELDSETS (GROUP BOX) --- */
.win-fieldset {
  border: var(--border-groove);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.win-fieldset legend {
  font-size: 12px;
  font-weight: bold;
  padding: 0 4px;
  color: var(--win-black);
}

/* --- METADATA TABLE --- */
.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.meta-table th,
.meta-table td {
  padding: 3px 8px;
  text-align: left;
  border: 1px solid var(--win-dark);
  vertical-align: top;
}

.meta-table th {
  background: var(--win-silver);
  font-weight: bold;
  white-space: nowrap;
  width: 160px;
  color: var(--win-black);
}

.meta-table td {
  background: var(--win-white);
  color: var(--win-black);
  word-break: break-word;
}

.meta-table tr:nth-child(even) td {
  background: #F0F0F0;
}

/* --- KEY FIGURES --- */
.key-figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  padding: 4px 0;
}

.key-figure-card {
  background: var(--win-white);
  border: var(--border-sunken);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
}

.key-figure-name {
  font-weight: bold;
  color: var(--win-highlight);
  font-size: 12px;
  margin-bottom: 2px;
}

.key-figure-credentials {
  font-style: italic;
  color: var(--win-dark);
  font-size: 11px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px dotted var(--win-dark);
}

.key-figure-role {
  color: var(--win-black);
  font-size: 11px;
  line-height: 1.45;
}

/* --- TREE VIEW --- */
.tree-view {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 8px;
  background: var(--win-white);
  border: var(--border-sunken);
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.tree-node {
  padding-left: 20px;
  position: relative;
}

.tree-node::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dotted var(--win-dark);
}

.tree-node:last-child::before {
  height: 12px;
}

.tree-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
}

.tree-label:hover {
  background: var(--win-highlight);
  color: var(--win-white);
}

.tree-toggle {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--win-dark);
  background: var(--win-white);
  text-align: center;
  line-height: 8px;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-system);
  flex-shrink: 0;
}

.tree-key {
  color: var(--win-highlight);
  font-weight: bold;
}

.tree-value {
  color: var(--win-black);
}

.tree-value.val-string {
  color: #800000;
}

.tree-value.val-number {
  color: #008000;
}

.tree-value.val-bool {
  color: #800080;
}

.tree-children {
  display: block;
}

.tree-children.collapsed {
  display: none;
}

/* --- ANALYSIS PANEL --- */
.analysis-panel {
  font-size: 12px;
  line-height: 1.65;
  color: var(--win-black);
}

.analysis-panel h3 {
  font-size: 13px;
  margin: 12px 0 6px 0;
  color: var(--win-highlight);
  border-bottom: 1px solid var(--win-dark);
  padding-bottom: 2px;
  text-align: center;
}

.analysis-panel h3:first-child {
  margin-top: 0;
}

.analysis-panel p {
  margin-bottom: 8px;
}

.analysis-panel ul {
  margin: 4px 0 8px 20px;
}

.analysis-panel li {
  margin-bottom: 3px;
}

.analysis-panel .highlight {
  background: #FFFFCC;
  padding: 0 2px;
  font-weight: bold;
}

.analysis-panel .citation {
  font-size: 10px;
  color: var(--win-dark);
  vertical-align: super;
}

/* --- RAW SOURCE VIEWER --- */
.raw-source {
  width: 100%;
  min-height: 200px;
  max-height: 350px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: #000020;
  color: #00FF00;
  border: var(--border-sunken);
  padding: 8px;
  resize: vertical;
  white-space: pre;
  overflow: auto;
  line-height: 1.5;
  tab-size: 2;
}

/* --- TASKBAR --- */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--win-silver);
  border-top: 2px outset var(--win-silver);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 1000;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  height: 28px;
  background: var(--win-silver);
  border: var(--border-raised);
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  font-family: var(--font-system);
  color: var(--win-black);
}

.start-btn:active {
  border: var(--border-sunken);
  padding: 3px 7px 1px 9px;
}

.start-btn .start-logo {
  width: 18px;
  height: 18px;
}

.taskbar-divider {
  width: 2px;
  height: 24px;
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-white);
  margin: 0 2px;
}

.taskbar-items {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow: hidden;
}

.taskbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  height: 24px;
  background: var(--win-silver);
  border: var(--border-raised);
  cursor: pointer;
  font-size: 11px;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.taskbar-item.active {
  border: var(--border-sunken);
  font-weight: bold;
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  border: var(--border-sunken);
  padding: 2px 8px;
  height: 24px;
}

.system-tray .clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--win-black);
}

/* --- START MENU --- */
.start-menu {
  position: fixed;
  bottom: 36px;
  left: 0;
  width: 220px;
  background: var(--win-silver);
  border: var(--border-raised);
  box-shadow: 2px 0 0 var(--win-black), 0 -2px 0 var(--win-black);
  z-index: 2000;
  display: none;
}

.start-menu.open {
  display: block;
}

.start-menu-banner {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(180deg, #000080, #1084D0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.start-menu-banner span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--win-white);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
}

.start-menu-items {
  margin-left: 28px;
  padding: 4px 0;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.start-menu-item:hover {
  background: var(--win-highlight);
  color: var(--win-white);
}

.start-menu-item .menu-icon {
  width: 20px;
  height: 20px;
}

.start-menu-divider {
  height: 1px;
  background: var(--win-dark);
  margin: 2px 4px 2px 32px;
  border-bottom: 1px solid var(--win-white);
}

/* --- SCROLLBAR STYLING --- */
.window-body::-webkit-scrollbar,
.tree-view::-webkit-scrollbar,
.raw-source::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

.window-body::-webkit-scrollbar-track,
.tree-view::-webkit-scrollbar-track,
.raw-source::-webkit-scrollbar-track {
  background: var(--win-silver);
  border: 1px solid var(--win-dark);
}

.window-body::-webkit-scrollbar-thumb,
.tree-view::-webkit-scrollbar-thumb,
.raw-source::-webkit-scrollbar-thumb {
  background: var(--win-silver);
  border: var(--border-raised);
}

.window-body::-webkit-scrollbar-button,
.tree-view::-webkit-scrollbar-button,
.raw-source::-webkit-scrollbar-button {
  background: var(--win-silver);
  border: var(--border-raised);
  width: 16px;
  height: 16px;
}

/* --- UTILITY --- */
.mono {
  font-family: var(--font-mono);
}

.bold {
  font-weight: bold;
}

.text-center {
  text-align: center;
}

.mt-8 {
  margin-top: 8px;
}

.mb-8 {
  margin-bottom: 8px;
}

.p-8 {
  padding: 8px;
}

/* --- LOADING ANIMATION --- */
.hourglass {
  display: inline-block;
  animation: hourglass-spin 1s steps(4) infinite;
  font-size: 24px;
}

@keyframes hourglass-spin {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(90deg);
  }

  50% {
    transform: rotate(180deg);
  }

  75% {
    transform: rotate(270deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .window-main {
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 36px);
  }

  .desktop {
    display: none;
  }

  .tab-btn {
    font-size: 12px;
    padding: 3px 8px;
  }
}

/* --- BSOD EASTER EGG --- */
.bsod {
  position: fixed;
  inset: 0;
  background: #0000AA;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 99999;
  display: none;
  padding: 20px;
  line-height: 1.8;
}

.bsod .bsod-title {
  background: var(--win-silver);
  color: #0000AA;
  padding: 2px 12px;
  font-weight: bold;
  margin-bottom: 24px;
}

/* --- TIMELINE --- */
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
  padding: 6px;
  background: var(--win-silver);
  border: var(--border-sunken);
}

.timeline-filter-btn {
  padding: 3px 10px;
  font-family: var(--font-system);
  font-size: 11px;
  background: var(--win-btn-face);
  border: var(--border-raised);
  cursor: pointer;
  color: var(--win-black);
}

.timeline-filter-btn:active,
.timeline-filter-btn.active {
  border: var(--border-sunken);
  font-weight: bold;
}

.timeline-container {
  position: relative;
  padding: 8px 8px 8px 90px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--win-highlight);
}

.timeline-event {
  position: relative;
  margin-bottom: 16px;
  padding: 8px 10px;
  background: var(--win-white);
  border: 1px solid var(--win-dark);
  font-size: 12px;
  line-height: 1.5;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--win-highlight);
  background: var(--win-white);
}

.timeline-event.cat-founding::before {
  background: #008000;
  border-color: #008000;
}

.timeline-event.cat-military::before {
  background: #000080;
  border-color: #000080;
}

.timeline-event.cat-financial::before {
  background: #808000;
  border-color: #808000;
}

.timeline-event.cat-medical::before {
  background: #800000;
  border-color: #800000;
}

.timeline-event.cat-media::before {
  background: #800080;
  border-color: #800080;
}

.timeline-event.cat-science::before {
  background: #008080;
  border-color: #008080;
}

.timeline-event.cat-political::before {
  background: #FF6600;
  border-color: #FF6600;
}

.timeline-year {
  position: absolute;
  left: -82px;
  top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: bold;
  color: var(--win-highlight);
  text-align: right;
  width: 56px;
}

.timeline-event-title {
  font-weight: bold;
  color: var(--win-black);
  margin-bottom: 2px;
}

.timeline-event-desc {
  color: #333;
  font-size: 11px;
}

.timeline-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  margin-left: 4px;
  border: 1px solid;
  font-weight: bold;
  vertical-align: middle;
}

.timeline-badge.badge-root {
  background: #FFFFCC;
  border-color: #808000;
  color: #808000;
}

.timeline-badge.badge-cia {
  background: #CCDDFF;
  border-color: #000080;
  color: #000080;
}

.timeline-badge.badge-covid {
  background: #FFCCCC;
  border-color: #800000;
  color: #800000;
}

.timeline-badge.badge-cross {
  background: #E0E0E0;
  border-color: #808080;
  color: #333;
}

.timeline-event.hidden {
  display: none;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  padding: 4px 6px;
  font-size: 11px;
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.timeline-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* --- RESIZE HANDLES --- */
.resize-handle {
  position: absolute;
  z-index: 20;
}

.resize-e {
  right: 0;
  top: 0;
  width: 5px;
  height: 100%;
  cursor: e-resize;
}

.resize-s {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  cursor: s-resize;
}

.resize-se {
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  cursor: se-resize;
}

.window .title-bar {
  cursor: move;
}

.window.maximized .title-bar {
  cursor: default;
}

.window.maximized .resize-handle {
  display: none;
}


/* ============================================
   OSINT FEED MODULE STYLES
   ============================================ */

/* --- Sentiment Gauge --- */
.osint-sentiment-panel {
  padding: 4px;
}

.sentiment-gauge-container {
  margin-bottom: 6px;
}

.sentiment-gauge-bg {
  height: 18px;
  background: var(--win-white);
  border: var(--border-sunken);
  position: relative;
  overflow: hidden;
}

.sentiment-gauge-fill {
  height: 100%;
  background: #00aa00;
  transition: width 0.5s ease, background 0.5s ease;
}

.sentiment-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--win-dark);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.sentiment-stats {
  font-size: 11px;
  color: var(--win-black);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 0;
}

/* --- OSINT Controls --- */
.osint-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 4px;
}

.osint-control-group {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.osint-control-group label {
  font-weight: bold;
  white-space: nowrap;
}

.osint-control-group select {
  font-family: var(--font-system);
  font-size: 11px;
  padding: 2px 4px;
  border: var(--border-sunken);
  background: var(--win-white);
}

.osint-control-group input[type="checkbox"] {
  margin-right: 4px;
}

.win-btn {
  font-family: var(--font-system);
  font-size: 11px;
  padding: 3px 12px;
  background: var(--win-btn-face);
  border: var(--border-raised);
  cursor: pointer;
}

.win-btn:active {
  border: var(--border-sunken);
}

/* --- Feed Container --- */
.osint-feed-container {
  max-height: 600px;
  overflow-y: auto;
  padding: 4px;
}

.osint-loading {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--win-dark);
  font-family: var(--font-mono);
}

.osint-error {
  text-align: center;
  padding: 20px;
  border: 1px solid #800000;
  background: #FFEEEE;
  margin: 8px;
}

/* --- OSINT Post Cards --- */
.osint-post {
  border: var(--border-raised);
  background: var(--win-silver);
  margin-bottom: 6px;
  font-size: 11px;
}

.osint-post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--win-dark);
  flex-wrap: wrap;
}

.osint-post-body {
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.5;
  background: var(--win-white);
  color: var(--win-black);
  white-space: pre-wrap;
  word-break: break-word;
}

.osint-post-footer {
  padding: 4px 6px;
  border-top: 1px solid var(--win-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Urgency Badges --- */
.osint-urgency-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  padding: 1px 6px;
  border: 1px solid;
  white-space: nowrap;
}

.osint-urgency-badge.urgency-1 {
  background: #E0E0E0;
  border-color: #808080;
  color: #404040;
}

.osint-urgency-badge.urgency-2 {
  background: #CCFFCC;
  border-color: #008000;
  color: #006000;
}

.osint-urgency-badge.urgency-3 {
  background: #FFFFCC;
  border-color: #808000;
  color: #606000;
}

.osint-urgency-badge.urgency-4 {
  background: #FFE0CC;
  border-color: #FF8800;
  color: #884400;
}

.osint-urgency-badge.urgency-5 {
  background: #FFCCCC;
  border-color: #FF0000;
  color: #880000;
}

/* Post left border accent by urgency */
.osint-post.urgency-5 {
  border-left: 3px solid #FF0000;
}

.osint-post.urgency-4 {
  border-left: 3px solid #FF8800;
}

.osint-post.urgency-3 {
  border-left: 3px solid #CCCC00;
}

.osint-post.urgency-2 {
  border-left: 3px solid #008000;
}

.osint-post.urgency-1 {
  border-left: 3px solid #808080;
}

/* --- Attribution Badges --- */
.osint-attr-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  border: 1px solid;
  margin-right: 3px;
  cursor: default;
}

.osint-attr-badge.badge-root {
  background: #FFFFCC;
  border-color: #808000;
  color: #808000;
}

.osint-attr-badge.badge-cia {
  background: #CCDDFF;
  border-color: #000080;
  color: #000080;
}

.osint-attr-badge.badge-covid {
  background: #FFCCCC;
  border-color: #800000;
  color: #800000;
}

.osint-no-attr {
  font-size: 10px;
  color: var(--win-dark);
  font-style: italic;
}

.osint-attr-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

/* --- Method Badge --- */
.osint-method-badge {
  font-size: 9px;
  padding: 1px 4px;
  background: #E8E8FF;
  border: 1px solid #8888CC;
  color: #444488;
  margin-left: auto;
  white-space: nowrap;
}

/* --- Account and Date --- */
.osint-account {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--win-highlight);
  font-weight: bold;
}

.osint-date {
  font-size: 10px;
  color: var(--win-dark);
}

/* --- Disclaimer --- */
.osint-disclaimer {
  padding: 4px 8px;
  background: #FFF8E0;
  border-top: 1px solid #C0A000;
  font-size: 10px;
  color: #806000;
  line-height: 1.4;
}

/* --- Coming Soon --- */
.osint-coming-soon {
  text-align: center;
  padding: 30px 16px;
}

.coming-soon-icon {
  font-size: 48px;
  margin-bottom: 4px;
}