/* Load AFTER common.css and work.css. Existing site tokens win. */
.beta-pagination,
.beta-back-nav {
  color: var(--theme-bk, #090909);
  padding-inline: var(--h, 140px);
  margin-block: var(--g-l, 48px) var(--g-xl, 64px);
}
.beta-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--g-s, 16px);
}
.beta-pagination__pages {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
}
.beta-nav-link {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--theme-bk, #090909);
  font-family: 'AOT Serial Mono', 'Gothic A1', monospace;
  font-size: var(--fz-s, 14px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.003rem;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.beta-nav-link__label { position: relative; }
.beta-nav-link__label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 0;
  border: 0;
  border-top: 2px solid currentColor;
  background: none;
  transform: none;
  transition: width 240ms ease;
}
.beta-nav-link[aria-current='page'] { font-weight: 700; }
.beta-nav-link[aria-current='page'] .beta-nav-link__label::after {
  width: 100%;
}
@media (hover: hover) {
  .beta-nav-link:hover .beta-nav-link__label::after { width: 100%; }
}
.beta-nav-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}
.beta-nav-link:focus-visible .beta-nav-link__label::after { width: 100%; }
.beta-nav-link[aria-disabled='true'] {
  color: var(--theme-gr-40, #a2a2a2);
  cursor: default;
}
.beta-nav-link[aria-disabled='true'] .beta-nav-link__label::after { display: none; }
.beta-pagination__prev { justify-self: start; }
.beta-pagination__next { justify-self: end; }
.beta-back-nav { text-align: center; }
.beta-back-nav__rule {
  border: 0;
  border-top: .75px solid var(--theme-gr, #565656);
  margin: 0 0 var(--g-m, 24px);
}
.beta-nav-link__arrow { width: 18px; height: 18px; flex: none; }
@media (max-width: 1080px) {
  .beta-pagination, .beta-back-nav { padding-inline: var(--h, 24px); }
}
@media (max-width: 600px) {
  .beta-pagination { gap: 0; }
  .beta-pagination__pages { gap: 0; }
  .beta-pagination__direction { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .beta-nav-link__label::after { transition: none; }
}
@media (max-width: 380px) {
  .beta-pagination__pages .beta-nav-link { min-width: 36px; }
}

/* BACK TO WORK uses the same fixed 2px underline as pagination. */
.beta-back-nav .beta-nav-link__arrow {
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.beta-back-nav .beta-arrow-stroke {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
/* Right-to-left shaft, then the two branches of the arrowhead. */
@keyframes beta-arrow-trim {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}
.beta-back-nav .beta-nav-link:focus-visible .beta-arrow-shaft {
  animation: beta-arrow-trim 280ms ease-out both;
}
.beta-back-nav .beta-nav-link:focus-visible .beta-arrow-head {
  animation: beta-arrow-trim 180ms ease-out 180ms both;
}
@media (hover: hover) {
  .beta-back-nav .beta-nav-link:hover .beta-nav-link__label::after {
    width: 100%;
    transform: none;
  }
  .beta-back-nav .beta-nav-link:hover .beta-arrow-shaft {
    animation: beta-arrow-trim 280ms ease-out both;
  }
  .beta-back-nav .beta-nav-link:hover .beta-arrow-head {
    animation: beta-arrow-trim 180ms ease-out 180ms both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .beta-back-nav .beta-nav-link__label::after { transition: none; }
  .beta-back-nav .beta-nav-link .beta-arrow-stroke {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Contact페이지 전용 화살 — independent diagonal-arrow component. */
.beta-contact-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 8px;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: var(--theme-bk, #090909);
  cursor: pointer;
  text-decoration: none;
}
.beta-contact-arrow:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}
.beta-contact-arrow svg {
  display: block;
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.beta-contact-arrow path {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
.beta-contact-arrow:focus-visible .beta-contact-arrow__shaft {
  animation: beta-arrow-trim 280ms ease-out both;
}
.beta-contact-arrow:focus-visible .beta-contact-arrow__head {
  animation: beta-arrow-trim 180ms ease-out 180ms both;
}
@media (hover: hover) {
  .beta-contact-arrow:hover .beta-contact-arrow__shaft {
    animation: beta-arrow-trim 280ms ease-out both;
  }
  .beta-contact-arrow:hover .beta-contact-arrow__head {
    animation: beta-arrow-trim 180ms ease-out 180ms both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .beta-contact-arrow .beta-contact-arrow__shaft,
  .beta-contact-arrow .beta-contact-arrow__head {
    animation: none;
    stroke-dashoffset: 0;
  }
}
