/* ============================================================
   K5 CN · Arena Console — shared site stylesheet
   /assets/site.css
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol, hr, fieldset { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg, video, canvas { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid #22D3EE;
  outline-offset: 3px;
}

/* ---------- tokens ---------- */
:root {
  --k5-black: #06070B;
  --k5-panel: #11131C;
  --k5-violet-deep: #1B1030;
  --k5-text: #C9CEDB;
  --k5-white: #F7F8FC;
  --k5-violet: #8B5CF6;
  --k5-cyan: #22D3EE;
  --k5-orange: #FF7A1A;
  --k5-lime: #B6FF3B;
  --k5-paper: #F2F3F7;
  --k5-ink: #1A1C24;
  --k5-line: #2A2E3A;
  --k5-line-soft: rgba(255, 255, 255, 0.075);

  --k5-font-display: 'Source Han Sans SC', 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --k5-font-serif: 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --k5-font-body: 'Inter', 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --k5-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;

  --k5-w: 1280px;
  --k5-pad: clamp(18px, 4vw, 48px);
  --k5-r-sm: 10px;
  --k5-r: 16px;
  --k5-r-lg: 24px;
  --k5-header-h: clamp(88px, 10vw, 110px);
  --k5-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  color: var(--k5-text);
  background-color: var(--k5-black);
  background-image:
    radial-gradient(1100px 620px at 82% -8%, rgba(139, 92, 246, 0.17), transparent 62%),
    radial-gradient(880px 520px at 2% 6%, rgba(34, 211, 238, 0.10), transparent 60%);
  background-repeat: no-repeat;
  font-family: var(--k5-font-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #FFFFFF;
}

/* ---------- layout containers ---------- */
.k5-container {
  width: 100%;
  max-width: var(--k5-w);
  margin-inline: auto;
  padding-inline: var(--k5-pad);
}

.k5-main {
  display: block;
  padding-top: var(--k5-header-h);
}

.k5-section {
  padding-block: clamp(44px, 6.5vw, 92px);
}

.k5-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 36px;
  margin-bottom: clamp(22px, 3vw, 40px);
}

.k5-h2 {
  font-family: var(--k5-font-serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: var(--k5-white);
}

.k5-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--k5-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--k5-cyan);
}

.k5-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, var(--k5-violet), var(--k5-cyan));
}

.k5-lede {
  max-width: 64ch;
  color: rgba(201, 206, 219, 0.78);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.78;
}

.k5-hr {
  height: 1px;
  border: 0;
  background: var(--k5-line);
  margin-block: clamp(24px, 3vw, 42px);
}

/* ---------- buttons ---------- */
.k5-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--k5-font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--k5-ease), background-color 0.2s var(--k5-ease),
    border-color 0.2s var(--k5-ease), color 0.2s var(--k5-ease), filter 0.2s var(--k5-ease);
}

.k5-btn--primary {
  color: #05121A;
  background: linear-gradient(100deg, var(--k5-cyan) 0%, #7FE9F7 42%, var(--k5-violet) 100%);
  box-shadow: 0 12px 34px -18px rgba(34, 211, 238, 0.95);
}

.k5-btn--primary:hover {
  filter: brightness(1.09);
  transform: translateY(-1px);
}

.k5-btn--ghost {
  color: var(--k5-white);
  border-color: var(--k5-line);
  background: rgba(255, 255, 255, 0.03);
}

.k5-btn--ghost:hover {
  border-color: rgba(139, 92, 246, 0.75);
  background: rgba(139, 92, 246, 0.16);
}

.k5-btn--orange {
  color: #120A03;
  background: var(--k5-orange);
  box-shadow: 0 12px 32px -18px rgba(255, 122, 26, 0.9);
}

.k5-btn--orange:hover {
  filter: brightness(1.07);
}

.k5-btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ---------- inline link ---------- */
.k5-link {
  position: relative;
  color: var(--k5-cyan);
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--k5-cyan), var(--k5-violet));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.24s var(--k5-ease), color 0.2s var(--k5-ease);
}

.k5-link:hover {
  background-size: 100% 1px;
  color: var(--k5-white);
}

/* ---------- skip link ---------- */
.k5-skip {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 12px 12px;
  background: var(--k5-cyan);
  color: #05121A;
  font-family: var(--k5-font-display);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s var(--k5-ease);
}

.k5-skip:focus,
.k5-skip:focus-visible {
  top: 0;
  outline-offset: -3px;
}

/* ============================================================
   HEADER
   ============================================================ */
.k5-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  isolation: isolate;
  color: var(--k5-white);
  background-color: transparent;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  transition: background-color 0.24s var(--k5-ease), box-shadow 0.24s var(--k5-ease);
}

.k5-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 7, 11, 0.94) 0%,
    rgba(6, 7, 11, 0.66) 58%,
    rgba(6, 7, 11, 0) 100%
  );
  opacity: 1;
  transition: opacity 0.24s var(--k5-ease);
}

.k5-header[data-scrolled] {
  background-color: rgba(9, 11, 18, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 1px 0 var(--k5-line), 0 24px 54px -40px rgba(0, 0, 0, 0.95);
}

.k5-header[data-scrolled]::before {
  opacity: 0;
}

.k5-rail {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(42%, 460px);
  height: 1px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--k5-violet) 42%,
    var(--k5-cyan) 74%,
    transparent 100%
  );
  animation: k5-rail-run 11s linear infinite;
}

@keyframes k5-rail-run {
  0%   { transform: translate3d(-110%, 0, 0); }
  100% { transform: translate3d(340%, 0, 0); }
}

/* ---------- topbar ---------- */
.k5-topbar {
  border-bottom: 1px solid var(--k5-line-soft);
}

.k5-topbar__inner {
  max-width: var(--k5-w);
  margin-inline: auto;
  padding-inline: var(--k5-pad);
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--k5-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 206, 219, 0.62);
}

.k5-topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.k5-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--k5-lime);
  box-shadow: 0 0 0 3px rgba(182, 255, 59, 0.14);
}

.k5-quick {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.k5-quick__link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--k5-ease), background-color 0.2s var(--k5-ease);
}

.k5-quick__link:hover {
  color: var(--k5-white);
  background: rgba(139, 92, 246, 0.18);
}

/* ---------- navbar ---------- */
.k5-navbar__inner {
  max-width: var(--k5-w);
  margin-inline: auto;
  padding-inline: var(--k5-pad);
  min-height: clamp(58px, 6vw, 76px);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}

/* brand */
.k5-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--k5-white);
  text-decoration: none;
  transition: opacity 0.2s var(--k5-ease);
}

.k5-brand:hover { opacity: 0.85; }

.k5-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  font-family: var(--k5-font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.04em;
  color: #05121A;
  background: linear-gradient(135deg, var(--k5-cyan) 0%, var(--k5-violet) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 10px 26px -12px rgba(34, 211, 238, 0.85);
}

.k5-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.k5-brand__name {
  font-family: var(--k5-font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--k5-white);
}

.k5-brand__sub {
  margin-top: 3px;
  font-family: var(--k5-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(201, 206, 219, 0.5);
  white-space: nowrap;
}

/* nav toggle */
.k5-nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--k5-line);
  border-radius: 999px;
  background: rgba(17, 19, 28, 0.72);
  color: var(--k5-white);
  font-family: var(--k5-font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s var(--k5-ease), background-color 0.2s var(--k5-ease);
}

.k5-nav-toggle:hover {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.12);
}

.k5-nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 14px;
}

.k5-nav-toggle__bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 2px;
  background: var(--k5-cyan);
  transition: transform 0.2s var(--k5-ease), opacity 0.2s var(--k5-ease);
}

.k5-nav-toggle[aria-expanded="true"] .k5-nav-toggle__bars span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}
.k5-nav-toggle[aria-expanded="true"] .k5-nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.k5-nav-toggle[aria-expanded="true"] .k5-nav-toggle__bars span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* nav */
.k5-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 22px);
}

.k5-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1px, 0.7vw, 8px);
}

.k5-nav__link {
  position: relative;
  display: inline-block;
  padding: 9px 11px;
  border-radius: 9px;
  font-family: var(--k5-font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: rgba(201, 206, 219, 0.78);
  text-decoration: none;
  transition: color 0.2s var(--k5-ease), background-color 0.2s var(--k5-ease),
    box-shadow 0.2s var(--k5-ease);
}

.k5-nav__link::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--k5-cyan);
  transition: transform 0.24s var(--k5-ease);
}

.k5-nav__link:hover {
  color: var(--k5-white);
  background: rgba(139, 92, 246, 0.15);
}

.k5-nav__link:hover::after,
.k5-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.k5-nav__link[aria-current="page"] {
  color: var(--k5-white);
  background: rgba(139, 92, 246, 0.2);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.55);
}

.k5-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--k5-violet), var(--k5-cyan));
}

.k5-nav__cta {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: 13px;
}

/* ---------- mobile navigation ---------- */
@media (max-width: 1079px) {
  .k5-navbar__inner {
    flex-wrap: wrap;
    row-gap: 0;
    padding-bottom: 0;
  }

  .k5-brand { order: 1; }
  .k5-nav-toggle { order: 2; display: inline-flex; }

  .k5-nav {
    order: 3;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-left: 0;
    margin-inline: calc(var(--k5-pad) * -1);
    padding-inline: var(--k5-pad);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--k5-ease), opacity 0.2s var(--k5-ease),
      padding 0.3s var(--k5-ease);
  }

  .k5-nav[data-open] {
    max-height: calc(100vh - var(--k5-header-h) - 12px);
    opacity: 1;
    overflow-y: auto;
    padding-block: 12px 22px;
    border-top: 1px solid var(--k5-line);
    background: linear-gradient(180deg, rgba(17, 19, 28, 0.99) 0%, rgba(27, 16, 48, 0.99) 100%);
    box-shadow: 0 30px 64px -32px rgba(0, 0, 0, 0.96);
  }

  .k5-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .k5-nav__link {
    display: block;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 16px;
  }

  .k5-nav__link::after { display: none; }

  .k5-nav__link[aria-current="page"] {
    border-color: rgba(139, 92, 246, 0.5);
  }

  .k5-nav__cta {
    margin-top: 12px;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .k5-topbar__status { display: none; }
  .k5-topbar__inner { justify-content: center; min-height: 32px; }
  .k5-quick { justify-content: center; gap: 2px; }
  .k5-quick__link { padding: 5px 9px; font-size: 10px; letter-spacing: 0.1em; }
  .k5-brand__name { font-size: 15px; }
  .k5-brand__sub { font-size: 9px; letter-spacing: 0.14em; }
  .k5-brand__mark { width: 36px; height: 36px; font-size: 13px; }
}

@media (max-width: 380px) {
  .k5-brand__sub { display: none; }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.k5-breadcrumb {
  padding-block: clamp(14px, 2vw, 22px);
}

.k5-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--k5-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(201, 206, 219, 0.55);
}

.k5-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.k5-breadcrumb__item + .k5-breadcrumb__item::before {
  content: "/";
  color: var(--k5-line);
}

.k5-breadcrumb__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--k5-ease);
}

.k5-breadcrumb__link:hover { color: var(--k5-cyan); }

.k5-breadcrumb__current { color: var(--k5-white); }

/* ============================================================
   GRID / CARDS / MEDIA / BADGES / STATS
   ============================================================ */
.k5-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

@media (max-width: 900px) {
  .k5-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .k5-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.k5-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid var(--k5-line);
  border-radius: var(--k5-r);
  background: linear-gradient(160deg, rgba(17, 19, 28, 0.96) 0%, rgba(17, 19, 28, 0.7) 100%);
  transition: border-color 0.2s var(--k5-ease), box-shadow 0.2s var(--k5-ease),
    transform 0.2s var(--k5-ease);
}

.k5-card:hover {
  border-color: rgba(139, 92, 246, 0.62);
  box-shadow: 0 26px 52px -36px rgba(139, 92, 246, 0.95);
}

/* image containers — pages drop figures/placeholders inside */
.k5-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--k5-r);
  border: 1px solid var(--k5-line);
  background-color: var(--k5-panel);
  background-image:
    linear-gradient(140deg, rgba(34, 211, 238, 0.14) 0%, rgba(27, 16, 48, 0.9) 46%, rgba(139, 92, 246, 0.26) 100%);
}

.k5-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 7, 11, 0) 42%, rgba(6, 7, 11, 0.74) 100%);
}

.k5-media img,
.k5-media svg,
.k5-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.k5-media--21x9 { aspect-ratio: 21 / 9; }
.k5-media--16x9 { aspect-ratio: 16 / 9; }
.k5-media--4x3  { aspect-ratio: 4 / 3; }
.k5-media--1x1  { aspect-ratio: 1 / 1; }
.k5-media--3x4  { aspect-ratio: 3 / 4; }

.k5-media--slant {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 0 100%);
}

.k5-media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 16px;
  font-family: var(--k5-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 248, 252, 0.74);
}

/* badges */
.k5-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--k5-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  transition: filter 0.2s var(--k5-ease);
}

.k5-badge:hover { filter: brightness(1.14); }

.k5-badge--price {
  color: var(--k5-orange);
  border-color: rgba(255, 122, 26, 0.42);
  background: rgba(255, 122, 26, 0.14);
}

.k5-badge--live {
  color: var(--k5-lime);
  border-color: rgba(182, 255, 59, 0.36);
  background: rgba(182, 255, 59, 0.12);
}

.k5-badge--info {
  color: var(--k5-cyan);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(34, 211, 238, 0.12);
}

.k5-badge--muted {
  color: rgba(201, 206, 219, 0.72);
  border-color: var(--k5-line);
  background: rgba(255, 255, 255, 0.04);
}

/* stats */
.k5-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.k5-stat__value {
  font-family: var(--k5-font-mono);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--k5-cyan);
}

.k5-stat__label {
  font-family: var(--k5-font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 206, 219, 0.55);
}

/* ---------- prose ---------- */
.k5-prose {
  max-width: 72ch;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.85;
  color: rgba(201, 206, 219, 0.86);
}

.k5-prose > * + * { margin-top: 1.1em; }

.k5-prose h2,
.k5-prose h3 {
  font-family: var(--k5-font-serif);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: 0.01em;
  color: var(--k5-white);
}

.k5-prose h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin-top: 1.9em;
}

.k5-prose h3 {
  font-size: clamp(18px, 1.8vw, 22px);
  margin-top: 1.6em;
}

.k5-prose ul,
.k5-prose ol {
  padding-left: 1.25em;
  list-style: disc;
}

.k5-prose ol { list-style: decimal; }
.k5-prose li + li { margin-top: 0.5em; }

.k5-prose a {
  color: var(--k5-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.k5-prose a:hover { color: var(--k5-white); }

.k5-prose strong { color: var(--k5-white); }

.k5-prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--k5-violet);
  color: rgba(201, 206, 219, 0.92);
}

.k5-paper {
  border-radius: var(--k5-r-lg);
  padding: clamp(22px, 3.4vw, 46px);
  background: var(--k5-paper);
  color: var(--k5-ink);
}

.k5-paper .k5-prose { color: #2C3040; }
.k5-paper .k5-prose h2,
.k5-paper .k5-prose h3,
.k5-paper .k5-prose strong { color: var(--k5-ink); }
.k5-paper .k5-prose a { color: #5B32C9; }
.k5-paper .k5-prose a:hover { color: #1A1C24; }
.k5-paper .k5-eyebrow { color: #5B32C9; }

/* ============================================================
   FOOTER
   ============================================================ */
.k5-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  border-top: 1px solid var(--k5-line);
  background: linear-gradient(180deg, #06070B 0%, #0B0A16 42%, #150C28 100%);
  color: var(--k5-text);
  overflow: hidden;
}

.k5-footer__glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  pointer-events: none;
  background:
    radial-gradient(80% 130% at 12% 0%, rgba(139, 92, 246, 0.30), transparent 62%),
    radial-gradient(62% 120% at 88% 0%, rgba(34, 211, 238, 0.16), transparent 60%);
}

.k5-footer__inner {
  position: relative;
  max-width: var(--k5-w);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 74px) var(--k5-pad) 28px;
}

.k5-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
}

.k5-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.k5-footer__mark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  width: fit-content;
  font-family: var(--k5-font-display);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-decoration: none;
  color: var(--k5-white);
  background: linear-gradient(100deg, #FFFFFF 0%, var(--k5-cyan) 58%, var(--k5-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter 0.22s var(--k5-ease);
}

.k5-footer__mark span {
  font-family: var(--k5-font-mono);
  font-size: clamp(12px, 1.5vw, 17px);
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--k5-cyan);
  -webkit-text-fill-color: var(--k5-cyan);
  opacity: 0.82;
}

.k5-footer__mark:hover { filter: brightness(1.12); }

.k5-footer__summary {
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(201, 206, 219, 0.7);
}

.k5-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 42px);
}

.k5-footer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--k5-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--k5-cyan);
}

.k5-footer__title::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--k5-violet);
}

.k5-footer__links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.k5-footer__link {
  position: relative;
  display: inline-block;
  width: fit-content;
  padding-bottom: 2px;
  font-size: 15px;
  color: rgba(201, 206, 219, 0.75);
  text-decoration: none;
  transition: color 0.2s var(--k5-ease);
}

.k5-footer__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right center;
  background: var(--k5-cyan);
  transition: transform 0.26s var(--k5-ease);
}

.k5-footer__link:hover { color: var(--k5-white); }

.k5-footer__link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.k5-footer__contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr);
  gap: clamp(16px, 2.4vw, 34px);
  margin-top: clamp(32px, 4.4vw, 56px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--k5-line);
}

.k5-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.k5-contact__key {
  font-family: var(--k5-font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 206, 219, 0.48);
}

.k5-contact__value {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(247, 248, 252, 0.9);
  text-decoration: none;
  transition: color 0.2s var(--k5-ease);
}

a.k5-contact__value:hover { color: var(--k5-cyan); }

.k5-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  margin-top: clamp(24px, 3vw, 38px);
  padding-top: 20px;
  border-top: 1px solid var(--k5-line);
  font-family: var(--k5-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(201, 206, 219, 0.5);
}

.k5-footer__legal { color: rgba(201, 206, 219, 0.58); }

.k5-footer__copy { color: rgba(201, 206, 219, 0.5); }

@media (max-width: 900px) {
  .k5-footer__top { grid-template-columns: 1fr; }
  .k5-footer__contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .k5-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .k5-footer__contact { grid-template-columns: 1fr; }
  .k5-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   JS-INJECTED UTILITIES
   ============================================================ */
.k5-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 95;
  pointer-events: none;
  background: transparent;
}

.k5-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--k5-violet) 0%, var(--k5-cyan) 55%, var(--k5-lime) 100%);
}

.k5-totop {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--k5-line);
  border-radius: 50%;
  background: rgba(17, 19, 28, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--k5-cyan);
  font-family: var(--k5-font-mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s var(--k5-ease), transform 0.22s var(--k5-ease),
    visibility 0.22s var(--k5-ease), border-color 0.2s var(--k5-ease),
    color 0.2s var(--k5-ease);
}

.k5-totop[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.k5-totop:hover {
  border-color: var(--k5-cyan);
  color: var(--k5-white);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .k5-rail { display: none; }
  .k5-btn--primary:hover,
  .k5-btn--orange:hover { transform: none; }
}
