/* =====================================================================
   HELPER Server Directory — Phase 3.4 visual showcase
   Isolated catalogue/detail styles. Backend and route semantics unchanged.
   ===================================================================== */

:root {
  --sd-bg: #020713;
  --sd-bg-deep: #01040c;
  --sd-surface: rgba(5, 15, 31, .82);
  --sd-surface-strong: rgba(4, 12, 26, .94);
  --sd-surface-soft: rgba(11, 27, 50, .72);
  --sd-line: rgba(139, 221, 255, .15);
  --sd-line-strong: rgba(34, 224, 255, .34);
  --sd-text: #f5fbff;
  --sd-text-soft: rgba(218, 238, 250, .76);
  --sd-muted: rgba(183, 211, 229, .50);
  --sd-cyan: #20e4ff;
  --sd-cyan-2: #66f2ff;
  --sd-cyan-glow: rgba(32, 228, 255, .08);
  --sd-blue: #398cff;
  --sd-violet: #8f63ff;
  --sd-green: #37edb5;
  --sd-amber: #ffbe55;
  --sd-red: #ff6b82;
  --sd-radius-sm: 10px;
  --sd-radius: 16px;
  --sd-radius-lg: 24px;
  --sd-radius-xl: 32px;
  --sd-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  --sd-shadow-soft: 0 14px 42px rgba(0, 0, 0, .28);
  --sd-transition: 220ms cubic-bezier(.2, .8, .2, 1);
  --sd-max-width: 1440px;
  --sd-header-height: 94px;
}

/* ---------------------------------------------------------------------
   Page isolation and global HELPER-shell compatibility
   --------------------------------------------------------------------- */

html.sd-page-root,
html.sd-page-root body {
  background: var(--sd-bg-deep);
}

html.sd-page-root {
  --sd-anchor-offset: calc(var(--sd-header-height) + 2rem);
  --sd-nav-shield-height: calc(var(--sd-header-height) + 1rem);
  --sd-page-top-offset: calc(var(--sd-header-height) + 2.4rem);
  --sd-sticky-offset: calc(var(--sd-header-height) + 1.3rem);
  color-scheme: dark;
  overflow-x: clip;
  scroll-padding-top: var(--sd-anchor-offset);
}

html.sd-page-root body {
  overflow-x: clip;
  overflow-y: visible;
  background:
    radial-gradient(circle at 78% 4%, rgba(32, 228, 255, .095), transparent 30rem),
    radial-gradient(circle at 14% 20%, rgba(143, 99, 255, .075), transparent 28rem),
    linear-gradient(145deg, #020713 0%, #01040c 48%, #031125 100%);
}

html.sd-page-root body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: var(--sd-nav-shield-height);
  z-index: 90;
  pointer-events: none;
  background:
    linear-gradient(180deg, #01040c 0%, rgba(2, 7, 19, .99) 72%, rgba(2, 7, 19, .82) 88%, transparent 100%);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

html.sd-page-root .helper-nav {
  background:
    linear-gradient(180deg, rgba(6, 18, 34, .97), rgba(2, 7, 16, .97));
}

html.sd-page-root .helper-fixed-bg {
  opacity: .48;
  background:
    radial-gradient(circle at 86% 14%, rgba(32, 228, 255, .09), transparent 33rem),
    radial-gradient(circle at 9% 28%, rgba(143, 99, 255, .07), transparent 31rem),
    linear-gradient(135deg, rgba(2, 7, 19, .18), rgba(1, 4, 12, .24));
}

html.sd-page-root .helper-fixed-bg::before {
  opacity: .075;
}

html.sd-page-root .helper-fixed-bg::after {
  opacity: .22;
  filter: blur(24px);
}

html.sd-page-root .helper-scanline {
  opacity: .035;
}

.sd-shell {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), var(--sd-max-width));
  margin: 0 auto;
  padding-top: var(--sd-page-top-offset);
  padding-bottom: 5rem;
  color: var(--sd-text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.55;
}

.sd-shell *,
.sd-shell *::before,
.sd-shell *::after {
  box-sizing: border-box;
}

.sd-shell :is(h1, h2, h3, h4, p) {
  overflow-wrap: anywhere;
}

.sd-shell :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(32, 228, 255, .28);
  outline-offset: 3px;
}

.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;
}

#comments,
#owner-panel,
#owner-history,
#admin-panel,
.sd-service-zone,
.sd-panel,
.sd-admin-section {
  scroll-margin-top: var(--sd-anchor-offset);
}

/* Server Directory form controls are isolated from base.html global form rules. */
html.sd-page-root .sd-shell :is(
  .sd-searchbox input,
  .sd-select select,
  .sd-textarea-wrap textarea,
  .sd-report input,
  .sd-report select,
  .sd-owner-grid input,
  .sd-owner-grid select,
  .sd-owner-grid textarea,
  .sd-admin-form input,
  .sd-admin-form select,
  .sd-admin-form textarea,
  .sd-admin-actions input,
  .sd-admin-actions select,
  .owner-request-actions input,
  .owner-request-actions select,
  .sd-inline-form input,
  .sd-inline-form select,
  .sd-inline-form textarea
) {
  border-radius: var(--sd-radius-sm);
  color: var(--sd-text);
  font-family: inherit;
  letter-spacing: 0;
}

/* ---------------------------------------------------------------------
   Shared components
   --------------------------------------------------------------------- */

.sd-flash {
  margin-bottom: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-radius);
  background: var(--sd-surface-strong);
  box-shadow: var(--sd-shadow-soft);
}

.sd-flash-ok {
  border-color: rgba(55, 237, 181, .32);
}

.sd-flash-error {
  border-color: rgba(255, 107, 130, .36);
}

.sd-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .65rem;
  color: var(--sd-cyan-2);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sd-kicker > span {
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--sd-green);
  box-shadow: 0 0 16px rgba(55, 237, 181, .8);
}

.sd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 28px;
  padding: .35rem .68rem;
  color: var(--sd-text-soft);
  font-size: .73rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: rgba(6, 17, 34, .72);
  backdrop-filter: blur(14px);
}

.sd-badge.is-helper {
  color: #dffcff;
  border-color: rgba(32, 228, 255, .3);
  background: rgba(15, 101, 123, .20);
  box-shadow: inset 0 0 18px rgba(32, 228, 255, .06);
}

.sd-badge.is-owner {
  color: #efeaff;
  border-color: rgba(143, 99, 255, .42);
  background: rgba(143, 99, 255, .18);
}

.sd-badge.is-warning {
  color: #ffe8b8;
  border-color: rgba(255, 190, 85, .36);
  background: rgba(255, 190, 85, .12);
}

.sd-badge.is-success {
  color: #bcffe8;
  border-color: rgba(55, 237, 181, .34);
  background: rgba(55, 237, 181, .12);
}

.sd-badge.is-subtle {
  color: var(--sd-text-soft);
}

.sd-primary-button,
.sd-secondary-button,
.sd-danger-button,
.sd-text-button,
.sd-discovery-submit {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  padding: .76rem 1.15rem;
  border-radius: 13px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .9rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--sd-transition),
    border-color var(--sd-transition),
    box-shadow var(--sd-transition),
    background var(--sd-transition),
    color var(--sd-transition);
}

.sd-primary-button,
.sd-discovery-submit {
  color: #00121c;
  background: linear-gradient(120deg, #d9fcff 0%, var(--sd-cyan) 46%, #55a4ff 100%);
  box-shadow:
    0 12px 28px rgba(32, 228, 255, .18),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}

.sd-primary-button:hover,
.sd-discovery-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 38px rgba(32, 228, 255, .26),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}

.sd-secondary-button {
  color: var(--sd-text);
  border-color: rgba(189, 229, 255, .22);
  background: rgba(9, 23, 43, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.sd-secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(32, 228, 255, .42);
  background: rgba(15, 39, 69, .9);
}

.sd-danger-button {
  color: #fff;
  border-color: rgba(255, 107, 130, .38);
  background: rgba(178, 42, 65, .76);
}

.sd-text-button {
  min-height: 40px;
  color: var(--sd-cyan-2);
  border-color: var(--sd-line);
  background: rgba(32, 228, 255, .055);
}

.sd-panel,
.sd-admin-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .028), transparent 42%),
    var(--sd-surface);
  box-shadow: var(--sd-shadow-soft);
  backdrop-filter: blur(18px) saturate(125%);
}

.sd-panel::before,
.sd-admin-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, rgba(32, 228, 255, .48), transparent);
  pointer-events: none;
}

.sd-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.sd-section-head h2 {
  margin: 0;
  color: var(--sd-text);
  font-family: Montserrat, Space Grotesk, sans-serif;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -.025em;
}

.sd-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 .55rem;
  color: #001018;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sd-cyan), #8cf6ff);
  box-shadow: 0 0 20px rgba(32, 228, 255, .18);
}

.sd-large-text {
  margin: 0;
  color: var(--sd-text-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.sd-muted {
  color: var(--sd-muted);
}

.sd-notice {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-top: 1rem;
  padding: .8rem .95rem;
  color: var(--sd-text-soft);
  border: 1px solid rgba(32, 228, 255, .20);
  border-radius: 13px;
  background: rgba(32, 228, 255, .055);
}

.sd-notice > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #001018;
  font-size: .72rem;
  font-weight: 900;
  border-radius: 50%;
  background: var(--sd-cyan);
}

.sd-notice.is-danger {
  color: #ffd4dc;
  border-color: rgba(255, 107, 130, .28);
  background: rgba(255, 107, 130, .08);
}

.sd-notice a {
  color: var(--sd-cyan-2);
  font-weight: 800;
}

.sd-back {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.1rem;
  color: var(--sd-text-soft);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--sd-transition), transform var(--sd-transition);
}

.sd-back:hover {
  color: #fff;
  transform: translateX(-2px);
}

/* ---------------------------------------------------------------------
   Catalogue hero
   --------------------------------------------------------------------- */

.sd-catalogue-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  align-items: center;
  min-height: 310px;
  margin-bottom: 1.25rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid rgba(88, 207, 255, .20);
  border-radius: var(--sd-radius-xl);
  background:
    linear-gradient(105deg, rgba(4, 15, 32, .98) 0%, rgba(6, 19, 40, .88) 52%, rgba(4, 25, 43, .74) 100%);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255, 255, 255, .055);
}

.sd-catalogue-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 46%, rgba(32, 228, 255, .20), transparent 16rem),
    radial-gradient(circle at 68% 100%, rgba(143, 99, 255, .14), transparent 20rem);
  pointer-events: none;
}

.sd-catalogue-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image:
    linear-gradient(rgba(32, 228, 255, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 228, 255, .08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent 35%, #000);
  pointer-events: none;
}

.sd-hero-copy {
  position: relative;
  z-index: 3;
  max-width: 760px;
}

.sd-hero-copy h1 {
  margin: 0 0 .75rem;
  color: #fff;
  font-family: Montserrat, Space Grotesk, sans-serif;
  font-size: clamp(2rem, 4.3vw, 3.5rem);
  font-weight: 1000;
  line-height: .98;
  letter-spacing: -.055em;
}

.sd-hero-copy h1 span {
  color: transparent;
  background: linear-gradient(105deg, var(--sd-cyan) 0%, #67bbff 52%, var(--sd-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(32, 228, 255, .13));
}

.sd-hero-copy > p {
  max-width: 650px;
  margin: 0 0 1.25rem;
  color: var(--sd-text-soft);
  font-size: clamp(.92rem, 1.25vw, 1.04rem);
  line-height: 1.65;
}

.sd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.sd-hero-meta > div {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 150px;
  padding: .72rem .88rem;
  border: 1px solid rgba(166, 221, 250, .12);
  border-radius: 14px;
  background: rgba(3, 13, 28, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.sd-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--sd-cyan);
  border: 1px solid rgba(32, 228, 255, .22);
  border-radius: 10px;
  background: rgba(32, 228, 255, .075);
}

.sd-hero-meta > div > span:last-child {
  display: flex;
  flex-direction: column;
}

.sd-hero-meta b {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.sd-hero-meta small {
  margin-top: .28rem;
  color: var(--sd-muted);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sd-hero-mascot {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 250px;
}

.sd-hero-mascot img {
  position: relative;
  z-index: 2;
  width: min(100%, 260px);
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 24px 30px rgba(0, 0, 0, .42))
    drop-shadow(0 0 30px rgba(32, 228, 255, .18));
}

.sd-mascot-halo {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(32, 228, 255, .22), rgba(57, 140, 255, .08) 42%, transparent 70%);
  filter: blur(10px);
}

.sd-hero-visual,
.sd-orbit,
.sd-node {
  position: absolute;
  pointer-events: none;
}

.sd-hero-visual {
  inset: 0;
  z-index: 1;
}

.sd-orbit {
  right: 3%;
  top: 15%;
  width: 320px;
  height: 190px;
  border: 1px solid rgba(32, 228, 255, .16);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.sd-orbit-two {
  right: 1%;
  top: 35%;
  width: 280px;
  height: 140px;
  border-color: rgba(143, 99, 255, .16);
  transform: rotate(22deg);
}

.sd-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sd-cyan);
  box-shadow: 0 0 16px rgba(32, 228, 255, .9);
}

.sd-node-one { right: 17%; top: 20%; }
.sd-node-two { right: 4%; top: 54%; background: var(--sd-violet); }
.sd-node-three { right: 25%; bottom: 13%; width: 5px; height: 5px; }

/* ---------------------------------------------------------------------
   Discovery toolbar
   --------------------------------------------------------------------- */

.sd-discovery {
  position: relative;
  z-index: 12;
  margin-bottom: 1.4rem;
  padding: .75rem;
  border: 1px solid var(--sd-line);
  border-radius: 21px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .025), transparent),
    rgba(5, 16, 33, .74);
  box-shadow: var(--sd-shadow-soft);
  backdrop-filter: blur(18px);
}

.sd-discovery-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px) auto;
  gap: .65rem;
}

.sd-select-field {
  position: relative;
  min-width: 0;
}

.sd-searchbox,
.sd-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  min-height: 48px;
  padding: 0 .85rem;
  border: 1px solid rgba(157, 218, 246, .13);
  border-radius: 13px;
  background: rgba(1, 7, 17, .66);
  transition: border-color var(--sd-transition), background var(--sd-transition), box-shadow var(--sd-transition);
}

.sd-searchbox:focus-within,
.sd-select:focus-within {
  border-color: rgba(32, 228, 255, .40);
  background: rgba(2, 12, 26, .9);
  box-shadow: 0 0 0 3px rgba(32, 228, 255, .07);
}

.sd-control-icon {
  color: var(--sd-cyan);
  font-size: 1rem;
}

html.sd-page-root .sd-searchbox input[type="search"],
html.sd-page-root .sd-select select {
  width: 100%;
  min-height: 44px;
  padding: 0;
  color: var(--sd-text);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

html.sd-page-root .sd-searchbox input::placeholder {
  color: var(--sd-muted);
}

.sd-select-trigger {
  display: none;
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 48px;
  padding: 0 .85rem;
  color: var(--sd-text);
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  text-align: left;
  border: 1px solid rgba(157, 218, 246, .13);
  border-radius: 13px;
  background: rgba(1, 7, 17, .66);
  cursor: pointer;
  transition:
    border-color var(--sd-transition),
    background var(--sd-transition),
    box-shadow var(--sd-transition);
}

.sd-select-trigger:hover,
.sd-select-trigger[aria-expanded="true"] {
  border-color: rgba(32, 228, 255, .40);
  background: rgba(2, 12, 26, .94);
  box-shadow: 0 0 0 3px rgba(32, 228, 255, .07);
}

.sd-select-trigger [data-sd-select-label] {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-select-chevron {
  color: var(--sd-muted);
  font-size: 1.1rem;
  transition: transform var(--sd-transition);
}

.sd-select-trigger[aria-expanded="true"] .sd-select-chevron {
  transform: rotate(180deg);
}

.sd-select-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + .5rem);
  right: 0;
  left: 0;
  display: grid;
  gap: .3rem;
  padding: .42rem;
  border: 1px solid rgba(117, 216, 255, .24);
  border-radius: 14px;
  background: rgba(3, 11, 25, .97);
  box-shadow:
    0 22px 58px rgba(0, 0, 0, .54),
    0 0 30px rgba(32, 228, 255, .07);
  backdrop-filter: blur(22px) saturate(135%);
}

.sd-select-popover[hidden] {
  display: none;
}

.sd-select-popover [role="option"] {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: .62rem .72rem;
  color: var(--sd-text-soft);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.sd-select-popover [role="option"]:hover,
.sd-select-popover [role="option"]:focus-visible {
  color: #fff;
  border-color: rgba(32, 228, 255, .22);
  background: rgba(32, 228, 255, .08);
}

.sd-select-popover [role="option"][aria-selected="true"] {
  color: #e5fdff;
  border-color: rgba(32, 228, 255, .30);
  background:
    linear-gradient(90deg, rgba(32, 228, 255, .15), rgba(143, 99, 255, .08));
}

.sd-select-popover [role="option"][aria-selected="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--sd-cyan);
}

.sd-js .sd-select-field.is-enhanced .sd-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sd-js .sd-select-field.is-enhanced .sd-select-trigger {
  display: flex;
}

.sd-searchbox kbd {
  padding: .12rem .38rem;
  color: var(--sd-muted);
  font: inherit;
  font-size: .72rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
}

.sd-discovery-submit {
  min-width: 108px;
}

.sd-discovery-lower {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .25rem .05rem;
}

.sd-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.sd-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .42rem .8rem;
  color: var(--sd-text-soft);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(160, 218, 245, .12);
  border-radius: 999px;
  background: rgba(6, 19, 38, .65);
  transition: color var(--sd-transition), border-color var(--sd-transition), background var(--sd-transition);
}

.sd-chip:hover,
.sd-chip.is-active {
  color: #dffcff;
  border-color: rgba(32, 228, 255, .38);
  background: rgba(32, 228, 255, .12);
}

.sd-result-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .7rem;
  color: var(--sd-muted);
  font-size: .78rem;
  white-space: nowrap;
}

.sd-result-line b {
  color: var(--sd-text);
}

.sd-result-reset {
  color: var(--sd-cyan-2);
  font-weight: 800;
  text-decoration: none;
}

.sd-admin-indicator {
  padding: .28rem .55rem;
  color: #ede7ff;
  border: 1px solid rgba(143, 99, 255, .28);
  border-radius: 999px;
  background: rgba(143, 99, 255, .12);
}

/* ---------------------------------------------------------------------
   Catalogue cards
   --------------------------------------------------------------------- */

.sd-server-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
}

.sd-server-grid[data-server-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.sd-server-card {
  position: relative;
  height: clamp(178px, 13.5vw, 192px);
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(151, 217, 247, .15);
  border-radius: 24px;
  background: #071326;
  box-shadow: var(--sd-shadow-soft);
  isolation: isolate;
  transition: transform var(--sd-transition), border-color var(--sd-transition), box-shadow var(--sd-transition);
}

.sd-server-card:hover {
  transform: translateY(-4px);
  border-color: rgba(32, 228, 255, .36);
  box-shadow:
    0 28px 75px rgba(0, 0, 0, .45),
    0 0 32px rgba(32, 228, 255, .07);
}

.sd-server-card.is-inactive {
  opacity: .8;
}

.sd-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.sd-card-banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, var(--sd-fallback-a, rgba(32, 228, 255, .18)), transparent 17rem),
    radial-gradient(circle at 84% 85%, var(--sd-fallback-b, rgba(143, 99, 255, .18)), transparent 17rem),
    linear-gradient(135deg, var(--sd-fallback-start, #07162b), var(--sd-fallback-end, #10132e));
}

.sd-card-banner > img,
.sd-fallback-art,
.sd-card-icon-aura {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sd-card-banner > img {
  filter: saturate(.95) contrast(1.04);
  transition: transform 700ms ease;
}

.sd-server-card:hover .sd-card-banner > img,
.sd-server-card:hover .sd-card-fallback-art {
  transform: scale(1.035);
}

.sd-card-fallback-art {
  background-image: var(--sd-fallback-art);
  background-position: center;
  background-size: cover;
  opacity: .88;
  filter: saturate(1.2) contrast(1.08);
  transition: transform 700ms ease;
}

.sd-card-icon-aura {
  inset: -12% 38% -12% 55%;
  width: auto;
  height: auto;
  background-position: center;
  background-size: cover;
  filter: blur(34px) saturate(1.5);
  mix-blend-mode: screen;
  opacity: .28;
  transform: scale(1.14);
}

.sd-theme-0 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/01-cyan-network.svg");
  --sd-fallback-a: rgba(37, 247, 229, .34);
  --sd-fallback-b: rgba(32, 164, 255, .24);
  --sd-fallback-start: #061a31;
  --sd-fallback-end: #082b35;
}

.sd-theme-1 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/02-violet-horizon.svg");
  --sd-fallback-a: rgba(255, 79, 184, .35);
  --sd-fallback-b: rgba(255, 158, 68, .24);
  --sd-fallback-start: #180927;
  --sd-fallback-end: #4a102d;
}

.sd-theme-2 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/03-blue-nebula.svg");
  --sd-fallback-a: rgba(78, 121, 255, .34);
  --sd-fallback-b: rgba(164, 104, 255, .25);
  --sd-fallback-start: #040d28;
  --sd-fallback-end: #17154f;
}

.sd-theme-3 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/04-holographic-waves.svg");
  --sd-fallback-a: rgba(255, 204, 110, .30);
  --sd-fallback-b: rgba(48, 238, 226, .25);
  --sd-fallback-start: #182333;
  --sd-fallback-end: #3b2336;
}

.sd-theme-4 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/05-cyber-grid.svg");
  --sd-fallback-a: rgba(125, 255, 107, .31);
  --sd-fallback-b: rgba(32, 222, 150, .23);
  --sd-fallback-start: #061c16;
  --sd-fallback-end: #112d18;
}

.sd-theme-5 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/06-data-tunnel.svg");
  --sd-fallback-a: rgba(255, 154, 61, .34);
  --sd-fallback-b: rgba(151, 93, 255, .26);
  --sd-fallback-start: #25120a;
  --sd-fallback-end: #27123d;
}

.sd-theme-6 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/07-abstract-aurora.svg");
  --sd-fallback-a: rgba(141, 255, 158, .31);
  --sd-fallback-b: rgba(176, 80, 255, .25);
  --sd-fallback-start: #061c21;
  --sd-fallback-end: #18253a;
}

.sd-theme-7 {
  --sd-fallback-art: url("/static/server_directory/fallbacks/08-neon-city.svg");
  --sd-fallback-a: rgba(255, 53, 111, .34);
  --sd-fallback-b: rgba(37, 227, 255, .27);
  --sd-fallback-start: #220820;
  --sd-fallback-end: #09283c;
}

.sd-fallback-monogram {
  position: absolute;
  z-index: 1;
  right: clamp(1rem, 8vw, 7rem);
  top: 50%;
  color: rgba(226, 250, 255, .11);
  font-family: Montserrat, Space Grotesk, sans-serif;
  font-size: clamp(6rem, 18vw, 15rem);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -.08em;
  text-shadow: 0 0 70px var(--sd-fallback-a, rgba(32, 228, 255, .24));
  transform: translateY(-50%) rotate(-8deg);
  user-select: none;
}

.sd-card-grid {
  position: absolute;
  inset: 0;
  opacity: .14;
  background-image:
    linear-gradient(rgba(32, 228, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 228, 255, .07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.sd-card-banner-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(2, 8, 20, .82) 0%, rgba(2, 8, 20, .54) 48%, rgba(2, 8, 20, .12) 100%),
    linear-gradient(to top, rgba(2, 8, 20, .58) 0%, rgba(2, 8, 20, .12) 68%, rgba(2, 8, 20, .04) 100%);
}

.sd-card-body {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.4rem;
  min-height: 178px;
  height: 100%;
  padding: 1rem 1.35rem;
  pointer-events: none;
}

.sd-card-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0;
}

.sd-card-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid rgba(220, 247, 255, .24);
  border-radius: 22px;
  background: #061020;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, .42),
    0 0 0 5px rgba(4, 12, 25, .42);
}

.sd-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--sd-cyan);
  font-size: 1.7rem;
  font-weight: 1000;
  background: linear-gradient(135deg, #0b1b34, #1b1742);
}

.sd-card-status-dot,
.sd-detail-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border: 3px solid #061020;
  border-radius: 50%;
  background: var(--sd-green);
  box-shadow: 0 0 14px rgba(55, 237, 181, .72);
}

.sd-card-main {
  min-width: 0;
}

.sd-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin-bottom: .55rem;
}

.sd-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}

.sd-card-main h2 {
  margin: 0;
  color: #fff;
  font-family: Montserrat, Space Grotesk, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 1000;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.sd-card-main > p {
  display: -webkit-box;
  margin: .42rem 0 .58rem;
  overflow: hidden;
  color: var(--sd-text-soft);
  max-width: 760px;
  font-size: .96rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sd-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  color: var(--sd-muted);
  font-size: .76rem;
}

.sd-card-members {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
}

.sd-card-members i {
  color: var(--sd-green);
  font-size: .52rem;
  font-style: normal;
  text-shadow: 0 0 8px rgba(55, 237, 181, .7);
}

.sd-card-meta b {
  color: var(--sd-text);
}

.sd-card-category {
  padding: .24rem .48rem;
  border: 1px solid rgba(32, 228, 255, .18);
  border-radius: 7px;
  background: rgba(32, 228, 255, .06);
}

.sd-card-footer {
  display: flex;
  align-self: center;
  margin: 0;
  pointer-events: auto;
}

.sd-card-footer .sd-primary-button {
  width: auto;
  min-width: 150px;
}

/* A single result uses the same complete composition as a long list. */
.sd-server-grid[data-server-count="1"] .sd-server-card {
  min-height: 178px;
}

.sd-server-grid[data-server-count="1"] .sd-card-body {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 178px;
  padding: 1rem 1.35rem;
}

.sd-server-grid[data-server-count="1"] .sd-card-avatar-wrap {
  width: 110px;
  height: 110px;
  margin: 0;
}

.sd-server-grid[data-server-count="1"] .sd-card-avatar {
  border-radius: 27px;
}

.sd-server-grid[data-server-count="1"] .sd-card-main h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.sd-server-grid[data-server-count="1"] .sd-card-main > p {
  max-width: 720px;
  font-size: .96rem;
  -webkit-line-clamp: 2;
}

.sd-server-grid[data-server-count="1"] .sd-card-footer {
  align-self: center;
  margin: 0;
}

.sd-server-grid[data-server-count="1"] .sd-card-footer .sd-primary-button {
  width: auto;
  min-width: 150px;
}

.sd-server-grid[data-server-count="1"] .sd-card-banner-overlay {
  background:
    linear-gradient(to right, rgba(2, 8, 20, .88) 0%, rgba(2, 8, 20, .62) 54%, rgba(2, 8, 20, .20) 100%),
    linear-gradient(to top, rgba(2, 8, 20, .66), transparent 68%);
}

/* ---------------------------------------------------------------------
   Empty state and catalogue footer
   --------------------------------------------------------------------- */

.sd-empty {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 2rem;
  text-align: center;
  border: 1px dashed rgba(32, 228, 255, .24);
  border-radius: var(--sd-radius-lg);
  background: rgba(6, 18, 36, .66);
}

.sd-empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: .9rem;
  color: var(--sd-cyan);
  font-size: 2rem;
  border: 1px solid rgba(32, 228, 255, .25);
  border-radius: 22px;
  background: rgba(32, 228, 255, .07);
}

.sd-empty h2 {
  margin: 0;
}

.sd-empty p {
  max-width: 560px;
  margin: .45rem 0 1rem;
  color: var(--sd-text-soft);
}

.sd-catalogue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.15rem;
  color: var(--sd-muted);
  font-size: .76rem;
  border-top: 1px solid var(--sd-line);
}

.sd-catalogue-footer a {
  color: var(--sd-cyan-2);
  font-weight: 800;
  text-decoration: none;
}

/* ---------------------------------------------------------------------
   Detail hero
   --------------------------------------------------------------------- */

.sd-detail-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(340px, 27vw, 365px);
  margin-bottom: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(114, 213, 255, .19);
  border-radius: 30px;
  background: #061122;
  box-shadow: var(--sd-shadow);
  isolation: isolate;
}

.sd-detail-banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 30%, var(--sd-fallback-a, rgba(32, 228, 255, .19)), transparent 22rem),
    radial-gradient(circle at 85% 65%, var(--sd-fallback-b, rgba(143, 99, 255, .18)), transparent 24rem),
    linear-gradient(135deg, var(--sd-fallback-start, #07162b), var(--sd-fallback-end, #14142f));
}

.sd-detail-banner > img,
.sd-detail-fallback-art,
.sd-detail-icon-aura {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sd-detail-banner > img {
  filter: saturate(1.02) contrast(1.04);
}

.sd-detail-fallback-art {
  background-image: var(--sd-fallback-art);
  background-position: center;
  background-size: cover;
  opacity: .92;
  filter: saturate(1.24) contrast(1.08);
}

.sd-detail-icon-aura {
  inset: -16% 46% -16% 58%;
  width: auto;
  height: auto;
  background-position: center;
  background-size: cover;
  filter: blur(52px) saturate(1.55);
  mix-blend-mode: screen;
  opacity: .32;
  transform: scale(1.18);
}

.sd-detail-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: .14;
  background-image:
    linear-gradient(rgba(32, 228, 255, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 228, 255, .08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 38%, #000, transparent 70%);
}

.sd-detail-orbit {
  position: absolute;
  right: 6%;
  top: 10%;
  width: 380px;
  height: 220px;
  border: 1px solid rgba(32, 228, 255, .15);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.sd-detail-orbit-two {
  right: -2%;
  top: 28%;
  width: 330px;
  height: 170px;
  border-color: rgba(143, 99, 255, .15);
  transform: rotate(20deg);
}

.sd-detail-banner-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(2, 7, 17, .92) 0%, rgba(2, 7, 17, .61) 40%, rgba(2, 7, 17, .14) 78%, rgba(2, 7, 17, .04) 100%),
    linear-gradient(to right, rgba(2, 7, 17, .58) 0%, rgba(2, 7, 17, .06) 76%);
}

.sd-detail-hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.2rem;
  width: 100%;
  padding: clamp(1.3rem, 3.2vw, 2.15rem);
}

.sd-detail-hero-main {
  display: flex;
  align-items: flex-end;
  gap: 1.35rem;
  min-width: 0;
}

.sd-detail-avatar-wrap {
  position: relative;
  width: clamp(132px, 10vw, 144px);
  height: clamp(132px, 10vw, 144px);
  flex: 0 0 auto;
}

.sd-detail-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid rgba(225, 248, 255, .25);
  border-radius: 31px;
  background: #061020;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, .46),
    0 0 0 6px rgba(3, 11, 24, .42);
}

.sd-detail-copy {
  min-width: 0;
}

.sd-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .6rem;
}

.sd-detail-copy h1 {
  margin: 0;
  color: #fff;
  font-family: Montserrat, Space Grotesk, sans-serif;
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 1000;
  line-height: .98;
  letter-spacing: -.055em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .58);
}

.sd-detail-summary {
  display: -webkit-box;
  max-width: 760px;
  margin: .65rem 0 .75rem;
  overflow: hidden;
  color: rgba(228, 242, 251, .77);
  font-size: clamp(.9rem, 1.25vw, 1rem);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sd-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .48rem;
  margin-bottom: .65rem;
}

.sd-detail-meta > span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 28px;
  padding: .32rem .62rem;
  color: rgba(213, 235, 247, .72);
  font-size: .73rem;
  font-weight: 700;
  border: 1px solid rgba(174, 225, 249, .12);
  border-radius: 999px;
  background: rgba(4, 13, 28, .66);
}

.sd-detail-meta i {
  color: var(--sd-green);
  font-size: .48rem;
  font-style: normal;
}

.sd-detail-meta b {
  color: #fff;
}

.sd-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: end;
  gap: .65rem;
  max-width: 320px;
}

/* ---------------------------------------------------------------------
   Detail content
   --------------------------------------------------------------------- */

.sd-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .82fr);
  align-items: start;
  gap: 1.15rem;
  overflow: visible;
}

.sd-detail-grid > main {
  display: contents;
}

.sd-detail-grid > main > .sd-panel {
  grid-column: 1;
}

.sd-detail-sidebar {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 1.15rem;
  min-width: 0;
  align-self: start;
}

.sd-detail-sidebar {
  position: sticky;
  top: var(--sd-sticky-offset);
}

.sd-about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin-top: 1.1rem;
}

.sd-about-facts > div {
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(163, 221, 248, .11);
  border-radius: 13px;
  background: rgba(3, 12, 26, .48);
}

.sd-about-facts small {
  display: block;
  margin-bottom: .22rem;
  color: var(--sd-muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sd-about-facts b {
  color: #fff;
  font-size: .88rem;
}

.sd-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}

.sd-social-links a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .85rem;
  color: var(--sd-text);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--sd-line);
  border-radius: 11px;
  background: rgba(8, 24, 44, .72);
}

.sd-info-list {
  display: grid;
  gap: .55rem;
}

.sd-info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-height: 52px;
  padding: .65rem .7rem;
  border: 1px solid rgba(159, 219, 246, .09);
  border-radius: 12px;
  background: rgba(2, 10, 23, .42);
}

.sd-info-list > div.is-stacked {
  align-items: flex-start;
  flex-direction: column;
}

.sd-info-list > div > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--sd-muted);
  font-size: .75rem;
}

.sd-info-list > div > span:first-child i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--sd-cyan);
  font-size: .65rem;
  font-style: normal;
  font-weight: 900;
  border: 1px solid rgba(32, 228, 255, .17);
  border-radius: 8px;
  background: rgba(32, 228, 255, .055);
}

.sd-info-list b {
  color: #fff;
  font-size: .85rem;
  text-align: right;
}

.sd-similar-list {
  display: grid;
  gap: .65rem;
}

.sd-similar-list a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .65rem;
  color: var(--sd-text);
  text-decoration: none;
  border: 1px solid rgba(159, 219, 246, .10);
  border-radius: 13px;
  background: rgba(2, 10, 23, .43);
  transition: border-color var(--sd-transition), transform var(--sd-transition);
}

.sd-similar-list a:hover {
  transform: translateX(2px);
  border-color: rgba(32, 228, 255, .30);
}

.sd-similar-list img,
.sd-similar-list > a > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  object-fit: cover;
  color: var(--sd-cyan);
  font-weight: 900;
  border-radius: 13px;
  background: linear-gradient(135deg, #0b1b34, #1b1742);
}

.sd-similar-list b,
.sd-similar-list small {
  display: block;
}

.sd-similar-list b {
  font-size: .82rem;
}

.sd-similar-list small {
  margin-top: .12rem;
  color: var(--sd-muted);
  font-size: .7rem;
}

.sd-similar-list em {
  color: var(--sd-cyan);
  font-style: normal;
}

/* ---------------------------------------------------------------------
   Comments
   --------------------------------------------------------------------- */

.sd-comments-panel {
  overflow: visible;
}

.sd-comment-form {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(157, 218, 246, .11);
  border-radius: 16px;
  background: rgba(2, 10, 23, .42);
}

.sd-comment-label {
  display: block;
  margin-bottom: .55rem;
  color: var(--sd-text-soft);
  font-size: .8rem;
  font-weight: 800;
}

.sd-textarea-wrap {
  position: relative;
}

html.sd-page-root .sd-textarea-wrap textarea {
  width: 100%;
  min-height: 124px;
  padding: .9rem 1rem 2rem;
  color: var(--sd-text);
  font-size: .9rem;
  line-height: 1.55;
  resize: vertical;
  border: 1px solid rgba(157, 218, 246, .14);
  border-radius: 13px;
  background: rgba(0, 5, 14, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

html.sd-page-root .sd-textarea-wrap textarea:focus {
  border-color: rgba(32, 228, 255, .4);
  box-shadow: 0 0 0 3px rgba(32, 228, 255, .07);
}

html.sd-page-root .sd-textarea-wrap textarea::placeholder {
  color: rgba(181, 211, 229, .42);
}

.sd-counter {
  position: absolute;
  right: .75rem;
  bottom: .55rem;
  color: var(--sd-muted);
  font-size: .7rem;
}

.sd-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .7rem;
}

.sd-comment-form-footer > small {
  color: var(--sd-muted);
  font-size: .72rem;
}

.sd-comment-submit {
  min-height: 42px;
  padding: .63rem .95rem;
}

.sd-comments {
  display: grid;
  gap: .75rem;
}

.sd-comment {
  position: relative;
  padding: 1rem;
  border: 1px solid rgba(157, 218, 246, .11);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .02), transparent 45%),
    rgba(4, 14, 29, .70);
}

.sd-comment.is-pinned {
  border-color: rgba(32, 228, 255, .27);
  box-shadow: inset 3px 0 0 rgba(32, 228, 255, .45);
}

.sd-comment header {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .8rem;
}

.sd-comment-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: #001018;
  font-size: .9rem;
  font-weight: 1000;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--sd-cyan), var(--sd-violet));
  box-shadow: 0 8px 18px rgba(32, 228, 255, .12);
}

.sd-comment-author {
  min-width: 0;
  flex: 1;
}

.sd-comment-author b,
.sd-comment-author small {
  display: block;
}

.sd-comment-author b {
  color: #fff;
  font-size: .86rem;
}

.sd-comment-author small {
  margin-top: .1rem;
  color: var(--sd-muted);
  font-size: .68rem;
}

.sd-comment-body {
  position: relative;
  overflow: visible;
  color: var(--sd-text-soft);
  font-size: .86rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sd-comment-body p {
  margin: 0;
  white-space: pre-wrap;
}

.sd-js .sd-comment-body.is-collapsed {
  overflow: hidden;
}

.sd-js .sd-comment-body.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 68px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(4, 14, 29, .98));
}

.sd-comment-expand {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 40px;
  margin-top: .65rem;
  padding: .48rem .72rem;
  color: var(--sd-cyan-2);
  font: inherit;
  font-size: .76rem;
  font-weight: 900;
  border: 1px solid rgba(32, 228, 255, .20);
  border-radius: 10px;
  background: rgba(32, 228, 255, .065);
  cursor: pointer;
}

.sd-comment-expand::after {
  content: "⌄";
  font-size: .95rem;
  line-height: 1;
  transition: transform var(--sd-transition);
}

.sd-comment-expand[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.sd-comment-expand[hidden] {
  display: none;
}

.sd-comment-action,
.sd-report {
  display: inline-flex;
  margin: .65rem 0 0 .4rem;
}

.sd-comment-delete {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  padding: .48rem .68rem;
  color: #ffc4cf;
  font: inherit;
  font-size: .74rem;
  font-weight: 900;
  border: 1px solid rgba(255, 107, 130, .25);
  border-radius: 10px;
  background: rgba(255, 107, 130, .075);
  cursor: pointer;
}

.sd-report summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .48rem .72rem;
  color: rgba(216, 234, 246, .68);
  font-size: .74rem;
  font-weight: 800;
  border: 1px solid rgba(157, 218, 246, .13);
  border-radius: 10px;
  background: rgba(7, 20, 37, .62);
  cursor: pointer;
}

.sd-report form {
  display: grid;
  grid-template-columns: minmax(150px, .6fr) minmax(200px, 1fr) auto;
  gap: .55rem;
  margin-top: .65rem;
  padding: .7rem;
  border: 1px solid var(--sd-line);
  border-radius: 12px;
  background: rgba(0, 6, 16, .54);
}

html.sd-page-root .sd-report :is(input, select) {
  width: 100%;
  min-height: 40px;
  padding: .55rem .65rem;
  border: 1px solid rgba(157, 218, 246, .14);
  background: rgba(0, 5, 14, .72);
}

.sd-empty-small {
  padding: 1.5rem;
  color: var(--sd-muted);
  text-align: center;
  border: 1px dashed rgba(157, 218, 246, .14);
  border-radius: 14px;
  background: rgba(2, 10, 23, .28);
}

/* ---------------------------------------------------------------------
   Owner and admin areas
   --------------------------------------------------------------------- */

.sd-service-zone {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  gap: 1rem;
  padding: clamp(.85rem, 2vw, 1.15rem);
  overflow: hidden;
  border: 1px solid rgba(143, 99, 255, .25);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(143, 99, 255, .16), transparent 24rem),
    linear-gradient(145deg, rgba(28, 20, 57, .72), rgba(4, 12, 27, .86));
  box-shadow:
    0 20px 54px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

.sd-service-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .10;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(143, 99, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 99, 255, .12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(135deg, #000, transparent 62%);
}

.sd-service-zone > * {
  position: relative;
  z-index: 1;
}

.sd-service-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .25rem .25rem .1rem;
}

.sd-service-zone-head .sd-kicker {
  margin-bottom: .2rem;
  color: #c9b9ff;
}

.sd-service-zone-head h2 {
  margin: 0;
  color: #fff;
  font-family: Montserrat, Space Grotesk, sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: -.025em;
}

.sd-service-zone-head > span {
  color: rgba(218, 208, 255, .62);
  font-size: .72rem;
  font-weight: 800;
}

.sd-service-zone > .sd-panel,
.sd-service-zone > .sd-admin-panel {
  border-color: rgba(168, 140, 255, .20);
  background:
    linear-gradient(145deg, rgba(143, 99, 255, .045), transparent 42%),
    rgba(4, 12, 27, .86);
}

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

.sd-owner-grid form,
.sd-admin-block {
  padding: 1rem;
  border: 1px solid rgba(157, 218, 246, .11);
  border-radius: 14px;
  background: rgba(2, 10, 23, .42);
}

.sd-owner-grid h3,
.sd-admin-block h3,
.sd-admin-block h4 {
  margin: 0 0 .5rem;
  color: #fff;
}

.sd-owner-grid p {
  color: var(--sd-text-soft);
  font-size: .84rem;
}

html.sd-page-root .sd-owner-grid :is(input, select, textarea),
html.sd-page-root .sd-admin-form :is(input, select, textarea),
html.sd-page-root .sd-admin-actions :is(input, select),
html.sd-page-root .owner-request-actions :is(input, select),
html.sd-page-root .sd-inline-form :is(input, select, textarea) {
  width: 100%;
  min-height: 43px;
  padding: .65rem .72rem;
  border: 1px solid rgba(157, 218, 246, .14);
  background: rgba(0, 6, 16, .62);
}

html.sd-page-root .sd-shell select option {
  color: var(--sd-text);
  background: #050d1c;
}

html.sd-page-root .sd-owner-grid textarea,
html.sd-page-root .sd-admin-form textarea {
  min-height: 96px;
  resize: vertical;
}

.sd-admin-tabs {
  display: flex;
  gap: .45rem;
  margin-bottom: 1rem;
  padding: .35rem;
  overflow-x: auto;
  border: 1px solid var(--sd-line);
  border-radius: 13px;
  background: rgba(1, 7, 17, .48);
  scrollbar-width: thin;
}

.sd-admin-tab {
  flex: 1 0 max-content;
  min-height: 40px;
  padding: .55rem .75rem;
  color: var(--sd-text-soft);
  font: inherit;
  font-size: .75rem;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.sd-admin-tab[aria-selected="true"] {
  color: #001018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--sd-cyan), #73efff);
}

.sd-admin-section {
  display: none;
}

.sd-admin-section.is-active {
  display: block;
}

.sd-admin-form fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .7rem;
  padding: 0;
  margin: 0 0 1rem;
  border: 0;
}

.sd-admin-form legend {
  grid-column: 1 / -1;
  margin-bottom: .7rem;
  color: #fff;
  font-weight: 900;
}

.sd-admin-form label,
.sd-field label {
  display: block;
  margin-bottom: .3rem;
  color: var(--sd-text-soft);
  font-size: .76rem;
  font-weight: 800;
}

.sd-field,
.sd-field-wide {
  min-width: 0;
}

.sd-field-wide {
  grid-column: 1 / -1;
}

.sd-admin-form {
  display: grid;
  gap: .7rem;
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}

.sd-admin-list {
  display: grid;
  gap: .7rem;
}

.sd-admin-list article {
  padding: .85rem;
  border: 1px solid rgba(157, 218, 246, .11);
  border-radius: 13px;
  background: rgba(2, 10, 23, .42);
}

.sd-admin-list article header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.sd-admin-actions,
.owner-request-actions,
.sd-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .7rem;
}

.sd-admin-actions button,
.owner-request-actions button {
  min-height: 38px;
  padding: .5rem .7rem;
  color: var(--sd-text);
  font: inherit;
  font-size: .74rem;
  font-weight: 800;
  border: 1px solid var(--sd-line);
  border-radius: 9px;
  background: rgba(8, 24, 44, .7);
  cursor: pointer;
}

.sd-admin-actions button.is-danger {
  color: #ffd3dc;
  border-color: rgba(255, 107, 130, .28);
  background: rgba(255, 107, 130, .10);
}

.sd-check {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.sd-check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.sd-server-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.sd-server-status > div {
  padding: .7rem;
  border: 1px solid rgba(157, 218, 246, .10);
  border-radius: 11px;
  background: rgba(2, 10, 23, .38);
}

.sd-server-status dt {
  color: var(--sd-muted);
  font-size: .68rem;
  text-transform: uppercase;
}

.sd-server-status dd {
  margin: .18rem 0 0;
  color: #fff;
  font-size: .83rem;
  font-weight: 900;
}

.sd-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .72rem;
  border: 1px solid var(--sd-line);
  border-radius: 12px;
  background: rgba(2, 10, 23, .42);
}

.sd-danger-zone {
  margin-top: 1rem;
  padding: .9rem;
  border: 1px solid rgba(255, 107, 130, .24);
  border-radius: 13px;
  background: rgba(255, 107, 130, .065);
}

.sd-danger-zone h4 {
  margin: 0 0 .45rem;
  color: #ffc4cf;
}

.sd-audit-list {
  display: grid;
}

.sd-audit-list > div {
  display: grid;
  grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr) auto;
  gap: .7rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(157, 218, 246, .10);
}

.sd-audit-list b {
  color: #fff;
  font-size: .78rem;
}

.sd-audit-list span {
  color: var(--sd-text-soft);
  font-size: .76rem;
}

.sd-audit-list small {
  color: var(--sd-muted);
  font-size: .68rem;
}

.is-compact {
  padding: .65rem;
}

/* ---------------------------------------------------------------------
   Progressive reveal
   --------------------------------------------------------------------- */

.sd-js [data-sd-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 440ms ease, transform 440ms ease;
}

.sd-js [data-sd-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .sd-server-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-detail-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(270px, .8fr);
  }

  .sd-detail-hero-content {
    grid-template-columns: 1fr;
  }

  .sd-detail-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 900px) {
  html.sd-page-root {
    --sd-anchor-offset: calc(var(--sd-header-height) + 1.4rem);
    --sd-nav-shield-height: calc(var(--sd-header-height) + .85rem);
    --sd-page-top-offset: calc(var(--sd-header-height) + 1.65rem);
  }

  .sd-shell {
    width: min(calc(100% - 1.25rem), var(--sd-max-width));
    padding-top: var(--sd-page-top-offset);
  }

  .sd-catalogue-hero {
    grid-template-columns: 1fr 210px;
  }

  .sd-hero-mascot {
    min-height: 210px;
  }

  .sd-discovery-bar {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  }

  .sd-discovery-submit {
    grid-column: 1 / -1;
  }

  .sd-discovery-lower {
    align-items: flex-start;
    flex-direction: column;
  }

  .sd-result-line {
    justify-content: flex-start;
  }

  .sd-server-grid,
  .sd-server-grid[data-server-count="2"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-server-grid[data-server-count="1"] .sd-card-body {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .sd-server-grid[data-server-count="1"] .sd-card-footer {
    grid-column: 1 / -1;
  }

  .sd-server-grid[data-server-count="1"] .sd-card-avatar-wrap {
    width: 96px;
    height: 96px;
  }

  .sd-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-detail-sidebar {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
}

@media (max-width: 680px) {
  .sd-shell {
    width: min(calc(100% - 1rem), var(--sd-max-width));
    padding-bottom: 3rem;
  }

  .sd-catalogue-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 1.05rem;
  }

  .sd-hero-copy h1 {
    max-width: calc(100% - 64px);
    font-size: clamp(2.375rem, 11.2vw, 2.75rem);
    overflow-wrap: normal;
    word-break: normal;
  }

  .sd-hero-mascot {
    position: absolute;
    z-index: 2;
    top: .45rem;
    right: .35rem;
    display: grid;
    width: 118px;
    min-height: 118px;
    opacity: .72;
    pointer-events: none;
  }

  .sd-hero-mascot img {
    width: 112px;
    filter:
      drop-shadow(0 16px 22px rgba(0, 0, 0, .42))
      drop-shadow(0 0 22px rgba(32, 228, 255, .20));
  }

  .sd-mascot-halo {
    width: 112px;
    height: 112px;
  }

  .sd-hero-copy {
    padding-right: 0;
  }

  .sd-hero-meta > div {
    min-width: calc(50% - .4rem);
  }

  .sd-discovery-bar {
    grid-template-columns: 1fr;
  }

  .sd-discovery-submit {
    grid-column: auto;
    width: 100%;
  }

  .sd-searchbox kbd {
    display: none;
  }

  .sd-server-card,
  .sd-server-grid[data-server-count="1"] .sd-server-card {
    min-height: 0;
    height: auto;
  }

  .sd-card-body,
  .sd-server-grid[data-server-count="1"] .sd-card-body {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    min-height: 318px;
    padding: 1rem;
  }

  .sd-server-grid[data-server-count="1"] .sd-card-avatar-wrap,
  .sd-card-avatar-wrap {
    width: 88px;
    height: 88px;
    margin: 0 0 .8rem;
  }

  .sd-card-title-row {
    display: grid;
    justify-items: start;
    gap: .48rem;
  }

  .sd-card-main h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(1.9rem, 8.2vw, 2rem);
    line-height: 1.04;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .sd-server-grid[data-server-count="1"] .sd-card-main h2 {
    font-size: clamp(1.9rem, 8.2vw, 2rem);
  }

  .sd-card-main > p {
    -webkit-line-clamp: 3;
  }

  .sd-card-footer,
  .sd-server-grid[data-server-count="1"] .sd-card-footer {
    grid-column: 1 / -1;
    align-self: stretch;
    width: 100%;
    margin-top: .9rem;
  }

  .sd-card-footer .sd-primary-button,
  .sd-server-grid[data-server-count="1"] .sd-card-footer .sd-primary-button {
    width: 100%;
  }

  .sd-detail-hero {
    min-height: 448px;
  }

  .sd-detail-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
  }

  .sd-detail-hero-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .sd-detail-avatar-wrap {
    width: 90px;
    height: 90px;
  }

  .sd-detail-avatar {
    border-radius: 24px;
  }

  .sd-detail-copy h1 {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(1.75rem, 9.2vw, 2.2rem);
    line-height: 1.02;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .sd-detail-actions {
    width: 100%;
  }

  .sd-detail-actions > * {
    flex: 1 1 100%;
  }

  .sd-detail-sidebar {
    position: static;
  }

  .sd-about-facts {
    grid-template-columns: 1fr;
  }

  .sd-comment-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .sd-comment-submit {
    width: 100%;
  }

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

  .sd-owner-grid,
  .sd-server-status {
    grid-template-columns: 1fr;
  }

  .sd-admin-form fieldset {
    grid-template-columns: 1fr;
  }

  .sd-admin-form legend,
  .sd-field-wide {
    grid-column: auto;
  }

  .sd-admin-tabs {
    overflow-x: auto;
    padding-right: 2.2rem;
    scroll-padding-inline: .35rem 2.2rem;
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 58px), rgba(0, 0, 0, .62) calc(100% - 24px), transparent 100%);
    scroll-snap-type: x proximity;
    box-shadow: inset -30px 0 28px -28px rgba(32, 228, 255, .82);
  }

  .sd-admin-tab {
    min-height: 44px;
    scroll-margin-inline: .35rem;
    scroll-snap-align: start;
  }

  .sd-service-zone-head {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
    padding: .1rem .1rem .45rem;
  }

  .sd-admin-panel > .sd-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
    margin-bottom: .75rem;
  }

  .sd-admin-panel > .sd-section-head h2 {
    display: -webkit-box;
    overflow: hidden;
    max-width: 20ch;
    font-size: clamp(1.2rem, 6vw, 1.4rem);
    line-height: 1.1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .sd-admin-indicator {
    justify-self: start;
  }

  .sd-audit-list > div {
    grid-template-columns: 1fr;
  }

  .sd-catalogue-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-shell *,
  .sd-shell *::before,
  .sd-shell *::after {
    scroll-behavior: auto;
    animation-duration: .001ms;
    animation-iteration-count: 1;
    transition-duration: .001ms;
  }

  .sd-js [data-sd-reveal] {
    opacity: 1;
    transform: none;
  }
}
