@font-face {
  font-family: "Exo";
  src: url("../../../Tools/Font/Exo/Exo2-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  color-scheme: dark;
  --legal-bg: #061116;
  --legal-panel: rgba(8, 25, 31, .78);
  --legal-panel-raised: rgba(11, 34, 41, .9);
  --legal-line: rgba(142, 205, 211, .2);
  --legal-line-strong: rgba(116, 224, 232, .48);
  --legal-text: #edf7f7;
  --legal-body: #b7c9cb;
  --legal-muted: #789195;
  --legal-cyan: #5ce9ef;
  --legal-cyan-soft: #bffaff;
  --legal-cut: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  background: var(--legal-bg);
}

body.legal-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--legal-text);
  background:
    linear-gradient(180deg, rgba(2, 11, 15, .68) 0, rgba(3, 14, 19, .82) 35rem, rgba(3, 12, 16, .96) 100%),
    url("../../../Image/Landing/landing-hero-world-tree-1920.webp") center top / cover fixed no-repeat,
    #061116;
  font-family: "Exo", "Palworld UI", system-ui, sans-serif;
}

body.legal-page::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  opacity: .5;
  background:
    linear-gradient(rgba(117, 195, 201, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 195, 201, .03) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, transparent 0 28rem, rgba(0, 6, 9, .3) 58rem);
  background-size: 42px 42px, 42px 42px, auto;
  content: "";
  pointer-events: none;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: .5rem;
  left: .5rem;
  padding: .7rem 1rem;
  color: #031014;
  background: var(--legal-cyan);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.legal-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), 1680px);
  margin: clamp(1.25rem, 3vw, 2.5rem) auto 0;
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.25rem, 3vw, 2.5rem) clamp(5rem, 9vw, 8rem);
  overflow: clip;
  background:
    linear-gradient(135deg, rgba(8, 28, 34, .97), rgba(4, 17, 22, .95) 34rem, rgba(4, 14, 18, .97)),
    rgba(4, 16, 21, .96);
  border: 1px solid rgba(139, 208, 214, .24);
  border-top-color: rgba(103, 231, 238, .48);
  box-shadow: 0 32px 90px rgba(0, 3, 5, .54), inset 0 1px rgba(217, 253, 255, .035);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
}

.legal-section__eyebrow {
  margin: 0 0 .85rem;
  color: #76dbe0;
  font-size: .7rem;
  font-weight: 820;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.wiki-page-head {
  position: relative;
  padding: .45rem 0 0;
  border-bottom: 1px solid rgba(92, 233, 239, .46);
}

.wiki-page-head::before {
  position: absolute;
  right: -2.5rem;
  bottom: 0;
  width: min(34rem, 55vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 233, 239, .78), transparent);
  box-shadow: 0 0 12px rgba(92, 233, 239, .34);
  content: "";
}

.wiki-page-head > nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #668186;
  font-size: .7rem;
}

.wiki-page-head > nav a {
  color: #7ddde2;
  text-decoration: none;
}

.wiki-page-head > nav a:hover,
.wiki-page-head > nav a:focus-visible {
  color: #fff;
}

.wiki-page-head > div {
  margin-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.wiki-page-head p {
  order: 2;
  margin: 0 0 .3rem;
  color: #6f8b8f;
  font-size: .64rem;
  font-weight: 760;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.wiki-page-head h1 {
  margin: 0;
  color: #f0f8f8;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1;
}

.wiki-tabs {
  margin-top: 1.4rem;
  display: flex;
  align-items: stretch;
  gap: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.wiki-tabs::-webkit-scrollbar { display: none; }

.wiki-tabs a {
  position: relative;
  min-width: max-content;
  min-height: 2.5rem;
  padding: 0 .85rem;
  display: inline-flex;
  align-items: center;
  color: #7f999d;
  background: rgba(10, 35, 42, .64);
  border: 1px solid rgba(126, 201, 207, .17);
  border-bottom: 0;
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
  font-size: .66rem;
  font-weight: 720;
  text-decoration: none;
}

.wiki-tabs a:hover,
.wiki-tabs a:focus-visible {
  color: #e9fdff;
  background: rgba(25, 79, 88, .62);
  outline: 0;
}

.wiki-tabs a[aria-current="page"] {
  color: #efffff;
  background: linear-gradient(180deg, rgba(43, 132, 142, .62), rgba(14, 50, 58, .76));
  border-color: rgba(92, 233, 239, .48);
}

.wiki-tabs a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--legal-cyan);
  box-shadow: 0 0 9px rgba(92, 233, 239, .7);
  content: "";
}

.wiki-tabs > span { flex: 1 1 auto; }

.legal-layout {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(12rem, 14.5rem) minmax(0, 1fr) minmax(14rem, 17rem);
  grid-template-areas: "index article info";
  align-items: start;
  gap: clamp(2rem, 4vw, 4rem);
}

.legal-index {
  grid-area: index;
  position: sticky;
  top: calc(var(--app-chrome-header-height, 60px) + 2rem);
  overflow: hidden;
  background: rgba(5, 19, 24, .8);
  border: 1px solid rgba(124, 198, 204, .2);
  border-top-color: rgba(92, 233, 239, .48);
  box-shadow: 0 16px 38px rgba(0, 4, 7, .2);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.legal-index__heading {
  min-height: 2.6rem;
  padding: 0 .85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background:
    linear-gradient(90deg, rgba(22, 102, 112, .64), rgba(10, 50, 58, .74)),
    rgba(9, 40, 47, .9);
  border-bottom: 1px solid rgba(92, 233, 239, .26);
}

.legal-index__heading p {
  margin: 0;
  color: #83dfe4;
  font-size: .65rem;
  font-weight: 820;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.legal-index__heading span {
  color: #607b7f;
  font-size: .62rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}

.legal-index__track {
  height: 1px;
  margin: 0 0 .55rem;
  overflow: hidden;
  background: rgba(138, 199, 204, .17);
}

.legal-index__track span {
  width: 8%;
  height: 100%;
  display: block;
  background: var(--legal-cyan);
  box-shadow: 0 0 8px rgba(92, 233, 239, .7);
  transition: width 220ms ease;
}

.legal-index nav {
  padding: .25rem .55rem .55rem;
  display: grid;
}

.legal-index nav a {
  position: relative;
  min-height: 2.4rem;
  padding: .55rem .5rem .55rem 1rem;
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  align-items: center;
  gap: .35rem;
  color: #789094;
  border-left: 1px solid rgba(138, 199, 204, .17);
  font-size: .76rem;
  line-height: 1.3;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.legal-index nav a span {
  color: #526c70;
  font-size: .58rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.legal-index nav a::before {
  position: absolute;
  top: 50%;
  left: -2px;
  width: 3px;
  height: 0;
  background: var(--legal-cyan);
  box-shadow: 0 0 9px rgba(92, 233, 239, .65);
  content: "";
  transform: translateY(-50%);
  transition: height 150ms ease;
}

.legal-index nav a:hover,
.legal-index nav a:focus-visible {
  color: var(--legal-cyan-soft);
  background: rgba(58, 161, 170, .055);
  outline: 0;
}

.legal-index nav a[aria-current="location"] {
  color: #eefeff;
  background: linear-gradient(90deg, rgba(57, 180, 189, .11), transparent);
  border-left-color: rgba(92, 233, 239, .42);
  font-weight: 700;
}

.legal-index nav a[aria-current="location"]::before { height: 1.25rem; }
.legal-index nav a[aria-current="location"] span { color: var(--legal-cyan); }

.legal-index__back {
  margin: .2rem .85rem 0;
  padding: .8rem 0 .9rem;
  display: flex;
  justify-content: space-between;
  color: #83dfe4;
  border-top: 1px solid var(--legal-line);
  font-size: .72rem;
  font-weight: 740;
  text-decoration: none;
}

.legal-index__back:hover,
.legal-index__back:focus-visible { color: #fff; }

.wiki-infobox {
  grid-area: info;
  position: sticky;
  top: calc(var(--app-chrome-header-height, 60px) + 2rem);
  overflow: hidden;
  background: rgba(7, 23, 29, .88);
  border: 1px solid rgba(127, 202, 208, .24);
  border-top-color: rgba(92, 233, 239, .58);
  box-shadow: 0 18px 44px rgba(0, 4, 7, .24);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.wiki-infobox__cover {
  margin: 0;
  background: #071419;
  border-bottom: 1px solid var(--legal-line);
}

.wiki-infobox__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  filter: saturate(.86) contrast(1.04);
}

.wiki-infobox__cover figcaption {
  padding: .6rem .75rem;
  color: #789397;
  font-size: .62rem;
  line-height: 1.45;
}

.wiki-infobox__body {
  padding: 1rem;
}

.wiki-infobox__body h2 {
  margin: -1rem -1rem .85rem;
  padding: .7rem 1rem;
  color: #e9f7f8;
  background:
    linear-gradient(90deg, rgba(21, 105, 115, .78), rgba(9, 47, 55, .86)),
    #0a333b;
  border-bottom: 1px solid rgba(92, 233, 239, .32);
  font-size: 1rem;
  font-weight: 760;
}

.wiki-infobox__body dl {
  margin: 0;
  border-top: 1px solid var(--legal-line);
}

.wiki-infobox__body dl div {
  padding: .55rem 0;
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: .5rem;
  border-bottom: 1px solid var(--legal-line);
}

.wiki-infobox__body dt {
  color: #678287;
  font-size: .58rem;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wiki-infobox__body dd {
  margin: 0;
  color: #b9cdd0;
  font-size: .68rem;
  line-height: 1.4;
}

.wiki-infobox__pals {
  margin: .9rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .35rem;
}

.wiki-infobox__pals img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  background: linear-gradient(145deg, rgba(24, 60, 68, .72), rgba(7, 23, 29, .92));
  border: 1px solid rgba(120, 195, 201, .18);
}

.wiki-infobox__body > a {
  display: flex;
  justify-content: space-between;
  color: #72e0e5;
  font-size: .68rem;
  font-weight: 760;
  text-decoration: none;
}

.wiki-infobox__body > a:hover,
.wiki-infobox__body > a:focus-visible {
  color: #fff;
}

.legal-content {
  grid-area: article;
  width: min(100%, 62rem);
}

.legal-section {
  position: relative;
  padding: clamp(2rem, 4vw, 3.4rem) 0;
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  border-top: 1px solid var(--legal-line);
}

.legal-section:first-child { border-top: 0; }

.legal-section__number {
  padding-top: .12rem;
  color: #4f7175;
  font-size: .72rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}

.legal-section h2 {
  max-width: none;
  margin: 0 0 1.25rem;
  padding-bottom: .65rem;
  color: #f1f9f9;
  border-bottom: 1px solid rgba(114, 196, 202, .22);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 720;
  letter-spacing: -.025em;
  line-height: 1.14;
  text-wrap: balance;
}

.legal-section h3 {
  margin: 2rem 0 .8rem;
  color: #dceced;
  font-size: .83rem;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-section p,
.legal-section li {
  color: var(--legal-body);
  font-size: clamp(.94rem, 1.2vw, 1.02rem);
  line-height: 1.82;
}

.legal-section p {
  max-width: 73ch;
  margin: 0;
}

.legal-section p + p { margin-top: 1rem; }

.legal-section ul {
  max-width: 72ch;
  margin: .9rem 0 0;
  padding-left: 1.25rem;
}

.legal-section li { padding-left: .35rem; }
.legal-section li + li { margin-top: .45rem; }
.legal-section li::marker { color: var(--legal-cyan); }

.legal-summary {
  margin-bottom: 0;
  padding-top: .25rem;
  background: transparent;
  border-top: 0;
}

.legal-summary h2 {
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.legal-summary__points {
  margin-top: 1.5rem !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--legal-line);
  list-style: none;
}

.legal-summary__points li {
  margin: 0 !important;
  padding: 1.05rem !important;
  background: #081a20;
  font-size: .8rem;
  line-height: 1.55;
}

.legal-summary__points strong {
  display: block;
  color: #dff8fa;
}

.wiki-media-grid {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.wiki-media-grid figure {
  margin: 0;
  overflow: hidden;
  background: rgba(7, 23, 29, .86);
  border: 1px solid rgba(126, 203, 209, .2);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.wiki-media-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  filter: saturate(.9) contrast(1.04);
  transition: filter 160ms ease, transform 200ms ease;
}

.wiki-media-grid figure:hover img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.025);
}

.wiki-media-grid figcaption {
  padding: .55rem .65rem;
  color: #789397;
  font-size: .6rem;
  line-height: 1.4;
}

.legal-note {
  max-width: 72ch;
  margin-top: 1.6rem;
  padding: 1rem 1.15rem;
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: .8rem;
  color: #b8d7d9;
  background: rgba(39, 119, 128, .09);
  border: 1px solid rgba(116, 224, 232, .2);
  border-left: 2px solid rgba(92, 233, 239, .75);
}

.legal-note > span {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  color: #061116;
  background: var(--legal-cyan);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 900;
}

.legal-note p {
  color: #abc7ca;
  font-size: .82rem;
  line-height: 1.65;
}

.legal-note strong { color: #dff8fa; }

.legal-closing {
  margin-top: 1.8rem;
  padding: 1.4rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--legal-line);
}

.legal-closing p {
  color: #d5e7e8;
  font-weight: 650;
}

.legal-closing a {
  min-height: 2.85rem;
  padding: 0 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: #071318;
  background: var(--legal-cyan);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  font-size: .76rem;
  font-weight: 820;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}

.legal-closing a:hover,
.legal-closing a:focus-visible {
  background: #c4fcff;
  outline: 0;
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .legal-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "index"
      "info"
      "article";
    gap: 2.5rem;
  }

  .legal-index {
    position: sticky;
    z-index: 20;
    top: calc(var(--app-chrome-header-height, 60px) + .7rem);
    margin-inline: -.3rem;
    padding: 0;
    overflow: hidden;
    background: rgba(5, 17, 22, .96);
    border: 1px solid rgba(128, 200, 205, .22);
    box-shadow: 0 14px 32px rgba(0, 4, 7, .34);
    backdrop-filter: blur(14px);
    clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%, 0 7px);
  }

  .legal-index nav {
    padding-bottom: .15rem;
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .legal-index nav a {
    min-width: max-content;
    border-top: 1px solid rgba(138, 199, 204, .17);
    border-left: 0;
  }

  .legal-index nav a::before {
    top: auto;
    right: .75rem;
    bottom: -1px;
    left: .75rem;
    width: auto;
    height: 2px;
    transform: scaleX(0);
  }

  .legal-index nav a[aria-current="location"]::before {
    height: 2px;
    transform: scaleX(1);
  }

  .legal-index__back { display: none; }
  .legal-content { width: 100%; }

  .wiki-infobox {
    position: static;
    display: grid;
    grid-template-columns: minmax(14rem, .85fr) minmax(0, 1.15fr);
  }

  .wiki-infobox__cover {
    border-right: 1px solid var(--legal-line);
    border-bottom: 0;
  }

  .wiki-infobox__cover img {
    height: 100%;
    min-height: 13rem;
  }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 8.6rem; }

  .legal-shell {
    width: min(calc(100% - 1rem), 1440px);
    padding-top: 3.5rem;
  }

  .wiki-page-head > div {
    align-items: start;
    flex-direction: column;
    gap: .4rem;
  }

  .wiki-page-head p {
    order: 0;
    margin: 0;
  }

  .legal-index { top: calc(var(--app-chrome-header-height, 54px) + .45rem); }

  .wiki-infobox {
    display: block;
  }

  .wiki-infobox__cover {
    border-right: 0;
    border-bottom: 1px solid var(--legal-line);
  }

  .wiki-infobox__cover img {
    height: auto;
    min-height: 0;
  }

  .legal-section,
  .legal-summary { grid-template-columns: 1fr; }

  .legal-section {
    padding-block: 2.5rem;
  }

  .legal-section__number {
    width: max-content;
    padding-bottom: .35rem;
    border-bottom: 1px solid rgba(92, 233, 239, .4);
  }

  .legal-summary { padding: 1.5rem 1.2rem; }
  .legal-summary__points { grid-template-columns: 1fr; }
  .wiki-media-grid { grid-template-columns: 1fr; }

  .legal-closing {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-closing a { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .legal-index__track span,
  .legal-index nav a,
  .legal-index nav a::before,
  .legal-closing a {
    transition: none;
  }
}
