/* Shared Companies / Crypto directory — Inter + system mono only */
.edir {
  --edir-line: rgba(255, 255, 255, 0.08);
  --edir-text2: rgba(226, 232, 248, 0.78);
  --edir-text3: #6b7798;
  --edir-blue: #5b8cff;
  --edir-gold: #f5c04e;
}

/* —— Hero stage —— */
.edir-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 28px 0 0;
  margin: -8px 0 0;
}

.edir-band {
  position: absolute;
  left: -20%;
  right: -20%;
  top: 46%;
  height: 280px;
  margin-top: -140px;
  z-index: -2;
  will-change: transform;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(11, 42, 140, 0.5) 26%,
    rgba(24, 66, 190, 0.92) 48%,
    rgba(18, 54, 160, 0.85) 58%,
    rgba(11, 42, 140, 0.4) 78%,
    transparent 100%
  );
  filter: blur(22px);
  animation: edirFloat 8s ease-in-out infinite;
  pointer-events: none;
}

.edir-band.b2 {
  height: 110px;
  margin-top: -30px;
  filter: blur(40px);
  opacity: 0.7;
  background: linear-gradient(180deg, transparent, rgba(64, 128, 255, 0.9), transparent);
  animation: edirFloat2 5.5s ease-in-out infinite;
}

.edir-sweep {
  position: absolute;
  top: 46%;
  left: 0;
  width: 46%;
  height: 220px;
  margin-top: -110px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(140, 180, 255, 0.3), transparent 70%);
  filter: blur(30px);
  animation: edirSweep 9s linear infinite;
}

@keyframes edirFloat {
  0%, 100% { transform: translate3d(0, -40px, 0) rotate(-1.6deg) scaleY(1); }
  50% { transform: translate3d(0, 48px, 0) rotate(1.4deg) scaleY(1.18); }
}
@keyframes edirFloat2 {
  0%, 100% { transform: translate3d(0, 36px, 0) rotate(1.2deg); }
  50% { transform: translate3d(0, -44px, 0) rotate(-1.6deg); }
}
@keyframes edirSweep {
  from { transform: translate3d(-110%, 0, 0); }
  to { transform: translate3d(330%, 0, 0); }
}

.edir-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #04050a 0%,
    rgba(4, 5, 10, 0.3) 24%,
    rgba(4, 5, 10, 0) 46%,
    rgba(4, 5, 10, 0.55) 76%,
    #04050a 100%
  );
  pointer-events: none;
}

.edir-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.13;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.edir.paused .edir-band,
.edir.paused .edir-sweep {
  animation-play-state: paused;
}

.edir-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}

.edir-kick {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--edir-text2);
  margin-bottom: 10px;
}

.edir-kick b {
  color: #fff;
  font-weight: 600;
}

.edir-stage h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: #fff;
  margin: 0;
}

.edir-stage h1 span {
  display: block;
  font-weight: 500;
  font-style: italic;
  font-size: 0.48em;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #a9c3ff;
  margin: 0.16em 0 0 0.06em;
}

.edir-ledger {
  min-width: 250px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.edir-ledger div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: var(--edir-text2);
}

.edir-ledger div span {
  display: inline;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
}

.edir-ledger div b {
  display: inline;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  line-height: 1;
  margin: 0;
}

/* —— Find row —— */
.edir-find {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  padding: 0 0 12px;
  border: none;
  border-radius: 0;
  background: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.2s;
  flex-wrap: wrap;
}

.edir-find:focus-within {
  border-bottom-color: #8fb0ff;
}

.edir-find svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.6);
  fill: none;
  stroke-width: 1.6;
  flex-shrink: 0;
}

.edir-find input {
  flex: 1;
  min-width: 160px;
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  color: #fff;
  background: none;
  border: none;
  outline: none;
}

.edir-find input::placeholder {
  color: rgba(255, 255, 255, 0.34);
  font-weight: 500;
  font-style: italic;
}

.edir-wl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid transparent;
  background: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
}

.edir-wl:hover {
  border-bottom-color: #fff;
}

.edir-wl.on {
  color: var(--edir-gold);
  background: none;
  border-color: transparent;
}

.edir-wl i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
}

/* —— Group tabs (Companies) —— */
.edir .company-group-tabs,
.edir-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 22px 0 0;
  margin: 8px 0 8px;
  background: var(--bg-primary, #04050a);
  border-bottom: none;
}

.edir .company-group-tabs::after,
.edir-bar::after {
  content: '';
  flex-basis: 100%;
  height: 1px;
  background: var(--edir-line);
  margin-top: -1px;
}

.edir .company-group-tab {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 0 0 12px;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--edir-text3);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.edir .company-group-tab:hover {
  color: #fff;
  background: none;
}

.edir .company-group-tab.active {
  color: #fff;
  font-weight: 600;
  background: none;
  border: none;
}

.edir .company-group-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #fff;
}

.edir .company-group-tab__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  margin-left: 2px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--edir-text3);
  vertical-align: top;
}

.edir .company-group-tab.active .company-group-tab__badge {
  color: var(--edir-text2);
}

.edir-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--edir-text3);
  padding-bottom: 12px;
  font-family: var(--font-sans);
}

/* —— Directory —— */
.edir-dir {
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 22px;
  align-items: start;
}

.edir-sec {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 24px 0 28px;
  border-top: none;
  border-bottom: 1px solid var(--edir-line);
  scroll-margin-top: 70px;
}

.edir-sec:last-of-type {
  border-bottom: none;
}

.edir-ltr {
  position: sticky;
  top: 92px;
  align-self: start;
}

.edir-ltr b {
  display: block;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 96px;
  line-height: 0.8;
  color: #fff;
  letter-spacing: -0.03em;
}

.edir-ltr span {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--edir-text3);
  margin-top: 12px;
}

.edir-plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 8px;
}

/* —— Horizontal cut-corner plates —— */
.edir-plates .entity-tile {
  --cut: 16px;
  position: relative;
  height: 76px;
  display: grid;
  grid-template-columns: 44px 1fr 30px;
  gap: 13px;
  align-items: center;
  padding: 0 12px 0 14px;
  background: rgba(255, 255, 255, 0.13);
  border: none;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background 0.2s;
  animation: edirFadeUp 0.3s ease both;
  overflow: visible;
}

.edir-plates .entity-tile::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: 0;
  background: #090b16;
  transition: background 0.22s;
  clip-path: polygon(0 0, calc(100% - var(--cut) + 0.4px) 0, 100% calc(var(--cut) - 0.4px), 100% 100%, 0 100%);
}

.edir-plates .entity-tile::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--edir-blue);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 1;
}

.edir-plates .entity-tile > * {
  position: relative;
  z-index: 1;
}

.edir-plates .entity-tile:hover {
  background: rgba(120, 160, 255, 0.6);
  border-color: transparent;
}

.edir-plates .entity-tile:hover::before {
  background: #0b1a4d;
}

.edir-plates .entity-tile:hover::after {
  transform: scaleY(1);
}

.edir-plates .entity-tile:has(.wl-star.is-on) {
  background: rgba(245, 192, 78, 0.55);
}

.edir-plates .entity-tile__link {
  display: contents;
  text-align: left;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.edir-plates .entity-tile .company-icon,
.edir-plates .entity-tile .crypto-icon {
  width: 44px;
  height: 44px;
  border-radius: 3px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #10142a;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.edir-plates .entity-tile:hover .company-icon,
.edir-plates .entity-tile:hover .crypto-icon {
  background: #fff;
  border-color: #fff;
  color: #0b1a4d;
}

.edir-plates .entity-tile__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.edir-plates .entity-tile__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--edir-text3);
  transition: color 0.2s;
}
.edir-plates .entity-tile__idx i {
  font-style: normal;
  color: var(--edir-gold);
}

.edir-plates .entity-tile:hover .entity-tile__idx {
  color: #a9c3ff;
}

.edir-plates .entity-tile__name {
  display: block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.edir-plates .entity-tile__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--edir-text3);
  margin: 0;
}

.edir-plates .entity-tile .wl-star {
  position: static;
  width: 30px;
  height: 30px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.28);
  background: none;
  border: none;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  padding: 0;
  line-height: 1;
}

.edir-plates .entity-tile .wl-star:hover {
  color: #fff;
  transform: scale(1.15);
}

.edir-plates .entity-tile .wl-star.is-on {
  color: var(--edir-gold);
}

@keyframes edirFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* —— Rail —— */
.edir-rail {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 26px;
}

.edir-rail button {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  width: 26px;
  height: 19px;
  color: rgba(255, 255, 255, 0.14);
  background: none;
  border: none;
  cursor: default;
  padding: 0;
}

.edir-rail button.has {
  color: #fff;
  cursor: pointer;
}

.edir-rail button.has:hover {
  color: #8fb0ff;
}

.edir-empty {
  padding: 70px 0;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 22px;
  color: var(--edir-text2);
  line-height: 1.4;
}

.edir-empty[hidden],
.edir-sec[hidden],
.entity-tile[hidden] {
  display: none !important;
}

.edir-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-bottom: 12px;
  font-size: 11.5px;
  color: var(--edir-text3);
}

.edir-foot button {
  font-size: 11.5px;
  color: var(--edir-text3);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
}

.edir-foot button:hover {
  color: #fff;
  border-bottom-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .edir-band,
  .edir-sweep,
  .edir-plates .entity-tile {
    animation: none !important;
  }
}

/* Crypto stage — warmer band */
.edir--crypto .edir-band {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(120, 60, 10, 0.45) 26%,
    rgba(180, 100, 20, 0.75) 48%,
    rgba(140, 70, 12, 0.7) 58%,
    rgba(80, 40, 8, 0.35) 78%,
    transparent 100%
  );
}
.edir--crypto .edir-band.b2 {
  background: linear-gradient(180deg, transparent, rgba(245, 158, 11, 0.75), transparent);
}
.edir--crypto .edir-sweep {
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(245, 180, 80, 0.28), transparent 70%);
}
.edir--crypto .edir-stage h1 span { color: #f5c04e; }

@media (max-width: 860px) {
  .edir-head {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .edir-ledger { min-width: 0; }
  .edir-stage h1 { font-size: clamp(36px, 10vw, 56px); }
  .edir-find { margin-top: 28px; gap: 12px; }
  .edir .company-group-tabs,
  .edir-bar { gap: 18px; }
  .edir-count { display: none; }
  .edir-dir { grid-template-columns: 1fr; }
  .edir-rail { display: none; }
  .edir-sec {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 0 22px;
  }
  .edir-ltr {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 14px;
  }
  .edir-ltr b { font-size: 64px; }
  .edir-ltr span { margin: 0; }
  .edir-plates { grid-template-columns: 1fr; }
}
