:root {
  color-scheme: dark;
  --ink: #020403;
  --paper: #f2eee5;
  --muted: #aaa79f;
  --line: rgba(242, 238, 229, 0.24);
  --turquoise: #08a9b2;
  --yellow: #eba318;
  --sans: "Helvetica Neue", "Neue Haas Grotesk Text Pro", Inter, Arial, sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: var(--ink);
}

body {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  padding: clamp(1.15rem, 3vw, 3rem);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  user-select: none;
  -webkit-user-select: none;
}

body * {
  pointer-events: none;
}

.sensory-container {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
}

.sensory-poster,
.sensory-motion {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: contain;
  object-position: center;
}

.sensory-poster {
  z-index: 0;
}

.sensory-motion {
  z-index: 1;
}

.masthead,
.base {
  position: relative;
  z-index: 2;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 32rem) auto;
  align-items: start;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 5rem);
}

.definition {
  --frame-x: clamp(0.72rem, 1.08vw, 1rem);
  --frame-y: clamp(0.62rem, 0.92vw, 0.88rem);
  position: relative;
  display: grid;
  grid-template-columns: min-content min-content minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(0.5rem, 0.9vw, 0.9rem);
  max-width: 31rem;
  margin: calc(var(--frame-y) * -1) 0 calc(var(--frame-y) * -1) calc(var(--frame-x) * -1);
  padding: var(--frame-y) 0 var(--frame-y) var(--frame-x);
  border-left: 1px solid var(--line);
  font-weight: 500;
  filter: drop-shadow(0 0.15rem 1rem rgba(0, 0, 0, 0.9));
  text-shadow: 0 0.12rem 1.1rem rgba(0, 0, 0, 0.96), 0 0 0.2rem rgba(0, 0, 0, 0.94);
}

.definition::before,
.definition::after {
  position: absolute;
  left: -1px;
  width: clamp(2.25rem, 4vw, 4.4rem);
  height: 1px;
  content: "";
}

.definition::before {
  top: 0;
  background: linear-gradient(90deg, var(--turquoise), var(--line));
}

.definition::after {
  bottom: 0;
  background: linear-gradient(90deg, var(--yellow), var(--line));
}

.term {
  margin-top: 0.16em;
  font-size: clamp(0.72rem, 0.95vw, 0.94rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.slash {
  margin-top: -0.15em;
  color: var(--turquoise);
  font: 300 clamp(1.45rem, 2.35vw, 2.5rem)/0.72 var(--sans);
}

.meaning {
  max-width: 19ch;
  font-size: clamp(1rem, 1.7vw, 1.9rem);
  letter-spacing: -0.052em;
  line-height: 0.98;
}

.access {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.7vw, 1.7rem);
  text-shadow: 0 0.12rem 0.9rem rgba(0, 0, 0, 0.92);
}

.form-id {
  color: var(--muted);
  font: 500 clamp(0.5rem, 0.56vw, 0.62rem)/1 var(--mono);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.model-access {
  position: relative;
  display: inline-flex;
  gap: 0.36em;
  padding: 0.25rem 0 0.5rem;
  color: var(--paper);
  font-size: clamp(0.72rem, 1.08vw, 1.06rem);
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

a.model-access {
  pointer-events: auto;
}

.model-access strong {
  color: var(--turquoise);
  font-weight: inherit;
}

.model-access::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--line), var(--turquoise));
  opacity: 0.58;
  transition: opacity 160ms ease;
}

.model-access:hover::after,
.model-access:focus-visible::after {
  opacity: 1;
}

.model-access:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 0.38rem;
}

.base {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

.paradeaux {
  width: max-content;
  color: var(--muted);
  font: 500 clamp(0.55rem, 0.62vw, 0.66rem)/1.2 var(--sans);
  letter-spacing: 0.025em;
  text-decoration: none;
  text-shadow: 0 0.12rem 0.8rem rgba(0, 0, 0, 0.96);
  transition: color 160ms ease;
}

a.paradeaux {
  pointer-events: auto;
}

.paradeaux strong {
  color: var(--paper);
  font-weight: 500;
  letter-spacing: 0.055em;
}

.paradeaux:hover {
  color: var(--turquoise);
}

.paradeaux:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 0.38rem;
}

.answerability {
  display: grid;
  grid-template-columns: auto 2.15rem minmax(13rem, auto);
  align-items: stretch;
  min-width: min(100%, 22rem);
  min-height: 4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 4, 3, 0.74);
  box-shadow: 0 0 1.1rem rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
}

.code {
  align-self: end;
  padding: 0 0.55rem 0.48rem 0;
  color: var(--muted);
  font-size: 0.46rem;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.barcode {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: repeating-linear-gradient(
    90deg,
    transparent 0 2px,
    rgba(242, 238, 229, 0.64) 2px 3px,
    transparent 3px 6px,
    rgba(242, 238, 229, 0.28) 6px 8px
  );
}

.answerability dl {
  display: grid;
  align-content: center;
  gap: 0.19rem;
  margin: 0;
  padding: 0.55rem 0.65rem 0.5rem 0.72rem;
}

.answerability dl div {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.45rem;
}

.answerability dt,
.answerability dd {
  margin: 0;
  font-size: clamp(0.45rem, 0.53vw, 0.56rem);
  line-height: 1.25;
  white-space: nowrap;
}

.answerability dt {
  color: var(--muted);
  text-transform: uppercase;
}

.answerability dd {
  color: var(--paper);
}

@media (max-width: 700px) {
  body {
    padding: 1rem;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .definition {
    column-gap: 0.42rem;
    max-width: 13.4rem;
  }

  .term {
    font-size: 0.65rem;
  }

  .slash {
    font-size: 1.35rem;
  }

  .meaning {
    max-width: 16ch;
    font-size: clamp(0.78rem, 3.45vw, 0.9rem);
    line-height: 1;
  }

  .access {
    align-items: flex-end;
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-id {
    font-size: 0.46rem;
  }

  .model-access {
    font-size: 0.7rem;
  }

  .base {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .answerability {
    justify-self: end;
    min-width: min(100%, 20.5rem);
    min-height: 3.7rem;
  }

  .paradeaux {
    order: 2;
  }
}

@media (max-height: 560px) {
  body {
    padding: 0.85rem 1.1rem;
  }

  .definition {
    max-width: 27rem;
  }

  .meaning {
    font-size: clamp(0.86rem, 3.4vh, 1.35rem);
  }

  .answerability {
    min-height: 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sensory-motion {
    display: none;
  }
}
