/* === Design tokens === */
:root {
  /* Colors */
  --color-bg:               #1a1a1a;
  --color-surface:          #2d2d2d;
  --color-text-primary:     #e0e0e0;
  --color-text-secondary:   #999;
  --color-node-stroke:      steelblue;
  --color-node-fill-branch: #3a3a3a;
  --color-node-fill-leaf:   #1a1a1a;
  --color-link:             #555;
  --color-noscript-bg:      #2a1a00;
  --color-noscript-border:  #7a4a00;
  --color-legend:           #e0e0e0;
  --color-header:           #e0e0e0;

  /* Status badge colors — saturated enough for both light and dark backgrounds */
  --badge-T: #4a9eda;
  --badge-D: #e8944a;
  --badge-R: #c8a030;
  --badge-M: #9a7eda;
  --color-accent:           #4a9eda;
  --color-border:           #444;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.5);

  /* Border radius */
  --radius-sm:  3px;
  --radius-md:  6px;

  /* Spacing (4px base scale) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
  --font-size-sm:   11px;
  --font-size-base: 14px;
  --font-size-lg:   16px;
  --font-size-xl:   40px;
}

body.light-mode {
  --color-bg:               #ffffff;
  --color-surface:          #f5f5f5;
  --color-text-primary:     #000000;
  --color-text-secondary:   #767676;
  --color-node-stroke:      steelblue;
  --color-node-fill-branch: lightsteelblue;
  --color-node-fill-leaf:   #ffffff;
  --color-link:             #ccc;
  --color-noscript-bg:      rgb(255, 228, 196);
  --color-noscript-border:  rgb(255, 204, 153);
  --color-legend:           #000000;
  --color-header:           #000000;
  --color-border:           #ddd;
  --shadow-sm:              0 1px 3px rgba(0,0,0,0.12);
  --shadow-md:              0 4px 12px rgba(0,0,0,0.15);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  margin: 0;
  overflow: hidden;
}

noscript p {
  text-align: center;
  background-color: var(--color-noscript-bg);
  color: var(--color-text-primary);
  margin: 0 auto;
  width: 80vw;
  padding: 25px 0;
  margin-top: 80px;
  border-radius: 10px;
  border: 1px solid var(--color-noscript-border);
  margin-bottom: 20px;
  display: flex-wrap;
}

#body {
  margin: 0 auto;
  position: relative;
}

svg {
  display: block;
  width: 100%;
  /* Fill remaining viewport height below header + search bar */
  height: calc(100vh - 120px);
  cursor: grab;
}

svg:active {
  cursor: grabbing;
}

#header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: var(--font-size-xl);
  font-weight: bold;
  text-align: center;
  color: var(--color-header);
  padding: var(--space-2) var(--space-4);
}

#header-actions {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

#header-actions button {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  white-space: nowrap;
}

#header-actions button:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.legend {
  display: none;
}

#notes-content {
  display: none;
}

.legend a {
  color: var(--color-node-stroke);
}

.node {
  cursor: pointer;
}

.node circle {
  cursor: pointer;
  fill: var(--color-node-fill-leaf);
  stroke: var(--color-node-stroke);
  stroke-width: 1.5px;
}

.node text {
  font-size: 12px;
  fill: var(--color-text-primary);
}

path.link {
  fill: none;
  stroke: var(--color-link);
  stroke-width: 1px;
}

h3 {
  color: var(--color-text-primary);
}

a {
  color: var(--color-node-stroke);
}

/* Status badge pills (used in legend) */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
  vertical-align: middle;
}
.badge-T { background-color: var(--badge-T); }
.badge-D { background-color: var(--badge-D); }
.badge-R { background-color: var(--badge-R); }
.badge-M { background-color: var(--badge-M); }
/* Search */
#search-container {
  text-align: center;
  padding: var(--space-2) 0 var(--space-1);
}

#search-input {
  width: 400px;
  max-width: 90vw;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-link);
  border-radius: var(--radius-sm);
  outline: none;
}

#search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(74, 158, 218, 0.25);
}

#search-results {
  margin: var(--space-2) auto 0;
  width: 600px;
  max-width: 90vw;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-link);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

#search-results.visible {
  display: block;
}

.search-result-item {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-link);
  font-size: 13px;
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.is-active {
  background: var(--color-bg);
}

.search-result-item.is-active {
  outline: 1px solid var(--color-accent);
}

.search-result-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-badges {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}

.search-result-badges .badge {
  font-size: 9px;
  padding: 0 3px;
}

.search-result-name {
  font-weight: bold;
  color: var(--color-node-stroke);
}

.search-result-ext {
  font-size: 11px;
  color: var(--color-text-secondary);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.search-result-ext:hover {
  color: var(--color-node-stroke);
  text-decoration: none;
}

.search-result-path {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-top: 2px;
}

.search-no-results {
  padding: var(--space-3);
  color: var(--color-text-secondary);
  text-align: center;
}

/* Mobile floating notes button (hidden on desktop; header button used instead) */
#mobile-notes-btn {
  display: none;
}

/* Notes overlay */
#notes-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 299;
}

#notes-overlay.visible {
  display: block;
}

/* Notes panel (desktop: side panel) */
#notes-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: var(--color-surface);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 250ms ease;
  will-change: transform;
  box-shadow: var(--shadow-md);
}

#notes-panel.open {
  transform: translateX(0);
}

#notes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

#notes-panel-title {
  font-size: var(--font-size-lg);
  font-weight: bold;
  color: var(--color-text-primary);
}

#notes-panel-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px var(--space-1);
  border-radius: var(--radius-sm);
}

#notes-panel-close:hover {
  color: var(--color-text-primary);
  background: var(--color-bg);
}

.notes-tabs {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--space-3);
  background: var(--color-surface);
}

.notes-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 12px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notes-tab:hover {
  color: var(--color-text-primary);
}

.notes-tab.is-active {
  color: #c2410c;
  border-bottom-color: #ea580c;
}

.notes-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.notes-tab-badge[hidden] {
  display: none !important;
}

#notes-panel-body {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  line-height: 1.6;
}

.notes-tab-panel[hidden] {
  display: none !important;
}

#notes-panel-body a {
  color: var(--color-node-stroke);
}

#notes-panel-body h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

#notes-panel-body h3:first-child {
  margin-top: 0;
}

#notes-favorites {
  margin: 0;
  padding: 0;
  border: none;
}

.notes-fav-count {
  font-weight: 500;
  color: var(--color-text-secondary);
  font-size: 0.9em;
}

.notes-fav-empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.notes-fav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notes-fav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
}

.notes-fav-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.notes-fav-link,
.notes-fav-name {
  font-size: 13px;
  font-weight: 500;
  color: #c2410c;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-family);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.notes-fav-link:hover,
.notes-fav-name:hover {
  text-decoration: underline;
}

.notes-fav-goto {
  flex-shrink: 0;
  font-size: 11px;
  font-family: var(--font-family);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.notes-fav-goto:hover {
  color: #64748b;
}

.notes-fav-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-family);
}

.notes-fav-remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* === Mobile responsive === */
@media (max-width: 768px) {
  #header {
    font-size: var(--font-size-lg);
    top: 0;
    position: relative;
    padding: var(--space-2) var(--space-3);
  }

  #header-actions {
    right: var(--space-3);
  }

  /* Hide desktop notes button on mobile (floating button used instead) */
  #header-notes-btn {
    display: none;
  }

  #search-container {
    padding: var(--space-1) 0;
  }

  #search-input {
    padding: var(--space-1) var(--space-2);
    font-size: 13px;
  }

  /* Maximize SVG tree viewport */
  svg {
    height: calc(100vh - 80px);
  }

  /* Floating notes button (mobile only) */
  #mobile-notes-btn {
    display: block;
    position: fixed;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: var(--space-2) var(--space-5);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 100;
  }

  #mobile-notes-btn:hover {
    background: var(--color-bg);
  }

  /* Full-width notes panel on mobile */
  #notes-panel {
    width: 100vw;
    box-shadow: none;
  }
}
/* === Tool Details Panel === */

/* Overlay backdrop (mobile) */
#panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
}

#panel-overlay.visible {
  display: block;
  pointer-events: none;
}

/* Panel container */
#tool-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100vh;
  height: 100dvh;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 250ms ease;
  will-change: transform;
}

#tool-panel.open {
  transform: translateX(0);
}

/* Header bar */
#panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

#panel-header-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  flex: 1;
}

#panel-title {
  font-size: var(--font-size-lg);
  font-weight: bold;
  color: var(--color-text-primary);
  line-height: 1.3;
  word-break: break-word;
}

#panel-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px var(--space-1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

#panel-close:hover {
  color: var(--color-text-primary);
  background: var(--color-bg);
}

/* Panel body sections */
#panel-body {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}

/* Breadcrumb (lives in panel-header now) */
#panel-breadcrumb {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

#panel-breadcrumb .crumb-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #1d4ed8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#panel-breadcrumb .crumb-link:hover {
  color: #1e3a8a;
}

#panel-breadcrumb .crumb-sep {
  color: var(--color-text-secondary);
}

#panel-breadcrumb.empty {
  display: none;
}

/* Badges */
#panel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

#panel-badges.empty {
  display: none;
}

/* Description */
#panel-description-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#panel-description-section.empty {
  display: none;
}

.panel-section-label {
  font-size: var(--font-size-sm);
  font-weight: bold;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#panel-description {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Usage context */
#panel-usage-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#panel-usage-section.empty {
  display: none;
}

#panel-usage {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Input â†’ Output */
#panel-io-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#panel-io-section.empty {
  display: none;
}

#panel-io {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* OPSEC notes */
#panel-opsec-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#panel-opsec-section.empty {
  display: none;
}

#panel-opsec {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Community rating */
#panel-rating-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#panel-rating-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

#star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star-zero-btn {
  background: none;
  border: 1px solid var(--color-text-secondary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-secondary);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  transition: color 100ms ease, border-color 100ms ease, transform 100ms ease;
}

.star-zero-btn:hover {
  transform: scale(1.15);
  color: #e8960f;
  border-color: #e8960f;
}

.star-zero-btn.active {
  color: #e8960f;
  border-color: #e8960f;
  background: rgba(232, 150, 15, 0.1);
}

.star-pos {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.star-icon {
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-secondary);
  pointer-events: none;
  transition: color 100ms ease, transform 100ms ease;
}

.star-pos:hover .star-icon {
  transform: scale(1.15);
}

.star-icon.filled {
  color: #f5a623;
}

.star-icon.half-filled {
  background: linear-gradient(to right, #f5a623 50%, var(--color-text-secondary) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.star-icon.user-rated {
  color: #e8960f;
}

.star-icon.user-rated.half-filled {
  background: linear-gradient(to right, #e8960f 50%, var(--color-text-secondary) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.star-click {
  position: absolute;
  top: 0;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  padding: 0;
  margin: 0;
}

.star-click.star-left {
  left: 0;
  width: 50%;
}

.star-click.star-right {
  left: 50%;
  width: 50%;
}

#rating-avg {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* Footer (sticky, always visible) */
#panel-footer {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* Report buttons */
#panel-report-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#panel-report-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.report-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 150ms ease, color 150ms ease;
}

.report-btn:hover {
  background: var(--color-bg);
  color: var(--color-text-primary);
}

/* Dividers */
.panel-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* CTA button */
#panel-cta-section {
  flex-shrink: 0;
  text-align: center;
}

#panel-cta-section.empty {
  display: none;
}

#panel-open-tool {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

#panel-open-tool:hover {
  opacity: 0.88;
}


/* Enrichment badge pills (status, pricing, opsec) */
.badge-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--font-size-sm);
  font-weight: bold;
  color: #fff;
  text-transform: capitalize;
  white-space: nowrap;
}

/* Status badges */
.badge-live      { background: #2d9e2d; }
.badge-down      { background: #c84040; }
.badge-degraded  { background: #b87800; }

/* Pricing badges */
.badge-free      { background: #2d9e2d; }
.badge-freemium  { background: #b87800; }
.badge-paid      { background: #c84040; }

/* OPSEC badges */
.badge-passive   { background: #2d9e2d; }
.badge-active    { background: #c84040; }

/* Unknown / fallback */
.badge-unknown          { background: #606060; }

/* Boolean feature badges */
.badge-api              { background: #1e90cc; }
.badge-invitation-only  { background: #b87800; }
.badge-deprecated       { background: #8b3030; }
.badge-nsfw             { background: #9b2b9b; }
.badge-region           { background: #2e7d32; }

/* OPSEC row layout */
.opsec-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.opsec-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Usage context sub-fields */
.usage-best-for {
  margin-bottom: var(--space-2);
}

.usage-io {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Description placeholder */
.panel-placeholder {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* Node selection ring */
.node circle.selected-ring {
  stroke: var(--color-accent);
  stroke-width: 3px;
}

/* Mobile: full-screen overlay */
@media (max-width: 768px) {
  #tool-panel {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    top: 0;
    right: 0;
    border-left: none;
    border-radius: 0;
  }

  #panel-overlay.visible {
    pointer-events: auto;
  }
}

/* OSINT page overrides â€” white theme under bilgiveteknoloji header */

body.osint-page {
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-node-stroke: #1e40af;
  --color-node-fill-branch: #bfdbfe;
  --color-node-fill-leaf: #ffffff;
  --color-link: #cbd5e1;
  --color-legend: #0f172a;
  --color-header: #0f172a;
  --color-accent: #1d4ed8;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: var(--color-text-primary);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: 72px;
  box-sizing: border-box;
}

body.osint-page.light-mode {
  /* already white tokens on body.osint-page */
}

.osint-main {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

body.osint-page .landing-footer {
  display: none;
}

.osint-noscript {
  text-align: center;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  margin: 24px auto;
  width: min(80vw, 720px);
  padding: 20px;
  border-radius: 10px;
}

body.osint-page #body {
  margin: 0 auto;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

body.osint-page .node text {
  font-size: 12px;
  fill: #0f172a;
  paint-order: stroke;
  stroke: #f5f5f5;
  stroke-width: 3px;
  stroke-linejoin: round;
}

body.osint-page #header {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  padding-top: 8px;
  flex-shrink: 0;
}

.osint-stats {
  text-align: center;
  margin: 0;
  padding: 0 12px 4px;
  font-size: 0.8rem;
  color: #64748b;
  flex-shrink: 0;
}

body.osint-page #search-container,
body.osint-page .osint-legend-inline,
body.osint-page .osint-loading,
body.osint-page .osint-error {
  flex-shrink: 0;
}

body.osint-page svg {
  flex: 1 1 auto;
  width: 100%;
  height: auto !important;
  min-height: 280px;
  background-color: #f5f5f5;
}

body.osint-page #tool-panel,
body.osint-page #notes-panel {
  top: 72px;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
}

body.osint-page #panel-overlay.visible,
body.osint-page #notes-overlay.visible {
  top: 72px;
}

body.osint-page .landing-footer {
  display: none;
}

#panel-cta-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.panel-copy-btn {
  background: #fff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #1e40af;
}

.panel-copy-btn:hover {
  background: #f8fafc;
}

body.osint-page a.report-btn.report-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

body.osint-page #header-theme-toggle {
  display: none !important;
}

@media (max-width: 768px) {
  body.osint-page {
    padding-top: 56px;
  }
  body.osint-page svg {
    min-height: 240px;
    touch-action: none;
  }
  body.osint-page #tool-panel,
  body.osint-page #notes-panel {
    top: 56px;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
  }
  body.osint-page #header {
    font-size: 1.05rem;
    padding: 4px 8px;
  }
  body.osint-page .osint-stats {
    margin: 0;
    padding: 0 8px;
    font-size: 11px;
    line-height: 1.2;
  }
  body.osint-page #search-container {
    padding: 2px 0 0;
  }
  body.osint-page .osint-jump-row {
    padding: 2px 8px 0;
  }
  body.osint-page .osint-legend-inline {
    font-size: 11px;
    gap: 6px 10px;
    padding: 2px 8px 4px;
  }
  body.osint-page .osint-filters {
    padding: 2px 8px 4px;
    gap: 4px 6px;
  }
  body.osint-page .osint-recent,
  body.osint-page .osint-favorites {
    padding: 0 8px 2px;
    max-height: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  /* Panel açıkken ağaç chrome'unu gizle — tam ekran panel */
  body.osint-page.panel-open .osint-stats,
  body.osint-page.panel-open .osint-jump-row,
  body.osint-page.panel-open .osint-recent,
  body.osint-page.panel-open .osint-favorites,
  body.osint-page.panel-open .osint-filters,
  body.osint-page.panel-open .osint-legend-inline {
    display: none !important;
  }
  body.osint-page.panel-open #mobile-notes-btn {
    display: none !important;
  }
  body.osint-page #category-jump {
    width: min(92vw, 360px);
    font-size: 13px;
  }
}

.osint-jump-row {
  display: flex;
  justify-content: center;
  padding: 0 12px 4px;
}

#category-jump {
  width: min(90vw, 400px);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-family);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#category-jump:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.2);
}

.osint-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.osint-recent {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 8px;
  padding: 2px 12px 6px;
  max-width: 920px;
  margin: 0 auto;
}

.osint-recent-label {
  font-size: 12px;
  color: #64748b;
}

.osint-recent-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-family: var(--font-family);
  color: #1e40af;
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.osint-recent-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.osint-recent-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-family: var(--font-family);
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}

.osint-recent-clear:hover {
  color: #64748b;
}

.osint-favorites .osint-recent-chip {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.osint-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 8px;
  padding: 2px 12px 8px;
}

.osint-filters-label {
  font-size: 12px;
  color: #64748b;
}

.osint-filter-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 8px;
  cursor: pointer;
  line-height: 1;
}

.osint-filter-btn.is-active,
.osint-filter-btn[aria-pressed="true"] {
  border-color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}

.osint-filter-clear {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-family: var(--font-family);
  cursor: pointer;
  text-decoration: underline;
}

.panel-copy-btn.is-fav {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.osint-legend-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 6px 12px 2px;
  font-size: 12px;
  color: #64748b;
}

.osint-legend-inline .badge {
  margin-right: 4px;
}

body.osint-page #header-reset-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
}

body.osint-page #header-reset-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.osint-loading,
.osint-error {
  text-align: center;
  margin: 12px auto 0;
  max-width: 36rem;
  font-size: 0.95rem;
  color: #64748b;
}

.osint-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
}

.landing-menu a.is-active {
  color: var(--primary, #1e40af);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #tool-panel,
  #notes-panel {
    transition: none !important;
  }
}

