:root {
  --pexip-blue: #0a2136;
  --pexip-purple: #5244ee;
  --pexip-green: #4ef2ba;
  --ink: #0d1722;
  --muted: #607086;
  --line: #dbe3ec;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --surface-tint: #eefbf6;
  --shadow: 0 20px 50px rgba(10, 33, 54, 0.12);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0, #f7fafc 36rem, #ffffff 100%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(10, 33, 54, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand img {
  display: block;
  width: 112px;
  height: auto;
}

.top-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  justify-content: center;
}

.top-nav a {
  color: var(--pexip-blue);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--pexip-purple);
}

.language-switch,
.filter-bar {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.language-switch button,
.filter-bar button {
  min-height: 2.35rem;
  border: 0;
  border-radius: 6px;
  color: var(--pexip-blue);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.language-switch button {
  min-width: 2.75rem;
}

.filter-bar button {
  min-width: 5.75rem;
  padding: 0 1rem;
}

.language-switch button:hover,
.filter-bar button:hover {
  background: var(--surface-soft);
}

.language-switch button.is-active,
.filter-bar button.is-active {
  color: var(--surface);
  background: var(--pexip-blue);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding: clamp(3rem, 7vw, 6rem) 0 2rem;
}

.intro-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--pexip-purple);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1rem;
  color: var(--pexip-blue);
  font-size: clamp(3.3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.intro p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.quick-stats {
  display: grid;
  min-width: 9rem;
  padding: 1.25rem;
  border: 1px solid rgba(78, 242, 186, 0.55);
  border-radius: 8px;
  background: var(--pexip-blue);
  color: var(--surface);
  box-shadow: var(--shadow);
}

.quick-stats span {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.quick-stats small {
  margin-top: 0.35rem;
  color: var(--pexip-green);
  font-weight: 750;
}

.directory-shell {
  margin: 1rem 0 4rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(10, 33, 54, 0.08);
}

.directory-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin-bottom: 0;
  color: var(--pexip-blue);
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.search-field {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.search-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: var(--surface-soft);
}

.search-field input:focus {
  border-color: var(--pexip-purple);
  box-shadow: 0 0 0 4px rgba(82, 68, 238, 0.14);
}

.filter-bar {
  margin: 1.25rem 0 1.5rem;
}

.directory-sections {
  display: grid;
  gap: 2rem;
}

.deployment-section {
  display: grid;
  gap: 0.85rem;
}

.section-title-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.section-title-row h3 {
  margin: 0;
  color: var(--pexip-blue);
  font-size: 1.15rem;
}

.count-pill {
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-tint);
  color: #0c6e53;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.link-card {
  display: grid;
  min-height: 12rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.link-card:hover {
  border-color: rgba(82, 68, 238, 0.45);
  box-shadow: 0 12px 28px rgba(10, 33, 54, 0.1);
  transform: translateY(-2px);
}

.link-card:focus-visible {
  outline: 3px solid rgba(82, 68, 238, 0.35);
  outline-offset: 3px;
}

.link-card h4 {
  margin: 0 0 0.55rem;
  color: var(--pexip-blue);
  font-size: 1.08rem;
  line-height: 1.25;
}

.link-card p {
  margin-bottom: 1.15rem;
  color: var(--muted);
  line-height: 1.45;
}

.link-url {
  align-self: end;
  overflow: hidden;
  color: var(--pexip-purple);
  font-size: 0.86rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  margin: 2rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

.site-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: var(--pexip-blue);
  color: var(--surface);
}

.site-footer img {
  width: 105px;
  height: auto;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.editor-main {
  width: min(980px, calc(100% - 2rem));
}

.editor-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 4rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(10, 33, 54, 0.08);
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.primary-button,
.secondary-button {
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--pexip-blue);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: var(--surface);
  background: var(--pexip-blue);
}

.secondary-button {
  color: var(--pexip-blue);
  background: var(--surface);
}

.primary-button:hover,
.secondary-button:hover {
  border-color: var(--pexip-purple);
}

.editor-grid {
  display: grid;
  gap: 0.85rem;
}

.editor-row {
  display: grid;
  grid-template-columns: 8rem minmax(8rem, 1fr) minmax(10rem, 1.35fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.editor-row label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.editor-row input,
.editor-row select,
.editor-row textarea {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  color: var(--ink);
  background: var(--surface);
}

.editor-row textarea {
  min-height: 5.2rem;
  resize: vertical;
}

.editor-wide {
  grid-column: 1 / -1;
}

.danger-button {
  min-height: 2.45rem;
  border: 1px solid #b42318;
  border-radius: 6px;
  color: #b42318;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.editor-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .intro,
  .directory-head {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    width: min(100%, 13rem);
  }

  .link-grid,
  .editor-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 1rem, 1180px);
  }

  .site-header {
    gap: 0.85rem;
    padding: 0.85rem;
  }

  .brand img {
    width: 98px;
  }

  h1 {
    font-size: 3rem;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    width: 100%;
  }

  .filter-bar button {
    min-width: 0;
    padding: 0 0.4rem;
  }

  .site-footer {
    display: grid;
    gap: 0.75rem;
  }
}
