﻿* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  color: var(--text-primary);
  overflow-x: hidden;
}

a {
  color: var(--neon-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.4);
}

.home-button {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #f1f5f9;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(139, 0, 255, 0.14));
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 240, 255, 0.32);
}

.home-button svg {
  width: 18px;
  height: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 2px solid var(--border-color);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
}

.logo-seal {
  position: relative;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-ring {
  position: absolute;
  inset: -7px;
  width: calc(100% + 14px);
  height: calc(100% + 14px);
  animation: ring-spin 20s linear infinite;
}

.logo-ring-text {
  fill: rgba(0, 240, 255, 0.88);
  font-size: 8.4px;
  letter-spacing: 0.4px;
  font-family: "Noto Naskh Arabic", serif;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.22), 0 0 26px rgba(0, 240, 255, 0.16);
}

.brand {
  font-size: 34px;
  font-weight: 700;
  color: var(--neon-blue);
  text-shadow: var(--border-glow);
  letter-spacing: 0.02em;
  justify-self: center;
}

.brand-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.9)) padding-box,
    linear-gradient(120deg, rgba(0, 240, 255, 0.8), rgba(255, 0, 110, 0.85), rgba(0, 255, 159, 0.82)) border-box;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.22),
    0 0 18px rgba(0, 240, 255, 0.24),
    0 0 30px rgba(255, 0, 110, 0.12);
  overflow: hidden;
}

.brand-frame::before {
  content: "";
  position: absolute;
  inset: -120% -40%;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.16), transparent 60%);
  transform: rotate(8deg);
  animation: brand-shine 4s linear infinite;
  pointer-events: none;
}

.brand-ar {
  font-family: "Noto Naskh Arabic", serif;
  direction: rtl;
  line-height: 1;
  transform: perspective(420px) rotateX(13deg);
  background: linear-gradient(90deg, #cbf7ff 0%, #00f0ff 30%, #f8feff 55%, #00ff9f 80%, #cbf7ff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 #063149,
    0 2px 0 #063149,
    0 3px 0 #052235,
    0 4px 0 #031a2a,
    0 8px 18px rgba(0, 240, 255, 0.38),
    0 16px 34px rgba(0, 0, 0, 0.46);
  animation: brand-flow 6s ease-in-out infinite;
}

.header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-self: end;
}

.project-jump {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.project-jump select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  padding: 5px 25px 5px 9px;
  width: 98px;
  min-width: 98px;
  max-width: 98px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(163, 238, 255, 0.9) 50%),
    linear-gradient(135deg, rgba(163, 238, 255, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 10px) calc(50% - 1px),
    calc(100% - 6px) calc(50% - 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  text-align: center;
  text-align-last: center;
}

.project-jump select:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.12);
}

.project-jump select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.project-jump select option {
  text-align: center;
  background: #061631;
  color: #dff8ff;
  font-weight: 700;
}

.pref-switchers {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pref-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.pref-switch select {
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
}

.pref-switch select:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.12);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.65);
}

.lang-btn {
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn + .lang-btn {
  border-left: 1px solid rgba(0, 240, 255, 0.2);
}

.lang-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.32), rgba(139, 0, 255, 0.28));
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.project-meta {
  color: var(--text-secondary);
  font-size: 13px;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.data-badge {
  font-size: 11px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.data-badge.is-loading {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.34);
  color: #d7deea;
}

.data-badge.is-live {
  background: rgba(0, 255, 159, 0.18);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.28);
}

.data-badge.is-fallback {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.45);
  color: #ffd972;
}

.data-badge.is-error {
  background: rgba(255, 0, 110, 0.15);
  border-color: var(--neon-pink);
  color: #ff8db8;
}

.tabs-shell {
  border-bottom: 1px solid var(--border-color-soft);
  background: rgba(6, 11, 25, 0.88);
  padding: 10px 14px 12px;
}

.tabs {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(0, 240, 255, 0.26);
  background:
    linear-gradient(135deg, rgba(8, 20, 44, 0.92), rgba(6, 14, 34, 0.9)) padding-box,
    linear-gradient(125deg, rgba(0, 240, 255, 0.28), rgba(0, 255, 159, 0.2)) border-box;
  box-shadow: 0 10px 24px rgba(0, 4, 20, 0.34), inset 0 0 0 1px rgba(153, 246, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.55) rgba(0, 0, 0, 0.24);
  cursor: ew-resize;
}

.tabs::-webkit-scrollbar {
  height: 8px;
}

.tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.24);
  border-radius: 999px;
}

.tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.7), rgba(0, 194, 255, 0.62));
  border-radius: 999px;
}

.tab {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  color: #d6e3f5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  outline-offset: 2px;
}

.tab + .tab::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.28), transparent);
}

.tab:hover {
  color: #f3fbff;
  background: rgba(23, 42, 79, 0.46);
}

.tab.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 173, 255, 0.16));
  border: 1px solid rgba(0, 240, 255, 0.38);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.12), 0 0 16px rgba(0, 240, 255, 0.22);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.24);
}

.tab.active::before {
  opacity: 0;
}

.tab.tab-back {
  color: #dfffee;
  background: linear-gradient(135deg, rgba(0, 255, 159, 0.24), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(0, 255, 159, 0.45);
  margin-right: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 12px rgba(0, 255, 159, 0.18);
}

.tab.tab-back:hover {
  color: #ffffff;
  border-color: rgba(0, 255, 159, 0.72);
  box-shadow: 0 0 18px rgba(0, 255, 159, 0.3);
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
}

#section-root {
  will-change: opacity, transform;
}

#section-root.transition-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 140ms ease, transform 140ms ease;
}

#section-root.transition-in {
  opacity: 0;
  transform: translateY(12px);
  animation: section-in 260ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  animation: card-enter 0.35s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.card:hover {
  border-color: var(--neon-blue);
  box-shadow: var(--border-glow);
  transform: translateY(-2px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h2,
.card h3 {
  color: var(--neon-blue);
  margin-bottom: 14px;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.lead-cta-shell {
  width: 100%;
  margin: 10px 2px 14px;
  border-color: rgba(0, 240, 255, 0.36);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.lead-cta-main-btn {
  width: 100%;
  border: 1px solid rgba(69, 130, 255, 0.52);
  border-radius: 0;
  clip-path: polygon(2.5% 0, 97.5% 0, 100% 50%, 97.5% 100%, 2.5% 100%, 0 50%);
  background:
    linear-gradient(150deg, rgba(9, 25, 64, 0.94) 0%, rgba(10, 37, 94, 0.96) 42%, rgba(8, 23, 66, 0.94) 100%);
  color: #f5fdff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.22s ease;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(185, 218, 255, 0.2),
    inset 0 -1px 0 rgba(9, 30, 86, 0.8),
    0 10px 24px rgba(0, 8, 32, 0.45),
    0 0 0 1px rgba(99, 149, 255, 0.16);
}

.lead-cta-main-btn:hover {
  border-color: rgba(125, 176, 255, 0.75);
  background:
    linear-gradient(150deg, rgba(12, 34, 83, 0.96) 0%, rgba(14, 44, 112, 0.98) 42%, rgba(11, 30, 82, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(199, 225, 255, 0.28),
    inset 0 -1px 0 rgba(10, 33, 90, 0.84),
    0 12px 28px rgba(0, 12, 42, 0.52),
    0 0 0 1px rgba(133, 184, 255, 0.28);
}

body.modal-open {
  overflow: hidden;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.lead-modal.show {
  display: block;
}

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 6, 20, 0.72);
  backdrop-filter: blur(5px);
}

.lead-modal-dialog {
  position: relative;
  width: min(820px, calc(100% - 24px));
  margin: 40px auto;
  max-height: calc(100vh - 80px);
  overflow: auto;
  border: 1px solid rgba(0, 240, 255, 0.38);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(6, 15, 35, 0.98), rgba(4, 11, 28, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 240, 255, 0.14);
}

.lead-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.28);
  background: rgba(7, 18, 40, 0.85);
  color: #dff5ff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lead-modal-content {
  padding: 20px;
}

.lead-exit-confirm {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(540px, calc(100% - 40px));
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 98, 158, 0.5);
  background:
    radial-gradient(120% 180% at 8% 0%, rgba(255, 126, 185, 0.22) 0%, rgba(14, 24, 58, 0.96) 62%),
    linear-gradient(145deg, rgba(9, 15, 37, 0.96), rgba(5, 11, 27, 0.96));
  box-shadow:
    0 28px 48px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(255, 110, 170, 0.24),
    inset 0 1px 0 rgba(255, 214, 234, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 8;
}

.lead-modal.show-exit-confirm .lead-exit-confirm {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.lead-modal.show-exit-confirm .lead-modal-content,
.lead-modal.show-exit-confirm .lead-modal-close {
  filter: blur(1.6px);
  opacity: 0.32;
  pointer-events: none;
}

.lead-exit-confirm-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff1f7;
  margin-bottom: 8px;
  text-shadow: 0 0 14px rgba(255, 120, 182, 0.35);
}

.lead-exit-confirm-text {
  font-size: 14px;
  line-height: 1.45;
  color: #ffd4e6;
  margin-bottom: 16px;
}

.lead-exit-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lead-exit-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}

.lead-exit-btn-secondary {
  color: #def1ff;
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(7, 28, 62, 0.82);
}

.lead-exit-btn-secondary:hover {
  border-color: rgba(0, 240, 255, 0.62);
}

.lead-exit-btn-danger {
  color: #ffeaf3;
  border-color: rgba(255, 124, 178, 0.54);
  background: linear-gradient(145deg, rgba(118, 19, 65, 0.92), rgba(89, 13, 47, 0.92));
  box-shadow: 0 0 18px rgba(255, 85, 152, 0.24);
}

.lead-exit-btn-danger:hover {
  border-color: rgba(255, 165, 204, 0.74);
  box-shadow: 0 0 22px rgba(255, 108, 170, 0.34);
}

.lead-modal-header h3 {
  color: var(--neon-blue);
  margin: 0 0 6px;
}

.lead-modal-header p {
  margin: 0 0 14px;
  color: #9cb2d7;
  font-size: 13px;
}

.lead-form {
  display: grid;
  gap: 12px;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lead-form-label {
  display: grid;
  gap: 6px;
  color: #b8cee9;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lead-form-input {
  width: 100%;
  border: 1px solid rgba(0, 240, 255, 0.26);
  border-radius: 8px;
  background: rgba(4, 15, 34, 0.88);
  color: #f5fbff;
  padding: 10px 12px;
}

.lead-form-input:focus {
  outline: none;
  border-color: rgba(0, 240, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}

.lead-form-actions {
  margin-top: 4px;
}

.lead-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #9fb6d9;
  font-size: 11px;
  line-height: 1.45;
}

.lead-consent-row input[type="checkbox"] {
  margin-top: 1px;
  accent-color: var(--neon-blue);
}

.lead-unit-pick-row {
  display: flex;
  justify-content: flex-start;
}

.lead-unit-add-btn {
  border: 1px solid rgba(0, 240, 255, 0.32);
  background: rgba(8, 26, 54, 0.86);
  color: #d8eeff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

.lead-selected-units {
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(3, 12, 30, 0.82);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 8px;
}

.lead-selected-empty {
  color: #8aa4c8;
  font-size: 12px;
}

.lead-selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.16);
  padding-bottom: 6px;
}

.lead-selected-item span {
  display: grid;
  gap: 2px;
}

.lead-selected-item strong {
  color: #eaf6ff;
  font-size: 13px;
  font-weight: 700;
}

.lead-selected-meta {
  color: #9fb6d9;
  font-size: 11px;
  line-height: 1.35;
}

.lead-selected-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.lead-selected-remove {
  border: 1px solid rgba(255, 120, 170, 0.45);
  background: rgba(73, 16, 45, 0.7);
  color: #ffc4db;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  line-height: 1;
  cursor: pointer;
}

.terminal-shell {
  display: grid;
  gap: 14px;
}

.terminal-card {
  border-color: rgba(0, 240, 255, 0.3);
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 240, 255, 0.12), rgba(2, 8, 30, 0.88) 42%, rgba(1, 6, 20, 0.96) 100%);
  box-shadow: 0 12px 34px rgba(0, 8, 30, 0.45), inset 0 0 0 1px rgba(125, 211, 252, 0.08);
}

.terminal-card::before {
  display: none;
}

.terminal-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 12px 34px rgba(0, 8, 30, 0.45), inset 0 0 0 1px rgba(125, 211, 252, 0.08);
  transform: none;
}

.terminal-card h2 {
  margin-bottom: 16px;
  letter-spacing: 0.01em;
  color: #90f8ff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 0 rgba(33, 173, 189, 0.45),
    0 10px 18px rgba(0, 10, 30, 0.52),
    0 0 16px rgba(0, 240, 255, 0.2);
  filter: saturate(1.05);
}

.terminal-subtitle {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.terminal-filters {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.terminal-filters label {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 12px;
  padding: 10px 10px 12px;
  background: linear-gradient(180deg, rgba(2, 8, 32, 0.6), rgba(2, 6, 23, 0.4));
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.terminal-filters label:focus-within {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.22), 0 0 18px rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

.terminal-filters label > span {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-filters select,
.terminal-filters input {
  border: 1px solid var(--border-color-soft);
  border-radius: 9px;
  background: rgba(1, 10, 31, 0.7);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  min-width: 0;
  min-height: 44px;
  transition: border-color 0.12s ease;
}

.terminal-number-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.terminal-number-wrap:focus-within .terminal-stepper {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.16), 0 0 18px rgba(0, 240, 255, 0.2);
}

.terminal-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  width: 34px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.28);
  background: linear-gradient(180deg, rgba(6, 22, 48, 0.92), rgba(2, 10, 24, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.terminal-step-btn {
  width: 100%;
  min-height: 22px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(5, 20, 44, 0.84), rgba(3, 12, 28, 0.92));
  color: #d8fbff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.terminal-step-btn + .terminal-step-btn {
  border-top: 1px solid rgba(0, 240, 255, 0.18);
}

.terminal-step-btn:hover {
  color: #f5feff;
  background: linear-gradient(180deg, rgba(8, 34, 70, 0.9), rgba(5, 16, 38, 0.95));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.16);
}

.terminal-step-btn:active {
  background: linear-gradient(180deg, rgba(3, 12, 28, 0.96), rgba(5, 20, 44, 0.9));
  transform: translateY(1px);
}

/* Remove legacy browser spinners on numeric inputs in terminal filters */
.terminal-filters input[type="number"] {
  -moz-appearance: textfield;
}

.terminal-filters input[type="number"]::-webkit-outer-spin-button,
.terminal-filters input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.terminal-goal-field {
  grid-column: span 4;
}

.terminal-level-field {
  grid-column: span 4;
}

.terminal-tool-field {
  grid-column: span 4;
}

.terminal-invest-field {
  grid-column: span 4;
}

.terminal-profit-field {
  grid-column: span 4;
}

.terminal-time-field {
  grid-column: span 4;
}

.terminal-filters select option:disabled {
  color: #d5e1f2;
}

.terminal-disclaimer {
  margin-top: 36px;
}

.terminal-filters select:focus,
.terminal-filters input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.24);
}

.terminal-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.terminal-actions .contact-submit-btn {
  min-height: 32px;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
  border-radius: 0;
  border-color: rgba(0, 240, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 0, 255, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24),
    0 4px 10px rgba(0, 8, 30, 0.32);
}

.terminal-actions .contact-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 7px 13px rgba(0, 10, 34, 0.36);
}

.terminal-actions .contact-submit-btn:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 7px rgba(0, 8, 30, 0.3);
}

.terminal-results {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 240, 255, 0.12), rgba(2, 8, 30, 0.88) 42%, rgba(1, 6, 20, 0.96) 100%);
  box-shadow: 0 12px 34px rgba(0, 8, 30, 0.45), inset 0 0 0 1px rgba(125, 211, 252, 0.08);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.terminal-result-card {
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 240, 255, 0.12), rgba(2, 8, 30, 0.88) 42%, rgba(1, 6, 20, 0.96) 100%);
  box-shadow: 0 12px 34px rgba(0, 8, 30, 0.45), inset 0 0 0 1px rgba(125, 211, 252, 0.08);
  padding: 18px;
  display: grid;
  gap: 14px;
  min-height: 390px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.terminal-result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 18px 38px rgba(0, 8, 30, 0.58), 0 0 28px rgba(34, 211, 238, 0.18);
}

.terminal-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.terminal-project-code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  color: var(--text-secondary);
  font-size: 12px;
}

.terminal-result-head h3 {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.25;
}

.terminal-score {
  --match-strength: 1;
  --match-hue: 140;
  --match-sat: 92%;
  --match-light: 54%;
  min-width: 104px;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: hsla(var(--match-hue), var(--match-sat), var(--match-light), calc(0.45 + (var(--match-strength) * 0.55)));
  text-shadow: 0 0 16px hsla(var(--match-hue), var(--match-sat), var(--match-light), calc(0.14 + (var(--match-strength) * 0.34)));
  background: linear-gradient(180deg, rgba(2, 30, 36, 0.8), rgba(2, 14, 24, 0.65));
  border: 1px solid hsla(var(--match-hue), var(--match-sat), calc(var(--match-light) - 8%), calc(0.22 + (var(--match-strength) * 0.38)));
  border-radius: 12px;
  padding: 8px 10px 6px;
}

.terminal-score span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bfece1;
  text-shadow: none;
}

.terminal-score .terminal-score-hint {
  margin-left: 4px;
  transform: translateY(-1px);
}

.terminal-offer-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.terminal-offer-chip {
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 11px;
  padding: 9px 10px;
  background: rgba(2, 16, 33, 0.58);
  display: grid;
  gap: 4px;
}

.terminal-offer-chip span {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.terminal-offer-chip b {
  color: var(--text-primary);
  font-size: 16px;
}

.terminal-answers {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(2, 16, 44, 0.62), rgba(2, 12, 30, 0.52));
}

.terminal-answers > div {
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.terminal-answers .k {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.terminal-answers > div span:last-child {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary);
}

.terminal-answer-line {
  display: block;
}

.terminal-answer-calc {
  margin-bottom: 0;
}

.terminal-answers > div span.terminal-answer-value.is-good,
.terminal-answers > div span.terminal-answer-value.is-bad {
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
}

.terminal-answers > div span.terminal-answer-value.is-good::before,
.terminal-answers > div span.terminal-answer-value.is-bad::before {
  content: none;
}

.terminal-answers > div span.terminal-answer-value.is-good::after,
.terminal-answers > div span.terminal-answer-value.is-bad::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
}

.terminal-answers > div span.terminal-answer-value.is-good::after {
  content: "✓";
  color: #63f6b2;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(6, 78, 59, 0.25);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.22);
}

.terminal-answers > div span.terminal-answer-value.is-bad::after {
  content: "✕";
  color: #ff9ab8;
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(136, 19, 55, 0.25);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.terminal-reasons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.terminal-reasons li {
  position: relative;
  padding-left: 14px;
}

.terminal-reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.terminal-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  color: #f4fbff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(0, 255, 159, 0.22));
  font-weight: 700;
  font-size: 14px;
}

.terminal-empty {
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  padding: 14px;
  color: var(--text-secondary);
}

.terminal-more-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.terminal-more-btn {
  min-width: 220px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.grid > div {
  border: 1px solid var(--border-color-soft);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.42);
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.part-card {
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.42);
}

.part-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.part-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(139, 0, 255, 0.14));
  color: #f4fbff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.part-action-btn:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.part-action-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.part-details {
  margin-top: 12px;
}

.part-unitmix {
  margin-top: 10px;
}

.part-unitmix-grid {
  margin-top: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.part-unitmix-item {
  border: 1px solid var(--border-color-soft);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(2, 6, 23, 0.35);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.part-unitmix-type {
  color: var(--text-secondary);
  font-size: 12px;
}

.part-unitmix-qty {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 12px;
}

.section-media-actions {
  display: flex;
  justify-content: flex-start;
}

.section-media-panel .media-grid {
  margin-top: 4px;
}

.section-media-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-media-status {
  color: var(--text-secondary);
  font-size: 12px;
}

.part-title {
  margin: 0 0 10px;
  color: var(--neon-blue);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.amenities-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.amenity-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border-color-soft);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(2, 6, 23, 0.35);
}

.amenity-check {
  color: var(--neon-green);
  font-weight: 700;
  font-size: 12px;
}

.amenity-name {
  font-size: 13px;
  color: var(--text-primary);
}

.amenity-level {
  font-size: 11px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color-soft);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.amenities-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.2);
  border-top-color: rgba(0, 240, 255, 0.95);
  animation: media-spin 0.9s linear infinite;
}

.text-muted {
  color: var(--text-secondary);
}

.text-error {
  color: #ff9cc5;
}

.media-card h3 {
  margin-bottom: 12px;
}

.media-loading-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.media-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.2);
  border-top-color: rgba(0, 240, 255, 0.9);
  animation: media-spin 0.9s linear infinite;
}

.media-delayed-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.media-thumb {
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.52);
  padding: 0;
  text-align: left;
  cursor: zoom-in;
  transition: all 0.2s ease;
  position: relative;
}

.media-thumb:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

.media-thumb img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
  transition: opacity 0.24s ease;
}

.media-thumb.is-loading img {
  opacity: 0.08;
}

.media-thumb.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  margin-left: -12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.2);
  border-top-color: rgba(0, 240, 255, 0.95);
  animation: media-spin 0.9s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.media-thumb.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(0, 240, 255, 0.03) 20%,
    rgba(0, 240, 255, 0.14) 42%,
    rgba(0, 240, 255, 0.03) 62%
  );
  background-size: 200% 100%;
  animation: media-shimmer 1.2s ease-in-out infinite;
  pointer-events: none;
}

.media-caption {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.map-embed-wrap {
  margin-top: 12px;
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.5);
  position: relative;
}

.location-meta {
  margin-bottom: 16px;
}

.location-meta p + p {
  margin-top: 8px;
}

.map-embed {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

.map-embed-wrap.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(0, 240, 255, 0.04) 24%,
    rgba(0, 240, 255, 0.14) 46%,
    rgba(0, 240, 255, 0.04) 66%
  );
  background-size: 200% 100%;
  animation: media-shimmer 1.2s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

.map-embed-wrap.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  margin-left: -13px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.2);
  border-top-color: rgba(0, 240, 255, 0.95);
  animation: media-spin 0.9s linear infinite;
  z-index: 3;
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.contact-link:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.22);
  color: #e8fdff;
}

.contact-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 0, 255, 0.16));
  border: 1px solid rgba(0, 240, 255, 0.25);
  font-size: 14px;
}

.contact-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.contact-chat-btn,
.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 0, 255, 0.2));
  color: #f4fbff;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-chat-btn:hover,
.contact-submit-btn:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
  transform: translateY(-1px);
}

.contact-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.12);
}

.contact-form-status {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
}

.contact-form-status.is-info {
  color: #9fdfff;
}

.contact-form-status.is-success {
  color: #8ff0c5;
}

.contact-form-status.is-error {
  color: #ff9cc5;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.lightbox.show {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 18, 0.86);
  backdrop-filter: blur(4px);
}

.lightbox-dialog {
  position: relative;
  width: min(92vw, 1100px);
  margin: 4vh auto 0;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  padding: 10px;
  background: rgba(5, 11, 22, 0.95);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.22);
}

.lightbox-dialog::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(0, 240, 255, 0.34);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.08), 0 0 22px rgba(0, 240, 255, 0.12);
}

.lightbox-dialog::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) left 10px top 10px / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) left 10px top 10px / 1px 18px no-repeat,
    linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) right 10px top 10px / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) right 10px top 10px / 1px 18px no-repeat,
    linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) left 10px bottom 10px / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) left 10px bottom 10px / 1px 18px no-repeat,
    linear-gradient(90deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) right 10px bottom 10px / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(0, 240, 255, 0.45), rgba(0, 240, 255, 0.45)) right 10px bottom 10px / 1px 18px no-repeat;
}

.lightbox-image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 240, 255, 0.22);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.16);
}

@media (min-width: 901px) {
  .lightbox.show .lightbox-dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 16px 20px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .lightbox.show .lightbox-image {
    max-height: calc(100vh - 88px);
    border-radius: 10px;
  }

  .lightbox.show .lightbox-dialog::before,
  .lightbox.show .lightbox-dialog::after {
    inset: 12px;
    border-radius: 12px;
  }

  .lightbox.show .lightbox-image {
    position: relative;
    background-image:
      linear-gradient(180deg, rgba(0, 240, 255, 0.05), transparent 22%, transparent 78%, rgba(0, 240, 255, 0.05)),
      repeating-linear-gradient(180deg, rgba(0, 240, 255, 0.04) 0px, rgba(0, 240, 255, 0.04) 1px, transparent 1px, transparent 3px);
    animation: lightbox-frame-pulse 4.2s ease-in-out infinite;
  }
}

.lightbox-caption {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #dff9ff;
  background: rgba(2, 6, 23, 0.8);
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #dff9ff;
  background: rgba(2, 6, 23, 0.8);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
  transition: all 0.2s ease;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-nav:hover {
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.28);
  transform: translateY(-50%) scale(1.05);
}

.k {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.65);
  color: #dffbff;
  background: radial-gradient(circle at 35% 30%, rgba(0, 240, 255, 0.28), rgba(5, 13, 31, 0.92));
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.22), inset 0 0 8px rgba(0, 240, 255, 0.15);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  line-height: 1;
  vertical-align: middle;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.source-hint:hover,
.source-hint:focus-visible {
  transform: translateY(-1px) scale(1.08);
  border-color: var(--neon-green);
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.3), inset 0 0 10px rgba(0, 255, 159, 0.18);
  outline: none;
}

.source-tooltip {
  position: fixed;
  z-index: 150;
  max-width: min(320px, calc(100vw - 16px));
  padding: 10px 12px 11px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.55);
  background: linear-gradient(160deg, rgba(3, 9, 24, 0.97), rgba(8, 16, 36, 0.98));
  color: #ecfbff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 22px rgba(0, 240, 255, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.source-tooltip.is-top {
  transform: translateY(6px) scale(0.98);
}

.source-tooltip.is-bottom {
  transform: translateY(-6px) scale(0.98);
}

.source-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(0, 240, 255, 0.55);
  border-top: 1px solid rgba(0, 240, 255, 0.55);
  background: rgba(6, 13, 30, 0.98);
  transform: translateX(-50%) rotate(45deg);
}

.source-tooltip.is-top::after {
  bottom: -6px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(0, 240, 255, 0.55);
  border-bottom: 1px solid rgba(0, 240, 255, 0.55);
}

.source-tooltip.is-bottom::after {
  top: -6px;
}

.source-tooltip-title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(153, 247, 255, 0.95);
  margin-bottom: 6px;
}

.source-tooltip-body {
  color: #e9f7ff;
  line-height: 1.42;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  overflow-x: hidden;
}

.source-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.v {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.interior-card {
  padding: 22px 20px 18px;
}

.interior-card h2 {
  margin-bottom: 18px;
}

.interior-row {
  padding: 9px 12px 11px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(4, 14, 36, 0.74), rgba(7, 20, 46, 0.56));
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.05);
}

.interior-row + .interior-row {
  margin-top: 10px;
}

.interior-row .k {
  margin-bottom: 3px;
  letter-spacing: 0.09em;
}

.interior-row .v {
  margin-top: 0;
  line-height: 1.35;
}

.formatted-text {
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.formatted-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.developer-logo {
  display: block;
  width: min(240px, 70%);
  max-height: 96px;
  object-fit: contain;
  margin: 4px 0 12px;
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
  padding: 10px;
}

.economics-disclaimer {
  margin: -2px 2px 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 191, 71, 0.35);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 191, 71, 0.08), rgba(255, 127, 80, 0.06));
  color: #ffdca8;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(255, 191, 71, 0.08);
  opacity: 0;
  transform: translateY(4px);
  animation: disclaimer-in 320ms ease-out 120ms forwards;
}

.economics-disclaimer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 191, 71, 0.45);
  background: rgba(255, 191, 71, 0.12);
  color: #ffe3b4;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.economics-disclaimer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffcf70;
  box-shadow: 0 0 10px rgba(255, 207, 112, 0.6);
}

.economics-disclaimer-text {
  margin: 0;
  color: #ffdca8;
  font-size: 12.5px;
  line-height: 1.5;
  align-self: center;
}

.payment-plan-block + .payment-plan-block {
  margin-top: 14px;
}

.payment-plan-label {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

@keyframes card-enter {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes brand-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes brand-shine {
  0% {
    transform: translateX(-140%) rotate(8deg);
  }
  100% {
    transform: translateX(140%) rotate(8deg);
  }
}

@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes disclaimer-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lightbox-frame-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.16);
    border-color: rgba(0, 240, 255, 0.22);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.26);
    border-color: rgba(0, 240, 255, 0.35);
  }
}

@keyframes media-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes media-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes ring-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand-wrap,
  .header-meta {
    justify-self: center;
  }

  .header-meta {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-frame {
    padding: 10px 22px;
  }

  .tabs-shell {
    padding: 8px 10px 10px;
  }

}

@media (max-width: 560px) {
  .container {
    padding: 12px;
  }

  .card {
    padding: 14px;
  }

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

  .brand {
    font-size: 28px;
  }

  .project-meta {
    font-size: 12px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .logo-seal {
    width: 44px;
    height: 44px;
  }

  .home-button {
    padding: 7px 10px;
  }

  .home-button span {
    display: none;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .media-thumb img {
    height: 128px;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .section-media-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .lightbox-dialog {
    width: 96vw;
    margin-top: 3vh;
    padding: 8px;
  }

  .lightbox-nav {
    display: none;
  }

  .map-embed {
    height: 280px;
  }

  .terminal-filters {
    grid-template-columns: 1fr 1fr;
  }

  .terminal-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-goal-field,
  .terminal-level-field,
  .terminal-tool-field {
    grid-column: span 2;
  }

  .terminal-invest-field,
  .terminal-profit-field,
  .terminal-time-field {
    grid-column: span 1;
  }

  .terminal-time-field {
    grid-column: span 2;
  }

  .lead-cta-main-btn {
    font-size: 11px;
    padding: 9px 10px;
  }

  .lead-form-grid {
    grid-template-columns: 1fr;
  }

  .lead-modal-dialog {
    margin: 16px auto;
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 680px) {
  .terminal-filters {
    grid-template-columns: 1fr;
  }

  .terminal-results {
    width: 100%;
    padding: 10px;
    grid-template-columns: 1fr;
  }

  .terminal-goal-field,
  .terminal-level-field,
  .terminal-tool-field,
  .terminal-invest-field,
  .terminal-profit-field,
  .terminal-time-field {
    grid-column: span 1;
  }

  .project-jump select {
    width: 98px;
    min-width: 98px;
    max-width: 98px;
  }
}
