/* zxclinux GeoSINT — black Arch/GNOME theme. */
:root {
  --bg: #000000;
  --ink: #ececec;
  --muted: #8a8a8a;
  --line: #222222;
  --panel: #070707;
  --accent: #c8c8c8;
  --ok: #2fbf71;
  --warn: #d8b24a;
  --bad: #9a9a9a;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: #d0d0d0; text-decoration: none; }
a:hover { color: #fff; }

button, input { font: inherit; color: inherit; }

.geosint-wrap {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

/* ---- header ---- */
.geosint-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 4px;
  border-bottom: 1px solid #111;
  background: #000;
}
.geosint-brand { font-size: 0.92rem; letter-spacing: 0.04em; color: #fff; }
.geosint-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.geosint-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.86rem;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.geosint-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: #666;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.geosint-nav a:hover { color: #fff; }
.geosint-nav a:hover::after { transform: scaleX(1); }

/* ---- hero ---- */
.geosint-hero { padding: 40px 4px 26px; animation: gs-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.geosint-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.geosint-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.geosint-hero h1::after {
  content: "_";
  margin-left: 6px;
  color: #555;
  animation: gs-caret 1.1s steps(1) infinite;
}
.geosint-sub { margin: 0; max-width: 70ch; color: var(--muted); font-size: 0.88rem; }

@keyframes gs-caret { 50% { opacity: 0; } }
@keyframes gs-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---- panels ---- */
.geosint-panel {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
  animation: gs-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.25s ease;
}
.geosint-panel:hover { border-color: #2e2e2e; }
.geosint-tape {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #0a0a0a;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ---- upload ---- */
.geosint-upload { padding: 16px; }
.geosint-dropzone {
  border: 1px dashed #333;
  border-radius: 16px;
  background: #050505;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.geosint-dropzone:hover { border-color: #555; background: #090909; transform: translateY(-2px); }
.geosint-dropzone.is-dragover { border-color: #888; background: #0d0d0d; border-style: solid; }
.geosint-dropzone__inner {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 42px 18px;
  text-align: center;
}
.geosint-dropzone__icon { font-size: 1.6rem; color: #666; }
.geosint-dropzone__label { font-size: 0.9rem; }
.geosint-dropzone__hint { color: var(--muted); font-size: 0.76rem; }

.geosint-paste-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.geosint-paste-hint { color: var(--muted); font-size: 0.76rem; }

.geosint-text-row, .geosint-coord-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 4px;
}
.geosint-coord-row { padding-bottom: 12px; }
.geosint-text-input {
  flex: 1 1 260px;
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: #0b0b0b;
  color: var(--ink);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.geosint-text-input::placeholder { color: #5e5e5e; }
.geosint-text-input:focus {
  border-color: #666;
  background: #0e0e0e;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.07);
}

.geosint-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 16px 0;
}
.geosint-hint {
  padding: 12px 16px 16px;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 78ch;
}

/* ---- buttons ---- */
.btn, .geosint-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #1a1a1c, #101012);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease,
    box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.btn:hover:not(:disabled)::after { animation: gs-sheen 0.7s ease forwards; }
@keyframes gs-sheen {
  0% { left: -60%; opacity: 0; }
  15% { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--hot { border-color: #444; background: #111; box-shadow: none; }
.btn--hot:hover:not(:disabled) { border-color: #777; }
.geosint-btn--sm { min-height: 34px; padding: 0 16px; font-size: 0.78rem; }

/* ---- preview ---- */
.geosint-preview { display: grid; gap: 14px; padding: 16px; }
@media (min-width: 720px) { .geosint-preview { grid-template-columns: 260px 1fr; } }
.geosint-preview__img {
  width: 100%;
  border: 1px solid #222;
  border-radius: 14px;
  display: block;
  background: #050505;
}

/* ---- progress ---- */
.geosint-steps { display: grid; gap: 2px; padding: 14px 16px; font-size: 0.82rem; }
.geosint-step {
  padding: 5px 10px;
  border-radius: 10px;
  color: #5f5f5f;
  transition: color 0.2s ease, background 0.2s ease;
}
.geosint-step.is-active { color: #fff; background: #0f0f0f; }
.geosint-step.is-done { color: #b9b9b9; }
.geosint-step.is-skip { color: #4a4a4a; }

/* ---- results ---- */
.geosint-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.geosint-section { padding: 18px 16px 6px; }
.geosint-section__title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.geosint-meta-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.geosint-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid #1b1b1b;
  border-radius: 12px;
  background: #0a0a0a;
  font-size: 0.8rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.geosint-meta-item:hover { border-color: #333; transform: translateY(-1px); }
.geosint-meta-label { color: var(--muted); }
.geosint-meta-value { color: var(--ink); text-align: right; word-break: break-word; }

/* ---- ocr ---- */
.geosint-ocr-fragments { display: grid; gap: 5px; }
.geosint-ocr-fragment {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  border: 1px solid #1b1b1b;
  border-radius: 12px;
  background: #0a0a0a;
  font-size: 0.8rem;
}
.geosint-ocr-text { word-break: break-word; }
.geosint-ocr-conf { color: var(--muted); flex: 0 0 auto; }
.geosint-ocr-conf--high { color: var(--ok); }
.geosint-ocr-conf--mid { color: var(--warn); }
.geosint-ocr-conf--low { color: var(--bad); }
.geosint-ocr-empty { color: var(--muted); font-size: 0.8rem; }

/* ---- clues ---- */
.geosint-clues { display: flex; flex-wrap: wrap; gap: 6px; }
.geosint-clue {
  padding: 5px 14px;
  border: 1px solid #262626;
  border-radius: 999px;
  background: #0d0d0d;
  font-size: 0.74rem;
  color: #cfcfcf;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.geosint-clue:hover { border-color: #555; transform: translateY(-1px); }
.geosint-clue--meta { color: #fff; border-color: #3a3a3a; }

/* ---- candidates ---- */
.geosint-candidates { display: grid; gap: 10px; }
.geosint-candidate {
  border: 1px solid #1e1e1e;
  border-radius: 16px;
  background: #080808;
  padding: 14px 16px;
  transition: border-color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
  animation: gs-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.geosint-candidate:hover { border-color: #3a3a3a; background: #0b0b0b; transform: translateY(-2px); }
.geosint-candidate--top { border-color: #4a4a4a; background: #0c0c0c; }
.geosint-candidate__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.geosint-candidate__rank { color: var(--muted); font-size: 0.8rem; flex: 0 0 auto; }
.geosint-candidate__address { flex: 1 1 220px; font-size: 0.95rem; color: #fff; }
.geosint-candidate__conf { font-size: 0.95rem; font-weight: 600; color: #fff; flex: 0 0 auto; }
.geosint-candidate__conf--low { color: #b5b5b5; }
.geosint-candidate__conf--verylow { color: #6e6e6e; }
.geosint-candidate__body { display: grid; gap: 5px; margin-top: 10px; }
.geosint-candidate__stat { color: var(--muted); font-size: 0.78rem; word-break: break-word; }
.geosint-candidate__stat b { color: #d8d8d8; }
.geosint-candidate__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.geosint-maplink, .geosint-pick {
  padding: 5px 14px;
  border: 1px solid #2c2c2c;
  border-radius: 999px;
  background: #101010;
  color: #cfcfcf;
  font-size: 0.74rem;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.geosint-maplink:hover, .geosint-pick:hover {
  border-color: #666;
  color: #fff;
  background: #161616;
  transform: translateY(-1px);
}
.geosint-maplink--pano { border-style: dashed; }
.geosint-candidate__expl { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.geosint-expl-item {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #1e1e1e;
  font-size: 0.68rem;
  color: var(--muted);
}
.geosint-expl--ok { color: #bfbfbf; border-color: #303030; }
.geosint-expl--warn { color: #9a9a9a; }
.geosint-expl--no { color: #6a6a6a; border-style: dashed; }

/* ---- ways / reverse image ---- */
.geosint-ways { display: grid; gap: 12px; }
.geosint-way-group__title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.geosint-way-links, .geosint-revimg { display: flex; flex-wrap: wrap; gap: 6px; }
.geosint-way {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: linear-gradient(180deg, #131313, #0a0a0a);
  color: #d8d8d8;
  font-size: 0.78rem;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
}
.geosint-way:hover {
  border-color: #666;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
}
.geosint-way__hint { color: #666; font-size: 0.68rem; }
.geosint-revimg-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---- nearby ---- */
.geosint-nearby { display: grid; gap: 4px; }
.geosint-nearby__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border: 1px solid #181818;
  border-radius: 12px;
  background: #090909;
  font-size: 0.8rem;
  transition: border-color 0.16s ease, background 0.16s ease, padding-left 0.16s ease;
}
a.geosint-nearby__row:hover { border-color: #3a3a3a; background: #0d0d0d; padding-left: 20px; }
.geosint-nearby__name { flex: 1 1 220px; color: #e2e2e2; }
.geosint-nearby__addr { color: #a8a8a8; }
.geosint-nearby__meta { color: var(--muted); font-size: 0.72rem; }

/* ---- sources ---- */
.geosint-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.geosint-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid #262626;
  border-radius: 999px;
  background: #0d0d0d;
  font-size: 0.74rem;
}
.geosint-source__name { color: #d0d0d0; }
.geosint-source__weight { color: var(--muted); }

/* ---- map ---- */
.geosint-map {
  height: 340px;
  border: 1px solid #222;
  border-radius: 16px;
  overflow: hidden;
  background: #050505;
}
.leaflet-container { background: #050505; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: #101010;
  color: #e8e8e8;
  border-radius: 12px;
}
.leaflet-control-attribution { background: rgba(0,0,0,0.7) !important; color: #777 !important; }
.leaflet-control-attribution a { color: #999 !important; }

/* ---- misc ---- */
.geosint-empty { padding: 16px; color: var(--muted); font-size: 0.85rem; }
.geosint-error {
  margin-bottom: 12px;
  padding: 10px 16px;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  background: #101010;
  color: #e2e2e2;
  font-size: 0.8rem;
  animation: gs-up 0.3s ease both;
}
.geosint-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #111;
  color: var(--muted);
  font-size: 0.78rem;
}
.geosint-noscript { padding: 24px; color: var(--muted); }

body.is-busy .geosint-tape { animation: gs-pulse 1.4s ease-in-out infinite; }
@keyframes gs-pulse { 50% { opacity: 0.45; } }

@media (max-width: 720px) {
  .geosint-wrap { width: calc(100% - 16px); }
  .geosint-section { padding: 16px 12px 4px; }
  .geosint-meta-grid { grid-template-columns: 1fr; }
  .geosint-actions .btn { flex: 1 1 auto; }
  .geosint-map { height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .geosint-panel, .geosint-hero, .geosint-candidate, .geosint-error,
  .geosint-hero h1::after, .btn::after, .geosint-tape {
    animation: none !important;
  }
  * { transition: none !important; }
}
