:root {
  color-scheme: dark;
  --bg: #161826;
  --surface: #202231;
  --surface-strong: #272936;
  --text: #e9e9ed;
  --muted: #a8a8b7;
  --line: rgba(233, 233, 237, 0.11);
  --orange: #f47a2c;
  --orange-light: #ffa366;
  --purple: #9690c9;
  --max: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(244, 122, 44, 0.09), transparent 26rem),
    radial-gradient(circle at 88% 32%, rgba(150, 144, 201, 0.09), transparent 28rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.72 Inter, ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 48px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: var(--orange-light);
  text-decoration-color: color-mix(in srgb, var(--orange) 48%, transparent);
  text-underline-offset: 4px;
}

a:hover {
  color: #ffc59f;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

header,
main,
footer {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

header {
  position: sticky;
  z-index: 10;
  top: 12px;
  width: min(calc(100% - 32px), 1240px);
  min-height: 72px;
  margin-top: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 16px 45px rgba(4, 5, 12, 0.34), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

header br {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: url("/logo.png") center / contain no-repeat;
  filter: drop-shadow(0 6px 9px rgba(255, 77, 19, 0.14));
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  background: rgba(8, 9, 17, 0.25);
}

.back:hover {
  border-color: rgba(244, 122, 44, 0.35);
  color: var(--text);
}

main {
  position: relative;
  margin-top: clamp(44px, 7vw, 88px);
  margin-bottom: 72px;
  padding: clamp(34px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(39, 41, 54, 0.88), rgba(25, 27, 42, 0.95));
  box-shadow: 0 28px 80px rgba(4, 5, 12, 0.28), inset 0 1px rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

main::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(34px, 5vw, 60px);
  width: 88px;
  height: 4px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, var(--orange), var(--purple));
}

h1,
h2,
h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
}

h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: clamp(2.45rem, 7vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
}

h2 {
  margin: 48px 0 12px;
  padding-top: 3px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h3 {
  margin: 28px 0 8px;
  font-size: 1.08rem;
}

p,
li,
td {
  color: var(--muted);
}

p {
  margin: 0 0 16px;
}

strong,
th {
  color: var(--text);
}

.meta {
  display: inline-flex;
  margin: 4px 0 32px;
  padding: 6px 11px;
  border: 1px solid rgba(150, 144, 201, 0.28);
  border-radius: 999px;
  color: #d2cefd;
  background: rgba(150, 144, 201, 0.11);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.notice {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

ul {
  padding-left: 22px;
}

li + li {
  margin-top: 8px;
}

li::marker {
  color: var(--orange);
}

table {
  width: 100%;
  margin: 24px 0 32px;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 9, 17, 0.2);
}

thead {
  background: rgba(150, 144, 201, 0.1);
}

th,
td {
  min-width: 140px;
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.policy-nav a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  background: rgba(8, 9, 17, 0.2);
}

.policy-nav a:hover,
.policy-nav a[aria-current="page"] {
  border-color: rgba(244, 122, 44, 0.35);
  color: var(--text);
}

footer {
  margin-bottom: 42px;
  padding: 26px 6px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer p {
  margin: 0;
}

footer p:nth-child(2) {
  flex-basis: 100%;
}

footer .privacy-settings-link {
  color: var(--orange-light);
  font-weight: 650;
}

footer .privacy-settings-link:hover {
  color: #ffc59f;
}

code {
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

@media (max-width: 620px) {
  header {
    top: 8px;
    width: calc(100% - 20px);
    min-height: 62px;
    margin-top: 8px;
    padding: 7px 9px;
    border-radius: 17px;
  }

  .brand {
    font-size: 18px;
  }

  .brand::before {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .back {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 12px;
  }

  header,
  main,
  footer {
    width: calc(100% - 24px);
  }

  main {
    margin-top: 34px;
    margin-bottom: 48px;
    padding: 34px 22px;
    border-radius: 20px;
  }

  main::before {
    left: 22px;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.4rem);
  }
}
