*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --chrome-h: 75px;
  --bg-blur: 12.5px;
  --footer-text: #5ec4c0;
  --footer-heading: #ffffff;
  --footer-line: rgba(94, 196, 192, 0.35);
  --text-bg: rgba(8, 14, 14, 0.42);
  --font: "Manrope", sans-serif;
}

html {
  background: #0a0a0a;
  min-height: 100%;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  font-family: var(--font);
  color: var(--footer-text);
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg__image {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  object-position: center;
  z-index: 0;
  filter: blur(var(--bg-blur));
}

.page {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
}

.page--home {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100dvh - var(--chrome-h));
  padding-top: var(--chrome-h);
}

.home-thirds {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  flex: 1 0 auto;
  width: min(45%, 34rem);
  margin: 0 auto;
  min-height: calc(100dvh - var(--chrome-h));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--text-bg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
}

.home-thirds__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: clamp(1.5rem, 4vh, 2.5rem) clamp(1.25rem, 5vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-thirds__panel:last-child {
  border-bottom: none;
}

.home-thirds__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(94, 196, 192, 0.7);
}

.home-thirds__title {
  color: #ffffff;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.home-thirds__copy {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--footer-text);
  max-width: 36rem;
}

.home-thirds__link {
  margin-top: 0.35rem;
  align-self: center;
  color: #9ee8e4;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.home-thirds__status {
  margin-top: 0.35rem;
  color: #9ee8e4;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.home-thirds__status[data-state="Active"] {
  color: #7dffb0;
}

.home-thirds__status[data-state="ended"] {
  color: #ff8f8f;
}

.home-thirds__status[data-state="NULL"] {
  color: rgba(158, 232, 228, 0.75);
}

.home-thirds__link:hover {
  color: #ffffff;
}

.home-thirds__link:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: 3px;
  border-radius: 4px;
}

.page--resources {
  display: flex;
  flex-direction: column;
  padding: calc(var(--chrome-h) + 1rem) clamp(0.85rem, 3vw, 1.5rem) 1rem;
}

.page--simple {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--chrome-h) + 2rem) clamp(1rem, 4vw, 2rem) 2rem;
}

.simple-panel {
  width: min(100%, 40rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.simple-panel__title {
  color: #ffffff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
}

.simple-panel__copy {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--footer-text);
  max-width: 34rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--chrome-h);
  min-height: var(--chrome-h);
  max-height: var(--chrome-h);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(10, 10, 10, 0.55);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
  transition: top 0.25s ease;
}

.site-header.is-hidden {
  top: calc(-1 * var(--chrome-h));
}

.site-header__account {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
}

.site-header__brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.site-header__link {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.site-header__link:hover,
.site-header__link.is-active {
  color: #9ee8e4;
}

.site-header__link:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header__profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  color: #c8d0d4;
  cursor: pointer;
}

.site-header__profile.is-active .site-header__avatar,
.site-header__account.is-open .site-header__avatar {
  border-color: rgba(158, 232, 228, 0.85);
  background: rgba(94, 196, 192, 0.28);
}

.site-header__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 196, 192, 0.16);
  border: 1px solid rgba(94, 196, 192, 0.45);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.site-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-header__profile:hover .site-header__avatar {
  color: #9ee8e4;
  border-color: rgba(158, 232, 228, 0.75);
  background: rgba(94, 196, 192, 0.28);
}

.site-header__profile:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: 3px;
  border-radius: 50%;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  padding: 3rem 1.5rem 1.5rem;
  background: rgba(8, 10, 12, 0.72);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem 2rem;
}

.site-footer__brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.site-footer__logo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.site-footer__name {
  color: var(--footer-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.site-footer__tagline {
  max-width: 16.5rem;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--footer-text);
}

.site-footer__heading {
  color: var(--footer-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.site-footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.site-footer__links a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.site-footer__links a:hover {
  color: #9ee8e4;
}

.site-footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--footer-line);
  font-size: 0.86rem;
  color: var(--footer-text);
}

@media (max-width: 860px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .site-footer__bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 196, 192, 0.45);
  border-radius: 999px;
  background: rgba(8, 10, 12, 0.78);
  color: var(--footer-text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  color: #9ee8e4;
  border-color: rgba(158, 232, 228, 0.7);
  background: rgba(8, 10, 12, 0.92);
}

.back-to-top:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: 2px;
}

.rules {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
}

.rules-section {
  background: rgba(8, 10, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: clamp(0.9rem, 2.5vw, 1.25rem) clamp(0.85rem, 2.5vw, 1.2rem);
  transition: padding-bottom 0.3s ease;
}

.rules-section__body {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.35s ease,
    opacity 0.35s ease;
}

.rules-section__body > .rules__list {
  min-height: 0;
  overflow: hidden;
}

.rules-section:not(.is-collapsed) .rules-section__body > .rules__list {
  overflow: visible;
}

.rules-section.is-collapsed .rules-section__body {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.rules-section.is-collapsed {
  padding-bottom: clamp(0.9rem, 2.5vw, 1.25rem);
}

.rules__title {
  color: #ffffff;
  font-size: clamp(1.2rem, 3.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: 0.9rem;
  transition: margin-bottom 0.3s ease;
}

.rules-section__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: center;
  cursor: pointer;
}

.rules-section__toggle::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--footer-text);
  border-bottom: 2px solid var(--footer-text);
  transform: rotate(45deg);
  transition: transform 0.3s ease, margin-top 0.3s ease;
  margin-top: -0.15rem;
}

.rules-section.is-collapsed .rules-section__toggle::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.rules-section__toggle:hover {
  color: #9ee8e4;
}

.rules-section__toggle:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: 4px;
  border-radius: 6px;
}

.rules-section.is-collapsed .rules__title {
  margin-bottom: 0;
}

.rules__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rules__empty {
  text-align: center;
  color: var(--footer-text);
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.rule {
  background: rgba(8, 10, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.rule__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  color: #ffffff;
  font-size: clamp(0.88rem, 2.4vw, 0.96rem);
  font-weight: 600;
  line-height: 1.35;
  user-select: none;
}

.rule__summary::-webkit-details-marker {
  display: none;
}

.rule__summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  border-right: 2px solid var(--footer-text);
  border-bottom: 2px solid var(--footer-text);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.rule[open] .rule__summary::after {
  transform: rotate(225deg);
  margin-top: 0.25rem;
}

.rule__summary:hover {
  background: rgba(94, 196, 192, 0.08);
}

.rule__summary:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: -2px;
}

.rule__body {
  padding: 0.9rem 0.9rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--footer-text);
  font-size: clamp(0.86rem, 2.3vw, 0.94rem);
  line-height: 1.55;
}

.rule__body p + p,
.rule__body p + ul,
.rule__body ul + p {
  margin-top: 0.75rem;
}

.rule__body ul {
  margin: 0.55rem 0 0 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rule__body strong {
  color: #d7f3f1;
  font-weight: 700;
}

.rule__subtitle {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.85rem 0 0.35rem;
}

.rule__body > .rule__subtitle:first-child {
  margin-top: 0;
}

.rule__body a {
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.rule__body a:hover {
  color: inherit;
}

body:has(.page--dashboard) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.page--dashboard {
  display: flex;
  padding-top: var(--chrome-h);
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
}

.dashboard {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.dash-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(260px, calc(100vw - 1.5rem));
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(12, 18, 28, 0.98) 0%,
    rgba(8, 12, 20, 0.98) 100%
  );
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  z-index: 6;
}

.site-header__account.is-open .dash-menu {
  display: flex;
}

.dash-menu__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-menu__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.1rem 0.45rem;
  color: rgba(200, 214, 220, 0.72);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(232, 240, 244, 0.88);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.dash-nav:hover {
  background: rgba(94, 196, 192, 0.08);
  color: #ffffff;
}

.dash-nav.is-active {
  background: rgba(94, 196, 192, 0.14);
  border-color: rgba(94, 196, 192, 0.45);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #5ec4c0;
}

.dash-nav:focus-visible {
  outline: 2px solid #9ee8e4;
  outline-offset: 2px;
}

.dash-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  color: rgba(158, 232, 228, 0.9);
}

.dash-nav.is-active .dash-nav__icon {
  color: #5ec4c0;
}

.dash-nav__label {
  min-width: 0;
}

.dash-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 1.5rem 2rem;
  overflow-y: auto;
  background: rgba(6, 8, 12, 0.35);
}

.dash-main__title {
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.dash-main__lead {
  color: #9ee8e4;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.dash-main__copy {
  color: rgba(200, 214, 220, 0.88);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 42rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
  max-width: 42rem;
}

.ticket-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.55);
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.ticket-card:hover {
  background: rgba(94, 196, 192, 0.1);
  border-color: rgba(94, 196, 192, 0.4);
}

.ticket-card.is-closed {
  border-color: rgba(220, 120, 120, 0.45);
}

.ticket-card.is-closed:hover {
  background: rgba(220, 120, 120, 0.08);
  border-color: rgba(220, 140, 140, 0.65);
}

.ticket-card__title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.ticket-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  color: rgba(200, 214, 220, 0.8);
  font-size: 0.86rem;
}

.ticket-card__status {
  text-transform: capitalize;
  color: #9ee8e4;
  font-weight: 600;
}

.ticket-card.is-closed .ticket-card__status {
  color: #efb4b4;
}

.ticket-detail {
  margin-top: 1rem;
  max-width: 48rem;
}

.ticket-detail__back {
  margin-bottom: 0.85rem;
  padding: 0;
  border: 0;
  background: none;
  color: #9ee8e4;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ticket-detail__back:hover {
  color: #c8f4f1;
}

.ticket-detail__title {
  margin: 0 0 0.35rem;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
}

.ticket-detail__meta {
  margin: 0 0 1rem;
  color: rgba(200, 214, 220, 0.8);
  font-size: 0.9rem;
}

.ticket-transcript {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(70vh, 40rem);
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.55);
}

.ticket-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.65rem;
}

.ticket-msg__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(94, 196, 192, 0.2);
  object-fit: cover;
}

.ticket-msg__author {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
}

.ticket-msg__time {
  margin-left: 0.5rem;
  color: rgba(200, 214, 220, 0.55);
  font-size: 0.78rem;
  font-weight: 400;
}

.ticket-msg__content {
  margin-top: 0.15rem;
  color: rgba(220, 230, 236, 0.92);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-msg__attachments {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ticket-msg__attachments a {
  color: #9ee8e4;
  font-size: 0.85rem;
}
