:root {
  --page: #f7f7f5;
  --paper: #f4f0e7;
  --surface: #ffffff;
  --ink: #181818;
  --muted: #747474;
  --soft: #a6a6a6;
  --line: #d9d9d5;
  --accent: #6f55f5;
  --accent-dark: #5941dc;
  --accent-soft: #eeeaff;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(rgba(24, 24, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 24, 24, 0.035) 1px, transparent 1px),
    var(--page);
  background-position: center top;
  background-size: 80px 80px;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(247, 247, 245, 0.88);
  content: "";
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.identity img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.edition {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, 0.76fr);
  gap: clamp(56px, 8vw, 110px);
  align-items: center;
  padding: 76px 0 80px;
}

.hero-copy {
  animation: rise 0.72s cubic-bezier(0.2, 0.65, 0.25, 1) both;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  content: "";
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(52px, 6.4vw, 82px);
  font-weight: 700;
  letter-spacing: -0.064em;
  line-height: 0.96;
  text-wrap: balance;
}

.lede {
  max-width: 610px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  text-wrap: pretty;
}

.form-wrap {
  max-width: 650px;
  margin-top: 38px;
}

.guide-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 50px rgba(24, 24, 24, 0.055);
  backdrop-filter: blur(10px);
}

.guide-form input {
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

.guide-form input::placeholder {
  color: var(--soft);
}

.guide-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.guide-form.is-prompted {
  animation: prompt-form 680ms ease both;
}

.guide-form button {
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background 160ms ease, transform 160ms ease;
}

.guide-form button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.guide-form button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.form-note {
  margin: 13px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.55;
}

.form-note strong {
  color: var(--muted);
  font-weight: 650;
}

.status {
  min-height: 21px;
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
}

.artifact-stage {
  position: relative;
  min-height: 596px;
  animation: rise 0.82s 80ms cubic-bezier(0.2, 0.65, 0.25, 1) both;
}

.artifact-grid {
  position: absolute;
  inset: 26px 22px 0 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(24, 24, 24, 0.1);
}

.artifact-grid::before,
.artifact-grid::after {
  position: absolute;
  background: var(--line);
  content: "";
}

.artifact-grid::before {
  top: 58px;
  right: 0;
  left: 0;
  height: 1px;
}

.artifact-grid::after {
  top: 58px;
  bottom: 0;
  left: 47px;
  width: 1px;
}

.artifact-head {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.artifact-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.artifact-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.guide-cover {
  position: absolute;
  top: 94px;
  right: 58px;
  width: min(72%, 302px);
  max-height: 432px;
  border: 1px solid #dfdcd3;
  background: var(--paper);
  box-shadow: 0 24px 50px rgba(24, 24, 24, 0.16);
  object-fit: cover;
  object-position: top;
  transform: rotate(1.4deg);
  transition: transform 300ms ease;
}

.artifact-stage:hover .guide-cover {
  transform: rotate(0deg) translateY(-4px);
}

.signal {
  position: absolute;
  top: 108px;
  bottom: 48px;
  left: 29px;
  width: 36px;
}

.signal::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 17px;
  width: 1px;
  background: var(--line);
  content: "";
}

.signal::after {
  position: absolute;
  top: 0;
  left: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  content: "";
  animation: scan 4.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.artifact-note {
  position: absolute;
  right: -4px;
  bottom: 0;
  width: 228px;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 42px rgba(24, 24, 24, 0.18);
}

.artifact-note span {
  display: block;
  margin-bottom: 6px;
  color: #b9aafa;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.artifact-note strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.contents {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.contents-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contents li {
  min-width: 0;
  padding: 23px 20px 25px;
  border-right: 1px solid var(--line);
}

.contents li:last-child {
  border-right: 0;
}

.contents span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.contents strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  color: var(--soft);
  font-size: 11px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.55fr);
  gap: 70px;
  align-items: end;
  padding: 78px 0 70px;
}

.library-hero h1 {
  max-width: 780px;
}

.library-intro {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.library-access {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
  gap: clamp(44px, 7vw, 100px);
  align-items: center;
  margin-bottom: 54px;
  padding-top: 34px;
  padding-bottom: 34px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.access-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-access-copy h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 46px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.library-access-copy > p:last-child {
  max-width: 500px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.library-access-action .guide-form {
  margin: 0;
}

.library-open {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.library-open p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.library-open strong {
  color: var(--ink);
}

.open-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.resource-card {
  display: grid;
  grid-template-columns: minmax(140px, 0.74fr) minmax(0, 1fr);
  min-height: 330px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.resource-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 28px 22px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.resource-preview img {
  width: min(100%, 180px);
  max-height: 260px;
  border: 1px solid rgba(24, 24, 24, 0.11);
  box-shadow: 0 18px 38px rgba(24, 24, 24, 0.13);
  object-fit: cover;
  object-position: top;
  transform: rotate(-1deg);
  transition: transform 240ms ease;
}

.library-locked .resource-preview img {
  filter: blur(8px) saturate(0.72);
  opacity: 0.78;
  transform: scale(1.07) rotate(-1deg);
}

.resource-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 14px 32px rgba(24, 24, 24, 0.24);
  transform: translate(-50%, -50%);
}

.resource-lock::before {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 14px;
  height: 13px;
  border: 2px solid #fff;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.resource-lock::after {
  position: absolute;
  top: 23px;
  left: 14px;
  width: 20px;
  height: 15px;
  border-radius: 3px;
  background: #fff;
  content: "";
}

.library-unlocked .resource-lock {
  display: none;
}

.library-unlocked .resource-preview img {
  filter: none;
  opacity: 1;
}

.resource-card:hover .resource-preview img {
  transform: rotate(0deg) translateY(-4px);
}

.resource-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 32px 30px;
}

.resource-number {
  margin: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.resource-copy h2 {
  margin: 34px 0 12px;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.resource-copy > p:not(.resource-number) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.resource-link span {
  color: var(--accent);
  transition: transform 160ms ease;
}

.resource-link:hover span {
  transform: translate(2px, -2px);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan {
  0%,
  8% {
    top: 0;
  }
  50%,
  58% {
    top: calc(100% - 8px);
  }
  100% {
    top: 0;
  }
}

@keyframes prompt-form {
  0%,
  100% {
    border-color: var(--line);
    box-shadow: 0 16px 50px rgba(24, 24, 24, 0.055);
  }
  38% {
    border-color: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft), 0 16px 50px rgba(24, 24, 24, 0.08);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-top: 58px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .artifact-stage {
    width: min(100%, 520px);
    min-height: 610px;
    margin: 0 auto;
  }

  .library-hero {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .library-access {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    background-size: 56px 56px;
  }

  .shell {
    width: min(calc(100% - 40px), var(--max));
  }

  .site-header {
    min-height: 72px;
  }

  .identity {
    font-size: 14px;
  }

  .identity img {
    width: 30px;
    height: 30px;
  }

  .edition {
    display: none;
  }

  .hero {
    gap: 44px;
    padding: 50px 0 58px;
  }

  h1 {
    font-size: clamp(47px, 14vw, 62px);
  }

  .lede {
    margin-top: 22px;
    font-size: 17px;
  }

  .form-wrap {
    margin-top: 30px;
  }

  .guide-form {
    grid-template-columns: 1fr;
  }

  .guide-form button {
    min-height: 52px;
  }

  .artifact-stage {
    min-height: 490px;
  }

  .artifact-grid {
    inset: 18px 10px 0 0;
  }

  .guide-cover {
    top: 86px;
    right: 32px;
    width: min(72%, 245px);
    max-height: 335px;
  }

  .artifact-note {
    right: -2px;
    width: 204px;
  }

  .contents-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .contents li:nth-child(2) {
    border-right: 0;
  }

  .contents li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }

  .library-hero {
    padding: 54px 0 48px;
  }

  .library-hero h1 {
    max-width: 100%;
    font-size: 46px;
    overflow-wrap: break-word;
  }

  .library-intro {
    font-size: 16px;
  }

  .resource-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .resource-preview {
    min-height: 310px;
    padding: 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .resource-preview img {
    width: min(100%, 190px);
    max-height: 255px;
  }

  .resource-copy {
    min-height: 260px;
    padding: 27px 24px;
  }

  .resource-copy h2 {
    margin-top: 28px;
    font-size: 25px;
  }

  .resource-copy > p:not(.resource-number) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-form.is-prompted {
    animation: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
