:root {
  --paper: #e3e2dc;
  --ink: #1c1b22;
  --muted: #55545c;
  --link: #086b30;

  --tip-bg: #100010;
  --tip-edge-top: #4a12b8;
  --tip-edge-bottom: #2a0a66;
  --tip-name: #55ffff;
  --tip-lore: #c65cff;
  --tip-gray: #aaaaaa;
  --tip-green: #55ff55;
  --tip-id: #7a7a7a;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

main {
  width: min(100% - 2rem, 44rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 8vw, 6rem) 2rem;
}

/* The item tooltip: the one memorable element on the page. */

.tooltip {
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  background: linear-gradient(180deg, var(--tip-edge-top), var(--tip-edge-bottom));
  clip-path: polygon(
    6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px,
    100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%,
    6px calc(100% - 6px), 0 calc(100% - 6px), 0 6px, 6px 6px
  );
  font-family: "Pixelify Sans", ui-monospace, "Courier New", monospace;
  font-size: clamp(1.1rem, 3.6vw, 1.75rem);
  line-height: 1.35;
}

.tooltip-inner {
  padding: 0.75em 1.1em 0.85em;
  background: var(--tip-bg);
  clip-path: polygon(
    3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px,
    100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%,
    3px calc(100% - 3px), 0 calc(100% - 3px), 0 3px, 3px 3px
  );
  text-shadow: 0.09em 0.09em 0 #2a2a2a;
}

.tooltip p,
.tooltip h1,
.tooltip ul {
  margin: 0;
  padding: 0;
}

.item-name {
  color: var(--tip-name);
  font-size: 1em;
  font-weight: 500;
}

.lore {
  color: var(--tip-lore);
  font-style: italic;
}

.attr-head {
  margin-top: 0.9em;
  color: var(--tip-gray);
}

.attrs {
  list-style: none;
  color: var(--tip-green);
}

.item-id {
  margin-top: 0.9em;
  color: var(--tip-id);
}

/* Tooltip lines appear one after another on load. */

.line {
  animation: appear 0s both;
  animation-delay: calc(var(--i, 0) * 110ms);
}

@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .line {
    animation: none;
  }
}

/* Everything else stays quiet. */

.block {
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
}

.block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.block p {
  max-width: 38rem;
  margin: 0;
}

.links {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

footer {
  width: min(100% - 2rem, 44rem);
  margin-inline: auto;
  padding-block: 2rem 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  max-width: 38rem;
  margin: 0;
}
