/* ================================================================
   09-EDITOR — העורך
   Gruvbox-warm IDE aesthetic — warm graphite, flat ink, no glow
   ================================================================ */

/* ─── Google Fonts import (JetBrains Mono + Heebo) ─── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Heebo:wght@300;400;500;700&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg:          #1d1b18;
  --panel:       #26231f;
  --panel-light: #2e2b26;
  --border:      rgba(230,221,200,0.08);
  --border-mid:  rgba(230,221,200,0.14);
  --border-warm: rgba(216,166,87,0.25);

  --text:        #e6ddc8;
  --text-muted:  #928374;
  --text-dim:    rgba(230,221,200,0.45);

  --gold:        #d8a657;
  --sage:        #a9b665;
  --terra:       #ea6962;
  --teal:        #7daea3;
  --comment:     #928374;
  --purple:      #d3869b;

  --font-mono:   'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-body:   'Heebo', 'Arial Hebrew', 'Tahoma', sans-serif;

  --radius-sm:   3px;
  --radius:      5px;
  --transition:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--gold); }

/* ─── Selection ─── */
::selection { background: rgba(216,166,87,0.25); color: var(--text); }

/* ═══════════════════════════════════════════════
   WINDOW CHROME
═══════════════════════════════════════════════ */
.editor-window {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Status bar / ticker — TOP */
.status-bar-top {
  height: 26px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 200;
}

.sb-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--terra);
  padding: 0 10px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  border-left: 1px solid var(--border);
  height: 100%;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  direction: ltr;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  animation: ticker-scroll 60s linear infinite;
  white-space: nowrap;
  direction: ltr;
  gap: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-dim);
  direction: rtl;
  white-space: nowrap;
}

.ticker-item .t-time {
  color: var(--comment);
  font-size: 10px;
}

.ticker-item .t-sep {
  color: var(--border-mid);
  font-size: 14px;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Window Title Bar ─── */
.title-bar {
  height: 38px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  flex-shrink: 0;
  user-select: none;
}

.window-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-mid);
  transition: background 0.2s;
}

.window-dot.close  { background: rgba(234,105,98,0.5); }
.window-dot.min    { background: rgba(216,166,87,0.5); }
.window-dot.max    { background: rgba(169,182,101,0.4); }
.window-dot.close:hover  { background: var(--terra); }
.window-dot.min:hover    { background: var(--gold); }
.window-dot.max:hover    { background: var(--sage); }

.title-bar-name {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
  letter-spacing: 0.02em;
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--comment);
}

/* ─── Tab Strip ─── */
.tab-strip {
  height: 36px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 0;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-strip::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 34px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border-right: 1px solid var(--border);
  border-top: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}

.tab:hover {
  color: var(--text);
  background: rgba(230,221,200,0.03);
}

.tab.active {
  background: var(--panel);
  color: var(--text);
  border-top-color: var(--gold);
  border-bottom-color: var(--panel);
  position: relative;
  bottom: -1px;
}

.tab svg { flex-shrink: 0; }

/* ─── Main Layout: sidebar + content ─── */
.editor-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ─── File Tree Sidebar ─── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

.sidebar-header {
  padding: 10px 12px 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--comment);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-section {
  padding: 4px 0;
}

.tree-folder {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.tree-folder:hover { color: var(--text); }

.tree-folder.open .folder-chevron {
  transform: rotate(90deg);
}

.folder-chevron {
  transition: transform 0.15s;
  flex-shrink: 0;
}

.tree-files {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s var(--transition);
}

.tree-folder.open + .tree-files {
  max-height: 500px;
}

.tree-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 28px;
  font-size: 11.5px;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s, color 0.1s;
}

.tree-file:hover {
  background: rgba(230,221,200,0.05);
  color: var(--text);
}

.tree-file.active {
  background: rgba(216,166,87,0.1);
  color: var(--gold);
}

/* ─── Content Area ─── */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

/* ═══════════════════════════════════════════════
   HERO — PROMPT BAR + MASTHEAD
═══════════════════════════════════════════════ */
.hero-section {
  padding: 48px 48px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: linear-gradient(180deg, rgba(38,35,31,0.6) 0%, transparent 100%);
}

.prompt-bar {
  background: var(--panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.prompt-prefix {
  color: var(--sage);
  flex-shrink: 0;
  font-size: 15px;
}

.prompt-text {
  flex: 1;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

.prompt-text .ghost {
  color: var(--text-dim);
}

.cursor-block {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--gold);
  vertical-align: text-bottom;
  animation: blink-cursor 1.1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-block { animation: none; opacity: 1; }
}

.masthead-area {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.masthead-text {
  flex: 1;
}

.prompt-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--comment);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-name {
  font-size: 42px;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.site-tagline {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-ascii {
  font-size: 11px;
  line-height: 1.4;
  color: var(--border-mid);
  letter-spacing: 0.05em;
  user-select: none;
  white-space: pre;
}

/* ═══════════════════════════════════════════════
   EDITOR SPLITS — Featured Articles
═══════════════════════════════════════════════ */
.section-splits {
  padding: 0 0 0;
  border-bottom: 1px solid var(--border);
}

.splits-header {
  padding: 14px 60px 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--comment);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.splits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.editor-pane {
  background: var(--panel);
  border-left: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
  display: block;
  overflow: hidden;
}

.editor-pane:last-child { border-left: none; }

.editor-pane:hover {
  border-color: var(--border-warm);
}

.editor-pane:hover .pane-minimap {
  opacity: 1;
}

.pane-tab {
  height: 30px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.pane-tab .active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.pane-body {
  padding: 16px 0;
  position: relative;
  display: flex;
  gap: 0;
}

.line-numbers {
  width: 38px;
  flex-shrink: 0;
  text-align: left;
  padding: 0 8px;
  border-left: 1px solid var(--border);
}

.line-numbers span {
  display: block;
  font-size: 11px;
  color: var(--comment);
  line-height: 1.75;
  user-select: none;
  text-align: center;
  opacity: 0.5;
}

.pane-content {
  flex: 1;
  padding: 0 14px;
  font-size: 12.5px;
  line-height: 1.75;
  overflow: hidden;
}

.code-h1 {
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.code-comment {
  color: var(--comment);
  font-style: italic;
}

.code-excerpt {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.7;
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.code-author {
  color: var(--teal);
  font-size: 11.5px;
  margin-top: 8px;
}

.code-category {
  color: var(--sage);
  font-size: 11px;
}

.pane-minimap {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 1px;
}

.minimap-line {
  height: 3px;
  border-radius: 1px;
  background: var(--border-mid);
}
.minimap-line.ml-gold { background: rgba(216,166,87,0.6); }
.minimap-line.ml-comment { background: rgba(146,131,116,0.3); }
.minimap-line.ml-text { background: rgba(230,221,200,0.2); }

/* ═══════════════════════════════════════════════
   QUICK OPEN — Ctrl+P style
═══════════════════════════════════════════════ */
.section-quickopen {
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.quickopen-header {
  padding: 12px 60px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--comment);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quickopen-search {
  padding: 10px 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.quickopen-search-box {
  background: var(--panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  width: 340px;
  outline: none;
  transition: border-color 0.15s;
}

.quickopen-search-box:focus {
  border-color: var(--border-warm);
}

.quickopen-hint {
  font-size: 11px;
  color: var(--comment);
}

.quickopen-list {
  list-style: none;
  padding: 0;
}

.qo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 60px;
  border-bottom: 1px solid rgba(230,221,200,0.04);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
}

.qo-item:hover { background: rgba(230,221,200,0.03); }

.qo-path {
  font-size: 11px;
  color: var(--comment);
  min-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qo-title {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
}

.qo-cat {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.qo-cat.cat-opinion  { border-color: rgba(211,134,155,0.4); color: var(--purple); }
.qo-cat.cat-guide    { border-color: rgba(169,182,101,0.4); color: var(--sage); }
.qo-cat.cat-tools    { border-color: rgba(125,174,163,0.4); color: var(--teal); }
.qo-cat.cat-bench    { border-color: rgba(216,166,87,0.4);  color: var(--gold); }
.qo-cat.cat-deep     { border-color: rgba(230,221,200,0.2); color: var(--text-muted); }

.qo-mins {
  font-size: 10.5px;
  color: var(--comment);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   GIT LOG — News Section
═══════════════════════════════════════════════ */
.section-gitlog {
  border-bottom: 1px solid var(--border);
}

.gitlog-header {
  padding: 12px 60px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--comment);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gitlog-list {
  list-style: none;
}

.git-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 60px;
  border-bottom: 1px solid rgba(230,221,200,0.04);
  transition: background 0.12s;
  cursor: pointer;
}

.git-row:hover {
  background: rgba(230,221,200,0.02);
}

.git-graph {
  width: 28px;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-self: stretch;
  position: relative;
}

.git-graph svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.git-body {
  flex: 1;
  padding: 10px 0 10px 12px;
}

.git-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.git-hash {
  font-size: 11px;
  color: var(--comment);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.git-prefix {
  font-size: 12px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.git-prefix.hotfix { color: var(--terra); }
.git-prefix.feat   { color: var(--sage); }
.git-prefix.chore  { color: var(--comment); }

.git-headline {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  flex: 1;
  line-height: 1.4;
}

.git-time {
  font-size: 10.5px;
  color: var(--comment);
  white-space: nowrap;
  flex-shrink: 0;
}

.git-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.git-committer {
  font-size: 11px;
  color: var(--teal);
}

.git-source {
  font-size: 10.5px;
  color: var(--comment);
}

.git-dek {
  display: none;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--panel);
  border-right: 3px solid var(--border-mid);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  border-radius: var(--radius-sm);
}

.git-row.expanded .git-dek {
  display: block;
}

/* Warning glyph for breaking */
.warn-glyph {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.git-diff {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 0;
}

.git-row.expanded .git-diff { display: block; }

.diff-add { color: var(--sage); }
.diff-rem { color: var(--terra); }

/* ═══════════════════════════════════════════════
   CHAT PHONE — AI Pair Programmer
═══════════════════════════════════════════════ */
.section-channel {
  border-bottom: 1px solid var(--border);
  padding: 40px 60px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.channel-intro {
  flex: 1;
  max-width: 380px;
}

.channel-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--comment);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
  font-family: var(--font-body);
}

.channel-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.skin-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skin-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.skin-btn:hover {
  border-color: var(--border-warm);
  color: var(--gold);
}

.skin-btn.active {
  border-color: var(--border-warm);
  background: rgba(216,166,87,0.1);
  color: var(--gold);
}

/* Phone device */
.phone-wrap {
  flex-shrink: 0;
}

.phone-device {
  width: 280px;
  background: #f5f0e8;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  border: 1px solid rgba(0,0,0,0.2);
  font-family: var(--font-body);
}

.phone-header {
  background: #25d366;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-header-info { flex: 1; }

.phone-channel-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.phone-status {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}

.phone-messages {
  height: 340px;
  overflow-y: auto;
  padding: 12px 10px;
  background: #ece5dd;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.phone-bubble {
  max-width: 85%;
  padding: 7px 10px 4px;
  background: #fff;
  border-radius: 8px;
  align-self: flex-start;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.bubble-tag {
  font-size: 10px;
  color: #128c7e;
  font-weight: 700;
  margin-bottom: 2px;
}

.bubble-tag.urgent { color: #c0392b; }

.bubble-text {
  font-size: 12.5px;
  color: #303030;
  line-height: 1.45;
  direction: rtl;
}

.bubble-time {
  font-size: 10px;
  color: #888;
  text-align: left;
  margin-top: 3px;
}

/* Telegram skin */
.phone-device.skin-telegram .phone-header { background: #2aabee; }
.phone-device.skin-telegram .phone-messages { background: #e8f5fe; }
.phone-device.skin-telegram .phone-bubble { border-radius: 14px; background: #fff; }
.phone-device.skin-telegram .bubble-tag { color: #2aabee; }

/* Messenger skin */
.phone-device.skin-messenger .phone-header { background: linear-gradient(135deg,#0099ff,#a033ff); }
.phone-device.skin-messenger .phone-messages { background: #f5f0fe; }
.phone-device.skin-messenger .phone-bubble { border-radius: 18px; background: #fff; }
.phone-device.skin-messenger .bubble-tag { color: #0099ff; }

/* ═══════════════════════════════════════════════
   STICKY NOTES — TODO Comments
═══════════════════════════════════════════════ */
.section-notes {
  padding: 40px 60px;
  border-bottom: 1px solid var(--border);
}

.notes-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--comment);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-canvas {
  position: relative;
  min-height: 380px;
}

.todo-note {
  position: absolute;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--border-mid);
  border-radius: 3px;
  padding: 16px;
  cursor: grab;
  user-select: none;
  box-shadow: 4px 8px 20px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.2);
  transition: box-shadow 0.15s;
  z-index: 10;
}

.todo-note:active { cursor: grabbing; box-shadow: 8px 16px 32px rgba(0,0,0,0.5); }

.note-pin {
  position: absolute;
  top: -8px;
  right: 50%;
  transform: translateX(50%);
  width: 14px;
  height: 14px;
}

.note-header {
  font-size: 10.5px;
  color: var(--terra);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-text {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.note-author {
  font-size: 10.5px;
  color: var(--teal);
}

/* ═══════════════════════════════════════════════
   FOOTER STATUS BAR
═══════════════════════════════════════════════ */
.footer-statusbar {
  background: var(--panel);
  border-top: 1px solid var(--border);
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 14px;
  font-size: 11px;
  color: var(--comment);
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.fsb-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.fsb-item.build-pass { color: var(--sage); }
.fsb-item.encoding   { color: var(--comment); }
.fsb-spacer { flex: 1; }

/* ═══════════════════════════════════════════════
   ARTICLE PAGE
═══════════════════════════════════════════════ */
.article-layout {
  display: flex;
  flex: 1;
  position: relative;
}

.article-minimap {
  width: 60px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  order: 1; /* sits on visual left (logical right in RTL) */
}

.minimap-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

.mm-line {
  height: 3px;
  border-radius: 1px;
  background: var(--border-mid);
}
.mm-line.mm-h1    { background: rgba(216,166,87,0.7); height: 5px; }
.mm-line.mm-body  { background: rgba(230,221,200,0.12); }
.mm-line.mm-comment { background: rgba(146,131,116,0.2); }
.mm-line.mm-gap   { height: 8px; background: transparent; }

.mm-viewport {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(216,166,87,0.12);
  border: 1px solid rgba(216,166,87,0.35);
  border-radius: 2px;
  pointer-events: none;
  transition: top 0.1s;
}

.article-main {
  flex: 1;
  max-width: 760px;
  padding: 32px 48px 64px;
  overflow-y: auto;
  order: 2;
}

.article-breadcrumb {
  font-size: 11px;
  color: var(--comment);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--teal);
}

.bc-sep {
  color: var(--border-mid);
}

.article-frontmatter {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 11.5px;
}

.fm-delim {
  color: var(--comment);
  margin-bottom: 6px;
}

.fm-line { line-height: 1.9; }
.fm-key  { color: var(--teal); }
.fm-val  { color: var(--sage); }
.fm-str  { color: var(--gold); }
.fm-num  { color: var(--purple); }

.article-h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
  font-family: var(--font-mono);
  line-height: 1.25;
  margin-bottom: 8px;
}

.h1-marker { color: var(--comment); font-weight: 300; margin-left: 8px; }

.article-tldr {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 12px;
}

.tldr-open  { color: var(--comment); margin-bottom: 6px; }
.tldr-text  { font-family: var(--font-body); color: var(--text-muted); line-height: 1.7; font-size: 13px; }
.tldr-close { color: var(--comment); margin-top: 6px; }

.article-para {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 18px;
  direction: rtl;
}

.article-takeaways {
  margin: 24px 0;
}

.takeaway-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--comment);
  margin-bottom: 10px;
}

.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.check-icon { flex-shrink: 0; margin-top: 2px; }

.article-sources {
  margin: 24px 0;
  font-size: 12px;
}

.sources-title {
  color: var(--comment);
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.src-import  { color: var(--teal); }
.src-from    { color: var(--comment); }
.src-name    { color: var(--sage); }
.src-url     { color: var(--text-dim); font-size: 11px; }

.related-tabs {
  margin: 32px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.related-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--comment);
  margin-bottom: 12px;
}

.related-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.related-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-mid);
  border-radius: 2px 2px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.related-tab:hover {
  border-top-color: var(--gold);
  color: var(--text);
  background: rgba(216,166,87,0.05);
}

/* ═══════════════════════════════════════════════
   NEWS PAGE
═══════════════════════════════════════════════ */
.news-layout {
  padding: 0;
}

.news-header {
  padding: 24px 60px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.news-title-area h1 {
  font-size: 20px;
  color: var(--text);
  font-family: var(--font-mono);
}

.news-title-area p {
  font-size: 12px;
  color: var(--comment);
  margin-top: 4px;
  font-family: var(--font-body);
}

.filter-chips {
  display: flex;
  gap: 8px;
}

.filter-chip {
  padding: 5px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover { border-color: var(--border-mid); color: var(--text); }
.filter-chip.active { border-color: var(--border-warm); color: var(--gold); background: rgba(216,166,87,0.07); }

.news-gitlog {
  padding: 0;
}

/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .hero-section {
    padding: 24px 20px;
  }

  .hero-ascii { display: none; }

  .splits-grid {
    grid-template-columns: 1fr;
  }

  .editor-pane:last-child { border-left: 1px solid var(--border); }

  .quickopen-header,
  .quickopen-search,
  .gitlog-header,
  .splits-header,
  .news-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .qo-item {
    padding: 7px 20px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .qo-path { min-width: 100%; font-size: 10px; }

  .git-row {
    padding: 0 20px;
  }

  .section-channel {
    padding: 24px 20px;
    flex-direction: column;
    gap: 24px;
  }

  .phone-device {
    width: 100%;
    max-width: 320px;
  }

  .section-notes {
    padding: 24px 20px;
  }

  .notes-canvas {
    min-height: 600px;
  }

  .todo-note {
    width: 180px;
  }

  .article-main {
    padding: 20px 20px;
  }

  .article-minimap { display: none; }

  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .splits-header,
  .quickopen-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-name { font-size: 26px; }

  .tab-strip {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .filter-chips { flex-wrap: wrap; }
  .phone-wrap { width: 100%; }
}

/* ═══════════════════════════════════════════════
   MOBILE FILE TREE TOOLBAR (replaces sidebar)
═══════════════════════════════════════════════ */
.mobile-filetree {
  display: none;
}

@media (max-width: 768px) {
  .mobile-filetree {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-filetree::-webkit-scrollbar { display: none; }

  .mobile-dir-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    font-size: 11px;
    font-family: var(--font-mono);
    background: rgba(230,221,200,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s;
  }

  .mobile-dir-btn:hover {
    color: var(--text);
    border-color: var(--border-mid);
  }
}
